@pksep/yui 0.1.155 → 0.1.157

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/README.md CHANGED
@@ -1,79 +1,79 @@
1
- # SEP-YUI
2
-
3
- **SEP-YUI** — библиотека UI-компонентов для Vue, созданная для решения задачи удобного переиспользования интерфейсных элементов между проектами.
4
- Она позволяет использовать единый набор UI-решений, снижает связанность компонентов и упрощает поддержку.
5
-
6
- ## Основные преимущества
7
-
8
- - Лёгкая интеграция в существующие проекты
9
- - Низкий порог входа
10
- - Гибкость и кастомизация
11
- - Регулярные обновления и техническая поддержка
12
- - Возможность комбинирования компонентов внутри проекта
13
-
14
- ---
15
-
16
- ## Установка и подключение
17
-
18
- ```bash
19
- npm i @pksep/yui
20
- ```
21
-
22
- #### 1. Для использования библиотеки в проекте, необходимо импортировать компоненты библиотеки в главный файл проекта main.ts таким образом:
23
-
24
- ```ts
25
- main.ts;
26
- import Ylibrary from '@pksep/yui';
27
- app.use(Ylibrary);
28
- app.mount('#app');
29
- ```
30
-
31
- #### 1.1 Для выборочного импорта компонентов, можно использовать подключение такого вида.
32
-
33
- ```ts
34
- main.ts;
35
- import { Toggle } from '@pksep/yui';
36
- app.component('Toggle', Toggle);
37
- ```
38
-
39
- #### 2. Стили импортируются через путь "@pksep/yui/styles" также в файле main.ts
40
-
41
- ```ts
42
- main.ts;
43
- import '@pksep/yui/styles';
44
- ```
45
-
46
- #### 3. Далее просто пишем название компонента внутри проекта и используем как при обычной разработке на Vue.
47
-
48
- ```vue
49
- App.vue
50
- <template>
51
- <Toggle :disabled="true" :backgroundColor="'red'" />
52
- </template>
53
- <script setup lang="ts"></script>
54
- <styles scoped></styles>
55
- ```
56
-
57
-
58
- ---
59
-
60
- ## Примеры и Storybook
61
-
62
- Документация и примеры компонентов:
63
-
64
- ➡️ https://pksep.github.io/sep_yui
65
-
66
- ---
67
-
68
- ## Разработка
69
-
70
- ### Публикация пакетов
71
-
72
- Обязательно через команду, так как генерятся changelog. Для этого используем:
73
- [changeloggen](https://unjs.io/packages/changelogen/)
74
-
75
- ```sh
76
- pnpm run build:lib
77
- ```
78
-
79
- Токен можно для публикации можно получить у менеджера.
1
+ # SEP-YUI
2
+
3
+ **SEP-YUI** — библиотека UI-компонентов для Vue, созданная для решения задачи удобного переиспользования интерфейсных элементов между проектами.
4
+ Она позволяет использовать единый набор UI-решений, снижает связанность компонентов и упрощает поддержку.
5
+
6
+ ## Основные преимущества
7
+
8
+ - Лёгкая интеграция в существующие проекты
9
+ - Низкий порог входа
10
+ - Гибкость и кастомизация
11
+ - Регулярные обновления и техническая поддержка
12
+ - Возможность комбинирования компонентов внутри проекта
13
+
14
+ ---
15
+
16
+ ## Установка и подключение
17
+
18
+ ```bash
19
+ npm i @pksep/yui
20
+ ```
21
+
22
+ #### 1. Для использования библиотеки в проекте, необходимо импортировать компоненты библиотеки в главный файл проекта main.ts таким образом:
23
+
24
+ ```ts
25
+ main.ts;
26
+ import Ylibrary from '@pksep/yui';
27
+ app.use(Ylibrary);
28
+ app.mount('#app');
29
+ ```
30
+
31
+ #### 1.1 Для выборочного импорта компонентов, можно использовать подключение такого вида.
32
+
33
+ ```ts
34
+ main.ts;
35
+ import { Toggle } from '@pksep/yui';
36
+ app.component('Toggle', Toggle);
37
+ ```
38
+
39
+ #### 2. Стили импортируются через путь "@pksep/yui/styles" также в файле main.ts
40
+
41
+ ```ts
42
+ main.ts;
43
+ import '@pksep/yui/styles';
44
+ ```
45
+
46
+ #### 3. Далее просто пишем название компонента внутри проекта и используем как при обычной разработке на Vue.
47
+
48
+ ```vue
49
+ App.vue
50
+ <template>
51
+ <Toggle :disabled="true" :backgroundColor="'red'" />
52
+ </template>
53
+ <script setup lang="ts"></script>
54
+ <styles scoped></styles>
55
+ ```
56
+
57
+
58
+ ---
59
+
60
+ ## Примеры и Storybook
61
+
62
+ Документация и примеры компонентов:
63
+
64
+ ➡️ https://pksep.github.io/sep_yui
65
+
66
+ ---
67
+
68
+ ## Разработка
69
+
70
+ ### Публикация пакетов
71
+
72
+ Обязательно через команду, так как генерятся changelog. Для этого используем:
73
+ [changeloggen](https://unjs.io/packages/changelogen/)
74
+
75
+ ```sh
76
+ pnpm run build:lib
77
+ ```
78
+
79
+ Токен можно для публикации можно получить у менеджера.
@@ -3,8 +3,7 @@ export declare enum ImageExtensionsEnum {
3
3
  png = "png",
4
4
  jpeg = "jpeg",
5
5
  webp = "webp",
6
- svg = "svg",
7
- pdf = "pdf"
6
+ svg = "svg"
8
7
  }
9
8
  export declare enum VideoExtensionsEnum {
10
9
  mp4 = "mp4",
@@ -112,5 +112,5 @@ export declare enum IconNameEnum {
112
112
  qrCode = "qr-code",
113
113
  distrub = "distrub",
114
114
  delivered = "delivered",
115
- notDelivered = "not-delivered"
115
+ notDelivered = "notDelivered"
116
116
  }
@@ -1,3 +1,4 @@
1
+ import { IconNameEnum } from './enum/enum';
1
2
  import { IVectorIcon } from './interface/interface';
2
3
 
3
4
  export declare const alertTriangle: IVectorIcon;
@@ -118,5 +119,17 @@ export declare const keyboard: IVectorIcon;
118
119
  export declare const message: IVectorIcon;
119
120
  export declare const darkThemeSwitcher: IVectorIcon;
120
121
  export declare const qrCode: IVectorIcon;
121
- export declare const notDelivered: IVectorIcon;
122
- export declare const delivered: IVectorIcon;
122
+ export declare const notDelivered: {
123
+ name: IconNameEnum;
124
+ viewbox: string;
125
+ style: string;
126
+ fill: string;
127
+ path: string;
128
+ };
129
+ export declare const delivered: {
130
+ name: IconNameEnum;
131
+ viewbox: string;
132
+ style: string;
133
+ fill: string;
134
+ path: string;
135
+ };
@@ -10,3 +10,8 @@ export interface IDialogProps extends IDataTestIdProp {
10
10
  export interface IModalProps extends IDialogProps {
11
11
  animateType?: ModalAnimateEnum;
12
12
  }
13
+ export interface IModalEmit {
14
+ (e: 'close'): void;
15
+ (e: 'unmounted'): void;
16
+ (e: 'end-animation'): void;
17
+ }
@@ -0,0 +1,15 @@
1
+ import { IPdfPreviewProps } from './interface';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IPdfPreviewProps>>, {
4
+ clearCanvas: () => void;
5
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IPdfPreviewProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
+ export default _default;
7
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
8
+ type __VLS_TypePropsToRuntimeProps<T> = {
9
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
10
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
11
+ } : {
12
+ type: import('vue').PropType<T[K]>;
13
+ required: true;
14
+ };
15
+ };
@@ -0,0 +1,15 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ src: string | undefined;
3
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ src: string | undefined;
5
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
+ export default _default;
7
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
8
+ type __VLS_TypePropsToRuntimeProps<T> = {
9
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
10
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
11
+ } : {
12
+ type: import('vue').PropType<T[K]>;
13
+ required: true;
14
+ };
15
+ };
@@ -0,0 +1,4 @@
1
+ export interface IPdfPreviewProps {
2
+ src: string | undefined;
3
+ page?: number;
4
+ }
@@ -0,0 +1,24 @@
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any;
3
+ };
4
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
5
+ isActive?: boolean;
6
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
7
+ isActive?: boolean;
8
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
9
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
10
+ export default _default;
11
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
+ type __VLS_TypePropsToRuntimeProps<T> = {
13
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
14
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
+ } : {
16
+ type: import('vue').PropType<T[K]>;
17
+ required: true;
18
+ };
19
+ };
20
+ type __VLS_WithTemplateSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,43 @@
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any;
3
+ };
4
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
5
+ activeIndex?: number;
6
+ }>, {
7
+ activeIndex: number;
8
+ }>>, {
9
+ shiftPosition: (index: number) => void;
10
+ nextSlide: () => number;
11
+ prevSlide: () => number;
12
+ initScroll: () => void;
13
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
14
+ activeIndex?: number;
15
+ }>, {
16
+ activeIndex: number;
17
+ }>>> & Readonly<{}>, {
18
+ activeIndex: number;
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
21
+ export default _default;
22
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
23
+ type __VLS_TypePropsToRuntimeProps<T> = {
24
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
25
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
26
+ } : {
27
+ type: import('vue').PropType<T[K]>;
28
+ required: true;
29
+ };
30
+ };
31
+ type __VLS_WithDefaults<P, D> = {
32
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
33
+ default: D[K];
34
+ }> : P[K];
35
+ };
36
+ type __VLS_Prettify<T> = {
37
+ [K in keyof T]: T[K];
38
+ } & {};
39
+ type __VLS_WithTemplateSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,35 @@
1
+ import { ISliderModalProps } from './interface/interface';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ISliderModalProps>, {
4
+ dataTestid: string;
5
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
+ close: () => void;
7
+ unmounted: () => void;
8
+ "end-animation": () => void;
9
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ISliderModalProps>, {
10
+ dataTestid: string;
11
+ }>>> & Readonly<{
12
+ onClose?: (() => any) | undefined;
13
+ onUnmounted?: (() => any) | undefined;
14
+ "onEnd-animation"?: (() => any) | undefined;
15
+ }>, {
16
+ dataTestid: string;
17
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
18
+ export default _default;
19
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
20
+ type __VLS_TypePropsToRuntimeProps<T> = {
21
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
22
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
23
+ } : {
24
+ type: import('vue').PropType<T[K]>;
25
+ required: true;
26
+ };
27
+ };
28
+ type __VLS_WithDefaults<P, D> = {
29
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
30
+ default: D[K];
31
+ }> : P[K];
32
+ };
33
+ type __VLS_Prettify<T> = {
34
+ [K in keyof T]: T[K];
35
+ } & {};
@@ -1,19 +1,26 @@
1
1
  import { IDataTestIdProp } from '../../../common/dataTestidProps';
2
+ import { IModalEmit, IModalProps } from '../../Modal/interface/interface';
2
3
 
3
- type SliderItem = {
4
+ export type SliderItem = {
4
5
  path: string;
5
6
  };
6
- type IFile = {
7
+ export type IFile = {
7
8
  path: string;
8
9
  };
9
10
  export interface ISliderProps extends IDataTestIdProp {
10
11
  items: SliderItem[];
11
12
  defaultIndex?: number;
12
13
  }
14
+ export interface ISliderModalProps extends IDataTestIdProp, IModalProps, ISliderProps {
15
+ }
16
+ export interface ISliderModalEmit extends IModalEmit {
17
+ }
13
18
  export interface ISlider {
14
19
  files: IFile[];
15
20
  file: IFile | null;
16
21
  currentIndex: number;
17
22
  extension: null | string;
23
+ filePath: null | string;
24
+ isShowSliderModal: boolean;
25
+ indexModal: number;
18
26
  }
19
- export {};
@@ -0,0 +1,2 @@
1
+ declare const isElementVisible: (el: HTMLElement, container?: HTMLElement | Window) => boolean;
2
+ export default isElementVisible;
@@ -0,0 +1,2 @@
1
+ declare const scrollToElementIfNotVisible: (el: HTMLElement, container?: HTMLElement | null) => void;
2
+ export default scrollToElementIfNotVisible;
@@ -0,0 +1,32 @@
1
+ import { PDFDocumentProxy, PDFPageProxy } from 'pdfjs-dist';
2
+
3
+ declare class CachePdf {
4
+ private cache;
5
+ private cachePage;
6
+ /**
7
+ * Записывает в кэш загруженные документ pdf файла
8
+ * @param key
9
+ * @param value
10
+ */
11
+ setCache(key: string, value: PDFDocumentProxy): void;
12
+ /**
13
+ * Возвращает документ из кэша
14
+ * @param key
15
+ * @returns
16
+ */
17
+ getCache(key: string): PDFDocumentProxy | undefined;
18
+ /**
19
+ * Записывает в кэш страницу
20
+ * @param key
21
+ * @param value
22
+ */
23
+ setPageCache(key: string, value: PDFPageProxy): void;
24
+ /**
25
+ * Вовзращает страницу из кэша
26
+ * @param key
27
+ * @returns
28
+ */
29
+ getPageCache(key: string): PDFPageProxy | undefined;
30
+ }
31
+ declare const cachePdf: CachePdf;
32
+ export default cachePdf;
@@ -0,0 +1,2 @@
1
+ declare const checkPath: (str: string | null) => string | null;
2
+ export default checkPath;
@@ -0,0 +1,2 @@
1
+ declare const downloadFile: (path: string, name?: string) => Promise<void>;
2
+ export default downloadFile;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @param path: string | null
3
+ * @returns
4
+ */
5
+ declare const isImage: (path: string | null | undefined) => boolean;
6
+ export default isImage;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @param path: string | null
3
+ * @returns
4
+ */
5
+ declare const isVideo: (path: string | null | undefined) => boolean;
6
+ export default isVideo;