@ui5/webcomponents 2.24.0 → 2.25.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Carousel.js +3 -1
- package/dist/Carousel.js.map +1 -1
- package/dist/ColorPalette.d.ts +1 -0
- package/dist/ColorPalette.js +23 -12
- package/dist/ColorPalette.js.map +1 -1
- package/dist/ColorPalettePopover.js +6 -5
- package/dist/ColorPalettePopover.js.map +1 -1
- package/dist/DayPicker.d.ts +1 -0
- package/dist/DayPicker.js +10 -2
- package/dist/DayPicker.js.map +1 -1
- package/dist/Dialog.d.ts +39 -0
- package/dist/Dialog.js +107 -3
- package/dist/Dialog.js.map +1 -1
- package/dist/DialogTemplate.js +4 -2
- package/dist/DialogTemplate.js.map +1 -1
- package/dist/FileUploader.d.ts +5 -2
- package/dist/FileUploader.js +22 -1
- package/dist/FileUploader.js.map +1 -1
- package/dist/FileUploaderTemplate.js +3 -2
- package/dist/FileUploaderTemplate.js.map +1 -1
- package/dist/Popup.d.ts +2 -0
- package/dist/Popup.js +7 -1
- package/dist/Popup.js.map +1 -1
- package/dist/css/themes/Dialog.css +1 -1
- package/dist/css/themes/TableHeaderCell.css +1 -1
- package/dist/custom-elements-internal.json +21 -1
- package/dist/custom-elements.json +20 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +3 -1
- package/dist/generated/i18n/i18n-defaults.js +3 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/Dialog.css.d.ts +1 -1
- package/dist/generated/themes/Dialog.css.js +1 -1
- package/dist/generated/themes/Dialog.css.js.map +1 -1
- package/dist/generated/themes/TableHeaderCell.css.d.ts +1 -1
- package/dist/generated/themes/TableHeaderCell.css.js +1 -1
- package/dist/generated/themes/TableHeaderCell.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +6 -1
- package/dist/web-types.json +12 -2
- package/package-scripts.cjs +1 -0
- package/package.json +11 -9
- package/src/DialogTemplate.tsx +13 -0
- package/src/FileUploaderTemplate.tsx +4 -0
- package/src/i18n/messagebundle.properties +7 -0
- package/src/themes/Dialog.css +22 -1
- package/src/themes/TableHeaderCell.css +1 -0
package/dist/FileUploader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploader.js","sourceRoot":"","sources":["../src/FileUploader.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EACN,yBAAyB,EACzB,0BAA0B,EAC1B,4BAA4B,EAC5B,+BAA+B,EAC/B,mCAAmC,GACnC,MAAM,+DAA+D,CAAC;AACvE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EACN,OAAO,EACP,SAAS,EACT,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,OAAO,EACP,MAAM,GACN,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EACN,0BAA0B,EAC1B,+BAA+B,EAC/B,+BAA+B,EAC/B,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,gCAAgC,EAChC,yCAAyC,EACzC,6BAA6B,EAC7B,yBAAyB,GACzB,MAAM,mCAAmC,CAAC;AAM3C,WAAW;AACX,OAAO,oBAAoB,MAAM,2BAA2B,CAAC;AAE7D,SAAS;AACT,OAAO,eAAe,MAAM,wCAAwC,CAAC;AACrE,OAAO,0BAA0B,MAAM,mDAA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K,CAAC,yBAAyB,CAAC;2CACT;AAGxB;IADC,KAAK,CAAC,kBAAkB,CAAC;4CACA;AAG1B;IADC,KAAK,CAAC,iBAAiB,CAAC;gDACF;AAGvB;IADC,KAAK,CAAC,gCAAgC,CAAC;qDACd;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;yDACL;AAGxC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;oDACxB;AAGhB;IADN,IAAI,CAAC,oBAAoB,CAAC;sCACG;AAvLzB,YAAY;IA/BjB,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE;YACP,eAAe;YACf,0BAA0B;YAC1B,oBAAoB;SACpB;QACD,QAAQ,EAAE,oBAAoB;KAC9B,CAAC;IACF;;;;;;OAMG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;IACF;;;;;OAKG;;IACF,KAAK,CAAC,kBAAkB,EAAE;QAC1B,OAAO,EAAE,IAAI;KACb,CAAC;GACI,YAAY,CAgjBjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport query from \"@ui5/webcomponents-base/dist/decorators/query.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport {\n\tgetEffectiveAriaLabelText,\n\tgetAssociatedLabelForTexts,\n\tgetAllAccessibleNameRefTexts,\n\tgetEffectiveAriaDescriptionText,\n\tgetAllAccessibleDescriptionRefTexts,\n} from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport {\n\tisUpAlt,\n\tisDownAlt,\n\tisEnter,\n\tisDelete,\n\tisF4,\n\tisSpace,\n\tisRight,\n\tisLeft,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport {\n\tFILEUPLOADER_INPUT_TOOLTIP,\n\tFILEUPLOADER_VALUE_HELP_TOOLTIP,\n\tFILEUPLOADER_CLEAR_ICON_TOOLTIP,\n\tVALUE_STATE_SUCCESS,\n\tVALUE_STATE_INFORMATION,\n\tVALUE_STATE_ERROR,\n\tVALUE_STATE_WARNING,\n\tFILEUPLOADER_DEFAULT_PLACEHOLDER,\n\tFILEUPLOADER_DEFAULT_MULTIPLE_PLACEHOLDER,\n\tFILEUPLOADER_ROLE_DESCRIPTION,\n\tFILEUPLOAER_VALUE_MISSING,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport type { InputAccInfo } from \"./Input.js\";\nimport type Popover from \"./Popover.js\";\nimport type Tokenizer from \"./Tokenizer.js\";\n\n// Template\nimport FileUploaderTemplate from \"./FileUploaderTemplate.js\";\n\n// Styles\nimport FileUploaderCss from \"./generated/themes/FileUploader.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\nimport ValueStateMessageCss from \"./generated/themes/ValueStateMessage.css.js\";\n\nconst convertBytesToMegabytes = (bytes: number) => (bytes / 1024) / 1024;\n\ntype FileData = {\n\tfileName: string,\n\tfileSize: number,\n}\n\ntype FileUploaderFileSizeExceedEventDetail = {\n\tfilesData: Array<FileData>,\n}\n\ntype FileUploaderChangeEventDetail = {\n\tfiles: FileList | null,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-file-uploader` opens a file explorer dialog and enables users to upload files.\n * The component consists of input field, but you can provide an HTML element by your choice\n * to trigger the file upload, by using the default slot.\n * Furthermore, you can set the property \"hideInput\" to \"true\" to hide the input field.\n *\n * To get all selected files, you can simply use the read-only \"files\" property.\n * To restrict the types of files the user can select, you can use the \"accept\" property.\n *\n * And, similar to all input based components, the FileUploader supports \"valueState\", \"placeholder\", \"name\", and \"disabled\" properties.\n *\n * For the `ui5-file-uploader`\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/FileUploader.js\";`\n * @constructor\n * @since 1.0.0-rc.6\n * @extends UI5Element\n * @public\n */\n@customElement({\n\ttag: \"ui5-file-uploader\",\n\tlanguageAware: true,\n\tformAssociated: true,\n\trenderer: jsxRenderer,\n\tstyles: [\n\t\tFileUploaderCss,\n\t\tResponsivePopoverCommonCss,\n\t\tValueStateMessageCss,\n\t],\n\ttemplate: FileUploaderTemplate,\n})\n/**\n * Event is fired when the value of the file path has been changed.\n *\n * **Note:** Keep in mind that because of the HTML input element of type file, the event is also fired in Chrome browser when the Cancel button of the uploads window is pressed.\n * @param {FileList | null} files The current files.\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\n/**\n * Event is fired when the size of a file is above the `maxFileSize` property value.\n * @param {Array<FileData>} filesData An array of `FileData` objects containing the`fileName` and `fileSize` in MB of each file that exceeds the upload limit.\n * @since 2.2.0\n * @public\n */\n@event(\"file-size-exceed\", {\n\tbubbles: true,\n})\nclass FileUploader extends UI5Element implements IFormInputElement {\n\teventDetails!: {\n\t\t\"change\": FileUploaderChangeEventDetail,\n\t\t\"file-size-exceed\": FileUploaderFileSizeExceedEventDetail,\n\t}\n\t/**\n\t * Comma-separated list of file types that the component should accept.\n\t *\n\t * **Note:** Please make sure you are adding the `.` in front on the file type, e.g. `.png` in case you want to accept png's only.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccept?: string;\n\n\t/**\n\t * If set to \"true\", the input field of component will not be rendered. Only the default slot that is passed will be rendered.\n\t *\n\t * **Note:** Use this property in combination with the default slot to achieve a button-only file uploader design.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideInput = false;\n\n\t/**\n\t * Defines whether the component is in disabled state.\n\t *\n\t * **Note:** A disabled component is completely noninteractive.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Allows multiple files to be chosen.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tmultiple = false;\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines a short hint intended to aid the user with data entry when the component has no value.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tplaceholder?: string;\n\n\t/**\n\t * Defines the name/names of the file/files to upload.\n\t * @default \"\"\n\t * @formEvents change\n\t * @formProperty\n\t * @public\n\t */\n\t@property()\n\tvalue = \"\";\n\n\t/**\n\t * Defines the maximum file size in megabytes which prevents the upload if at least one file exceeds it.\n\t * @default undefined\n\t * @since 2.2.0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmaxFileSize?: number;\n\n\t/**\n\t * Defines the value state of the component.\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property()\n\tvalueState: `${ValueState}` = \"None\";\n\n\t/**\n\t * Defines whether the component is required.\n\t * @default false\n\t * @public\n\t * @since 2.13.0\n\t */\n\t@property({ type: Boolean })\n\trequired = false;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.13.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the input.\n\t * @default undefined\n\t * @public\n\t * @since 2.13.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the accessible description of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.14.0\n\t */\n\t@property()\n\taccessibleDescription?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that describe the input.\n\t * @default undefined\n\t * @public\n\t * @since 2.14.0\n\t */\n\t@property()\n\taccessibleDescriptionRef?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused = false;\n\n\t/**\n\t * This slot allows you to add custom content to the component, such as a button or any other interactive element to trigger the file selection dialog.\n\t *\n\t * **Note:** For best accessibility experience, set a `tabindex` of \"-1\" on your interactive element, or it will be set automatically.\n\t * This slot is intended for use cases where you want a button-only file uploader.\n\t * It is recommended to set `hideInput` property to \"true\" when using this slot.\n\t * Not setting `hideInput` may negatively impact the screen reader users.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\tcontent!: DefaultSlot<HTMLElement>;\n\n\t/**\n\t * Defines the value state message that will be displayed as pop up under the component.\n\t *\n\t * **Note:** If not specified, a default text (in the respective language) will be displayed.\n\t *\n\t * **Note:** The `valueStateMessage` would be displayed,\n\t * when the component is in `Information`, `Critical` or `Negative` value state.\n\t * @since 1.0.0-rc.9\n\t * @public\n\t */\n\t@slot()\n\tvalueStateMessage!: Slot<HTMLElement>;\n\n\t@query(\".ui5-file-uploader-form\")\n\t_form!: HTMLFormElement;\n\n\t@query(\"input[type=file]\")\n\t_input!: HTMLInputElement;\n\n\t@query(\"[ui5-tokenizer]\")\n\t_tokenizer!: Tokenizer;\n\n\t@query(\".ui5-valuestatemessage-popover\")\n\t_messagePopover!: Popover;\n\n\t@property({ type: Array, noAttribute: true })\n\t_selectedFilesNames: Array<string> = [];\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_tokenizerOpen = false;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tget formValidityMessage() {\n\t\tconst validity = this.formValidity;\n\n\t\tif (validity.valueMissing) {\n\t\t\treturn FileUploader.i18nBundle.getText(FILEUPLOAER_VALUE_MISSING);\n\t\t}\n\n\t\treturn \"\";\n\t}\n\n\tget formValidity(): ValidityStateFlags {\n\t\treturn {\n\t\t\tvalueMissing: this.required && (!this.files || this.files.length === 0),\n\t\t};\n\t}\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\t/**\n\t * @override\n\t */\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\treturn this._input;\n\t}\n\n\tget formFormattedValue() {\n\t\tif (this.files && this.name) {\n\t\t\tconst formData = new FormData();\n\n\t\t\tfor (let i = 0; i < this.files.length; i++) {\n\t\t\t\tformData.append(this.name, this.files[i]);\n\t\t\t}\n\n\t\t\treturn formData;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t_onclick() {\n\t\tif (this.getFocusDomRef()?.matches(\":focus-within\")) {\n\t\t\tthis._openFileBrowser();\n\t\t}\n\t}\n\n\t_onNativeInputClick(e: MouseEvent) {\n\t\te.stopPropagation();\n\t}\n\n\t_onmousedown(e: MouseEvent) {\n\t\te.preventDefault();\n\t\tthis._input.focus();\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst firstToken = this._tokenizer?.tokens.find(token => !token.hasAttribute(\"overflows\"));\n\t\tconst isToken = (<HTMLElement>e.target).hasAttribute(\"ui5-token\");\n\t\tconst isArrowNavigation = this.effectiveDir === \"ltr\" ? isRight(e) : isLeft(e);\n\n\t\tif (this.hideInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._openFileBrowser();\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isArrowNavigation && !isToken) {\n\t\t\te.preventDefault();\n\t\t\tfirstToken?.focus();\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this.hideInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isSpace(e) || isF4(e) || isUpAlt(e) || isDownAlt(e)) {\n\t\t\tthis._openFileBrowser();\n\t\t} else if (isDelete(e)) {\n\t\t\tthis._clearFileSelection();\n\t\t}\n\t}\n\n\t_ondrag(e: DragEvent) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t}\n\n\t_ondrop(e: DragEvent) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tconst files = e.dataTransfer?.files;\n\n\t\tif (!files) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst validatedFiles = this._validateFiles(files);\n\n\t\tif (!this.value && !validatedFiles.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._input.files = validatedFiles;\n\t\tthis._selectedFilesNames = this._fileNamesList(files);\n\t\tthis.value = this.computedValue;\n\t\tthis.fireDecoratorEvent(\"change\", {\n\t\t\tfiles: validatedFiles,\n\t\t});\n\t}\n\n\t_onfocusin() {\n\t\tthis.focused = true;\n\t\tif (this._tokenizer) {\n\t\t\tthis._tokenizer.expanded = true;\n\t\t}\n\t}\n\n\t_onfocusout() {\n\t\tif (this.matches(\":focus-within\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.focused = false;\n\t\tif (this._tokenizer) {\n\t\t\tthis._tokenizer.expanded = this._tokenizer.open;\n\t\t}\n\t}\n\n\tget _tokenizerExpanded(): boolean {\n\t\tif (!this._tokenizer) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn this._tokenizer.expanded;\n\t}\n\n\t_onTokenizerKeyUp(e: KeyboardEvent) {\n\t\tif (isSpace(e) || isDelete(e)) {\n\t\t\te.stopPropagation();\n\t\t}\n\t}\n\n\t_onTokenizerKeyDown(e: KeyboardEvent) {\n\t\tconst firstToken = this._tokenizer?.tokens.find(token => !token.hasAttribute(\"overflows\"));\n\t\tconst isArrowNavigation = this.effectiveDir === \"ltr\" ? isLeft(e) : isRight(e);\n\n\t\tif (isEnter(e)) {\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\tif (e.target === firstToken && isArrowNavigation) {\n\t\t\tthis._input.focus();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onTokenizerClick(e: MouseEvent) {\n\t\te.stopPropagation();\n\t}\n\n\t_onTokenizerMouseDown(e: MouseEvent) {\n\t\te.stopPropagation();\n\t}\n\n\t_onClearIconClick(e: CustomEvent) {\n\t\te.stopPropagation();\n\t\tthis._clearFileSelection();\n\t}\n\n\t_openFileBrowser() {\n\t\tthis._input.click();\n\t}\n\n\t_clearFileSelection() {\n\t\tthis._selectedFilesNames = [];\n\t\tthis.value = \"\";\n\t\tthis._input.files = new DataTransfer().files;\n\t\tthis.fireDecoratorEvent(\"change\", {\n\t\t\tfiles: this.files,\n\t\t});\n\t}\n\n\t/**\n\t * FileList of all selected files.\n\t * @public\n\t * @default null\n\t */\n\tget files(): FileList | null {\n\t\tif (this._input) {\n\t\t\treturn this._input.files;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tonAfterRendering() {\n\t\tif (!this.value) {\n\t\t\tthis._input.value = \"\";\n\t\t}\n\n\t\tthis._tokenizerOpen = this._tokenizer ? this._tokenizer.open : false;\n\n\t\tif (this.hideInput && this.content.length > 0) {\n\t\t\tthis.content.forEach(element => {\n\t\t\t\telement.setAttribute(\"tabindex\", \"-1\");\n\t\t\t});\n\t\t}\n\n\t\tthis.toggleValueStatePopover(this.shouldOpenValueStateMessagePopover);\n\t}\n\n\tget computedValue(): string {\n\t\treturn this._selectedFilesNames.join(\" \");\n\t}\n\n\tget _formWidth() : number {\n\t\treturn this._form ? this._form.offsetWidth : 0;\n\t}\n\n\t_onChange(e: Event) {\n\t\tlet changedFiles = (e.target as HTMLInputElement).files;\n\n\t\tif (changedFiles) {\n\t\t\tchangedFiles = this._validateFiles(changedFiles);\n\t\t}\n\n\t\tif (!this.value && !changedFiles?.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._selectedFilesNames = this._fileNamesList(changedFiles as FileList);\n\t\tthis.value = this.computedValue;\n\t\tthis.fireDecoratorEvent(\"change\", {\n\t\t\tfiles: changedFiles,\n\t\t});\n\t}\n\n\t_fileNamesList(files: FileList) : Array<string> {\n\t\treturn Array.from(files)\n\t\t\t.map(file => file.name)\n\t\t\t.sort((a, b) => a.length - b.length); // workaround for incident #11824\n\t}\n\n\t/**\n\t * Checks whether all files are below `maxFileSize` (if set),\n\t * and fires a `file-size-exceed` event if any file exceeds it.\n\t * @private\n\t */\n\t_validateFiles(changedFiles: FileList): FileList {\n\t\tconst exceededFilesData = this.maxFileSize ? this._getExceededFiles(changedFiles) : [];\n\n\t\tif (exceededFilesData.length) {\n\t\t\tthis.fireDecoratorEvent(\"file-size-exceed\", {\n\t\t\t\tfilesData: exceededFilesData,\n\t\t\t});\n\t\t\tchangedFiles = new DataTransfer().files;\n\t\t}\n\n\t\treturn changedFiles;\n\t}\n\n\t_getExceededFiles(files: FileList): Array<FileData> {\n\t\tconst filesArray = Array.from(files);\n\t\tconst exceededFiles: Array<FileData> = [];\n\n\t\tfor (let i = 0; i < filesArray.length; i++) {\n\t\t\tconst fileSize = convertBytesToMegabytes(filesArray[i].size);\n\t\t\tif (fileSize > this.maxFileSize!) {\n\t\t\t\texceededFiles.push({\n\t\t\t\t\tfileName: filesArray[i].name,\n\t\t\t\t\tfileSize,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn exceededFiles;\n\t}\n\n\ttoggleValueStatePopover(open: boolean) {\n\t\tif (open) {\n\t\t\tthis.openValueStatePopover();\n\t\t} else {\n\t\t\tthis.closeValueStatePopover();\n\t\t}\n\t}\n\n\topenValueStatePopover() {\n\t\tif (this._messagePopover) {\n\t\t\tthis._messagePopover.opener = this;\n\t\t\tthis._messagePopover.open = true;\n\t\t}\n\t}\n\n\tcloseValueStatePopover() {\n\t\tif (this._messagePopover) {\n\t\t\tthis._messagePopover.open = false;\n\t\t}\n\t}\n\n\tget accInfo(): InputAccInfo {\n\t\treturn {\n\t\t\t\"ariaRoledescription\": FileUploader.i18nBundle.getText(FILEUPLOADER_ROLE_DESCRIPTION),\n\t\t\t\"ariaRequired\": this.required || undefined,\n\t\t\t\"ariaInvalid\": this.valueState === ValueState.Negative || undefined,\n\t\t\t\"ariaHasPopup\": \"dialog\",\n\t\t\t\"ariaLabel\": getAllAccessibleNameRefTexts(this) || getEffectiveAriaLabelText(this) || getAssociatedLabelForTexts(this) || undefined,\n\t\t\t\"ariaDescription\": getAllAccessibleDescriptionRefTexts(this) || getEffectiveAriaDescriptionText(this) || undefined,\n\t\t};\n\t}\n\n\tget inputTitle(): string {\n\t\treturn FileUploader.i18nBundle.getText(FILEUPLOADER_INPUT_TOOLTIP);\n\t}\n\n\tget valueHelpTitle(): string {\n\t\treturn FileUploader.i18nBundle.getText(FILEUPLOADER_VALUE_HELP_TOOLTIP);\n\t}\n\n\tget clearIconTitle(): string {\n\t\treturn FileUploader.i18nBundle.getText(FILEUPLOADER_CLEAR_ICON_TOOLTIP);\n\t}\n\n\tget resolvedPlaceholder(): string {\n\t\tconst singlePlaceholder = FileUploader.i18nBundle.getText(FILEUPLOADER_DEFAULT_PLACEHOLDER);\n\t\tconst multiplePlaceholder = FileUploader.i18nBundle.getText(FILEUPLOADER_DEFAULT_MULTIPLE_PLACEHOLDER);\n\t\treturn this.placeholder ?? (this.multiple ? multiplePlaceholder : singlePlaceholder);\n\t}\n\n\tget valueStateTextMappings(): Record<string, string> {\n\t\treturn {\n\t\t\t\"Positive\": FileUploader.i18nBundle.getText(VALUE_STATE_SUCCESS),\n\t\t\t\"Information\": FileUploader.i18nBundle.getText(VALUE_STATE_INFORMATION),\n\t\t\t\"Negative\": FileUploader.i18nBundle.getText(VALUE_STATE_ERROR),\n\t\t\t\"Critical\": FileUploader.i18nBundle.getText(VALUE_STATE_WARNING),\n\t\t};\n\t}\n\n\tget valueStateText(): string {\n\t\treturn this.valueStateTextMappings[this.valueState];\n\t}\n\n\tget hasValueState(): boolean {\n\t\treturn this.valueState !== ValueState.None;\n\t}\n\n\tget shouldDisplayDefaultValueStateMessage(): boolean {\n\t\treturn !this.valueStateMessage.length && this.hasValueState;\n\t}\n\n\tget shouldOpenValueStateMessagePopover(): boolean {\n\t\treturn this.focused && this.hasValueState && !this.hideInput && !this._tokenizer?.open;\n\t}\n\n\t/**\n\t * This method is relevant for sap_horizon theme only\n\t */\n\tget _valueStateMessageInputIcon(): string {\n\t\tconst iconPerValueState = {\n\t\t\tNegative: \"error\",\n\t\t\tCritical: \"alert\",\n\t\t\tPositive: \"sys-enter-2\",\n\t\t\tInformation: \"information\",\n\t\t};\n\n\t\treturn this.valueState !== ValueState.None ? iconPerValueState[this.valueState] : \"\";\n\t}\n}\n\nFileUploader.define();\n\nexport default FileUploader;\nexport type {\n\tFileData,\n\tFileUploaderChangeEventDetail,\n\tFileUploaderFileSizeExceedEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"FileUploader.js","sourceRoot":"","sources":["../src/FileUploader.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EACN,yBAAyB,EACzB,0BAA0B,EAC1B,4BAA4B,EAC5B,+BAA+B,EAC/B,mCAAmC,GACnC,MAAM,+DAA+D,CAAC;AACvE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EACN,OAAO,EACP,SAAS,E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} from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport query from \"@ui5/webcomponents-base/dist/decorators/query.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport {\n\tgetEffectiveAriaLabelText,\n\tgetAssociatedLabelForTexts,\n\tgetAllAccessibleNameRefTexts,\n\tgetEffectiveAriaDescriptionText,\n\tgetAllAccessibleDescriptionRefTexts,\n} from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport {\n\tisUpAlt,\n\tisDownAlt,\n\tisEnter,\n\tisDelete,\n\tisF4,\n\tisSpace,\n\tisRight,\n\tisLeft,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport {\n\tFILEUPLOADER_INPUT_TOOLTIP,\n\tFILEUPLOADER_VALUE_HELP_TOOLTIP,\n\tFILEUPLOADER_CLEAR_ICON_TOOLTIP,\n\tVALUE_STATE_SUCCESS,\n\tVALUE_STATE_INFORMATION,\n\tVALUE_STATE_ERROR,\n\tVALUE_STATE_WARNING,\n\tVALUE_STATE_TYPE_SUCCESS,\n\tVALUE_STATE_TYPE_INFORMATION,\n\tVALUE_STATE_TYPE_ERROR,\n\tVALUE_STATE_TYPE_WARNING,\n\tFILEUPLOADER_DEFAULT_PLACEHOLDER,\n\tFILEUPLOADER_DEFAULT_MULTIPLE_PLACEHOLDER,\n\tFILEUPLOADER_ROLE_DESCRIPTION,\n\tFILEUPLOAER_VALUE_MISSING,\n} from \"./generated/i18n/i18n-defaults.js\";\n\nimport type { InputAccInfo } from \"./Input.js\";\nimport type Popover from \"./Popover.js\";\nimport type Tokenizer from \"./Tokenizer.js\";\n\n// Template\nimport FileUploaderTemplate from \"./FileUploaderTemplate.js\";\n\n// Styles\nimport FileUploaderCss from \"./generated/themes/FileUploader.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\nimport ValueStateMessageCss from \"./generated/themes/ValueStateMessage.css.js\";\n\nconst convertBytesToMegabytes = (bytes: number) => (bytes / 1024) / 1024;\n\ntype MappedValueState = Exclude<`${ValueState}`, \"None\">;\n\ntype FileData = {\n\tfileName: string,\n\tfileSize: number,\n}\n\ntype FileUploaderFileSizeExceedEventDetail = {\n\tfilesData: Array<FileData>,\n}\n\ntype FileUploaderChangeEventDetail = {\n\tfiles: FileList | null,\n}\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-file-uploader` opens a file explorer dialog and enables users to upload files.\n * The component consists of input field, but you can provide an HTML element by your choice\n * to trigger the file upload, by using the default slot.\n * Furthermore, you can set the property \"hideInput\" to \"true\" to hide the input field.\n *\n * To get all selected files, you can simply use the read-only \"files\" property.\n * To restrict the types of files the user can select, you can use the \"accept\" property.\n *\n * And, similar to all input based components, the FileUploader supports \"valueState\", \"placeholder\", \"name\", and \"disabled\" properties.\n *\n * For the `ui5-file-uploader`\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/FileUploader.js\";`\n * @constructor\n * @since 1.0.0-rc.6\n * @extends UI5Element\n * @public\n */\n@customElement({\n\ttag: \"ui5-file-uploader\",\n\tlanguageAware: true,\n\tformAssociated: true,\n\trenderer: jsxRenderer,\n\tstyles: [\n\t\tFileUploaderCss,\n\t\tResponsivePopoverCommonCss,\n\t\tValueStateMessageCss,\n\t],\n\ttemplate: FileUploaderTemplate,\n})\n/**\n * Event is fired when the value of the file path has been changed.\n *\n * **Note:** Keep in mind that because of the HTML input element of type file, the event is also fired in Chrome browser when the Cancel button of the uploads window is pressed.\n * @param {FileList | null} files The current files.\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\n/**\n * Event is fired when the size of a file is above the `maxFileSize` property value.\n * @param {Array<FileData>} filesData An array of `FileData` objects containing the`fileName` and `fileSize` in MB of each file that exceeds the upload limit.\n * @since 2.2.0\n * @public\n */\n@event(\"file-size-exceed\", {\n\tbubbles: true,\n})\nclass FileUploader extends UI5Element implements IFormInputElement {\n\teventDetails!: {\n\t\t\"change\": FileUploaderChangeEventDetail,\n\t\t\"file-size-exceed\": FileUploaderFileSizeExceedEventDetail,\n\t}\n\t/**\n\t * Comma-separated list of file types that the component should accept.\n\t *\n\t * **Note:** Please make sure you are adding the `.` in front on the file type, e.g. `.png` in case you want to accept png's only.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccept?: string;\n\n\t/**\n\t * If set to \"true\", the input field of component will not be rendered. Only the default slot that is passed will be rendered.\n\t *\n\t * **Note:** Use this property in combination with the default slot to achieve a button-only file uploader design.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideInput = false;\n\n\t/**\n\t * Defines whether the component is in disabled state.\n\t *\n\t * **Note:** A disabled component is completely noninteractive.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Allows multiple files to be chosen.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tmultiple = false;\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * Defines a short hint intended to aid the user with data entry when the component has no value.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tplaceholder?: string;\n\n\t/**\n\t * Defines the name/names of the file/files to upload.\n\t * @default \"\"\n\t * @formEvents change\n\t * @formProperty\n\t * @public\n\t */\n\t@property()\n\tvalue = \"\";\n\n\t/**\n\t * Defines the maximum file size in megabytes which prevents the upload if at least one file exceeds it.\n\t * @default undefined\n\t * @since 2.2.0\n\t * @public\n\t */\n\t@property({ type: Number })\n\tmaxFileSize?: number;\n\n\t/**\n\t * Defines the value state of the component.\n\t * @default \"None\"\n\t * @public\n\t */\n\t@property()\n\tvalueState: `${ValueState}` = \"None\";\n\n\t/**\n\t * Defines whether the component is required.\n\t * @default false\n\t * @public\n\t * @since 2.13.0\n\t */\n\t@property({ type: Boolean })\n\trequired = false;\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.13.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the input.\n\t * @default undefined\n\t * @public\n\t * @since 2.13.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the accessible description of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.14.0\n\t */\n\t@property()\n\taccessibleDescription?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that describe the input.\n\t * @default undefined\n\t * @public\n\t * @since 2.14.0\n\t */\n\t@property()\n\taccessibleDescriptionRef?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tfocused = false;\n\n\t/**\n\t * This slot allows you to add custom content to the component, such as a button or any other interactive element to trigger the file selection dialog.\n\t *\n\t * **Note:** For best accessibility experience, set a `tabindex` of \"-1\" on your interactive element, or it will be set automatically.\n\t * This slot is intended for use cases where you want a button-only file uploader.\n\t * It is recommended to set `hideInput` property to \"true\" when using this slot.\n\t * Not setting `hideInput` may negatively impact the screen reader users.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\tcontent!: DefaultSlot<HTMLElement>;\n\n\t/**\n\t * Defines the value state message that will be displayed as pop up under the component.\n\t *\n\t * **Note:** If not specified, a default text (in the respective language) will be displayed.\n\t *\n\t * **Note:** The `valueStateMessage` would be displayed,\n\t * when the component is in `Information`, `Critical` or `Negative` value state.\n\t * @since 1.0.0-rc.9\n\t * @public\n\t */\n\t@slot()\n\tvalueStateMessage!: Slot<HTMLElement>;\n\n\t@query(\".ui5-file-uploader-form\")\n\t_form!: HTMLFormElement;\n\n\t@query(\"input[type=file]\")\n\t_input!: HTMLInputElement;\n\n\t@query(\"[ui5-tokenizer]\")\n\t_tokenizer!: Tokenizer;\n\n\t@query(\".ui5-valuestatemessage-popover\")\n\t_messagePopover!: Popover;\n\n\t@property({ type: Array, noAttribute: true })\n\t_selectedFilesNames: Array<string> = [];\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_tokenizerOpen = false;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tget formValidityMessage() {\n\t\tconst validity = this.formValidity;\n\n\t\tif (validity.valueMissing) {\n\t\t\treturn FileUploader.i18nBundle.getText(FILEUPLOAER_VALUE_MISSING);\n\t\t}\n\n\t\treturn \"\";\n\t}\n\n\tget formValidity(): ValidityStateFlags {\n\t\treturn {\n\t\t\tvalueMissing: this.required && (!this.files || this.files.length === 0),\n\t\t};\n\t}\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\t/**\n\t * @override\n\t */\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\treturn this._input;\n\t}\n\n\tget formFormattedValue() {\n\t\tif (this.files && this.name) {\n\t\t\tconst formData = new FormData();\n\n\t\t\tfor (let i = 0; i < this.files.length; i++) {\n\t\t\t\tformData.append(this.name, this.files[i]);\n\t\t\t}\n\n\t\t\treturn formData;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t_onclick() {\n\t\tif (this.getFocusDomRef()?.matches(\":focus-within\")) {\n\t\t\tthis._openFileBrowser();\n\t\t}\n\t}\n\n\t_onNativeInputClick(e: MouseEvent) {\n\t\te.stopPropagation();\n\t}\n\n\t_onmousedown(e: MouseEvent) {\n\t\te.preventDefault();\n\t\tthis._input.focus();\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst firstToken = this._tokenizer?.tokens.find(token => !token.hasAttribute(\"overflows\"));\n\t\tconst isToken = (<HTMLElement>e.target).hasAttribute(\"ui5-token\");\n\t\tconst isArrowNavigation = this.effectiveDir === \"ltr\" ? isRight(e) : isLeft(e);\n\n\t\tif (this.hideInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._openFileBrowser();\n\t\t}\n\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t}\n\n\t\tif (isArrowNavigation && !isToken) {\n\t\t\te.preventDefault();\n\t\t\tfirstToken?.focus();\n\t\t}\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (this.hideInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isSpace(e) || isF4(e) || isUpAlt(e) || isDownAlt(e)) {\n\t\t\tthis._openFileBrowser();\n\t\t} else if (isDelete(e)) {\n\t\t\tthis._clearFileSelection();\n\t\t}\n\t}\n\n\t_ondrag(e: DragEvent) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t}\n\n\t_ondrop(e: DragEvent) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tconst files = e.dataTransfer?.files;\n\n\t\tif (!files) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst validatedFiles = this._validateFiles(files);\n\n\t\tif (!this.value && !validatedFiles.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._input.files = validatedFiles;\n\t\tthis._selectedFilesNames = this._fileNamesList(files);\n\t\tthis.value = this.computedValue;\n\t\tthis.fireDecoratorEvent(\"change\", {\n\t\t\tfiles: validatedFiles,\n\t\t});\n\t}\n\n\t_onfocusin() {\n\t\tthis.focused = true;\n\t\tif (this._tokenizer) {\n\t\t\tthis._tokenizer.expanded = true;\n\t\t}\n\t}\n\n\t_onfocusout() {\n\t\tif (this.matches(\":focus-within\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.focused = false;\n\t\tif (this._tokenizer) {\n\t\t\tthis._tokenizer.expanded = this._tokenizer.open;\n\t\t}\n\t}\n\n\tget _tokenizerExpanded(): boolean {\n\t\tif (!this._tokenizer) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn this._tokenizer.expanded;\n\t}\n\n\t_onTokenizerKeyUp(e: KeyboardEvent) {\n\t\tif (isSpace(e) || isDelete(e)) {\n\t\t\te.stopPropagation();\n\t\t}\n\t}\n\n\t_onTokenizerKeyDown(e: KeyboardEvent) {\n\t\tconst firstToken = this._tokenizer?.tokens.find(token => !token.hasAttribute(\"overflows\"));\n\t\tconst isArrowNavigation = this.effectiveDir === \"ltr\" ? isLeft(e) : isRight(e);\n\n\t\tif (isEnter(e)) {\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\tif (e.target === firstToken && isArrowNavigation) {\n\t\t\tthis._input.focus();\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onTokenizerClick(e: MouseEvent) {\n\t\te.stopPropagation();\n\t}\n\n\t_onTokenizerMouseDown(e: MouseEvent) {\n\t\te.stopPropagation();\n\t}\n\n\t_onClearIconClick(e: CustomEvent) {\n\t\te.stopPropagation();\n\t\tthis._clearFileSelection();\n\t}\n\n\t_openFileBrowser() {\n\t\tthis._input.click();\n\t}\n\n\t_clearFileSelection() {\n\t\tthis._selectedFilesNames = [];\n\t\tthis.value = \"\";\n\t\tthis._input.files = new DataTransfer().files;\n\t\tthis.fireDecoratorEvent(\"change\", {\n\t\t\tfiles: this.files,\n\t\t});\n\t}\n\n\t/**\n\t * FileList of all selected files.\n\t * @public\n\t * @default null\n\t */\n\tget files(): FileList | null {\n\t\tif (this._input) {\n\t\t\treturn this._input.files;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tonAfterRendering() {\n\t\tif (!this.value) {\n\t\t\tthis._input.value = \"\";\n\t\t}\n\n\t\tthis._tokenizerOpen = this._tokenizer ? this._tokenizer.open : false;\n\n\t\tif (this.hideInput && this.content.length > 0) {\n\t\t\tthis.content.forEach(element => {\n\t\t\t\telement.setAttribute(\"tabindex\", \"-1\");\n\t\t\t});\n\t\t}\n\n\t\tthis.toggleValueStatePopover(this.shouldOpenValueStateMessagePopover);\n\t}\n\n\tget computedValue(): string {\n\t\treturn this._selectedFilesNames.join(\" \");\n\t}\n\n\tget _formWidth() : number {\n\t\treturn this._form ? this._form.offsetWidth : 0;\n\t}\n\n\t_onChange(e: Event) {\n\t\tlet changedFiles = (e.target as HTMLInputElement).files;\n\n\t\tif (changedFiles) {\n\t\t\tchangedFiles = this._validateFiles(changedFiles);\n\t\t}\n\n\t\tif (!this.value && !changedFiles?.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._selectedFilesNames = this._fileNamesList(changedFiles as FileList);\n\t\tthis.value = this.computedValue;\n\t\tthis.fireDecoratorEvent(\"change\", {\n\t\t\tfiles: changedFiles,\n\t\t});\n\t}\n\n\t_fileNamesList(files: FileList) : Array<string> {\n\t\treturn Array.from(files)\n\t\t\t.map(file => file.name)\n\t\t\t.sort((a, b) => a.length - b.length); // workaround for incident #11824\n\t}\n\n\t/**\n\t * Checks whether all files are below `maxFileSize` (if set),\n\t * and fires a `file-size-exceed` event if any file exceeds it.\n\t * @private\n\t */\n\t_validateFiles(changedFiles: FileList): FileList {\n\t\tconst exceededFilesData = this.maxFileSize ? this._getExceededFiles(changedFiles) : [];\n\n\t\tif (exceededFilesData.length) {\n\t\t\tthis.fireDecoratorEvent(\"file-size-exceed\", {\n\t\t\t\tfilesData: exceededFilesData,\n\t\t\t});\n\t\t\tchangedFiles = new DataTransfer().files;\n\t\t}\n\n\t\treturn changedFiles;\n\t}\n\n\t_getExceededFiles(files: FileList): Array<FileData> {\n\t\tconst filesArray = Array.from(files);\n\t\tconst exceededFiles: Array<FileData> = [];\n\n\t\tfor (let i = 0; i < filesArray.length; i++) {\n\t\t\tconst fileSize = convertBytesToMegabytes(filesArray[i].size);\n\t\t\tif (fileSize > this.maxFileSize!) {\n\t\t\t\texceededFiles.push({\n\t\t\t\t\tfileName: filesArray[i].name,\n\t\t\t\t\tfileSize,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn exceededFiles;\n\t}\n\n\ttoggleValueStatePopover(open: boolean) {\n\t\tif (open) {\n\t\t\tthis.openValueStatePopover();\n\t\t} else {\n\t\t\tthis.closeValueStatePopover();\n\t\t}\n\t}\n\n\topenValueStatePopover() {\n\t\tif (this._messagePopover) {\n\t\t\tthis._messagePopover.opener = this;\n\t\t\tthis._messagePopover.open = true;\n\t\t}\n\t}\n\n\tcloseValueStatePopover() {\n\t\tif (this._messagePopover) {\n\t\t\tthis._messagePopover.open = false;\n\t\t}\n\t}\n\n\tget accInfo(): InputAccInfo {\n\t\treturn {\n\t\t\t\"ariaRoledescription\": FileUploader.i18nBundle.getText(FILEUPLOADER_ROLE_DESCRIPTION),\n\t\t\t\"ariaRequired\": this.required || undefined,\n\t\t\t\"ariaInvalid\": this.valueState === ValueState.Negative || undefined,\n\t\t\t\"ariaHasPopup\": \"dialog\",\n\t\t\t\"ariaLabel\": getAllAccessibleNameRefTexts(this) || getEffectiveAriaLabelText(this) || getAssociatedLabelForTexts(this) || undefined,\n\t\t\t\"ariaDescription\": getAllAccessibleDescriptionRefTexts(this) || getEffectiveAriaDescriptionText(this) || undefined,\n\t\t\t\"ariaDescribedBy\": this.hasValueState ? \"valueStateDesc\" : undefined,\n\t\t};\n\t}\n\n\tget valueStateTypeMappings(): Record<MappedValueState, string> {\n\t\treturn {\n\t\t\t\"Positive\": FileUploader.i18nBundle.getText(VALUE_STATE_TYPE_SUCCESS),\n\t\t\t\"Information\": FileUploader.i18nBundle.getText(VALUE_STATE_TYPE_INFORMATION),\n\t\t\t\"Negative\": FileUploader.i18nBundle.getText(VALUE_STATE_TYPE_ERROR),\n\t\t\t\"Critical\": FileUploader.i18nBundle.getText(VALUE_STATE_TYPE_WARNING),\n\t\t};\n\t}\n\n\tget ariaValueStateHiddenText(): string | undefined {\n\t\tif (!this.hasValueState) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst valueStateType = this.valueStateTypeMappings[this.valueState as MappedValueState];\n\n\t\tif (this.shouldDisplayDefaultValueStateMessage) {\n\t\t\treturn this.valueStateText ? `${valueStateType} ${this.valueStateText}` : valueStateType;\n\t\t}\n\n\t\treturn this.valueStateMessage.length\n\t\t\t? `${valueStateType} ${this.valueStateMessage.map(el => el.textContent).join(\" \")}`\n\t\t\t: valueStateType;\n\t}\n\n\tget inputTitle(): string {\n\t\treturn FileUploader.i18nBundle.getText(FILEUPLOADER_INPUT_TOOLTIP);\n\t}\n\n\tget valueHelpTitle(): string {\n\t\treturn FileUploader.i18nBundle.getText(FILEUPLOADER_VALUE_HELP_TOOLTIP);\n\t}\n\n\tget clearIconTitle(): string {\n\t\treturn FileUploader.i18nBundle.getText(FILEUPLOADER_CLEAR_ICON_TOOLTIP);\n\t}\n\n\tget resolvedPlaceholder(): string {\n\t\tconst singlePlaceholder = FileUploader.i18nBundle.getText(FILEUPLOADER_DEFAULT_PLACEHOLDER);\n\t\tconst multiplePlaceholder = FileUploader.i18nBundle.getText(FILEUPLOADER_DEFAULT_MULTIPLE_PLACEHOLDER);\n\t\treturn this.placeholder ?? (this.multiple ? multiplePlaceholder : singlePlaceholder);\n\t}\n\n\tget valueStateTextMappings(): Record<MappedValueState, string> {\n\t\treturn {\n\t\t\t\"Positive\": FileUploader.i18nBundle.getText(VALUE_STATE_SUCCESS),\n\t\t\t\"Information\": FileUploader.i18nBundle.getText(VALUE_STATE_INFORMATION),\n\t\t\t\"Negative\": FileUploader.i18nBundle.getText(VALUE_STATE_ERROR),\n\t\t\t\"Critical\": FileUploader.i18nBundle.getText(VALUE_STATE_WARNING),\n\t\t};\n\t}\n\n\tget valueStateText(): string | undefined {\n\t\treturn this.valueStateTextMappings[this.valueState as MappedValueState];\n\t}\n\n\tget hasValueState(): boolean {\n\t\treturn this.valueState !== ValueState.None;\n\t}\n\n\tget shouldDisplayDefaultValueStateMessage(): boolean {\n\t\treturn !this.valueStateMessage.length && this.hasValueState;\n\t}\n\n\tget shouldOpenValueStateMessagePopover(): boolean {\n\t\treturn this.focused && this.hasValueState && !this.hideInput && !this._tokenizer?.open;\n\t}\n\n\t/**\n\t * This method is relevant for sap_horizon theme only\n\t */\n\tget _valueStateMessageInputIcon(): string {\n\t\tconst iconPerValueState = {\n\t\t\tNegative: \"error\",\n\t\t\tCritical: \"alert\",\n\t\t\tPositive: \"sys-enter-2\",\n\t\t\tInformation: \"information\",\n\t\t};\n\n\t\treturn this.valueState !== ValueState.None ? iconPerValueState[this.valueState] : \"\";\n\t}\n}\n\nFileUploader.define();\n\nexport default FileUploader;\nexport type {\n\tFileData,\n\tFileUploaderChangeEventDetail,\n\tFileUploaderFileSizeExceedEventDetail,\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@ui5/webcomponents-base/jsx-runtime";
|
|
2
2
|
import Icon from "./Icon.js";
|
|
3
3
|
import browseIcon from "@ui5/webcomponents-icons/dist/browse-folder.js";
|
|
4
4
|
import decline from "@ui5/webcomponents-icons/dist/decline.js";
|
|
@@ -6,6 +6,7 @@ import Tokenizer from "./Tokenizer.js";
|
|
|
6
6
|
import Token from "./Token.js";
|
|
7
7
|
import FileUploaderPopoverTemplate from "./FileUploaderPopoverTemplate.js";
|
|
8
8
|
export default function FileUploaderTemplate() {
|
|
9
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { class: "ui5-file-uploader-root", onFocusIn: this._onfocusin, onFocusOut: this._onfocusout, onKeyDown: this._onkeydown, onKeyUp: this._onkeyup, onClick: this._onclick, onMouseDown: this._onmousedown, onDragOver: this._ondrag, onDrop: this._ondrop, children: [
|
|
9
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { class: "ui5-file-uploader-root", onFocusIn: this._onfocusin, onFocusOut: this._onfocusout, onKeyDown: this._onkeydown, onKeyUp: this._onkeyup, onClick: this._onclick, onMouseDown: this._onmousedown, onDragOver: this._ondrag, onDrop: this._ondrop, children: [_jsxs("div", { class: "ui5-file-uploader-form", children: [_jsx("input", { type: "file", class: "ui5-file-uploader-native-input", name: this.name, multiple: this.multiple, accept: this.accept, disabled: this.disabled, title: this.inputTitle, "aria-roledescription": this.accInfo.ariaRoledescription, "aria-haspopup": this.accInfo.ariaHasPopup, "aria-label": this.accInfo.ariaLabel, "aria-description": this.accInfo.ariaDescription, "aria-required": this.accInfo.ariaRequired, "aria-invalid": this.accInfo.ariaInvalid, "aria-describedby": this.accInfo.ariaDescribedBy, onClick: this._onNativeInputClick, onChange: this._onChange, "data-sap-focus-ref": true }), this.hasValueState &&
|
|
10
|
+
_jsx("span", { id: "valueStateDesc", class: "ui5-hidden-text", children: this.ariaValueStateHiddenText })] }), this.hideInput ? (_jsx("slot", {})) : (_jsxs("div", { class: "ui5-file-uploader-display-container", children: [_jsxs("div", { class: "ui5-file-uploader-display-elements", children: [this._selectedFilesNames.length > 0 ? (_jsxs(_Fragment, { children: [_jsx(Tokenizer, { class: "ui5-file-uploader-tokenizer", expanded: this._tokenizerExpanded, open: this._tokenizerOpen, popoverMinWidth: this._formWidth, onClick: this._onTokenizerClick, onMouseDown: this._onTokenizerMouseDown, onKeyDown: this._onTokenizerKeyDown, onKeyUp: this._onTokenizerKeyUp, preventInitialFocus: true, readonly: true, children: this._selectedFilesNames.map(fileName => (_jsx(Token, { text: fileName }))) }), _jsx(Icon, { name: decline, class: "ui5-file-uploader-clear-icon inputIcon", onClick: this._onClearIconClick, title: this.clearIconTitle })] })) : (_jsx("input", { class: "ui5-file-uploader-display-input", tabindex: -1, "aria-hidden": "true", title: this.inputTitle, placeholder: this.resolvedPlaceholder, "inner-input": true, readonly: true })), _jsx(Icon, { name: browseIcon, class: "ui5-file-uploader-value-help-icon inputIcon", title: this.valueHelpTitle })] }), _jsx("slot", {})] }))] }), FileUploaderPopoverTemplate.call(this)] }));
|
|
10
11
|
}
|
|
11
12
|
//# sourceMappingURL=FileUploaderTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploaderTemplate.js","sourceRoot":"","sources":["../src/FileUploaderTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,UAAU,MAAM,gDAAgD,CAAC;AACxE,OAAO,OAAO,MAAM,0CAA0C,CAAC;AAC/D,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,OAAO,2BAA2B,MAAM,kCAAkC,CAAC;AAE3E,MAAM,CAAC,OAAO,UAAU,oBAAoB;IAC3C,OAAO,CACN,8BACC,eACC,KAAK,EAAC,wBAAwB,EAC9B,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,UAAU,EAAE,IAAI,CAAC,WAAW,EAC5B,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,UAAU,EAAE,IAAI,CAAC,OAAO,EACxB,MAAM,EAAE,IAAI,CAAC,OAAO,aAEpB,
|
|
1
|
+
{"version":3,"file":"FileUploaderTemplate.js","sourceRoot":"","sources":["../src/FileUploaderTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,UAAU,MAAM,gDAAgD,CAAC;AACxE,OAAO,OAAO,MAAM,0CAA0C,CAAC;AAC/D,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,OAAO,2BAA2B,MAAM,kCAAkC,CAAC;AAE3E,MAAM,CAAC,OAAO,UAAU,oBA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C,oCAAoC,aAC7C,IAAI,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACtC,8BACC,KAAC,SAAS,IACT,KAAK,EAAC,6BAA6B,EACnC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,EACjC,IAAI,EAAE,IAAI,CAAC,cAAc,EACzB,eAAe,EAAE,IAAI,CAAC,UAAU,EAChC,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAC/B,WAAW,EAAE,IAAI,CAAC,qBAAqB,EACvC,SAAS,EAAE,IAAI,CAAC,mBAAmB,EACnC,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAC/B,mBAAmB,QACnB,QAAQ,kBAEP,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CACzC,KAAC,KAAK,IACL,IAAI,EAAE,QAAQ,GACb,CACF,CAAC,GACS,EACZ,KAAC,IAAI,IACJ,IAAI,EAAE,OAAO,EACb,KAAK,EAAC,wCAAwC,EAC9C,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAC/B,KAAK,EAAE,IAAI,CAAC,cAAc,GACzB,IACA,CACH,CAAC,CAAC,CAAC,CACH,gBACC,KAAK,EAAC,iCAAiC,EACvC,QAAQ,EAAE,CAAC,CAAC,iBACA,MAAM,EAClB,KAAK,EAAE,IAAI,CAAC,UAAU,EACtB,WAAW,EAAE,IAAI,CAAC,mBAAmB,uBAErC,QAAQ,SACP,CACF,EAED,KAAC,IAAI,IACJ,IAAI,EAAE,UAAU,EAChB,KAAK,EAAC,6CAA6C,EACnD,KAAK,EAAE,IAAI,CAAC,cAAc,GACzB,IACG,EAEN,gBAAa,IACR,CACN,IACI,EAEJ,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,IACtC,CACH,CAAC;AACH,CAAC","sourcesContent":["import Icon from \"./Icon.js\";\nimport browseIcon from \"@ui5/webcomponents-icons/dist/browse-folder.js\";\nimport decline from \"@ui5/webcomponents-icons/dist/decline.js\";\nimport Tokenizer from \"./Tokenizer.js\";\nimport Token from \"./Token.js\";\nimport type FileUploader from \"./FileUploader.js\";\nimport FileUploaderPopoverTemplate from \"./FileUploaderPopoverTemplate.js\";\n\nexport default function FileUploaderTemplate(this: FileUploader) {\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclass=\"ui5-file-uploader-root\"\n\t\t\t\tonFocusIn={this._onfocusin}\n\t\t\t\tonFocusOut={this._onfocusout}\n\t\t\t\tonKeyDown={this._onkeydown}\n\t\t\t\tonKeyUp={this._onkeyup}\n\t\t\t\tonClick={this._onclick}\n\t\t\t\tonMouseDown={this._onmousedown}\n\t\t\t\tonDragOver={this._ondrag}\n\t\t\t\tonDrop={this._ondrop}\n\t\t\t>\n\t\t\t\t<div class=\"ui5-file-uploader-form\">\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tclass=\"ui5-file-uploader-native-input\"\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tmultiple={this.multiple}\n\t\t\t\t\t\taccept={this.accept}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\ttitle={this.inputTitle}\n\t\t\t\t\t\taria-roledescription={this.accInfo.ariaRoledescription}\n\t\t\t\t\t\taria-haspopup={this.accInfo.ariaHasPopup}\n\t\t\t\t\t\taria-label={this.accInfo.ariaLabel}\n\t\t\t\t\t\taria-description={this.accInfo.ariaDescription}\n\t\t\t\t\t\taria-required={this.accInfo.ariaRequired}\n\t\t\t\t\t\taria-invalid={this.accInfo.ariaInvalid}\n\t\t\t\t\t\taria-describedby={this.accInfo.ariaDescribedBy}\n\t\t\t\t\t\tonClick={this._onNativeInputClick}\n\t\t\t\t\t\tonChange={this._onChange}\n\t\t\t\t\t\tdata-sap-focus-ref\n\t\t\t\t\t/>\n\t\t\t\t\t{this.hasValueState &&\n\t\t\t\t\t\t<span id=\"valueStateDesc\" class=\"ui5-hidden-text\">{this.ariaValueStateHiddenText}</span>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\n\t\t\t\t{this.hideInput ? (\n\t\t\t\t\t<slot></slot>\n\t\t\t\t) : (\n\t\t\t\t\t<div class=\"ui5-file-uploader-display-container\">\n\t\t\t\t\t\t<div class=\"ui5-file-uploader-display-elements\">\n\t\t\t\t\t\t\t{this._selectedFilesNames.length > 0 ? (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<Tokenizer\n\t\t\t\t\t\t\t\t\t\tclass=\"ui5-file-uploader-tokenizer\"\n\t\t\t\t\t\t\t\t\t\texpanded={this._tokenizerExpanded}\n\t\t\t\t\t\t\t\t\t\topen={this._tokenizerOpen}\n\t\t\t\t\t\t\t\t\t\tpopoverMinWidth={this._formWidth}\n\t\t\t\t\t\t\t\t\t\tonClick={this._onTokenizerClick}\n\t\t\t\t\t\t\t\t\t\tonMouseDown={this._onTokenizerMouseDown}\n\t\t\t\t\t\t\t\t\t\tonKeyDown={this._onTokenizerKeyDown}\n\t\t\t\t\t\t\t\t\t\tonKeyUp={this._onTokenizerKeyUp}\n\t\t\t\t\t\t\t\t\t\tpreventInitialFocus\n\t\t\t\t\t\t\t\t\t\treadonly\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{this._selectedFilesNames.map(fileName => (\n\t\t\t\t\t\t\t\t\t\t\t<Token\n\t\t\t\t\t\t\t\t\t\t\t\ttext={fileName}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</Tokenizer>\n\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\tname={decline}\n\t\t\t\t\t\t\t\t\t\tclass=\"ui5-file-uploader-clear-icon inputIcon\"\n\t\t\t\t\t\t\t\t\t\tonClick={this._onClearIconClick}\n\t\t\t\t\t\t\t\t\t\ttitle={this.clearIconTitle}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\tclass=\"ui5-file-uploader-display-input\"\n\t\t\t\t\t\t\t\t\ttabindex={-1}\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\ttitle={this.inputTitle}\n\t\t\t\t\t\t\t\t\tplaceholder={this.resolvedPlaceholder}\n\t\t\t\t\t\t\t\t\tinner-input\n\t\t\t\t\t\t\t\t\treadonly\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname={browseIcon}\n\t\t\t\t\t\t\t\tclass=\"ui5-file-uploader-value-help-icon inputIcon\"\n\t\t\t\t\t\t\t\ttitle={this.valueHelpTitle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\n\t\t\t{ FileUploaderPopoverTemplate.call(this) }\n\t\t</>\n\t);\n}\n"]}
|
package/dist/Popup.d.ts
CHANGED
|
@@ -199,6 +199,7 @@ declare abstract class Popup extends UI5Element {
|
|
|
199
199
|
* @returns Promise that resolves when the focus is applied
|
|
200
200
|
*/
|
|
201
201
|
applyFocus(): Promise<void>;
|
|
202
|
+
_getFirstFocusableElement(): Promise<HTMLElement | null>;
|
|
202
203
|
isFocusWithin(): boolean;
|
|
203
204
|
_updateMediaRange(): void;
|
|
204
205
|
_updateAssociatedLabelsTexts(): void;
|
|
@@ -258,6 +259,7 @@ declare abstract class Popup extends UI5Element {
|
|
|
258
259
|
get _contentAriaLabel(): string | undefined;
|
|
259
260
|
get _ariaModal(): "true" | undefined;
|
|
260
261
|
get contentDOM(): HTMLElement;
|
|
262
|
+
get footerDOM(): HTMLElement | null;
|
|
261
263
|
get styles(): {
|
|
262
264
|
root: {};
|
|
263
265
|
content: {};
|
package/dist/Popup.js
CHANGED
|
@@ -333,7 +333,7 @@ let Popup = Popup_1 = class Popup extends UI5Element {
|
|
|
333
333
|
element = this.getRootNode().getElementById(this.initialFocus)
|
|
334
334
|
|| document.getElementById(this.initialFocus);
|
|
335
335
|
}
|
|
336
|
-
element = element || await
|
|
336
|
+
element = element || await this._getFirstFocusableElement() || this._root; // in case of no focusable content focus the root
|
|
337
337
|
if (element) {
|
|
338
338
|
if (element === this._root) {
|
|
339
339
|
element.tabIndex = -1;
|
|
@@ -341,6 +341,9 @@ let Popup = Popup_1 = class Popup extends UI5Element {
|
|
|
341
341
|
element.focus();
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
+
async _getFirstFocusableElement() {
|
|
345
|
+
return getFirstFocusableElement(this);
|
|
346
|
+
}
|
|
344
347
|
isFocusWithin() {
|
|
345
348
|
return isFocusedElementWithinNode(this._root);
|
|
346
349
|
}
|
|
@@ -467,6 +470,9 @@ let Popup = Popup_1 = class Popup extends UI5Element {
|
|
|
467
470
|
get contentDOM() {
|
|
468
471
|
return this.shadowRoot.querySelector(".ui5-popup-content");
|
|
469
472
|
}
|
|
473
|
+
get footerDOM() {
|
|
474
|
+
return this.shadowRoot.querySelector(".ui5-popup-footer-root");
|
|
475
|
+
}
|
|
470
476
|
get styles() {
|
|
471
477
|
return {
|
|
472
478
|
root: {},
|
package/dist/Popup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popup.js","sourceRoot":"","sources":["../src/Popup.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAE3E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,UAAU,MAAM,4CAA4C,CA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AE,CAAC;sCACZ;AAMhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACV;AA4ElB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iCAa3B;AArNa,KAAK;IAzCnB,aAAa,CAAC;QACd,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,CAAC,WAAW,EAAE,qBAAqB,CAAC;QAC5C,QAAQ,EAAE,aAAa;KACvB,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,aAAa,EAAE;QACrB,UAAU,EAAE,IAAI;KAChB,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,MAAM,CAAC;IAEd;;;;OAIG;;IACF,KAAK,CAAC,cAAc,EAAE;QACtB,UAAU,EAAE,IAAI;KAChB,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,OAAO,CAAC;IAEf;;;OAGG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;GACa,KAAK,CA0mBnB;AAED,eAAe,KAAK,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport type { ClassMap, AriaRole } from \"@ui5/webcomponents-base/dist/types.js\";\nimport jsxRender from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport {\n\tisChrome,\n\tisDesktop,\n\tisPhone,\n} from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { getFirstFocusableElement, getLastFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport {\n\tregisterUI5Element,\n\tgetEffectiveAriaLabelText,\n\tgetEffectiveAriaDescriptionText,\n\tgetAllAccessibleDescriptionRefTexts,\n\tderegisterUI5Element,\n} from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport { createOrUpdateStyle } from \"@ui5/webcomponents-base/dist/ManagedStyles.js\";\nimport { isEnter, isTabPrevious } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getFocusedElement, isFocusedElementWithinNode } from \"@ui5/webcomponents-base/dist/util/PopupUtils.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport MediaRange from \"@ui5/webcomponents-base/dist/MediaRange.js\";\nimport toLowercaseEnumValue from \"@ui5/webcomponents-base/dist/util/toLowercaseEnumValue.js\";\nimport PopupTemplate from \"./PopupTemplate.js\";\nimport PopupAccessibleRole from \"./types/PopupAccessibleRole.js\";\nimport { addOpenedPopup, removeOpenedPopup } from \"./popup-utils/OpenedPopupsRegistry.js\";\n\n// Styles\nimport popupStlyes from \"./generated/themes/Popup.css.js\";\nimport popupBlockLayerStyles from \"./generated/themes/PopupBlockLayer.css.js\";\nimport globalStyles from \"./generated/themes/PopupGlobal.css.js\";\n\nconst createBlockingStyle = (): void => {\n\tcreateOrUpdateStyle(globalStyles, \"data-ui5-popup-scroll-blocker\");\n};\n\ncreateBlockingStyle();\n\nconst pageScrollingBlockers = new Set<Popup>();\n\ntype PopupScrollEventDetail = {\n\tscrollTop: number;\n\ttargetRef: HTMLElement;\n}\n\ntype PopupBeforeCloseEventDetail = {\n\tescPressed: boolean;\n}\n\n/**\n * @class\n * ### Overview\n * Base class for all popup Web Components.\n *\n * If you need to create your own popup-like custom UI5 Web Components.\n *\n * 1. The Popup class handles modality:\n * - The \"isModal\" getter can be overridden by derivatives to provide their own conditions when they are modal or not\n * - Derivatives may call the \"blockPageScrolling\" and \"unblockPageScrolling\" static methods to temporarily remove scrollbars on the html element\n * - Derivatives may call the \"openPopup\" and \"closePopup\" methods which handle focus, manage the popup registry and for modal popups, manage the blocking layer\n *\n * 2. Provides blocking layer (relevant for modal popups only):\n * - Controlled by the \"open\" and \"close\" methods\n *\n * 3. The Popup class \"traps\" focus:\n * - Derivatives may call the \"applyInitialFocus\" method (usually when opening, to transfer focus inside the popup)\n *\n * 4. The template of this component exposes two inline partials you can override in derivatives:\n * - beforeContent (upper part of the box, useful for header/title/close button)\n * - afterContent (lower part, useful for footer/action buttons)\n * @constructor\n * @extends UI5Element\n * @public\n */\n@customElement({\n\trenderer: jsxRender,\n\tstyles: [popupStlyes, popupBlockLayerStyles],\n\ttemplate: PopupTemplate,\n})\n/**\n * Fired before the component is opened. This event can be cancelled, which will prevent the popup from opening.\n * @public\n */\n@event(\"before-open\", {\n\tcancelable: true,\n})\n\n/**\n * Fired after the component is opened.\n * @public\n */\n@event(\"open\")\n\n/**\n * Fired before the component is closed. This event can be cancelled, which will prevent the popup from closing.\n * @public\n * @param {boolean} escPressed Indicates that `ESC` key has triggered the event.\n */\n@event(\"before-close\", {\n\tcancelable: true,\n})\n\n/**\n * Fired after the component is closed.\n * @public\n */\n@event(\"close\")\n\n/**\n * Fired whenever the popup content area is scrolled\n * @private\n */\n@event(\"scroll\", {\n\tbubbles: true,\n})\nabstract class Popup extends UI5Element {\n\teventDetails!: {\n\t\t\"before-open\": void\n\t\t\"open\": void\n\t\t\"before-close\": PopupBeforeCloseEventDetail\n\t\t\"close\": void\n\t\t\"scroll\": PopupScrollEventDetail\n\t}\n\n\t/**\n\t * Defines the ID of the HTML Element, which will get the initial focus.\n\t *\n\t * **Note:** If an element with `autofocus` attribute is added inside the component,\n\t * `initialFocus` won't take effect.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tinitialFocus?: string;\n\n\t/**\n\t * Defines if the focus should be returned to the previously focused element,\n\t * when the popup closes.\n\t * @default false\n\t * @public\n\t * @since 1.0.0-rc.8\n\t*/\n\t@property({ type: Boolean })\n\tpreventFocusRestore = false;\n\n\t/**\n\t * Defines the accessible name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the IDs of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Allows setting a custom role.\n\t * @default \"Dialog\"\n\t * @public\n\t * @since 1.10.0\n\t */\n\t@property()\n\taccessibleRole: `${PopupAccessibleRole}` = \"Dialog\";\n\n\t/**\n\t * Defines the accessible description of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.11.0\n\t */\n\t@property()\n\taccessibleDescription?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that describe the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.11.0\n\t */\n\t@property()\n\taccessibleDescriptionRef?: string;\n\n\t/**\n\t * Constantly updated value of texts collected from the associated labels.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\t_associatedDescriptionRefTexts?: string;\n\n\t/**\n\t * Defines the current media query size.\n\t * @private\n\t */\n\t@property()\n\tmediaRange?: string;\n\n\t/**\n\t * Indicates whether initial focus should be prevented.\n\t * @public\n\t * @default false\n\t * @since 2.0.0\n\t */\n\t@property({ type: Boolean })\n\tpreventInitialFocus = false;\n\n\t/**\n\t * Indicates if the element is the top modal popup\n\t *\n\t * This property is calculated automatically\n\t * @private\n\t * @default false\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\tisTopModalPopup = false;\n\n\t/**\n\t * Defines the content of the Popup.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\tcontent!: DefaultSlot<HTMLElement>;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonPhone = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonDesktop = false;\n\n\t_resizeHandler: ResizeObserverCallback;\n\t_shouldFocusRoot?: boolean;\n\t_focusedElementBeforeOpen?: HTMLElement | null;\n\t_opened = false;\n\t_open = false;\n\t_resizeHandlerRegistered = false;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._resizeHandler = this._resize.bind(this);\n\n\t\tthis._getRealDomRef = () => {\n\t\t\treturn this.shadowRoot!.querySelector<HTMLElement>(\"[root-element]\")!;\n\t\t};\n\t}\n\n\tonBeforeRendering() {\n\t\tthis.onPhone = isPhone();\n\t\tthis.onDesktop = isDesktop();\n\t}\n\n\tonAfterRendering() {\n\t\trenderFinished().then(() => {\n\t\t\tthis._updateMediaRange();\n\t\t});\n\n\t\tif (this.open) {\n\t\t\tthis._registerResizeHandler();\n\t\t} else {\n\t\t\tthis._deregisterResizeHandler();\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tthis.setAttribute(\"popover\", \"manual\");\n\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\n\t\tthis.tabIndex = -1;\n\n\t\tthis.handleOpenOnEnterDOM();\n\n\t\tthis.setAttribute(\"data-sap-ui-fastnavgroup-container\", \"true\");\n\t\tregisterUI5Element(this, this._updateAssociatedLabelsTexts.bind(this));\n\t}\n\n\thandleOpenOnEnterDOM() {\n\t\tif (this.open) {\n\t\t\tthis.showPopover();\n\t\t\tthis.openPopup();\n\t\t}\n\t}\n\n\tonExitDOM() {\n\t\tif (this._opened) {\n\t\t\tPopup.unblockPageScrolling(this);\n\t\t\tthis._removeOpenedPopup();\n\t\t}\n\n\t\tthis._deregisterResizeHandler();\n\t\tthis._detachBrowserEvents();\n\t\tderegisterUI5Element(this);\n\t}\n\n\t/**\n\t * Indicates if the element is open\n\t * @public\n\t * @default false\n\t * @since 1.2.0\n\t */\n\t@property({ type: Boolean })\n\tset open(value: boolean) {\n\t\tif (this._open === value) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._open = value;\n\n\t\tif (value) {\n\t\t\tthis.openPopup();\n\t\t} else {\n\t\t\tthis.closePopup();\n\t\t}\n\t}\n\n\tget open() : boolean {\n\t\treturn this._open;\n\t}\n\n\tasync openPopup() {\n\t\tif (this._opened) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst prevented = !this.fireDecoratorEvent(\"before-open\");\n\n\t\tif (prevented) {\n\t\t\tthis.open = false;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._attachBrowserEvents();\n\n\t\tif (this.isModal) {\n\t\t\tPopup.blockPageScrolling(this);\n\t\t}\n\n\t\tthis._focusedElementBeforeOpen = getFocusedElement();\n\n\t\tthis._show();\n\t\tthis._opened = true;\n\n\t\tif (this.getDomRef()) {\n\t\t\tthis._updateMediaRange();\n\t\t}\n\n\t\tthis._addOpenedPopup();\n\n\t\tthis.classList.add(\"ui5-popup-opening\");\n\t\tsetTimeout(() => {\n\t\t\tthis.classList.remove(\"ui5-popup-opening\");\n\t\t}, 50);\n\n\t\tthis.open = true;\n\n\t\t// initial focus, if focused element is statically created\n\t\tawait this.applyInitialFocus();\n\n\t\tawait renderFinished();\n\n\t\tif (this.isConnected) {\n\t\t\tthis.fireDecoratorEvent(\"open\");\n\t\t}\n\t}\n\n\t_resize() {\n\t\tthis._updateMediaRange();\n\t}\n\n\t/**\n\t * Prevents the user from interacting with the content under the block layer\n\t */\n\t_preventBlockLayerFocus(e: KeyboardEvent | MouseEvent) {\n\t\te.preventDefault();\n\t}\n\n\t_attachBrowserEvents() {\n\n\t}\n\n\t_detachBrowserEvents() {\n\n\t}\n\n\t/**\n\t * Temporarily removes scrollbars from the html element\n\t * @protected\n\t */\n\tstatic blockPageScrolling(popup: Popup) {\n\t\tpageScrollingBlockers.add(popup);\n\n\t\tif (pageScrollingBlockers.size !== 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocument.documentElement.classList.add(\"ui5-popup-scroll-blocker\");\n\t}\n\n\t/**\n\t * Restores scrollbars on the html element, if needed\n\t * @protected\n\t */\n\tstatic unblockPageScrolling(popup: Popup) {\n\t\tpageScrollingBlockers.delete(popup);\n\n\t\tif (pageScrollingBlockers.size !== 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocument.documentElement.classList.remove(\"ui5-popup-scroll-blocker\");\n\t}\n\n\t_scroll(e: Event) {\n\t\tthis.fireDecoratorEvent(\"scroll\", {\n\t\t\tscrollTop: (e.target as HTMLElement).scrollTop,\n\t\t\ttargetRef: e.target as HTMLElement,\n\t\t});\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst isTabOutAttempt = e.target === this._root && isTabPrevious(e);\n\t\t// if the popup is closed, focus is already moved, so Enter keydown may result in click on the newly focused element\n\t\tconst isEnterOnClosedPopupChild = isEnter(e) && !this.open;\n\n\t\tif (isTabOutAttempt || isEnterOnClosedPopupChild) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onfocusout(e: FocusEvent) {\n\t\t// relatedTarget is the element, which will get focus. If no such element exists, focus the root.\n\t\t// This happens after the mouse is released in order to not interrupt text selection.\n\t\tif (!e.relatedTarget) {\n\t\t\tthis._shouldFocusRoot = true;\n\t\t}\n\t}\n\n\t_onmousedown(e: MouseEvent) {\n\t\tif (this.shadowRoot!.contains(e.target as HTMLElement)) {\n\t\t\tthis._shouldFocusRoot = true;\n\t\t} else {\n\t\t\tthis._shouldFocusRoot = false;\n\t\t}\n\t}\n\n\t_onmouseup() {\n\t\tif (this._shouldFocusRoot) {\n\t\t\tif (isChrome()) {\n\t\t\t\tthis._root.focus();\n\t\t\t}\n\t\t\tthis._shouldFocusRoot = false;\n\t\t}\n\t}\n\n\t/**\n\t * Focus trapping\n\t * @private\n\t */\n\tasync forwardToFirst() {\n\t\tconst firstFocusable = await getFirstFocusableElement(this);\n\n\t\tif (firstFocusable) {\n\t\t\tfirstFocusable.focus();\n\t\t} else {\n\t\t\tthis._root.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Focus trapping\n\t * @private\n\t */\n\tasync forwardToLast() {\n\t\tconst lastFocusable = await getLastFocusableElement(this);\n\n\t\tif (lastFocusable) {\n\t\t\tlastFocusable.focus();\n\t\t} else {\n\t\t\tthis._root.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Use this method to focus the element denoted by \"initialFocus\", if provided,\n\t * or the first focusable element otherwise.\n\t * @protected\n\t */\n\tasync applyInitialFocus() {\n\t\tif (!this.preventInitialFocus) {\n\t\t\tawait this.applyFocus();\n\t\t}\n\t}\n\n\t/**\n\t * Focuses the element denoted by `initialFocus`, if provided,\n\t * or the first focusable element otherwise.\n\t * @public\n\t * @returns Promise that resolves when the focus is applied\n\t */\n\tasync applyFocus(): Promise<void> {\n\t\tawait this._waitForDomRef();\n\n\t\tconst elementWithAutoFocus = this.querySelector(\"[autofocus]\");\n\t\tif (elementWithAutoFocus) {\n\t\t\t// If the \"autofocus\" is set on UI5Element, focus it manually.\n\t\t\tif (\"isUI5Element\" in elementWithAutoFocus) {\n\t\t\t\t(elementWithAutoFocus as UI5Element).focus();\n\t\t\t}\n\t\t\t// Otherwise, the browser will focus it automatically.\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getRootNode() === this) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet element;\n\n\t\tif (this.initialFocus) {\n\t\t\telement = (this.getRootNode() as Document).getElementById(this.initialFocus)\n\t\t\t|| document.getElementById(this.initialFocus);\n\t\t}\n\n\t\telement = element || await getFirstFocusableElement(this) || this._root; // in case of no focusable content focus the root\n\n\t\tif (element) {\n\t\t\tif (element === this._root) {\n\t\t\t\telement.tabIndex = -1;\n\t\t\t}\n\t\t\telement.focus();\n\t\t}\n\t}\n\n\tisFocusWithin() {\n\t\treturn isFocusedElementWithinNode(this._root);\n\t}\n\n\t_updateMediaRange() {\n\t\tthis.mediaRange = MediaRange.getCurrentRange(MediaRange.RANGESETS.RANGE_4STEPS, this.getDomRef()!.offsetWidth);\n\t}\n\n\t_updateAssociatedLabelsTexts() {\n\t\tthis._associatedDescriptionRefTexts = getAllAccessibleDescriptionRefTexts(this);\n\t}\n\n\t/**\n\t * Adds the popup to the \"opened popups registry\"\n\t * @protected\n\t */\n\t_addOpenedPopup() {\n\t\taddOpenedPopup(this);\n\t}\n\n\t/**\n\t * Closes the popup.\n\t */\n\tclosePopup(escPressed = false, preventRegistryUpdate = false, preventFocusRestore = false): void {\n\t\tif (!this._opened) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst prevented = !this.fireDecoratorEvent(\"before-close\", { escPressed });\n\t\tif (prevented) {\n\t\t\tthis.open = true;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._opened = false;\n\n\t\tif (this.isModal) {\n\t\t\tPopup.unblockPageScrolling(this);\n\t\t}\n\n\t\tthis.hide();\n\t\tthis.open = false;\n\n\t\tthis._detachBrowserEvents();\n\n\t\tif (!preventRegistryUpdate) {\n\t\t\tthis._removeOpenedPopup();\n\t\t}\n\n\t\tif (!this.preventFocusRestore && !preventFocusRestore) {\n\t\t\tthis.resetFocus();\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\t/**\n\t * Removes the popup from the \"opened popups registry\"\n\t * @protected\n\t */\n\t_removeOpenedPopup() {\n\t\tremoveOpenedPopup(this);\n\t}\n\n\t/**\n\t * Returns the focus to the previously focused element\n\t * @protected\n\t */\n\tresetFocus() {\n\t\tthis._focusedElementBeforeOpen?.focus();\n\t\tthis._focusedElementBeforeOpen = null;\n\t}\n\n\t/**\n\t * Sets \"block\" display to the popup. The property can be overriden by derivatives of Popup.\n\t * @protected\n\t */\n\t_show() {\n\t\tif (this.isConnected) {\n\t\t\tthis.setAttribute(\"popover\", \"manual\");\n\t\t\tthis.showPopover();\n\t\t}\n\t}\n\n\t_registerResizeHandler() {\n\t\tif (!this._resizeHandlerRegistered) {\n\t\t\tResizeHandler.register(this, this._resizeHandler);\n\t\t\tthis._resizeHandlerRegistered = true;\n\t\t}\n\t}\n\n\t_deregisterResizeHandler() {\n\t\tif (this._resizeHandlerRegistered) {\n\t\t\tResizeHandler.deregister(this, this._resizeHandler);\n\t\t\tthis._resizeHandlerRegistered = false;\n\t\t}\n\t}\n\n\t/**\n\t * Sets \"none\" display to the popup\n\t * @protected\n\t */\n\thide() {\n\t\tthis.isConnected && this.hidePopover();\n\t}\n\n\t/**\n\t * Implement this getter with relevant logic regarding the modality of the popup (e.g. based on a public property)\n\t * @protected\n\t */\n\tabstract get isModal(): boolean\n\n\t/**\n\t * Return the ID of an element in the shadow DOM that is going to label this popup\n\t * @protected\n\t */\n\tabstract get _ariaLabelledBy(): string | undefined\n\n\t/**\n\t * Ensures ariaLabel is never null or empty string\n\t * @protected\n\t */\n\tget _ariaLabel() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget _accInfoAriaDescription() {\n\t\treturn this.ariaDescriptionText || \"\";\n\t}\n\n\tget ariaDescriptionText() {\n\t\treturn this._associatedDescriptionRefTexts || getEffectiveAriaDescriptionText(this);\n\t}\n\n\tget ariaDescriptionTextId() {\n\t\treturn this.ariaDescriptionText ? \"accessibleDescription\" : \"\";\n\t}\n\n\tget ariaDescribedByIds() {\n\t\treturn [\n\t\t\tthis.ariaDescriptionTextId,\n\t\t].filter(Boolean).join(\" \");\n\t}\n\n\tget _root(): HTMLElement {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-popup-root\")!;\n\t}\n\n\tget _role() {\n\t\treturn (this.accessibleRole === PopupAccessibleRole.None) ? undefined : toLowercaseEnumValue(this.accessibleRole);\n\t}\n\n\tget _contentRole(): AriaRole | undefined {\n\t\treturn undefined;\n\t}\n\n\tget _contentAriaLabel(): string | undefined {\n\t\treturn undefined;\n\t}\n\n\tget _ariaModal(): \"true\" | undefined {\n\t\treturn this.accessibleRole === PopupAccessibleRole.None ? undefined : \"true\";\n\t}\n\n\tget contentDOM(): HTMLElement {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-popup-content\")!;\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\troot: {},\n\t\t\tcontent: {},\n\t\t};\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-popup-root\": true,\n\t\t\t},\n\t\t\tcontent: {\n\t\t\t\t\"ui5-popup-content\": true,\n\t\t\t},\n\t\t};\n\t}\n}\n\nexport default Popup;\nexport type { PopupScrollEventDetail, PopupBeforeCloseEventDetail };\n"]}
|
|
1
|
+
{"version":3,"file":"Popup.js","sourceRoot":"","sources":["../src/Popup.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAE3E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,EACN,QAAQ,EACR,SAAS,EACT,OAAO,GACP,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAC3H,OAAO,EACN,kBAAkB,EAClB,yBAAyB,EACzB,+BAA+B,EAC/B,mCAAmC,EACnC,oBAAoB,GACpB,MAAM,+DAA+D,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAChH,OAAO,aAAa,MAAM,wDAAwD,CAAC;AAEnF,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,oBAAoB,MAAM,2DAA2D,CAAC;AAC7F,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,mBAAmB,MAAM,gCAAgC,CAAC;AACjE,OAA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;QACtB,UAAU,EAAE,IAAI;KAChB,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,OAAO,CAAC;IAEf;;;OAGG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;GACa,KAAK,CAknBnB;AAED,eAAe,KAAK,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport type { ClassMap, AriaRole } from \"@ui5/webcomponents-base/dist/types.js\";\nimport jsxRender from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport {\n\tisChrome,\n\tisDesktop,\n\tisPhone,\n} from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { getFirstFocusableElement, getLastFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport {\n\tregisterUI5Element,\n\tgetEffectiveAriaLabelText,\n\tgetEffectiveAriaDescriptionText,\n\tgetAllAccessibleDescriptionRefTexts,\n\tderegisterUI5Element,\n} from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport { createOrUpdateStyle } from \"@ui5/webcomponents-base/dist/ManagedStyles.js\";\nimport { isEnter, isTabPrevious } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getFocusedElement, isFocusedElementWithinNode } from \"@ui5/webcomponents-base/dist/util/PopupUtils.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport MediaRange from \"@ui5/webcomponents-base/dist/MediaRange.js\";\nimport toLowercaseEnumValue from \"@ui5/webcomponents-base/dist/util/toLowercaseEnumValue.js\";\nimport PopupTemplate from \"./PopupTemplate.js\";\nimport PopupAccessibleRole from \"./types/PopupAccessibleRole.js\";\nimport { addOpenedPopup, removeOpenedPopup } from \"./popup-utils/OpenedPopupsRegistry.js\";\n\n// Styles\nimport popupStlyes from \"./generated/themes/Popup.css.js\";\nimport popupBlockLayerStyles from \"./generated/themes/PopupBlockLayer.css.js\";\nimport globalStyles from \"./generated/themes/PopupGlobal.css.js\";\n\nconst createBlockingStyle = (): void => {\n\tcreateOrUpdateStyle(globalStyles, \"data-ui5-popup-scroll-blocker\");\n};\n\ncreateBlockingStyle();\n\nconst pageScrollingBlockers = new Set<Popup>();\n\ntype PopupScrollEventDetail = {\n\tscrollTop: number;\n\ttargetRef: HTMLElement;\n}\n\ntype PopupBeforeCloseEventDetail = {\n\tescPressed: boolean;\n}\n\n/**\n * @class\n * ### Overview\n * Base class for all popup Web Components.\n *\n * If you need to create your own popup-like custom UI5 Web Components.\n *\n * 1. The Popup class handles modality:\n * - The \"isModal\" getter can be overridden by derivatives to provide their own conditions when they are modal or not\n * - Derivatives may call the \"blockPageScrolling\" and \"unblockPageScrolling\" static methods to temporarily remove scrollbars on the html element\n * - Derivatives may call the \"openPopup\" and \"closePopup\" methods which handle focus, manage the popup registry and for modal popups, manage the blocking layer\n *\n * 2. Provides blocking layer (relevant for modal popups only):\n * - Controlled by the \"open\" and \"close\" methods\n *\n * 3. The Popup class \"traps\" focus:\n * - Derivatives may call the \"applyInitialFocus\" method (usually when opening, to transfer focus inside the popup)\n *\n * 4. The template of this component exposes two inline partials you can override in derivatives:\n * - beforeContent (upper part of the box, useful for header/title/close button)\n * - afterContent (lower part, useful for footer/action buttons)\n * @constructor\n * @extends UI5Element\n * @public\n */\n@customElement({\n\trenderer: jsxRender,\n\tstyles: [popupStlyes, popupBlockLayerStyles],\n\ttemplate: PopupTemplate,\n})\n/**\n * Fired before the component is opened. This event can be cancelled, which will prevent the popup from opening.\n * @public\n */\n@event(\"before-open\", {\n\tcancelable: true,\n})\n\n/**\n * Fired after the component is opened.\n * @public\n */\n@event(\"open\")\n\n/**\n * Fired before the component is closed. This event can be cancelled, which will prevent the popup from closing.\n * @public\n * @param {boolean} escPressed Indicates that `ESC` key has triggered the event.\n */\n@event(\"before-close\", {\n\tcancelable: true,\n})\n\n/**\n * Fired after the component is closed.\n * @public\n */\n@event(\"close\")\n\n/**\n * Fired whenever the popup content area is scrolled\n * @private\n */\n@event(\"scroll\", {\n\tbubbles: true,\n})\nabstract class Popup extends UI5Element {\n\teventDetails!: {\n\t\t\"before-open\": void\n\t\t\"open\": void\n\t\t\"before-close\": PopupBeforeCloseEventDetail\n\t\t\"close\": void\n\t\t\"scroll\": PopupScrollEventDetail\n\t}\n\n\t/**\n\t * Defines the ID of the HTML Element, which will get the initial focus.\n\t *\n\t * **Note:** If an element with `autofocus` attribute is added inside the component,\n\t * `initialFocus` won't take effect.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tinitialFocus?: string;\n\n\t/**\n\t * Defines if the focus should be returned to the previously focused element,\n\t * when the popup closes.\n\t * @default false\n\t * @public\n\t * @since 1.0.0-rc.8\n\t*/\n\t@property({ type: Boolean })\n\tpreventFocusRestore = false;\n\n\t/**\n\t * Defines the accessible name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the IDs of the elements that label the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.1.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Allows setting a custom role.\n\t * @default \"Dialog\"\n\t * @public\n\t * @since 1.10.0\n\t */\n\t@property()\n\taccessibleRole: `${PopupAccessibleRole}` = \"Dialog\";\n\n\t/**\n\t * Defines the accessible description of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.11.0\n\t */\n\t@property()\n\taccessibleDescription?: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that describe the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.11.0\n\t */\n\t@property()\n\taccessibleDescriptionRef?: string;\n\n\t/**\n\t * Constantly updated value of texts collected from the associated labels.\n\t * @private\n\t */\n\t@property({ noAttribute: true })\n\t_associatedDescriptionRefTexts?: string;\n\n\t/**\n\t * Defines the current media query size.\n\t * @private\n\t */\n\t@property()\n\tmediaRange?: string;\n\n\t/**\n\t * Indicates whether initial focus should be prevented.\n\t * @public\n\t * @default false\n\t * @since 2.0.0\n\t */\n\t@property({ type: Boolean })\n\tpreventInitialFocus = false;\n\n\t/**\n\t * Indicates if the element is the top modal popup\n\t *\n\t * This property is calculated automatically\n\t * @private\n\t * @default false\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\tisTopModalPopup = false;\n\n\t/**\n\t * Defines the content of the Popup.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, \"default\": true })\n\tcontent!: DefaultSlot<HTMLElement>;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonPhone = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tonDesktop = false;\n\n\t_resizeHandler: ResizeObserverCallback;\n\t_shouldFocusRoot?: boolean;\n\t_focusedElementBeforeOpen?: HTMLElement | null;\n\t_opened = false;\n\t_open = false;\n\t_resizeHandlerRegistered = false;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._resizeHandler = this._resize.bind(this);\n\n\t\tthis._getRealDomRef = () => {\n\t\t\treturn this.shadowRoot!.querySelector<HTMLElement>(\"[root-element]\")!;\n\t\t};\n\t}\n\n\tonBeforeRendering() {\n\t\tthis.onPhone = isPhone();\n\t\tthis.onDesktop = isDesktop();\n\t}\n\n\tonAfterRendering() {\n\t\trenderFinished().then(() => {\n\t\t\tthis._updateMediaRange();\n\t\t});\n\n\t\tif (this.open) {\n\t\t\tthis._registerResizeHandler();\n\t\t} else {\n\t\t\tthis._deregisterResizeHandler();\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tthis.setAttribute(\"popover\", \"manual\");\n\n\t\tif (isDesktop()) {\n\t\t\tthis.setAttribute(\"desktop\", \"\");\n\t\t}\n\n\t\tthis.tabIndex = -1;\n\n\t\tthis.handleOpenOnEnterDOM();\n\n\t\tthis.setAttribute(\"data-sap-ui-fastnavgroup-container\", \"true\");\n\t\tregisterUI5Element(this, this._updateAssociatedLabelsTexts.bind(this));\n\t}\n\n\thandleOpenOnEnterDOM() {\n\t\tif (this.open) {\n\t\t\tthis.showPopover();\n\t\t\tthis.openPopup();\n\t\t}\n\t}\n\n\tonExitDOM() {\n\t\tif (this._opened) {\n\t\t\tPopup.unblockPageScrolling(this);\n\t\t\tthis._removeOpenedPopup();\n\t\t}\n\n\t\tthis._deregisterResizeHandler();\n\t\tthis._detachBrowserEvents();\n\t\tderegisterUI5Element(this);\n\t}\n\n\t/**\n\t * Indicates if the element is open\n\t * @public\n\t * @default false\n\t * @since 1.2.0\n\t */\n\t@property({ type: Boolean })\n\tset open(value: boolean) {\n\t\tif (this._open === value) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._open = value;\n\n\t\tif (value) {\n\t\t\tthis.openPopup();\n\t\t} else {\n\t\t\tthis.closePopup();\n\t\t}\n\t}\n\n\tget open() : boolean {\n\t\treturn this._open;\n\t}\n\n\tasync openPopup() {\n\t\tif (this._opened) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst prevented = !this.fireDecoratorEvent(\"before-open\");\n\n\t\tif (prevented) {\n\t\t\tthis.open = false;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._attachBrowserEvents();\n\n\t\tif (this.isModal) {\n\t\t\tPopup.blockPageScrolling(this);\n\t\t}\n\n\t\tthis._focusedElementBeforeOpen = getFocusedElement();\n\n\t\tthis._show();\n\t\tthis._opened = true;\n\n\t\tif (this.getDomRef()) {\n\t\t\tthis._updateMediaRange();\n\t\t}\n\n\t\tthis._addOpenedPopup();\n\n\t\tthis.classList.add(\"ui5-popup-opening\");\n\t\tsetTimeout(() => {\n\t\t\tthis.classList.remove(\"ui5-popup-opening\");\n\t\t}, 50);\n\n\t\tthis.open = true;\n\n\t\t// initial focus, if focused element is statically created\n\t\tawait this.applyInitialFocus();\n\n\t\tawait renderFinished();\n\n\t\tif (this.isConnected) {\n\t\t\tthis.fireDecoratorEvent(\"open\");\n\t\t}\n\t}\n\n\t_resize() {\n\t\tthis._updateMediaRange();\n\t}\n\n\t/**\n\t * Prevents the user from interacting with the content under the block layer\n\t */\n\t_preventBlockLayerFocus(e: KeyboardEvent | MouseEvent) {\n\t\te.preventDefault();\n\t}\n\n\t_attachBrowserEvents() {\n\n\t}\n\n\t_detachBrowserEvents() {\n\n\t}\n\n\t/**\n\t * Temporarily removes scrollbars from the html element\n\t * @protected\n\t */\n\tstatic blockPageScrolling(popup: Popup) {\n\t\tpageScrollingBlockers.add(popup);\n\n\t\tif (pageScrollingBlockers.size !== 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocument.documentElement.classList.add(\"ui5-popup-scroll-blocker\");\n\t}\n\n\t/**\n\t * Restores scrollbars on the html element, if needed\n\t * @protected\n\t */\n\tstatic unblockPageScrolling(popup: Popup) {\n\t\tpageScrollingBlockers.delete(popup);\n\n\t\tif (pageScrollingBlockers.size !== 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocument.documentElement.classList.remove(\"ui5-popup-scroll-blocker\");\n\t}\n\n\t_scroll(e: Event) {\n\t\tthis.fireDecoratorEvent(\"scroll\", {\n\t\t\tscrollTop: (e.target as HTMLElement).scrollTop,\n\t\t\ttargetRef: e.target as HTMLElement,\n\t\t});\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tconst isTabOutAttempt = e.target === this._root && isTabPrevious(e);\n\t\t// if the popup is closed, focus is already moved, so Enter keydown may result in click on the newly focused element\n\t\tconst isEnterOnClosedPopupChild = isEnter(e) && !this.open;\n\n\t\tif (isTabOutAttempt || isEnterOnClosedPopupChild) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onfocusout(e: FocusEvent) {\n\t\t// relatedTarget is the element, which will get focus. If no such element exists, focus the root.\n\t\t// This happens after the mouse is released in order to not interrupt text selection.\n\t\tif (!e.relatedTarget) {\n\t\t\tthis._shouldFocusRoot = true;\n\t\t}\n\t}\n\n\t_onmousedown(e: MouseEvent) {\n\t\tif (this.shadowRoot!.contains(e.target as HTMLElement)) {\n\t\t\tthis._shouldFocusRoot = true;\n\t\t} else {\n\t\t\tthis._shouldFocusRoot = false;\n\t\t}\n\t}\n\n\t_onmouseup() {\n\t\tif (this._shouldFocusRoot) {\n\t\t\tif (isChrome()) {\n\t\t\t\tthis._root.focus();\n\t\t\t}\n\t\t\tthis._shouldFocusRoot = false;\n\t\t}\n\t}\n\n\t/**\n\t * Focus trapping\n\t * @private\n\t */\n\tasync forwardToFirst() {\n\t\tconst firstFocusable = await getFirstFocusableElement(this);\n\n\t\tif (firstFocusable) {\n\t\t\tfirstFocusable.focus();\n\t\t} else {\n\t\t\tthis._root.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Focus trapping\n\t * @private\n\t */\n\tasync forwardToLast() {\n\t\tconst lastFocusable = await getLastFocusableElement(this);\n\n\t\tif (lastFocusable) {\n\t\t\tlastFocusable.focus();\n\t\t} else {\n\t\t\tthis._root.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Use this method to focus the element denoted by \"initialFocus\", if provided,\n\t * or the first focusable element otherwise.\n\t * @protected\n\t */\n\tasync applyInitialFocus() {\n\t\tif (!this.preventInitialFocus) {\n\t\t\tawait this.applyFocus();\n\t\t}\n\t}\n\n\t/**\n\t * Focuses the element denoted by `initialFocus`, if provided,\n\t * or the first focusable element otherwise.\n\t * @public\n\t * @returns Promise that resolves when the focus is applied\n\t */\n\tasync applyFocus(): Promise<void> {\n\t\tawait this._waitForDomRef();\n\n\t\tconst elementWithAutoFocus = this.querySelector(\"[autofocus]\");\n\t\tif (elementWithAutoFocus) {\n\t\t\t// If the \"autofocus\" is set on UI5Element, focus it manually.\n\t\t\tif (\"isUI5Element\" in elementWithAutoFocus) {\n\t\t\t\t(elementWithAutoFocus as UI5Element).focus();\n\t\t\t}\n\t\t\t// Otherwise, the browser will focus it automatically.\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getRootNode() === this) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet element;\n\n\t\tif (this.initialFocus) {\n\t\t\telement = (this.getRootNode() as Document).getElementById(this.initialFocus)\n\t\t\t|| document.getElementById(this.initialFocus);\n\t\t}\n\n\t\telement = element || await this._getFirstFocusableElement() || this._root; // in case of no focusable content focus the root\n\n\t\tif (element) {\n\t\t\tif (element === this._root) {\n\t\t\t\telement.tabIndex = -1;\n\t\t\t}\n\t\t\telement.focus();\n\t\t}\n\t}\n\n\tasync _getFirstFocusableElement() {\n\t\treturn getFirstFocusableElement(this);\n\t}\n\n\tisFocusWithin() {\n\t\treturn isFocusedElementWithinNode(this._root);\n\t}\n\n\t_updateMediaRange() {\n\t\tthis.mediaRange = MediaRange.getCurrentRange(MediaRange.RANGESETS.RANGE_4STEPS, this.getDomRef()!.offsetWidth);\n\t}\n\n\t_updateAssociatedLabelsTexts() {\n\t\tthis._associatedDescriptionRefTexts = getAllAccessibleDescriptionRefTexts(this);\n\t}\n\n\t/**\n\t * Adds the popup to the \"opened popups registry\"\n\t * @protected\n\t */\n\t_addOpenedPopup() {\n\t\taddOpenedPopup(this);\n\t}\n\n\t/**\n\t * Closes the popup.\n\t */\n\tclosePopup(escPressed = false, preventRegistryUpdate = false, preventFocusRestore = false): void {\n\t\tif (!this._opened) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst prevented = !this.fireDecoratorEvent(\"before-close\", { escPressed });\n\t\tif (prevented) {\n\t\t\tthis.open = true;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._opened = false;\n\n\t\tif (this.isModal) {\n\t\t\tPopup.unblockPageScrolling(this);\n\t\t}\n\n\t\tthis.hide();\n\t\tthis.open = false;\n\n\t\tthis._detachBrowserEvents();\n\n\t\tif (!preventRegistryUpdate) {\n\t\t\tthis._removeOpenedPopup();\n\t\t}\n\n\t\tif (!this.preventFocusRestore && !preventFocusRestore) {\n\t\t\tthis.resetFocus();\n\t\t}\n\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\t/**\n\t * Removes the popup from the \"opened popups registry\"\n\t * @protected\n\t */\n\t_removeOpenedPopup() {\n\t\tremoveOpenedPopup(this);\n\t}\n\n\t/**\n\t * Returns the focus to the previously focused element\n\t * @protected\n\t */\n\tresetFocus() {\n\t\tthis._focusedElementBeforeOpen?.focus();\n\t\tthis._focusedElementBeforeOpen = null;\n\t}\n\n\t/**\n\t * Sets \"block\" display to the popup. The property can be overriden by derivatives of Popup.\n\t * @protected\n\t */\n\t_show() {\n\t\tif (this.isConnected) {\n\t\t\tthis.setAttribute(\"popover\", \"manual\");\n\t\t\tthis.showPopover();\n\t\t}\n\t}\n\n\t_registerResizeHandler() {\n\t\tif (!this._resizeHandlerRegistered) {\n\t\t\tResizeHandler.register(this, this._resizeHandler);\n\t\t\tthis._resizeHandlerRegistered = true;\n\t\t}\n\t}\n\n\t_deregisterResizeHandler() {\n\t\tif (this._resizeHandlerRegistered) {\n\t\t\tResizeHandler.deregister(this, this._resizeHandler);\n\t\t\tthis._resizeHandlerRegistered = false;\n\t\t}\n\t}\n\n\t/**\n\t * Sets \"none\" display to the popup\n\t * @protected\n\t */\n\thide() {\n\t\tthis.isConnected && this.hidePopover();\n\t}\n\n\t/**\n\t * Implement this getter with relevant logic regarding the modality of the popup (e.g. based on a public property)\n\t * @protected\n\t */\n\tabstract get isModal(): boolean\n\n\t/**\n\t * Return the ID of an element in the shadow DOM that is going to label this popup\n\t * @protected\n\t */\n\tabstract get _ariaLabelledBy(): string | undefined\n\n\t/**\n\t * Ensures ariaLabel is never null or empty string\n\t * @protected\n\t */\n\tget _ariaLabel() {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget _accInfoAriaDescription() {\n\t\treturn this.ariaDescriptionText || \"\";\n\t}\n\n\tget ariaDescriptionText() {\n\t\treturn this._associatedDescriptionRefTexts || getEffectiveAriaDescriptionText(this);\n\t}\n\n\tget ariaDescriptionTextId() {\n\t\treturn this.ariaDescriptionText ? \"accessibleDescription\" : \"\";\n\t}\n\n\tget ariaDescribedByIds() {\n\t\treturn [\n\t\t\tthis.ariaDescriptionTextId,\n\t\t].filter(Boolean).join(\" \");\n\t}\n\n\tget _root(): HTMLElement {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-popup-root\")!;\n\t}\n\n\tget _role() {\n\t\treturn (this.accessibleRole === PopupAccessibleRole.None) ? undefined : toLowercaseEnumValue(this.accessibleRole);\n\t}\n\n\tget _contentRole(): AriaRole | undefined {\n\t\treturn undefined;\n\t}\n\n\tget _contentAriaLabel(): string | undefined {\n\t\treturn undefined;\n\t}\n\n\tget _ariaModal(): \"true\" | undefined {\n\t\treturn this.accessibleRole === PopupAccessibleRole.None ? undefined : \"true\";\n\t}\n\n\tget contentDOM(): HTMLElement {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-popup-content\")!;\n\t}\n\n\tget footerDOM(): HTMLElement | null {\n\t\treturn this.shadowRoot!.querySelector(\".ui5-popup-footer-root\");\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\troot: {},\n\t\t\tcontent: {},\n\t\t};\n\t}\n\n\tget classes(): ClassMap {\n\t\treturn {\n\t\t\troot: {\n\t\t\t\t\"ui5-popup-root\": true,\n\t\t\t},\n\t\t\tcontent: {\n\t\t\t\t\"ui5-popup-content\": true,\n\t\t\t},\n\t\t};\n\t}\n}\n\nexport default Popup;\nexport type { PopupScrollEventDetail, PopupBeforeCloseEventDetail };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ui5-hidden-text{position:absolute;clip:rect(1px,1px,1px,1px);user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0}:host{min-width:min(20rem,90vw);min-height:min(6rem,90vh);max-height:94%;max-width:90%;flex-direction:column;box-shadow:var(--sapContent_Shadow3);border-radius:var(--sapElement_BorderCornerRadius)}:host([stretch]){width:90%;height:94%}:host([stretch][on-phone]){width:100%;height:100%;max-height:100%;max-width:100%;border-radius:0;min-width:0}:host([draggable]) .ui5-popup-header-root,:host([draggable]) ::slotted([slot="header"]){cursor:move}:host([draggable]) .ui5-popup-header-root
|
|
1
|
+
.ui5-hidden-text{position:absolute;clip:rect(1px,1px,1px,1px);user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0}:host{min-width:min(20rem,90vw);min-height:min(6rem,90vh);max-height:94%;max-width:90%;flex-direction:column;box-shadow:var(--sapContent_Shadow3);border-radius:var(--sapElement_BorderCornerRadius)}:host([stretch]){width:90%;height:94%}:host([stretch][on-phone]){width:100%;height:100%;max-height:100%;max-width:100%;border-radius:0;min-width:0}:host([draggable]) .ui5-popup-header-root,:host([draggable]) ::slotted([slot="header"]){cursor:move}:host([draggable]) .ui5-popup-header-root *:not(.ui5-dialog-fullscreen-btn){cursor:auto}:host([draggable]) .ui5-popup-root{user-select:text}::slotted([slot="header"]){max-width:100%}.ui5-popup-root{display:flex;flex-direction:column;max-width:100vw}.ui5-popup-header-root{position:relative}.ui5-popup-header-root:before{content:"";position:absolute;inset-block-start:auto;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;height:var(--_ui5_dialog_header_state_line_height);background:var(--sapObjectHeader_BorderColor)}:host([state="Negative"]) .ui5-popup-header-root:before{background:var(--sapErrorBorderColor)}:host([state="Information"]) .ui5-popup-header-root:before{background:var(--sapInformationBorderColor)}:host([state="Positive"]) .ui5-popup-header-root:before{background:var(--sapSuccessBorderColor)}:host([state="Critical"]) .ui5-popup-header-root:before{background:var(--sapWarningBorderColor)}.ui5-dialog-value-state-icon{margin-inline-end:.5rem;flex-shrink:0}:host([state="Negative"]) .ui5-dialog-value-state-icon{color:var(--sapNegativeElementColor)}:host([state="Information"]) .ui5-dialog-value-state-icon{color:var(--sapInformativeElementColor)}:host([state="Positive"]) .ui5-dialog-value-state-icon{color:var(--sapPositiveElementColor)}:host([state="Critical"]) .ui5-dialog-value-state-icon{color:var(--sapCriticalElementColor)}.ui5-popup-header-root{outline:none}.ui5-popup-drag-resize-handler:focus{outline:none}.ui5-popup-root:has(.ui5-popup-drag-resize-handler:focus):before{content:"";position:absolute;inset:var(--_ui5_dialog_focus_outline_offset);border:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);border-radius:var(--sapElement_BorderCornerRadius);pointer-events:none;z-index:5}:host([resizable]) .ui5-popup-root:has(.ui5-popup-drag-resize-handler:focus):before{border-end-end-radius:var(--_ui5_dialog_resizable_bottom_right_radius)}:host([stretch]) .ui5-popup-content{width:100%;height:100%}:host(:not([header-text])[_show-fullscreen-button]) .ui5-popup-header-root{justify-content:flex-end}:host([header-text][_show-fullscreen-button]) .ui5-popup-header-root{justify-content:space-between}.ui5-popup-header-root{gap:.5rem}.ui5-popup-content{min-height:var(--_ui5_dialog_content_min_height);flex:1 1 auto}.ui5-popup-resize-handle{position:absolute;bottom:-.5rem;inset-inline-end:-.5rem;cursor:var(--_ui5_dialog_resize_cursor);width:1.5rem;height:1.5rem;border-radius:50%}.ui5-popup-resize-handle [ui5-icon]{color:var(--sapButton_Lite_TextColor)}.ui5-popup-header-text{min-width:0;justify-content:flex-start}:host([on-phone]) .ui5-dialog-fullscreen-btn{display:none}:host::backdrop{background-color:var(--_ui5_popup_block_layer_background);opacity:var(--_ui5_popup_block_layer_opacity)}.ui5-block-layer{display:block}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{font-family:var(--sapFontSemiboldDuplexFamily);color:var(--sapList_HeaderTextColor);align-items:center;flex-wrap:nowrap;max-width:100%;gap:.125rem}:host(:empty){padding:0}[ui5-icon]{margin-inline-start:.375rem;width:1rem;height:1rem;flex-shrink:0}::slotted([ui5-label]){color:inherit;font-family:inherit;overflow:hidden}
|
|
1
|
+
:host{font-family:var(--sapFontSemiboldDuplexFamily);color:var(--sapList_HeaderTextColor);align-items:center;flex-wrap:nowrap;max-width:100%;gap:.125rem;min-height:var(--_ui5_list_item_base_height)}:host(:empty){padding:0}[ui5-icon]{margin-inline-start:.375rem;width:1rem;height:1rem;flex-shrink:0}::slotted([ui5-label]){color:inherit;font-family:inherit;overflow:hidden}
|
|
@@ -9338,7 +9338,7 @@
|
|
|
9338
9338
|
"declarations": [
|
|
9339
9339
|
{
|
|
9340
9340
|
"kind": "class",
|
|
9341
|
-
"description": "### Overview\nThe `ui5-dialog` component is used to temporarily display some information in a\nsize-limited window in front of the regular app screen.\nIt is used to prompt the user for an action or a confirmation.\nThe `ui5-dialog` interrupts the current app processing as it is the only focused UI element and\nthe main screen is dimmed/blocked.\nThe dialog combines concepts known from other technologies where the windows have\nnames such as dialog box, dialog window, pop-up, pop-up window, alert box, or message box.\n\nThe `ui5-dialog` is modal, which means that a user action is required before it is possible to return to the parent window.\nTo open multiple dialogs, each dialog element should be separate in the markup. This will ensure the correct modal behavior. Avoid nesting dialogs within each other.\nThe content of the `ui5-dialog` is fully customizable.\n\n### Structure\nA `ui5-dialog` consists of a header, content, and a footer for action buttons.\nThe `ui5-dialog` is usually displayed at the center of the screen.\nIts position can be changed by the user. To enable this, you need to set the property `draggable` accordingly.\n\n\n### Responsive Behavior\nThe `stretch` property can be used to stretch the `ui5-dialog` to full screen. For better usability, it's recommended to stretch the dialog to full screen on phone devices.\n\n**Note:** When a `ui5-bar` is used in the header or in the footer, you should remove the default dialog's paddings.\n\nFor more information see the sample \"Bar in Header/Footer\".\n\n### Keyboard Handling\n\n#### Basic Navigation\nWhen the `ui5-dialog` has the `draggable` property set to `true`, the user can move the dialog\nwith the following keyboard shortcuts:\n\n- [Up] or [Down] arrow keys - Move the dialog up/down.\n- [Left] or [Right] arrow keys - Move the dialog left/right.\n\n#### Resizing\nWhen the `ui5-dialog` has the `resizable` property set to `true`, the user can change the size of the dialog\nwith the following keyboard shortcuts:\n\n- [Shift] + [Up] or [Down] - Decrease/Increase the height of the dialog.\n- [Shift] + [Left] or [Right] - Decrease/Increase the width of the dialog.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/Dialog\";`",
|
|
9341
|
+
"description": "### Overview\nThe `ui5-dialog` component is used to temporarily display some information in a\nsize-limited window in front of the regular app screen.\nIt is used to prompt the user for an action or a confirmation.\nThe `ui5-dialog` interrupts the current app processing as it is the only focused UI element and\nthe main screen is dimmed/blocked.\nThe dialog combines concepts known from other technologies where the windows have\nnames such as dialog box, dialog window, pop-up, pop-up window, alert box, or message box.\n\nThe `ui5-dialog` is modal, which means that a user action is required before it is possible to return to the parent window.\nTo open multiple dialogs, each dialog element should be separate in the markup. This will ensure the correct modal behavior. Avoid nesting dialogs within each other.\nThe content of the `ui5-dialog` is fully customizable.\n\n### Structure\nA `ui5-dialog` consists of a header, content, and a footer for action buttons.\nThe `ui5-dialog` is usually displayed at the center of the screen.\nIts position can be changed by the user. To enable this, you need to set the property `draggable` accordingly.\n\n\n### Responsive Behavior\nThe `stretch` property can be used to stretch the `ui5-dialog` to full screen. For better usability, it's recommended to stretch the dialog to full screen on phone devices.\n\n**Note:** When a `ui5-bar` is used in the header or in the footer, you should remove the default dialog's paddings.\n\nFor more information see the sample \"Bar in Header/Footer\".\n\n### Keyboard Handling\n\n#### Basic Navigation\nWhen the `ui5-dialog` has the `draggable` property set to `true`, the user can move the dialog\nwith the following keyboard shortcuts:\n\n- [Up] or [Down] arrow keys - Move the dialog up/down.\n- [Left] or [Right] arrow keys - Move the dialog left/right.\n\n#### Resizing\nWhen the `ui5-dialog` has the `resizable` property set to `true`, the user can change the size of the dialog\nwith the following keyboard shortcuts:\n\n- [Shift] + [Up] or [Down] - Decrease/Increase the height of the dialog.\n- [Shift] + [Left] or [Right] - Decrease/Increase the width of the dialog.\n\n#### Fullscreen\nWhen the `ui5-dialog` has the `showFullscreenButton` property set to `true`, the user can toggle fullscreen mode\nwith the following keyboard shortcut:\n\n- [Shift] + [Ctrl] + [F] - Toggle fullscreen mode.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/Dialog\";`",
|
|
9342
9342
|
"name": "Dialog",
|
|
9343
9343
|
"cssParts": [
|
|
9344
9344
|
{
|
|
@@ -9531,6 +9531,17 @@
|
|
|
9531
9531
|
"privacy": "public",
|
|
9532
9532
|
"_ui5since": "1.0.0-rc.10"
|
|
9533
9533
|
},
|
|
9534
|
+
{
|
|
9535
|
+
"kind": "field",
|
|
9536
|
+
"name": "showFullscreenButton",
|
|
9537
|
+
"type": {
|
|
9538
|
+
"text": "boolean"
|
|
9539
|
+
},
|
|
9540
|
+
"default": "false",
|
|
9541
|
+
"description": "Defines whether a fullscreen toggle button is shown in the dialog header.\nWhen pressed, it toggles the `stretch` property.\nThe fullscreen button is not available on phone devices.\n\n**Note:** The fullscreen button is not available on phone devices,\nnor when a custom header slot is provided — the application is expected\nto render its own toggle inside the custom header in those cases.",
|
|
9542
|
+
"privacy": "public",
|
|
9543
|
+
"_ui5since": "2.25.0"
|
|
9544
|
+
},
|
|
9534
9545
|
{
|
|
9535
9546
|
"kind": "field",
|
|
9536
9547
|
"name": "state",
|
|
@@ -9669,6 +9680,15 @@
|
|
|
9669
9680
|
"text": "boolean"
|
|
9670
9681
|
}
|
|
9671
9682
|
},
|
|
9683
|
+
{
|
|
9684
|
+
"description": "Defines whether a fullscreen toggle button is shown in the dialog header.\nWhen pressed, it toggles the `stretch` property.\nThe fullscreen button is not available on phone devices.\n\n**Note:** The fullscreen button is not available on phone devices,\nnor when a custom header slot is provided — the application is expected\nto render its own toggle inside the custom header in those cases.",
|
|
9685
|
+
"name": "show-fullscreen-button",
|
|
9686
|
+
"default": "false",
|
|
9687
|
+
"fieldName": "showFullscreenButton",
|
|
9688
|
+
"type": {
|
|
9689
|
+
"text": "boolean"
|
|
9690
|
+
}
|
|
9691
|
+
},
|
|
9672
9692
|
{
|
|
9673
9693
|
"description": "Defines the state of the `Dialog`.\n\n**Note:** If `\"Negative\"` and `\"Critical\"` states is set, it will change the\naccessibility role to \"alertdialog\", if the accessibleRole property is set to `\"Dialog\"`.",
|
|
9674
9694
|
"name": "state",
|
|
@@ -8060,7 +8060,7 @@
|
|
|
8060
8060
|
"declarations": [
|
|
8061
8061
|
{
|
|
8062
8062
|
"kind": "class",
|
|
8063
|
-
"description": "### Overview\nThe `ui5-dialog` component is used to temporarily display some information in a\nsize-limited window in front of the regular app screen.\nIt is used to prompt the user for an action or a confirmation.\nThe `ui5-dialog` interrupts the current app processing as it is the only focused UI element and\nthe main screen is dimmed/blocked.\nThe dialog combines concepts known from other technologies where the windows have\nnames such as dialog box, dialog window, pop-up, pop-up window, alert box, or message box.\n\nThe `ui5-dialog` is modal, which means that a user action is required before it is possible to return to the parent window.\nTo open multiple dialogs, each dialog element should be separate in the markup. This will ensure the correct modal behavior. Avoid nesting dialogs within each other.\nThe content of the `ui5-dialog` is fully customizable.\n\n### Structure\nA `ui5-dialog` consists of a header, content, and a footer for action buttons.\nThe `ui5-dialog` is usually displayed at the center of the screen.\nIts position can be changed by the user. To enable this, you need to set the property `draggable` accordingly.\n\n\n### Responsive Behavior\nThe `stretch` property can be used to stretch the `ui5-dialog` to full screen. For better usability, it's recommended to stretch the dialog to full screen on phone devices.\n\n**Note:** When a `ui5-bar` is used in the header or in the footer, you should remove the default dialog's paddings.\n\nFor more information see the sample \"Bar in Header/Footer\".\n\n### Keyboard Handling\n\n#### Basic Navigation\nWhen the `ui5-dialog` has the `draggable` property set to `true`, the user can move the dialog\nwith the following keyboard shortcuts:\n\n- [Up] or [Down] arrow keys - Move the dialog up/down.\n- [Left] or [Right] arrow keys - Move the dialog left/right.\n\n#### Resizing\nWhen the `ui5-dialog` has the `resizable` property set to `true`, the user can change the size of the dialog\nwith the following keyboard shortcuts:\n\n- [Shift] + [Up] or [Down] - Decrease/Increase the height of the dialog.\n- [Shift] + [Left] or [Right] - Decrease/Increase the width of the dialog.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/Dialog\";`",
|
|
8063
|
+
"description": "### Overview\nThe `ui5-dialog` component is used to temporarily display some information in a\nsize-limited window in front of the regular app screen.\nIt is used to prompt the user for an action or a confirmation.\nThe `ui5-dialog` interrupts the current app processing as it is the only focused UI element and\nthe main screen is dimmed/blocked.\nThe dialog combines concepts known from other technologies where the windows have\nnames such as dialog box, dialog window, pop-up, pop-up window, alert box, or message box.\n\nThe `ui5-dialog` is modal, which means that a user action is required before it is possible to return to the parent window.\nTo open multiple dialogs, each dialog element should be separate in the markup. This will ensure the correct modal behavior. Avoid nesting dialogs within each other.\nThe content of the `ui5-dialog` is fully customizable.\n\n### Structure\nA `ui5-dialog` consists of a header, content, and a footer for action buttons.\nThe `ui5-dialog` is usually displayed at the center of the screen.\nIts position can be changed by the user. To enable this, you need to set the property `draggable` accordingly.\n\n\n### Responsive Behavior\nThe `stretch` property can be used to stretch the `ui5-dialog` to full screen. For better usability, it's recommended to stretch the dialog to full screen on phone devices.\n\n**Note:** When a `ui5-bar` is used in the header or in the footer, you should remove the default dialog's paddings.\n\nFor more information see the sample \"Bar in Header/Footer\".\n\n### Keyboard Handling\n\n#### Basic Navigation\nWhen the `ui5-dialog` has the `draggable` property set to `true`, the user can move the dialog\nwith the following keyboard shortcuts:\n\n- [Up] or [Down] arrow keys - Move the dialog up/down.\n- [Left] or [Right] arrow keys - Move the dialog left/right.\n\n#### Resizing\nWhen the `ui5-dialog` has the `resizable` property set to `true`, the user can change the size of the dialog\nwith the following keyboard shortcuts:\n\n- [Shift] + [Up] or [Down] - Decrease/Increase the height of the dialog.\n- [Shift] + [Left] or [Right] - Decrease/Increase the width of the dialog.\n\n#### Fullscreen\nWhen the `ui5-dialog` has the `showFullscreenButton` property set to `true`, the user can toggle fullscreen mode\nwith the following keyboard shortcut:\n\n- [Shift] + [Ctrl] + [F] - Toggle fullscreen mode.\n\n### ES6 Module Import\n\n`import \"@ui5/webcomponents/dist/Dialog\";`",
|
|
8064
8064
|
"name": "Dialog",
|
|
8065
8065
|
"cssParts": [
|
|
8066
8066
|
{
|
|
@@ -8230,6 +8230,16 @@
|
|
|
8230
8230
|
"description": "Configures the component to be resizable.\nIf this property is set to true, the Dialog will have a resize handle in its bottom right corner in LTR languages.\nIn RTL languages, the resize handle will be placed in the bottom left corner.\n\n**Note:** The component can be resizable only in desktop mode.\n\n**Note:** Upon resizing, externally defined height and width styling will be ignored.",
|
|
8231
8231
|
"privacy": "public"
|
|
8232
8232
|
},
|
|
8233
|
+
{
|
|
8234
|
+
"kind": "field",
|
|
8235
|
+
"name": "showFullscreenButton",
|
|
8236
|
+
"type": {
|
|
8237
|
+
"text": "boolean"
|
|
8238
|
+
},
|
|
8239
|
+
"default": "false",
|
|
8240
|
+
"description": "Defines whether a fullscreen toggle button is shown in the dialog header.\nWhen pressed, it toggles the `stretch` property.\nThe fullscreen button is not available on phone devices.\n\n**Note:** The fullscreen button is not available on phone devices,\nnor when a custom header slot is provided — the application is expected\nto render its own toggle inside the custom header in those cases.",
|
|
8241
|
+
"privacy": "public"
|
|
8242
|
+
},
|
|
8233
8243
|
{
|
|
8234
8244
|
"kind": "field",
|
|
8235
8245
|
"name": "state",
|
|
@@ -8367,6 +8377,15 @@
|
|
|
8367
8377
|
"text": "boolean"
|
|
8368
8378
|
}
|
|
8369
8379
|
},
|
|
8380
|
+
{
|
|
8381
|
+
"description": "Defines whether a fullscreen toggle button is shown in the dialog header.\nWhen pressed, it toggles the `stretch` property.\nThe fullscreen button is not available on phone devices.\n\n**Note:** The fullscreen button is not available on phone devices,\nnor when a custom header slot is provided — the application is expected\nto render its own toggle inside the custom header in those cases.",
|
|
8382
|
+
"name": "show-fullscreen-button",
|
|
8383
|
+
"default": "false",
|
|
8384
|
+
"fieldName": "showFullscreenButton",
|
|
8385
|
+
"type": {
|
|
8386
|
+
"text": "boolean"
|
|
8387
|
+
}
|
|
8388
|
+
},
|
|
8370
8389
|
{
|
|
8371
8390
|
"description": "Defines the state of the `Dialog`.\n\n**Note:** If `\"Negative\"` and `\"Critical\"` states is set, it will change the\naccessibility role to \"alertdialog\", if the accessibleRole property is set to `\"Dialog\"`.",
|
|
8372
8391
|
"name": "state",
|