@mobilon-dev/chotto 0.3.49 → 0.3.50

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.
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<{}, {
8
8
  recentAttributeChannels: Record<string, any>;
9
9
  isNewDialog: boolean;
10
10
  selectedDialog: Record<string, any>;
11
+ emptyChannelsPlaceholder: Record<string, any>;
11
12
  showChannelIcons: boolean;
12
13
  $props: {
13
14
  readonly channels?: unknown[] | undefined;
@@ -18,6 +19,7 @@ declare const _default: import("vue").DefineComponent<{}, {
18
19
  readonly recentAttributeChannels?: Record<string, any> | undefined;
19
20
  readonly isNewDialog?: boolean | undefined;
20
21
  readonly selectedDialog?: Record<string, any> | undefined;
22
+ readonly emptyChannelsPlaceholder?: Record<string, any> | undefined;
21
23
  readonly showChannelIcons?: boolean | undefined;
22
24
  };
23
25
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -7,7 +7,7 @@ export type ChannelType = (typeof CHANNEL_TYPES)[number];
7
7
  /**
8
8
  * Базовое описание канала.
9
9
  */
10
- type Channel = {
10
+ export type Channel = {
11
11
  channelId: string;
12
12
  title?: string;
13
13
  [key: string]: unknown;
@@ -0,0 +1,37 @@
1
+ import { type Ref, type ComputedRef } from 'vue';
2
+ import type { Channel } from './useCommunicationChannels';
3
+ import type { ContactAttribute } from './useCommunicationAttributes';
4
+ type MaybeRef<T> = T | Ref<T> | ComputedRef<T>;
5
+ /**
6
+ * Опции для composable управления placeholder пустых каналов.
7
+ */
8
+ interface UseCommunicationPlaceholderOptions {
9
+ /** Флаг отображения меню */
10
+ showMenu: Ref<boolean>;
11
+ /** Текущий активный тип канала */
12
+ activeChannelType: Ref<string | null>;
13
+ /** Объект с текстами placeholder для каждого типа канала */
14
+ emptyChannelsPlaceholder: MaybeRef<Record<string, string>>;
15
+ /** Функция получения доступных каналов для типа */
16
+ getAvailableChannels: (channelType: string) => Channel[];
17
+ /** Функция получения типа канала по его ID */
18
+ getChannelTypeFromId: (channelId: string | null | undefined) => string | null;
19
+ /** Реактивный список всех каналов */
20
+ channels: MaybeRef<Channel[]>;
21
+ /** Реактивная карта недавних атрибутов по типам */
22
+ recentAttributeChannels: MaybeRef<Record<string, {
23
+ channelId?: string;
24
+ }>>;
25
+ /** Организованные атрибуты контакта по типам каналов */
26
+ organizedContactAttributes: Ref<Record<string, ContactAttribute[]>>;
27
+ /** Флаг отображения недавнего атрибута */
28
+ showRecentAttribute: ComputedRef<boolean>;
29
+ }
30
+ /**
31
+ * Компонует логику отображения placeholder для пустых каналов.
32
+ */
33
+ export declare function useCommunicationPlaceholder({ showMenu, activeChannelType, emptyChannelsPlaceholder, getAvailableChannels, getChannelTypeFromId, channels, recentAttributeChannels, organizedContactAttributes, showRecentAttribute, }: UseCommunicationPlaceholderOptions): {
34
+ emptyChannelsPlaceholderText: ComputedRef<string | null>;
35
+ shouldShowEmptyChannelsPlaceholder: ComputedRef<boolean>;
36
+ };
37
+ export {};
@@ -11,6 +11,7 @@ declare const meta: {
11
11
  recentAttributeChannels: Record<string, any>;
12
12
  isNewDialog: boolean;
13
13
  selectedDialog: Record<string, any>;
14
+ emptyChannelsPlaceholder: Record<string, any>;
14
15
  showChannelIcons: boolean;
15
16
  $props: {
16
17
  readonly channels?: unknown[] | undefined;
@@ -21,6 +22,7 @@ declare const meta: {
21
22
  readonly recentAttributeChannels?: Record<string, any> | undefined;
22
23
  readonly isNewDialog?: boolean | undefined;
23
24
  readonly selectedDialog?: Record<string, any> | undefined;
25
+ readonly emptyChannelsPlaceholder?: Record<string, any> | undefined;
24
26
  readonly showChannelIcons?: boolean | undefined;
25
27
  };
26
28
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -236,6 +236,24 @@ export interface CommunicationPanelThemeCSSVariables {
236
236
  '--chotto-communicationpanel-attribute-value-color': string;
237
237
  /** Высота строки значения атрибута */
238
238
  '--chotto-communicationpanel-attribute-value-line-height': string;
239
+ /** Отступы placeholder пустых каналов */
240
+ '--chotto-communicationpanel-empty-placeholder-padding': string;
241
+ /** Размер шрифта placeholder пустых каналов */
242
+ '--chotto-communicationpanel-empty-placeholder-font-size': string;
243
+ /** Цвет placeholder пустых каналов */
244
+ '--chotto-communicationpanel-empty-placeholder-color': string;
245
+ /** Жирность шрифта placeholder пустых каналов */
246
+ '--chotto-communicationpanel-empty-placeholder-font-weight': string;
247
+ /** Выравнивание текста placeholder пустых каналов */
248
+ '--chotto-communicationpanel-empty-placeholder-text-align': string;
249
+ /** Курсор placeholder пустых каналов */
250
+ '--chotto-communicationpanel-empty-placeholder-cursor': string;
251
+ /** Выбор текста placeholder пустых каналов */
252
+ '--chotto-communicationpanel-empty-placeholder-user-select': string;
253
+ /** События указателя placeholder пустых каналов */
254
+ '--chotto-communicationpanel-empty-placeholder-pointer-events': string;
255
+ /** Высота строки placeholder пустых каналов */
256
+ '--chotto-communicationpanel-empty-placeholder-line-height': string;
239
257
  /** Цвет серой иконки меню */
240
258
  '--chotto-communicationpanel-menu-icon-grey-color': string;
241
259
  /** Размер шрифта серой иконки меню */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mobilon-dev/chotto",
3
- "version": "0.3.49",
3
+ "version": "0.3.50",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",