@ember-eui/core 12.0.6 → 12.0.7
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.
|
@@ -4,7 +4,8 @@ export interface EuiWrappingPopoverSignature {
|
|
|
4
4
|
Element: EuiPopoverSignature['Element'];
|
|
5
5
|
Args: EuiPopoverSignature['Args'] & {
|
|
6
6
|
button?: HTMLElement;
|
|
7
|
-
onWrappingDestroy
|
|
7
|
+
onWrappingDestroy?: () => void;
|
|
8
|
+
portalRef?: (ref: HTMLElement) => void;
|
|
8
9
|
};
|
|
9
10
|
Blocks: {
|
|
10
11
|
default: [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-wrapping-popover.d.ts","sourceRoot":"","sources":["../../src/components/eui-wrapping-popover.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAQ3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACxC,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG;QAClC,MAAM,CAAC,EAAE,WAAW,CAAC;QACrB,iBAAiB,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"eui-wrapping-popover.d.ts","sourceRoot":"","sources":["../../src/components/eui-wrapping-popover.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAQ3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACxC,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG;QAClC,MAAM,CAAC,EAAE,WAAW,CAAC;QACrB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;QAC/B,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;KACxC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,SAAS,CAAC,2BAA2B,CAAC;IACpF,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,MAAM,CAA4B;IAE1C,YAAY;;;;;;OAGT;IAEH,YAAY,GAAI,SAAS,WAAW,UAGlC;IAEF,IAAI,MAAM,IAAI;QAAE,OAAO,EAAE,WAAW,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CASpE;IAED,WAAW;CAyCZ"}
|
|
@@ -15,6 +15,7 @@ class EuiWrappingPopover extends Component {
|
|
|
15
15
|
});
|
|
16
16
|
setPortalRef = element => {
|
|
17
17
|
this.portal = element;
|
|
18
|
+
this.args.portalRef?.(element);
|
|
18
19
|
};
|
|
19
20
|
get insert() {
|
|
20
21
|
if (this.args.button) {
|
|
@@ -32,7 +33,7 @@ class EuiWrappingPopover extends Component {
|
|
|
32
33
|
this.portal.insertAdjacentElement('beforebegin', this.args.button);
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
|
-
this.args.onWrappingDestroy();
|
|
36
|
+
this.args.onWrappingDestroy?.();
|
|
36
37
|
}
|
|
37
38
|
static {
|
|
38
39
|
setComponentTemplate(precompileTemplate("\n <EuiPortal @portalRef={{this.setPortalRef}} @insert={{this.insert}}>\n <EuiPopover @closePopover={{@closePopover}} @isOpen={{@isOpen}} @anchorClassName={{@anchorClassName}} @anchorPosition={{@anchorPosition}} @attachToAnchor={{@attachToAnchor}} @container={{@container}} @display={{@display}} @hasArrow={{@hasArrow}} @initialFocus={{@initialFocus}} @ownFocus={{@ownFocus}} @panelClassName={{@panelClassName}} @panelPaddingSize={{@panelPaddingSize}} @panelStyle={{@panelStyle}} @panelRef={{@panelRef}} @popoverRef={{@popoverRef}} ...attributes>\n <:button>\n <div {{this.setAnchorRef}} class=\"euiWrappingPopover__anchor\" />\n </:button>\n\n <:content>\n {{yield}}\n </:content>\n </EuiPopover>\n </EuiPortal>\n ", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eui-wrapping-popover.js","sources":["../../src/components/eui-wrapping-popover.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nimport { modifier } from 'ember-modifier';\n\nimport EuiPopover from './eui-popover.gts';\nimport EuiPortal from './eui-portal.gts';\n\nimport type { EuiPopoverSignature } from './eui-popover.gts';\n\nexport interface EuiWrappingPopoverSignature {\n Element: EuiPopoverSignature['Element'];\n Args: EuiPopoverSignature['Args'] & {\n button?: HTMLElement;\n onWrappingDestroy
|
|
1
|
+
{"version":3,"file":"eui-wrapping-popover.js","sources":["../../src/components/eui-wrapping-popover.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nimport { modifier } from 'ember-modifier';\n\nimport EuiPopover from './eui-popover.gts';\nimport EuiPortal from './eui-portal.gts';\n\nimport type { EuiPopoverSignature } from './eui-popover.gts';\n\nexport interface EuiWrappingPopoverSignature {\n Element: EuiPopoverSignature['Element'];\n Args: EuiPopoverSignature['Args'] & {\n button?: HTMLElement;\n onWrappingDestroy?: () => void;\n portalRef?: (ref: HTMLElement) => void;\n };\n Blocks: {\n default: [];\n };\n}\n\nexport default class EuiWrappingPopover extends Component<EuiWrappingPopoverSignature> {\n private portal: HTMLElement | null = null;\n private anchor: HTMLElement | null = null;\n\n setAnchorRef = modifier((element: HTMLElement) => {\n this.anchor = element;\n this.anchor.insertAdjacentElement('beforebegin', this.args.button!);\n });\n\n setPortalRef = (element: HTMLElement) => {\n this.portal = element;\n this.args.portalRef?.(element);\n };\n\n get insert(): { sibling: HTMLElement; position: 'after' } | undefined {\n if (this.args.button) {\n return {\n sibling: this.args.button,\n position: 'after'\n };\n }\n\n return;\n }\n\n willDestroy() {\n super.willDestroy();\n\n if (this.args.button && this.args.button.parentNode) {\n if (this.portal) {\n this.portal.insertAdjacentElement('beforebegin', this.args.button);\n }\n }\n this.args.onWrappingDestroy?.();\n }\n\n <template>\n <EuiPortal @portalRef={{this.setPortalRef}} @insert={{this.insert}}>\n <EuiPopover\n @closePopover={{@closePopover}}\n @isOpen={{@isOpen}}\n @anchorClassName={{@anchorClassName}}\n @anchorPosition={{@anchorPosition}}\n @attachToAnchor={{@attachToAnchor}}\n @container={{@container}}\n @display={{@display}}\n @hasArrow={{@hasArrow}}\n @initialFocus={{@initialFocus}}\n @ownFocus={{@ownFocus}}\n @panelClassName={{@panelClassName}}\n @panelPaddingSize={{@panelPaddingSize}}\n @panelStyle={{@panelStyle}}\n @panelRef={{@panelRef}}\n @popoverRef={{@popoverRef}}\n ...attributes\n >\n <:button>\n <div {{this.setAnchorRef}} class=\"euiWrappingPopover__anchor\" />\n </:button>\n\n <:content>\n {{yield}}\n </:content>\n </EuiPopover>\n </EuiPortal>\n </template>\n}\n"],"names":["EuiWrappingPopover","Component","portal","anchor","setAnchorRef","modifier","element","insertAdjacentElement","args","button","setPortalRef","portalRef","insert","sibling","position","willDestroy","parentNode","onWrappingDestroy","setComponentTemplate","precompileTemplate","strictMode","scope","EuiPortal","EuiPopover"],"mappings":";;;;;;;;AAsBe,MAAMA,2BAA2BC,SAAU,CAAA;AAChDC,EAAAA,MAAQ,GAAqB,IAAK;AAClCC,EAAAA,MAAQ,GAAqB,IAAK;AAE1CC,EAAAA,YAAe,GAAAC,QAAA,CAAUC,OAAS,IAAA;IAChC,IAAI,CAACH,MAAM,GAAGG,OAAA;AACd,IAAA,IAAI,CAACH,MAAM,CAACI,qBAAqB,CAAC,eAAe,IAAI,CAACC,IAAI,CAACC,MAAM,CAAA;AACnE,GAAG,CAAA;EAEHC,YAAA,GAAgBJ,OAAS,IAAA;IACvB,IAAI,CAACJ,MAAM,GAAGI,OAAA;AACd,IAAA,IAA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