@importcsv/react 0.1.16 → 0.1.17

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/build/index.js CHANGED
@@ -28986,7 +28986,7 @@ var DialogOverlay = React__namespace.forwardRef(function (_a, ref) {
28986
28986
  DialogOverlay.displayName = Overlay.displayName;
28987
28987
  var DialogContent = React__namespace.forwardRef(function (_a, ref) {
28988
28988
  var className = _a.className, children = _a.children, props = __rest$1(_a, ["className", "children"]);
28989
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(DialogOverlay, {}), jsxRuntime.jsxs(Content$1, __assign$1({ ref: ref, className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className) }, props, { children: [children, jsxRuntime.jsxs(Close$1, __assign$1({ className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground" }, { children: [jsxRuntime.jsx(X, { className: "h-4 w-4" }), jsxRuntime.jsx("span", __assign$1({ className: "sr-only" }, { children: "Close" }))] }))] }))] }));
28989
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(DialogOverlay, {}), jsxRuntime.jsxs(Content$1, __assign$1({ ref: ref, className: cn("fixed left-[50%] top-[50%] z-50 flex flex-col w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg overflow-hidden", className), style: { height: '90vh', maxHeight: '90vh' } }, props, { children: [children, jsxRuntime.jsxs(Close$1, __assign$1({ className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground" }, { children: [jsxRuntime.jsx(X, { className: "h-4 w-4" }), jsxRuntime.jsx("span", __assign$1({ className: "sr-only" }, { children: "Close" }))] }))] }))] }));
28990
28990
  });
28991
28991
  DialogContent.displayName = Content$1.displayName;
28992
28992
  var DialogHeader = function (_a) {
@@ -29596,9 +29596,9 @@ function TransformModal(_a) {
29596
29596
  }, [onClose]);
29597
29597
  var selectedCount = countSelectedChanges(changes);
29598
29598
  var hasChanges = changes.length > 0;
29599
- return (jsxRuntime.jsx(Dialog, __assign$1({ open: isOpen, onOpenChange: handleClose }, { children: jsxRuntime.jsxs(DialogContent, __assign$1({ className: "max-w-[800px]" }, { children: [jsxRuntime.jsx(DialogHeader, { children: jsxRuntime.jsxs(DialogTitle, __assign$1({ className: "flex items-center gap-2" }, { children: [jsxRuntime.jsx(PiSparkle, { className: "h-5 w-5" }), t('Transform data with AI')] })) }), jsxRuntime.jsxs("div", __assign$1({ className: "space-y-4" }, { children: [hasValidationErrors && !hasChanges && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Alert, { children: [jsxRuntime.jsx(PiInfo, { className: "h-4 w-4" }), jsxRuntime.jsxs(AlertDescription, { children: [jsxRuntime.jsxs("strong", { children: [validationErrors.length, " validation error", validationErrors.length > 1 ? 's' : '', " detected"] }), jsxRuntime.jsx("br", {}), "Click \"Fix All Errors\" to automatically correct validation issues in your data."] })] }), jsxRuntime.jsx("div", __assign$1({ className: "flex justify-center py-4" }, { children: jsxRuntime.jsxs(Button, __assign$1({ size: "lg", onClick: handleFixAllErrors, isLoading: isGenerating, disabled: isGenerating, className: "px-8" }, { children: [jsxRuntime.jsx(PiSparkle, { className: "mr-2 h-5 w-5" }), isGenerating ? t('Fixing errors...') : t('Fix All Errors')] })) }))] })), !hasValidationErrors && !hasChanges && (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", __assign$1({ className: "flex gap-2 mb-2" }, { children: [jsxRuntime.jsx(Input, { ref: promptInputRef, placeholder: t("Describe the transformation (e.g., 'Convert dates to MM/DD/YYYY')"), value: prompt, onChange: function (e) { return setPrompt(e.target.value); }, onKeyPress: function (e) { return e.key === 'Enter' && handleGenerate(); }, disabled: isGenerating, className: "h-10" }), jsxRuntime.jsxs(Button, __assign$1({ onClick: function () { return handleGenerate(); }, isLoading: isGenerating, disabled: isGenerating }, { children: [jsxRuntime.jsx(PiSparkle, { className: "mr-2 h-4 w-4" }), isGenerating ? t('Generating') : t('Generate')] }))] })), jsxRuntime.jsx("button", __assign$1({ className: "text-xs text-blue-600 hover:underline", onClick: function () { return setShowExamples(!showExamples); } }, { children: showExamples ? t('Hide examples') : t('Show examples') })), showExamples && (jsxRuntime.jsxs("div", __assign$1({ className: "mt-2 p-2 bg-gray-50 rounded-md" }, { children: [jsxRuntime.jsx("p", __assign$1({ className: "text-xs mb-1 font-bold" }, { children: t('Click to use:') })), jsxRuntime.jsx("div", __assign$1({ className: "flex flex-wrap gap-1" }, { children: COMMON_PROMPTS.slice(0, 5).map(function (example, i) { return (jsxRuntime.jsx("span", __assign$1({ className: "px-2 py-1 text-xs bg-gray-200 rounded cursor-pointer hover:bg-blue-100", onClick: function () { return handleUseExample(example); } }, { children: example }), i)); }) }))] })))] })), error && (jsxRuntime.jsx(Alert, __assign$1({ variant: "destructive" }, { children: jsxRuntime.jsx(AlertDescription, { children: error }) }))), isGenerating && (jsxRuntime.jsxs("div", __assign$1({ className: "text-center py-8" }, { children: [jsxRuntime.jsx("div", { className: "inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500" }), jsxRuntime.jsx("p", __assign$1({ className: "mt-2 text-gray-600" }, { children: t('Analyzing data and generating transformations...') }))] }))), hasChanges && !isGenerating && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", __assign$1({ className: "flex justify-between items-center mb-2" }, { children: [jsxRuntime.jsx("span", __assign$1({ className: "font-bold" }, { children: summary || "".concat(changes.length, " transformation").concat(changes.length !== 1 ? 's' : '', " generated") })), jsxRuntime.jsxs("div", __assign$1({ className: "flex gap-2" }, { children: [jsxRuntime.jsx(Button, __assign$1({ size: "sm", variant: "outline", onClick: function () { return handleSelectAll(true); } }, { children: t('Select all') })), jsxRuntime.jsx(Button, __assign$1({ size: "sm", variant: "outline", onClick: function () { return handleSelectAll(false); } }, { children: t('Deselect all') }))] }))] })), jsxRuntime.jsx("div", __assign$1({ className: "max-h-[300px] overflow-y-auto border border-gray-200 rounded-md p-2" }, { children: jsxRuntime.jsxs("div", __assign$1({ className: "space-y-1" }, { children: [changes.slice(0, 100).map(function (change, index) { return (jsxRuntime.jsxs("div", __assign$1({ className: "flex items-start gap-2 p-2 rounded-md border cursor-pointer ".concat(change.selected
29599
+ return (jsxRuntime.jsx(Dialog, __assign$1({ open: isOpen, onOpenChange: handleClose }, { children: jsxRuntime.jsxs(DialogContent, __assign$1({ className: "max-w-[800px]" }, { children: [jsxRuntime.jsx(DialogHeader, { children: jsxRuntime.jsxs(DialogTitle, __assign$1({ className: "flex items-center gap-2" }, { children: [jsxRuntime.jsx(PiSparkle, { className: "h-5 w-5" }), t('Transform data with AI')] })) }), jsxRuntime.jsxs("div", __assign$1({ className: "flex-1 overflow-y-auto min-h-0 space-y-4" }, { children: [hasValidationErrors && !hasChanges && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Alert, { children: [jsxRuntime.jsx(PiInfo, { className: "h-4 w-4" }), jsxRuntime.jsxs(AlertDescription, { children: [jsxRuntime.jsxs("strong", { children: [validationErrors.length, " validation error", validationErrors.length > 1 ? 's' : '', " detected"] }), jsxRuntime.jsx("br", {}), "Click \"Fix All Errors\" to automatically correct validation issues in your data."] })] }), jsxRuntime.jsx("div", __assign$1({ className: "flex justify-center py-4" }, { children: jsxRuntime.jsxs(Button, __assign$1({ type: "button", size: "lg", onClick: handleFixAllErrors, isLoading: isGenerating, disabled: isGenerating, className: "px-8" }, { children: [jsxRuntime.jsx(PiSparkle, { className: "mr-2 h-5 w-5" }), isGenerating ? t('Fixing errors...') : t('Fix All Errors')] })) }))] })), !hasValidationErrors && !hasChanges && (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", __assign$1({ className: "flex gap-2 mb-2" }, { children: [jsxRuntime.jsx(Input, { ref: promptInputRef, placeholder: t("Describe the transformation (e.g., 'Convert dates to MM/DD/YYYY')"), value: prompt, onChange: function (e) { return setPrompt(e.target.value); }, onKeyPress: function (e) { return e.key === 'Enter' && handleGenerate(); }, disabled: isGenerating, className: "h-10" }), jsxRuntime.jsxs(Button, __assign$1({ type: "button", onClick: function () { return handleGenerate(); }, isLoading: isGenerating, disabled: isGenerating }, { children: [jsxRuntime.jsx(PiSparkle, { className: "mr-2 h-4 w-4" }), isGenerating ? t('Generating') : t('Generate')] }))] })), jsxRuntime.jsx("button", __assign$1({ className: "text-xs text-blue-600 hover:underline", onClick: function () { return setShowExamples(!showExamples); } }, { children: showExamples ? t('Hide examples') : t('Show examples') })), showExamples && (jsxRuntime.jsxs("div", __assign$1({ className: "mt-2 p-2 bg-gray-50 rounded-md" }, { children: [jsxRuntime.jsx("p", __assign$1({ className: "text-xs mb-1 font-bold" }, { children: t('Click to use:') })), jsxRuntime.jsx("div", __assign$1({ className: "flex flex-wrap gap-1" }, { children: COMMON_PROMPTS.slice(0, 5).map(function (example, i) { return (jsxRuntime.jsx("span", __assign$1({ className: "px-2 py-1 text-xs bg-gray-200 rounded cursor-pointer hover:bg-blue-100", onClick: function () { return handleUseExample(example); } }, { children: example }), i)); }) }))] })))] })), error && (jsxRuntime.jsx(Alert, __assign$1({ variant: "destructive" }, { children: jsxRuntime.jsx(AlertDescription, { children: error }) }))), isGenerating && (jsxRuntime.jsxs("div", __assign$1({ className: "text-center py-8" }, { children: [jsxRuntime.jsx("div", { className: "inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500" }), jsxRuntime.jsx("p", __assign$1({ className: "mt-2 text-gray-600" }, { children: t('Analyzing data and generating transformations...') }))] }))), hasChanges && !isGenerating && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", __assign$1({ className: "flex justify-between items-center mb-2" }, { children: [jsxRuntime.jsx("span", __assign$1({ className: "font-bold" }, { children: summary || "".concat(changes.length, " transformation").concat(changes.length !== 1 ? 's' : '', " generated") })), jsxRuntime.jsxs("div", __assign$1({ className: "flex gap-2" }, { children: [jsxRuntime.jsx(Button, __assign$1({ type: "button", size: "sm", variant: "outline", onClick: function () { return handleSelectAll(true); } }, { children: t('Select all') })), jsxRuntime.jsx(Button, __assign$1({ type: "button", size: "sm", variant: "outline", onClick: function () { return handleSelectAll(false); } }, { children: t('Deselect all') }))] }))] })), jsxRuntime.jsx("div", __assign$1({ className: "max-h-[300px] overflow-y-auto border border-gray-200 rounded-md p-2" }, { children: jsxRuntime.jsxs("div", __assign$1({ className: "space-y-1" }, { children: [changes.slice(0, 100).map(function (change, index) { return (jsxRuntime.jsxs("div", __assign$1({ className: "flex items-start gap-2 p-2 rounded-md border cursor-pointer ".concat(change.selected
29600
29600
  ? 'bg-blue-50 border-blue-200 hover:bg-blue-100'
29601
- : 'bg-white border-gray-100 hover:bg-gray-50'), onClick: function () { return handleToggleChange(index); } }, { children: [jsxRuntime.jsx(Checkbox, { checked: change.selected, onCheckedChange: function () { return handleToggleChange(index); }, onClick: function (e) { return e.stopPropagation(); } }), jsxRuntime.jsxs("div", __assign$1({ className: "flex-1 space-y-0" }, { children: [jsxRuntime.jsxs("div", __assign$1({ className: "text-sm text-gray-900 flex items-center gap-2" }, { children: [jsxRuntime.jsx("span", __assign$1({ className: "line-through" }, { children: String(change.oldValue || 'empty') })), jsxRuntime.jsx("span", { children: "\u2192" }), jsxRuntime.jsx("span", __assign$1({ className: "text-green-600 font-bold" }, { children: String(change.newValue) }))] })), jsxRuntime.jsxs("p", __assign$1({ className: "text-xs text-gray-600" }, { children: ["Row ", change.rowIndex + 1, ", ", change.columnKey] }))] }))] }), index)); }), changes.length > 100 && (jsxRuntime.jsx("p", __assign$1({ className: "text-sm text-gray-500 text-center" }, { children: t("Showing first 100 of ".concat(changes.length, " changes")) })))] })) })), jsxRuntime.jsxs("p", __assign$1({ className: "text-sm text-gray-600 mt-1" }, { children: [selectedCount, " ", t('selected')] }))] }) }))] })), jsxRuntime.jsx(DialogFooter, { children: jsxRuntime.jsxs("div", __assign$1({ className: "flex gap-3" }, { children: [jsxRuntime.jsx(Button, __assign$1({ variant: "outline", onClick: handleClose }, { children: t('Cancel') })), hasChanges && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button, __assign$1({ variant: "outline", onClick: function () { return handleApply(false); }, disabled: selectedCount === 0 }, { children: t("Apply ".concat(selectedCount, " selected")) })), jsxRuntime.jsxs(Button, __assign$1({ onClick: function () { return handleApply(true); } }, { children: [jsxRuntime.jsx(PiCheck, { className: "mr-2 h-4 w-4" }), t('Apply all')] }))] }))] })) })] })) })));
29601
+ : 'bg-white border-gray-100 hover:bg-gray-50'), onClick: function () { return handleToggleChange(index); } }, { children: [jsxRuntime.jsx(Checkbox, { checked: change.selected, onCheckedChange: function () { return handleToggleChange(index); }, onClick: function (e) { return e.stopPropagation(); } }), jsxRuntime.jsxs("div", __assign$1({ className: "flex-1 space-y-0" }, { children: [jsxRuntime.jsxs("div", __assign$1({ className: "text-sm text-gray-900 flex items-center gap-2" }, { children: [jsxRuntime.jsx("span", __assign$1({ className: "line-through" }, { children: String(change.oldValue || 'empty') })), jsxRuntime.jsx("span", { children: "\u2192" }), jsxRuntime.jsx("span", __assign$1({ className: "text-green-600 font-bold" }, { children: String(change.newValue) }))] })), jsxRuntime.jsxs("p", __assign$1({ className: "text-xs text-gray-600" }, { children: ["Row ", change.rowIndex + 1, ", ", change.columnKey] }))] }))] }), index)); }), changes.length > 100 && (jsxRuntime.jsx("p", __assign$1({ className: "text-sm text-gray-500 text-center" }, { children: t("Showing first 100 of ".concat(changes.length, " changes")) })))] })) })), jsxRuntime.jsxs("p", __assign$1({ className: "text-sm text-gray-600 mt-1" }, { children: [selectedCount, " ", t('selected')] }))] }) }))] })), jsxRuntime.jsx(DialogFooter, { children: jsxRuntime.jsxs("div", __assign$1({ className: "flex gap-3" }, { children: [jsxRuntime.jsx(Button, __assign$1({ type: "button", variant: "outline", onClick: handleClose }, { children: t('Cancel') })), hasChanges && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button, __assign$1({ type: "button", variant: "outline", onClick: function () { return handleApply(false); }, disabled: selectedCount === 0 }, { children: t("Apply ".concat(selectedCount, " selected")) })), jsxRuntime.jsxs(Button, __assign$1({ type: "button", onClick: function () { return handleApply(true); } }, { children: [jsxRuntime.jsx(PiCheck, { className: "mr-2 h-4 w-4" }), t('Apply all')] }))] }))] })) })] })) })));
29602
29602
  }
29603
29603
 
29604
29604
  var style$6 = {"baseContainer":"Validation-module_baseContainer__-0AsU","flexContainer":"Validation-module_flexContainer__cBods","scrollableContent":"Validation-module_scrollableContent__d0ytT","tableContainer":"Validation-module_tableContainer__jRikO","headerSection":"Validation-module_headerSection__drcpg","header":"Validation-module_header__ocGI2","toolbar":"Validation-module_toolbar__-DCj6","validationContainer":"Validation-module_validationContainer__jrlPR","toolbarSection":"Validation-module_toolbarSection__Q0YdW","scrollableSection":"Validation-module_scrollableSection__nwC-B","validationContent":"Validation-module_validationContent__hn2Dz","errorBadge":"Validation-module_errorBadge__yeHS0","pulse":"Validation-module_pulse__d-MKR","rowCount":"Validation-module_rowCount__h-OSk","tabFilter":"Validation-module_tabFilter__DV34i","tab":"Validation-module_tab__JPIkM","active":"Validation-module_active__rLvN7","count":"Validation-module_count__lb09d","errorTab":"Validation-module_errorTab__ebQQd","spreadsheetContainer":"Validation-module_spreadsheetContainer__VOHHJ","spreadsheetWrapper":"Validation-module_spreadsheetWrapper__jE9rZ","spreadsheetTable":"Validation-module_spreadsheetTable__OzR-h","spreadsheetHeader":"Validation-module_spreadsheetHeader__CcIvW","rowNumberHeader":"Validation-module_rowNumberHeader__hBB39","columnHeader":"Validation-module_columnHeader__Yjc-8","headerContent":"Validation-module_headerContent__soxS5","spreadsheetBody":"Validation-module_spreadsheetBody__ASDqW","dataRow":"Validation-module_dataRow__fAJUe","dataCell":"Validation-module_dataCell__Kqej5","rowNumber":"Validation-module_rowNumber__gW7gl","errorRow":"Validation-module_errorRow__E5crc","errorCell":"Validation-module_errorCell__0EbsM","cellInput":"Validation-module_cellInput__LsyOo","cellContent":"Validation-module_cellContent__ubxVt","errorIndicator":"Validation-module_errorIndicator__2KEsf","emptyState":"Validation-module_emptyState__g41in","content":"Validation-module_content__FgF43","tableWrapper":"Validation-module_tableWrapper__YcN6o","actions":"Validation-module_actions__GIqEx","errorContainer":"Validation-module_errorContainer__dKOJX","editableCellContainer":"Validation-module_editableCellContainer__7yPTv","simpleInput":"Validation-module_simpleInput__LhUg-","errorInput":"Validation-module_errorInput__ZWDrT","errorIcon":"Validation-module_errorIcon__NMpp3","validationTable":"Validation-module_validationTable__Wh1wk","validationFilters":"Validation-module_validationFilters__XqhsC","errorSummary":"Validation-module_errorSummary__SYeAr","toolbarActions":"Validation-module_toolbarActions__12qlG","footerSection":"Validation-module_footerSection__pJMfU","tableWidth":"Validation-module_tableWidth__MNjwY"};