@agendize/vue-tools 1.1.4 → 1.3.0

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
@@ -1,10 +1,13 @@
1
1
  import { useBlocState } from "./bloc/useBlocState";
2
2
  import { dateToString } from "./utils/date";
3
- import { onPictureUpdated, readBlobFromUrl } from "./utils/file";
4
- import { pad, parseToInt } from "./utils/format";
3
+ import { onPictureUpdated, readBlobFromUrl, toBase64 } from "./utils/file";
4
+ import { pad, parseToInt, formatDate, decodeHtml, personToInitials } from "./utils/format";
5
5
  import QRCode from "./presentation/component/qr-code/View.vue";
6
6
  import { createStore, useAccountStore } from "./store/accountStore";
7
+ import { poll } from "./utils/poll";
7
8
  export * from './bloc/Bloc';
8
- export { useBlocState, dateToString, QRCode, onPictureUpdated, readBlobFromUrl, pad, parseToInt };
9
+ export * from './utils/colorUtils';
10
+ export { useBlocState, dateToString, QRCode, onPictureUpdated, readBlobFromUrl, pad, parseToInt, formatDate, toBase64, decodeHtml, personToInitials };
9
11
  export { createStore, useAccountStore };
12
+ export { poll };
10
13
  export * from './utils/constants';
@@ -1,10 +1,14 @@
1
- import { AccountEntity, CalendarApi } from "@agendize/js-calendar-api";
1
+ import { AccountEntity, ApiErrors, CalendarApi } from "@agendize/js-calendar-api";
2
+ import type { Ability } from "@agendize/vue-acl";
3
+ import { RoleType } from "@agendize/vue-acl/src/types/acl";
2
4
  export declare type AccountState = {
3
5
  account: AccountEntity;
4
6
  };
5
- export declare const createStore: (calendarApi: CalendarApi) => import("pinia").Pinia;
7
+ export declare const createStore: (calendarApi: CalendarApi, aclApi: any) => import("pinia").Pinia;
6
8
  export declare const useAccountStore: import("pinia").StoreDefinition<"account", AccountState, {}, {
7
9
  updateAccount(payload: AccountEntity): Promise<void>;
8
- fetchAccount(success?: ((account: AccountEntity) => void) | undefined, error?: () => void): Promise<void>;
10
+ fetchAccount(crossAccount?: boolean, success?: (account: AccountEntity) => void, error?: (error: ApiErrors) => void): Promise<void>;
9
11
  updatePassword(currentPassword: string, newPassword: string): Promise<void>;
12
+ hasAbility(ability: Ability, objectId?: string): Promise<boolean>;
13
+ hasAnyRoles(roles: RoleType[]): Promise<boolean>;
10
14
  }>;