@tager/admin-export 0.1.4 → 1.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.
Files changed (54) hide show
  1. package/dist/constants/paths.d.ts +4 -4
  2. package/dist/constants/routes.d.ts +3 -3
  3. package/dist/dev/App.vue.d.ts +5 -0
  4. package/dist/dev/config.d.ts +2 -0
  5. package/dist/dev/env.d.ts +1 -0
  6. package/dist/dev/main.d.ts +3 -0
  7. package/dist/index.mjs +512 -0
  8. package/dist/locales/apply.d.ts +1 -0
  9. package/dist/locales/en.d.ts +23 -25
  10. package/dist/locales/ru.d.ts +2 -3
  11. package/dist/main.d.ts +3 -3
  12. package/dist/services/requests.d.ts +8 -8
  13. package/dist/style.css +1 -0
  14. package/dist/typings/model.d.ts +26 -24
  15. package/dist/utils/common.d.ts +1 -1
  16. package/dist/utils/paths.d.ts +4 -4
  17. package/dist/views/ExportForm/ExportForm.helpers.d.ts +11 -9
  18. package/dist/views/ExportForm/ExportForm.types.d.ts +7 -0
  19. package/dist/views/ExportForm/ExportForm.vue.d.ts +2693 -74
  20. package/dist/views/ExportForm/index.d.ts +1 -1
  21. package/dist/views/ExportList/ExportList.vue.d.ts +16 -41
  22. package/dist/views/ExportList/components/CellHistory/CellHistory.helpers.d.ts +1 -0
  23. package/dist/views/ExportList/components/CellHistory/CellHistory.vue.d.ts +19 -0
  24. package/dist/views/ExportList/components/CellHistory/index.d.ts +1 -0
  25. package/dist/views/ExportList/index.d.ts +1 -1
  26. package/package.json +49 -47
  27. package/src/constants/routes.ts +10 -10
  28. package/src/dev/App.vue +38 -0
  29. package/src/dev/config.ts +23 -0
  30. package/src/dev/env.ts +17 -0
  31. package/src/dev/main.ts +36 -0
  32. package/src/locales/apply.ts +9 -0
  33. package/src/locales/en.ts +1 -4
  34. package/src/locales/ru.ts +2 -5
  35. package/src/main.ts +2 -6
  36. package/src/services/requests.ts +1 -1
  37. package/src/typings/model.ts +8 -1
  38. package/src/views/ExportForm/ExportForm.helpers.ts +31 -8
  39. package/src/views/ExportForm/ExportForm.types.ts +8 -0
  40. package/src/views/ExportForm/ExportForm.vue +143 -118
  41. package/src/views/ExportList/ExportList.vue +47 -63
  42. package/src/views/ExportList/components/CellHistory/CellHistory.helpers.ts +12 -0
  43. package/src/views/ExportList/components/CellHistory/CellHistory.vue +38 -0
  44. package/src/views/ExportList/components/CellHistory/index.ts +1 -0
  45. package/README.md +0 -0
  46. package/dist/dev.d.ts +0 -1
  47. package/dist/index.esm.js +0 -714
  48. package/dist/index.umd.js +0 -725
  49. package/src/config/config.json +0 -20
  50. package/src/dev.ts +0 -41
  51. package/src/typings/sfc.d.ts +0 -12
  52. package/src/typings/shims-tsx.d.ts +0 -13
  53. package/src/typings/shims-vue.d.ts +0 -11
  54. package/src/views/App.vue +0 -36
@@ -1,24 +1,26 @@
1
- import { FileType } from '@tager/admin-services';
2
- interface HistoryType {
3
- readonly datetime: string;
4
- readonly status: string;
5
- }
6
- export interface ExportType {
7
- readonly id: number;
8
- readonly strategy: string;
9
- readonly status: string;
10
- readonly message: string | null;
11
- readonly history: Array<HistoryType>;
12
- readonly file: FileType | null;
13
- }
14
- export interface StrategyType {
15
- id: string;
16
- name: string;
17
- }
18
- export interface ExportCreatePayload {
19
- strategy: string;
20
- filename: string;
21
- format: string;
22
- delimiter: string;
23
- }
24
- export {};
1
+ import { FileType } from '@tager/admin-services';
2
+ import { FieldConfigUnion, FieldShortType, OutgoingValueUnion } from '@tager/admin-dynamic-field';
3
+ export interface HistoryType {
4
+ readonly datetime: string;
5
+ readonly status: string;
6
+ }
7
+ export interface ExportType {
8
+ readonly id: number;
9
+ readonly strategy: string;
10
+ readonly status: string;
11
+ readonly message: string | null;
12
+ readonly history: Array<HistoryType>;
13
+ readonly file: FileType | null;
14
+ }
15
+ export interface StrategyType {
16
+ id: string;
17
+ name: string;
18
+ fields: Array<FieldConfigUnion>;
19
+ }
20
+ export interface ExportCreatePayload {
21
+ strategy: string;
22
+ filename: string;
23
+ format: string;
24
+ delimiter: string;
25
+ params: Array<FieldShortType<OutgoingValueUnion>>;
26
+ }
@@ -1 +1 @@
1
- export declare function replaceFileExtension(fileName: string, newExtension: string): string;
1
+ export declare function replaceFileExtension(fileName: string, newExtension: string): string;
@@ -1,4 +1,4 @@
1
- export declare function getExportListUrl(): string;
2
- export declare function getExportFormUrl(params: {
3
- exportId: string | number;
4
- }): string;
1
+ export declare function getExportListUrl(): string;
2
+ export declare function getExportFormUrl(params: {
3
+ exportId: string | number;
4
+ }): string;
@@ -1,9 +1,11 @@
1
- import { OptionType } from '@tager/admin-ui';
2
- import { ExportCreatePayload } from '../../typings/model';
3
- export declare type FormValues = {
4
- strategy: OptionType | null;
5
- filename: string;
6
- format: OptionType | null;
7
- delimiter: OptionType | null;
8
- };
9
- export declare function convertExportFormValuesToCreationPayload(values: FormValues): ExportCreatePayload;
1
+ import { OptionType } from '@tager/admin-ui';
2
+ import { FieldUnion } from '@tager/admin-dynamic-field';
3
+ import { ExportCreatePayload, StrategyType } from '../../typings/model';
4
+ import { FormValues } from './ExportForm.types';
5
+ export declare function convertExportFormValuesToCreationPayload(values: FormValues, templateValues: Array<FieldUnion>): ExportCreatePayload;
6
+ export declare function convertStrategiesToStrategyOptionList(strategies: Array<StrategyType>): Array<OptionType>;
7
+ export declare const formatOptionList: {
8
+ value: string;
9
+ label: string;
10
+ }[];
11
+ export declare function isCSVFormat(format: string): boolean;
@@ -0,0 +1,7 @@
1
+ import { OptionType } from '@tager/admin-ui';
2
+ export interface FormValues {
3
+ strategy: OptionType | null;
4
+ filename: string;
5
+ format: OptionType | null;
6
+ delimiter: OptionType | null;
7
+ }