sprof 1.10.1 → 1.12.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.
- package/dist/core/index.d.ts +7 -0
- package/dist/core/setup/index.d.ts +44 -0
- package/dist/core/setup/setup.test.d.ts +1 -0
- package/dist/global-components.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/modules/filters/components/PFilterDates.vue.d.ts +12 -0
- package/dist/modules/filters/components/PFilterWrapper.vue.d.ts +17 -0
- package/dist/modules/filters/index.d.ts +3 -1
- package/dist/sprof.js +3798 -3642
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as C } from './classes/index';
|
|
2
2
|
import { default as F } from './ftsp/index';
|
|
3
3
|
import { default as H } from './helpers/index';
|
|
4
|
+
import { setupClient, SetupOptions } from './setup/index';
|
|
4
5
|
import { default as S } from './store/index';
|
|
5
6
|
import { default as T } from './types/index';
|
|
6
7
|
import { default as UI } from './ui/index';
|
|
@@ -284,6 +285,11 @@ export default abstract class PF {
|
|
|
284
285
|
pagesCount: () => number;
|
|
285
286
|
reset: () => void;
|
|
286
287
|
};
|
|
288
|
+
/**
|
|
289
|
+
* Инициализация клиента (патч токена + HttpClient/Static/Router) —
|
|
290
|
+
* одна строка вместо `src/setup/{auth,http,static,router}.ts`.
|
|
291
|
+
*/
|
|
292
|
+
static Setup: typeof setupClient;
|
|
287
293
|
/**
|
|
288
294
|
* Stores
|
|
289
295
|
*/
|
|
@@ -309,3 +315,4 @@ export default abstract class PF {
|
|
|
309
315
|
*/
|
|
310
316
|
static F: typeof F;
|
|
311
317
|
}
|
|
318
|
+
export type { SetupOptions };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Router as VueRouter } from 'vue-router';
|
|
2
|
+
/**
|
|
3
|
+
* Параметры инициализации клиента (как раньше в `src/setup/*`).
|
|
4
|
+
*/
|
|
5
|
+
export interface SetupOptions {
|
|
6
|
+
/** Базовый адрес API (в клиентах — `process.env.HOST`). */
|
|
7
|
+
host: string;
|
|
8
|
+
/** Порт API (обычно ''). */
|
|
9
|
+
port?: string;
|
|
10
|
+
/** Адрес статики (конкатенируется с `/api/static` при `apiVersion`). */
|
|
11
|
+
staticAddress?: string;
|
|
12
|
+
/** Инстанс vue-router клиента. */
|
|
13
|
+
router: VueRouter;
|
|
14
|
+
/** Заголовок документа (например «РДКБ | HR»). */
|
|
15
|
+
title?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Клиентский хук перед монтированием (например загрузка матрицы доступа).
|
|
18
|
+
* Вызывался в `setup/index.ts` клиентов вручную через `PF.H.Hooks.onBeforeMount`.
|
|
19
|
+
* ⚠️ Сам вызов `onBeforeMount` должен происходить в setup-контексте — функция
|
|
20
|
+
* вызывается здесь, поэтому `setupClient` надо звать в setup() корневого
|
|
21
|
+
* компонента/загрузчика, а не в произвольном месте.
|
|
22
|
+
*/
|
|
23
|
+
onBeforeMount?: () => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Инициализация клиента sprof ОДНОЙ строкой (вместо `src/setup/{auth,http,static,router}.ts`):
|
|
27
|
+
* патч ключа токена + `HttpClient` + `Static` + `Router` (+ опциональный beforeMount).
|
|
28
|
+
*
|
|
29
|
+
* ```ts
|
|
30
|
+
* // src/setup/index.ts клиента
|
|
31
|
+
* import router from 'src/router';
|
|
32
|
+
* import { setupClient } from 'sprof';
|
|
33
|
+
*
|
|
34
|
+
* export default function Setup() {
|
|
35
|
+
* setupClient({
|
|
36
|
+
* host: process.env.HOST ?? '',
|
|
37
|
+
* staticAddress: process.env.SERVER_ADDR + '/api/static',
|
|
38
|
+
* router,
|
|
39
|
+
* title: 'РДКБ | HR',
|
|
40
|
+
* });
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare function setupClient(options: SetupOptions): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -76,11 +76,13 @@ declare module 'vue' {
|
|
|
76
76
|
defaultContactsLabels: typeof Contacts.defaultContactsLabels;
|
|
77
77
|
PFilterCheckbox: typeof Filters.PFilterCheckbox;
|
|
78
78
|
PFilterCodeToggle: typeof Filters.PFilterCodeToggle;
|
|
79
|
+
PFilterDates: typeof Filters.PFilterDates;
|
|
79
80
|
PFilterInput: typeof Filters.PFilterInput;
|
|
80
81
|
PFilterInputOr: typeof Filters.PFilterInputOr;
|
|
81
82
|
PFilterSelect: typeof Filters.PFilterSelect;
|
|
82
83
|
PFilterSelectMultiple: typeof Filters.PFilterSelectMultiple;
|
|
83
84
|
PFilterToggle: typeof Filters.PFilterToggle;
|
|
85
|
+
PFilterWrapper: typeof Filters.PFilterWrapper;
|
|
84
86
|
PFieldInput: typeof Forms.PFieldInput;
|
|
85
87
|
PFormBuilder: typeof Forms.PFormBuilder;
|
|
86
88
|
PFormFieldEditor: typeof Forms.PFormFieldEditor;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { default as PF } from './core/index';
|
|
|
2
2
|
import * as PFM from './modules/index';
|
|
3
3
|
export { PF, PFM };
|
|
4
4
|
export { installSprof } from './install';
|
|
5
|
+
export { setupClient, type SetupOptions } from './core/setup/index';
|
|
5
6
|
export type {} from './global-components';
|
|
6
7
|
export { default as PBadge } from './core/components/atoms/PBadge/PBadge.vue';
|
|
7
8
|
export { default as PButton } from './core/components/atoms/PButton/PButton.vue';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
model: InstanceType<typeof PF.F.FilterModel>;
|
|
3
|
+
label?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
6
|
+
load: () => any;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onLoad?: (() => any) | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
label: string;
|
|
11
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
headerRightMaxWidth?: number | string;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
5
|
+
headerRightMaxWidth: string | number;
|
|
6
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>, {
|
|
7
|
+
'header-left-top'?(_: {}): any;
|
|
8
|
+
'header-left-bottom'?(_: {}): any;
|
|
9
|
+
'header-right'?(_: {}): any;
|
|
10
|
+
footer?(_: {}): any;
|
|
11
|
+
}>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
2
|
import { default as PFilterCheckbox } from './components/PFilterCheckbox.vue';
|
|
3
3
|
import { default as PFilterCodeToggle } from './components/PFilterCodeToggle.vue';
|
|
4
|
+
import { default as PFilterDates } from './components/PFilterDates.vue';
|
|
4
5
|
import { default as PFilterInput } from './components/PFilterInput.vue';
|
|
5
6
|
import { default as PFilterInputOr } from './components/PFilterInputOr.vue';
|
|
6
7
|
import { default as PFilterSelect } from './components/PFilterSelect.vue';
|
|
7
8
|
import { default as PFilterSelectMultiple } from './components/PFilterSelectMultiple.vue';
|
|
8
9
|
import { default as PFilterToggle } from './components/PFilterToggle.vue';
|
|
9
|
-
|
|
10
|
+
import { default as PFilterWrapper } from './components/PFilterWrapper.vue';
|
|
11
|
+
export { PFilterCheckbox, PFilterCodeToggle, PFilterDates, PFilterInput, PFilterInputOr, PFilterSelect, PFilterSelectMultiple, PFilterToggle, PFilterWrapper, };
|
|
10
12
|
export default function install(app: App): void;
|