@vaadin/react-components 24.4.0-alpha3 → 24.4.0-alpha5

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/ContextMenu.d.ts CHANGED
@@ -7,19 +7,24 @@ export type ContextMenuItem = Omit<_ContextMenuItem, 'component' | 'children'> &
7
7
  component?: ReactElement | string;
8
8
  children?: Array<ContextMenuItem>;
9
9
  };
10
- export type ContextMenuProps = Partial<Omit<_ContextMenuProps, 'opened' | 'renderer' | 'items'>> & Readonly<{
10
+ export type ContextMenuItemSelectedEvent = CustomEvent<{
11
+ value: ContextMenuItem;
12
+ }>;
13
+ export type ContextMenuProps = Partial<Omit<_ContextMenuProps, 'opened' | 'renderer' | 'items' | 'onItemSelected'>> & Readonly<{
11
14
  renderer?: ComponentType<ContextMenuReactRendererProps> | null;
12
15
  items?: Array<ContextMenuItem>;
16
+ onItemSelected?: (event: ContextMenuItemSelectedEvent) => void;
13
17
  }>;
14
18
  declare const ForwardedContextMenu: import("react").ForwardRefExoticComponent<Partial<Omit<Partial<import("./utils/createComponent.js").ThemedWebComponentProps<ContextMenuElement, Readonly<{
15
19
  onItemSelected: import("@lit/react").EventName<import("@vaadin/context-menu/src/vaadin-context-menu.js").ContextMenuItemSelectedEvent>;
16
20
  onOpenedChanged: import("@lit/react").EventName<import("@vaadin/context-menu/src/vaadin-context-menu.js").ContextMenuOpenedChangedEvent>;
17
- }>>>, "opened" | "items" | "renderer">> & Readonly<{
21
+ }>>>, "opened" | "items" | "renderer" | "onItemSelected">> & Readonly<{
18
22
  renderer?: ComponentType<Readonly<{
19
23
  context: ContextMenuRendererContext;
20
24
  original: ContextMenuElement;
21
25
  }>> | null | undefined;
22
26
  items?: ContextMenuItem[] | undefined;
27
+ onItemSelected?: ((event: ContextMenuItemSelectedEvent) => void) | undefined;
23
28
  }> & import("react").RefAttributes<ContextMenuElement>>;
24
29
  export { ForwardedContextMenu as ContextMenu };
25
30
  //# sourceMappingURL=ContextMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["src/ContextMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAiC,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,IAAI,iBAAiB,EAC1C,KAAK,eAAe,IAAI,gBAAgB,EACzC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,yBAAyB,EAAsB,MAAM,mCAAmC,CAAC;AAGvG,cAAc,4BAA4B,CAAC;AAE3C,MAAM,MAAM,6BAA6B,GAAG,yBAAyB,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAAC;AAEtH,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG;IAC/E,SAAS,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IAElC,QAAQ,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CACnC,CAAC;AAKF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC,CAAC,GAC9F,QAAQ,CAAC;IACP,QAAQ,CAAC,EAAE,aAAa,CAAC,6BAA6B,CAAC,GAAG,IAAI,CAAC;IAE/D,KAAK,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CAChC,CAAC,CAAC;AAeL,QAAA,MAAM,oBAAoB;;;;;;;;;uDAA0B,CAAC;AAErD,OAAO,EAAE,oBAAoB,IAAI,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["src/ContextMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAiC,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,IAAI,iBAAiB,EAC1C,KAAK,eAAe,IAAI,gBAAgB,EACzC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,yBAAyB,EAAsB,MAAM,mCAAmC,CAAC;AAGvG,cAAc,4BAA4B,CAAC;AAE3C,MAAM,MAAM,6BAA6B,GAAG,yBAAyB,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAAC;AAEtH,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG;IAC/E,SAAS,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IAElC,QAAQ,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,WAAW,CAAC;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,CAAC,CAAC;AAKnF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,gBAAgB,CAAC,CAAC,GACjH,QAAQ,CAAC;IACP,QAAQ,CAAC,EAAE,aAAa,CAAC,6BAA6B,CAAC,GAAG,IAAI,CAAC;IAE/D,KAAK,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAE/B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,4BAA4B,KAAK,IAAI,CAAC;CAChE,CAAC,CAAC;AAgCL,QAAA,MAAM,oBAAoB;;;;;;;;;8BAjCG,4BAA4B,KAAK,IAAI;uDAiCd,CAAC;AAErD,OAAO,EAAE,oBAAoB,IAAI,WAAW,EAAE,CAAC"}
package/ContextMenu.js CHANGED
@@ -1,2 +1,2 @@
1
- export*from"@vaadin/context-menu/vaadin-context-menu.js";import{forwardRef as u}from"react";import{ContextMenu as a}from"@vaadin/context-menu/vaadin-context-menu.js";import*as x from"react";import{createComponent as C}from"./utils/createComponent.js";var M={onItemSelected:"item-selected",onOpenedChanged:"opened-changed"},t=C({elementClass:a,events:M,react:x,tagName:"vaadin-context-menu"});import{useContextRenderer as d}from"./renderers/useContextRenderer.js";import{mapItemsWithComponents as s}from"./utils/mapItemsWithComponents.js";import{jsxs as i}from"react/jsx-runtime";function c(e,n){let[o,r]=d(e.renderer),[p,m]=s(e.items,"vaadin-context-menu-item");return i(t,{...e,ref:n,renderer:r,items:m,children:[e.children,o,p]})}var I=u(c);export{I as ContextMenu,a as ContextMenuElement};
1
+ export*from"@vaadin/context-menu/vaadin-context-menu.js";import{forwardRef as l}from"react";import{ContextMenu as x}from"@vaadin/context-menu/vaadin-context-menu.js";import*as u from"react";import{createComponent as d}from"./utils/createComponent.js";var M={onItemSelected:"item-selected",onOpenedChanged:"opened-changed"},o=d({elementClass:x,events:M,react:u,tagName:"vaadin-context-menu"});import{useContextRenderer as s}from"./renderers/useContextRenderer.js";import{getOriginalItem as c,mapItemsWithComponents as i}from"./utils/mapItemsWithComponents.js";import{jsxs as y}from"react/jsx-runtime";function v(e,r){let[m,p]=s(e.renderer),[a,C]=i(e.items,"vaadin-context-menu-item"),n=e.onItemSelected;return y(o,{...e,ref:r,renderer:p,items:C,onItemSelected:n?t=>{Object.assign(t.detail,{value:c(t.detail.value)}),n(t)}:void 0,children:[e.children,m,a]})}var h=l(v);export{h as ContextMenu,x as ContextMenuElement};
2
2
  //# sourceMappingURL=ContextMenu.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["src/ContextMenu.tsx", "src/generated/ContextMenu.ts"],
4
- "sourcesContent": ["export * from \"@vaadin/context-menu/vaadin-context-menu.js\";\nimport { type ComponentType, type ForwardedRef, forwardRef, type ReactElement } from 'react';\nimport {\n ContextMenu as _ContextMenu,\n type ContextMenuRendererContext,\n type ContextMenuElement,\n type ContextMenuProps as _ContextMenuProps,\n type ContextMenuItem as _ContextMenuItem,\n} from './generated/ContextMenu.js';\nimport { type ReactContextRendererProps, useContextRenderer } from './renderers/useContextRenderer.js';\nimport { mapItemsWithComponents } from './utils/mapItemsWithComponents.js';\n\nexport * from './generated/ContextMenu.js';\n\nexport type ContextMenuReactRendererProps = ReactContextRendererProps<ContextMenuRendererContext, ContextMenuElement>;\n\nexport type ContextMenuItem = Omit<_ContextMenuItem, 'component' | 'children'> & {\n component?: ReactElement | string;\n\n children?: Array<ContextMenuItem>;\n};\n\n// The 'opened' property is omitted because it is readonly in the web component.\n// So you cannot set it up manually, only read from the component.\n// For changing the property, use specific methods of the component.\nexport type ContextMenuProps = Partial<Omit<_ContextMenuProps, 'opened' | 'renderer' | 'items'>> &\n Readonly<{\n renderer?: ComponentType<ContextMenuReactRendererProps> | null;\n\n items?: Array<ContextMenuItem>;\n }>;\n\nfunction ContextMenu(props: ContextMenuProps, ref: ForwardedRef<ContextMenuElement>): ReactElement | null {\n const [portals, renderer] = useContextRenderer(props.renderer);\n const [itemPortals, webComponentItems] = mapItemsWithComponents(props.items, 'vaadin-context-menu-item');\n\n return (\n <_ContextMenu {...props} ref={ref} renderer={renderer} items={webComponentItems}>\n {props.children}\n {portals}\n {itemPortals}\n </_ContextMenu>\n );\n}\n\nconst ForwardedContextMenu = forwardRef(ContextMenu);\n\nexport { ForwardedContextMenu as ContextMenu };\n", "import type { EventName } from \"@lit/react\";\nimport { ContextMenu as ContextMenuElement, type ContextMenuEventMap as _ContextMenuEventMap, } from \"@vaadin/context-menu/vaadin-context-menu.js\";\nimport * as React from \"react\";\nimport { createComponent, type WebComponentProps } from \"../utils/createComponent.js\";\nexport { ContextMenuElement, };\nexport type ContextMenuEventMap = Readonly<{\n onItemSelected: EventName<_ContextMenuEventMap[\"item-selected\"]>;\n onOpenedChanged: EventName<_ContextMenuEventMap[\"opened-changed\"]>;\n}>;\nconst events = { onItemSelected: \"item-selected\", onOpenedChanged: \"opened-changed\" } as ContextMenuEventMap;\nexport type ContextMenuProps = WebComponentProps<ContextMenuElement, ContextMenuEventMap>;\nexport const ContextMenu = createComponent({\n elementClass: ContextMenuElement, events, react: React, tagName: \"vaadin-context-menu\"\n});\n"],
5
- "mappings": "AAAA,WAAc,8CACd,OAAgD,cAAAA,MAAqC,QCArF,OAAS,eAAeC,MAA6E,8CACrG,UAAYC,MAAW,QACvB,OAAS,mBAAAC,MAA+C,6BAMxD,IAAMC,EAAS,CAAE,eAAgB,gBAAiB,gBAAiB,gBAAiB,EAEvEC,EAAcC,EAAgB,CACvC,aAAcC,EAAoB,OAAAH,EAAQ,MAAOI,EAAO,QAAS,qBACrE,CAAC,EDJD,OAAyC,sBAAAC,MAA0B,oCACnE,OAAS,0BAAAC,MAA8B,oCA2BnC,eAAAC,MAAA,oBALJ,SAASC,EAAYC,EAAyBC,EAA4D,CACxG,GAAM,CAACC,EAASC,CAAQ,EAAIP,EAAmBI,EAAM,QAAQ,EACvD,CAACI,EAAaC,CAAiB,EAAIR,EAAuBG,EAAM,MAAO,0BAA0B,EAEvG,OACEF,EAACC,EAAA,CAAc,GAAGC,EAAO,IAAKC,EAAK,SAAUE,EAAU,MAAOE,EAC3D,UAAAL,EAAM,SACNE,EACAE,GACH,CAEJ,CAEA,IAAME,EAAuBC,EAAWR,CAAW",
6
- "names": ["forwardRef", "ContextMenuElement", "React", "createComponent", "events", "ContextMenu", "createComponent", "ContextMenuElement", "React", "useContextRenderer", "mapItemsWithComponents", "jsxs", "ContextMenu", "props", "ref", "portals", "renderer", "itemPortals", "webComponentItems", "ForwardedContextMenu", "forwardRef"]
4
+ "sourcesContent": ["export * from \"@vaadin/context-menu/vaadin-context-menu.js\";\nimport { type ComponentType, type ForwardedRef, forwardRef, type ReactElement } from 'react';\nimport {\n ContextMenu as _ContextMenu,\n type ContextMenuRendererContext,\n type ContextMenuElement,\n type ContextMenuProps as _ContextMenuProps,\n type ContextMenuItem as _ContextMenuItem,\n} from './generated/ContextMenu.js';\nimport { type ReactContextRendererProps, useContextRenderer } from './renderers/useContextRenderer.js';\nimport { getOriginalItem, mapItemsWithComponents } from './utils/mapItemsWithComponents.js';\n\nexport * from './generated/ContextMenu.js';\n\nexport type ContextMenuReactRendererProps = ReactContextRendererProps<ContextMenuRendererContext, ContextMenuElement>;\n\nexport type ContextMenuItem = Omit<_ContextMenuItem, 'component' | 'children'> & {\n component?: ReactElement | string;\n\n children?: Array<ContextMenuItem>;\n};\n\nexport type ContextMenuItemSelectedEvent = CustomEvent<{ value: ContextMenuItem }>;\n\n// The 'opened' property is omitted because it is readonly in the web component.\n// So you cannot set it up manually, only read from the component.\n// For changing the property, use specific methods of the component.\nexport type ContextMenuProps = Partial<Omit<_ContextMenuProps, 'opened' | 'renderer' | 'items' | 'onItemSelected'>> &\n Readonly<{\n renderer?: ComponentType<ContextMenuReactRendererProps> | null;\n\n items?: Array<ContextMenuItem>;\n\n onItemSelected?: (event: ContextMenuItemSelectedEvent) => void;\n }>;\n\nfunction ContextMenu(props: ContextMenuProps, ref: ForwardedRef<ContextMenuElement>): ReactElement | null {\n const [portals, renderer] = useContextRenderer(props.renderer);\n const [itemPortals, webComponentItems] = mapItemsWithComponents(props.items, 'vaadin-context-menu-item');\n\n const onItemSelected = props.onItemSelected;\n const mappedOnItemSelected = onItemSelected\n ? (event: CustomEvent<{ value: _ContextMenuItem }>) => {\n // Replace the mapped web component item with the original item\n Object.assign(event.detail, {\n value: getOriginalItem(event.detail.value),\n });\n\n onItemSelected(event as CustomEvent<{ value: ContextMenuItem }>);\n }\n : undefined;\n return (\n <_ContextMenu\n {...props}\n ref={ref}\n renderer={renderer}\n items={webComponentItems}\n onItemSelected={mappedOnItemSelected}\n >\n {props.children}\n {portals}\n {itemPortals}\n </_ContextMenu>\n );\n}\n\nconst ForwardedContextMenu = forwardRef(ContextMenu);\n\nexport { ForwardedContextMenu as ContextMenu };\n", "import type { EventName } from \"@lit/react\";\nimport { ContextMenu as ContextMenuElement, type ContextMenuEventMap as _ContextMenuEventMap, } from \"@vaadin/context-menu/vaadin-context-menu.js\";\nimport * as React from \"react\";\nimport { createComponent, type WebComponentProps } from \"../utils/createComponent.js\";\nexport { ContextMenuElement, };\nexport type ContextMenuEventMap = Readonly<{\n onItemSelected: EventName<_ContextMenuEventMap[\"item-selected\"]>;\n onOpenedChanged: EventName<_ContextMenuEventMap[\"opened-changed\"]>;\n}>;\nconst events = { onItemSelected: \"item-selected\", onOpenedChanged: \"opened-changed\" } as ContextMenuEventMap;\nexport type ContextMenuProps = WebComponentProps<ContextMenuElement, ContextMenuEventMap>;\nexport const ContextMenu = createComponent({\n elementClass: ContextMenuElement, events, react: React, tagName: \"vaadin-context-menu\"\n});\n"],
5
+ "mappings": "AAAA,WAAc,8CACd,OAAgD,cAAAA,MAAqC,QCArF,OAAS,eAAeC,MAA6E,8CACrG,UAAYC,MAAW,QACvB,OAAS,mBAAAC,MAA+C,6BAMxD,IAAMC,EAAS,CAAE,eAAgB,gBAAiB,gBAAiB,gBAAiB,EAEvEC,EAAcC,EAAgB,CACvC,aAAcC,EAAoB,OAAAH,EAAQ,MAAOI,EAAO,QAAS,qBACrE,CAAC,EDJD,OAAyC,sBAAAC,MAA0B,oCACnE,OAAS,mBAAAC,EAAiB,0BAAAC,MAA8B,oCA0CpD,eAAAC,MAAA,oBAhBJ,SAASC,EAAYC,EAAyBC,EAA4D,CACxG,GAAM,CAACC,EAASC,CAAQ,EAAIR,EAAmBK,EAAM,QAAQ,EACvD,CAACI,EAAaC,CAAiB,EAAIR,EAAuBG,EAAM,MAAO,0BAA0B,EAEjGM,EAAiBN,EAAM,eAW7B,OACEF,EAACC,EAAA,CACE,GAAGC,EACJ,IAAKC,EACL,SAAUE,EACV,MAAOE,EACP,eAhByBC,EACxBC,GAAoD,CAEnD,OAAO,OAAOA,EAAM,OAAQ,CAC1B,MAAOX,EAAgBW,EAAM,OAAO,KAAK,CAC3C,CAAC,EAEDD,EAAeC,CAAgD,CACjE,EACA,OASC,UAAAP,EAAM,SACNE,EACAE,GACH,CAEJ,CAEA,IAAMI,EAAuBC,EAAWV,CAAW",
6
+ "names": ["forwardRef", "ContextMenuElement", "React", "createComponent", "events", "ContextMenu", "createComponent", "ContextMenuElement", "React", "useContextRenderer", "getOriginalItem", "mapItemsWithComponents", "jsxs", "ContextMenu", "props", "ref", "portals", "renderer", "itemPortals", "webComponentItems", "onItemSelected", "event", "ForwardedContextMenu", "forwardRef"]
7
7
  }
@@ -1,4 +1,5 @@
1
1
  import { type ComponentType, type ReactElement, type ReactNode, type RefAttributes } from 'react';
2
+ import type { GridColumn } from './generated/Grid.js';
2
3
  import { type GridProEditColumnElement, type GridProEditColumnProps as _GridProEditColumnProps } from './generated/GridProEditColumn.js';
3
4
  import type { GridBodyReactRendererProps, GridEdgeReactRendererProps } from './renderers/grid.js';
4
5
  import type { OmittedGridColumnHTMLAttributes } from './GridColumn.js';
@@ -20,25 +21,25 @@ declare const ForwardedGridProEditColumn: <TItem = any>(props: Partial<Omit<Part
20
21
  children?: ComponentType<Readonly<{
21
22
  item: TItem;
22
23
  model: import("@vaadin/grid/src/vaadin-grid-mixin.js").GridItemModel<TItem>;
23
- original: import("@vaadin/grid/src/vaadin-grid-column.js").GridColumn<TItem>;
24
+ original: GridColumn<TItem>;
24
25
  }>> | null | undefined;
25
26
  editModeRenderer?: ComponentType<Readonly<{
26
27
  item: TItem;
27
28
  model: import("@vaadin/grid/src/vaadin-grid-mixin.js").GridItemModel<TItem>;
28
- original: import("@vaadin/grid/src/vaadin-grid-column.js").GridColumn<TItem>;
29
+ original: GridColumn<TItem>;
29
30
  }>> | null | undefined;
30
31
  footer?: ReactNode;
31
32
  footerRenderer?: ComponentType<Readonly<{
32
- original: import("@vaadin/grid/src/vaadin-grid-column.js").GridColumn<TItem>;
33
+ original: GridColumn<TItem>;
33
34
  }>> | null | undefined;
34
35
  header?: ReactNode;
35
36
  headerRenderer?: ComponentType<Readonly<{
36
- original: import("@vaadin/grid/src/vaadin-grid-column.js").GridColumn<TItem>;
37
+ original: GridColumn<TItem>;
37
38
  }>> | null | undefined;
38
39
  renderer?: ComponentType<Readonly<{
39
40
  item: TItem;
40
41
  model: import("@vaadin/grid/src/vaadin-grid-mixin.js").GridItemModel<TItem>;
41
- original: import("@vaadin/grid/src/vaadin-grid-column.js").GridColumn<TItem>;
42
+ original: GridColumn<TItem>;
42
43
  }>> | null | undefined;
43
44
  }> & RefAttributes<GridProEditColumnElement<TItem>>) => ReactElement | null;
44
45
  export { ForwardedGridProEditColumn as GridProEditColumn };
@@ -1 +1 @@
1
- {"version":3,"file":"GridProEditColumn.d.ts","sourceRoot":"","sources":["src/GridProEditColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGlB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,IAAI,uBAAuB,EACvD,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAGlG,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAEvE,cAAc,kCAAkC,CAAC;AAEjD,MAAM,MAAM,sBAAsB,CAAC,KAAK,IAAI,OAAO,CACjD,IAAI,CACF,uBAAuB,CAAC,KAAK,CAAC,EAC5B,UAAU,GACV,kBAAkB,GAClB,gBAAgB,GAChB,QAAQ,GACR,gBAAgB,GAChB,UAAU,GACV,MAAM,+BAA+B,CAAC,KAAK,CAAC,CAC/C,CACF,GACC,QAAQ,CAAC;IACP,QAAQ,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;IACnE,gBAAgB,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;IAC3E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,cAAc,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;IACzE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,cAAc,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;IACzE,QAAQ,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;CACpE,CAAC,CAAC;AAoCL,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;aAzCnB,SAAS;;;;aAET,SAAS;;;;;;;;;wDAyCjB,YAAY,GAAG,IAAI,CAAC;AAEzB,OAAO,EAAE,0BAA0B,IAAI,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"GridProEditColumn.d.ts","sourceRoot":"","sources":["src/GridProEditColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGlB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,aAAa,EAEnB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAoB,UAAU,EAAmB,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,IAAI,uBAAuB,EACvD,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAGlG,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAEvE,cAAc,kCAAkC,CAAC;AAEjD,MAAM,MAAM,sBAAsB,CAAC,KAAK,IAAI,OAAO,CACjD,IAAI,CACF,uBAAuB,CAAC,KAAK,CAAC,EAC5B,UAAU,GACV,kBAAkB,GAClB,gBAAgB,GAChB,QAAQ,GACR,gBAAgB,GAChB,UAAU,GACV,MAAM,+BAA+B,CAAC,KAAK,CAAC,CAC/C,CACF,GACC,QAAQ,CAAC;IACP,QAAQ,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;IACnE,gBAAgB,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;IAC3E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,cAAc,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;IACzE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,cAAc,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;IACzE,QAAQ,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;CACpE,CAAC,CAAC;AAwGL,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;aA7GnB,SAAS;;;;aAET,SAAS;;;;;;;;;wDA6GjB,YAAY,GAAG,IAAI,CAAC;AAEzB,OAAO,EAAE,0BAA0B,IAAI,iBAAiB,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- export*from"@vaadin/grid-pro/vaadin-grid-pro-edit-column.js";import{forwardRef as f}from"react";import{GridProEditColumn as C}from"@vaadin/grid-pro/vaadin-grid-pro-edit-column.js";import*as G from"react";import{createComponent as y}from"./utils/createComponent.js";var c={onEditorTypeChanged:"editor-type-changed"},r=y({elementClass:C,events:c,react:G,tagName:"vaadin-grid-pro-edit-column"});import{useModelRenderer as t}from"./renderers/useModelRenderer.js";import{useSimpleOrChildrenRenderer as o}from"./renderers/useSimpleOrChildrenRenderer.js";import{jsxs as I}from"react/jsx-runtime";function T({children:d,footer:n,header:i,...e},m){let[l,p]=t(e.editModeRenderer,{renderSync:!0}),[a,u]=o(e.headerRenderer,i,{renderSync:!0}),[R,s]=o(e.footerRenderer,n,{renderSync:!0}),[P,E]=t(e.renderer??d,{renderSync:!0});return I(r,{...e,editModeRenderer:p,footerRenderer:s,headerRenderer:u,ref:m,renderer:E,children:[l,a,R,P]})}var N=f(T);export{N as GridProEditColumn,C as GridProEditColumnElement};
1
+ export*from"@vaadin/grid-pro/vaadin-grid-pro-edit-column.js";import{forwardRef as _,createElement as I}from"react";import{GridProEditColumn as c}from"@vaadin/grid-pro/vaadin-grid-pro-edit-column.js";import*as y from"react";import{createComponent as f}from"./utils/createComponent.js";var T={onEditorTypeChanged:"editor-type-changed"},i=f({elementClass:c,events:T,react:y,tagName:"vaadin-grid-pro-edit-column"});import{useModelRenderer as l}from"./renderers/useModelRenderer.js";import{useSimpleOrChildrenRenderer as m}from"./renderers/useSimpleOrChildrenRenderer.js";import{jsxs as h}from"react/jsx-runtime";function a(e){if(e)return e.__wrapperRenderer||=function(r){return"__renderEmpty"in r.model?null:I(e,r)},e.__wrapperRenderer}function p(e){if(e)return e.__wrapperRenderer||=(n,r,t)=>{r.__originalClearCellContent||(r.__originalClearCellContent=r._clearCellContent,r._clearCellContent=o=>{let d=o._content;d.__editColumnRenderer?.(d,r,Object.assign({},t,{__renderEmpty:!0})),r.__originalClearCellContent?.(o)}),n.__editColumnRenderer=e,e(n,r,t)},e.__wrapperRenderer}function g({children:e,footer:n,header:r,...t},o){let[d,u]=l(a(t.editModeRenderer),{renderSync:!0}),[C,R]=m(t.headerRenderer,r,{renderSync:!0}),[E,s]=m(t.footerRenderer,n,{renderSync:!0}),[P,G]=l(a(t.renderer??e),{renderSync:!0});return h(i,{...t,editModeRenderer:p(u),footerRenderer:s,headerRenderer:R,ref:o,renderer:p(G),children:[d,C,E,P]})}var N=_(g);export{N as GridProEditColumn,c as GridProEditColumnElement};
2
2
  //# sourceMappingURL=GridProEditColumn.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["src/GridProEditColumn.tsx", "src/generated/GridProEditColumn.ts"],
4
- "sourcesContent": ["export * from \"@vaadin/grid-pro/vaadin-grid-pro-edit-column.js\";\nimport {\n type ComponentType,\n type ForwardedRef,\n forwardRef,\n type ReactElement,\n type ReactNode,\n type RefAttributes,\n} from 'react';\nimport type { GridDefaultItem } from './generated/Grid.js';\nimport {\n GridProEditColumn as _GridProEditColumn,\n type GridProEditColumnElement,\n type GridProEditColumnProps as _GridProEditColumnProps,\n} from './generated/GridProEditColumn.js';\nimport type { GridBodyReactRendererProps, GridEdgeReactRendererProps } from './renderers/grid.js';\nimport { useModelRenderer } from './renderers/useModelRenderer.js';\nimport { useSimpleOrChildrenRenderer } from './renderers/useSimpleOrChildrenRenderer.js';\nimport type { OmittedGridColumnHTMLAttributes } from './GridColumn.js';\n\nexport * from './generated/GridProEditColumn.js';\n\nexport type GridProEditColumnProps<TItem> = Partial<\n Omit<\n _GridProEditColumnProps<TItem>,\n | 'children'\n | 'editModeRenderer'\n | 'footerRenderer'\n | 'header'\n | 'headerRenderer'\n | 'renderer'\n | keyof OmittedGridColumnHTMLAttributes<TItem>\n >\n> &\n Readonly<{\n children?: ComponentType<GridBodyReactRendererProps<TItem>> | null;\n editModeRenderer?: ComponentType<GridBodyReactRendererProps<TItem>> | null;\n footer?: ReactNode;\n footerRenderer?: ComponentType<GridEdgeReactRendererProps<TItem>> | null;\n header?: ReactNode;\n headerRenderer?: ComponentType<GridEdgeReactRendererProps<TItem>> | null;\n renderer?: ComponentType<GridBodyReactRendererProps<TItem>> | null;\n }>;\n\nfunction GridProEditColumn<TItem = GridDefaultItem>(\n { children, footer, header, ...props }: GridProEditColumnProps<TItem>,\n ref: ForwardedRef<GridProEditColumnElement<TItem>>,\n): ReactElement | null {\n const [editModePortals, editModeRenderer] = useModelRenderer(props.editModeRenderer, {\n renderSync: true,\n });\n const [headerPortals, headerRenderer] = useSimpleOrChildrenRenderer(props.headerRenderer, header, {\n renderSync: true,\n });\n const [footerPortals, footerRenderer] = useSimpleOrChildrenRenderer(props.footerRenderer, footer, {\n renderSync: true,\n });\n const [bodyPortals, bodyRenderer] = useModelRenderer(props.renderer ?? children, {\n renderSync: true,\n });\n\n return (\n <_GridProEditColumn<TItem>\n {...props}\n editModeRenderer={editModeRenderer}\n footerRenderer={footerRenderer}\n headerRenderer={headerRenderer}\n ref={ref}\n renderer={bodyRenderer}\n >\n {editModePortals}\n {headerPortals}\n {footerPortals}\n {bodyPortals}\n </_GridProEditColumn>\n );\n}\n\nconst ForwardedGridProEditColumn = forwardRef(GridProEditColumn) as <TItem = GridDefaultItem>(\n props: GridProEditColumnProps<TItem> & RefAttributes<GridProEditColumnElement<TItem>>,\n) => ReactElement | null;\n\nexport { ForwardedGridProEditColumn as GridProEditColumn };\n", "import type { EventName } from \"@lit/react\";\nimport { GridProEditColumn as GridProEditColumnElement, } from \"@vaadin/grid-pro/vaadin-grid-pro-edit-column.js\";\nimport * as React from \"react\";\nimport { createComponent, type WebComponentProps } from \"../utils/createComponent.js\";\nexport { GridProEditColumnElement, };\nexport type GridProEditColumnEventMap<T1> = Readonly<{\n onEditorTypeChanged: EventName<CustomEvent<unknown>>;\n}>;\nconst events = { onEditorTypeChanged: \"editor-type-changed\" } as GridProEditColumnEventMap<unknown>;\nexport type GridProEditColumnProps<T1> = WebComponentProps<GridProEditColumnElement<T1>, GridProEditColumnEventMap<T1>>;\nexport const GridProEditColumn = createComponent({\n elementClass: GridProEditColumnElement, events, react: React, tagName: \"vaadin-grid-pro-edit-column\"\n}) as <T1>(props: GridProEditColumnProps<T1> & React.RefAttributes<GridProEditColumnElement<T1>>) => React.ReactElement | null;\n"],
5
- "mappings": "AAAA,WAAc,kDACd,OAGE,cAAAA,MAIK,QCPP,OAAS,qBAAqBC,MAAiC,kDAC/D,UAAYC,MAAW,QACvB,OAAS,mBAAAC,MAA+C,6BAKxD,IAAMC,EAAS,CAAE,oBAAqB,qBAAsB,EAE/CC,EAAoBC,EAAgB,CAC7C,aAAcC,EAA0B,OAAAH,EAAQ,MAAOI,EAAO,QAAS,6BAC3E,CAAC,EDID,OAAS,oBAAAC,MAAwB,kCACjC,OAAS,+BAAAC,MAAmC,6CA6CxC,eAAAC,MAAA,oBAlBJ,SAASC,EACP,CAAE,SAAAC,EAAU,OAAAC,EAAQ,OAAAC,EAAQ,GAAGC,CAAM,EACrCC,EACqB,CACrB,GAAM,CAACC,EAAiBC,CAAgB,EAAIV,EAAiBO,EAAM,iBAAkB,CACnF,WAAY,EACd,CAAC,EACK,CAACI,EAAeC,CAAc,EAAIX,EAA4BM,EAAM,eAAgBD,EAAQ,CAChG,WAAY,EACd,CAAC,EACK,CAACO,EAAeC,CAAc,EAAIb,EAA4BM,EAAM,eAAgBF,EAAQ,CAChG,WAAY,EACd,CAAC,EACK,CAACU,EAAaC,CAAY,EAAIhB,EAAiBO,EAAM,UAAYH,EAAU,CAC/E,WAAY,EACd,CAAC,EAED,OACEF,EAACC,EAAA,CACE,GAAGI,EACJ,iBAAkBG,EAClB,eAAgBI,EAChB,eAAgBF,EAChB,IAAKJ,EACL,SAAUQ,EAET,UAAAP,EACAE,EACAE,EACAE,GACH,CAEJ,CAEA,IAAME,EAA6BC,EAAWf,CAAiB",
6
- "names": ["forwardRef", "GridProEditColumnElement", "React", "createComponent", "events", "GridProEditColumn", "createComponent", "GridProEditColumnElement", "React", "useModelRenderer", "useSimpleOrChildrenRenderer", "jsxs", "GridProEditColumn", "children", "footer", "header", "props", "ref", "editModePortals", "editModeRenderer", "headerPortals", "headerRenderer", "footerPortals", "footerRenderer", "bodyPortals", "bodyRenderer", "ForwardedGridProEditColumn", "forwardRef"]
4
+ "sourcesContent": ["export * from \"@vaadin/grid-pro/vaadin-grid-pro-edit-column.js\";\nimport {\n type ComponentType,\n type ForwardedRef,\n forwardRef,\n type ReactElement,\n type ReactNode,\n type RefAttributes,\n createElement,\n} from 'react';\nimport type { GridBodyRenderer, GridColumn, GridDefaultItem } from './generated/Grid.js';\nimport {\n GridProEditColumn as _GridProEditColumn,\n type GridProEditColumnElement,\n type GridProEditColumnProps as _GridProEditColumnProps,\n} from './generated/GridProEditColumn.js';\nimport type { GridBodyReactRendererProps, GridEdgeReactRendererProps } from './renderers/grid.js';\nimport { useModelRenderer } from './renderers/useModelRenderer.js';\nimport { useSimpleOrChildrenRenderer } from './renderers/useSimpleOrChildrenRenderer.js';\nimport type { OmittedGridColumnHTMLAttributes } from './GridColumn.js';\n\nexport * from './generated/GridProEditColumn.js';\n\nexport type GridProEditColumnProps<TItem> = Partial<\n Omit<\n _GridProEditColumnProps<TItem>,\n | 'children'\n | 'editModeRenderer'\n | 'footerRenderer'\n | 'header'\n | 'headerRenderer'\n | 'renderer'\n | keyof OmittedGridColumnHTMLAttributes<TItem>\n >\n> &\n Readonly<{\n children?: ComponentType<GridBodyReactRendererProps<TItem>> | null;\n editModeRenderer?: ComponentType<GridBodyReactRendererProps<TItem>> | null;\n footer?: ReactNode;\n footerRenderer?: ComponentType<GridEdgeReactRendererProps<TItem>> | null;\n header?: ReactNode;\n headerRenderer?: ComponentType<GridEdgeReactRendererProps<TItem>> | null;\n renderer?: ComponentType<GridBodyReactRendererProps<TItem>> | null;\n }>;\n\ntype ReactBodyRenderer<TItem> = ComponentType<GridBodyReactRendererProps<TItem>> & {\n __wrapperRenderer?: ReactBodyRenderer<TItem>;\n};\n\ntype EditColumnRendererRoot = HTMLElement & { __editColumnRenderer?: GridBodyRenderer };\n\ntype ClearFunction = (arg0: HTMLElement & { _content: EditColumnRendererRoot }) => void;\n\n/**\n * Wraps a React renderer function to render empty when requested\n *\n * @returns\n */\nfunction editColumnReactRenderer<TItem>(reactBodyRenderer?: ReactBodyRenderer<TItem> | null) {\n if (!reactBodyRenderer) {\n return undefined;\n }\n\n reactBodyRenderer.__wrapperRenderer ||= function GridProEditColumnRenderer(props) {\n // If the model has __renderEmpty set, return null, otherwise call the original renderer\n return '__renderEmpty' in props.model ? null : createElement(reactBodyRenderer, props);\n };\n\n return reactBodyRenderer.__wrapperRenderer;\n}\n\n/**\n * Wraps a Grid body renderer function to make it request empty render before\n * the GridPro edit column clears cell content.\n */\nfunction editColumnRenderer(bodyRenderer?: (GridBodyRenderer & { __wrapperRenderer?: GridBodyRenderer }) | null) {\n if (!bodyRenderer) {\n return undefined;\n }\n\n bodyRenderer.__wrapperRenderer ||= (\n root: EditColumnRendererRoot,\n column: GridColumn & {\n __originalClearCellContent?: ClearFunction;\n _clearCellContent?: ClearFunction;\n },\n model,\n ) => {\n // Patch the column's _clearCellContent function which is called internally by grid-pro\n // when switching from edit mode to view mode and vice versa\n if (!column.__originalClearCellContent) {\n column.__originalClearCellContent = column._clearCellContent;\n\n column._clearCellContent = (cell) => {\n const cellRoot = cell._content;\n // Call the original renderer with __renderEmpty set to true to clear the content it manages\n cellRoot.__editColumnRenderer?.(cellRoot, column, Object.assign({}, model, { __renderEmpty: true }));\n // Call the original clearCellContent function to manually clear the cell content\n column.__originalClearCellContent?.(cell);\n };\n }\n\n // Update the cell content's renderer reference so that the correct one is used\n // to render empty when the cell is cleared\n root.__editColumnRenderer = bodyRenderer;\n\n // Call the original renderer\n bodyRenderer(root, column, model);\n };\n\n return bodyRenderer.__wrapperRenderer;\n}\n\nfunction GridProEditColumn<TItem = GridDefaultItem>(\n { children, footer, header, ...props }: GridProEditColumnProps<TItem>,\n ref: ForwardedRef<GridProEditColumnElement<TItem>>,\n): ReactElement | null {\n const [editModePortals, editModeRenderer] = useModelRenderer(editColumnReactRenderer(props.editModeRenderer), {\n renderSync: true,\n });\n const [headerPortals, headerRenderer] = useSimpleOrChildrenRenderer(props.headerRenderer, header, {\n renderSync: true,\n });\n const [footerPortals, footerRenderer] = useSimpleOrChildrenRenderer(props.footerRenderer, footer, {\n renderSync: true,\n });\n const [bodyPortals, bodyRenderer] = useModelRenderer(editColumnReactRenderer(props.renderer ?? children), {\n renderSync: true,\n });\n\n return (\n <_GridProEditColumn<TItem>\n {...props}\n editModeRenderer={editColumnRenderer(editModeRenderer)}\n footerRenderer={footerRenderer}\n headerRenderer={headerRenderer}\n ref={ref}\n renderer={editColumnRenderer(bodyRenderer)}\n >\n {editModePortals}\n {headerPortals}\n {footerPortals}\n {bodyPortals}\n </_GridProEditColumn>\n );\n}\n\nconst ForwardedGridProEditColumn = forwardRef(GridProEditColumn) as <TItem = GridDefaultItem>(\n props: GridProEditColumnProps<TItem> & RefAttributes<GridProEditColumnElement<TItem>>,\n) => ReactElement | null;\n\nexport { ForwardedGridProEditColumn as GridProEditColumn };\n", "import type { EventName } from \"@lit/react\";\nimport { GridProEditColumn as GridProEditColumnElement, } from \"@vaadin/grid-pro/vaadin-grid-pro-edit-column.js\";\nimport * as React from \"react\";\nimport { createComponent, type WebComponentProps } from \"../utils/createComponent.js\";\nexport { GridProEditColumnElement, };\nexport type GridProEditColumnEventMap<T1> = Readonly<{\n onEditorTypeChanged: EventName<CustomEvent<unknown>>;\n}>;\nconst events = { onEditorTypeChanged: \"editor-type-changed\" } as GridProEditColumnEventMap<unknown>;\nexport type GridProEditColumnProps<T1> = WebComponentProps<GridProEditColumnElement<T1>, GridProEditColumnEventMap<T1>>;\nexport const GridProEditColumn = createComponent({\n elementClass: GridProEditColumnElement, events, react: React, tagName: \"vaadin-grid-pro-edit-column\"\n}) as <T1>(props: GridProEditColumnProps<T1> & React.RefAttributes<GridProEditColumnElement<T1>>) => React.ReactElement | null;\n"],
5
+ "mappings": "AAAA,WAAc,kDACd,OAGE,cAAAA,EAIA,iBAAAC,MACK,QCRP,OAAS,qBAAqBC,MAAiC,kDAC/D,UAAYC,MAAW,QACvB,OAAS,mBAAAC,MAA+C,6BAKxD,IAAMC,EAAS,CAAE,oBAAqB,qBAAsB,EAE/CC,EAAoBC,EAAgB,CAC7C,aAAcC,EAA0B,OAAAH,EAAQ,MAAOI,EAAO,QAAS,6BAC3E,CAAC,EDKD,OAAS,oBAAAC,MAAwB,kCACjC,OAAS,+BAAAC,MAAmC,6CAiHxC,eAAAC,MAAA,oBAzEJ,SAASC,EAA+BC,EAAqD,CAC3F,GAAKA,EAIL,OAAAA,EAAkB,oBAAsB,SAAmCC,EAAO,CAEhF,MAAO,kBAAmBA,EAAM,MAAQ,KAAOC,EAAcF,EAAmBC,CAAK,CACvF,EAEOD,EAAkB,iBAC3B,CAMA,SAASG,EAAmBC,EAAqF,CAC/G,GAAKA,EAIL,OAAAA,EAAa,oBAAsB,CACjCC,EACAC,EAIAC,IACG,CAGED,EAAO,6BACVA,EAAO,2BAA6BA,EAAO,kBAE3CA,EAAO,kBAAqBE,GAAS,CACnC,IAAMC,EAAWD,EAAK,SAEtBC,EAAS,uBAAuBA,EAAUH,EAAQ,OAAO,OAAO,CAAC,EAAGC,EAAO,CAAE,cAAe,EAAK,CAAC,CAAC,EAEnGD,EAAO,6BAA6BE,CAAI,CAC1C,GAKFH,EAAK,qBAAuBD,EAG5BA,EAAaC,EAAMC,EAAQC,CAAK,CAClC,EAEOH,EAAa,iBACtB,CAEA,SAASM,EACP,CAAE,SAAAC,EAAU,OAAAC,EAAQ,OAAAC,EAAQ,GAAGZ,CAAM,EACrCa,EACqB,CACrB,GAAM,CAACC,EAAiBC,CAAgB,EAAIpB,EAAiBG,EAAwBE,EAAM,gBAAgB,EAAG,CAC5G,WAAY,EACd,CAAC,EACK,CAACgB,EAAeC,CAAc,EAAIrB,EAA4BI,EAAM,eAAgBY,EAAQ,CAChG,WAAY,EACd,CAAC,EACK,CAACM,EAAeC,CAAc,EAAIvB,EAA4BI,EAAM,eAAgBW,EAAQ,CAChG,WAAY,EACd,CAAC,EACK,CAACS,EAAajB,CAAY,EAAIR,EAAiBG,EAAwBE,EAAM,UAAYU,CAAQ,EAAG,CACxG,WAAY,EACd,CAAC,EAED,OACEb,EAACY,EAAA,CACE,GAAGT,EACJ,iBAAkBE,EAAmBa,CAAgB,EACrD,eAAgBI,EAChB,eAAgBF,EAChB,IAAKJ,EACL,SAAUX,EAAmBC,CAAY,EAExC,UAAAW,EACAE,EACAE,EACAE,GACH,CAEJ,CAEA,IAAMC,EAA6BC,EAAWb,CAAiB",
6
+ "names": ["forwardRef", "createElement", "GridProEditColumnElement", "React", "createComponent", "events", "GridProEditColumn", "createComponent", "GridProEditColumnElement", "React", "useModelRenderer", "useSimpleOrChildrenRenderer", "jsxs", "editColumnReactRenderer", "reactBodyRenderer", "props", "createElement", "editColumnRenderer", "bodyRenderer", "root", "column", "model", "cell", "cellRoot", "GridProEditColumn", "children", "footer", "header", "ref", "editModePortals", "editModeRenderer", "headerPortals", "headerRenderer", "footerPortals", "footerRenderer", "bodyPortals", "ForwardedGridProEditColumn", "forwardRef"]
7
7
  }
package/MenuBar.d.ts CHANGED
@@ -9,13 +9,18 @@ export type MenuBarItem = Omit<_MenuBarItem, 'component' | 'children'> & {
9
9
  component?: ReactElement | string;
10
10
  children?: Array<SubMenuItem>;
11
11
  };
12
- export type MenuBarProps = Partial<Omit<_MenuBarProps, 'items'>> & Readonly<{
12
+ export type MenuBarItemSelectedEvent = CustomEvent<{
13
+ value: MenuBarItem;
14
+ }>;
15
+ export type MenuBarProps = Partial<Omit<_MenuBarProps, 'items' | 'onItemSelected'>> & Readonly<{
13
16
  items?: Array<MenuBarItem>;
17
+ onItemSelected?: (event: MenuBarItemSelectedEvent) => void;
14
18
  }>;
15
19
  declare const ForwardedMenuBar: import("react").ForwardRefExoticComponent<Partial<Omit<Partial<import("./utils/createComponent.js").ThemedWebComponentProps<MenuBarElement, Readonly<{
16
20
  onItemSelected: import("@lit/react").EventName<import("@vaadin/menu-bar/src/vaadin-menu-bar.js").MenuBarItemSelectedEvent>;
17
- }>>>, "items">> & Readonly<{
21
+ }>>>, "items" | "onItemSelected">> & Readonly<{
18
22
  items?: MenuBarItem[] | undefined;
23
+ onItemSelected?: ((event: MenuBarItemSelectedEvent) => void) | undefined;
19
24
  }> & import("react").RefAttributes<MenuBarElement>>;
20
25
  export { ForwardedMenuBar as MenuBar };
21
26
  //# sourceMappingURL=MenuBar.d.ts.map
package/MenuBar.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"MenuBar.d.ts","sourceRoot":"","sources":["src/MenuBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,IAAI,aAAa,EAClC,KAAK,WAAW,IAAI,YAAY,EAChC,KAAK,WAAW,IAAI,YAAY,EACjC,MAAM,wBAAwB,CAAC;AAGhC,cAAc,wBAAwB,CAAC;AAEvC,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG;IACvE,SAAS,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IAElC,QAAQ,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG;IACvE,SAAS,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IAElC,QAAQ,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,GAC9D,QAAQ,CAAC;IACP,KAAK,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;CAC5B,CAAC,CAAC;AAaL,QAAA,MAAM,gBAAgB;;;;mDAAsB,CAAC;AAE7C,OAAO,EAAE,gBAAgB,IAAI,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"MenuBar.d.ts","sourceRoot":"","sources":["src/MenuBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,IAAI,aAAa,EAClC,KAAK,WAAW,IAAI,YAAY,EAChC,KAAK,WAAW,IAAI,YAAY,EACjC,MAAM,wBAAwB,CAAC;AAGhC,cAAc,wBAAwB,CAAC;AAEvC,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG;IACvE,SAAS,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IAElC,QAAQ,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG;IACvE,SAAS,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IAElC,QAAQ,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,CAAC,CAAC;AAE3E,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,gBAAgB,CAAC,CAAC,GACjF,QAAQ,CAAC;IACP,KAAK,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAE3B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI,CAAC;CAC5D,CAAC,CAAC;AAyBL,QAAA,MAAM,gBAAgB;;;;8BA1BO,wBAAwB,KAAK,IAAI;mDA0BlB,CAAC;AAE7C,OAAO,EAAE,gBAAgB,IAAI,OAAO,EAAE,CAAC"}
package/MenuBar.js CHANGED
@@ -1,2 +1,2 @@
1
- export*from"@vaadin/menu-bar/vaadin-menu-bar.js";import{forwardRef as M}from"react";import{MenuBar as m}from"@vaadin/menu-bar/vaadin-menu-bar.js";import*as o from"react";import{createComponent as p}from"./utils/createComponent.js";var u={onItemSelected:"item-selected"},t=p({elementClass:m,events:u,react:o,tagName:"vaadin-menu-bar"});import{mapItemsWithComponents as s}from"./utils/mapItemsWithComponents.js";import{jsxs as B}from"react/jsx-runtime";function i(e,n){let[r,a]=s(e.items,"vaadin-menu-bar-item");return B(t,{...e,ref:n,items:a,children:[e.children,r]})}var I=M(i);export{I as MenuBar,m as MenuBarElement};
1
+ export*from"@vaadin/menu-bar/vaadin-menu-bar.js";import{forwardRef as s}from"react";import{MenuBar as u}from"@vaadin/menu-bar/vaadin-menu-bar.js";import*as p from"react";import{createComponent as M}from"./utils/createComponent.js";var l={onItemSelected:"item-selected"},r=M({elementClass:u,events:l,react:p,tagName:"vaadin-menu-bar"});import{getOriginalItem as c,mapItemsWithComponents as i}from"./utils/mapItemsWithComponents.js";import{jsxs as B}from"react/jsx-runtime";function d(e,a){let[m,o]=i(e.items,"vaadin-menu-bar-item"),n=e.onItemSelected;return B(r,{...e,ref:a,items:o,onItemSelected:n?t=>{Object.assign(t.detail,{value:c(t.detail.value)}),n(t)}:void 0,children:[e.children,m]})}var _=s(d);export{_ as MenuBar,u as MenuBarElement};
2
2
  //# sourceMappingURL=MenuBar.js.map
package/MenuBar.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["src/MenuBar.tsx", "src/generated/MenuBar.ts"],
4
- "sourcesContent": ["export * from \"@vaadin/menu-bar/vaadin-menu-bar.js\";\nimport { type ForwardedRef, forwardRef, type ReactElement } from 'react';\nimport {\n MenuBar as _MenuBar,\n type MenuBarElement,\n type MenuBarProps as _MenuBarProps,\n type MenuBarItem as _MenuBarItem,\n type SubMenuItem as _SubMenuItem,\n} from './generated/MenuBar.js';\nimport { mapItemsWithComponents } from './utils/mapItemsWithComponents.js';\n\nexport * from './generated/MenuBar.js';\n\nexport type SubMenuItem = Omit<_SubMenuItem, 'component' | 'children'> & {\n component?: ReactElement | string;\n\n children?: Array<SubMenuItem>;\n};\n\nexport type MenuBarItem = Omit<_MenuBarItem, 'component' | 'children'> & {\n component?: ReactElement | string;\n\n children?: Array<SubMenuItem>;\n};\n\nexport type MenuBarProps = Partial<Omit<_MenuBarProps, 'items'>> &\n Readonly<{\n items?: Array<MenuBarItem>;\n }>;\n\nfunction MenuBar(props: MenuBarProps, ref: ForwardedRef<MenuBarElement>): ReactElement | null {\n const [itemPortals, webComponentItems] = mapItemsWithComponents(props.items, 'vaadin-menu-bar-item');\n\n return (\n <_MenuBar {...props} ref={ref} items={webComponentItems}>\n {props.children}\n {itemPortals}\n </_MenuBar>\n );\n}\n\nconst ForwardedMenuBar = forwardRef(MenuBar);\n\nexport { ForwardedMenuBar as MenuBar };\n", "import type { EventName } from \"@lit/react\";\nimport { MenuBar as MenuBarElement, type MenuBarEventMap as _MenuBarEventMap, } from \"@vaadin/menu-bar/vaadin-menu-bar.js\";\nimport * as React from \"react\";\nimport { createComponent, type WebComponentProps } from \"../utils/createComponent.js\";\nexport { MenuBarElement, };\nexport type MenuBarEventMap = Readonly<{\n onItemSelected: EventName<_MenuBarEventMap[\"item-selected\"]>;\n}>;\nconst events = { onItemSelected: \"item-selected\" } as MenuBarEventMap;\nexport type MenuBarProps = WebComponentProps<MenuBarElement, MenuBarEventMap>;\nexport const MenuBar = createComponent({\n elementClass: MenuBarElement, events, react: React, tagName: \"vaadin-menu-bar\"\n});\n"],
5
- "mappings": "AAAA,WAAc,sCACd,OAA4B,cAAAA,MAAqC,QCAjE,OAAS,WAAWC,MAAiE,sCACrF,UAAYC,MAAW,QACvB,OAAS,mBAAAC,MAA+C,6BAKxD,IAAMC,EAAS,CAAE,eAAgB,eAAgB,EAEpCC,EAAUC,EAAgB,CACnC,aAAcC,EAAgB,OAAAH,EAAQ,MAAOI,EAAO,QAAS,iBACjE,CAAC,EDHD,OAAS,0BAAAC,MAA8B,oCAyBnC,eAAAC,MAAA,oBAJJ,SAASC,EAAQC,EAAqBC,EAAwD,CAC5F,GAAM,CAACC,EAAaC,CAAiB,EAAIN,EAAuBG,EAAM,MAAO,sBAAsB,EAEnG,OACEF,EAACC,EAAA,CAAU,GAAGC,EAAO,IAAKC,EAAK,MAAOE,EACnC,UAAAH,EAAM,SACNE,GACH,CAEJ,CAEA,IAAME,EAAmBC,EAAWN,CAAO",
6
- "names": ["forwardRef", "MenuBarElement", "React", "createComponent", "events", "MenuBar", "createComponent", "MenuBarElement", "React", "mapItemsWithComponents", "jsxs", "MenuBar", "props", "ref", "itemPortals", "webComponentItems", "ForwardedMenuBar", "forwardRef"]
4
+ "sourcesContent": ["export * from \"@vaadin/menu-bar/vaadin-menu-bar.js\";\nimport { type ForwardedRef, forwardRef, type ReactElement } from 'react';\nimport {\n MenuBar as _MenuBar,\n type MenuBarElement,\n type MenuBarProps as _MenuBarProps,\n type MenuBarItem as _MenuBarItem,\n type SubMenuItem as _SubMenuItem,\n} from './generated/MenuBar.js';\nimport { getOriginalItem, mapItemsWithComponents } from './utils/mapItemsWithComponents.js';\n\nexport * from './generated/MenuBar.js';\n\nexport type SubMenuItem = Omit<_SubMenuItem, 'component' | 'children'> & {\n component?: ReactElement | string;\n\n children?: Array<SubMenuItem>;\n};\n\nexport type MenuBarItem = Omit<_MenuBarItem, 'component' | 'children'> & {\n component?: ReactElement | string;\n\n children?: Array<SubMenuItem>;\n};\n\nexport type MenuBarItemSelectedEvent = CustomEvent<{ value: MenuBarItem }>;\n\nexport type MenuBarProps = Partial<Omit<_MenuBarProps, 'items' | 'onItemSelected'>> &\n Readonly<{\n items?: Array<MenuBarItem>;\n\n onItemSelected?: (event: MenuBarItemSelectedEvent) => void;\n }>;\n\nfunction MenuBar(props: MenuBarProps, ref: ForwardedRef<MenuBarElement>): ReactElement | null {\n const [itemPortals, webComponentItems] = mapItemsWithComponents(props.items, 'vaadin-menu-bar-item');\n\n const onItemSelected = props.onItemSelected;\n const mappedOnItemSelected = onItemSelected\n ? (event: CustomEvent<{ value: _MenuBarItem }>) => {\n // Replace the mapped web component item with the original item\n Object.assign(event.detail, {\n value: getOriginalItem(event.detail.value),\n });\n\n onItemSelected(event as CustomEvent<{ value: MenuBarItem }>);\n }\n : undefined;\n\n return (\n <_MenuBar {...props} ref={ref} items={webComponentItems} onItemSelected={mappedOnItemSelected}>\n {props.children}\n {itemPortals}\n </_MenuBar>\n );\n}\n\nconst ForwardedMenuBar = forwardRef(MenuBar);\n\nexport { ForwardedMenuBar as MenuBar };\n", "import type { EventName } from \"@lit/react\";\nimport { MenuBar as MenuBarElement, type MenuBarEventMap as _MenuBarEventMap, } from \"@vaadin/menu-bar/vaadin-menu-bar.js\";\nimport * as React from \"react\";\nimport { createComponent, type WebComponentProps } from \"../utils/createComponent.js\";\nexport { MenuBarElement, };\nexport type MenuBarEventMap = Readonly<{\n onItemSelected: EventName<_MenuBarEventMap[\"item-selected\"]>;\n}>;\nconst events = { onItemSelected: \"item-selected\" } as MenuBarEventMap;\nexport type MenuBarProps = WebComponentProps<MenuBarElement, MenuBarEventMap>;\nexport const MenuBar = createComponent({\n elementClass: MenuBarElement, events, react: React, tagName: \"vaadin-menu-bar\"\n});\n"],
5
+ "mappings": "AAAA,WAAc,sCACd,OAA4B,cAAAA,MAAqC,QCAjE,OAAS,WAAWC,MAAiE,sCACrF,UAAYC,MAAW,QACvB,OAAS,mBAAAC,MAA+C,6BAKxD,IAAMC,EAAS,CAAE,eAAgB,eAAgB,EAEpCC,EAAUC,EAAgB,CACnC,aAAcC,EAAgB,OAAAH,EAAQ,MAAOI,EAAO,QAAS,iBACjE,CAAC,EDHD,OAAS,mBAAAC,EAAiB,0BAAAC,MAA8B,oCAyCpD,eAAAC,MAAA,oBAhBJ,SAASC,EAAQC,EAAqBC,EAAwD,CAC5F,GAAM,CAACC,EAAaC,CAAiB,EAAIN,EAAuBG,EAAM,MAAO,sBAAsB,EAE7FI,EAAiBJ,EAAM,eAY7B,OACEF,EAACC,EAAA,CAAU,GAAGC,EAAO,IAAKC,EAAK,MAAOE,EAAmB,eAZ9BC,EACxBC,GAAgD,CAE/C,OAAO,OAAOA,EAAM,OAAQ,CAC1B,MAAOT,EAAgBS,EAAM,OAAO,KAAK,CAC3C,CAAC,EAEDD,EAAeC,CAA4C,CAC7D,EACA,OAIC,UAAAL,EAAM,SACNE,GACH,CAEJ,CAEA,IAAMI,EAAmBC,EAAWR,CAAO",
6
+ "names": ["forwardRef", "MenuBarElement", "React", "createComponent", "events", "MenuBar", "createComponent", "MenuBarElement", "React", "getOriginalItem", "mapItemsWithComponents", "jsxs", "MenuBar", "props", "ref", "itemPortals", "webComponentItems", "onItemSelected", "event", "ForwardedMenuBar", "forwardRef"]
7
7
  }
package/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  // Workaround for VSCode, enables TypeScript auto-imports form package.json
2
2
  import "./AccordionHeading.js";
3
+ import "./Accordion.js";
3
4
  import "./AccordionPanel.js";
4
5
  import "./AppLayout.js";
5
- import "./Accordion.js";
6
6
  import "./DrawerToggle.js";
7
7
  import "./Avatar.js";
8
8
  import "./AvatarGroup.js";
@@ -13,8 +13,8 @@ import "./Chart.js";
13
13
  import "./ChartSeries.js";
14
14
  import "./Checkbox.js";
15
15
  import "./CheckboxGroup.js";
16
- import "./ComboBoxLight.js";
17
16
  import "./ComboBox.js";
17
+ import "./ComboBoxLight.js";
18
18
  import "./ConfirmDialog.js";
19
19
  import "./ContextMenu.js";
20
20
  import "./CookieConsent.js";
@@ -67,8 +67,8 @@ import "./RichTextEditor.js";
67
67
  import "./Scroller.js";
68
68
  import "./Select.js";
69
69
  import "./SideNavItem.js";
70
- import "./SideNav.js";
71
70
  import "./SplitLayout.js";
71
+ import "./SideNav.js";
72
72
  import "./Tab.js";
73
73
  import "./Tabs.js";
74
74
  import "./TabSheet.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/react-components",
3
- "version": "24.4.0-alpha3",
3
+ "version": "24.4.0-alpha5",
4
4
  "description": "React wrappers for Vaadin components",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -39,70 +39,70 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@lit/react": "^1.0.0",
42
- "@vaadin/a11y-base": "24.4.0-alpha3",
43
- "@vaadin/accordion": "24.4.0-alpha3",
44
- "@vaadin/app-layout": "24.4.0-alpha3",
45
- "@vaadin/avatar": "24.4.0-alpha3",
46
- "@vaadin/avatar-group": "24.4.0-alpha3",
47
- "@vaadin/board": "24.4.0-alpha3",
48
- "@vaadin/button": "24.4.0-alpha3",
49
- "@vaadin/charts": "24.4.0-alpha3",
50
- "@vaadin/checkbox": "24.4.0-alpha3",
51
- "@vaadin/checkbox-group": "24.4.0-alpha3",
52
- "@vaadin/combo-box": "24.4.0-alpha3",
53
- "@vaadin/component-base": "24.4.0-alpha3",
54
- "@vaadin/confirm-dialog": "24.4.0-alpha3",
55
- "@vaadin/context-menu": "24.4.0-alpha3",
56
- "@vaadin/cookie-consent": "24.4.0-alpha3",
57
- "@vaadin/crud": "24.4.0-alpha3",
58
- "@vaadin/custom-field": "24.4.0-alpha3",
59
- "@vaadin/date-picker": "24.4.0-alpha3",
60
- "@vaadin/date-time-picker": "24.4.0-alpha3",
61
- "@vaadin/details": "24.4.0-alpha3",
62
- "@vaadin/dialog": "24.4.0-alpha3",
63
- "@vaadin/email-field": "24.4.0-alpha3",
64
- "@vaadin/field-base": "24.4.0-alpha3",
65
- "@vaadin/field-highlighter": "24.4.0-alpha3",
66
- "@vaadin/form-layout": "24.4.0-alpha3",
67
- "@vaadin/grid": "24.4.0-alpha3",
68
- "@vaadin/grid-pro": "24.4.0-alpha3",
69
- "@vaadin/horizontal-layout": "24.4.0-alpha3",
70
- "@vaadin/icon": "24.4.0-alpha3",
71
- "@vaadin/icons": "24.4.0-alpha3",
72
- "@vaadin/input-container": "24.4.0-alpha3",
73
- "@vaadin/integer-field": "24.4.0-alpha3",
74
- "@vaadin/item": "24.4.0-alpha3",
75
- "@vaadin/list-box": "24.4.0-alpha3",
76
- "@vaadin/lit-renderer": "24.4.0-alpha3",
77
- "@vaadin/login": "24.4.0-alpha3",
78
- "@vaadin/map": "24.4.0-alpha3",
79
- "@vaadin/menu-bar": "24.4.0-alpha3",
80
- "@vaadin/message-input": "24.4.0-alpha3",
81
- "@vaadin/message-list": "24.4.0-alpha3",
82
- "@vaadin/multi-select-combo-box": "24.4.0-alpha3",
83
- "@vaadin/notification": "24.4.0-alpha3",
84
- "@vaadin/number-field": "24.4.0-alpha3",
85
- "@vaadin/overlay": "24.4.0-alpha3",
86
- "@vaadin/password-field": "24.4.0-alpha3",
87
- "@vaadin/progress-bar": "24.4.0-alpha3",
88
- "@vaadin/radio-group": "24.4.0-alpha3",
89
- "@vaadin/rich-text-editor": "24.4.0-alpha3",
90
- "@vaadin/scroller": "24.4.0-alpha3",
91
- "@vaadin/select": "24.4.0-alpha3",
92
- "@vaadin/side-nav": "24.4.0-alpha3",
93
- "@vaadin/split-layout": "24.4.0-alpha3",
94
- "@vaadin/tabs": "24.4.0-alpha3",
95
- "@vaadin/tabsheet": "24.4.0-alpha3",
96
- "@vaadin/text-area": "24.4.0-alpha3",
97
- "@vaadin/text-field": "24.4.0-alpha3",
98
- "@vaadin/time-picker": "24.4.0-alpha3",
99
- "@vaadin/tooltip": "24.4.0-alpha3",
100
- "@vaadin/upload": "24.4.0-alpha3",
101
- "@vaadin/vaadin-lumo-styles": "24.4.0-alpha3",
102
- "@vaadin/vaadin-material-styles": "24.4.0-alpha3",
103
- "@vaadin/vaadin-themable-mixin": "24.4.0-alpha3",
104
- "@vaadin/vertical-layout": "24.4.0-alpha3",
105
- "@vaadin/virtual-list": "24.4.0-alpha3"
42
+ "@vaadin/a11y-base": "24.4.0-alpha5",
43
+ "@vaadin/accordion": "24.4.0-alpha5",
44
+ "@vaadin/app-layout": "24.4.0-alpha5",
45
+ "@vaadin/avatar": "24.4.0-alpha5",
46
+ "@vaadin/avatar-group": "24.4.0-alpha5",
47
+ "@vaadin/board": "24.4.0-alpha5",
48
+ "@vaadin/button": "24.4.0-alpha5",
49
+ "@vaadin/charts": "24.4.0-alpha5",
50
+ "@vaadin/checkbox": "24.4.0-alpha5",
51
+ "@vaadin/checkbox-group": "24.4.0-alpha5",
52
+ "@vaadin/combo-box": "24.4.0-alpha5",
53
+ "@vaadin/component-base": "24.4.0-alpha5",
54
+ "@vaadin/confirm-dialog": "24.4.0-alpha5",
55
+ "@vaadin/context-menu": "24.4.0-alpha5",
56
+ "@vaadin/cookie-consent": "24.4.0-alpha5",
57
+ "@vaadin/crud": "24.4.0-alpha5",
58
+ "@vaadin/custom-field": "24.4.0-alpha5",
59
+ "@vaadin/date-picker": "24.4.0-alpha5",
60
+ "@vaadin/date-time-picker": "24.4.0-alpha5",
61
+ "@vaadin/details": "24.4.0-alpha5",
62
+ "@vaadin/dialog": "24.4.0-alpha5",
63
+ "@vaadin/email-field": "24.4.0-alpha5",
64
+ "@vaadin/field-base": "24.4.0-alpha5",
65
+ "@vaadin/field-highlighter": "24.4.0-alpha5",
66
+ "@vaadin/form-layout": "24.4.0-alpha5",
67
+ "@vaadin/grid": "24.4.0-alpha5",
68
+ "@vaadin/grid-pro": "24.4.0-alpha5",
69
+ "@vaadin/horizontal-layout": "24.4.0-alpha5",
70
+ "@vaadin/icon": "24.4.0-alpha5",
71
+ "@vaadin/icons": "24.4.0-alpha5",
72
+ "@vaadin/input-container": "24.4.0-alpha5",
73
+ "@vaadin/integer-field": "24.4.0-alpha5",
74
+ "@vaadin/item": "24.4.0-alpha5",
75
+ "@vaadin/list-box": "24.4.0-alpha5",
76
+ "@vaadin/lit-renderer": "24.4.0-alpha5",
77
+ "@vaadin/login": "24.4.0-alpha5",
78
+ "@vaadin/map": "24.4.0-alpha5",
79
+ "@vaadin/menu-bar": "24.4.0-alpha5",
80
+ "@vaadin/message-input": "24.4.0-alpha5",
81
+ "@vaadin/message-list": "24.4.0-alpha5",
82
+ "@vaadin/multi-select-combo-box": "24.4.0-alpha5",
83
+ "@vaadin/notification": "24.4.0-alpha5",
84
+ "@vaadin/number-field": "24.4.0-alpha5",
85
+ "@vaadin/overlay": "24.4.0-alpha5",
86
+ "@vaadin/password-field": "24.4.0-alpha5",
87
+ "@vaadin/progress-bar": "24.4.0-alpha5",
88
+ "@vaadin/radio-group": "24.4.0-alpha5",
89
+ "@vaadin/rich-text-editor": "24.4.0-alpha5",
90
+ "@vaadin/scroller": "24.4.0-alpha5",
91
+ "@vaadin/select": "24.4.0-alpha5",
92
+ "@vaadin/side-nav": "24.4.0-alpha5",
93
+ "@vaadin/split-layout": "24.4.0-alpha5",
94
+ "@vaadin/tabs": "24.4.0-alpha5",
95
+ "@vaadin/tabsheet": "24.4.0-alpha5",
96
+ "@vaadin/text-area": "24.4.0-alpha5",
97
+ "@vaadin/text-field": "24.4.0-alpha5",
98
+ "@vaadin/time-picker": "24.4.0-alpha5",
99
+ "@vaadin/tooltip": "24.4.0-alpha5",
100
+ "@vaadin/upload": "24.4.0-alpha5",
101
+ "@vaadin/vaadin-lumo-styles": "24.4.0-alpha5",
102
+ "@vaadin/vaadin-material-styles": "24.4.0-alpha5",
103
+ "@vaadin/vaadin-themable-mixin": "24.4.0-alpha5",
104
+ "@vaadin/vertical-layout": "24.4.0-alpha5",
105
+ "@vaadin/virtual-list": "24.4.0-alpha5"
106
106
  },
107
107
  "author": "Vaadin Ltd.",
108
108
  "license": "Apache-2.0",
@@ -1,2 +1,2 @@
1
- import{createComponent as n}from"@lit/react";window.Vaadin??={},window.Vaadin.registrations??=[],window.Vaadin.registrations.push({is:"@vaadin/react-components",version:"24.4.0-alpha3"});function s(e){const{elementClass:t}=e;return n("_properties"in t?{...e,elementClass:{name:t.name,prototype:{...t._properties,hidden:Boolean}}}:e)}export{s as createComponent};
1
+ import{createComponent as n}from"@lit/react";window.Vaadin??={},window.Vaadin.registrations??=[],window.Vaadin.registrations.push({is:"@vaadin/react-components",version:"24.4.0-alpha5"});function s(e){const{elementClass:t}=e;return n("_properties"in t?{...e,elementClass:{name:t.name,prototype:{...t._properties,hidden:Boolean}}}:e)}export{s as createComponent};
2
2
  //# sourceMappingURL=createComponent.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/utils/createComponent.ts"],
4
- "sourcesContent": ["import { createComponent as _createComponent, type EventName } from '@lit/react';\nimport type { ThemePropertyMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';\nimport type React from 'react';\nimport type { RefAttributes } from 'react';\n\ndeclare const __VERSION__: string;\n\ndeclare global {\n interface VaadinRegistration {\n is: string;\n version: string;\n }\n\n interface Vaadin {\n registrations?: VaadinRegistration[];\n }\n\n interface Window {\n // @ts-expect-error: Different declaration from one of the dependencies.\n Vaadin?: Vaadin;\n }\n}\n\nwindow.Vaadin ??= {};\nwindow.Vaadin.registrations ??= [];\nwindow.Vaadin.registrations.push({\n is: '@vaadin/react-components',\n version: /* updated-by-script */ '24.4.0-alpha3',\n});\n\n// TODO: Remove when types from @lit-labs/react are exported\nexport type EventNames = Record<string, EventName | string>;\ntype Constructor<T> = { new (): T; name: string };\ntype PolymerConstructor<T> = Constructor<T> & { _properties: Record<string, unknown> };\ntype Options<I extends HTMLElement, E extends EventNames = {}> = Readonly<{\n displayName?: string;\n elementClass: Constructor<I> | PolymerConstructor<I>;\n events?: E;\n react: typeof window.React;\n tagName: string;\n}>;\n\n// A map of expected event listener types based on EventNames.\ntype EventListeners<R extends EventNames> = {\n [K in keyof R]?: R[K] extends EventName ? (e: R[K]['__eventType']) => void : (e: Event) => void;\n};\n\n// Props derived from custom element class. Currently has limitations of making\n// all properties optional and also surfaces life cycle methods in autocomplete.\n// TODO: LoginOverlay has \"autofocus\" property, so we add it back manually.\ntype ElementProps<I> = Partial<Omit<I, keyof HTMLElement>> & { autofocus?: boolean };\n\n// Acceptable props to the React component.\ntype ComponentProps<I, E extends EventNames = {}> = Omit<\n React.HTMLAttributes<I>,\n // Prefer type of provided event handler props or those on element over\n // built-in HTMLAttributes\n keyof E | keyof ElementProps<I>\n> &\n EventListeners<E> &\n ElementProps<I>;\n\nexport type ThemedWebComponentProps<\n I extends ThemePropertyMixinClass & HTMLElement,\n E extends EventNames = {},\n> = ComponentProps<I, E> & {\n /**\n * Attribute that can be used by the component to apply built-in style variants,\n * or to propagate its value to the sub-components in Shadow DOM.\n *\n * @see ThemePropertyMixinClass#_theme\n */\n theme?: string;\n};\n\ntype AllWebComponentProps<I extends HTMLElement, E extends EventNames = {}> = I extends ThemePropertyMixinClass\n ? ThemedWebComponentProps<I, E>\n : ComponentProps<I, E>;\n\nexport type WebComponentProps<I extends HTMLElement, E extends EventNames = {}> = Partial<AllWebComponentProps<I, E>>;\n\n// We need a separate declaration here; otherwise, the TypeScript fails into the\n// endless loop trying to resolve the typings.\nexport function createComponent<I extends HTMLElement, E extends EventNames = {}>(\n options: Options<I, E>,\n): (props: WebComponentProps<I, E> & RefAttributes<I>) => React.ReactElement | null;\n\nexport function createComponent<I extends HTMLElement, E extends EventNames = {}>(options: Options<I, E>): any {\n const { elementClass } = options;\n\n return _createComponent(\n '_properties' in elementClass\n ? {\n ...options,\n // TODO: improve or remove the Polymer workaround\n // 'createComponent' relies on key presence on the custom element class,\n // but Polymer defines properties on the prototype when the first element\n // is created. Workaround: pass a mock object with properties in\n // the prototype.\n elementClass: {\n // @ts-expect-error: it is a specific workaround for Polymer classes.\n name: elementClass.name,\n prototype: { ...elementClass._properties, hidden: Boolean },\n },\n }\n : options,\n );\n}\n"],
4
+ "sourcesContent": ["import { createComponent as _createComponent, type EventName } from '@lit/react';\nimport type { ThemePropertyMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';\nimport type React from 'react';\nimport type { RefAttributes } from 'react';\n\ndeclare const __VERSION__: string;\n\ndeclare global {\n interface VaadinRegistration {\n is: string;\n version: string;\n }\n\n interface Vaadin {\n registrations?: VaadinRegistration[];\n }\n\n interface Window {\n // @ts-expect-error: Different declaration from one of the dependencies.\n Vaadin?: Vaadin;\n }\n}\n\nwindow.Vaadin ??= {};\nwindow.Vaadin.registrations ??= [];\nwindow.Vaadin.registrations.push({\n is: '@vaadin/react-components',\n version: /* updated-by-script */ '24.4.0-alpha5',\n});\n\n// TODO: Remove when types from @lit-labs/react are exported\nexport type EventNames = Record<string, EventName | string>;\ntype Constructor<T> = { new (): T; name: string };\ntype PolymerConstructor<T> = Constructor<T> & { _properties: Record<string, unknown> };\ntype Options<I extends HTMLElement, E extends EventNames = {}> = Readonly<{\n displayName?: string;\n elementClass: Constructor<I> | PolymerConstructor<I>;\n events?: E;\n react: typeof window.React;\n tagName: string;\n}>;\n\n// A map of expected event listener types based on EventNames.\ntype EventListeners<R extends EventNames> = {\n [K in keyof R]?: R[K] extends EventName ? (e: R[K]['__eventType']) => void : (e: Event) => void;\n};\n\n// Props derived from custom element class. Currently has limitations of making\n// all properties optional and also surfaces life cycle methods in autocomplete.\n// TODO: LoginOverlay has \"autofocus\" property, so we add it back manually.\ntype ElementProps<I> = Partial<Omit<I, keyof HTMLElement>> & { autofocus?: boolean };\n\n// Acceptable props to the React component.\ntype ComponentProps<I, E extends EventNames = {}> = Omit<\n React.HTMLAttributes<I>,\n // Prefer type of provided event handler props or those on element over\n // built-in HTMLAttributes\n keyof E | keyof ElementProps<I>\n> &\n EventListeners<E> &\n ElementProps<I>;\n\nexport type ThemedWebComponentProps<\n I extends ThemePropertyMixinClass & HTMLElement,\n E extends EventNames = {},\n> = ComponentProps<I, E> & {\n /**\n * Attribute that can be used by the component to apply built-in style variants,\n * or to propagate its value to the sub-components in Shadow DOM.\n *\n * @see ThemePropertyMixinClass#_theme\n */\n theme?: string;\n};\n\ntype AllWebComponentProps<I extends HTMLElement, E extends EventNames = {}> = I extends ThemePropertyMixinClass\n ? ThemedWebComponentProps<I, E>\n : ComponentProps<I, E>;\n\nexport type WebComponentProps<I extends HTMLElement, E extends EventNames = {}> = Partial<AllWebComponentProps<I, E>>;\n\n// We need a separate declaration here; otherwise, the TypeScript fails into the\n// endless loop trying to resolve the typings.\nexport function createComponent<I extends HTMLElement, E extends EventNames = {}>(\n options: Options<I, E>,\n): (props: WebComponentProps<I, E> & RefAttributes<I>) => React.ReactElement | null;\n\nexport function createComponent<I extends HTMLElement, E extends EventNames = {}>(options: Options<I, E>): any {\n const { elementClass } = options;\n\n return _createComponent(\n '_properties' in elementClass\n ? {\n ...options,\n // TODO: improve or remove the Polymer workaround\n // 'createComponent' relies on key presence on the custom element class,\n // but Polymer defines properties on the prototype when the first element\n // is created. Workaround: pass a mock object with properties in\n // the prototype.\n elementClass: {\n // @ts-expect-error: it is a specific workaround for Polymer classes.\n name: elementClass.name,\n prototype: { ...elementClass._properties, hidden: Boolean },\n },\n }\n : options,\n );\n}\n"],
5
5
  "mappings": "AAAA,OAAS,mBAAmBA,MAAwC,aAuBpE,OAAO,SAAW,CAAC,EACnB,OAAO,OAAO,gBAAkB,CAAC,EACjC,OAAO,OAAO,cAAc,KAAK,CAC/B,GAAI,2BACJ,QAAiC,eACnC,CAAC,EA2DM,SAASC,EAAkEC,EAA6B,CAC7G,KAAM,CAAE,aAAAC,CAAa,EAAID,EAEzB,OAAOF,EACL,gBAAiBG,EACb,CACE,GAAGD,EAMH,aAAc,CAEZ,KAAMC,EAAa,KACnB,UAAW,CAAE,GAAGA,EAAa,YAAa,OAAQ,OAAQ,CAC5D,CACF,EACAD,CACN,CACF",
6
6
  "names": ["_createComponent", "createComponent", "options", "elementClass"]
7
7
  }
@@ -6,6 +6,7 @@ type ItemWithReactElementComponent<T> = T & {
6
6
  type ItemWithHTMLElementComponent<T> = T & {
7
7
  component?: HTMLElement | string;
8
8
  children?: Array<ItemWithHTMLElementComponent<T>>;
9
+ __item?: ItemWithReactElementComponent<unknown>;
9
10
  };
10
11
  /**
11
12
  * This function transforms a hierarchical list of items, where each item may contain a React component,
@@ -15,5 +16,12 @@ type ItemWithHTMLElementComponent<T> = T & {
15
16
  * The HTMLElements created for the portals have the given tag name.
16
17
  */
17
18
  export declare function mapItemsWithComponents<T>(items?: Array<ItemWithReactElementComponent<T>>, wrapperTagName?: string): [Array<ReactPortal>, Array<ItemWithHTMLElementComponent<Omit<T, 'children' | 'component'>>> | undefined];
19
+ /**
20
+ * Returns the original item related to the given mapped item.
21
+ */
22
+ export declare function getOriginalItem<T>(mappedItem: ItemWithHTMLElementComponent<T>): {
23
+ component?: string | ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
24
+ children?: any[] | undefined;
25
+ } | undefined;
18
26
  export {};
19
27
  //# sourceMappingURL=mapItemsWithComponents.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mapItemsWithComponents.d.ts","sourceRoot":"","sources":["../src/utils/mapItemsWithComponents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAG5D,KAAK,6BAA6B,CAAC,CAAC,IAAI,CAAC,GAAG;IAC1C,SAAS,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC;CACpD,CAAC;AAEF,KAAK,4BAA4B,CAAC,CAAC,IAAI,CAAC,GAAG;IACzC,SAAS,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC,CAAC;CACnD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,KAAK,CAAC,EAAE,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,EAC/C,cAAc,SAAQ,GACrB,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CA+B1G"}
1
+ {"version":3,"file":"mapItemsWithComponents.d.ts","sourceRoot":"","sources":["../src/utils/mapItemsWithComponents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAG5D,KAAK,6BAA6B,CAAC,CAAC,IAAI,CAAC,GAAG;IAC1C,SAAS,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC;CACpD,CAAC;AAEF,KAAK,4BAA4B,CAAC,CAAC,IAAI,CAAC,GAAG;IACzC,SAAS,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,MAAM,CAAC,EAAE,6BAA6B,CAAC,OAAO,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,KAAK,CAAC,EAAE,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,EAC/C,cAAc,SAAQ,GACrB,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAiC1G;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,UAAU,EAAE,4BAA4B,CAAC,CAAC,CAAC;;;cAE7E"}
@@ -1,2 +1,2 @@
1
- import"react";import{createPortal as h}from"react-dom";function s(c,n="div"){const e=[],i=c?.map(l=>{const{component:t,children:p,...o}=l,[a,m]=s(p,n);if(e.push(...a),t&&typeof t!="string"){const r=document.createElement(n);return e.push(h(t,r)),{...o,component:r,children:m}}else return{...o,component:t,children:m}});return[e,i]}export{s as mapItemsWithComponents};
1
+ import"react";import{createPortal as h}from"react-dom";function s(e,m="div"){const n=[],l=e?.map(o=>{const{component:t,children:p,...r}=o,[a,i]=s(p,m);if(n.push(...a),t&&typeof t!="string"){const c=document.createElement(m);return n.push(h(t,c)),{...r,component:c,children:i,__item:o}}else return{...r,component:t,children:i,__item:o}});return[n,l]}function C(e){return e.__item}export{C as getOriginalItem,s as mapItemsWithComponents};
2
2
  //# sourceMappingURL=mapItemsWithComponents.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/utils/mapItemsWithComponents.ts"],
4
- "sourcesContent": ["import { type ReactElement, type ReactPortal } from 'react';\nimport { createPortal } from 'react-dom';\n\ntype ItemWithReactElementComponent<T> = T & {\n component?: ReactElement | string;\n children?: Array<ItemWithReactElementComponent<T>>;\n};\n\ntype ItemWithHTMLElementComponent<T> = T & {\n component?: HTMLElement | string;\n children?: Array<ItemWithHTMLElementComponent<T>>;\n};\n\n/**\n * This function transforms a hierarchical list of items, where each item may contain a React component,\n * into a list of items where each React component is replaced with an HTMLElement.\n *\n * The React components are not simply removed, but are instead rendered into portals.\n * The HTMLElements created for the portals have the given tag name.\n */\nexport function mapItemsWithComponents<T>(\n items?: Array<ItemWithReactElementComponent<T>>,\n wrapperTagName = 'div',\n): [Array<ReactPortal>, Array<ItemWithHTMLElementComponent<Omit<T, 'children' | 'component'>>> | undefined] {\n const itemPortals: ReactPortal[] = [];\n\n const webComponentItems = items?.map((item) => {\n const { component, children, ...rest } = item;\n\n // Recursively map children\n const [childPortals, webComponentChildren] = mapItemsWithComponents(children, wrapperTagName);\n itemPortals.push(...childPortals);\n\n if (component && typeof component !== 'string') {\n // Component is a React element, create a portal for it\n const root = document.createElement(wrapperTagName);\n itemPortals.push(createPortal(component, root));\n\n return {\n ...rest,\n component: root,\n children: webComponentChildren,\n };\n } else {\n return {\n // Component is a string, or undefined, add it as such\n ...rest,\n component,\n children: webComponentChildren,\n };\n }\n });\n\n return [itemPortals, webComponentItems];\n}\n"],
5
- "mappings": "AAAA,MAAoD,QACpD,OAAS,gBAAAA,MAAoB,YAmBtB,SAASC,EACdC,EACAC,EAAiB,MACyF,CAC1G,MAAMC,EAA6B,CAAC,EAE9BC,EAAoBH,GAAO,IAAKI,GAAS,CAC7C,KAAM,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGC,CAAK,EAAIH,EAGnC,CAACI,EAAcC,CAAoB,EAAIV,EAAuBO,EAAUL,CAAc,EAG5F,GAFAC,EAAY,KAAK,GAAGM,CAAY,EAE5BH,GAAa,OAAOA,GAAc,SAAU,CAE9C,MAAMK,EAAO,SAAS,cAAcT,CAAc,EAClD,OAAAC,EAAY,KAAKJ,EAAaO,EAAWK,CAAI,CAAC,EAEvC,CACL,GAAGH,EACH,UAAWG,EACX,SAAUD,CACZ,CACF,KACE,OAAO,CAEL,GAAGF,EACH,UAAAF,EACA,SAAUI,CACZ,CAEJ,CAAC,EAED,MAAO,CAACP,EAAaC,CAAiB,CACxC",
6
- "names": ["createPortal", "mapItemsWithComponents", "items", "wrapperTagName", "itemPortals", "webComponentItems", "item", "component", "children", "rest", "childPortals", "webComponentChildren", "root"]
4
+ "sourcesContent": ["import { type ReactElement, type ReactPortal } from 'react';\nimport { createPortal } from 'react-dom';\n\ntype ItemWithReactElementComponent<T> = T & {\n component?: ReactElement | string;\n children?: Array<ItemWithReactElementComponent<T>>;\n};\n\ntype ItemWithHTMLElementComponent<T> = T & {\n component?: HTMLElement | string;\n children?: Array<ItemWithHTMLElementComponent<T>>;\n __item?: ItemWithReactElementComponent<unknown>;\n};\n\n/**\n * This function transforms a hierarchical list of items, where each item may contain a React component,\n * into a list of items where each React component is replaced with an HTMLElement.\n *\n * The React components are not simply removed, but are instead rendered into portals.\n * The HTMLElements created for the portals have the given tag name.\n */\nexport function mapItemsWithComponents<T>(\n items?: Array<ItemWithReactElementComponent<T>>,\n wrapperTagName = 'div',\n): [Array<ReactPortal>, Array<ItemWithHTMLElementComponent<Omit<T, 'children' | 'component'>>> | undefined] {\n const itemPortals: ReactPortal[] = [];\n\n const webComponentItems = items?.map((item) => {\n const { component, children, ...rest } = item;\n\n // Recursively map children\n const [childPortals, webComponentChildren] = mapItemsWithComponents(children, wrapperTagName);\n itemPortals.push(...childPortals);\n\n if (component && typeof component !== 'string') {\n // Component is a React element, create a portal for it\n const root = document.createElement(wrapperTagName);\n itemPortals.push(createPortal(component, root));\n\n return {\n ...rest,\n component: root,\n children: webComponentChildren,\n __item: item,\n };\n } else {\n return {\n // Component is a string, or undefined, add it as such\n ...rest,\n component,\n children: webComponentChildren,\n __item: item,\n };\n }\n });\n\n return [itemPortals, webComponentItems];\n}\n\n/**\n * Returns the original item related to the given mapped item.\n */\nexport function getOriginalItem<T>(mappedItem: ItemWithHTMLElementComponent<T>) {\n return mappedItem.__item;\n}\n"],
5
+ "mappings": "AAAA,MAAoD,QACpD,OAAS,gBAAAA,MAAoB,YAoBtB,SAASC,EACdC,EACAC,EAAiB,MACyF,CAC1G,MAAMC,EAA6B,CAAC,EAE9BC,EAAoBH,GAAO,IAAKI,GAAS,CAC7C,KAAM,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGC,CAAK,EAAIH,EAGnC,CAACI,EAAcC,CAAoB,EAAIV,EAAuBO,EAAUL,CAAc,EAG5F,GAFAC,EAAY,KAAK,GAAGM,CAAY,EAE5BH,GAAa,OAAOA,GAAc,SAAU,CAE9C,MAAMK,EAAO,SAAS,cAAcT,CAAc,EAClD,OAAAC,EAAY,KAAKJ,EAAaO,EAAWK,CAAI,CAAC,EAEvC,CACL,GAAGH,EACH,UAAWG,EACX,SAAUD,EACV,OAAQL,CACV,CACF,KACE,OAAO,CAEL,GAAGG,EACH,UAAAF,EACA,SAAUI,EACV,OAAQL,CACV,CAEJ,CAAC,EAED,MAAO,CAACF,EAAaC,CAAiB,CACxC,CAKO,SAASQ,EAAmBC,EAA6C,CAC9E,OAAOA,EAAW,MACpB",
6
+ "names": ["createPortal", "mapItemsWithComponents", "items", "wrapperTagName", "itemPortals", "webComponentItems", "item", "component", "children", "rest", "childPortals", "webComponentChildren", "root", "getOriginalItem", "mappedItem"]
7
7
  }