@v1nt1248/3nclient-lib 0.1.16 → 0.1.17

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/index.d.ts CHANGED
@@ -33,6 +33,7 @@ import { DialogInstance } from './plugins/dialogs/types';
33
33
  export * from './constants';
34
34
  export * from './utils';
35
35
  export * from './plugins';
36
+ export * from './plugins/types';
36
37
  export * from './directives';
37
38
  export * from './components';
38
39
  export * from './components/types';
@@ -0,0 +1,7 @@
1
+ import { Store } from 'pinia';
2
+ export type PiniaActionTree<Actions extends Record<string, (...args: any) => any>, UsedStore extends Store> = {
3
+ [Key in keyof Actions]: (this: UsedStore, ...p: Parameters<Actions[Key]>) => ReturnType<Actions[Key]>;
4
+ };
5
+ export type PiniaGetterTree<Getters extends Record<string, any>, UsedStore extends Store> = {
6
+ [k in keyof Getters]: Getters[k] extends (...args: any) => infer R ? (this: UsedStore & Getters, state: UsedStore['$state']) => (...p: Parameters<Getters[k]>) => R : (this: UsedStore & Getters, state: UsedStore['$state']) => Getters[k];
7
+ };
@@ -13,6 +13,7 @@ import { Ui3nDialogComponentProps } from './components/ui3n-dialog/types';
13
13
  import { vueBus } from './plugins/vue-bus/vue-bus';
14
14
  import { storeVueBus } from './plugins/vue-bus/store-vue-bus';
15
15
  import { VUEBUS_KEY, CbFunction, VueEventBus, VueBusPlugin } from './plugins/vue-bus/types';
16
+ import { PiniaActionTree, PiniaGetterTree } from './plugins/types';
16
17
  declare module 'vue' {
17
18
  interface ComponentCustomProperties {
18
19
  $openDialog: <T extends Component, P extends Record<string, unknown>>(params: Ui3nDialogComponentProps<T, P>) => DialogInstance | undefined;
@@ -41,4 +42,4 @@ declare module 'pinia' {
41
42
  };
42
43
  }
43
44
  }
44
- export { i18n, storeI18n, I18N_KEY, I18nOptions, I18nPlugin, notifications, storeNotifications, NOTIFICATIONS_KEY, NotificationsPlugin, dialogs, storeDialogs, DIALOGS_KEY, DialogsPlugin, DialogInstance, vueBus, storeVueBus, VUEBUS_KEY, CbFunction, VueBusPlugin, VueEventBus, };
45
+ export { i18n, storeI18n, I18N_KEY, I18nOptions, I18nPlugin, notifications, storeNotifications, NOTIFICATIONS_KEY, NotificationsPlugin, dialogs, storeDialogs, DIALOGS_KEY, DialogsPlugin, DialogInstance, vueBus, storeVueBus, VUEBUS_KEY, CbFunction, VueBusPlugin, VueEventBus, PiniaActionTree, PiniaGetterTree, };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@v1nt1248/3nclient-lib",
3
3
  "license": "AGPL-3.0-or-later",
4
4
  "author": "v1nt1248",
5
- "version": "0.1.16",
5
+ "version": "0.1.17",
6
6
  "description": "Library for 3NWeb clients",
7
7
  "type": "module",
8
8
  "files": [