@economic/taco 2.2.5 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Header/components/Agreement/types.d.ts +1 -1
- package/dist/components/Icon/components/PaymentPaid.d.ts +3 -0
- package/dist/components/Icon/components/PaymentUnpaid.d.ts +3 -0
- package/dist/components/Menu/Context.d.ts +2 -0
- package/dist/components/Menu/components/Item.d.ts +3 -2
- package/dist/components/Provider/Localization.d.ts +12 -0
- package/dist/components/Provider/Provider.d.ts +6 -1
- package/dist/components/Table2/types.d.ts +1 -1
- package/dist/components/Table3/Table3.d.ts +1 -1
- package/dist/components/Table3/components/toolbar/Filter/filters/components/Filter.d.ts +1 -2
- package/dist/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.d.ts +4 -4
- package/dist/components/Table3/components/toolbar/Filter/filters/components/FilterValue.d.ts +1 -1
- package/dist/components/Table3/hooks/features/useColumnFreezing.d.ts +2 -1
- package/dist/components/Table3/hooks/features/useSettings.d.ts +2 -0
- package/dist/components/Table3/hooks/listeners/useSettingsStateListener.d.ts +2 -2
- package/dist/components/Table3/hooks/useTable.d.ts +2 -1
- package/dist/components/Table3/types.d.ts +24 -12
- package/dist/esm/packages/taco/src/components/Menu/Context.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/Menu.js +1 -0
- package/dist/esm/packages/taco/src/components/Menu/Menu.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Content.js +32 -2
- package/dist/esm/packages/taco/src/components/Menu/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Provider/Localization.js +13 -1
- package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Provider/Provider.js +11 -4
- package/dist/esm/packages/taco/src/components/Provider/Provider.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/Select2.js +1 -1
- package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +13 -4
- package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Search.js +7 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +1 -1
- package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table2/types.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/Table3.js +2 -1
- package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js +2 -2
- package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js +4 -19
- package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js +8 -2
- package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js +4 -2
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/Filter.js +2 -24
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/Filter.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js +68 -17
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterValue.js +31 -2
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterValue.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/Placeholder.js +1 -5
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/Placeholder.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js +18 -25
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/hooks/useParentStylesheets.js +5 -0
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/hooks/useParentStylesheets.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js +3 -3
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Search.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Toolbar.js +6 -2
- package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Toolbar.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useColumnFreezing.js +20 -16
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useColumnFreezing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSettings.js +18 -0
- package/dist/esm/packages/taco/src/components/Table3/hooks/features/useSettings.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useSettingsStateListener.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js +2 -4
- package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js +18 -12
- package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/types.js +7 -5
- package/dist/esm/packages/taco/src/components/Table3/types.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/util/filtering.js +24 -6
- package/dist/esm/packages/taco/src/components/Table3/util/filtering.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useLocalStorage.js +34 -0
- package/dist/esm/packages/taco/src/hooks/useLocalStorage.js.map +1 -0
- package/dist/esm/packages/taco/src/hooks/useTacoSettings.js +9 -0
- package/dist/esm/packages/taco/src/hooks/useTacoSettings.js.map +1 -0
- package/dist/esm/packages/taco/src/index.js +1 -1
- package/dist/hooks/useLocalStorage.d.ts +1 -0
- package/dist/hooks/useTacoSettings.d.ts +1 -0
- package/dist/taco.cjs.development.js +367 -183
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/package.json +2 -2
- package/types.json +11451 -10602
- package/dist/components/Table3/components/toolbar/Filter/filters/components/Comparator.d.ts +0 -11
@@ -0,0 +1,3 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<React.SVGProps<SVGSVGElement>, "string" | "children" | "style" | "className" | "id" | "lang" | "tabIndex" | "role" | "color" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "clipPath" | "filter" | "mask" | "path" | "name" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "height" | "max" | "media" | "method" | "min" | "target" | "type" | "width" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan" | "key"> & React.RefAttributes<SVGSVGElement>>;
|
3
|
+
export default _default;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<React.SVGProps<SVGSVGElement>, "string" | "children" | "style" | "className" | "id" | "lang" | "tabIndex" | "role" | "color" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "clipPath" | "filter" | "mask" | "path" | "name" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "height" | "max" | "media" | "method" | "min" | "target" | "type" | "width" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan" | "key"> & React.RefAttributes<SVGSVGElement>>;
|
3
|
+
export default _default;
|
@@ -4,6 +4,7 @@ export declare const MenuContext: React.Context<{
|
|
4
4
|
registerIndentation: () => void;
|
5
5
|
minWidth?: number | undefined;
|
6
6
|
setMinWidth: (width: number) => void;
|
7
|
+
open: () => void;
|
7
8
|
close: () => void;
|
8
9
|
} | undefined>;
|
9
10
|
export declare const useCurrentMenu: () => {
|
@@ -11,5 +12,6 @@ export declare const useCurrentMenu: () => {
|
|
11
12
|
registerIndentation: () => void;
|
12
13
|
minWidth?: number | undefined;
|
13
14
|
setMinWidth: (width: number) => void;
|
15
|
+
open: () => void;
|
14
16
|
close: () => void;
|
15
17
|
} | undefined;
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
2
2
|
import { IconName } from '../../Icon/Icon';
|
3
3
|
import { DialogProps } from '../../Dialog/Dialog';
|
4
4
|
import { PopoverProps } from '../../Popover/Popover';
|
5
|
+
import { KeyDownHandlerOptions } from '../../../utils/keyboard';
|
5
6
|
export declare const Icon: ({ name }: {
|
6
7
|
name: any;
|
7
8
|
}) => JSX.Element;
|
@@ -16,7 +17,7 @@ export declare type MenuItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, '
|
|
16
17
|
icon?: IconName;
|
17
18
|
onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
18
19
|
popover?: (props: Partial<PopoverProps>) => JSX.Element;
|
19
|
-
shortcut?: string;
|
20
|
+
shortcut?: string | KeyDownHandlerOptions;
|
20
21
|
subMenu?: any;
|
21
22
|
};
|
22
23
|
export declare const Item: React.ForwardRefExoticComponent<Pick<React.HTMLAttributes<HTMLDivElement>, "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
|
@@ -25,6 +26,6 @@ export declare const Item: React.ForwardRefExoticComponent<Pick<React.HTMLAttrib
|
|
25
26
|
icon?: "account-preview" | "accounting-year-cancel" | "accounting-year" | "accounting" | "arrow-bottom" | "arrow-down" | "arrow-end" | "arrow-left" | "arrow-right" | "arrow-start" | "arrow-top" | "arrow-up" | "attach-auto" | "attach-cancel" | "attach" | "autotext-insert" | "autotext" | "basic-tabs" | "basic" | "bell-solid" | "book" | "booking" | "budget" | "calendar" | "cash-account" | "cash-reports" | "chat-solid" | "chat" | "chevron-down-double" | "chevron-down-solid" | "chevron-down" | "chevron-left-double" | "chevron-left-solid" | "chevron-left" | "chevron-right-double" | "chevron-right-solid" | "chevron-right" | "chevron-up-double" | "chevron-up-solid" | "chevron-up" | "circle-close" | "circle-minus" | "circle-plus" | "circle-tick" | "clamp-open" | "clamp" | "close" | "column-freeze" | "column-unfreeze" | "columns" | "connection-enable" | "connection-revoke" | "contacts" | "copy" | "courses" | "credit" | "delete-permanently" | "delete" | "depecriate" | "developer" | "distribution-template" | "document-approve" | "document-create-entry" | "document-cut" | "document-error" | "document-isolate-page" | "document-merge" | "document-move" | "document-preview" | "document-received" | "document-rejected-request" | "document-split" | "document-time" | "document" | "download" | "drag" | "e-copedia" | "e-signature" | "edit" | "ellipsis-horizontal" | "ellipsis-vertical" | "entries-on-account" | "entries-open" | "entries-warning" | "entry-type-customer-invoice" | "entry-type-customer-payment" | "entry-type-journal-entry" | "entry-type-manual-customer-invoice" | "entry-type-supplier-invoice" | "entry-type-supplier-payment" | "envelope-approved" | "envelope" | "expand-view" | "expenses" | "export-to-excel" | "export-to-pdf" | "export" | "eye-off" | "eye-on" | "filter-solid" | "filter" | "font-size" | "graph-solid" | "hash" | "height-extra-tall" | "height-medium" | "height-short" | "height-tall" | "home" | "images" | "import" | "inbox-einvoicing" | "inbox-scanning" | "inbox-smart" | "inbox" | "info" | "inventory-matrix" | "inventory" | "journal-pro" | "layout-both" | "layout-first" | "layout-last" | "layout-none" | "layout" | "ledger-card-customer-reminder" | "ledger-card-manual-customer-invoice" | "ledger-card-obsolete-stock" | "ledger-card-opening-entry" | "ledger-card-reserved-entry" | "ledger-card-shrinkage-pilferage" | "ledger-card-stock-adjustment" | "ledger-card-transferred-opening-entry" | "ledger-card" | "lightbulb" | "line" | "list-bulleted" | "list-search" | "list" | "lock-open" | "log-out" | "log" | "market" | "match-amount" | "match-entries" | "menu" | "mileage" | "modal-resize" | "modal-shrink" | "more-solid" | "more" | "move" | "navigation-list" | "note-follow-up" | "note-read" | "note" | "numbers" | "partner-api" | "period" | "person-change" | "person-minus" | "person-plus" | "person-tick" | "play" | "plus-minus" | "print" | "process-payment" | "product-ledger-card" | "profile" | "project-cards" | "projects" | "question-mark" | "quicklinks" | "rating-bankruptcy" | "rating-payment-problems" | "reconciled" | "refresh" | "report-solid" | "report" | "restore" | "rotate-left" | "rotate-right" | "sales" | "search-bold" | "search" | "secure-tick" | "secure" | "settings-solid" | "settings" | "shortcuts" | "show-all" | "show-less" | "show-more" | "show-template" | "sliders" | "smartpay" | "sort-by" | "star-solid" | "star" | "subscriptions" | "system-entries" | "tag" | "template-override" | "templates" | "thumb-both" | "thumb-down-solid" | "thumb-down" | "thumb-up-solid" | "thumb-up" | "tick-bold" | "tick" | "time" | "transfer-cancel" | "transfer-locked" | "transfer" | "undo" | "undock" | "unreconciled" | "warning" | "webshop" | "website" | "workflow-template-basic" | "workflow" | "zoom" | undefined;
|
26
27
|
onClick?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
|
27
28
|
popover?: ((props: Partial<PopoverProps>) => JSX.Element) | undefined;
|
28
|
-
shortcut?: string | undefined;
|
29
|
+
shortcut?: string | KeyDownHandlerOptions | undefined;
|
29
30
|
subMenu?: any;
|
30
31
|
} & React.RefAttributes<HTMLDivElement>>;
|
@@ -330,6 +330,15 @@ export declare const defaultLocalisationTexts: {
|
|
330
330
|
isAllOf: string;
|
331
331
|
isEmpty: string;
|
332
332
|
isNotEmpty: string;
|
333
|
+
isBefore: string;
|
334
|
+
isAfter: string;
|
335
|
+
isOnOrBefore: string;
|
336
|
+
isOnOrAfter: string;
|
337
|
+
isLessThanOrEqualTo: string;
|
338
|
+
isGreaterThanOrEqualTo: string;
|
339
|
+
hasAnyOf: string;
|
340
|
+
hasAllOf: string;
|
341
|
+
hasNoneOf: string;
|
333
342
|
};
|
334
343
|
conditions: {
|
335
344
|
and: string;
|
@@ -397,6 +406,9 @@ export declare const defaultLocalisationTexts: {
|
|
397
406
|
expandRow: string;
|
398
407
|
collapseRow: string;
|
399
408
|
};
|
409
|
+
otherOptions: {
|
410
|
+
tooltip: string;
|
411
|
+
};
|
400
412
|
};
|
401
413
|
searchInput: {
|
402
414
|
button: string;
|
@@ -1,9 +1,14 @@
|
|
1
|
-
|
1
|
+
import * as React from 'react';
|
2
2
|
import { Localization } from './Localization';
|
3
|
+
export declare type TacoSettings = {
|
4
|
+
uniqueUserIdentifier: string;
|
5
|
+
};
|
6
|
+
export declare const TacoContext: React.Context<TacoSettings>;
|
3
7
|
export declare type ProviderProps = {
|
4
8
|
/** Content would be your application */
|
5
9
|
children?: any;
|
6
10
|
/** Define localized texts and formatted data in your application */
|
7
11
|
localization?: Localization;
|
12
|
+
settings: TacoSettings;
|
8
13
|
};
|
9
14
|
export declare const Provider: (props: ProviderProps) => JSX.Element;
|
@@ -33,7 +33,7 @@ export declare type Table2ColumnControlProps = {
|
|
33
33
|
className?: string;
|
34
34
|
disabled?: boolean;
|
35
35
|
invalid?: boolean;
|
36
|
-
onBlur: (newValue?: any) => Promise<void
|
36
|
+
onBlur: ((newValue?: any) => void) | ((newValue?: any) => Promise<void>);
|
37
37
|
onFocus: React.FocusEventHandler;
|
38
38
|
readOnly?: boolean;
|
39
39
|
ref: React.RefObject<HTMLElement>;
|
@@ -10,4 +10,4 @@ declare type Table3WithStatics = (<TType = unknown>(props: Table3Props<TType> &
|
|
10
10
|
export declare const Table3: Table3WithStatics;
|
11
11
|
export { useTable3DataLoader } from './hooks/useTableDataLoader';
|
12
12
|
export type { useTable3DataFetcher, useTable3DataOptions, useTable3DataFetcherValues as useTableDataValues, } from './hooks/useTableDataLoader';
|
13
|
-
export type { Table3Ref, Table3Props, Table3Preset, Table3Settings,
|
13
|
+
export type { Table3Ref, Table3Props, Table3Preset, Table3Settings, Table3SettingsHandler, Table3RowHeight, Table3FilterComparator, Table3FilterHandler, Table3LoadPageHandler, Table3LoadAllHandler, Table3RowGotoHandler, Table3SortHandler, Table3Shortcuts, Table3ShortcutHandlerFn, Table3ShortcutHandlerObject, Table3FontSize, Table3SortDirection, Table3SortFn, Table3RowActionRenderer, Table3RowSelectionHandler, Table3RowExpansionRenderer, Table3RowDropHandler, Table3RowDragHandler, Table3RowClickHandler, Table3ColumnProps, Table3ColumnAlignment, Table3ColumnDataType, Table3ColumnHeaderMenu, Table3ColumnClassNameHandler, Table3ColumnFooterRenderer, Table3ColumnRenderer, Table3ColumnControlRenderer, Table3ColumnControlProps, } from './types';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { Column as RTColumn, ColumnFiltersState } from '@tanstack/react-table';
|
3
|
-
import {
|
3
|
+
import { Table3Filter } from '../../../../../types';
|
4
4
|
export declare type FilterProps<TType = unknown> = {
|
5
5
|
allColumns: RTColumn<TType, unknown>[];
|
6
6
|
filter: Table3Filter;
|
@@ -10,4 +10,3 @@ export declare type FilterProps<TType = unknown> = {
|
|
10
10
|
onRemove: (columnId: string) => void;
|
11
11
|
};
|
12
12
|
export declare function Filter<TType = unknown>(props: FilterProps<TType>): JSX.Element;
|
13
|
-
export declare function guessComparatorsBasedOnControl<TType = unknown>(instance?: JSX.Element, control?: Table3ColumnControlRenderer<TType>): Table3FilterComparator[];
|
package/dist/components/Table3/components/toolbar/Filter/filters/components/FilterComparator.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
+
import { Column as RTColumn } from '@tanstack/react-table';
|
2
3
|
import { Select2Props } from '../../../../../../Select2/Select2';
|
3
|
-
|
4
|
-
|
5
|
-
validComparators: Table3FilterComparator[];
|
4
|
+
export declare type FilterComparatorProps<TType = unknown> = Omit<Select2Props, 'children'> & {
|
5
|
+
column?: RTColumn<TType, unknown>;
|
6
6
|
};
|
7
|
-
export declare function FilterComparator(props: FilterComparatorProps): JSX.Element;
|
7
|
+
export declare function FilterComparator<TType = unknown>(props: FilterComparatorProps<TType>): JSX.Element;
|
package/dist/components/Table3/components/toolbar/Filter/filters/components/FilterValue.d.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
import { Column as RTColumn } from '@tanstack/react-table';
|
3
3
|
import { Table3FilterComparator } from '../../../../../types';
|
4
4
|
export declare type FilterValueProps<TType = unknown> = {
|
5
|
-
column
|
5
|
+
column?: RTColumn<TType, unknown>;
|
6
6
|
comparator: Table3FilterComparator;
|
7
7
|
onChange: (value: any) => void;
|
8
8
|
value: any;
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
2
2
|
import React from 'react';
|
3
3
|
import { Table3Options } from '../../types';
|
4
|
-
export declare function
|
4
|
+
export declare function getFrozenInternalColumnCount(options: Table3Options): number;
|
5
5
|
export declare function useColumnFreezing(defaultFrozenIndex: number | undefined, options: Table3Options): {
|
6
6
|
isEnabled: boolean;
|
7
|
+
frozenInternalColumnCount: number;
|
7
8
|
frozenColumnIndex: number | undefined;
|
8
9
|
setFrozenColumnIndex: (index: number | undefined) => void;
|
9
10
|
horizontallyScrolled: boolean;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { Table as RTable } from '@tanstack/react-table';
|
2
|
-
import {
|
3
|
-
export declare function useSettingsStateListener<TType = unknown>(table: RTable<TType>, onChangeSettings:
|
2
|
+
import { Table3SettingsHandler } from '../../types';
|
3
|
+
export declare function useSettingsStateListener<TType = unknown>(table: RTable<TType>, onChangeSettings: Table3SettingsHandler | undefined): void;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { RowData } from '@tanstack/react-table';
|
3
|
-
import { Table3ColumnAlignment, Table3ColumnRenderer, Table3Props, Table3ColumnHeaderMenu, Table3ColumnControlRenderer, Table3ColumnDataType, Table3ColumnClassNameHandler, Table3ColumnFooterRenderer, TableStrategy } from '../types';
|
3
|
+
import { Table3ColumnAlignment, Table3ColumnRenderer, Table3Props, Table3ColumnHeaderMenu, Table3ColumnControlRenderer, Table3ColumnDataType, Table3ColumnClassNameHandler, Table3ColumnFooterRenderer, TableStrategy, Table3FilterComparator } from '../types';
|
4
4
|
import { useCurrentRow } from './features/useCurrentRow';
|
5
5
|
import { usePauseHoverState } from './features/usePauseHoverState';
|
6
6
|
import { useRowHeight } from './features/useRowHeight';
|
@@ -44,6 +44,7 @@ declare module '@tanstack/table-core' {
|
|
44
44
|
enableOrdering: boolean;
|
45
45
|
enableSearch: boolean;
|
46
46
|
enableTruncate: boolean;
|
47
|
+
filters?: Table3FilterComparator[];
|
47
48
|
footer?: Table3ColumnFooterRenderer;
|
48
49
|
header: string;
|
49
50
|
headerClassName?: string;
|
@@ -7,7 +7,7 @@ export declare type Table3ColumnRenderer<TValue = unknown, TType = unknown> = (v
|
|
7
7
|
export declare type Table3ColumnFooterRenderer<TValue = unknown> = (values: TValue[]) => JSX.Element | string | number | null;
|
8
8
|
export declare type Table3ColumnClassNameHandler<TType = unknown> = string | ((row: TType) => string | undefined);
|
9
9
|
export declare type Table3ColumnAlignment = 'left' | 'center' | 'right';
|
10
|
-
export declare type Table3ColumnDataType = 'auto' | 'alphanumeric' | 'alphanumericCaseSensitive' | 'datetime' | 'boolean';
|
10
|
+
export declare type Table3ColumnDataType = 'auto' | 'number' | 'alphanumeric' | 'alphanumericCaseSensitive' | 'datetime' | 'boolean';
|
11
11
|
export declare type Table3ColumnHeaderMenu = (props: Partial<MenuProps>) => JSX.Element;
|
12
12
|
export declare type Table3ColumnControlProps = {
|
13
13
|
className?: string;
|
@@ -20,7 +20,7 @@ export declare type Table3ColumnControlProps = {
|
|
20
20
|
setValue: (value: any) => void;
|
21
21
|
value: any;
|
22
22
|
};
|
23
|
-
export declare type Table3ColumnControlRenderer<TType = unknown> = ((props: Table3ColumnControlProps, row?: TType) => JSX.Element) | 'datepicker' | 'input' | 'switch';
|
23
|
+
export declare type Table3ColumnControlRenderer<TType = unknown> = ((props: Table3ColumnControlProps, row?: TType) => JSX.Element) | 'datepicker' | 'input' | 'numberInput' | 'switch' | 'textarea';
|
24
24
|
declare type ValueOf<T> = T[keyof T];
|
25
25
|
export declare type Table3ColumnProps<TType = unknown> = ValueOf<{
|
26
26
|
[K in keyof TType]: {
|
@@ -39,6 +39,7 @@ export declare type Table3ColumnProps<TType = unknown> = ValueOf<{
|
|
39
39
|
enableSearch?: boolean;
|
40
40
|
enableSorting?: boolean;
|
41
41
|
enableTruncate?: boolean;
|
42
|
+
filters?: Table3FilterComparator[];
|
42
43
|
footer?: Table3ColumnFooterRenderer;
|
43
44
|
header: string;
|
44
45
|
headerClassName?: string;
|
@@ -72,7 +73,7 @@ export declare type Table3Settings = {
|
|
72
73
|
rowHeight?: Table3RowHeight;
|
73
74
|
sorting?: SortingState;
|
74
75
|
};
|
75
|
-
export declare type
|
76
|
+
export declare type Table3SettingsHandler = (settings: Table3Settings) => void | Promise<void>;
|
76
77
|
export declare enum Table3FilterComparator {
|
77
78
|
Contains = 0,
|
78
79
|
DoesNotContain = 1,
|
@@ -81,11 +82,13 @@ export declare enum Table3FilterComparator {
|
|
81
82
|
IsGreaterThan = 4,
|
82
83
|
IsLessThan = 5,
|
83
84
|
IsBetween = 6,
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
85
|
+
IsEmpty = 7,
|
86
|
+
IsNotEmpty = 8,
|
87
|
+
IsLessThanOrEqualTo = 9,
|
88
|
+
IsGreaterThanOrEqualTo = 10,
|
89
|
+
HasAnyOf = 11,
|
90
|
+
HasAllOf = 12,
|
91
|
+
HasNoneOf = 13
|
89
92
|
}
|
90
93
|
export declare type Table3FilterValue = {
|
91
94
|
comparator: Table3FilterComparator;
|
@@ -147,7 +150,7 @@ export declare type Table3CommonProps<TType = unknown> = Partial<Table3Options>
|
|
147
150
|
emptyState?: () => JSX.Element | null;
|
148
151
|
expandedRowRenderer?: Table3RowExpansionRenderer<TType>;
|
149
152
|
id: string;
|
150
|
-
onChangeSettings?:
|
153
|
+
onChangeSettings?: Table3SettingsHandler;
|
151
154
|
onRowClick?: Table3RowClickHandler<TType>;
|
152
155
|
onRowDrag?: Table3RowDragHandler<TType>;
|
153
156
|
onRowDrop?: Table3RowDropHandler<TType>;
|
@@ -259,11 +262,17 @@ export declare type Table3Texts = {
|
|
259
262
|
isGreaterThan: string;
|
260
263
|
isLessThan: string;
|
261
264
|
isBetween: string;
|
262
|
-
isOneOf: string;
|
263
|
-
isNoneOf: string;
|
264
|
-
isAllOf: string;
|
265
265
|
isEmpty: string;
|
266
266
|
isNotEmpty: string;
|
267
|
+
isBefore: string;
|
268
|
+
isAfter: string;
|
269
|
+
isLessThanOrEqualTo: string;
|
270
|
+
isGreaterThanOrEqualTo: string;
|
271
|
+
isOnOrBefore: string;
|
272
|
+
isOnOrAfter: string;
|
273
|
+
hasAnyOf: string;
|
274
|
+
hasAllOf: string;
|
275
|
+
hasNoneOf: string;
|
267
276
|
};
|
268
277
|
conditions: {
|
269
278
|
and: string;
|
@@ -316,5 +325,8 @@ export declare type Table3Texts = {
|
|
316
325
|
excludeUnmatchedResults: string;
|
317
326
|
placeholder: string;
|
318
327
|
};
|
328
|
+
otherOptions: {
|
329
|
+
tooltip: string;
|
330
|
+
};
|
319
331
|
};
|
320
332
|
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Context.js","sources":["../../../../../../../src/components/Menu/Context.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport const MenuContext = React.createContext<\n | {\n indented: boolean;\n registerIndentation: () => void;\n minWidth?: number;\n setMinWidth: (width: number) => void;\n close: () => void;\n }\n | undefined\n>(undefined);\n\nexport const useCurrentMenu = () => {\n return React.useContext(MenuContext);\n};\n"],"names":["MenuContext","React","undefined","useCurrentMenu"],"mappings":";;MAEaA,WAAW,gBAAGC,aAAmB,
|
1
|
+
{"version":3,"file":"Context.js","sources":["../../../../../../../src/components/Menu/Context.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport const MenuContext = React.createContext<\n | {\n indented: boolean;\n registerIndentation: () => void;\n minWidth?: number;\n setMinWidth: (width: number) => void;\n open: () => void;\n close: () => void;\n }\n | undefined\n>(undefined);\n\nexport const useCurrentMenu = () => {\n return React.useContext(MenuContext);\n};\n"],"names":["MenuContext","React","undefined","useCurrentMenu"],"mappings":";;MAEaA,WAAW,gBAAGC,aAAmB,CAU5CC,SAAS;MAEEC,cAAc,GAAG;EAC1B,OAAOF,UAAgB,CAACD,WAAW,CAAC;AACxC;;;;"}
|
@@ -35,6 +35,7 @@ const Menu = /*#__PURE__*/forwardRef(function Menu(externalProps, ref) {
|
|
35
35
|
registerIndentation: () => setIndented(true),
|
36
36
|
minWidth,
|
37
37
|
setMinWidth: width => setMinWidth(width),
|
38
|
+
open: () => setOpen(true),
|
38
39
|
close: () => setOpen(false)
|
39
40
|
}), [indented, minWidth]);
|
40
41
|
return /*#__PURE__*/createElement(MenuContext.Provider, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Menu.js","sources":["../../../../../../../src/components/Menu/Menu.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { MenuContext } from './Context';\nimport { Content, MenuContentProps } from './components/Content';\nimport { Item, MenuItemProps } from './components/Item';\nimport { Link, MenuLinkItemProps } from './components/Link';\nimport { Trigger, MenuTriggerProps } from './components/Trigger';\nimport { Checkbox, MenuCheckboxItemProps } from './components/Checkbox';\nimport { ForwardedMenuRadioGroupWithStatics, RadioGroup } from './components/RadioGroup';\nimport { Separator } from './components/Separator';\nimport { Header, MenuHeaderProps } from './components/Header';\nimport { SubMenu, MenuSubMenuProps } from './components/SubMenu';\n\nexport type MenuProps = {\n children: React.ReactNode;\n /** Set whether the menu is open by default or not */\n defaultOpen?: boolean;\n /** Called when the menu opens or closes, must be used in conjunction with open */\n onChange?: (open: boolean) => void;\n /** Control the open state of the menu from outside the component */\n open?: boolean;\n /** A trigger to be used for the menu, should not be set if `children` already contains a trigger */\n trigger?: JSX.Element;\n};\nexport type ForwardedMenuWithStatics = React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLElement>> & {\n Trigger: React.ForwardRefExoticComponent<MenuTriggerProps>;\n Content: React.ForwardRefExoticComponent<MenuContentProps>;\n Item: React.ForwardRefExoticComponent<MenuItemProps>;\n Link: React.ForwardRefExoticComponent<MenuLinkItemProps>;\n Checkbox: React.ForwardRefExoticComponent<MenuCheckboxItemProps>;\n Separator: React.FunctionComponent;\n Header: React.ForwardRefExoticComponent<MenuHeaderProps>;\n RadioGroup: ForwardedMenuRadioGroupWithStatics;\n SubMenu: React.ForwardRefExoticComponent<MenuSubMenuProps>;\n};\n\nexport const Menu = React.forwardRef<HTMLButtonElement, MenuProps>(function Menu(externalProps, ref) {\n const { children, defaultOpen: defaultProp, onChange, open: prop, trigger, ...props } = externalProps;\n const [indented, setIndented] = React.useState(false);\n const [minWidth, setMinWidth] = React.useState<number | undefined>(undefined);\n\n const [open, setOpen] = useControllableState<boolean>({\n // uncontrolled\n defaultProp,\n // controlled\n onChange,\n prop,\n });\n\n const context = React.useMemo(\n () => ({\n indented,\n registerIndentation: () => setIndented(true),\n minWidth,\n setMinWidth: (width: number) => setMinWidth(width),\n close: () => setOpen(false),\n }),\n [indented, minWidth]\n );\n\n return (\n <MenuContext.Provider value={context}>\n <DropdownMenuPrimitive.Root {...props} modal={false} open={open} onOpenChange={setOpen}>\n {trigger && <Trigger ref={ref}>{trigger}</Trigger>}\n {children}\n </DropdownMenuPrimitive.Root>\n </MenuContext.Provider>\n );\n}) as ForwardedMenuWithStatics;\nMenu.Trigger = Trigger;\nMenu.Content = Content;\nMenu.Item = Item;\nMenu.Link = Link;\nMenu.Checkbox = Checkbox;\nMenu.Separator = Separator;\nMenu.Header = Header;\nMenu.RadioGroup = RadioGroup;\nMenu.SubMenu = SubMenu;\n"],"names":["Menu","React","externalProps","ref","children","defaultOpen","defaultProp","onChange","open","prop","trigger","props","indented","setIndented","minWidth","setMinWidth","undefined","setOpen","useControllableState","context","registerIndentation","width","close","MenuContext","Provider","value","DropdownMenuPrimitive","modal","onOpenChange","Trigger","Content","Item","Link","Checkbox","Separator","Header","RadioGroup","SubMenu"],"mappings":";;;;;;;;;;;;;;MAqCaA,IAAI,gBAAGC,UAAgB,CAA+B,SAASD,IAAI,CAACE,aAAa,EAAEC,GAAG;EAC/F,MAAM;IAAEC,QAAQ;IAAEC,WAAW,EAAEC,WAAW;IAAEC,QAAQ;IAAEC,IAAI,EAAEC,IAAI;IAAEC,OAAO;IAAE,GAAGC;GAAO,GAAGT,aAAa;EACrG,MAAM,CAACU,QAAQ,EAAEC,WAAW,CAAC,GAAGZ,QAAc,CAAC,KAAK,CAAC;EACrD,MAAM,CAACa,QAAQ,EAAEC,WAAW,CAAC,GAAGd,QAAc,CAAqBe,SAAS,CAAC;EAE7E,MAAM,CAACR,IAAI,EAAES,OAAO,CAAC,GAAGC,oBAAoB,CAAU;;IAElDZ,WAAW;;IAEXC,QAAQ;IACRE;GACH,CAAC;EAEF,MAAMU,OAAO,GAAGlB,OAAa,CACzB,OAAO;IACHW,QAAQ;IACRQ,mBAAmB,EAAE,MAAMP,WAAW,CAAC,IAAI,CAAC;IAC5CC,QAAQ;IACRC,WAAW,EAAGM,KAAa,IAAKN,WAAW,CAACM,KAAK,CAAC;
|
1
|
+
{"version":3,"file":"Menu.js","sources":["../../../../../../../src/components/Menu/Menu.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { MenuContext } from './Context';\nimport { Content, MenuContentProps } from './components/Content';\nimport { Item, MenuItemProps } from './components/Item';\nimport { Link, MenuLinkItemProps } from './components/Link';\nimport { Trigger, MenuTriggerProps } from './components/Trigger';\nimport { Checkbox, MenuCheckboxItemProps } from './components/Checkbox';\nimport { ForwardedMenuRadioGroupWithStatics, RadioGroup } from './components/RadioGroup';\nimport { Separator } from './components/Separator';\nimport { Header, MenuHeaderProps } from './components/Header';\nimport { SubMenu, MenuSubMenuProps } from './components/SubMenu';\n\nexport type MenuProps = {\n children: React.ReactNode;\n /** Set whether the menu is open by default or not */\n defaultOpen?: boolean;\n /** Called when the menu opens or closes, must be used in conjunction with open */\n onChange?: (open: boolean) => void;\n /** Control the open state of the menu from outside the component */\n open?: boolean;\n /** A trigger to be used for the menu, should not be set if `children` already contains a trigger */\n trigger?: JSX.Element;\n};\nexport type ForwardedMenuWithStatics = React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLElement>> & {\n Trigger: React.ForwardRefExoticComponent<MenuTriggerProps>;\n Content: React.ForwardRefExoticComponent<MenuContentProps>;\n Item: React.ForwardRefExoticComponent<MenuItemProps>;\n Link: React.ForwardRefExoticComponent<MenuLinkItemProps>;\n Checkbox: React.ForwardRefExoticComponent<MenuCheckboxItemProps>;\n Separator: React.FunctionComponent;\n Header: React.ForwardRefExoticComponent<MenuHeaderProps>;\n RadioGroup: ForwardedMenuRadioGroupWithStatics;\n SubMenu: React.ForwardRefExoticComponent<MenuSubMenuProps>;\n};\n\nexport const Menu = React.forwardRef<HTMLButtonElement, MenuProps>(function Menu(externalProps, ref) {\n const { children, defaultOpen: defaultProp, onChange, open: prop, trigger, ...props } = externalProps;\n const [indented, setIndented] = React.useState(false);\n const [minWidth, setMinWidth] = React.useState<number | undefined>(undefined);\n\n const [open, setOpen] = useControllableState<boolean>({\n // uncontrolled\n defaultProp,\n // controlled\n onChange,\n prop,\n });\n\n const context = React.useMemo(\n () => ({\n indented,\n registerIndentation: () => setIndented(true),\n minWidth,\n setMinWidth: (width: number) => setMinWidth(width),\n open: () => setOpen(true),\n close: () => setOpen(false),\n }),\n [indented, minWidth]\n );\n\n return (\n <MenuContext.Provider value={context}>\n <DropdownMenuPrimitive.Root {...props} modal={false} open={open} onOpenChange={setOpen}>\n {trigger && <Trigger ref={ref}>{trigger}</Trigger>}\n {children}\n </DropdownMenuPrimitive.Root>\n </MenuContext.Provider>\n );\n}) as ForwardedMenuWithStatics;\nMenu.Trigger = Trigger;\nMenu.Content = Content;\nMenu.Item = Item;\nMenu.Link = Link;\nMenu.Checkbox = Checkbox;\nMenu.Separator = Separator;\nMenu.Header = Header;\nMenu.RadioGroup = RadioGroup;\nMenu.SubMenu = SubMenu;\n"],"names":["Menu","React","externalProps","ref","children","defaultOpen","defaultProp","onChange","open","prop","trigger","props","indented","setIndented","minWidth","setMinWidth","undefined","setOpen","useControllableState","context","registerIndentation","width","close","MenuContext","Provider","value","DropdownMenuPrimitive","modal","onOpenChange","Trigger","Content","Item","Link","Checkbox","Separator","Header","RadioGroup","SubMenu"],"mappings":";;;;;;;;;;;;;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I;AAChB/B,IAAI,CAACgC,IAAI,GAAGA,IAAI;AAChBhC,IAAI,CAACiC,QAAQ,GAAGA,QAAQ;AACxBjC,IAAI,CAACkC,SAAS,GAAGA,SAAS;AAC1BlC,IAAI,CAACmC,MAAM,GAAGA,MAAM;AACpBnC,IAAI,CAACoC,UAAU,GAAGA,UAAU;AAC5BpC,IAAI,CAACqC,OAAO,GAAGA,OAAO;;;;"}
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { forwardRef, createElement } from 'react';
|
1
|
+
import { forwardRef, useRef, Children, createRef, cloneElement, useEffect, createElement } from 'react';
|
2
2
|
import cn from 'classnames';
|
3
3
|
import { useMergedRef } from '../../../hooks/useMergedRef.js';
|
4
|
+
import { createShortcutKeyDownHandler } from '../../../utils/keyboard.js';
|
4
5
|
import { useCurrentMenu } from '../Context.js';
|
5
6
|
import { Portal, Content as Content$1 } from '@radix-ui/react-dropdown-menu';
|
6
7
|
|
@@ -14,6 +15,35 @@ const Content = /*#__PURE__*/forwardRef(function MenuContent(props, ref) {
|
|
14
15
|
...otherProps
|
15
16
|
} = props;
|
16
17
|
const className = cn('border border-transparent rounded block outline-none p-1 yt-shadow wcag-white', props.className);
|
18
|
+
// attach refs to each child
|
19
|
+
const childrenRefs = useRef([]);
|
20
|
+
const childrenWithRefs = Children.toArray(props.children).filter(child => !!child) // remove falsey children
|
21
|
+
.map((child, index) => {
|
22
|
+
childrenRefs.current[index] = /*#__PURE__*/createRef();
|
23
|
+
return /*#__PURE__*/cloneElement(child, {
|
24
|
+
ref: childrenRefs.current[index]
|
25
|
+
});
|
26
|
+
});
|
27
|
+
// register any shortcuts attached to children
|
28
|
+
useEffect(() => {
|
29
|
+
const shortcuts = [];
|
30
|
+
childrenWithRefs.forEach((child, index) => {
|
31
|
+
if (child.props.shortcut) {
|
32
|
+
shortcuts.push(createShortcutKeyDownHandler(child.props.shortcut, event => {
|
33
|
+
event.preventDefault();
|
34
|
+
menu === null || menu === void 0 ? void 0 : menu.open();
|
35
|
+
setTimeout(() => {
|
36
|
+
var _childrenRefs$current, _childrenRefs$current2;
|
37
|
+
return (_childrenRefs$current = childrenRefs.current[index]) === null || _childrenRefs$current === void 0 ? void 0 : (_childrenRefs$current2 = _childrenRefs$current.current) === null || _childrenRefs$current2 === void 0 ? void 0 : _childrenRefs$current2.click();
|
38
|
+
}, 1);
|
39
|
+
}));
|
40
|
+
}
|
41
|
+
});
|
42
|
+
shortcuts.forEach(handler => document.addEventListener('keydown', handler));
|
43
|
+
return () => {
|
44
|
+
shortcuts.forEach(handler => document.removeEventListener('keydown', handler));
|
45
|
+
};
|
46
|
+
}, []);
|
17
47
|
return /*#__PURE__*/createElement(Portal, null, /*#__PURE__*/createElement(Content$1, Object.assign({}, otherProps, {
|
18
48
|
align: align,
|
19
49
|
className: className,
|
@@ -24,7 +54,7 @@ const Content = /*#__PURE__*/forwardRef(function MenuContent(props, ref) {
|
|
24
54
|
minWidth: menu === null || menu === void 0 ? void 0 : menu.minWidth
|
25
55
|
},
|
26
56
|
ref: internalRef
|
27
|
-
}),
|
57
|
+
}), childrenWithRefs));
|
28
58
|
});
|
29
59
|
|
30
60
|
export { Content };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Content.js","sources":["../../../../../../../../src/components/Menu/components/Content.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'classnames';\nimport { Align, Placement } from '../../../types';\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport { useCurrentMenu } from '../Context';\n\nexport type MenuContentProps = Omit<DropdownMenuPrimitive.DropdownMenuContentProps, 'children' | 'side'> & {\n align?: Align;\n children: React.ReactNode;\n /** Set the position of the Menu relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\n\nexport const Content = React.forwardRef(function MenuContent(props: MenuContentProps, ref: React.Ref<HTMLDivElement>) {\n const internalRef = useMergedRef<any>(ref);\n const menu = useCurrentMenu();\n const { align = 'start', children, placement: side, ...otherProps } = props;\n const className = cn('border border-transparent rounded block outline-none p-1 yt-shadow wcag-white', props.className);\n\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n {...otherProps}\n align={align}\n className={className}\n data-taco=\"menu\"\n side={side}\n sideOffset={3}\n style={{ minWidth: menu?.minWidth }}\n ref={internalRef}>\n {
|
1
|
+
{"version":3,"file":"Content.js","sources":["../../../../../../../../src/components/Menu/components/Content.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'classnames';\nimport { Align, Placement } from '../../../types';\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport { useCurrentMenu } from '../Context';\nimport { createShortcutKeyDownHandler } from '../../../utils/keyboard';\nimport { MenuItemProps } from './Item';\n\nexport type MenuContentProps = Omit<DropdownMenuPrimitive.DropdownMenuContentProps, 'children' | 'side'> & {\n align?: Align;\n children: React.ReactNode;\n /** Set the position of the Menu relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\n\nexport const Content = React.forwardRef(function MenuContent(props: MenuContentProps, ref: React.Ref<HTMLDivElement>) {\n const internalRef = useMergedRef<any>(ref);\n const menu = useCurrentMenu();\n const { align = 'start', children, placement: side, ...otherProps } = props;\n const className = cn('border border-transparent rounded block outline-none p-1 yt-shadow wcag-white', props.className);\n\n // attach refs to each child\n const childrenRefs = React.useRef<React.RefObject<HTMLDivElement>[]>([]);\n const childrenWithRefs = (React.Children.toArray(props.children) as React.ReactElement<MenuItemProps & { ref: any }>[])\n .filter(child => !!child) // remove falsey children\n .map((child, index) => {\n childrenRefs.current[index] = React.createRef<HTMLDivElement>();\n return React.cloneElement(child, { ref: childrenRefs.current[index] });\n });\n\n // register any shortcuts attached to children\n React.useEffect(() => {\n const shortcuts: ((event: KeyboardEvent) => void)[] = [];\n childrenWithRefs.forEach((child, index) => {\n if (child.props.shortcut) {\n shortcuts.push(\n createShortcutKeyDownHandler(child.props.shortcut, event => {\n event.preventDefault();\n menu?.open();\n setTimeout(() => childrenRefs.current[index]?.current?.click(), 1);\n })\n );\n }\n });\n\n shortcuts.forEach(handler => document.addEventListener('keydown', handler));\n\n return () => {\n shortcuts.forEach(handler => document.removeEventListener('keydown', handler));\n };\n }, []);\n\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n {...otherProps}\n align={align}\n className={className}\n data-taco=\"menu\"\n side={side}\n sideOffset={3}\n style={{ minWidth: menu?.minWidth }}\n ref={internalRef}>\n {childrenWithRefs}\n </DropdownMenuPrimitive.Content>\n </DropdownMenuPrimitive.Portal>\n );\n});\n"],"names":["Content","React","MenuContent","props","ref","internalRef","useMergedRef","menu","useCurrentMenu","align","children","placement","side","otherProps","className","cn","childrenRefs","childrenWithRefs","toArray","filter","child","map","index","current","shortcuts","forEach","shortcut","push","createShortcutKeyDownHandler","event","preventDefault","open","setTimeout","click","handler","document","addEventListener","removeEventListener","DropdownMenuPrimitive","sideOffset","style","minWidth"],"mappings":";;;;;;;MAgBaA,OAAO,gBAAGC,UAAgB,CAAC,SAASC,WAAW,CAACC,KAAuB,EAAEC,GAA8B;EAChH,MAAMC,WAAW,GAAGC,YAAY,CAAMF,GAAG,CAAC;EAC1C,MAAMG,IAAI,GAAGC,cAAc,EAAE;EAC7B,MAAM;IAAEC,KAAK,GAAG,OAAO;IAAEC,QAAQ;IAAEC,SAAS,EAAEC,IAAI;IAAE,GAAGC;GAAY,GAAGV,KAAK;EAC3E,MAAMW,SAAS,GAAGC,EAAE,CAAC,+EAA+E,EAAEZ,KAAK,CAACW,SAAS,CAAC;;EAGtH,MAAME,YAAY,GAAGf,MAAY,CAAoC,EAAE,CAAC;EACxE,MAAMgB,gBAAgB,GAAIhB,QAAc,CAACiB,OAAO,CAACf,KAAK,CAACO,QAAQ,CAAwD,CAClHS,MAAM,CAACC,KAAK,IAAI,CAAC,CAACA,KAAK,CAAC;GACxBC,GAAG,CAAC,CAACD,KAAK,EAAEE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kC;KAAU;IACnCrC,GAAG,EAAEC;MACJY,gBAAgB,CACW,CACL;AAEvC,CAAC;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Item.js","sources":["../../../../../../../../src/components/Menu/components/Item.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'classnames';\nimport { IconName } from '../../Icon/Icon';\nimport { Icon as IconPrimitive } from '../../Icon/Icon';\nimport { useCurrentMenu } from '../Context';\nimport { DialogProps } from '../../Dialog/Dialog';\nimport { Shortcut } from '../../Shortcut/Shortcut';\nimport { PopoverProps } from '../../Popover/Popover';\n\nexport const Icon = ({ name }) => (\n <span className=\"absolute left-0 ml-1\">\n <IconPrimitive className=\"-ml-px -mt-px !h-5 !w-5\" name={name} />\n </span>\n);\n\nexport const useItemStyling = ({ disabled, indented, className }) => {\n const menu = useCurrentMenu();\n\n React.useEffect(() => {\n if (indented && !menu?.indented) {\n menu?.registerIndentation();\n }\n }, [indented]);\n\n return cn(\n 'flex items-center justify-start h-8 pr-1.5 relative rounded w-full focus:outline-none group',\n {\n 'pl-7': menu?.indented,\n 'pl-1.5': !menu?.indented,\n 'cursor-pointer text-black hover:wcag-grey-200 data-[highlighted]:wcag-grey-200': !disabled,\n 'cursor-not-allowed hover:bg-white text-grey-300': disabled,\n },\n className\n );\n};\n\nexport type MenuItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\n dialog?: (props: Partial<DialogProps>) => JSX.Element;\n disabled?: boolean;\n icon?: IconName;\n onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n popover?: (props: Partial<PopoverProps>) => JSX.Element;\n shortcut?: string;\n subMenu?: any;\n};\n\nexport const Item = React.forwardRef(function MenuItem(props: MenuItemProps, ref: React.Ref<HTMLDivElement>) {\n const { dialog, icon, onClick, popover, shortcut, subMenu, ...otherProps } = props;\n const menu = useCurrentMenu();\n const className = useItemStyling({\n disabled: props.disabled,\n indented: !!icon,\n className: props.className,\n });\n\n const disabled = props.disabled ?? props['aria-disabled'];\n\n let handleClick;\n\n // radix has a bug that does not disable clicks when disabled is set on items\n if (disabled) {\n handleClick = event => {\n event.preventDefault();\n event.stopPropagation();\n };\n }\n\n if (subMenu) {\n return (\n <DropdownMenuPrimitive.Sub>\n <DropdownMenuPrimitive.SubTrigger {...otherProps} className={className} onClick={handleClick} ref={ref}>\n {icon ? <Icon name={icon} /> : null}\n {props.children}\n <IconPrimitive className=\"-mr-1.5 ml-auto !h-5 !w-5\" name=\"chevron-right\" />\n </DropdownMenuPrimitive.SubTrigger>\n {subMenu()}\n </DropdownMenuPrimitive.Sub>\n );\n }\n\n const handleSelect = event => {\n if (onClick) {\n onClick(event);\n }\n\n if (props['aria-haspopup'] || typeof dialog === 'function' || typeof popover === 'function') {\n event.preventDefault();\n }\n };\n\n let button = (\n <DropdownMenuPrimitive.Item {...otherProps} className={className} onClick={handleClick} onSelect={handleSelect} ref={ref}>\n {icon ? <Icon name={icon} /> : null}\n {props.children}\n {shortcut ? (\n <span className=\"ml-auto pl-5\">\n <Shortcut keys={shortcut} className=\"text-grey-700\" />\n </span>\n ) : null}\n </DropdownMenuPrimitive.Item>\n );\n\n if (typeof dialog === 'function') {\n button = dialog({ trigger: button, onClose: menu?.close });\n } else if (typeof popover === 'function') {\n button = popover({ trigger: button });\n }\n\n return button;\n});\n"],"names":["Icon","name","React","className","IconPrimitive","useItemStyling","disabled","indented","menu","useCurrentMenu","registerIndentation","cn","Item","MenuItem","props","ref","dialog","icon","onClick","popover","shortcut","subMenu","otherProps","handleClick","event","preventDefault","stopPropagation","DropdownMenuPrimitive","children","handleSelect","button","onSelect","Shortcut","keys","trigger","onClose","close"],"mappings":";;;;;;;
|
1
|
+
{"version":3,"file":"Item.js","sources":["../../../../../../../../src/components/Menu/components/Item.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'classnames';\nimport { IconName } from '../../Icon/Icon';\nimport { Icon as IconPrimitive } from '../../Icon/Icon';\nimport { useCurrentMenu } from '../Context';\nimport { DialogProps } from '../../Dialog/Dialog';\nimport { Shortcut } from '../../Shortcut/Shortcut';\nimport { PopoverProps } from '../../Popover/Popover';\nimport { KeyDownHandlerOptions } from '../../../utils/keyboard';\n\nexport const Icon = ({ name }) => (\n <span className=\"absolute left-0 ml-1\">\n <IconPrimitive className=\"-ml-px -mt-px !h-5 !w-5\" name={name} />\n </span>\n);\n\nexport const useItemStyling = ({ disabled, indented, className }) => {\n const menu = useCurrentMenu();\n\n React.useEffect(() => {\n if (indented && !menu?.indented) {\n menu?.registerIndentation();\n }\n }, [indented]);\n\n return cn(\n 'flex items-center justify-start h-8 pr-1.5 relative rounded w-full focus:outline-none group',\n {\n 'pl-7': menu?.indented,\n 'pl-1.5': !menu?.indented,\n 'cursor-pointer text-black hover:wcag-grey-200 data-[highlighted]:wcag-grey-200': !disabled,\n 'cursor-not-allowed hover:bg-white text-grey-300': disabled,\n },\n className\n );\n};\n\nexport type MenuItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\n dialog?: (props: Partial<DialogProps>) => JSX.Element;\n disabled?: boolean;\n icon?: IconName;\n onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n popover?: (props: Partial<PopoverProps>) => JSX.Element;\n shortcut?: string | KeyDownHandlerOptions;\n subMenu?: any;\n};\n\nexport const Item = React.forwardRef(function MenuItem(props: MenuItemProps, ref: React.Ref<HTMLDivElement>) {\n const { dialog, icon, onClick, popover, shortcut, subMenu, ...otherProps } = props;\n const menu = useCurrentMenu();\n const className = useItemStyling({\n disabled: props.disabled,\n indented: !!icon,\n className: props.className,\n });\n\n const disabled = props.disabled ?? props['aria-disabled'];\n\n let handleClick;\n\n // radix has a bug that does not disable clicks when disabled is set on items\n if (disabled) {\n handleClick = event => {\n event.preventDefault();\n event.stopPropagation();\n };\n }\n\n if (subMenu) {\n return (\n <DropdownMenuPrimitive.Sub>\n <DropdownMenuPrimitive.SubTrigger {...otherProps} className={className} onClick={handleClick} ref={ref}>\n {icon ? <Icon name={icon} /> : null}\n {props.children}\n <IconPrimitive className=\"-mr-1.5 ml-auto !h-5 !w-5\" name=\"chevron-right\" />\n </DropdownMenuPrimitive.SubTrigger>\n {subMenu()}\n </DropdownMenuPrimitive.Sub>\n );\n }\n\n const handleSelect = event => {\n if (onClick) {\n onClick(event);\n }\n\n if (props['aria-haspopup'] || typeof dialog === 'function' || typeof popover === 'function') {\n event.preventDefault();\n }\n };\n\n let button = (\n <DropdownMenuPrimitive.Item {...otherProps} className={className} onClick={handleClick} onSelect={handleSelect} ref={ref}>\n {icon ? <Icon name={icon} /> : null}\n {props.children}\n {shortcut ? (\n <span className=\"ml-auto pl-5\">\n <Shortcut keys={shortcut} className=\"text-grey-700\" />\n </span>\n ) : null}\n </DropdownMenuPrimitive.Item>\n );\n\n if (typeof dialog === 'function') {\n button = dialog({ trigger: button, onClose: menu?.close });\n } else if (typeof popover === 'function') {\n button = popover({ trigger: button });\n }\n\n return button;\n});\n"],"names":["Icon","name","React","className","IconPrimitive","useItemStyling","disabled","indented","menu","useCurrentMenu","registerIndentation","cn","Item","MenuItem","props","ref","dialog","icon","onClick","popover","shortcut","subMenu","otherProps","handleClick","event","preventDefault","stopPropagation","DropdownMenuPrimitive","children","handleSelect","button","onSelect","Shortcut","keys","trigger","onClose","close"],"mappings":";;;;;;;MAWaA,IAAI,GAAG,CAAC;EAAEC;CAAM,kBACzBC;EAAMC,SAAS,EAAC;gBACZD,cAACE,MAAa;EAACD,SAAS,EAAC,yBAAyB;EAACF,IAAI,EAAEA;EAAQ;MAI5DI,cAAc,GAAG,CAAC;EAAEC,QAAQ;EAAEC,QAAQ;EAAEJ;CAAW;EAC5D,MAAMK,IAAI,GAAGC,cAAc,EAAE;EAE7BP,SAAe,CAAC;IACZ,IAAIK,QAAQ,IAAI,EAACC,IAAI,aAAJA,I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AllOf: 'Is all of',
|
261
261
|
isEmpty: 'Is empty',
|
262
|
-
isNotEmpty: 'Is not empty'
|
262
|
+
isNotEmpty: 'Is not empty',
|
263
|
+
isBefore: 'Is before',
|
264
|
+
isAfter: 'Is after',
|
265
|
+
isOnOrBefore: 'Is on or before',
|
266
|
+
isOnOrAfter: 'Is on or after',
|
267
|
+
isLessThanOrEqualTo: 'Is less than or equal to',
|
268
|
+
isGreaterThanOrEqualTo: 'Is greater than or equal to',
|
269
|
+
hasAnyOf: 'Has any of',
|
270
|
+
hasAllOf: 'Has all of',
|
271
|
+
hasNoneOf: 'Has none of'
|
263
272
|
},
|
264
273
|
conditions: {
|
265
274
|
and: 'And',
|
@@ -326,6 +335,9 @@ const defaultLocalisationTexts = {
|
|
326
335
|
selectAllRows: 'Select all rows',
|
327
336
|
expandRow: 'Expand current row',
|
328
337
|
collapseRow: 'Collapse current row'
|
338
|
+
},
|
339
|
+
otherOptions: {
|
340
|
+
tooltip: 'Other options'
|
329
341
|
}
|
330
342
|
},
|
331
343
|
searchInput: {
|