All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.ResponsivePopover.js.map Maven / Gradle / Ivy

The newest version!
{"version":3,"file":"ResponsivePopover.js","sourceRoot":"","sources":["../src/ResponsivePopover.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,EAAE,sCAAsC,EAAE,MAAM,mCAAmC,CAAC;AAE3F,OAAO,yBAAyB,MAAM,wDAAwD,CAAC;AAE/F,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,0CAA0C,CAAC;AAElD,SAAS;AACT,OAAO,oBAAoB,MAAM,6CAA6C,CAAC;AAI/E;;;;;;;;;;;;;;;;;;;;GAoBG;AAWH,IAAM,iBAAiB,yBAAvB,MAAM,iBAAkB,SAAQ,OAAO;IA4BtC;QACC,KAAK,EAAE,CAAC;QA5BT;;;;WAIG;QAEH,yBAAoB,GAAG,KAAK,CAAC;QAE7B;;;WAGG;QAEH,gBAAW,GAAG,KAAK,CAAC;QAEpB;;;;;;WAMG;QAEH,qBAAgB,GAAG,KAAK,CAAC;IAMzB,CAAC;IAED,KAAK,CAAC,SAAS;QACd,IAAI,CAAC,OAAO,EAAE,EAAE;YACf,MAAM,KAAK,CAAC,SAAS,EAAE,CAAC;SACxB;aAAM,IAAI,IAAI,CAAC,OAAO,EAAE;YACxB,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;SACzB;IACF,CAAC;IAED,KAAK,CAAC,KAAK;QACV,IAAI,CAAC,OAAO,EAAE,EAAE;YACf,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC;SACrB;IACF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E,wBAAwB;QAC7B,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,oBAAoB,CAAC;QAC9C,QAAQ,EAAE,yBAAyB;QACnC,YAAY,EAAE;YACb,GAAG,OAAO,CAAC,YAAY;YACvB,MAAM;YACN,MAAM;SACN;KACD,CAAC;GACI,iBAAiB,CAoItB;AAED,iBAAiB,CAAC,MAAM,EAAE,CAAC;AAE3B,eAAe,iBAAiB,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport { isPhone } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\n\nimport { RESPONSIVE_POPOVER_CLOSE_DIALOG_BUTTON } from \"./generated/i18n/i18n-defaults.js\";\n\nimport ResponsivePopoverTemplate from \"./generated/templates/ResponsivePopoverTemplate.lit.js\";\nimport type { PopupBeforeCloseEventDetail } from \"./Popup.js\";\nimport Popover from \"./Popover.js\";\nimport Dialog from \"./Dialog.js\";\nimport Button from \"./Button.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\n\n// Styles\nimport ResponsivePopoverCss from \"./generated/themes/ResponsivePopover.css.js\";\n\ntype ResponsivePopoverBeforeCloseEventDetail = PopupBeforeCloseEventDetail;\n\n/**\n * @class\n *\n * ### Overview\n * The `ui5-responsive-popover` acts as a Popover on desktop and tablet, while on phone it acts as a Dialog.\n * The component improves tremendously the user experience on mobile.\n *\n * ### Usage\n * Use it when you want to make sure that all the content is visible on any device.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/ResponsivePopover.js\";`\n * @constructor\n * @extends Popover\n * @since 1.0.0-rc.6\n * @public\n * @csspart header - Used to style the header of the component\n * @csspart content - Used to style the content of the component\n * @csspart footer - Used to style the footer of the component\n */\n@customElement({\n\ttag: \"ui5-responsive-popover\",\n\tstyles: [Popover.styles, ResponsivePopoverCss],\n\ttemplate: ResponsivePopoverTemplate,\n\tdependencies: [\n\t\t...Popover.dependencies,\n\t\tButton,\n\t\tDialog,\n\t],\n})\nclass ResponsivePopover extends Popover {\n\t/**\n\t * Defines if only the content would be displayed (without header and footer) in the popover on Desktop.\n\t * By default both the header and footer would be displayed.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\tcontentOnlyOnDesktop = false;\n\n\t/**\n\t * Used internaly for controls which must not have header.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_hideHeader = false;\n\n\t/**\n\t * Defines whether a close button will be rendered in the header of the component\n\t * **Note:** If you are using the `header` slot, this property will have no effect\n\t * @private\n\t * @default false\n\t * @since 1.0.0-rc.16\n\t */\n\t@property({ type: Boolean })\n\t_hideCloseButton = false;\n\n\tstatic i18nBundle: I18nBundle;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tasync openPopup() {\n\t\tif (!isPhone()) {\n\t\t\tawait super.openPopup();\n\t\t} else if (this._dialog) {\n\t\t\tthis._dialog.open = true;\n\t\t}\n\t}\n\n\tasync _show() {\n\t\tif (!isPhone()) {\n\t\t\treturn super._show();\n\t\t}\n\t}\n\n\t/**\n\t * Closes the popover/dialog.\n\t * @override\n\t */\n\tclosePopup(escPressed = false, preventRegistryUpdate = false, preventFocusRestore = false) : void {\n\t\tif (!isPhone()) {\n\t\t\tsuper.closePopup(escPressed, preventRegistryUpdate, preventFocusRestore);\n\t\t} else {\n\t\t\tthis._dialog?.closePopup(escPressed, preventRegistryUpdate, preventFocusRestore);\n\t\t}\n\t}\n\n\ttoggle(opener: HTMLElement) : void {\n\t\tif (this.open) {\n\t\t\tthis.closePopup();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.opener = opener;\n\t\tthis.open = true;\n\t}\n\n\tget classes() {\n\t\tconst allClasses = super.classes;\n\n\t\tallClasses.header = {\n\t\t\t\"ui5-responsive-popover-header\": true,\n\t\t\t\"ui5-responsive-popover-header-no-title\": !this.headerText,\n\t\t};\n\n\t\treturn allClasses;\n\t}\n\n\tget _dialog() {\n\t\treturn this.shadowRoot!.querySelector(\"[ui5-dialog]\")!;\n\t}\n\n\tget contentDOM() {\n\t\treturn isPhone() ? this._dialog.contentDOM : super.contentDOM;\n\t}\n\n\tget _isPhone() {\n\t\treturn isPhone();\n\t}\n\n\tget _displayHeader() {\n\t\treturn (isPhone() || !this.contentOnlyOnDesktop) && super._displayHeader;\n\t}\n\n\tget _displayFooter() {\n\t\treturn isPhone() || !this.contentOnlyOnDesktop;\n\t}\n\n\tget _closeDialogAriaLabel() {\n\t\treturn ResponsivePopover.i18nBundle.getText(RESPONSIVE_POPOVER_CLOSE_DIALOG_BUTTON);\n\t}\n\n\t_beforeDialogOpen(e: CustomEvent) {\n\t\tthis._opened = true;\n\t\tthis.open = true;\n\t\tthis._propagateDialogEvent(e);\n\t}\n\n\t_afterDialogClose(e: CustomEvent) {\n\t\tthis._opened = false;\n\t\tthis.open = false;\n\t\tthis._propagateDialogEvent(e);\n\t}\n\n\t_propagateDialogEvent(e: CustomEvent) {\n\t\tconst type = e.type.replace(\"ui5-\", \"\");\n\n\t\tthis.fireEvent(type, e.detail);\n\t}\n\n\tget isModal() {\n\t\tif (!isPhone()) {\n\t\t\treturn super.isModal;\n\t\t}\n\n\t\treturn this._dialog.isModal;\n\t}\n\n\tstatic async onDefine() {\n\t\tResponsivePopover.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n\t}\n}\n\nResponsivePopover.define();\n\nexport default ResponsivePopover;\nexport type {\n\tResponsivePopoverBeforeCloseEventDetail,\n};\n"]}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy