@webitel/ui-sdk 26.8.150 → 26.8.151
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/{clients-x0gCJQbb.js → clients-Bn77MDFb.js} +1 -1
- package/dist/{components-7m-8aZmi.js → components-DFU2gMZC.js} +585 -586
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +707 -707
- package/dist/{wt-chat-emoji-C6taiH7d.js → wt-chat-emoji-CDJIdeXU.js} +1 -1
- package/dist/{wt-display-chip-items-BKezwH_o.js → wt-display-chip-items-Dj0fY1dF.js} +1 -1
- package/dist/{wt-send-message-popup-BWbiEroB.js → wt-send-message-popup-SNflIgQ8.js} +2 -2
- package/dist/{wt-type-extension-value-input-DJVtErVH.js → wt-type-extension-value-input-BgTpak2x.js} +2 -2
- package/dist/{wt-vidstack-player-BcldtEws.js → wt-vidstack-player-BO7ozD50.js} +1 -1
- package/package.json +5 -1
- package/src/modules/SystemSettings/composables/__tests__/useSystemSettings.spec.ts +210 -0
- package/src/modules/SystemSettings/composables/useSystemSettings.ts +79 -0
- package/src/modules/SystemSettings/index.ts +4 -0
- package/types/.tsbuildinfo +1 -1
- package/types/modules/SystemSettings/composables/useSystemSettings.d.ts +19 -0
- package/types/modules/SystemSettings/index.d.ts +1 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { EngineSystemSettingName } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { type Ref } from 'vue';
|
|
3
|
+
import type { Client, ClientEvents } from 'webitel-sdk';
|
|
4
|
+
/**
|
|
5
|
+
* [Claude] Payload of webitel-sdk `system_settings_changed` event (webitel-sdk >= 26.4.35).
|
|
6
|
+
* No `value` means the setting was reset to default.
|
|
7
|
+
* Derived from `ClientEvents`, because webitel-sdk does not export the payload type itself.
|
|
8
|
+
*/
|
|
9
|
+
export type SystemSettingChange = Parameters<ClientEvents['system_settings_changed']>[0];
|
|
10
|
+
/**
|
|
11
|
+
* [Claude] Each call creates its own state, so call it once, inside an app's setup store.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useSystemSettings: <Name extends EngineSystemSettingName>(names: readonly Name[]) => {
|
|
14
|
+
settings: Ref<Partial<Record<Name, unknown>>, Partial<Record<Name, unknown>>>;
|
|
15
|
+
initialize: () => Promise<void>;
|
|
16
|
+
reload: () => Promise<void>;
|
|
17
|
+
applyChange: ({ name, value }: SystemSettingChange) => Promise<void>;
|
|
18
|
+
subscribe: (client: Client) => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type SystemSettingChange, useSystemSettings, } from './composables/useSystemSettings';
|