cic-kit 0.0.22 → 0.0.24

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 (57) hide show
  1. package/README.md +273 -54
  2. package/dist/cic-kit.css +1 -1
  3. package/dist/cmp/Accordion/Accordion.vue.d.ts +7 -2
  4. package/dist/cmp/Auth/Auth.d.ts +5 -0
  5. package/dist/cmp/Avatar/Avatar.vue.d.ts +2 -2
  6. package/dist/cmp/Btn/BtnMoveIcon.vue.d.ts +2 -0
  7. package/dist/cmp/Container/ContainerSideTabs.vue.d.ts +2 -2
  8. package/dist/cmp/Header/headerStore.d.ts +175 -0
  9. package/dist/cmp/Modal/Modal.vue.d.ts +4 -4
  10. package/dist/cmp/ModalDev/ModalDev.vue.d.ts +8 -1
  11. package/dist/cmp/ModalDev/view/AppConfigViewDev.vue.d.ts +5 -1
  12. package/dist/cmp/ModalDev/view/MsgPushViewDev.vue.d.ts +5 -1
  13. package/dist/cmp/RegisterSW.vue.d.ts +20 -1
  14. package/dist/cmp/Router/_router.d.ts +2 -1
  15. package/dist/cmp/Toolbar/Toolbar.vue.d.ts +42 -0
  16. package/dist/cmp/Toolbar/ToolbarApp.vue.d.ts +27 -0
  17. package/dist/cmp/Toolbar/toolbarStore.d.ts +83 -0
  18. package/dist/cmp/{toolbar → Toolbar}/useChangeToolbar.d.ts +3 -1
  19. package/dist/cmp/cicKitStore.d.ts +3 -1
  20. package/dist/cmp/{File → firebase}/FirebaseStrorage.d.ts +27 -5
  21. package/dist/cmp/firebase/firebase.d.ts +1 -1
  22. package/dist/cmp/firebase/useStoreWatch.d.ts +2 -2
  23. package/dist/cmp/input/Code/Code.d.ts +9 -0
  24. package/dist/cmp/input/Code/FieldCode.vue.d.ts +45 -0
  25. package/dist/cmp/input/File/FieldFile.vue.d.ts +68 -0
  26. package/dist/cmp/input/File/File.d.ts +5 -0
  27. package/dist/cmp/input/Gender/FieldGender.vue.d.ts +11 -10
  28. package/dist/cmp/input/Gender/Gender.d.ts +7 -1
  29. package/dist/cmp/input/PhoneNumber/FieldPhoneNumber.vue.d.ts +14 -11
  30. package/dist/cmp/input/PhoneNumber/PhoneNumber.d.ts +6 -1
  31. package/dist/cmp/input/Tag/ColorTag.d.ts +6 -2
  32. package/dist/cmp/input/Tag/{ColorTagInput.vue.d.ts → FieldColorTag.vue.d.ts} +15 -5
  33. package/dist/cmp/input/{Text/InputField.vue.d.ts → Tiptap/FieldTiptap.vue.d.ts} +11 -17
  34. package/dist/cmp/input/Tiptap/Tiptap.d.ts +2 -0
  35. package/dist/cmp/loading/loadingController.d.ts +7 -2
  36. package/dist/cmp/notification/pushMsg.d.ts +15 -5
  37. package/dist/cmp/offCanvas/OffcanvasCmp.vue.d.ts +5 -5
  38. package/dist/cmp/offCanvas/useSetOffCanvasTabs.d.ts +1 -1
  39. package/dist/cmp/timestamp/parseTimestamp.d.ts +6 -4
  40. package/dist/index.cjs +172 -24
  41. package/dist/index.d.ts +24 -5
  42. package/dist/index.mjs +46910 -26402
  43. package/package.json +7 -5
  44. package/src/styles/partials/_layout.scss +0 -9
  45. package/src/vue-shim.d.ts +8 -5
  46. package/dist/cmp/File/ImgUploader.vue.d.ts +0 -34
  47. package/dist/cmp/input/Tag/TagInput.vue.d.ts +0 -27
  48. package/dist/cmp/input/Tiptap/TiptapField.vue.d.ts +0 -15
  49. package/dist/cmp/layout/ToolbarTab.vue.d.ts +0 -10
  50. package/dist/stores/currentUserStore.d.ts +0 -175
  51. package/dist/stores/store.d.ts +0 -233
  52. package/dist/stores/userPublicStore.d.ts +0 -533
  53. /package/dist/cmp/{layout → Header}/HeaderApp.vue.d.ts +0 -0
  54. /package/dist/cmp/{header → Header}/useChangeHeader.d.ts +0 -0
  55. /package/dist/cmp/{header → Header}/useHeaderExtra.d.ts +0 -0
  56. /package/dist/cmp/{header → Header}/useHideHeader.d.ts +0 -0
  57. /package/dist/{cmp/layout/FooterApp.vue.d.ts → defaultViews/user/UserProfileEditForm.vue.d.ts} +0 -0
@@ -0,0 +1,68 @@
1
+ import { type RuleExpression } from 'vee-validate';
2
+ import { type FieldFileValue } from './File';
3
+ type __VLS_Props = {
4
+ name: string;
5
+ modelValue?: FieldFileValue;
6
+ rules?: RuleExpression<FieldFileValue>;
7
+ label?: string;
8
+ className?: any;
9
+ showList?: boolean;
10
+ showErrors?: boolean;
11
+ showSize?: boolean;
12
+ removable?: boolean;
13
+ multiple?: boolean;
14
+ accept?: string;
15
+ disabled?: boolean;
16
+ required?: boolean;
17
+ capture?: "user" | "environment" | boolean;
18
+ listClass?: any;
19
+ };
20
+ declare function open(): void;
21
+ declare function clear(): void;
22
+ declare var __VLS_1: {
23
+ open: typeof open;
24
+ clear: typeof clear;
25
+ files: File[];
26
+ disabled: boolean;
27
+ dragging: boolean;
28
+ errorMessage: string | undefined;
29
+ meta: import("vee-validate").FieldMeta<FieldFileValue>;
30
+ };
31
+ type __VLS_Slots = {} & {
32
+ dropzone?: (props: typeof __VLS_1) => any;
33
+ };
34
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
35
+ open: typeof open;
36
+ clear: typeof clear;
37
+ files: import("vue").ComputedRef<File[]>;
38
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
39
+ "update:modelValue": (v: FieldFileValue) => any;
40
+ open: () => any;
41
+ remove: (file: File, index: number) => any;
42
+ clear: () => any;
43
+ change: (files: File[]) => any;
44
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
45
+ "onUpdate:modelValue"?: ((v: FieldFileValue) => any) | undefined;
46
+ onOpen?: (() => any) | undefined;
47
+ onRemove?: ((file: File, index: number) => any) | undefined;
48
+ onClear?: (() => any) | undefined;
49
+ onChange?: ((files: File[]) => any) | undefined;
50
+ }>, {
51
+ disabled: boolean;
52
+ label: string;
53
+ showErrors: boolean;
54
+ required: boolean;
55
+ className: any;
56
+ showList: boolean;
57
+ showSize: boolean;
58
+ removable: boolean;
59
+ multiple: boolean;
60
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
61
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
62
+ declare const _default: typeof __VLS_export;
63
+ export default _default;
64
+ type __VLS_WithSlots<T, S> = T & {
65
+ new (): {
66
+ $slots: S;
67
+ };
68
+ };
@@ -0,0 +1,5 @@
1
+ export type FieldFileValue = File | File[] | null;
2
+ export declare function toFileArray(value: FieldFileValue): File[];
3
+ export declare function toFileValue(files: File[], multiple: boolean): FieldFileValue;
4
+ export declare function formatFileSize(size?: number): string;
5
+ export declare function getFileExtension(fileOrName: File | string): string;
@@ -1,13 +1,12 @@
1
- import { type Component } from 'vue';
2
- import type { FormValidator } from '../../form-validator/FormValidator';
3
- import type { Gender } from './Gender';
1
+ import { type Component } from "vue";
2
+ import { type Gender, type GenderOption } from "./Gender";
4
3
  type __VLS_Props = {
5
- modelValue: Gender;
6
- field: string;
7
- fv: FormValidator<any>;
4
+ name: string;
5
+ modelValue?: Gender;
8
6
  label?: string | boolean | Component;
7
+ options?: GenderOption[];
9
8
  placeholder?: string;
10
- errors?: boolean;
9
+ showErrors?: boolean;
11
10
  disabled?: boolean;
12
11
  readonly?: boolean;
13
12
  required?: boolean;
@@ -16,14 +15,16 @@ type __VLS_Props = {
16
15
  classLabel?: any;
17
16
  };
18
17
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
19
- "update:modelValue": (v: Gender) => any;
18
+ "update:modelValue": (value: Gender) => any;
20
19
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
21
- "onUpdate:modelValue"?: ((v: Gender) => any) | undefined;
20
+ "onUpdate:modelValue"?: ((value: Gender) => any) | undefined;
22
21
  }>, {
22
+ modelValue: Gender;
23
23
  disabled: boolean;
24
24
  label: string | boolean | Component;
25
+ options: GenderOption[];
25
26
  placeholder: string;
26
- errors: boolean;
27
+ showErrors: boolean;
27
28
  readonly: boolean;
28
29
  required: boolean;
29
30
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1 +1,7 @@
1
- export type Gender = '' | 'm' | 'f' | 'o';
1
+ export type Gender = "" | "m" | "f" | "o";
2
+ export type GenderOption = {
3
+ label: string;
4
+ value: Gender;
5
+ };
6
+ export declare const GENDER_OPTIONS: GenderOption[];
7
+ export declare function normalizeGender(value: unknown): Gender;
@@ -1,17 +1,18 @@
1
- import type { FormValidator } from '../../form-validator/FormValidator';
2
- import type { PhoneNumber } from './PhoneNumber';
1
+ import { type Component } from "vue";
2
+ import { type PhoneNumber } from "./PhoneNumber";
3
3
  type __VLS_Props = {
4
- modelValue: PhoneNumber;
5
- field: string;
6
- fv: FormValidator<any>;
7
- label?: string | boolean;
4
+ name: string;
5
+ modelValue?: PhoneNumber;
6
+ label?: string | boolean | Component;
8
7
  placeholder?: string;
9
8
  placeholderPrefix?: string;
10
- errors?: boolean;
9
+ showErrors?: boolean;
11
10
  disabled?: boolean;
12
11
  readonly?: boolean;
12
+ required?: boolean;
13
13
  class?: any;
14
14
  style?: any;
15
+ classLabel?: any;
15
16
  disabledPrefix?: boolean;
16
17
  disabledNumber?: boolean;
17
18
  readonlyPrefix?: boolean;
@@ -22,15 +23,17 @@ type __VLS_Props = {
22
23
  styleNumber?: any;
23
24
  };
24
25
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
25
- "update:modelValue": (v: PhoneNumber) => any;
26
+ "update:modelValue": (value: PhoneNumber) => any;
26
27
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
27
- "onUpdate:modelValue"?: ((v: PhoneNumber) => any) | undefined;
28
+ "onUpdate:modelValue"?: ((value: PhoneNumber) => any) | undefined;
28
29
  }>, {
30
+ modelValue: PhoneNumber;
29
31
  disabled: boolean;
30
- label: string | boolean;
32
+ label: string | boolean | Component;
31
33
  placeholder: string;
32
- errors: boolean;
34
+ showErrors: boolean;
33
35
  readonly: boolean;
36
+ required: boolean;
34
37
  placeholderPrefix: string;
35
38
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
36
39
  declare const _default: typeof __VLS_export;
@@ -1,2 +1,7 @@
1
1
  export type PhoneNumber = [prefix: string, number: string];
2
- export declare const phoneNumberFromString: (phoneNumber: string, defaultPrefix?: string) => PhoneNumber;
2
+ export declare const PHONE_PREFIX_REGEX: RegExp;
3
+ export declare const PHONE_NUMBER_REGEX: RegExp;
4
+ export declare function normalizePhoneNumber(value: unknown, defaultPrefix?: string): PhoneNumber;
5
+ export declare function phoneNumberFromString(phoneNumber: string, defaultPrefix?: string): PhoneNumber;
6
+ export declare function phoneNumberToString(value: PhoneNumber): string;
7
+ export declare function isPhoneNumberValid(value: PhoneNumber): boolean;
@@ -2,5 +2,9 @@ export type ColorTag = {
2
2
  label: string;
3
3
  color: string;
4
4
  };
5
- export declare const toColorTag: (it: unknown) => ColorTag | null;
6
- export declare const toColorTagArray: (x: unknown) => ColorTag[];
5
+ export declare const COLOR_TAG_DEFAULT_COLOR = "#1985a1";
6
+ export declare function toColorTag(it: unknown): ColorTag | null;
7
+ export declare function toColorTagArray(x: unknown): ColorTag[];
8
+ export declare function normalizeColorTagColor(color: unknown): string;
9
+ export declare function normalizeColorTagLabel(label: unknown): string;
10
+ export declare function isSameColorTagArray(a: ColorTag[], b: ColorTag[]): boolean;
@@ -1,32 +1,42 @@
1
- import type { ColorTag } from './ColorTag';
2
- export type OnChangeColorTag = 'add' | 'edit' | 'delete';
1
+ import { type Component } from "vue";
2
+ import { type ColorTag } from "./ColorTag";
3
+ export type OnChangeColorTag = "add" | "edit" | "delete";
3
4
  type __VLS_Props = {
5
+ name: string;
4
6
  modelValue?: ColorTag[];
5
7
  suggestions?: ColorTag[];
8
+ label?: string | boolean | Component;
6
9
  placeholder?: string;
10
+ showErrors?: boolean;
7
11
  allowDuplicates?: boolean;
8
12
  caseSensitive?: boolean;
9
13
  maxTags?: number | null;
10
- /** Colore assegnato ai tag creati da input libero */
11
14
  defaultColor?: string;
15
+ class?: any;
16
+ style?: any;
17
+ classLabel?: any;
18
+ required?: boolean;
12
19
  };
13
20
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
21
+ "update:modelValue": (value: ColorTag[]) => any;
14
22
  add: (tag: ColorTag) => any;
15
23
  remove: (tag: ColorTag) => any;
16
- "update:modelValue": (value: ColorTag[]) => any;
17
24
  change: (type: OnChangeColorTag, changedTag: ColorTag, value: ColorTag[]) => any;
18
25
  newSuggestion: (tag: ColorTag) => any;
19
26
  deleteSuggestion: (tag: ColorTag) => any;
20
27
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
28
+ "onUpdate:modelValue"?: ((value: ColorTag[]) => any) | undefined;
21
29
  onAdd?: ((tag: ColorTag) => any) | undefined;
22
30
  onRemove?: ((tag: ColorTag) => any) | undefined;
23
- "onUpdate:modelValue"?: ((value: ColorTag[]) => any) | undefined;
24
31
  onChange?: ((type: OnChangeColorTag, changedTag: ColorTag, value: ColorTag[]) => any) | undefined;
25
32
  onNewSuggestion?: ((tag: ColorTag) => any) | undefined;
26
33
  onDeleteSuggestion?: ((tag: ColorTag) => any) | undefined;
27
34
  }>, {
28
35
  modelValue: ColorTag[];
36
+ label: string | boolean | Component;
29
37
  placeholder: string;
38
+ showErrors: boolean;
39
+ required: boolean;
30
40
  suggestions: ColorTag[];
31
41
  allowDuplicates: boolean;
32
42
  caseSensitive: boolean;
@@ -1,34 +1,28 @@
1
- import { type Component } from 'vue';
2
- import type { FormValidator } from '../../form-validator/FormValidator';
1
+ import { type Component } from "vue";
2
+ import { type FieldTiptapToolbarSticky } from "./Tiptap";
3
3
  type __VLS_Props = {
4
- modelValue: string | number;
5
- field: string;
6
- fv: FormValidator<any>;
4
+ name: string;
5
+ modelValue?: string;
7
6
  label?: string | boolean | Component;
8
7
  placeholder?: string;
9
- errors?: boolean;
10
- disabled?: boolean;
11
- readonly?: boolean;
8
+ toolbarStickyOn?: FieldTiptapToolbarSticky;
9
+ showErrors?: boolean;
12
10
  required?: boolean;
13
11
  class?: any;
14
12
  style?: any;
15
13
  classLabel?: any;
16
- type?: string;
17
- autocomplete?: string;
18
- inputmode?: "email" | "text" | "search" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined;
19
14
  };
20
15
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
21
- "update:modelValue": (v: string | number) => any;
16
+ "update:modelValue": (value: string) => any;
22
17
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
23
- "onUpdate:modelValue"?: ((v: string | number) => any) | undefined;
18
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
24
19
  }>, {
25
- disabled: boolean;
20
+ modelValue: string;
26
21
  label: string | boolean | Component;
27
- type: string;
28
22
  placeholder: string;
29
- errors: boolean;
30
- readonly: boolean;
23
+ showErrors: boolean;
31
24
  required: boolean;
25
+ toolbarStickyOn: FieldTiptapToolbarSticky;
32
26
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
27
  declare const _default: typeof __VLS_export;
34
28
  export default _default;
@@ -0,0 +1,2 @@
1
+ export type FieldTiptapToolbarSticky = "top" | "bottom" | false;
2
+ export declare function normalizeTiptapHtml(value: unknown): string;
@@ -1,8 +1,13 @@
1
1
  export declare const loading: {
2
2
  state: boolean;
3
3
  msg: string;
4
+ keys: string[];
5
+ messages: Record<string, string>;
4
6
  defaultMsg: string[];
5
- on: (msg?: string) => void;
6
- off: () => void;
7
+ on: (key: string, msg?: string) => void;
8
+ off: (key: string) => void;
9
+ clear: () => void;
10
+ sync: () => void;
11
+ makeKey: () => string;
7
12
  run: <T>(fn: () => T | Promise<T>, msg?: string) => Promise<T>;
8
13
  };
@@ -1,18 +1,28 @@
1
- import type { User } from '../Auth/User';
2
1
  export type PushMsgContent = NotificationOptions & {
3
2
  title: string;
4
3
  };
5
4
  export interface PushMsg {
6
5
  reg: ServiceWorkerRegistration | undefined;
6
+ vapidPublicKey: string;
7
7
  VAPID_PUBLIC_KEY: string | undefined;
8
8
  isNotificationSupported: boolean;
9
9
  permission: NotificationPermission;
10
10
  needToAskPermission: boolean;
11
- askPermission(currentUser: User): Promise<NotificationPermission>;
12
- send(currentUser: User, content: string | PushMsgContent): Promise<void>;
11
+ askPermission(_legacyCurrentUser?: unknown): Promise<NotificationPermission>;
12
+ send(content: string | PushMsgContent): Promise<void>;
13
+ send(_legacyCurrentUser: unknown, content: string | PushMsgContent): Promise<void>;
13
14
  sendTo(uid: string, content: string | PushMsgContent): Promise<boolean>;
14
15
  getCurrentFcmToken(): Promise<string | null>;
15
- registerFcmToken(currentUser: User): Promise<string | null>;
16
- removeThisDeviceToken(currentUser: User): Promise<boolean>;
16
+ registerFcmToken(_legacyCurrentUser?: unknown): Promise<string | null>;
17
+ isThisDeviceTokenRegistered(): Promise<boolean>;
18
+ removeThisDeviceToken(_legacyCurrentUser?: unknown): Promise<boolean>;
17
19
  }
20
+ /** Ritorna il token FCM di questo dispositivo (o null se non disponibile). */
21
+ export declare function getCurrentFcmToken(): Promise<string | null>;
22
+ /** Richiede permesso (se necessario) e registra il token FCM su _Auth?.user. */
23
+ export declare function registerFcmToken(_legacyCurrentUser?: unknown): Promise<string | null>;
24
+ /** True se il token di questo device e gia registrato nell'utente corrente. */
25
+ export declare function isThisDeviceTokenRegistered(): Promise<boolean>;
26
+ /** Rimuove il token FCM di questo device dal browser e dall'utente corrente. */
27
+ export declare function removeThisDeviceToken(_legacyCurrentUser?: unknown): Promise<boolean>;
18
28
  export declare const pushMsg: PushMsg;
@@ -48,24 +48,24 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
48
48
  close: typeof close;
49
49
  toggle: typeof toggle;
50
50
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
51
- close: () => any;
52
51
  "update:modelValue": (v: boolean) => any;
52
+ close: () => any;
53
53
  hidden: () => any;
54
54
  show: () => any;
55
+ shown: () => any;
55
56
  hide: () => any;
56
57
  cancel: () => any;
57
- shown: () => any;
58
58
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
59
- onClose?: (() => any) | undefined;
60
59
  "onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
60
+ onClose?: (() => any) | undefined;
61
61
  onHidden?: (() => any) | undefined;
62
62
  onShow?: (() => any) | undefined;
63
+ onShown?: (() => any) | undefined;
63
64
  onHide?: (() => any) | undefined;
64
65
  onCancel?: (() => any) | undefined;
65
- onShown?: (() => any) | undefined;
66
66
  }>, {
67
- scroll: boolean;
68
67
  closeOnOk: boolean;
68
+ scroll: boolean;
69
69
  placement: Placement;
70
70
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
71
71
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,2 +1,2 @@
1
- import { type OffcanvasTab } from '../../stores/store';
1
+ import { type OffcanvasTab } from '../Toolbar/toolbarStore';
2
2
  export declare function useSetOffCanvasTabs(tabs: OffcanvasTab[]): void;
@@ -1,8 +1,10 @@
1
1
  import { Timestamp } from "firebase/firestore";
2
- export declare function reviveTimestamp(json: {
2
+ type TimestampJSON = {
3
3
  seconds: number;
4
4
  nanoseconds: number;
5
5
  type?: string;
6
- } | Timestamp): Timestamp;
7
- export declare function reviveTimestampsDeep(value: any): any;
8
- export declare const serializeTimestamp: (value: any) => any;
6
+ };
7
+ export declare function reviveTimestamp(json: TimestampJSON | Timestamp): Timestamp;
8
+ export declare function reviveTimestampsDeep<T = any>(value: T): T;
9
+ export declare function serializeTimestamp<T = any>(value: T): T;
10
+ export {};