@webitel/ui-sdk 26.2.101 → 26.2.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui-sdk.css +1 -1
- package/package.json +4 -3
- package/src/components/on-demand/wt-upload-file-icon-btn/wt-upload-file-icon-btn.vue +77 -0
- package/src/css/main.css +17 -0
- package/src/locale/en/en.js +9 -0
- package/src/locale/es/es.js +9 -0
- package/src/locale/kz/kz.js +9 -0
- package/src/locale/pl/pl.js +9 -0
- package/src/locale/ro/ro.js +9 -0
- package/src/locale/ru/ru.js +9 -0
- package/src/locale/uk/uk.js +9 -0
- package/src/locale/uz/uz.js +9 -0
- package/src/locale/vi/vi.js +9 -0
- package/src/modules/UploadCsvPopup/components/wt-upload-csv-popup.vue +266 -0
- package/src/modules/UploadCsvPopup/composable/useUploadCsv.ts +203 -0
- package/src/modules/UploadCsvPopup/scripts/normalizeCSVData.ts +60 -0
- package/src/modules/UploadCsvPopup/scripts/parseCSV.ts +13 -0
- package/src/modules/UploadCsvPopup/scripts/processFile.ts +12 -0
- package/src/modules/UploadCsvPopup/scripts/splitAndSaveData.ts +25 -0
- package/src/modules/UploadCsvPopup/types/WtUploadCSVHandlingMode.enum.ts +9 -0
- package/types/components/on-demand/wt-upload-file-icon-btn/wt-upload-file-icon-btn.vue.d.ts +12 -0
- package/types/locale/en/en.d.ts +9 -0
- package/types/locale/es/es.d.ts +9 -0
- package/types/locale/i18n.d.ts +81 -0
- package/types/locale/index.d.ts +81 -0
- package/types/locale/kz/kz.d.ts +9 -0
- package/types/locale/pl/pl.d.ts +9 -0
- package/types/locale/ro/ro.d.ts +9 -0
- package/types/locale/ru/ru.d.ts +9 -0
- package/types/locale/uk/uk.d.ts +9 -0
- package/types/locale/uz/uz.d.ts +9 -0
- package/types/locale/vi/vi.d.ts +9 -0
- package/types/modules/UploadCsvPopup/components/wt-upload-csv-popup.vue.d.ts +22 -0
- package/types/modules/UploadCsvPopup/composable/useUploadCsv.d.ts +33 -0
- package/types/modules/UploadCsvPopup/scripts/normalizeCSVData.d.ts +21 -0
- package/types/modules/UploadCsvPopup/scripts/parseCSV.d.ts +2 -0
- package/types/modules/UploadCsvPopup/scripts/processFile.d.ts +4 -0
- package/types/modules/UploadCsvPopup/scripts/splitAndSaveData.d.ts +5 -0
- package/types/modules/UploadCsvPopup/types/WtUploadCSVHandlingMode.enum.d.ts +6 -0
package/types/locale/ru/ru.d.ts
CHANGED
|
@@ -239,6 +239,15 @@ declare namespace _default {
|
|
|
239
239
|
export { status_2 as status };
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
+
export let importCSV: string;
|
|
243
|
+
export namespace CSV {
|
|
244
|
+
let skipHeaders: string;
|
|
245
|
+
let charSet: string;
|
|
246
|
+
let separator: string;
|
|
247
|
+
let CSVColumn: string;
|
|
248
|
+
let fieldName: string;
|
|
249
|
+
let clearMember: string;
|
|
250
|
+
}
|
|
242
251
|
export namespace channel_1 {
|
|
243
252
|
let state_1: {
|
|
244
253
|
[x: number]: string;
|
package/types/locale/uk/uk.d.ts
CHANGED
|
@@ -239,6 +239,15 @@ declare namespace _default {
|
|
|
239
239
|
export { status_2 as status };
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
+
export let importCSV: string;
|
|
243
|
+
export namespace CSV {
|
|
244
|
+
let skipHeaders: string;
|
|
245
|
+
let charSet: string;
|
|
246
|
+
let separator: string;
|
|
247
|
+
let CSVColumn: string;
|
|
248
|
+
let fieldName: string;
|
|
249
|
+
let clearMember: string;
|
|
250
|
+
}
|
|
242
251
|
export namespace channel_1 {
|
|
243
252
|
let state_1: {
|
|
244
253
|
[x: number]: string;
|
package/types/locale/uz/uz.d.ts
CHANGED
|
@@ -242,6 +242,15 @@ declare namespace _default {
|
|
|
242
242
|
export { status_2 as status };
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
+
export let importCSV: string;
|
|
246
|
+
export namespace CSV {
|
|
247
|
+
let skipHeaders: string;
|
|
248
|
+
let charSet: string;
|
|
249
|
+
let separator: string;
|
|
250
|
+
let CSVColumn: string;
|
|
251
|
+
let fieldName: string;
|
|
252
|
+
let clearMember: string;
|
|
253
|
+
}
|
|
245
254
|
export namespace channel_1 {
|
|
246
255
|
let state_1: {
|
|
247
256
|
[x: number]: string;
|
package/types/locale/vi/vi.d.ts
CHANGED
|
@@ -241,6 +241,15 @@ declare namespace _default {
|
|
|
241
241
|
export { status_2 as status };
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
+
export let importCSV: string;
|
|
245
|
+
export namespace CSV {
|
|
246
|
+
let skipHeaders: string;
|
|
247
|
+
let charSet: string;
|
|
248
|
+
let separator: string;
|
|
249
|
+
let CSVColumn: string;
|
|
250
|
+
let fieldName: string;
|
|
251
|
+
let clearMember: string;
|
|
252
|
+
}
|
|
244
253
|
export namespace channel_1 {
|
|
245
254
|
let state_1: {
|
|
246
255
|
[x: number]: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
file: File | null;
|
|
3
|
+
mappingFields: unknown[];
|
|
4
|
+
addBulkItems?: (items: unknown[]) => unknown | Promise<unknown>;
|
|
5
|
+
handlingMode?: string;
|
|
6
|
+
fileUploadHandler?: () => unknown | Promise<unknown>;
|
|
7
|
+
}
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
+
close: () => any;
|
|
10
|
+
save: () => any;
|
|
11
|
+
changeMappingFields: (value: unknown[]) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
13
|
+
onClose?: () => any;
|
|
14
|
+
onSave?: () => any;
|
|
15
|
+
onChangeMappingFields?: (value: unknown[]) => any;
|
|
16
|
+
}>, {
|
|
17
|
+
file: File | null;
|
|
18
|
+
mappingFields: unknown[];
|
|
19
|
+
handlingMode: string;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {Object} params
|
|
3
|
+
* @param {Object} params.props - component props (file, mappingFields, handlingMode, addBulkItems, fileUploadHandler)
|
|
4
|
+
* @param {Function} params.emit - emit from setup
|
|
5
|
+
* @param {import('vue').Ref<boolean>} params.skipHeaders
|
|
6
|
+
* @param {import('vue').Ref<string>} params.separator
|
|
7
|
+
*/
|
|
8
|
+
declare const useUploadCsv: ({ props, emit, skipHeaders, separator }: {
|
|
9
|
+
props: any;
|
|
10
|
+
emit: any;
|
|
11
|
+
skipHeaders: any;
|
|
12
|
+
separator: any;
|
|
13
|
+
}) => {
|
|
14
|
+
isReadingFile: import("vue").Ref<boolean, boolean>;
|
|
15
|
+
isParsingCSV: import("vue").Ref<boolean, boolean>;
|
|
16
|
+
isParsingPreview: import("vue").Ref<boolean, boolean>;
|
|
17
|
+
parseErrorStackTrace: import("vue").Ref<string, string>;
|
|
18
|
+
csvPreviewTableData: import("vue").ComputedRef<any[][]>;
|
|
19
|
+
csvPreviewTableHeaders: import("vue").ComputedRef<{
|
|
20
|
+
text: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}[]>;
|
|
23
|
+
filteredCsvPreviewTableHeaders: import("vue").ComputedRef<{
|
|
24
|
+
text: string;
|
|
25
|
+
value: string;
|
|
26
|
+
}[]>;
|
|
27
|
+
csvColumns: import("vue").ComputedRef<string[]>;
|
|
28
|
+
allowSaveAction: import("vue").ComputedRef<any>;
|
|
29
|
+
processCSV: () => Promise<void>;
|
|
30
|
+
handleSave: () => Promise<void>;
|
|
31
|
+
close: () => void;
|
|
32
|
+
};
|
|
33
|
+
export default useUploadCsv;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param data
|
|
4
|
+
* @param mappings
|
|
5
|
+
*
|
|
6
|
+
* Data format: {
|
|
7
|
+
* [colName]: [value]
|
|
8
|
+
* }
|
|
9
|
+
*
|
|
10
|
+
* Mappings format: {
|
|
11
|
+
* name: string, // webitel field name
|
|
12
|
+
* csv: string | string[], // csv column name
|
|
13
|
+
* required: boolean, // is this webitel field required?
|
|
14
|
+
* locale: string, // ui
|
|
15
|
+
* }
|
|
16
|
+
*/
|
|
17
|
+
declare const normalizeCSVData: ({ data, mappings }: {
|
|
18
|
+
data: any;
|
|
19
|
+
mappings: any;
|
|
20
|
+
}) => any;
|
|
21
|
+
export default normalizeCSVData;
|