sprof 0.10.2 → 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 (85) hide show
  1. package/dist/core/classes/FileInfo.d.ts +1 -1
  2. package/dist/core/components/atoms/PButton/PButton.stories.d.ts +18 -18
  3. package/dist/core/components/atoms/PButton/PButton.vue.d.ts +4 -4
  4. package/dist/core/components/atoms/POptionsListSingle/POptionsListSingle.vue.d.ts +16 -0
  5. package/dist/core/components/atoms/PRadio/PRadio.stories.d.ts +10 -10
  6. package/dist/core/components/atoms/PRadio/PRadio.vue.d.ts +5 -5
  7. package/dist/core/components/components.d.ts +1 -21
  8. package/dist/core/components/molecules/Collapse/CollapseItem.stories.d.ts +2 -2
  9. package/dist/core/components/molecules/Collapse/CollapseItem.vue.d.ts +1 -1
  10. package/dist/core/components/molecules/PAddDialog/PAddDialog.vue.d.ts +16 -2
  11. package/dist/core/components/molecules/PCard/PCard.stories.d.ts +12 -12
  12. package/dist/core/components/molecules/PCard/PCard.vue.d.ts +1 -1
  13. package/dist/core/components/molecules/PCrudList/PCrudList.vue.d.ts +31 -10
  14. package/dist/core/components/molecules/PEditDialog/pEditDialogProps.d.ts +2 -2
  15. package/dist/core/components/molecules/PModal/PModal.vue.d.ts +1 -1
  16. package/dist/core/components/organisms/PAuthModal/PAuthModal.stories.d.ts +69 -94
  17. package/dist/core/composables/usePagination.d.ts +6 -5
  18. package/dist/core/helpers/Validate.d.ts +8 -7
  19. package/dist/core/interfaces/IHTTPTypes.d.ts +2 -5
  20. package/dist/core/interfaces/IStorePaginator.d.ts +1 -1
  21. package/dist/core/ui/Dialog.d.ts +3 -3
  22. package/dist/core/ui/Notify.d.ts +5 -1
  23. package/dist/global-components.d.ts +0 -20
  24. package/dist/modules/contacts/components/PContactFormDeleteDialog.vue.d.ts +5 -5
  25. package/dist/modules/contacts/components/PContactFormEditDialog.vue.d.ts +5 -5
  26. package/dist/modules/contacts/types.d.ts +5 -4
  27. package/dist/modules/schedule/classes/Schedule.d.ts +2 -1
  28. package/dist/modules/schedule/classes/ScheduleDay.d.ts +2 -1
  29. package/dist/modules/schedule/classes/SchedulePlace.d.ts +2 -1
  30. package/dist/modules/schedule/classes/ScheduleSession.d.ts +2 -1
  31. package/dist/modules/schedule/classes/ScheduleSlot.d.ts +2 -1
  32. package/dist/modules/schedule/classes/types.d.ts +14 -0
  33. package/dist/modules/table/PTable.vue.d.ts +103 -0
  34. package/dist/modules/table/cells/PTableBadge.vue.d.ts +15 -6
  35. package/dist/modules/table/cells/PTableBadges.vue.d.ts +16 -7
  36. package/dist/modules/table/cells/PTableNumber.vue.d.ts +7 -5
  37. package/dist/modules/table/cells/PTableSelect.vue.d.ts +10 -3
  38. package/dist/modules/table/cells/PTableString.vue.d.ts +7 -5
  39. package/dist/modules/tabs/components/PTabsLeft.vue.d.ts +4 -3
  40. package/dist/sprof.js +6173 -7420
  41. package/dist/style.css +1 -1
  42. package/dist/test-utils/quasar-minimal.d.ts +3 -4
  43. package/package.json +15 -14
  44. package/dist/core/components/AdaptiveContainer.vue.d.ts +0 -38
  45. package/dist/core/components/AdaptiveContainerHorizontal.vue.d.ts +0 -60
  46. package/dist/core/components/CarouselImages.vue.d.ts +0 -64
  47. package/dist/core/components/ContextWindow.vue.d.ts +0 -34
  48. package/dist/core/components/FilterCheckbox.vue.d.ts +0 -21
  49. package/dist/core/components/FiltersButtonsSelect.vue.d.ts +0 -74
  50. package/dist/core/components/GeneralItem.vue.d.ts +0 -122
  51. package/dist/core/components/InfoItem.vue.d.ts +0 -231
  52. package/dist/core/components/InfoItemSelectButtons.vue.d.ts +0 -34
  53. package/dist/core/components/LeftRightContainer.vue.d.ts +0 -35
  54. package/dist/core/components/PhoneForm.vue.d.ts +0 -10
  55. package/dist/core/components/ResearcheContainer.vue.d.ts +0 -36
  56. package/dist/core/components/RightSliderContainer.vue.d.ts +0 -82
  57. package/dist/core/components/RightTabsContainer.vue.d.ts +0 -74
  58. package/dist/core/components/SortList.vue.d.ts +0 -18
  59. package/dist/core/components/SortSelect.vue.d.ts +0 -27
  60. package/dist/core/components/Switch3Pos.vue.d.ts +0 -35
  61. package/dist/core/components/ThemeWrapper.vue.d.ts +0 -9
  62. package/dist/core/components/ToggleInfoItem.vue.d.ts +0 -31
  63. package/dist/core/components/TopSliderContainer.vue.d.ts +0 -59
  64. package/dist/core/components/atoms/POptionsListSingle/POptionsListSingle.stories.d.ts +0 -31
  65. package/dist/core/components/molecules/PCrudList/PCrudList.stories.d.ts +0 -729
  66. package/dist/modules/forms/components/Fields/DateField.vue.d.ts +0 -16
  67. package/dist/modules/forms/components/Fields/FieldsComponentsMap.d.ts +0 -172
  68. package/dist/modules/forms/components/Fields/FileField.vue.d.ts +0 -16
  69. package/dist/modules/forms/components/Fields/MatrixRadioField.vue.d.ts +0 -24
  70. package/dist/modules/forms/components/Fields/MatrixSetField.vue.d.ts +0 -24
  71. package/dist/modules/forms/components/Fields/NumberField.vue.d.ts +0 -16
  72. package/dist/modules/forms/components/Fields/RadioField.vue.d.ts +0 -24
  73. package/dist/modules/forms/components/Fields/SetField.vue.d.ts +0 -26
  74. package/dist/modules/forms/components/Fields/StringField.vue.d.ts +0 -16
  75. package/dist/modules/forms/components/Fields/TextField.vue.d.ts +0 -16
  76. package/dist/modules/forms/components/FormPage.vue.d.ts +0 -6
  77. package/dist/modules/forms/components/FormPageSections.vue.d.ts +0 -24
  78. package/dist/modules/forms/components/admin/Fields/FieldsEditsComponents.d.ts +0 -50
  79. package/dist/modules/forms/components/admin/Fields/MatrixFieldEdit.vue.d.ts +0 -12
  80. package/dist/modules/forms/components/admin/Fields/NumberFieldEdit.vue.d.ts +0 -2
  81. package/dist/modules/forms/components/admin/Fields/RadioFieldEdit.vue.d.ts +0 -12
  82. package/dist/modules/forms/components/admin/Fields/SetFieldEdit.vue.d.ts +0 -12
  83. package/dist/modules/forms/components/admin/Fields/StringFieldEdit.vue.d.ts +0 -2
  84. package/dist/modules/forms/components/index.d.ts +0 -3
  85. package/dist/sprof.umd.cjs +0 -44
@@ -1,97 +1,72 @@
1
- declare const _default: {
2
- title: string;
3
- component: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
4
- width: {
5
- type: StringConstructor;
6
- default: string;
7
- };
8
- margin: {
9
- type: StringConstructor;
10
- default: string;
11
- };
12
- padding: {
13
- type: StringConstructor;
14
- default: string;
15
- };
16
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
- submit: (...args: any[]) => void;
18
- }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
19
- width: {
20
- type: StringConstructor;
21
- default: string;
22
- };
23
- margin: {
24
- type: StringConstructor;
25
- default: string;
26
- };
27
- padding: {
28
- type: StringConstructor;
29
- default: string;
30
- };
31
- }>> & Readonly<{
32
- onSubmit?: ((...args: any[]) => any) | undefined;
33
- }>, {
34
- padding: string;
35
- margin: string;
36
- width: string;
37
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
38
- tags: string[];
39
- parameters: {
40
- docs: {
41
- description: {
42
- component: string;
43
- };
44
- };
1
+ import { Meta, StoryFn } from '@storybook/vue3';
2
+ declare const _default: Meta<import('vue').DefineComponent<globalThis.ExtractPropTypes<{
3
+ width: {
4
+ type: StringConstructor;
5
+ default: string;
45
6
  };
46
- argTypes: {
47
- width: {
48
- control: string;
49
- };
50
- margin: {
51
- control: string;
52
- };
53
- padding: {
54
- control: string;
55
- };
7
+ margin: {
8
+ type: StringConstructor;
9
+ default: string;
56
10
  };
57
- };
11
+ padding: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ submit: (...args: any[]) => void;
17
+ }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
18
+ width: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ margin: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ padding: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ }>> & Readonly<{
31
+ onSubmit?: ((...args: any[]) => any) | undefined;
32
+ }>, {
33
+ padding: string;
34
+ margin: string;
35
+ width: string;
36
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>;
58
37
  export default _default;
59
- export declare const Default: (args: any) => import('vue').DefineComponent<{}, {
60
- props: globalThis.ComputedRef<any>;
61
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {
62
- PAuthModal: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
63
- width: {
64
- type: StringConstructor;
65
- default: string;
66
- };
67
- margin: {
68
- type: StringConstructor;
69
- default: string;
70
- };
71
- padding: {
72
- type: StringConstructor;
73
- default: string;
74
- };
75
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
76
- submit: (...args: any[]) => void;
77
- }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
78
- width: {
79
- type: StringConstructor;
80
- default: string;
81
- };
82
- margin: {
83
- type: StringConstructor;
84
- default: string;
85
- };
86
- padding: {
87
- type: StringConstructor;
88
- default: string;
89
- };
90
- }>> & Readonly<{
91
- onSubmit?: ((...args: any[]) => any) | undefined;
92
- }>, {
93
- padding: string;
94
- margin: string;
95
- width: string;
96
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
97
- }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
38
+ export declare const Default: StoryFn<import('vue').DefineComponent<globalThis.ExtractPropTypes<{
39
+ width: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ margin: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
47
+ padding: {
48
+ type: StringConstructor;
49
+ default: string;
50
+ };
51
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
52
+ submit: (...args: any[]) => void;
53
+ }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
54
+ width: {
55
+ type: StringConstructor;
56
+ default: string;
57
+ };
58
+ margin: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ };
62
+ padding: {
63
+ type: StringConstructor;
64
+ default: string;
65
+ };
66
+ }>> & Readonly<{
67
+ onSubmit?: ((...args: any[]) => any) | undefined;
68
+ }>, {
69
+ padding: string;
70
+ margin: string;
71
+ width: string;
72
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>;
@@ -1,10 +1,11 @@
1
- import { ComputedRef } from 'vue';
1
+ import { ComputedRef, WritableComputedRef } from 'vue';
2
2
  import { default as FTSP } from '../ftsp/FTSP';
3
3
  export interface UsePaginationReturn {
4
- /** Текущая страница (1-based, для v-model пагинаторов/таблиц) */
5
- page: ComputedRef<number>;
6
- /** Строк на странице; смена сбрасывает на первую страницу */
7
- rowsPerPage: ComputedRef<number>;
4
+ /** Текущая страница (1-based, для v-model пагинаторов/таблиц).
5
+ * ⚠️ Записываемый computed: у него есть set (перенормирует offset). */
6
+ page: WritableComputedRef<number>;
7
+ /** Строк на странице; смена сбрасывает на первую страницу (записываемый) */
8
+ rowsPerPage: WritableComputedRef<number>;
8
9
  /** Общее количество записей (ftsp.p.rowsNumber) */
9
10
  rowsNumber: ComputedRef<number>;
10
11
  /** Перейти на страницу (1-based) */
@@ -1,24 +1,25 @@
1
1
  import { ValidationRule } from 'quasar';
2
+ export type Rule<T = unknown> = (value: T, rules?: Record<string, (v: unknown) => boolean>) => boolean | string | Promise<boolean | string>;
2
3
  export type { ValidationRule };
3
4
  /** Обязательное поле */
4
- export declare const Required: (msg?: string) => ValidationRule;
5
+ export declare const Required: (msg?: string) => Rule;
5
6
  /** Корректный email */
6
- export declare const Email: (msg?: string) => ValidationRule;
7
+ export declare const Email: (msg?: string) => Rule;
7
8
  /** Минимальная длина строки */
8
- export declare const MinLen: (min: number, msg?: string) => ValidationRule;
9
+ export declare const MinLen: (min: number, msg?: string) => Rule;
9
10
  /** Максимальная длина строки */
10
- export declare const MaxLen: (max: number, msg?: string) => ValidationRule;
11
+ export declare const MaxLen: (max: number, msg?: string) => Rule;
11
12
  /** Совпадение с регулярным выражением */
12
- export declare const Regex: (re: RegExp, msg?: string) => ValidationRule;
13
+ export declare const Regex: (re: RegExp, msg?: string) => Rule;
13
14
  /**
14
15
  * Дата в русском формате ДД.ММ.ГГГГ (с реальной проверкой календаря).
15
16
  * Пустое значение валидно, если не задан `required`.
16
17
  * Принимает строку ДД.ММ.ГГГГ (отображение PDateInput).
17
18
  */
18
- export declare const DateRu: (msg?: string, required?: boolean) => ValidationRule;
19
+ export declare const DateRu: (msg?: string, required?: boolean) => Rule;
19
20
  /**
20
21
  * Композиция правил: выполняются по очереди, возвращается первая ошибка.
21
22
  * Пустое значение: если НЕТ правила Required — считается валидным (пропускаем
22
23
  * необязательные поля), иначе Required даст ошибку.
23
24
  */
24
- export declare const Compose: (...rules: ValidationRule[]) => ValidationRule;
25
+ export declare const Compose: (...rules: Rule[]) => Rule;
@@ -1,3 +1,4 @@
1
+ import { default as FileInfo } from '../classes/FileInfo';
1
2
  import { default as HttpHeaders } from '../types/HttpHeaders';
2
3
  export interface IBodilessParams {
3
4
  query: string;
@@ -11,9 +12,5 @@ export interface IBodyfulParams<PayloadType> {
11
12
  isBlob?: boolean;
12
13
  downloadFileName?: string;
13
14
  headers?: HttpHeaders;
14
- fileInfos?: {
15
- file: File;
16
- id?: string;
17
- originalName: string;
18
- }[];
15
+ fileInfos?: FileInfo[];
19
16
  }
@@ -1,5 +1,5 @@
1
1
  import { Ref } from 'vue';
2
2
  export default interface IStorePaginator {
3
- Count: () => Ref<number>;
3
+ Count: Ref<number>;
4
4
  FTSP: () => Promise<void>;
5
5
  }
@@ -6,11 +6,11 @@ export interface DialogResult {
6
6
  }
7
7
  type DialogOpts = MessageOpts & {
8
8
  text: string;
9
- confirmButtonText: string;
10
- cancelButtonText: string;
9
+ confirmButtonText?: string;
10
+ cancelButtonText?: string;
11
11
  persistent?: boolean;
12
12
  };
13
- type DialogResolver = (value: DialogResult | boolean) => void;
13
+ type DialogResolver = (value: DialogResult | PromiseLike<DialogResult>) => void;
14
14
  type DialogRejecter = (reason?: unknown) => void;
15
15
  /**
16
16
  * Reactive singleton for confirm dialogs.
@@ -1,7 +1,7 @@
1
1
  import { default as Message, MessageOpts } from '../helpers/Message';
2
2
  import { default as Statuses } from '../types/Statuses';
3
3
  type NotifyOpts = MessageOpts & {
4
- duration: number;
4
+ duration?: number;
5
5
  };
6
6
  /**
7
7
  * Reactive singleton for user notifications.
@@ -17,6 +17,10 @@ declare class Notify extends Message {
17
17
  duration: number;
18
18
  showMessage(m: string | NotifyOpts, t: Statuses): void;
19
19
  GetDuration(): number;
20
+ Success(m: string | NotifyOpts): void;
21
+ Error(m: string | NotifyOpts): void;
22
+ Warning(m: string | NotifyOpts): void;
23
+ Info(m: string | NotifyOpts): void;
20
24
  Dev(): void;
21
25
  Save(): void;
22
26
  }
@@ -35,35 +35,15 @@ declare module 'vue' {
35
35
  PToggle: typeof Atoms.PToggle;
36
36
  PTooltip: typeof Atoms.PTooltip;
37
37
  PTopSlider: typeof Atoms.PTopSlider;
38
- AdaptiveContainer: typeof Components.AdaptiveContainer;
39
- AdaptiveContainerHorizontal: typeof Components.AdaptiveContainerHorizontal;
40
38
  AdminGallery: typeof Components.AdminGallery;
41
- CarouselImages: typeof Components.CarouselImages;
42
- ContextWindow: typeof Components.ContextWindow;
43
39
  DropList: typeof Components.DropList;
44
- FilterCheckbox: typeof Components.FilterCheckbox;
45
40
  FilterSelect: typeof Components.FilterSelect;
46
- FiltersButtonsSelect: typeof Components.FiltersButtonsSelect;
47
- GeneralItem: typeof Components.GeneralItem;
48
41
  GridContainer: typeof Components.GridContainer;
49
- InfoItem: typeof Components.InfoItem;
50
- InfoItemSelectButtons: typeof Components.InfoItemSelectButtons;
51
- LeftRightContainer: typeof Components.LeftRightContainer;
52
42
  PAutocomplete: typeof Components.PAutocomplete;
53
43
  PPagination: typeof Components.PPagination;
54
44
  PageNotFound: typeof Components.PageNotFound;
55
- PhoneForm: typeof Components.PhoneForm;
56
45
  RemoteSearch: typeof Components.RemoteSearch;
57
- ResearcheContainer: typeof Components.ResearcheContainer;
58
- RightSliderContainer: typeof Components.RightSliderContainer;
59
- RightTabsContainer: typeof Components.RightTabsContainer;
60
46
  SelectValueType: typeof Components.SelectValueType;
61
- SortList: typeof Components.SortList;
62
- SortSelect: typeof Components.SortSelect;
63
- Switch3Pos: typeof Components.Switch3Pos;
64
- ThemeWrapper: typeof Components.ThemeWrapper;
65
- ToggleInfoItem: typeof Components.ToggleInfoItem;
66
- TopSliderContainer: typeof Components.TopSliderContainer;
67
47
  CollapseContainer: typeof Molecules.CollapseContainer;
68
48
  CollapseItem: typeof Molecules.CollapseItem;
69
49
  PAdd: typeof Molecules.PAdd;
@@ -12,11 +12,11 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
12
12
  default: boolean;
13
13
  };
14
14
  modelValue: {
15
- type: globalThis.PropType<any>;
15
+ type: globalThis.PropType<boolean>;
16
16
  };
17
17
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
18
  confirm: (...args: any[]) => void;
19
- "update:modelValue": (value: any) => void;
19
+ "update:modelValue": (value: boolean) => void;
20
20
  }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
21
21
  title: {
22
22
  type: StringConstructor;
@@ -31,14 +31,14 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
31
31
  default: boolean;
32
32
  };
33
33
  modelValue: {
34
- type: globalThis.PropType<any>;
34
+ type: globalThis.PropType<boolean>;
35
35
  };
36
36
  }>> & Readonly<{
37
37
  onConfirm?: ((...args: any[]) => any) | undefined;
38
- "onUpdate:modelValue"?: ((value: any) => any) | undefined;
38
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
39
39
  }>, {
40
- loading: boolean;
41
40
  title: string;
41
+ loading: boolean;
42
42
  subtitle: string;
43
43
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
44
44
  export default _default;
@@ -12,11 +12,11 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<gl
12
12
  default: boolean;
13
13
  };
14
14
  modelValue: {
15
- type: globalThis.PropType<any>;
15
+ type: globalThis.PropType<boolean>;
16
16
  };
17
17
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
18
  save: (...args: any[]) => void;
19
- "update:modelValue": (value: any) => void;
19
+ "update:modelValue": (value: boolean) => void;
20
20
  }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
21
21
  icon: {
22
22
  type: StringConstructor;
@@ -31,14 +31,14 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<gl
31
31
  default: boolean;
32
32
  };
33
33
  modelValue: {
34
- type: globalThis.PropType<any>;
34
+ type: globalThis.PropType<boolean>;
35
35
  };
36
36
  }>> & Readonly<{
37
- "onUpdate:modelValue"?: ((value: any) => any) | undefined;
37
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
38
38
  onSave?: ((...args: any[]) => any) | undefined;
39
39
  }>, {
40
- icon: string;
41
40
  title: string;
41
+ icon: string;
42
42
  saving: boolean;
43
43
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
44
44
  default?(_: {}): any;
@@ -10,10 +10,11 @@ export interface ContactsAdapter<TContact = unknown, TPhone = unknown, TEmail =
10
10
  phones(contact: TContact): TPhone[];
11
11
  /** Список email'ов контакта */
12
12
  emails(contact: TContact): TEmail[];
13
- /** Создать телефон (пушить в contact.phones и вернуть) */
14
- addPhone(contact: TContact): TPhone;
15
- /** Создать email (пушить в contact.emails и вернуть) */
16
- addEmail(contact: TContact): TEmail;
13
+ /** Создать телефон (пушить в contact.phones и вернуть).
14
+ * ⚠️ Может быть async: реальный адаптер hr (`contactsAdapter.ts`) — `async`. */
15
+ addPhone(contact: TContact): TPhone | Promise<TPhone>;
16
+ /** Создать email (пушить в contact.emails и вернуть). Может быть async. */
17
+ addEmail(contact: TContact): TEmail | Promise<TEmail>;
17
18
  /** Номер телефона */
18
19
  phoneNumber(phone: TPhone): string;
19
20
  /** Маска набора номера ('' — без маски) */
@@ -1,5 +1,6 @@
1
1
  import { default as ScheduleSession } from './ScheduleSession';
2
2
  import { default as ScheduleSlot } from './ScheduleSlot';
3
+ import { DeepPartial } from './types';
3
4
  /**
4
5
  * Расписание одного места на один день (обобщённый Schedule из pros):
5
6
  * секции (ScheduleSession) и слоты (ScheduleSlot).
@@ -12,7 +13,7 @@ export default class Schedule {
12
13
  placeId?: string;
13
14
  sessions: ScheduleSession[];
14
15
  slots: ScheduleSlot[];
15
- constructor(i?: Schedule);
16
+ constructor(i?: DeepPartial<Schedule>);
16
17
  static Create(placeId?: string, scheduleDayId?: string): Schedule;
17
18
  addSession(): ScheduleSession;
18
19
  addSlot(): ScheduleSlot;
@@ -1,4 +1,5 @@
1
1
  import { default as Schedule } from './Schedule';
2
+ import { DeepPartial } from './types';
2
3
  /**
3
4
  * День календаря-расписания (обобщённый EventDay из pros).
4
5
  * Привязывается к владельцу через ownerId/ownerType (мероприятие, врач, ...).
@@ -10,6 +11,6 @@ export default class ScheduleDay {
10
11
  ownerId?: string;
11
12
  ownerType: string;
12
13
  schedules: Schedule[];
13
- constructor(i?: ScheduleDay);
14
+ constructor(i?: DeepPartial<ScheduleDay>);
14
15
  static Create(ownerId?: string, ownerType?: string, date?: Date): ScheduleDay;
15
16
  }
@@ -1,3 +1,4 @@
1
+ import { DeepPartial } from './types';
1
2
  /**
2
3
  * Место проведения (обобщённый Place из pros): зал, аудитория,
3
4
  * кабинет врача, онлайн-комната...
@@ -7,6 +8,6 @@ export default class SchedulePlace {
7
8
  name: string;
8
9
  description: string;
9
10
  color: string;
10
- constructor(i?: SchedulePlace);
11
+ constructor(i?: DeepPartial<SchedulePlace>);
11
12
  static Create(): SchedulePlace;
12
13
  }
@@ -1,4 +1,5 @@
1
1
  import { default as ScheduleSlot } from './ScheduleSlot';
2
+ import { DeepPartial } from './types';
2
3
  /**
3
4
  * Секция/группа расписания (обобщённый Session из pros):
4
5
  * временной интервал с вложенными слотами.
@@ -11,6 +12,6 @@ export default class ScheduleSession {
11
12
  endTime: string;
12
13
  scheduleId?: string;
13
14
  slots: ScheduleSlot[];
14
- constructor(i?: ScheduleSession);
15
+ constructor(i?: DeepPartial<ScheduleSession>);
15
16
  static Create(scheduleId?: string): ScheduleSession;
16
17
  }
@@ -1,3 +1,4 @@
1
+ import { DeepPartial } from './types';
1
2
  /**
2
3
  * Слот расписания (обобщённый Perfom из pros): событие с временным
3
4
  * интервалом — доклад, приём врача, лекция...
@@ -14,6 +15,6 @@ export default class ScheduleSlot {
14
15
  scheduleId?: string;
15
16
  sessionId?: string;
16
17
  payload: Record<string, unknown>;
17
- constructor(i?: ScheduleSlot);
18
+ constructor(i?: DeepPartial<ScheduleSlot>);
18
19
  static Create(scheduleId?: string): ScheduleSlot;
19
20
  }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Рекурсивно-необязательный тип — вход конструкторов schedule-классов.
3
+ *
4
+ * ⚠️ ЗАЧЕМ. Конструкторы (`new ScheduleDay(data)`) собирают вложенные сущности
5
+ * через `PF.H.Classes.BuildClass`: на вход идут ЧАСТИЧНЫЕ объекты любой глубины
6
+ * (`{ schedules: [{ sessions: [{ slots: [{ id }] }] }] }`) — и `BuildClass`
7
+ * сам создаёт экземпляры `Schedule`/`ScheduleSession`/`ScheduleSlot`.
8
+ * `Partial<T>` делает необязательным только верхний уровень, поэтому вложенные
9
+ * массивы требовали ПОЛНЫЕ объекты (TS2739 в тестах). `DeepPartial` снимает
10
+ * это требование по всей глубине.
11
+ */
12
+ export type DeepPartial<T> = T extends (infer U)[] ? DeepPartial<U>[] : T extends Date | File | Blob | RegExp ? T : T extends object ? {
13
+ [K in keyof T]?: DeepPartial<T[K]>;
14
+ } : T;
@@ -0,0 +1,103 @@
1
+ import { default as FTSP } from '../../core/ftsp/FTSP';
2
+ import { default as BaseStore } from '../../core/helpers/BaseStore';
3
+ /**
4
+ * Таблица с пагинацией через FTSP (модуль Table, P2.1 — унификация из 5 клиентов,
5
+ * базовая версия — hr/portal).
6
+ *
7
+ * Пропсы: `cols` (колонки QTable), `items` (строки), `store` (BaseStore — Count/FTSP),
8
+ * `ftsp` (экземпляр FTSP страницы; по умолчанию — свой собственный),
9
+ * `lead` (служебная `auto-width`-колонка слева, по умолчанию `true`),
10
+ * `rowAttrs` (функция строка → `data-*` на `QTr`), `loading` (overlay-спиннер).
11
+ * Слот `#default="{ row }"` — содержимое строки (ячейки PTable*).
12
+ * Слот `#lead="{ row }"` — содержимое служебной колонки.
13
+ * Слот `#header="{ props }"` — ПОЛНАЯ подмена шапки (когда `lead` не подходит).
14
+ *
15
+ * ⚠️ ПРО `ftsp` (Ф2.2). Раньше таблица всегда брала глобальный синглтон
16
+ * `FTSP.Get()` — поэтому её нельзя было положить на страницу со СВОИМИ
17
+ * фильтрами: фильтры «перетекали» между разделами (в rdkb-map из-за этого
18
+ * написали свою таблицу на сыром `q-table`). Теперь у каждой таблицы СВОЙ
19
+ * экземпляр (`FTSP.create()`), а страница может передать свой — например,
20
+ * чтобы фильтры тулбара и пагинация таблицы работали с одним состоянием.
21
+ *
22
+ * ⚠️ ПРО `lead` (Ф2.3). Служебная `auto-width`-колонка удобна админкам
23
+ * (кнопка «редактировать»), но ЛОМАЕТ страницы, где шапка и тело строятся
24
+ * из ОДНОГО списка колонок и своя служебная ячейка — часть этого списка
25
+ * (напр. чекбокс выбора в rdkb-map): лишний `th` сдвигает заголовки
26
+ * относительно значений. `lead: false` + свой `#header` снимает это
27
+ * без своей таблицы на сыром `q-table`.
28
+ */
29
+ interface TableColumn {
30
+ name: string;
31
+ label: string;
32
+ field: string | ((row: any) => any);
33
+ align?: 'left' | 'center' | 'right';
34
+ sortable?: boolean;
35
+ }
36
+ type __VLS_Props = {
37
+ cols: TableColumn[];
38
+ items: Record<string, unknown>[];
39
+ store?: BaseStore<never>;
40
+ /**
41
+ * Экземпляр FTSP, с которым работает таблица. Не передан — создаётся свой
42
+ * (`FTSP.create()`), чтобы пагинация не делилась с другими списками.
43
+ * Передан (`:ftsp="ftsp"`) — таблица пишет offset/rowsPerPage именно в него,
44
+ * то есть состояние остаётся доступно странице (для фильтров/сортировки).
45
+ */
46
+ ftsp?: FTSP;
47
+ rowKey?: string;
48
+ rowsPerPageOptions?: number[];
49
+ paginationLabel?: (start: number, end: number, total: number) => string;
50
+ /**
51
+ * Служебная `auto-width`-колонка слева (Ф2.3): под кнопку/чекбокс строки.
52
+ * `false` — колонки полностью контролирует потребитель (свой `#header`);
53
+ * шагнка и тело не расходятся, т.к. служебной ячейки НЕТ ни там, ни там.
54
+ * По умолчанию `true` — прежнее поведение (39 потребителей).
55
+ */
56
+ lead?: boolean;
57
+ /** Атрибуты строки (`data-*`, `class`) — для обводки/подсветки/тестов. */
58
+ rowAttrs?: (row: Record<string, unknown>) => Record<string, string>;
59
+ /** Компактная таблица (проброс в `QTable`). */
60
+ dense?: boolean;
61
+ /** Скрыть встроенный подвал с пагинацией (проп `hide-bottom` `QTable`). */
62
+ hideBottom?: boolean;
63
+ /**
64
+ * Загрузка (проброс в `QTable`): встроенный overlay-спиннер ПОВЕРХ строк.
65
+ * В отличие от замены тела на спиннер — список не «прыгает», и видно, что
66
+ * обновляются ИМЕННО текущие данные.
67
+ */
68
+ loading?: boolean;
69
+ };
70
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
71
+ request: () => any;
72
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
73
+ onRequest?: (() => any) | undefined;
74
+ }>, {
75
+ dense: boolean;
76
+ loading: boolean;
77
+ ftsp: FTSP;
78
+ store: BaseStore<never>;
79
+ rowKey: string;
80
+ rowsPerPageOptions: number[];
81
+ paginationLabel: (start: number, end: number, total: number) => string;
82
+ lead: boolean;
83
+ rowAttrs: (row: Record<string, unknown>) => Record<string, string>;
84
+ hideBottom: boolean;
85
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
86
+ header?(_: {
87
+ props: any;
88
+ }): any;
89
+ body?(_: any): any;
90
+ lead?(_: {
91
+ row: any;
92
+ }): any;
93
+ default?(_: {
94
+ row: any;
95
+ props: any;
96
+ }): any;
97
+ }>;
98
+ export default _default;
99
+ type __VLS_WithTemplateSlots<T, S> = T & {
100
+ new (): {
101
+ $slots: S;
102
+ };
103
+ };
@@ -1,9 +1,18 @@
1
- import { default as BaseStore } from '../../../core/helpers/BaseStore';
1
+ import { default as IOption } from '../../../core/interfaces/IOption';
2
+ interface BadgeStore {
3
+ Update: (row: unknown) => Promise<void>;
4
+ }
5
+ interface BadgeOptionsStore {
6
+ Options: IOption[];
7
+ Item: unknown;
8
+ GetOptions: (label?: string, value?: string) => Promise<void>;
9
+ Get: (id?: string) => Promise<void>;
10
+ }
2
11
  type __VLS_Props = {
3
- row: Record<string, unknown>;
12
+ row: Record<string, any>;
4
13
  prop: string;
5
- store: BaseStore;
6
- storeOpts: BaseStore;
14
+ store: BadgeStore;
15
+ storeOpts: BadgeOptionsStore;
7
16
  labelKey?: string;
8
17
  };
9
18
  declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
@@ -17,13 +26,13 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
17
26
  $: import('vue').ComponentInternalInstance;
18
27
  $data: {};
19
28
  $props: {
20
- readonly modelValue: boolean;
29
+ readonly modelValue?: boolean | undefined;
21
30
  readonly title?: string | undefined;
22
31
  readonly confirmLabel?: string | undefined;
23
32
  readonly cancelLabel?: string | undefined;
24
33
  readonly width?: string | undefined;
25
34
  readonly disabled?: boolean | undefined;
26
- readonly showConfirm: boolean;
35
+ readonly showConfirm?: boolean | undefined;
27
36
  readonly onClose?: (() => any) | undefined;
28
37
  readonly onConfirm?: (() => any) | undefined;
29
38
  readonly "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;