@ingestro/importer-vanilla-js 4.0.1

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/README.md ADDED
@@ -0,0 +1,199 @@
1
+ <!-- markdownlint-disable -->
2
+ <p align="center">
3
+ <a href="https://ingestro.com/" rel="noopener" target="_blank"><img width="150" src="https://general-upload.ingestro.com/nuvo_logo_with_text.svg" alt="nuvo logo"></a>
4
+ </p>
5
+
6
+ <h1 align="center">@getnuvo/importer-vanilla-js</h1>
7
+
8
+ <div align="center">
9
+
10
+ [![npm latest package](https://img.shields.io/npm/v/@getnuvo%2Fimporter-vanilla-js?color=5c8ef2&label=npm@latest)](https://badge.fury.io/js/@getnuvo%2Fimporter-vanilla-js)
11
+ [![API status](https://img.shields.io/uptimerobot/ratio/m792354517-acd98c6100961072cc093759?color=2fa659&label=uptime)](https://status.ingestro.com/)
12
+
13
+ </div>
14
+
15
+ > [!NOTE]
16
+ > The `@getnuvo/importer-vanilla-js` package is the successor to our previous `nuvo-vanilla-js` package.
17
+ > While you can continue using versions 2.x of `nuvo-vanilla-js`, we recommend migrating to
18
+ > `@getnuvo/importer-vanilla-js` version 3.x to take advantage of the latest features and improvements.
19
+
20
+ # nuvo Data Importer Vanilla JS SDK
21
+
22
+ **nuvo** leverages AI to simplify importing complex and unstructured files into your application.
23
+
24
+ Integrate the nuvo Data Importer to offer your customers an intuitive and efficient data import experience.
25
+
26
+ ## Features
27
+
28
+ - **AI-Powered Column and Option Mapping**: Automatically matches imported data columns to your system's target data model, streamlining the import process.
29
+ - **Customizable Cleaning Functions**: Implement custom logic to validate and transform data during the import workflow.
30
+ - **Support for Multiple File Formats**: Handles various file types, including CSV, TSV, XLS, XLSX, JSON, XML, and PDF.
31
+ - **Dynamic Import Capabilities**: Initiate the import process from any step, accommodating diverse data sources and workflows.
32
+ - **Styling and Theming**: Easily adjust the importer's appearance to align with your application's design.
33
+ - **Multi-language Support**: Customize and localize interface text to cater to a global user base.
34
+
35
+ ## Getting Started
36
+
37
+ Ensure you have signed up on our [User Platform](https://dashboard.ingestro.com/) and have access to your nuvo license key.
38
+
39
+ ### Installation
40
+
41
+ Add nuvo to your project:
42
+
43
+ **npm:**
44
+
45
+ ```bash
46
+ npm install @getnuvo/importer-vanilla-js
47
+ ```
48
+
49
+ **yarn:**
50
+
51
+ ```bash
52
+ yarn add @getnuvo/importer-vanilla-js
53
+ ```
54
+
55
+ ### Basic Implementation
56
+
57
+ Below is a basic example of integrating the `NuvoImporter` component into your Vanilla JS application:
58
+
59
+ CDN:
60
+
61
+ ```js
62
+ <div class="nuvo-container" />
63
+ <script type="module">
64
+ import { launchDataImporter } from 'https://unpkg.com/@getnuvo/importer-vanilla-js';
65
+
66
+ launchDataImporter('.nuvo-container', {
67
+ licenseKey: 'Your License Key',
68
+ settings: {
69
+ identifier: 'product_data',
70
+ columns: [
71
+ {
72
+ label: 'Product ID',
73
+ key: 'product_id',
74
+ },
75
+ {
76
+ label: 'Article Name',
77
+ key: 'article_name',
78
+ },
79
+ ],
80
+ },
81
+ onResults: (results, errors, complete, logs) => {
82
+ console.log('Imported Data:', results);
83
+ console.log('Errors:', errors);
84
+ console.log('Import Logs:', logs);
85
+ complete(); // Finalize the import process
86
+ },
87
+ });
88
+ </script>
89
+ ```
90
+
91
+ NPM:
92
+
93
+ ```js
94
+ <div class="nuvo-container" />
95
+ <script type="module">
96
+ import { launchDataImporter } from '@getnuvo/importer-vanilla-js';
97
+
98
+ launchDataImporter('.nuvo-container', {
99
+ licenseKey: 'Your License Key',
100
+ settings: {
101
+ identifier: 'product_data',
102
+ columns: [
103
+ {
104
+ label: 'Product ID',
105
+ key: 'product_id',
106
+ },
107
+ {
108
+ label: 'Article Name',
109
+ key: 'article_name',
110
+ },
111
+ ],
112
+ },
113
+ onResults: (results, errors, complete, logs) => {
114
+ console.log('Imported Data:', results);
115
+ console.log('Errors:', errors);
116
+ console.log('Import Logs:', logs);
117
+ complete(); // Finalize the import process
118
+ },
119
+ });
120
+ </script>
121
+ ```
122
+
123
+ In this example:
124
+
125
+ - **licenseKey**: Your unique nuvo license key.
126
+ - **settings**: Configuration object for the importer.
127
+ - **identifier**: A unique string to identify the import instance.
128
+ - **columns**: Defines the target data model (TDM) with `label` and `key` for each column.
129
+ - **onResults**: Callback function that handles the imported data results.
130
+
131
+ For a comprehensive guide on setting up and customizing the importer, refer to the [First Steps](https://docs.ingestro.com/sdk/start/) documentation.
132
+
133
+ ## Advanced Configuration
134
+
135
+ ### Settings & Configuration
136
+
137
+ The `settings` property allows you to tailor the importer's behavior and appearance. Key configurable options include:
138
+
139
+ - **inputTypes**: Specify supported file types (e.g., `['csv', 'xls', 'json']`).
140
+ - **modal**: Determine whether the importer operates within a modal (`true`) or inline (`false`).
141
+
142
+ For a detailed list of configuration options, visit the [Settings & Configuration](https://docs.ingestro.com/sdk/settings/) page.
143
+
144
+ ### Target Data Model (TDM)
145
+
146
+ Define the structure of the data you expect using the `columns` array within the `settings`. Each column can include:
147
+
148
+ - **label**: User-friendly name displayed in the UI.
149
+ - **key**: Technical identifier for the column.
150
+ - **description**: Additional information about the column.
151
+ - **alternativeMatches**: Array of synonyms or abbreviations to assist the mapping algorithm.
152
+ - **validations**: Rules such as required fields, uniqueness, regex patterns, and cross-column dependencies.
153
+
154
+ Learn more about defining your TDM in the [Columns / Target Data Model](https://docs.ingestro.com/sdk/columns/) documentation.
155
+
156
+ ### Cleaning & Data Handler Functions
157
+
158
+ Implement custom cleaning & data handler functions (callback functions) to transform and validate data during the import process. These functions can correct date formats, enrich entries, compare imported data against external databases, and more.
159
+
160
+ Explore the capabilities of these functions in the [Cleaning Functions](https://docs.ingestro.com/sdk/cleaning-functions/) & [Data Handler](https://docs.ingestro.com/sdk/data-handler) docs.
161
+
162
+ ### Dynamic Import
163
+
164
+ The dynamic import feature allows you to start the import process from any step and with various data formats. This flexibility enables integration with different workflows and data sources.
165
+
166
+ For implementation details, refer to the [Dynamic Import](https://docs.ingestro.com/sdk/dynamic-import/) documentation.
167
+
168
+ ### Styling and Theming
169
+
170
+ Customize the appearance of the nuvo importer to match your application's design. Modify themes, adjust display modes, and enable or disable specific features to create a seamless user experience.
171
+
172
+ Learn more about styling options in the [Styling](https://docs.ingestro.com/sdk/styling/) section.
173
+
174
+ ### Multi-language Support
175
+
176
+ The `i18nOverrides` and `language` feature allow you to customize and localize the application's default language keys, ensuring the importer aligns with your users' language preferences.
177
+
178
+ For more information on localization, visit the [Multi-language Support](https://docs.ingestro.com/sdk/multi-language/) & [Language](https://docs.ingestro.com/sdk/settings#language) page.
179
+
180
+ ## Handling Results
181
+
182
+ The `onResults` callback function provides access to the cleaned data, allowing you to define how to process and store it.
183
+
184
+ Detailed information on handling results can be found in the [Result (Output)](https://docs.ingestro.com/sdk/results/) documentation.
185
+
186
+ ## Release Notes
187
+
188
+ Stay updated with the latest features, improvements, and bug fixes by reviewing our [Release Notes](https://docs.ingestro.com/sdk/release-notes/).
189
+
190
+ ## Learn More
191
+
192
+ Explore how to get the most out of nuvo with real examples and detailed guides:
193
+
194
+ - Try it live on [CodeSandbox](https://codesandbox.io/p/devbox/dank-feather-qt3n87) – test and tweak the importer in action.
195
+ - Visit our [Knowledge Base](https://dashboard.ingestro.com/knowledge-base) for deep dives into settings, data models, cleaning functions, and more.
196
+
197
+ ## Support
198
+
199
+ If you have any questions or need assistance, please refer to our [FAQ](https://docs.ingestro.com/sdk/faq) or contact our support team at [support@ingestro.com](mailto:support@ingestro.com).