@tager/admin-files 0.0.7 → 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.
- package/dist/constants/paths.d.ts +4 -4
- package/dist/constants/routes.d.ts +3 -3
- package/dist/dev/App.vue.d.ts +6 -0
- package/dist/dev/config.d.ts +2 -0
- package/dist/dev/env.d.ts +1 -0
- package/dist/dev/main.d.ts +3 -0
- package/dist/index.mjs +315 -0
- package/dist/locales/apply.d.ts +1 -0
- package/dist/locales/en.d.ts +18 -19
- package/dist/locales/ru.d.ts +2 -3
- package/dist/main.d.ts +3 -3
- package/dist/services/requests.d.ts +16 -16
- package/dist/typings/model.d.ts +14 -14
- package/dist/utils/paths.d.ts +4 -4
- package/dist/views/FilesForm/FilesForm.helpers.d.ts +2 -2
- package/dist/views/FilesForm/FilesForm.vue.d.ts +23 -50
- package/dist/views/FilesForm/index.d.ts +1 -1
- package/dist/views/FilesList/FilesList.vue.d.ts +19 -37
- package/dist/views/FilesList/index.d.ts +1 -1
- package/package.json +47 -49
- package/src/constants/routes.ts +10 -10
- package/src/dev/App.vue +38 -0
- package/src/dev/config.ts +23 -0
- package/src/dev/env.ts +17 -0
- package/src/dev/main.ts +36 -0
- package/src/locales/apply.ts +9 -0
- package/src/locales/en.ts +1 -3
- package/src/locales/ru.ts +2 -4
- package/src/main.ts +2 -6
- package/src/services/requests.ts +2 -2
- package/src/typings/model.ts +1 -1
- package/src/views/FilesForm/FilesForm.helpers.ts +1 -1
- package/src/views/FilesForm/FilesForm.vue +32 -26
- package/src/views/FilesList/FilesList.vue +51 -49
- package/README.md +0 -1
- package/dist/dev.d.ts +0 -1
- package/dist/index.esm.js +0 -738
- package/dist/index.umd.js +0 -750
- package/src/dev.ts +0 -41
- package/src/typings/sfc.d.ts +0 -12
- package/src/typings/shims-tsx.d.ts +0 -13
- package/src/typings/shims-vue.d.ts +0 -11
- package/src/views/App.vue +0 -36
package/src/dev.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import Vue, { CreateElement } from 'vue';
|
|
2
|
-
import VueCompositionApi, { createApp } from '@vue/composition-api';
|
|
3
|
-
|
|
4
|
-
import { configStore, i18n } from '@tager/admin-services';
|
|
5
|
-
import { AdminUiPlugin } from '@tager/admin-ui';
|
|
6
|
-
import { AdminLayoutPlugin, createRouter } from '@tager/admin-layout';
|
|
7
|
-
|
|
8
|
-
import '@tager/admin-ui/dist/admin-ui.css';
|
|
9
|
-
|
|
10
|
-
import EN from './locales/en';
|
|
11
|
-
import RU from './locales/ru';
|
|
12
|
-
import config from './config/config.json';
|
|
13
|
-
import App from './views/App.vue';
|
|
14
|
-
import { FILES_LIST_ROUTE, FILES_FORM_ROUTE } from './constants/routes';
|
|
15
|
-
|
|
16
|
-
configStore.setConfig(config);
|
|
17
|
-
|
|
18
|
-
const router = createRouter(
|
|
19
|
-
{
|
|
20
|
-
routes: [FILES_LIST_ROUTE, FILES_FORM_ROUTE],
|
|
21
|
-
},
|
|
22
|
-
{ useTitleSync: false }
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
i18n.addTranslations('en', 'files', EN);
|
|
26
|
-
i18n.addTranslations('ru', 'files', RU);
|
|
27
|
-
|
|
28
|
-
i18n.init({ debug: false, lng: 'ru' }).then(() => {
|
|
29
|
-
Vue.use(VueCompositionApi);
|
|
30
|
-
|
|
31
|
-
const app = createApp({
|
|
32
|
-
router,
|
|
33
|
-
render: (h: CreateElement) => h(App),
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
app.use(i18n.getPlugin());
|
|
37
|
-
app.use(AdminUiPlugin);
|
|
38
|
-
app.use(AdminLayoutPlugin);
|
|
39
|
-
|
|
40
|
-
app.mount('#app');
|
|
41
|
-
});
|
package/src/typings/sfc.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** Reference: https://stackoverflow.com/a/53999913 */
|
|
2
|
-
// 1. Make sure to import 'vue' before declaring augmented types
|
|
3
|
-
import Vue from 'vue';
|
|
4
|
-
|
|
5
|
-
// 2. Specify a file with the types you want to augment
|
|
6
|
-
// Vue has the constructor type in types/vue.d.ts
|
|
7
|
-
declare module 'vue/types/vue' {
|
|
8
|
-
// 3. Declare augmentation for Vue
|
|
9
|
-
interface Vue {
|
|
10
|
-
$style: { [key: string]: string };
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import Vue, { VNode } from 'vue';
|
|
2
|
-
|
|
3
|
-
declare global {
|
|
4
|
-
namespace JSX {
|
|
5
|
-
// tslint:disable no-empty-interface
|
|
6
|
-
interface Element extends VNode {}
|
|
7
|
-
// tslint:disable no-empty-interface
|
|
8
|
-
interface ElementClass extends Vue {}
|
|
9
|
-
interface IntrinsicElements {
|
|
10
|
-
[elem: string]: any;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
declare module '*.vue' {
|
|
2
|
-
// eslint-disable-next-line import/order
|
|
3
|
-
import Vue from 'vue';
|
|
4
|
-
export default Vue;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
declare module '*.svg' {
|
|
8
|
-
import Vue, { VueConstructor } from 'vue';
|
|
9
|
-
const content: VueConstructor<Vue>;
|
|
10
|
-
export default content;
|
|
11
|
-
}
|
package/src/views/App.vue
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<page-layout :sidebar-menu-list="sidebarMenuList">
|
|
3
|
-
<router-view />
|
|
4
|
-
</page-layout>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script lang="ts">
|
|
8
|
-
import { defineComponent, SetupContext } from '@vue/composition-api';
|
|
9
|
-
|
|
10
|
-
import { useTranslation } from '@tager/admin-ui';
|
|
11
|
-
import { MenuItemType } from '@tager/admin-layout';
|
|
12
|
-
|
|
13
|
-
import { getFilesListUrl } from '../utils/paths';
|
|
14
|
-
|
|
15
|
-
export default defineComponent({
|
|
16
|
-
name: 'App',
|
|
17
|
-
setup(props, context: SetupContext) {
|
|
18
|
-
const { t } = useTranslation(context);
|
|
19
|
-
|
|
20
|
-
const sidebarMenuList: Array<MenuItemType> = [
|
|
21
|
-
{
|
|
22
|
-
id: 'files',
|
|
23
|
-
text: t('files:files'),
|
|
24
|
-
icon: 'viewList',
|
|
25
|
-
children: [{ text: t('files:filesList'), url: getFilesListUrl() }],
|
|
26
|
-
},
|
|
27
|
-
];
|
|
28
|
-
|
|
29
|
-
return {
|
|
30
|
-
sidebarMenuList,
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<style scoped lang="scss"></style>
|