@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/build/bundle.css +4 -0
- package/build/index.esm.js +3 -3
- package/build/index.esm.js.map +1 -1
- package/build/index.js +3 -3
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/build/bundle.css
CHANGED
package/build/index.esm.js
CHANGED
|
@@ -28959,7 +28959,7 @@ var DialogOverlay = React.forwardRef(function (_a, ref) {
|
|
|
28959
28959
|
DialogOverlay.displayName = Overlay.displayName;
|
|
28960
28960
|
var DialogContent = React.forwardRef(function (_a, ref) {
|
|
28961
28961
|
var className = _a.className, children = _a.children, props = __rest$1(_a, ["className", "children"]);
|
|
28962
|
-
return (jsxs(Fragment$1, { children: [jsx(DialogOverlay, {}), jsxs(Content$1, __assign$1({ ref: ref, className: cn("fixed left-[50%] top-[50%] z-50
|
|
28962
|
+
return (jsxs(Fragment$1, { children: [jsx(DialogOverlay, {}), 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, 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: [jsx(X, { className: "h-4 w-4" }), jsx("span", __assign$1({ className: "sr-only" }, { children: "Close" }))] }))] }))] }));
|
|
28963
28963
|
});
|
|
28964
28964
|
DialogContent.displayName = Content$1.displayName;
|
|
28965
28965
|
var DialogHeader = function (_a) {
|
|
@@ -29569,9 +29569,9 @@ function TransformModal(_a) {
|
|
|
29569
29569
|
}, [onClose]);
|
|
29570
29570
|
var selectedCount = countSelectedChanges(changes);
|
|
29571
29571
|
var hasChanges = changes.length > 0;
|
|
29572
|
-
return (jsx(Dialog, __assign$1({ open: isOpen, onOpenChange: handleClose }, { children: jsxs(DialogContent, __assign$1({ className: "max-w-[800px]" }, { children: [jsx(DialogHeader, { children: jsxs(DialogTitle, __assign$1({ className: "flex items-center gap-2" }, { children: [jsx(PiSparkle, { className: "h-5 w-5" }), t('Transform data with AI')] })) }), jsxs("div", __assign$1({ className: "space-y-4" }, { children: [hasValidationErrors && !hasChanges && (jsxs(Fragment$1, { children: [jsxs(Alert, { children: [jsx(PiInfo, { className: "h-4 w-4" }), jsxs(AlertDescription, { children: [jsxs("strong", { children: [validationErrors.length, " validation error", validationErrors.length > 1 ? 's' : '', " detected"] }), jsx("br", {}), "Click \"Fix All Errors\" to automatically correct validation issues in your data."] })] }), jsx("div", __assign$1({ className: "flex justify-center py-4" }, { children: jsxs(Button, __assign$1({ size: "lg", onClick: handleFixAllErrors, isLoading: isGenerating, disabled: isGenerating, className: "px-8" }, { children: [jsx(PiSparkle, { className: "mr-2 h-5 w-5" }), isGenerating ? t('Fixing errors...') : t('Fix All Errors')] })) }))] })), !hasValidationErrors && !hasChanges && (jsxs("div", { children: [jsxs("div", __assign$1({ className: "flex gap-2 mb-2" }, { children: [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" }), jsxs(Button, __assign$1({ onClick: function () { return handleGenerate(); }, isLoading: isGenerating, disabled: isGenerating }, { children: [jsx(PiSparkle, { className: "mr-2 h-4 w-4" }), isGenerating ? t('Generating') : t('Generate')] }))] })), 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 && (jsxs("div", __assign$1({ className: "mt-2 p-2 bg-gray-50 rounded-md" }, { children: [jsx("p", __assign$1({ className: "text-xs mb-1 font-bold" }, { children: t('Click to use:') })), jsx("div", __assign$1({ className: "flex flex-wrap gap-1" }, { children: COMMON_PROMPTS.slice(0, 5).map(function (example, i) { return (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 && (jsx(Alert, __assign$1({ variant: "destructive" }, { children: jsx(AlertDescription, { children: error }) }))), isGenerating && (jsxs("div", __assign$1({ className: "text-center py-8" }, { children: [jsx("div", { className: "inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500" }), jsx("p", __assign$1({ className: "mt-2 text-gray-600" }, { children: t('Analyzing data and generating transformations...') }))] }))), hasChanges && !isGenerating && (jsx(Fragment$1, { children: jsxs("div", { children: [jsxs("div", __assign$1({ className: "flex justify-between items-center mb-2" }, { children: [jsx("span", __assign$1({ className: "font-bold" }, { children: summary || "".concat(changes.length, " transformation").concat(changes.length !== 1 ? 's' : '', " generated") })), jsxs("div", __assign$1({ className: "flex gap-2" }, { children: [jsx(Button, __assign$1({ size: "sm", variant: "outline", onClick: function () { return handleSelectAll(true); } }, { children: t('Select all') })), jsx(Button, __assign$1({ size: "sm", variant: "outline", onClick: function () { return handleSelectAll(false); } }, { children: t('Deselect all') }))] }))] })), jsx("div", __assign$1({ className: "max-h-[300px] overflow-y-auto border border-gray-200 rounded-md p-2" }, { children: jsxs("div", __assign$1({ className: "space-y-1" }, { children: [changes.slice(0, 100).map(function (change, index) { return (jsxs("div", __assign$1({ className: "flex items-start gap-2 p-2 rounded-md border cursor-pointer ".concat(change.selected
|
|
29572
|
+
return (jsx(Dialog, __assign$1({ open: isOpen, onOpenChange: handleClose }, { children: jsxs(DialogContent, __assign$1({ className: "max-w-[800px]" }, { children: [jsx(DialogHeader, { children: jsxs(DialogTitle, __assign$1({ className: "flex items-center gap-2" }, { children: [jsx(PiSparkle, { className: "h-5 w-5" }), t('Transform data with AI')] })) }), jsxs("div", __assign$1({ className: "flex-1 overflow-y-auto min-h-0 space-y-4" }, { children: [hasValidationErrors && !hasChanges && (jsxs(Fragment$1, { children: [jsxs(Alert, { children: [jsx(PiInfo, { className: "h-4 w-4" }), jsxs(AlertDescription, { children: [jsxs("strong", { children: [validationErrors.length, " validation error", validationErrors.length > 1 ? 's' : '', " detected"] }), jsx("br", {}), "Click \"Fix All Errors\" to automatically correct validation issues in your data."] })] }), jsx("div", __assign$1({ className: "flex justify-center py-4" }, { children: jsxs(Button, __assign$1({ type: "button", size: "lg", onClick: handleFixAllErrors, isLoading: isGenerating, disabled: isGenerating, className: "px-8" }, { children: [jsx(PiSparkle, { className: "mr-2 h-5 w-5" }), isGenerating ? t('Fixing errors...') : t('Fix All Errors')] })) }))] })), !hasValidationErrors && !hasChanges && (jsxs("div", { children: [jsxs("div", __assign$1({ className: "flex gap-2 mb-2" }, { children: [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" }), jsxs(Button, __assign$1({ type: "button", onClick: function () { return handleGenerate(); }, isLoading: isGenerating, disabled: isGenerating }, { children: [jsx(PiSparkle, { className: "mr-2 h-4 w-4" }), isGenerating ? t('Generating') : t('Generate')] }))] })), 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 && (jsxs("div", __assign$1({ className: "mt-2 p-2 bg-gray-50 rounded-md" }, { children: [jsx("p", __assign$1({ className: "text-xs mb-1 font-bold" }, { children: t('Click to use:') })), jsx("div", __assign$1({ className: "flex flex-wrap gap-1" }, { children: COMMON_PROMPTS.slice(0, 5).map(function (example, i) { return (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 && (jsx(Alert, __assign$1({ variant: "destructive" }, { children: jsx(AlertDescription, { children: error }) }))), isGenerating && (jsxs("div", __assign$1({ className: "text-center py-8" }, { children: [jsx("div", { className: "inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500" }), jsx("p", __assign$1({ className: "mt-2 text-gray-600" }, { children: t('Analyzing data and generating transformations...') }))] }))), hasChanges && !isGenerating && (jsx(Fragment$1, { children: jsxs("div", { children: [jsxs("div", __assign$1({ className: "flex justify-between items-center mb-2" }, { children: [jsx("span", __assign$1({ className: "font-bold" }, { children: summary || "".concat(changes.length, " transformation").concat(changes.length !== 1 ? 's' : '', " generated") })), jsxs("div", __assign$1({ className: "flex gap-2" }, { children: [jsx(Button, __assign$1({ type: "button", size: "sm", variant: "outline", onClick: function () { return handleSelectAll(true); } }, { children: t('Select all') })), jsx(Button, __assign$1({ type: "button", size: "sm", variant: "outline", onClick: function () { return handleSelectAll(false); } }, { children: t('Deselect all') }))] }))] })), jsx("div", __assign$1({ className: "max-h-[300px] overflow-y-auto border border-gray-200 rounded-md p-2" }, { children: jsxs("div", __assign$1({ className: "space-y-1" }, { children: [changes.slice(0, 100).map(function (change, index) { return (jsxs("div", __assign$1({ className: "flex items-start gap-2 p-2 rounded-md border cursor-pointer ".concat(change.selected
|
|
29573
29573
|
? 'bg-blue-50 border-blue-200 hover:bg-blue-100'
|
|
29574
|
-
: 'bg-white border-gray-100 hover:bg-gray-50'), onClick: function () { return handleToggleChange(index); } }, { children: [jsx(Checkbox, { checked: change.selected, onCheckedChange: function () { return handleToggleChange(index); }, onClick: function (e) { return e.stopPropagation(); } }), jsxs("div", __assign$1({ className: "flex-1 space-y-0" }, { children: [jsxs("div", __assign$1({ className: "text-sm text-gray-900 flex items-center gap-2" }, { children: [jsx("span", __assign$1({ className: "line-through" }, { children: String(change.oldValue || 'empty') })), jsx("span", { children: "\u2192" }), jsx("span", __assign$1({ className: "text-green-600 font-bold" }, { children: String(change.newValue) }))] })), jsxs("p", __assign$1({ className: "text-xs text-gray-600" }, { children: ["Row ", change.rowIndex + 1, ", ", change.columnKey] }))] }))] }), index)); }), changes.length > 100 && (jsx("p", __assign$1({ className: "text-sm text-gray-500 text-center" }, { children: t("Showing first 100 of ".concat(changes.length, " changes")) })))] })) })), jsxs("p", __assign$1({ className: "text-sm text-gray-600 mt-1" }, { children: [selectedCount, " ", t('selected')] }))] }) }))] })), jsx(DialogFooter, { children: jsxs("div", __assign$1({ className: "flex gap-3" }, { children: [jsx(Button, __assign$1({ variant: "outline", onClick: handleClose }, { children: t('Cancel') })), hasChanges && (jsxs(Fragment$1, { children: [jsx(Button, __assign$1({ variant: "outline", onClick: function () { return handleApply(false); }, disabled: selectedCount === 0 }, { children: t("Apply ".concat(selectedCount, " selected")) })), jsxs(Button, __assign$1({ onClick: function () { return handleApply(true); } }, { children: [jsx(PiCheck, { className: "mr-2 h-4 w-4" }), t('Apply all')] }))] }))] })) })] })) })));
|
|
29574
|
+
: 'bg-white border-gray-100 hover:bg-gray-50'), onClick: function () { return handleToggleChange(index); } }, { children: [jsx(Checkbox, { checked: change.selected, onCheckedChange: function () { return handleToggleChange(index); }, onClick: function (e) { return e.stopPropagation(); } }), jsxs("div", __assign$1({ className: "flex-1 space-y-0" }, { children: [jsxs("div", __assign$1({ className: "text-sm text-gray-900 flex items-center gap-2" }, { children: [jsx("span", __assign$1({ className: "line-through" }, { children: String(change.oldValue || 'empty') })), jsx("span", { children: "\u2192" }), jsx("span", __assign$1({ className: "text-green-600 font-bold" }, { children: String(change.newValue) }))] })), jsxs("p", __assign$1({ className: "text-xs text-gray-600" }, { children: ["Row ", change.rowIndex + 1, ", ", change.columnKey] }))] }))] }), index)); }), changes.length > 100 && (jsx("p", __assign$1({ className: "text-sm text-gray-500 text-center" }, { children: t("Showing first 100 of ".concat(changes.length, " changes")) })))] })) })), jsxs("p", __assign$1({ className: "text-sm text-gray-600 mt-1" }, { children: [selectedCount, " ", t('selected')] }))] }) }))] })), jsx(DialogFooter, { children: jsxs("div", __assign$1({ className: "flex gap-3" }, { children: [jsx(Button, __assign$1({ type: "button", variant: "outline", onClick: handleClose }, { children: t('Cancel') })), hasChanges && (jsxs(Fragment$1, { children: [jsx(Button, __assign$1({ type: "button", variant: "outline", onClick: function () { return handleApply(false); }, disabled: selectedCount === 0 }, { children: t("Apply ".concat(selectedCount, " selected")) })), jsxs(Button, __assign$1({ type: "button", onClick: function () { return handleApply(true); } }, { children: [jsx(PiCheck, { className: "mr-2 h-4 w-4" }), t('Apply all')] }))] }))] })) })] })) })));
|
|
29575
29575
|
}
|
|
29576
29576
|
|
|
29577
29577
|
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"};
|