@vertexvis/viewer-react 0.15.0-canary.2 → 0.15.0-canary.5
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/dist/bundle.cjs.js +8 -2
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +8 -2
- package/dist/bundle.esm.js.map +1 -1
- package/package.json +5 -4
package/dist/bundle.cjs.js
CHANGED
|
@@ -170,14 +170,20 @@ var createReactComponent = function (tagName, ReactComponentContext, manipulateP
|
|
|
170
170
|
class_1.prototype.render = function () {
|
|
171
171
|
var _a = this.props, children = _a.children, forwardedRef = _a.forwardedRef, style = _a.style; _a.className; _a.ref; var cProps = tslib.__rest(_a, ["children", "forwardedRef", "style", "className", "ref"]);
|
|
172
172
|
var propsToPass = Object.keys(cProps).reduce(function (acc, name) {
|
|
173
|
+
var value = cProps[name];
|
|
173
174
|
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
|
|
174
175
|
var eventName = name.substring(2).toLowerCase();
|
|
175
176
|
if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {
|
|
176
|
-
acc[name] =
|
|
177
|
+
acc[name] = value;
|
|
177
178
|
}
|
|
178
179
|
}
|
|
179
180
|
else {
|
|
180
|
-
|
|
181
|
+
// we should only render strings, booleans, and numbers as attrs in html.
|
|
182
|
+
// objects, functions, arrays etc get synced via properties on mount.
|
|
183
|
+
var type = typeof value;
|
|
184
|
+
if (type === 'string' || type === 'boolean' || type === 'number') {
|
|
185
|
+
acc[camelToDashCase(name)] = value;
|
|
186
|
+
}
|
|
181
187
|
}
|
|
182
188
|
return acc;
|
|
183
189
|
}, {});
|
package/dist/bundle.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.cjs.js","sources":["../src/generated/react-component-lib/utils/case.ts","../src/generated/react-component-lib/utils/attachProps.ts","../src/generated/react-component-lib/utils/index.tsx","../src/generated/react-component-lib/createComponent.tsx","../src/generated/components.ts"],"sourcesContent":["export const dashToPascalCase = (str: string) =>\n str\n .toLowerCase()\n .split('-')\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join('');\nexport const camelToDashCase = (str: string) =>\n str.replace(/([A-Z])/g, (m: string) => `-${m[0].toLowerCase()}`);\n","import { camelToDashCase } from './case';\n\nexport const attachProps = (node: HTMLElement, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n // add any classes in className to the class list\n const className = getClassName(node.classList, newProps, oldProps);\n if (className !== '') {\n node.className = className;\n }\n\n Object.keys(newProps).forEach((name) => {\n if (\n name === 'children' ||\n name === 'style' ||\n name === 'ref' ||\n name === 'class' ||\n name === 'className' ||\n name === 'forwardedRef'\n ) {\n return;\n }\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2);\n const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name]);\n }\n } else {\n (node as any)[name] = newProps[name];\n const propType = typeof newProps[name];\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name]);\n }\n }\n });\n }\n};\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class;\n const oldClassProp: string = oldProps.className || oldProps.class;\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList);\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);\n const finalClassNames: string[] = [];\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass);\n incomingPropClasses.delete(currentClass);\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass);\n }\n });\n incomingPropClasses.forEach((s) => finalClassNames.push(s));\n return finalClassNames.join(' ');\n};\n\n/**\n * Checks if an event is supported in the current execution environment.\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nexport const isCoveredByReact = (eventNameSuffix: string) => {\n if (typeof document === 'undefined') {\n return true;\n } else {\n const eventName = 'on' + eventNameSuffix;\n let isSupported = eventName in document;\n\n if (!isSupported) {\n const element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof (element as any)[eventName] === 'function';\n }\n\n return isSupported;\n }\n};\n\nexport const syncEvent = (\n node: Element & { __events?: { [key: string]: ((e: Event) => any) | undefined } },\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events || (node.__events = {});\n const oldEventHandler = eventStore[eventName];\n\n // Remove old listener so they don't double up.\n if (oldEventHandler) {\n node.removeEventListener(eventName, oldEventHandler);\n }\n\n // Bind new listener.\n node.addEventListener(\n eventName,\n (eventStore[eventName] = function handler(e: Event) {\n if (newEventHandler) {\n newEventHandler.call(this, e);\n }\n })\n );\n};\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s));\n return map;\n};\n","import React from 'react';\n\nimport type { StyleReactProps } from '../interfaces';\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\n Omit<React.HTMLAttributes<ElementType>, 'style'> &\n StyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value)\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value\n }\n};\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach(ref => {\n setRef(ref, value)\n })\n }\n};\n\nexport const createForwardRef = <PropType, ElementType>(\n ReactComponent: any,\n displayName: string,\n) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>,\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />;\n };\n forwardRef.displayName = displayName;\n\n return React.forwardRef(forwardRef);\n};\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (\n customElement !== undefined &&\n typeof customElements !== 'undefined' &&\n !customElements.get(tagName)\n ) {\n customElements.define(tagName, customElement);\n }\n}\n\nexport * from './attachProps';\nexport * from './case';\n","import React, { createElement } from 'react';\n\nimport {\n attachProps,\n createForwardRef,\n dashToPascalCase,\n isCoveredByReact,\n mergeRefs,\n} from './utils';\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>;\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>;\n ref?: React.Ref<any>;\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = {},\n ExpandedPropsTypes = {}\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any,\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void,\n) => {\n if (defineCustomElement !== undefined) {\n defineCustomElement();\n }\n\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType;\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element;\n };\n\n constructor(props: StencilReactInternalProps<ElementType>) {\n super(props);\n }\n\n componentDidMount() {\n this.componentDidUpdate(this.props);\n }\n\n componentDidUpdate(prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps);\n }\n\n render() {\n const { children, forwardedRef, style, className, ref, ...cProps } = this.props;\n\n let propsToPass = Object.keys(cProps).reduce((acc, name) => {\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n (acc as any)[name] = (cProps as any)[name];\n }\n } else {\n (acc as any)[name] = (cProps as any)[name];\n }\n return acc;\n }, {});\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass);\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n style,\n };\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children);\n }\n\n static get displayName() {\n return displayName;\n }\n };\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext;\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName);\n};\n","/* eslint-disable */\n/* tslint:disable */\n/* auto-generated react proxies */\nimport { createReactComponent } from './react-component-lib';\n\nimport type { JSX } from '@vertexvis/viewer';\n\n\n\nexport const VertexSceneTree = /*@__PURE__*/createReactComponent<JSX.VertexSceneTree, HTMLVertexSceneTreeElement>('vertex-scene-tree');\nexport const VertexSceneTreeSearch = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeSearch, HTMLVertexSceneTreeSearchElement>('vertex-scene-tree-search');\nexport const VertexSceneTreeTableCell = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableCell, HTMLVertexSceneTreeTableCellElement>('vertex-scene-tree-table-cell');\nexport const VertexSceneTreeTableColumn = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableColumn, HTMLVertexSceneTreeTableColumnElement>('vertex-scene-tree-table-column');\nexport const VertexSceneTreeTableHeader = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableHeader, HTMLVertexSceneTreeTableHeaderElement>('vertex-scene-tree-table-header');\nexport const VertexSceneTreeTableLayout = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableLayout, HTMLVertexSceneTreeTableLayoutElement>('vertex-scene-tree-table-layout');\nexport const VertexSceneTreeTableResizeDivider = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableResizeDivider, HTMLVertexSceneTreeTableResizeDividerElement>('vertex-scene-tree-table-resize-divider');\nexport const VertexSceneTreeToolbar = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeToolbar, HTMLVertexSceneTreeToolbarElement>('vertex-scene-tree-toolbar');\nexport const VertexSceneTreeToolbarGroup = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeToolbarGroup, HTMLVertexSceneTreeToolbarGroupElement>('vertex-scene-tree-toolbar-group');\nexport const VertexViewer = /*@__PURE__*/createReactComponent<JSX.VertexViewer, HTMLVertexViewerElement>('vertex-viewer');\nexport const VertexViewerButton = /*@__PURE__*/createReactComponent<JSX.VertexViewerButton, HTMLVertexViewerButtonElement>('vertex-viewer-button');\nexport const VertexViewerDefaultToolbar = /*@__PURE__*/createReactComponent<JSX.VertexViewerDefaultToolbar, HTMLVertexViewerDefaultToolbarElement>('vertex-viewer-default-toolbar');\nexport const VertexViewerDomElement = /*@__PURE__*/createReactComponent<JSX.VertexViewerDomElement, HTMLVertexViewerDomElementElement>('vertex-viewer-dom-element');\nexport const VertexViewerDomGroup = /*@__PURE__*/createReactComponent<JSX.VertexViewerDomGroup, HTMLVertexViewerDomGroupElement>('vertex-viewer-dom-group');\nexport const VertexViewerDomRenderer = /*@__PURE__*/createReactComponent<JSX.VertexViewerDomRenderer, HTMLVertexViewerDomRendererElement>('vertex-viewer-dom-renderer');\nexport const VertexViewerIcon = /*@__PURE__*/createReactComponent<JSX.VertexViewerIcon, HTMLVertexViewerIconElement>('vertex-viewer-icon');\nexport const VertexViewerLayer = /*@__PURE__*/createReactComponent<JSX.VertexViewerLayer, HTMLVertexViewerLayerElement>('vertex-viewer-layer');\nexport const VertexViewerMarkup = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkup, HTMLVertexViewerMarkupElement>('vertex-viewer-markup');\nexport const VertexViewerMarkupArrow = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupArrow, HTMLVertexViewerMarkupArrowElement>('vertex-viewer-markup-arrow');\nexport const VertexViewerMarkupCircle = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupCircle, HTMLVertexViewerMarkupCircleElement>('vertex-viewer-markup-circle');\nexport const VertexViewerMarkupFreeform = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupFreeform, HTMLVertexViewerMarkupFreeformElement>('vertex-viewer-markup-freeform');\nexport const VertexViewerMarkupTool = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupTool, HTMLVertexViewerMarkupToolElement>('vertex-viewer-markup-tool');\nexport const VertexViewerMeasurementDetails = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementDetails, HTMLVertexViewerMeasurementDetailsElement>('vertex-viewer-measurement-details');\nexport const VertexViewerMeasurementDistance = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementDistance, HTMLVertexViewerMeasurementDistanceElement>('vertex-viewer-measurement-distance');\nexport const VertexViewerMeasurementLine = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementLine, HTMLVertexViewerMeasurementLineElement>('vertex-viewer-measurement-line');\nexport const VertexViewerMeasurementOverlays = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementOverlays, HTMLVertexViewerMeasurementOverlaysElement>('vertex-viewer-measurement-overlays');\nexport const VertexViewerMeasurementPrecise = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementPrecise, HTMLVertexViewerMeasurementPreciseElement>('vertex-viewer-measurement-precise');\nexport const VertexViewerPinGroup = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinGroup, HTMLVertexViewerPinGroupElement>('vertex-viewer-pin-group');\nexport const VertexViewerPinLabel = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinLabel, HTMLVertexViewerPinLabelElement>('vertex-viewer-pin-label');\nexport const VertexViewerPinLabelLine = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinLabelLine, HTMLVertexViewerPinLabelLineElement>('vertex-viewer-pin-label-line');\nexport const VertexViewerPinTool = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinTool, HTMLVertexViewerPinToolElement>('vertex-viewer-pin-tool');\nexport const VertexViewerToolbar = /*@__PURE__*/createReactComponent<JSX.VertexViewerToolbar, HTMLVertexViewerToolbarElement>('vertex-viewer-toolbar');\nexport const VertexViewerToolbarGroup = /*@__PURE__*/createReactComponent<JSX.VertexViewerToolbarGroup, HTMLVertexViewerToolbarGroupElement>('vertex-viewer-toolbar-group');\nexport const VertexViewerTransformWidget = /*@__PURE__*/createReactComponent<JSX.VertexViewerTransformWidget, HTMLVertexViewerTransformWidgetElement>('vertex-viewer-transform-widget');\nexport const VertexViewerViewCube = /*@__PURE__*/createReactComponent<JSX.VertexViewerViewCube, HTMLVertexViewerViewCubeElement>('vertex-viewer-view-cube');\n"],"names":["React","__extends","createElement"],"mappings":";;;;;;;;;;;;AAAO,IAAM,gBAAgB,GAAG,UAAC,GAAW;IAC1C,OAAA,GAAG;SACA,WAAW,EAAE;SACb,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAA,CAAC;SACpE,IAAI,CAAC,EAAE,CAAC;AAJX,CAIW,CAAC;AACP,IAAM,eAAe,GAAG,UAAC,GAAW;IACzC,OAAA,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,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AE;IAC3J,gBAAgB,iBAAgB,oBAAoB,CAAoD,oBAAoB,EAAE;IAC9H,iBAAiB,iBAAgB,oBAAoB,CAAsD,qBAAqB,EAAE;IAClI,kBAAkB,iBAAgB,oBAAoB,CAAwD,sBAAsB,EAAE;IACtI,uBAAuB,iBAAgB,oBAAoB,CAAkE,4BAA4B,EAAE;IAC3J,wBAAwB,iBAAgB,oBAAoB,CAAoE,6BAA6B,EAAE;IAC/J,0BAA0B,iBAAgB,oBAAoB,CAAwE,+BAA+B,EAAE;IACvK,sBAAsB,iBAAgB,oBAAoB,CAAgE,2BAA2B,EAAE;IACvJ,8BAA8B,iBAAgB,oBAAoB,CAAgF,mCAAmC,EAAE;IACvL,+BAA+B,iBAAgB,oBAAoB,CAAkF,oCAAoC,EAAE;IAC3L,2BAA2B,iBAAgB,oBAAoB,CAA0E,gCAAgC,EAAE;IAC3K,+BAA+B,iBAAgB,oBAAoB,CAAkF,oCAAoC,EAAE;IAC3L,8BAA8B,iBAAgB,oBAAoB,CAAgF,mCAAmC,EAAE;IACvL,oBAAoB,iBAAgB,oBAAoB,CAA4D,yBAAyB,EAAE;IAC/I,oBAAoB,iBAAgB,oBAAoB,CAA4D,yBAAyB,EAAE;IAC/I,wBAAwB,iBAAgB,oBAAoB,CAAoE,8BAA8B,EAAE;IAChK,mBAAmB,iBAAgB,oBAAoB,CAA0D,wBAAwB,EAAE;IAC3I,mBAAmB,iBAAgB,oBAAoB,CAA0D,uBAAuB,EAAE;IAC1I,wBAAwB,iBAAgB,oBAAoB,CAAoE,6BAA6B,EAAE;IAC/J,2BAA2B,iBAAgB,oBAAoB,CAA0E,gCAAgC,EAAE;IAC3K,oBAAoB,iBAAgB,oBAAoB,CAA4D,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"bundle.cjs.js","sources":["../src/generated/react-component-lib/utils/case.ts","../src/generated/react-component-lib/utils/attachProps.ts","../src/generated/react-component-lib/utils/index.tsx","../src/generated/react-component-lib/createComponent.tsx","../src/generated/components.ts"],"sourcesContent":["export const dashToPascalCase = (str: string) =>\n str\n .toLowerCase()\n .split('-')\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join('');\nexport const camelToDashCase = (str: string) =>\n str.replace(/([A-Z])/g, (m: string) => `-${m[0].toLowerCase()}`);\n","import { camelToDashCase } from './case';\n\nexport const attachProps = (node: HTMLElement, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n // add any classes in className to the class list\n const className = getClassName(node.classList, newProps, oldProps);\n if (className !== '') {\n node.className = className;\n }\n\n Object.keys(newProps).forEach((name) => {\n if (\n name === 'children' ||\n name === 'style' ||\n name === 'ref' ||\n name === 'class' ||\n name === 'className' ||\n name === 'forwardedRef'\n ) {\n return;\n }\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2);\n const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name]);\n }\n } else {\n (node as any)[name] = newProps[name];\n const propType = typeof newProps[name];\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name]);\n }\n }\n });\n }\n};\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class;\n const oldClassProp: string = oldProps.className || oldProps.class;\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList);\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);\n const finalClassNames: string[] = [];\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass);\n incomingPropClasses.delete(currentClass);\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass);\n }\n });\n incomingPropClasses.forEach((s) => finalClassNames.push(s));\n return finalClassNames.join(' ');\n};\n\n/**\n * Checks if an event is supported in the current execution environment.\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nexport const isCoveredByReact = (eventNameSuffix: string) => {\n if (typeof document === 'undefined') {\n return true;\n } else {\n const eventName = 'on' + eventNameSuffix;\n let isSupported = eventName in document;\n\n if (!isSupported) {\n const element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof (element as any)[eventName] === 'function';\n }\n\n return isSupported;\n }\n};\n\nexport const syncEvent = (\n node: Element & { __events?: { [key: string]: ((e: Event) => any) | undefined } },\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events || (node.__events = {});\n const oldEventHandler = eventStore[eventName];\n\n // Remove old listener so they don't double up.\n if (oldEventHandler) {\n node.removeEventListener(eventName, oldEventHandler);\n }\n\n // Bind new listener.\n node.addEventListener(\n eventName,\n (eventStore[eventName] = function handler(e: Event) {\n if (newEventHandler) {\n newEventHandler.call(this, e);\n }\n })\n );\n};\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s));\n return map;\n};\n","import React from 'react';\n\nimport type { StyleReactProps } from '../interfaces';\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\n Omit<React.HTMLAttributes<ElementType>, 'style'> &\n StyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value)\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value\n }\n};\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach(ref => {\n setRef(ref, value)\n })\n }\n};\n\nexport const createForwardRef = <PropType, ElementType>(\n ReactComponent: any,\n displayName: string,\n) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>,\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />;\n };\n forwardRef.displayName = displayName;\n\n return React.forwardRef(forwardRef);\n};\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (\n customElement !== undefined &&\n typeof customElements !== 'undefined' &&\n !customElements.get(tagName)\n ) {\n customElements.define(tagName, customElement);\n }\n}\n\nexport * from './attachProps';\nexport * from './case';\n","import React, { createElement } from 'react';\n\nimport {\n attachProps,\n camelToDashCase,\n createForwardRef,\n dashToPascalCase,\n isCoveredByReact,\n mergeRefs,\n} from './utils';\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>;\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>;\n ref?: React.Ref<any>;\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = {},\n ExpandedPropsTypes = {}\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any,\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void,\n) => {\n if (defineCustomElement !== undefined) {\n defineCustomElement();\n }\n\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType;\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element;\n };\n\n constructor(props: StencilReactInternalProps<ElementType>) {\n super(props);\n }\n\n componentDidMount() {\n this.componentDidUpdate(this.props);\n }\n\n componentDidUpdate(prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps);\n }\n\n render() {\n const { children, forwardedRef, style, className, ref, ...cProps } = this.props;\n\n let propsToPass = Object.keys(cProps).reduce((acc: any, name) => {\n const value = (cProps as any)[name];\n\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = value;\n }\n } else {\n // we should only render strings, booleans, and numbers as attrs in html.\n // objects, functions, arrays etc get synced via properties on mount.\n const type = typeof value;\n\n if (type === 'string' || type === 'boolean' || type === 'number') {\n acc[camelToDashCase(name)] = value;\n }\n }\n return acc;\n }, {});\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass);\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n style,\n };\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children);\n }\n\n static get displayName() {\n return displayName;\n }\n };\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext;\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName);\n};\n","/* eslint-disable */\n/* tslint:disable */\n/* auto-generated react proxies */\nimport { createReactComponent } from './react-component-lib';\n\nimport type { JSX } from '@vertexvis/viewer';\n\n\n\nexport const VertexSceneTree = /*@__PURE__*/createReactComponent<JSX.VertexSceneTree, HTMLVertexSceneTreeElement>('vertex-scene-tree');\nexport const VertexSceneTreeSearch = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeSearch, HTMLVertexSceneTreeSearchElement>('vertex-scene-tree-search');\nexport const VertexSceneTreeTableCell = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableCell, HTMLVertexSceneTreeTableCellElement>('vertex-scene-tree-table-cell');\nexport const VertexSceneTreeTableColumn = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableColumn, HTMLVertexSceneTreeTableColumnElement>('vertex-scene-tree-table-column');\nexport const VertexSceneTreeTableHeader = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableHeader, HTMLVertexSceneTreeTableHeaderElement>('vertex-scene-tree-table-header');\nexport const VertexSceneTreeTableLayout = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableLayout, HTMLVertexSceneTreeTableLayoutElement>('vertex-scene-tree-table-layout');\nexport const VertexSceneTreeTableResizeDivider = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableResizeDivider, HTMLVertexSceneTreeTableResizeDividerElement>('vertex-scene-tree-table-resize-divider');\nexport const VertexSceneTreeToolbar = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeToolbar, HTMLVertexSceneTreeToolbarElement>('vertex-scene-tree-toolbar');\nexport const VertexSceneTreeToolbarGroup = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeToolbarGroup, HTMLVertexSceneTreeToolbarGroupElement>('vertex-scene-tree-toolbar-group');\nexport const VertexViewer = /*@__PURE__*/createReactComponent<JSX.VertexViewer, HTMLVertexViewerElement>('vertex-viewer');\nexport const VertexViewerButton = /*@__PURE__*/createReactComponent<JSX.VertexViewerButton, HTMLVertexViewerButtonElement>('vertex-viewer-button');\nexport const VertexViewerDefaultToolbar = /*@__PURE__*/createReactComponent<JSX.VertexViewerDefaultToolbar, HTMLVertexViewerDefaultToolbarElement>('vertex-viewer-default-toolbar');\nexport const VertexViewerDomElement = /*@__PURE__*/createReactComponent<JSX.VertexViewerDomElement, HTMLVertexViewerDomElementElement>('vertex-viewer-dom-element');\nexport const VertexViewerDomGroup = /*@__PURE__*/createReactComponent<JSX.VertexViewerDomGroup, HTMLVertexViewerDomGroupElement>('vertex-viewer-dom-group');\nexport const VertexViewerDomRenderer = /*@__PURE__*/createReactComponent<JSX.VertexViewerDomRenderer, HTMLVertexViewerDomRendererElement>('vertex-viewer-dom-renderer');\nexport const VertexViewerIcon = /*@__PURE__*/createReactComponent<JSX.VertexViewerIcon, HTMLVertexViewerIconElement>('vertex-viewer-icon');\nexport const VertexViewerLayer = /*@__PURE__*/createReactComponent<JSX.VertexViewerLayer, HTMLVertexViewerLayerElement>('vertex-viewer-layer');\nexport const VertexViewerMarkup = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkup, HTMLVertexViewerMarkupElement>('vertex-viewer-markup');\nexport const VertexViewerMarkupArrow = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupArrow, HTMLVertexViewerMarkupArrowElement>('vertex-viewer-markup-arrow');\nexport const VertexViewerMarkupCircle = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupCircle, HTMLVertexViewerMarkupCircleElement>('vertex-viewer-markup-circle');\nexport const VertexViewerMarkupFreeform = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupFreeform, HTMLVertexViewerMarkupFreeformElement>('vertex-viewer-markup-freeform');\nexport const VertexViewerMarkupTool = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupTool, HTMLVertexViewerMarkupToolElement>('vertex-viewer-markup-tool');\nexport const VertexViewerMeasurementDetails = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementDetails, HTMLVertexViewerMeasurementDetailsElement>('vertex-viewer-measurement-details');\nexport const VertexViewerMeasurementDistance = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementDistance, HTMLVertexViewerMeasurementDistanceElement>('vertex-viewer-measurement-distance');\nexport const VertexViewerMeasurementLine = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementLine, HTMLVertexViewerMeasurementLineElement>('vertex-viewer-measurement-line');\nexport const VertexViewerMeasurementOverlays = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementOverlays, HTMLVertexViewerMeasurementOverlaysElement>('vertex-viewer-measurement-overlays');\nexport const VertexViewerMeasurementPrecise = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementPrecise, HTMLVertexViewerMeasurementPreciseElement>('vertex-viewer-measurement-precise');\nexport const VertexViewerPinGroup = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinGroup, HTMLVertexViewerPinGroupElement>('vertex-viewer-pin-group');\nexport const VertexViewerPinLabel = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinLabel, HTMLVertexViewerPinLabelElement>('vertex-viewer-pin-label');\nexport const VertexViewerPinLabelLine = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinLabelLine, HTMLVertexViewerPinLabelLineElement>('vertex-viewer-pin-label-line');\nexport const VertexViewerPinTool = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinTool, HTMLVertexViewerPinToolElement>('vertex-viewer-pin-tool');\nexport const VertexViewerToolbar = /*@__PURE__*/createReactComponent<JSX.VertexViewerToolbar, HTMLVertexViewerToolbarElement>('vertex-viewer-toolbar');\nexport const VertexViewerToolbarGroup = /*@__PURE__*/createReactComponent<JSX.VertexViewerToolbarGroup, HTMLVertexViewerToolbarGroupElement>('vertex-viewer-toolbar-group');\nexport const VertexViewerTransformWidget = /*@__PURE__*/createReactComponent<JSX.VertexViewerTransformWidget, HTMLVertexViewerTransformWidgetElement>('vertex-viewer-transform-widget');\nexport const VertexViewerViewCube = /*@__PURE__*/createReactComponent<JSX.VertexViewerViewCube, HTMLVertexViewerViewCubeElement>('vertex-viewer-view-cube');\n"],"names":["React","__extends","createElement"],"mappings":";;;;;;;;;;;;AAAO,IAAM,gBAAgB,GAAG,UAAC,GAAW;IAC1C,OAAA,GAAG;SACA,WAAW,EAAE;SACb,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,OAAO,CAAC,KAAK,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B,CAA0D,uBAAuB,EAAE;IAC1I,wBAAwB,iBAAgB,oBAAoB,CAAoE,6BAA6B,EAAE;IAC/J,2BAA2B,iBAAgB,oBAAoB,CAA0E,gCAAgC,EAAE;IAC3K,oBAAoB,iBAAgB,oBAAoB,CAA4D,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/bundle.esm.js
CHANGED
|
@@ -162,14 +162,20 @@ var createReactComponent = function (tagName, ReactComponentContext, manipulateP
|
|
|
162
162
|
class_1.prototype.render = function () {
|
|
163
163
|
var _a = this.props, children = _a.children, forwardedRef = _a.forwardedRef, style = _a.style; _a.className; _a.ref; var cProps = __rest(_a, ["children", "forwardedRef", "style", "className", "ref"]);
|
|
164
164
|
var propsToPass = Object.keys(cProps).reduce(function (acc, name) {
|
|
165
|
+
var value = cProps[name];
|
|
165
166
|
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
|
|
166
167
|
var eventName = name.substring(2).toLowerCase();
|
|
167
168
|
if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {
|
|
168
|
-
acc[name] =
|
|
169
|
+
acc[name] = value;
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
172
|
else {
|
|
172
|
-
|
|
173
|
+
// we should only render strings, booleans, and numbers as attrs in html.
|
|
174
|
+
// objects, functions, arrays etc get synced via properties on mount.
|
|
175
|
+
var type = typeof value;
|
|
176
|
+
if (type === 'string' || type === 'boolean' || type === 'number') {
|
|
177
|
+
acc[camelToDashCase(name)] = value;
|
|
178
|
+
}
|
|
173
179
|
}
|
|
174
180
|
return acc;
|
|
175
181
|
}, {});
|
package/dist/bundle.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.esm.js","sources":["../src/generated/react-component-lib/utils/case.ts","../src/generated/react-component-lib/utils/attachProps.ts","../src/generated/react-component-lib/utils/index.tsx","../src/generated/react-component-lib/createComponent.tsx","../src/generated/components.ts"],"sourcesContent":["export const dashToPascalCase = (str: string) =>\n str\n .toLowerCase()\n .split('-')\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join('');\nexport const camelToDashCase = (str: string) =>\n str.replace(/([A-Z])/g, (m: string) => `-${m[0].toLowerCase()}`);\n","import { camelToDashCase } from './case';\n\nexport const attachProps = (node: HTMLElement, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n // add any classes in className to the class list\n const className = getClassName(node.classList, newProps, oldProps);\n if (className !== '') {\n node.className = className;\n }\n\n Object.keys(newProps).forEach((name) => {\n if (\n name === 'children' ||\n name === 'style' ||\n name === 'ref' ||\n name === 'class' ||\n name === 'className' ||\n name === 'forwardedRef'\n ) {\n return;\n }\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2);\n const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name]);\n }\n } else {\n (node as any)[name] = newProps[name];\n const propType = typeof newProps[name];\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name]);\n }\n }\n });\n }\n};\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class;\n const oldClassProp: string = oldProps.className || oldProps.class;\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList);\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);\n const finalClassNames: string[] = [];\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass);\n incomingPropClasses.delete(currentClass);\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass);\n }\n });\n incomingPropClasses.forEach((s) => finalClassNames.push(s));\n return finalClassNames.join(' ');\n};\n\n/**\n * Checks if an event is supported in the current execution environment.\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nexport const isCoveredByReact = (eventNameSuffix: string) => {\n if (typeof document === 'undefined') {\n return true;\n } else {\n const eventName = 'on' + eventNameSuffix;\n let isSupported = eventName in document;\n\n if (!isSupported) {\n const element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof (element as any)[eventName] === 'function';\n }\n\n return isSupported;\n }\n};\n\nexport const syncEvent = (\n node: Element & { __events?: { [key: string]: ((e: Event) => any) | undefined } },\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events || (node.__events = {});\n const oldEventHandler = eventStore[eventName];\n\n // Remove old listener so they don't double up.\n if (oldEventHandler) {\n node.removeEventListener(eventName, oldEventHandler);\n }\n\n // Bind new listener.\n node.addEventListener(\n eventName,\n (eventStore[eventName] = function handler(e: Event) {\n if (newEventHandler) {\n newEventHandler.call(this, e);\n }\n })\n );\n};\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s));\n return map;\n};\n","import React from 'react';\n\nimport type { StyleReactProps } from '../interfaces';\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\n Omit<React.HTMLAttributes<ElementType>, 'style'> &\n StyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value)\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value\n }\n};\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach(ref => {\n setRef(ref, value)\n })\n }\n};\n\nexport const createForwardRef = <PropType, ElementType>(\n ReactComponent: any,\n displayName: string,\n) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>,\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />;\n };\n forwardRef.displayName = displayName;\n\n return React.forwardRef(forwardRef);\n};\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (\n customElement !== undefined &&\n typeof customElements !== 'undefined' &&\n !customElements.get(tagName)\n ) {\n customElements.define(tagName, customElement);\n }\n}\n\nexport * from './attachProps';\nexport * from './case';\n","import React, { createElement } from 'react';\n\nimport {\n attachProps,\n createForwardRef,\n dashToPascalCase,\n isCoveredByReact,\n mergeRefs,\n} from './utils';\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>;\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>;\n ref?: React.Ref<any>;\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = {},\n ExpandedPropsTypes = {}\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any,\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void,\n) => {\n if (defineCustomElement !== undefined) {\n defineCustomElement();\n }\n\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType;\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element;\n };\n\n constructor(props: StencilReactInternalProps<ElementType>) {\n super(props);\n }\n\n componentDidMount() {\n this.componentDidUpdate(this.props);\n }\n\n componentDidUpdate(prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps);\n }\n\n render() {\n const { children, forwardedRef, style, className, ref, ...cProps } = this.props;\n\n let propsToPass = Object.keys(cProps).reduce((acc, name) => {\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n (acc as any)[name] = (cProps as any)[name];\n }\n } else {\n (acc as any)[name] = (cProps as any)[name];\n }\n return acc;\n }, {});\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass);\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n style,\n };\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children);\n }\n\n static get displayName() {\n return displayName;\n }\n };\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext;\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName);\n};\n","/* eslint-disable */\n/* tslint:disable */\n/* auto-generated react proxies */\nimport { createReactComponent } from './react-component-lib';\n\nimport type { JSX } from '@vertexvis/viewer';\n\n\n\nexport const VertexSceneTree = /*@__PURE__*/createReactComponent<JSX.VertexSceneTree, HTMLVertexSceneTreeElement>('vertex-scene-tree');\nexport const VertexSceneTreeSearch = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeSearch, HTMLVertexSceneTreeSearchElement>('vertex-scene-tree-search');\nexport const VertexSceneTreeTableCell = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableCell, HTMLVertexSceneTreeTableCellElement>('vertex-scene-tree-table-cell');\nexport const VertexSceneTreeTableColumn = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableColumn, HTMLVertexSceneTreeTableColumnElement>('vertex-scene-tree-table-column');\nexport const VertexSceneTreeTableHeader = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableHeader, HTMLVertexSceneTreeTableHeaderElement>('vertex-scene-tree-table-header');\nexport const VertexSceneTreeTableLayout = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableLayout, HTMLVertexSceneTreeTableLayoutElement>('vertex-scene-tree-table-layout');\nexport const VertexSceneTreeTableResizeDivider = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableResizeDivider, HTMLVertexSceneTreeTableResizeDividerElement>('vertex-scene-tree-table-resize-divider');\nexport const VertexSceneTreeToolbar = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeToolbar, HTMLVertexSceneTreeToolbarElement>('vertex-scene-tree-toolbar');\nexport const VertexSceneTreeToolbarGroup = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeToolbarGroup, HTMLVertexSceneTreeToolbarGroupElement>('vertex-scene-tree-toolbar-group');\nexport const VertexViewer = /*@__PURE__*/createReactComponent<JSX.VertexViewer, HTMLVertexViewerElement>('vertex-viewer');\nexport const VertexViewerButton = /*@__PURE__*/createReactComponent<JSX.VertexViewerButton, HTMLVertexViewerButtonElement>('vertex-viewer-button');\nexport const VertexViewerDefaultToolbar = /*@__PURE__*/createReactComponent<JSX.VertexViewerDefaultToolbar, HTMLVertexViewerDefaultToolbarElement>('vertex-viewer-default-toolbar');\nexport const VertexViewerDomElement = /*@__PURE__*/createReactComponent<JSX.VertexViewerDomElement, HTMLVertexViewerDomElementElement>('vertex-viewer-dom-element');\nexport const VertexViewerDomGroup = /*@__PURE__*/createReactComponent<JSX.VertexViewerDomGroup, HTMLVertexViewerDomGroupElement>('vertex-viewer-dom-group');\nexport const VertexViewerDomRenderer = /*@__PURE__*/createReactComponent<JSX.VertexViewerDomRenderer, HTMLVertexViewerDomRendererElement>('vertex-viewer-dom-renderer');\nexport const VertexViewerIcon = /*@__PURE__*/createReactComponent<JSX.VertexViewerIcon, HTMLVertexViewerIconElement>('vertex-viewer-icon');\nexport const VertexViewerLayer = /*@__PURE__*/createReactComponent<JSX.VertexViewerLayer, HTMLVertexViewerLayerElement>('vertex-viewer-layer');\nexport const VertexViewerMarkup = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkup, HTMLVertexViewerMarkupElement>('vertex-viewer-markup');\nexport const VertexViewerMarkupArrow = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupArrow, HTMLVertexViewerMarkupArrowElement>('vertex-viewer-markup-arrow');\nexport const VertexViewerMarkupCircle = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupCircle, HTMLVertexViewerMarkupCircleElement>('vertex-viewer-markup-circle');\nexport const VertexViewerMarkupFreeform = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupFreeform, HTMLVertexViewerMarkupFreeformElement>('vertex-viewer-markup-freeform');\nexport const VertexViewerMarkupTool = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupTool, HTMLVertexViewerMarkupToolElement>('vertex-viewer-markup-tool');\nexport const VertexViewerMeasurementDetails = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementDetails, HTMLVertexViewerMeasurementDetailsElement>('vertex-viewer-measurement-details');\nexport const VertexViewerMeasurementDistance = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementDistance, HTMLVertexViewerMeasurementDistanceElement>('vertex-viewer-measurement-distance');\nexport const VertexViewerMeasurementLine = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementLine, HTMLVertexViewerMeasurementLineElement>('vertex-viewer-measurement-line');\nexport const VertexViewerMeasurementOverlays = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementOverlays, HTMLVertexViewerMeasurementOverlaysElement>('vertex-viewer-measurement-overlays');\nexport const VertexViewerMeasurementPrecise = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementPrecise, HTMLVertexViewerMeasurementPreciseElement>('vertex-viewer-measurement-precise');\nexport const VertexViewerPinGroup = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinGroup, HTMLVertexViewerPinGroupElement>('vertex-viewer-pin-group');\nexport const VertexViewerPinLabel = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinLabel, HTMLVertexViewerPinLabelElement>('vertex-viewer-pin-label');\nexport const VertexViewerPinLabelLine = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinLabelLine, HTMLVertexViewerPinLabelLineElement>('vertex-viewer-pin-label-line');\nexport const VertexViewerPinTool = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinTool, HTMLVertexViewerPinToolElement>('vertex-viewer-pin-tool');\nexport const VertexViewerToolbar = /*@__PURE__*/createReactComponent<JSX.VertexViewerToolbar, HTMLVertexViewerToolbarElement>('vertex-viewer-toolbar');\nexport const VertexViewerToolbarGroup = /*@__PURE__*/createReactComponent<JSX.VertexViewerToolbarGroup, HTMLVertexViewerToolbarGroupElement>('vertex-viewer-toolbar-group');\nexport const VertexViewerTransformWidget = /*@__PURE__*/createReactComponent<JSX.VertexViewerTransformWidget, HTMLVertexViewerTransformWidgetElement>('vertex-viewer-transform-widget');\nexport const VertexViewerViewCube = /*@__PURE__*/createReactComponent<JSX.VertexViewerViewCube, HTMLVertexViewerViewCubeElement>('vertex-viewer-view-cube');\n"],"names":[],"mappings":";;;;AAAO,IAAM,gBAAgB,GAAG,UAAC,GAAW;IAC1C,OAAA,GAAG;SACA,WAAW,EAAE;SACb,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAA,CAAC;SACpE,IAAI,CAAC,EAAE,CAAC;AAJX,CAIW,CAAC;AACP,IAAM,eAAe,GAAG,UAAC,GAAW;IACzC,OAAA,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,UAAC,CAAS,IAAK,OAAA,WAAI,CAAC,CAAC,CA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;IAC9H,iBAAiB,iBAAgB,oBAAoB,CAAsD,qBAAqB,EAAE;IAClI,kBAAkB,iBAAgB,oBAAoB,CAAwD,sBAAsB,EAAE;IACtI,uBAAuB,iBAAgB,oBAAoB,CAAkE,4BAA4B,EAAE;IAC3J,wBAAwB,iBAAgB,oBAAoB,CAAoE,6BAA6B,EAAE;IAC/J,0BAA0B,iBAAgB,oBAAoB,CAAwE,+BAA+B,EAAE;IACvK,sBAAsB,iBAAgB,oBAAoB,CAAgE,2BAA2B,EAAE;IACvJ,8BAA8B,iBAAgB,oBAAoB,CAAgF,mCAAmC,EAAE;IACvL,+BAA+B,iBAAgB,oBAAoB,CAAkF,oCAAoC,EAAE;IAC3L,2BAA2B,iBAAgB,oBAAoB,CAA0E,gCAAgC,EAAE;IAC3K,+BAA+B,iBAAgB,oBAAoB,CAAkF,oCAAoC,EAAE;IAC3L,8BAA8B,iBAAgB,oBAAoB,CAAgF,mCAAmC,EAAE;IACvL,oBAAoB,iBAAgB,oBAAoB,CAA4D,yBAAyB,EAAE;IAC/I,oBAAoB,iBAAgB,oBAAoB,CAA4D,yBAAyB,EAAE;IAC/I,wBAAwB,iBAAgB,oBAAoB,CAAoE,8BAA8B,EAAE;IAChK,mBAAmB,iBAAgB,oBAAoB,CAA0D,wBAAwB,EAAE;IAC3I,mBAAmB,iBAAgB,oBAAoB,CAA0D,uBAAuB,EAAE;IAC1I,wBAAwB,iBAAgB,oBAAoB,CAAoE,6BAA6B,EAAE;IAC/J,2BAA2B,iBAAgB,oBAAoB,CAA0E,gCAAgC,EAAE;IAC3K,oBAAoB,iBAAgB,oBAAoB,CAA4D,yBAAyB;;;;"}
|
|
1
|
+
{"version":3,"file":"bundle.esm.js","sources":["../src/generated/react-component-lib/utils/case.ts","../src/generated/react-component-lib/utils/attachProps.ts","../src/generated/react-component-lib/utils/index.tsx","../src/generated/react-component-lib/createComponent.tsx","../src/generated/components.ts"],"sourcesContent":["export const dashToPascalCase = (str: string) =>\n str\n .toLowerCase()\n .split('-')\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join('');\nexport const camelToDashCase = (str: string) =>\n str.replace(/([A-Z])/g, (m: string) => `-${m[0].toLowerCase()}`);\n","import { camelToDashCase } from './case';\n\nexport const attachProps = (node: HTMLElement, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n // add any classes in className to the class list\n const className = getClassName(node.classList, newProps, oldProps);\n if (className !== '') {\n node.className = className;\n }\n\n Object.keys(newProps).forEach((name) => {\n if (\n name === 'children' ||\n name === 'style' ||\n name === 'ref' ||\n name === 'class' ||\n name === 'className' ||\n name === 'forwardedRef'\n ) {\n return;\n }\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2);\n const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name]);\n }\n } else {\n (node as any)[name] = newProps[name];\n const propType = typeof newProps[name];\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name]);\n }\n }\n });\n }\n};\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class;\n const oldClassProp: string = oldProps.className || oldProps.class;\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList);\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);\n const finalClassNames: string[] = [];\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass);\n incomingPropClasses.delete(currentClass);\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass);\n }\n });\n incomingPropClasses.forEach((s) => finalClassNames.push(s));\n return finalClassNames.join(' ');\n};\n\n/**\n * Checks if an event is supported in the current execution environment.\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nexport const isCoveredByReact = (eventNameSuffix: string) => {\n if (typeof document === 'undefined') {\n return true;\n } else {\n const eventName = 'on' + eventNameSuffix;\n let isSupported = eventName in document;\n\n if (!isSupported) {\n const element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof (element as any)[eventName] === 'function';\n }\n\n return isSupported;\n }\n};\n\nexport const syncEvent = (\n node: Element & { __events?: { [key: string]: ((e: Event) => any) | undefined } },\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events || (node.__events = {});\n const oldEventHandler = eventStore[eventName];\n\n // Remove old listener so they don't double up.\n if (oldEventHandler) {\n node.removeEventListener(eventName, oldEventHandler);\n }\n\n // Bind new listener.\n node.addEventListener(\n eventName,\n (eventStore[eventName] = function handler(e: Event) {\n if (newEventHandler) {\n newEventHandler.call(this, e);\n }\n })\n );\n};\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s));\n return map;\n};\n","import React from 'react';\n\nimport type { StyleReactProps } from '../interfaces';\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\n Omit<React.HTMLAttributes<ElementType>, 'style'> &\n StyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value)\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value\n }\n};\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach(ref => {\n setRef(ref, value)\n })\n }\n};\n\nexport const createForwardRef = <PropType, ElementType>(\n ReactComponent: any,\n displayName: string,\n) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>,\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />;\n };\n forwardRef.displayName = displayName;\n\n return React.forwardRef(forwardRef);\n};\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (\n customElement !== undefined &&\n typeof customElements !== 'undefined' &&\n !customElements.get(tagName)\n ) {\n customElements.define(tagName, customElement);\n }\n}\n\nexport * from './attachProps';\nexport * from './case';\n","import React, { createElement } from 'react';\n\nimport {\n attachProps,\n camelToDashCase,\n createForwardRef,\n dashToPascalCase,\n isCoveredByReact,\n mergeRefs,\n} from './utils';\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>;\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>;\n ref?: React.Ref<any>;\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = {},\n ExpandedPropsTypes = {}\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any,\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void,\n) => {\n if (defineCustomElement !== undefined) {\n defineCustomElement();\n }\n\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType;\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element;\n };\n\n constructor(props: StencilReactInternalProps<ElementType>) {\n super(props);\n }\n\n componentDidMount() {\n this.componentDidUpdate(this.props);\n }\n\n componentDidUpdate(prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps);\n }\n\n render() {\n const { children, forwardedRef, style, className, ref, ...cProps } = this.props;\n\n let propsToPass = Object.keys(cProps).reduce((acc: any, name) => {\n const value = (cProps as any)[name];\n\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = value;\n }\n } else {\n // we should only render strings, booleans, and numbers as attrs in html.\n // objects, functions, arrays etc get synced via properties on mount.\n const type = typeof value;\n\n if (type === 'string' || type === 'boolean' || type === 'number') {\n acc[camelToDashCase(name)] = value;\n }\n }\n return acc;\n }, {});\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass);\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n style,\n };\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children);\n }\n\n static get displayName() {\n return displayName;\n }\n };\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext;\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName);\n};\n","/* eslint-disable */\n/* tslint:disable */\n/* auto-generated react proxies */\nimport { createReactComponent } from './react-component-lib';\n\nimport type { JSX } from '@vertexvis/viewer';\n\n\n\nexport const VertexSceneTree = /*@__PURE__*/createReactComponent<JSX.VertexSceneTree, HTMLVertexSceneTreeElement>('vertex-scene-tree');\nexport const VertexSceneTreeSearch = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeSearch, HTMLVertexSceneTreeSearchElement>('vertex-scene-tree-search');\nexport const VertexSceneTreeTableCell = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableCell, HTMLVertexSceneTreeTableCellElement>('vertex-scene-tree-table-cell');\nexport const VertexSceneTreeTableColumn = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableColumn, HTMLVertexSceneTreeTableColumnElement>('vertex-scene-tree-table-column');\nexport const VertexSceneTreeTableHeader = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableHeader, HTMLVertexSceneTreeTableHeaderElement>('vertex-scene-tree-table-header');\nexport const VertexSceneTreeTableLayout = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableLayout, HTMLVertexSceneTreeTableLayoutElement>('vertex-scene-tree-table-layout');\nexport const VertexSceneTreeTableResizeDivider = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeTableResizeDivider, HTMLVertexSceneTreeTableResizeDividerElement>('vertex-scene-tree-table-resize-divider');\nexport const VertexSceneTreeToolbar = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeToolbar, HTMLVertexSceneTreeToolbarElement>('vertex-scene-tree-toolbar');\nexport const VertexSceneTreeToolbarGroup = /*@__PURE__*/createReactComponent<JSX.VertexSceneTreeToolbarGroup, HTMLVertexSceneTreeToolbarGroupElement>('vertex-scene-tree-toolbar-group');\nexport const VertexViewer = /*@__PURE__*/createReactComponent<JSX.VertexViewer, HTMLVertexViewerElement>('vertex-viewer');\nexport const VertexViewerButton = /*@__PURE__*/createReactComponent<JSX.VertexViewerButton, HTMLVertexViewerButtonElement>('vertex-viewer-button');\nexport const VertexViewerDefaultToolbar = /*@__PURE__*/createReactComponent<JSX.VertexViewerDefaultToolbar, HTMLVertexViewerDefaultToolbarElement>('vertex-viewer-default-toolbar');\nexport const VertexViewerDomElement = /*@__PURE__*/createReactComponent<JSX.VertexViewerDomElement, HTMLVertexViewerDomElementElement>('vertex-viewer-dom-element');\nexport const VertexViewerDomGroup = /*@__PURE__*/createReactComponent<JSX.VertexViewerDomGroup, HTMLVertexViewerDomGroupElement>('vertex-viewer-dom-group');\nexport const VertexViewerDomRenderer = /*@__PURE__*/createReactComponent<JSX.VertexViewerDomRenderer, HTMLVertexViewerDomRendererElement>('vertex-viewer-dom-renderer');\nexport const VertexViewerIcon = /*@__PURE__*/createReactComponent<JSX.VertexViewerIcon, HTMLVertexViewerIconElement>('vertex-viewer-icon');\nexport const VertexViewerLayer = /*@__PURE__*/createReactComponent<JSX.VertexViewerLayer, HTMLVertexViewerLayerElement>('vertex-viewer-layer');\nexport const VertexViewerMarkup = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkup, HTMLVertexViewerMarkupElement>('vertex-viewer-markup');\nexport const VertexViewerMarkupArrow = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupArrow, HTMLVertexViewerMarkupArrowElement>('vertex-viewer-markup-arrow');\nexport const VertexViewerMarkupCircle = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupCircle, HTMLVertexViewerMarkupCircleElement>('vertex-viewer-markup-circle');\nexport const VertexViewerMarkupFreeform = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupFreeform, HTMLVertexViewerMarkupFreeformElement>('vertex-viewer-markup-freeform');\nexport const VertexViewerMarkupTool = /*@__PURE__*/createReactComponent<JSX.VertexViewerMarkupTool, HTMLVertexViewerMarkupToolElement>('vertex-viewer-markup-tool');\nexport const VertexViewerMeasurementDetails = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementDetails, HTMLVertexViewerMeasurementDetailsElement>('vertex-viewer-measurement-details');\nexport const VertexViewerMeasurementDistance = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementDistance, HTMLVertexViewerMeasurementDistanceElement>('vertex-viewer-measurement-distance');\nexport const VertexViewerMeasurementLine = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementLine, HTMLVertexViewerMeasurementLineElement>('vertex-viewer-measurement-line');\nexport const VertexViewerMeasurementOverlays = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementOverlays, HTMLVertexViewerMeasurementOverlaysElement>('vertex-viewer-measurement-overlays');\nexport const VertexViewerMeasurementPrecise = /*@__PURE__*/createReactComponent<JSX.VertexViewerMeasurementPrecise, HTMLVertexViewerMeasurementPreciseElement>('vertex-viewer-measurement-precise');\nexport const VertexViewerPinGroup = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinGroup, HTMLVertexViewerPinGroupElement>('vertex-viewer-pin-group');\nexport const VertexViewerPinLabel = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinLabel, HTMLVertexViewerPinLabelElement>('vertex-viewer-pin-label');\nexport const VertexViewerPinLabelLine = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinLabelLine, HTMLVertexViewerPinLabelLineElement>('vertex-viewer-pin-label-line');\nexport const VertexViewerPinTool = /*@__PURE__*/createReactComponent<JSX.VertexViewerPinTool, HTMLVertexViewerPinToolElement>('vertex-viewer-pin-tool');\nexport const VertexViewerToolbar = /*@__PURE__*/createReactComponent<JSX.VertexViewerToolbar, HTMLVertexViewerToolbarElement>('vertex-viewer-toolbar');\nexport const VertexViewerToolbarGroup = /*@__PURE__*/createReactComponent<JSX.VertexViewerToolbarGroup, HTMLVertexViewerToolbarGroupElement>('vertex-viewer-toolbar-group');\nexport const VertexViewerTransformWidget = /*@__PURE__*/createReactComponent<JSX.VertexViewerTransformWidget, HTMLVertexViewerTransformWidgetElement>('vertex-viewer-transform-widget');\nexport const VertexViewerViewCube = /*@__PURE__*/createReactComponent<JSX.VertexViewerViewCube, HTMLVertexViewerViewCubeElement>('vertex-viewer-view-cube');\n"],"names":[],"mappings":";;;;AAAO,IAAM,gBAAgB,GAAG,UAAC,GAAW;IAC1C,OAAA,GAAG;SACA,WAAW,EAAE;SACb,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAA,CAAC;SACpE,IAAI,CAAC,EAAE,CAAC;AAJX,CAIW,CAAC;AACP,IAAM,eAAe,GAAG,UAAC,GAAW;IACzC,O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IAC3K,oBAAoB,iBAAgB,oBAAoB,CAA4D,yBAAyB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertexvis/viewer-react",
|
|
3
|
-
"version": "0.15.0-canary.
|
|
3
|
+
"version": "0.15.0-canary.5",
|
|
4
4
|
"description": "React bindings for the Vertex Viewer SDK.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Vertex Developers <support@vertexvis.com> (https://developer.vertexvis.com)",
|
|
@@ -29,16 +29,17 @@
|
|
|
29
29
|
"format": "yarn lint --fix",
|
|
30
30
|
"lint": "eslint --ext .ts,.tsx,.js,.jsx --ignore-path ../../.gitignore .",
|
|
31
31
|
"test": "echo 'No unit tests defined'",
|
|
32
|
+
"test:ci": "yarn test:coverage",
|
|
32
33
|
"test:coverage": "echo 'No unit tests defined'"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@vertexvis/viewer": "0.15.0-canary.
|
|
36
|
+
"@vertexvis/viewer": "0.15.0-canary.5"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
39
|
"@types/react": "^17.0.22",
|
|
39
40
|
"@types/react-dom": "^17.0.11",
|
|
40
41
|
"@vertexvis/eslint-config-vertexvis-typescript": "^0.5.0",
|
|
41
|
-
"eslint": "^8.
|
|
42
|
+
"eslint": "^8.17.0",
|
|
42
43
|
"react": "^17.0.1",
|
|
43
44
|
"react-dom": "^17.0.1",
|
|
44
45
|
"tslib": "^2.1.0"
|
|
@@ -48,5 +49,5 @@
|
|
|
48
49
|
"react-dom": ">=16.0.0 <18.0.0",
|
|
49
50
|
"tslib": ">=2.1.0"
|
|
50
51
|
},
|
|
51
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "98c2bb9e94690e1d890eaf968ca00f744906b7a0"
|
|
52
53
|
}
|