@tager/admin-export 0.1.5 → 1.0.0

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 (52) 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 +506 -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 -26
  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 -11
  18. package/dist/views/ExportForm/ExportForm.types.d.ts +7 -7
  19. package/dist/views/ExportForm/ExportForm.vue.d.ts +2693 -9248
  20. package/dist/views/ExportForm/index.d.ts +1 -1
  21. package/dist/views/ExportList/ExportList.vue.d.ts +16 -38
  22. package/dist/views/ExportList/components/CellHistory/CellHistory.helpers.d.ts +1 -1
  23. package/dist/views/ExportList/components/CellHistory/CellHistory.vue.d.ts +19 -230
  24. package/dist/views/ExportList/components/CellHistory/index.d.ts +1 -1
  25. package/dist/views/ExportList/index.d.ts +1 -1
  26. package/package.json +49 -48
  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/views/ExportForm/ExportForm.helpers.ts +0 -2
  37. package/src/views/ExportForm/ExportForm.vue +111 -106
  38. package/src/views/ExportList/ExportList.vue +46 -43
  39. package/src/views/ExportList/components/CellHistory/CellHistory.helpers.ts +2 -2
  40. package/src/views/ExportList/components/CellHistory/CellHistory.vue +4 -7
  41. package/README.md +0 -0
  42. package/dist/dev.d.ts +0 -1
  43. package/dist/index.esm.js +0 -3702
  44. package/dist/index.umd.js +0 -3714
  45. package/dist/views/ExportList/components/CellHistory/CellHistory.types.d.ts +0 -4
  46. package/src/config/config.json +0 -20
  47. package/src/dev.ts +0 -41
  48. package/src/typings/sfc.d.ts +0 -12
  49. package/src/typings/shims-tsx.d.ts +0 -13
  50. package/src/typings/shims-vue.d.ts +0 -11
  51. package/src/views/App.vue +0 -36
  52. package/src/views/ExportList/components/CellHistory/CellHistory.types.ts +0 -5
@@ -1 +1 @@
1
- export { default } from './ExportForm.vue';
1
+ export { default } from './ExportForm.vue';
@@ -1,38 +1,16 @@
1
- import { ColumnDefinition } from '@tager/admin-ui';
2
- import { ExportType } from '../../typings/model';
3
- import { getExportFormUrl } from '../../utils/paths';
4
- import { CellHistory } from './components/CellHistory';
5
- declare const _default: import("vue").ComponentOptions<CellHistory, import("@vue/composition-api").ShallowUnwrapRef<{
6
- columnDefs: ColumnDefinition<ExportType>[];
7
- getExportFormUrl: typeof getExportFormUrl;
8
- rowData: import("@vue/composition-api").Ref<ExportType[]>;
9
- isRowDataLoading: import("@vue/composition-api").ComputedRef<boolean>;
10
- errorMessage: import("@vue/composition-api").Ref<import("@tager/admin-services").Nullable<string>>;
11
- searchQuery: import("@vue/composition-api").Ref<string>;
12
- handleChange: (event: import("@tager/admin-ui").TableChangeEvent) => void;
13
- pageSize: import("@vue/composition-api").Ref<number>;
14
- pageCount: import("@vue/composition-api").ComputedRef<number>;
15
- pageNumber: import("@vue/composition-api").Ref<number>;
16
- }> & {
17
- [key: string]: unknown;
18
- }, {}, {}, unknown, {
19
- [x: string]: any;
20
- }> & import("vue").VueConstructor<CellHistory> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
21
- [x: string]: any;
22
- }, import("@vue/composition-api").ShallowUnwrapRef<{
23
- columnDefs: ColumnDefinition<ExportType>[];
24
- getExportFormUrl: typeof getExportFormUrl;
25
- rowData: import("@vue/composition-api").Ref<ExportType[]>;
26
- isRowDataLoading: import("@vue/composition-api").ComputedRef<boolean>;
27
- errorMessage: import("@vue/composition-api").Ref<import("@tager/admin-services").Nullable<string>>;
28
- searchQuery: import("@vue/composition-api").Ref<string>;
29
- handleChange: (event: import("@tager/admin-ui").TableChangeEvent) => void;
30
- pageSize: import("@vue/composition-api").Ref<number>;
31
- pageCount: import("@vue/composition-api").ComputedRef<number>;
32
- pageNumber: import("@vue/composition-api").Ref<number>;
33
- }>, {
34
- [x: string]: any;
35
- }, {}, {}, {
36
- [x: string]: any;
37
- }>);
38
- export default _default;
1
+ import { type ColumnDefinition } from "@tager/admin-ui";
2
+ import { ExportType } from '../../typings/model';
3
+ import { getExportFormUrl } from '../../utils/paths';
4
+ declare const _default: import("vue").DefineComponent<{}, {
5
+ columnDefs: ColumnDefinition<ExportType>[];
6
+ getExportFormUrl: typeof getExportFormUrl;
7
+ rowData: import("vue").Ref<ExportType[]>;
8
+ isRowDataLoading: import("vue").ComputedRef<boolean>;
9
+ errorMessage: import("vue").Ref<import("@tager/admin-services").Nullable<string>>;
10
+ searchQuery: import("vue").Ref<string>;
11
+ handleChange: (event: import("@tager/admin-ui/dist/components/DataTable/DataTable.types").TableChangeEvent) => void;
12
+ pageSize: import("vue").Ref<number>;
13
+ pageCount: import("vue").ComputedRef<number>;
14
+ pageNumber: import("vue").Ref<number>;
15
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
16
+ export default _default;
@@ -1 +1 @@
1
- export declare function dateTimeFormat(value: number | string | Date): string;
1
+ export declare function dateTimeFormat(value: number | string | Date): string;
@@ -1,230 +1,19 @@
1
- declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
2
- [key: string]: unknown;
3
- }> & {
4
- [key: string]: unknown;
5
- }, {}, {}, string[] | {
6
- [x: string]: (new (...args: string[]) => Function) | import("@vue/composition-api").PropOptions<unknown> | (new (...args: any[]) => object) | (() => unknown) | ((new (...args: string[]) => Function) | (new (...args: any[]) => object) | (() => unknown))[] | null;
7
- }, ({
8
- [x: number]: string;
9
- } & {
10
- length?: number | undefined;
11
- toString?: string | undefined;
12
- toLocaleString?: string | undefined;
13
- pop?: string | undefined;
14
- push?: number | undefined;
15
- concat?: string[] | undefined;
16
- join?: string | undefined;
17
- reverse?: string[] | undefined;
18
- shift?: string | undefined;
19
- slice?: string[] | undefined;
20
- sort?: string[] | undefined;
21
- splice?: {
22
- (start: number, deleteCount?: number | undefined): string[];
23
- (start: number, deleteCount: number, ...items: string[]): string[];
24
- } | undefined;
25
- unshift?: number | undefined;
26
- indexOf?: ((searchElement: string, fromIndex?: number | undefined) => number) | undefined;
27
- lastIndexOf?: ((searchElement: string, fromIndex?: number | undefined) => number) | undefined;
28
- every?: ((callbackfn: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => boolean) | undefined;
29
- some?: ((callbackfn: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => boolean) | undefined;
30
- forEach?: ((callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void) | undefined;
31
- map?: (<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | undefined;
32
- filter?: {
33
- <S extends string>(callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[];
34
- (callbackfn: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[];
35
- } | undefined;
36
- reduce?: {
37
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
38
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
39
- <U_1>(callbackfn: (previousValue: U_1, currentValue: string, currentIndex: number, array: string[]) => U_1, initialValue: U_1): U_1;
40
- } | undefined;
41
- reduceRight?: {
42
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
43
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
44
- <U_2>(callbackfn: (previousValue: U_2, currentValue: string, currentIndex: number, array: string[]) => U_2, initialValue: U_2): U_2;
45
- } | undefined;
46
- find?: {
47
- <S_1 extends string>(predicate: (this: void, value: string, index: number, obj: string[]) => value is S_1, thisArg?: any): S_1 | undefined;
48
- (predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): string | undefined;
49
- } | undefined;
50
- findIndex?: ((predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any) => number) | undefined;
51
- fill?: ((value: string, start?: number | undefined, end?: number | undefined) => string[]) | undefined;
52
- copyWithin?: ((target: number, start: number, end?: number | undefined) => string[]) | undefined;
53
- entries?: IterableIterator<[number, string]> | undefined;
54
- keys?: IterableIterator<number> | undefined;
55
- values?: IterableIterator<string> | undefined;
56
- includes?: ((searchElement: string, fromIndex?: number | undefined) => boolean) | undefined;
57
- flatMap?: (<U_3, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U_3 | readonly U_3[], thisArg?: This | undefined) => U_3[]) | undefined;
58
- flat?: unknown[] | undefined;
59
- }) | ({} & {
60
- [x: string]: any;
61
- [x: number]: any;
62
- })> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<({
63
- [x: number]: string;
64
- } & {
65
- length?: number | undefined;
66
- toString?: string | undefined;
67
- toLocaleString?: string | undefined;
68
- pop?: string | undefined;
69
- push?: number | undefined;
70
- concat?: string[] | undefined;
71
- join?: string | undefined;
72
- reverse?: string[] | undefined;
73
- shift?: string | undefined;
74
- slice?: string[] | undefined;
75
- sort?: string[] | undefined;
76
- splice?: {
77
- (start: number, deleteCount?: number | undefined): string[];
78
- (start: number, deleteCount: number, ...items: string[]): string[];
79
- } | undefined;
80
- unshift?: number | undefined;
81
- indexOf?: ((searchElement: string, fromIndex?: number | undefined) => number) | undefined;
82
- lastIndexOf?: ((searchElement: string, fromIndex?: number | undefined) => number) | undefined;
83
- every?: ((callbackfn: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => boolean) | undefined;
84
- some?: ((callbackfn: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => boolean) | undefined;
85
- forEach?: ((callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void) | undefined;
86
- map?: (<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | undefined;
87
- filter?: {
88
- <S extends string>(callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[];
89
- (callbackfn: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[];
90
- } | undefined;
91
- reduce?: {
92
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
93
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
94
- <U_1>(callbackfn: (previousValue: U_1, currentValue: string, currentIndex: number, array: string[]) => U_1, initialValue: U_1): U_1;
95
- } | undefined;
96
- reduceRight?: {
97
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
98
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
99
- <U_2>(callbackfn: (previousValue: U_2, currentValue: string, currentIndex: number, array: string[]) => U_2, initialValue: U_2): U_2;
100
- } | undefined;
101
- find?: {
102
- <S_1 extends string>(predicate: (this: void, value: string, index: number, obj: string[]) => value is S_1, thisArg?: any): S_1 | undefined;
103
- (predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): string | undefined;
104
- } | undefined;
105
- findIndex?: ((predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any) => number) | undefined;
106
- fill?: ((value: string, start?: number | undefined, end?: number | undefined) => string[]) | undefined;
107
- copyWithin?: ((target: number, start: number, end?: number | undefined) => string[]) | undefined;
108
- entries?: IterableIterator<[number, string]> | undefined;
109
- keys?: IterableIterator<number> | undefined;
110
- values?: IterableIterator<string> | undefined;
111
- includes?: ((searchElement: string, fromIndex?: number | undefined) => boolean) | undefined;
112
- flatMap?: (<U_3, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U_3 | readonly U_3[], thisArg?: This | undefined) => U_3[]) | undefined;
113
- flat?: unknown[] | undefined;
114
- }) | ({} & {
115
- [x: string]: any;
116
- [x: number]: any;
117
- }), import("@vue/composition-api").ShallowUnwrapRef<{
118
- [key: string]: unknown;
119
- }>, ({
120
- [x: number]: string;
121
- } & {
122
- length?: number | undefined;
123
- toString?: string | undefined;
124
- toLocaleString?: string | undefined;
125
- pop?: string | undefined;
126
- push?: number | undefined;
127
- concat?: string[] | undefined;
128
- join?: string | undefined;
129
- reverse?: string[] | undefined;
130
- shift?: string | undefined;
131
- slice?: string[] | undefined;
132
- sort?: string[] | undefined;
133
- splice?: {
134
- (start: number, deleteCount?: number | undefined): string[];
135
- (start: number, deleteCount: number, ...items: string[]): string[];
136
- } | undefined;
137
- unshift?: number | undefined;
138
- indexOf?: ((searchElement: string, fromIndex?: number | undefined) => number) | undefined;
139
- lastIndexOf?: ((searchElement: string, fromIndex?: number | undefined) => number) | undefined;
140
- every?: ((callbackfn: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => boolean) | undefined;
141
- some?: ((callbackfn: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => boolean) | undefined;
142
- forEach?: ((callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void) | undefined;
143
- map?: (<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | undefined;
144
- filter?: {
145
- <S extends string>(callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[];
146
- (callbackfn: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[];
147
- } | undefined;
148
- reduce?: {
149
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
150
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
151
- <U_1>(callbackfn: (previousValue: U_1, currentValue: string, currentIndex: number, array: string[]) => U_1, initialValue: U_1): U_1;
152
- } | undefined;
153
- reduceRight?: {
154
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
155
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
156
- <U_2>(callbackfn: (previousValue: U_2, currentValue: string, currentIndex: number, array: string[]) => U_2, initialValue: U_2): U_2;
157
- } | undefined;
158
- find?: {
159
- <S_1 extends string>(predicate: (this: void, value: string, index: number, obj: string[]) => value is S_1, thisArg?: any): S_1 | undefined;
160
- (predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): string | undefined;
161
- } | undefined;
162
- findIndex?: ((predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any) => number) | undefined;
163
- fill?: ((value: string, start?: number | undefined, end?: number | undefined) => string[]) | undefined;
164
- copyWithin?: ((target: number, start: number, end?: number | undefined) => string[]) | undefined;
165
- entries?: IterableIterator<[number, string]> | undefined;
166
- keys?: IterableIterator<number> | undefined;
167
- values?: IterableIterator<string> | undefined;
168
- includes?: ((searchElement: string, fromIndex?: number | undefined) => boolean) | undefined;
169
- flatMap?: (<U_3, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U_3 | readonly U_3[], thisArg?: This | undefined) => U_3[]) | undefined;
170
- flat?: unknown[] | undefined;
171
- }) | ({} & {
172
- [x: string]: any;
173
- [x: number]: any;
174
- }), {}, {}, ({
175
- [x: number]: string;
176
- } & {
177
- length?: number | undefined;
178
- toString?: string | undefined;
179
- toLocaleString?: string | undefined;
180
- pop?: string | undefined;
181
- push?: number | undefined;
182
- concat?: string[] | undefined;
183
- join?: string | undefined;
184
- reverse?: string[] | undefined;
185
- shift?: string | undefined;
186
- slice?: string[] | undefined;
187
- sort?: string[] | undefined;
188
- splice?: {
189
- (start: number, deleteCount?: number | undefined): string[];
190
- (start: number, deleteCount: number, ...items: string[]): string[];
191
- } | undefined;
192
- unshift?: number | undefined;
193
- indexOf?: ((searchElement: string, fromIndex?: number | undefined) => number) | undefined;
194
- lastIndexOf?: ((searchElement: string, fromIndex?: number | undefined) => number) | undefined;
195
- every?: ((callbackfn: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => boolean) | undefined;
196
- some?: ((callbackfn: (value: string, index: number, array: string[]) => unknown, thisArg?: any) => boolean) | undefined;
197
- forEach?: ((callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void) | undefined;
198
- map?: (<U>(callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | undefined;
199
- filter?: {
200
- <S extends string>(callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[];
201
- (callbackfn: (value: string, index: number, array: string[]) => unknown, thisArg?: any): string[];
202
- } | undefined;
203
- reduce?: {
204
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
205
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
206
- <U_1>(callbackfn: (previousValue: U_1, currentValue: string, currentIndex: number, array: string[]) => U_1, initialValue: U_1): U_1;
207
- } | undefined;
208
- reduceRight?: {
209
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string): string;
210
- (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue: string): string;
211
- <U_2>(callbackfn: (previousValue: U_2, currentValue: string, currentIndex: number, array: string[]) => U_2, initialValue: U_2): U_2;
212
- } | undefined;
213
- find?: {
214
- <S_1 extends string>(predicate: (this: void, value: string, index: number, obj: string[]) => value is S_1, thisArg?: any): S_1 | undefined;
215
- (predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): string | undefined;
216
- } | undefined;
217
- findIndex?: ((predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any) => number) | undefined;
218
- fill?: ((value: string, start?: number | undefined, end?: number | undefined) => string[]) | undefined;
219
- copyWithin?: ((target: number, start: number, end?: number | undefined) => string[]) | undefined;
220
- entries?: IterableIterator<[number, string]> | undefined;
221
- keys?: IterableIterator<number> | undefined;
222
- values?: IterableIterator<string> | undefined;
223
- includes?: ((searchElement: string, fromIndex?: number | undefined) => boolean) | undefined;
224
- flatMap?: (<U_3, This = undefined>(callback: (this: This, value: string, index: number, array: string[]) => U_3 | readonly U_3[], thisArg?: This | undefined) => U_3[]) | undefined;
225
- flat?: unknown[] | undefined;
226
- }) | ({} & {
227
- [x: string]: any;
228
- [x: number]: any;
229
- })>);
230
- export default _default;
1
+ import { PropType } from "vue";
2
+ import { dateTimeFormat } from './CellHistory.helpers';
3
+ import { HistoryType } from "../../../../typings/model";
4
+ declare const _default: import("vue").DefineComponent<{
5
+ history: {
6
+ type: PropType<HistoryType[]>;
7
+ default: () => never[];
8
+ };
9
+ }, {
10
+ dateTimeFormat: typeof dateTimeFormat;
11
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
+ history: {
13
+ type: PropType<HistoryType[]>;
14
+ default: () => never[];
15
+ };
16
+ }>>, {
17
+ history: HistoryType[];
18
+ }>;
19
+ export default _default;
@@ -1 +1 @@
1
- export { default as CellHistory } from './CellHistory.vue';
1
+ export { default as CellHistory } from './CellHistory.vue';
@@ -1 +1 @@
1
- export { default } from './ExportList.vue';
1
+ export { default } from './ExportList.vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tager/admin-export",
3
- "version": "0.1.5",
3
+ "version": "1.0.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.umd.js",
6
6
  "module": "dist/index.esm.js",
@@ -10,63 +10,64 @@
10
10
  "typings",
11
11
  "src"
12
12
  ],
13
+ "exports": {
14
+ "./css": "./dist/style.css",
15
+ ".": "./dist/index.mjs"
16
+ },
13
17
  "scripts": {
18
+ "build:js": "vite build",
19
+ "build:package": "concurrently --success first \"yarn build:js\" \"yarn emit-declarations\"",
20
+ "emit-declarations": "vue-tsc --project tsconfig.json --emitDeclarationOnly",
14
21
  "start": "vue-cli-service serve",
15
- "lint": "vue-cli-service lint",
16
- "build": "rollup --config",
17
- "prepare": "vue-docgen-web-types && yarn build",
18
- "tager:update": "node scripts/tager-update.js",
19
- "yalc:clean": "yalc remove --all"
22
+ "prepare": "yarn build:package",
23
+ "tager:update": "yarn upgrade --latest --scope @tager"
20
24
  },
21
25
  "dependencies": {
26
+ "lodash.isequal": "^4.5.0",
22
27
  "lodash.kebabcase": "^4.1.1",
28
+ "lodash.pick": "^4.4.0",
23
29
  "path-to-regexp": "^6.1.0"
24
30
  },
25
31
  "devDependencies": {
26
- "@rollup/plugin-commonjs": "^14.0.0",
27
- "@rollup/plugin-node-resolve": "^8.1.0",
28
- "@tager/admin-dynamic-field": "^0.1.18",
29
- "@tager/admin-layout": "^0.5.3",
30
- "@tager/admin-services": "^0.2.24",
31
- "@tager/admin-ui": "^0.8.84",
32
- "@types/lodash.kebabcase": "^4.1.6",
33
- "@types/node": "12.x",
34
- "@typescript-eslint/eslint-plugin": "^2.26.0",
35
- "@typescript-eslint/parser": "^2.26.0",
36
- "@vue/cli-plugin-babel": "~4.4.6",
37
- "@vue/cli-plugin-eslint": "~4.4.6",
38
- "@vue/cli-plugin-router": "~4.4.6",
39
- "@vue/cli-plugin-typescript": "~4.4.6",
40
- "@vue/cli-service": "~4.4.6",
41
- "@vue/composition-api": "^1.0.0-beta.14",
42
- "@vue/eslint-config-prettier": "^6.0.0",
43
- "@vue/eslint-config-typescript": "^5.0.2",
44
- "babel-eslint": "^10.1.0",
45
- "core-js": "^3.6.5",
46
- "eslint": "^6.7.2",
47
- "eslint-plugin-import": "^2.22.0",
48
- "eslint-plugin-prettier": "^3.1.4",
49
- "eslint-plugin-vue": "^6.2.2",
50
- "prettier": "^2.0.5",
51
- "rollup": "^2.23.1",
52
- "rollup-plugin-typescript2": "^0.27.2",
53
- "rollup-plugin-vue": "^5.1.9",
54
- "sass-loader": "^9.0.3",
55
- "typescript": "~3.9.6",
56
- "vue": "2.6.x",
57
- "vue-docgen-web-types": "^0.1.6",
58
- "vue-router": "^3.5.1",
59
- "vue-template-compiler": "^2.6.11"
32
+ "@babel/core": "^7.17.9",
33
+ "@babel/eslint-parser": "^7.17.0",
34
+ "@rushstack/eslint-patch": "^1.1.2",
35
+ "@tager/admin-dynamic-field": "^1.0.0",
36
+ "@tager/admin-layout": "^1.0.0",
37
+ "@tager/admin-services": "^1.0.0",
38
+ "@tager/admin-ui": "^1.0.1",
39
+ "@types/lodash.isequal": "^4.5.6",
40
+ "@types/lodash.pick": "^4.4.7",
41
+ "@types/node": "16.x",
42
+ "@typescript-eslint/eslint-plugin": "^5.21.0",
43
+ "@typescript-eslint/parser": "^5.21.0",
44
+ "@vitejs/plugin-vue": "^2.3.1",
45
+ "@vue/cli-plugin-babel": "^5.0.4",
46
+ "@vue/cli-plugin-typescript": "^5.0.4",
47
+ "@vue/cli-service": "~5.0.0",
48
+ "@vue/eslint-config-prettier": "^7.0.0",
49
+ "@vue/eslint-config-typescript": "^10.0.0",
50
+ "concurrently": "^7.1.0",
51
+ "core-js": "^3.22.3",
52
+ "eslint": "^8.14.0",
53
+ "eslint-config-prettier": "^8.5.0",
54
+ "eslint-plugin-import": "^2.26.0",
55
+ "eslint-plugin-prettier": "^4.0.0",
56
+ "eslint-plugin-vue": "^8.7.1",
57
+ "sass": "^1.51.0",
58
+ "sass-loader": "^12.6.0",
59
+ "typescript": "^4.6.3",
60
+ "vite": "^2.9.6",
61
+ "vue": "^3.2.31",
62
+ "vue-router": "^4.0.14",
63
+ "vue-tsc": "^0.34.10"
60
64
  },
61
65
  "peerDependencies": {
62
- "@tager/admin-layout": ">=0.4.2",
63
- "@tager/admin-services": ">=0.2.11",
64
- "@tager/admin-ui": ">=0.7.5",
65
- "@vue/composition-api": ">=1.0.0-beta.14",
66
- "vue": "2.6.x"
67
- },
68
- "resolutions": {
69
- "prettier": "2.x"
66
+ "@tager/admin-layout": "^1.0.0",
67
+ "@tager/admin-services": "^1.0.0",
68
+ "@tager/admin-ui": "^1.0.1",
69
+ "vue": "^3.2.31",
70
+ "vue-router": "^4.0.14"
70
71
  },
71
72
  "publishConfig": {
72
73
  "access": "public"
@@ -1,31 +1,31 @@
1
- import { CustomRouteConfig } from '@tager/admin-layout';
1
+ import type { RouteRecordRaw } from 'vue-router';
2
2
 
3
3
  import ExportList from '../views/ExportList';
4
4
  import ExportForm from '../views/ExportForm';
5
5
 
6
6
  import { EXPORT_ROUTE_PATHS } from './paths';
7
7
 
8
- export const EXPORT_LIST_ROUTE: CustomRouteConfig = {
8
+ export const EXPORT_LIST_ROUTE: RouteRecordRaw = {
9
9
  path: EXPORT_ROUTE_PATHS.EXPORT_LIST,
10
10
  component: ExportList,
11
11
  name: 'Export List',
12
12
  meta: {
13
- getBreadcrumbs: (route, t) => [
14
- { url: '/', text: t('export:home') },
15
- { url: route.path, text: t('export:export') },
13
+ getBreadcrumbs: (route, i18n) => [
14
+ { url: '/', text: i18n.t('export:home') },
15
+ { url: route.path, text: i18n.t('export:export') },
16
16
  ],
17
17
  },
18
18
  };
19
19
 
20
- export const EXPORT_FORM_ROUTE: CustomRouteConfig = {
20
+ export const EXPORT_FORM_ROUTE: RouteRecordRaw = {
21
21
  path: EXPORT_ROUTE_PATHS.EXPORT_FORM,
22
22
  component: ExportForm,
23
23
  name: 'Export Form',
24
24
  meta: {
25
- getBreadcrumbs: (route, t) => [
26
- { url: '/', text: t('export:home') },
27
- { url: EXPORT_LIST_ROUTE.path, text: t('export:export') },
28
- { url: route.path, text: t('export:newExport') },
25
+ getBreadcrumbs: (route, i18n) => [
26
+ { url: '/', text: i18n.t('export:home') },
27
+ { url: EXPORT_LIST_ROUTE.path, text: i18n.t('export:export') },
28
+ { url: route.path, text: i18n.t('export:newExport') },
29
29
  ],
30
30
  },
31
31
  };
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <PageLayout :sidebar-menu-list="sidebarMenuList">
3
+ <router-view/>
4
+ </PageLayout>
5
+ </template>
6
+
7
+ <script lang="ts">
8
+ import {defineComponent} from 'vue';
9
+ import {MenuItemType, PageLayout} from "@tager/admin-layout";
10
+ import {ViewListIcon} from "@tager/admin-ui";
11
+ import {getExportListUrl} from '../utils/paths';
12
+ import {useI18n} from "@tager/admin-services";
13
+
14
+ export default defineComponent({
15
+ name: 'App',
16
+ components: {
17
+ PageLayout,
18
+ },
19
+ setup() {
20
+ const i18n = useI18n();
21
+
22
+ const sidebarMenuList: Array<MenuItemType> = [
23
+ {
24
+ id: 'exportAndImport',
25
+ text: i18n.t('export:export'),
26
+ icon: ViewListIcon,
27
+ children: [{text: i18n.t('export:export'), url: getExportListUrl()}],
28
+ },
29
+ ];
30
+
31
+ return {
32
+ sidebarMenuList,
33
+ };
34
+ },
35
+ });
36
+ </script>
37
+
38
+ <style scoped lang="scss"></style>
@@ -0,0 +1,23 @@
1
+ import type { AppConfigType } from '@tager/admin-services';
2
+
3
+ export const OZITAG_CONFIG: AppConfigType = {
4
+ APP_NAME: 'OZiTAG_ADMIN',
5
+ TITLE_TEMPLATE: 'OZiTAG Admin - {{title}}',
6
+ LANGUAGE: 'EN',
7
+ BRAND: {
8
+ small: {
9
+ logo: 'logo-small.svg',
10
+ },
11
+ large: {
12
+ logo: 'logo.svg',
13
+ label: 'OZiTAG',
14
+ 'label-color': '#DD6900',
15
+ },
16
+ subtitle: '',
17
+ },
18
+ SPLASH_SCREEN: {
19
+ enabled: true,
20
+ logo: 'logo-white.svg',
21
+ background: '#1e1e1e',
22
+ },
23
+ };
package/src/dev/env.ts ADDED
@@ -0,0 +1,17 @@
1
+ import { initializeEnvironment } from '@tager/admin-services';
2
+
3
+ export function populateEnvironment() {
4
+ initializeEnvironment({
5
+ publicPath: process.env.VUE_APP_PUBLIC_PATH,
6
+ appEnv: process.env.VUE_APP_ENV,
7
+ apiUrl: process.env.VUE_APP_API_URL,
8
+ accessToken: process.env.VUE_APP_ACCESS_TOKEN,
9
+ websiteUrl: process.env.VUE_APP_WEBSITE_URL,
10
+ websiteButtonUrl: process.env.VUE_APP_WEBSITE_BUTTON_URL,
11
+ sentryDsn: process.env.VUE_APP_SENTRY_DSN,
12
+ sentryEnv: process.env.VUE_APP_SENTRY_ENVIRONMENT,
13
+ baseUrl: process.env.BASE_URL,
14
+ nodeEnv: process.env.NODE_ENV,
15
+ version: process.env.VUE_APP_VERSION,
16
+ });
17
+ }
@@ -0,0 +1,36 @@
1
+ import { createApp } from 'vue';
2
+
3
+ import { configStore, i18n, i18nPlugin } from '@tager/admin-services';
4
+ import { createRouter } from '@tager/admin-layout';
5
+ import '@tager/admin-ui/css';
6
+ import '@tager/admin-layout/css';
7
+ import '@tager/admin-dynamic-field/css';
8
+
9
+ import { applyTranslations } from '../locales/apply';
10
+ import { EXPORT_LIST_ROUTE, EXPORT_FORM_ROUTE } from '../constants/routes';
11
+
12
+ import { OZITAG_CONFIG } from './config';
13
+ import App from './App.vue';
14
+ import { populateEnvironment } from './env';
15
+
16
+ populateEnvironment();
17
+
18
+ configStore.setConfig(OZITAG_CONFIG);
19
+
20
+ const router = createRouter(
21
+ {
22
+ routes: [EXPORT_LIST_ROUTE, EXPORT_FORM_ROUTE],
23
+ },
24
+ { useTitleSync: false }
25
+ );
26
+
27
+ const app = createApp(App);
28
+
29
+ app.use(router);
30
+ app.use(i18nPlugin);
31
+
32
+ applyTranslations();
33
+
34
+ i18n.init({ debug: true, lng: 'ru' }).then(() => {
35
+ app.mount('#app');
36
+ });
@@ -0,0 +1,9 @@
1
+ import { i18n } from '@tager/admin-services';
2
+
3
+ import { EN } from './en';
4
+ import { RU } from './ru';
5
+
6
+ export function applyTranslations() {
7
+ i18n.addTranslations('en', 'export', EN);
8
+ i18n.addTranslations('ru', 'export', RU);
9
+ }
package/src/locales/en.ts CHANGED
@@ -1,6 +1,5 @@
1
- const EN = {
1
+ export const EN = {
2
2
  home: 'Home',
3
- exportAndImport: 'Export / Import',
4
3
  export: 'Export',
5
4
  exportList: 'Export List',
6
5
  exportForm: 'Export Form',
@@ -22,5 +21,3 @@ const EN = {
22
21
  comma: 'Comma',
23
22
  semicolon: 'Semicolon',
24
23
  };
25
-
26
- export default EN;