@maltjoy/core-vue 3.20.0 → 3.21.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.
@@ -7,7 +7,10 @@ export declare const TAG_SIZES: TJoyTagSizes[];
7
7
  export type VJoyTagProps = InstanceType<typeof VJoyTag>['$props'];
8
8
  export interface IJoyTagSelected {
9
9
  selected: boolean;
10
- value: string;
10
+ value: VJoyTagProps['value'];
11
+ }
12
+ export interface IJoyTagRemoved {
13
+ value: VJoyTagProps['value'];
11
14
  }
12
15
  export interface IJoyTag extends VJoyTagProps {
13
16
  }
@@ -1,96 +1,65 @@
1
- import { PropType } from 'vue';
2
- import { TJoyTagSizes, IJoyTagSelected } from './JoyTag.types';
3
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
4
- /** Text injected within the tag */
5
- label: {
6
- type: StringConstructor;
7
- };
8
- size: {
9
- type: PropType<TJoyTagSizes>;
10
- default: string;
11
- };
12
- variant: {
13
- type: PropType<"primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special">;
14
- default: string;
15
- };
16
- /** Use v-model:selected */
17
- selected: BooleanConstructor;
18
- selectable: BooleanConstructor;
19
- /** Mandatory, especially if you deal with tags list and v-model */
20
- value: {
21
- type: StringConstructor;
22
- default: string;
23
- };
24
- draggable: {
25
- type: BooleanConstructor;
26
- default: boolean;
27
- };
28
- removable: {
29
- type: BooleanConstructor;
30
- default: boolean;
31
- };
32
- link: {
33
- type: BooleanConstructor;
34
- default: boolean;
35
- };
36
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
1
+ import type { TJoyTagVariants, TJoyTagSizes, IJoyTagSelected, IJoyTagRemoved } from './JoyTag.types';
2
+ interface Props {
3
+ label?: string;
4
+ size?: TJoyTagSizes;
5
+ variant?: TJoyTagVariants;
6
+ draggable?: boolean;
7
+ removable?: boolean;
8
+ selected?: boolean;
9
+ selectable?: boolean;
10
+ link?: boolean;
11
+ value?: string | number;
12
+ }
13
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
14
+ size: string;
15
+ variant: string;
16
+ value: string;
17
+ draggable: boolean;
18
+ link: boolean;
19
+ removable: boolean;
20
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
37
21
  selected: (tag: IJoyTagSelected) => void;
38
- remove: (value: {
39
- value: string;
40
- }) => void;
22
+ remove: (value: IJoyTagRemoved) => void;
41
23
  click: () => void;
42
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
43
- /** Text injected within the tag */
44
- label: {
45
- type: StringConstructor;
46
- };
47
- size: {
48
- type: PropType<TJoyTagSizes>;
49
- default: string;
50
- };
51
- variant: {
52
- type: PropType<"primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special">;
53
- default: string;
54
- };
55
- /** Use v-model:selected */
56
- selected: BooleanConstructor;
57
- selectable: BooleanConstructor;
58
- /** Mandatory, especially if you deal with tags list and v-model */
59
- value: {
60
- type: StringConstructor;
61
- default: string;
62
- };
63
- draggable: {
64
- type: BooleanConstructor;
65
- default: boolean;
66
- };
67
- removable: {
68
- type: BooleanConstructor;
69
- default: boolean;
70
- };
71
- link: {
72
- type: BooleanConstructor;
73
- default: boolean;
74
- };
75
- }>> & {
24
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
25
+ size: string;
26
+ variant: string;
27
+ value: string;
28
+ draggable: boolean;
29
+ link: boolean;
30
+ removable: boolean;
31
+ }>>> & {
76
32
  onClick?: (() => any) | undefined;
77
33
  onSelected?: ((tag: IJoyTagSelected) => any) | undefined;
78
- onRemove?: ((value: {
79
- value: string;
80
- }) => any) | undefined;
34
+ onRemove?: ((value: IJoyTagRemoved) => any) | undefined;
81
35
  }, {
82
36
  link: boolean;
83
37
  size: TJoyTagSizes;
84
38
  variant: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special";
85
- value: string;
86
- selected: boolean;
87
- selectable: boolean;
39
+ value: string | number;
88
40
  draggable: boolean;
89
41
  removable: boolean;
90
42
  }, {}>, {
91
43
  default?(_: {}): any;
92
44
  }>;
93
45
  export default _default;
46
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
47
+ type __VLS_TypePropsToRuntimeProps<T> = {
48
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
49
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
50
+ } : {
51
+ type: import('vue').PropType<T[K]>;
52
+ required: true;
53
+ };
54
+ };
55
+ type __VLS_WithDefaults<P, D> = {
56
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
57
+ default: D[K];
58
+ }> : P[K];
59
+ };
60
+ type __VLS_Prettify<T> = {
61
+ [K in keyof T]: T[K];
62
+ } & {};
94
63
  type __VLS_WithTemplateSlots<T, S> = T & {
95
64
  new (): {
96
65
  $slots: S;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @return {Boolean}
3
+ * @param {String[] | string} value
4
+ */
5
+ export declare function checkEmailsValidity(value: string[] | string): boolean;
@@ -0,0 +1,4 @@
1
+ export declare enum TAGS_INPUT_ERRORS {
2
+ DUPLICATED_ENTRY = "DUPLICATED_ENTRY",
3
+ INVALID_EMAIL = "INVALID_EMAIL"
4
+ }
@@ -0,0 +1,97 @@
1
+ import type { Ref } from 'vue';
2
+ import { TAGS_INPUT_ERRORS } from './JoyTagsInput.types';
3
+ import type { TJoyTagSizes } from '../JoyTag/JoyTag.types';
4
+ declare const _default: <T extends string>(__VLS_props: {
5
+ size?: TJoyTagSizes | undefined;
6
+ name?: string | undefined;
7
+ variant?: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | undefined;
8
+ invalid?: boolean | undefined;
9
+ modelValue?: T[] | undefined;
10
+ "onUpdate:modelValue"?: ((values: T[]) => any) | undefined;
11
+ placeholder?: string | undefined;
12
+ "onValidation:error"?: ((type: TAGS_INPUT_ERRORS) => any) | undefined;
13
+ validation?: "none" | "email" | undefined;
14
+ duplicationError?: string | undefined;
15
+ invalidEmailError?: string | undefined;
16
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
17
+ attrs: any;
18
+ slots: {
19
+ default?(_: {}): any;
20
+ tag?(_: {
21
+ name: T;
22
+ }): any;
23
+ };
24
+ emit: {
25
+ (e: 'update:modelValue', values: T[]): void;
26
+ (e: 'validation:error', type: TAGS_INPUT_ERRORS): void;
27
+ };
28
+ } | undefined, __VLS_expose?: ((exposed: import("vue").ShallowUnwrapRef<{
29
+ isInvalid: Ref<boolean>;
30
+ hasDuplicates: () => boolean;
31
+ }>) => void) | undefined, __VLS_setup?: Promise<{
32
+ props: {
33
+ size?: TJoyTagSizes | undefined;
34
+ name?: string | undefined;
35
+ variant?: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | undefined;
36
+ invalid?: boolean | undefined;
37
+ modelValue?: T[] | undefined;
38
+ "onUpdate:modelValue"?: ((values: T[]) => any) | undefined;
39
+ placeholder?: string | undefined;
40
+ "onValidation:error"?: ((type: TAGS_INPUT_ERRORS) => any) | undefined;
41
+ validation?: "none" | "email" | undefined;
42
+ duplicationError?: string | undefined;
43
+ invalidEmailError?: string | undefined;
44
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
45
+ expose(exposed: import("vue").ShallowUnwrapRef<{
46
+ isInvalid: Ref<boolean>;
47
+ hasDuplicates: () => boolean;
48
+ }>): void;
49
+ attrs: any;
50
+ slots: {
51
+ default?(_: {}): any;
52
+ tag?(_: {
53
+ name: T;
54
+ }): any;
55
+ };
56
+ emit: {
57
+ (e: 'update:modelValue', values: T[]): void;
58
+ (e: 'validation:error', type: TAGS_INPUT_ERRORS): void;
59
+ };
60
+ }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
61
+ [key: string]: any;
62
+ }> & {
63
+ __ctx?: {
64
+ props: {
65
+ size?: TJoyTagSizes | undefined;
66
+ name?: string | undefined;
67
+ variant?: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | undefined;
68
+ invalid?: boolean | undefined;
69
+ modelValue?: T[] | undefined;
70
+ "onUpdate:modelValue"?: ((values: T[]) => any) | undefined;
71
+ placeholder?: string | undefined;
72
+ "onValidation:error"?: ((type: TAGS_INPUT_ERRORS) => any) | undefined;
73
+ validation?: "none" | "email" | undefined;
74
+ duplicationError?: string | undefined;
75
+ invalidEmailError?: string | undefined;
76
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
77
+ expose(exposed: import("vue").ShallowUnwrapRef<{
78
+ isInvalid: Ref<boolean>;
79
+ hasDuplicates: () => boolean;
80
+ }>): void;
81
+ attrs: any;
82
+ slots: {
83
+ default?(_: {}): any;
84
+ tag?(_: {
85
+ name: T;
86
+ }): any;
87
+ };
88
+ emit: {
89
+ (e: 'update:modelValue', values: T[]): void;
90
+ (e: 'validation:error', type: TAGS_INPUT_ERRORS): void;
91
+ };
92
+ } | undefined;
93
+ };
94
+ export default _default;
95
+ type __VLS_Prettify<T> = {
96
+ [K in keyof T]: T[K];
97
+ } & {};
@@ -1,6 +1,6 @@
1
1
  import { PropType } from 'vue';
2
2
  import { TJoyTagsListModel, TJoyTagsList } from './JoyTagsList.types';
3
- import { IJoyTagSelected } from '../JoyTag/JoyTag.types';
3
+ import { IJoyTagRemoved, IJoyTagSelected } from '../JoyTag/JoyTag.types';
4
4
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
5
5
  align: {
6
6
  type: PropType<"left" | "right" | "center">;
@@ -31,7 +31,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
31
31
  };
32
32
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
33
  "update:modelValue": (tags: TJoyTagsListModel) => void;
34
- removeTag: (tagValue: string) => void;
34
+ removeTag: (tagValue: string | number | undefined) => void;
35
35
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
36
36
  align: {
37
37
  type: PropType<"left" | "right" | "center">;
@@ -62,12 +62,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
62
62
  };
63
63
  }>> & {
64
64
  "onUpdate:modelValue"?: ((tags: TJoyTagsListModel) => any) | undefined;
65
- onRemoveTag?: ((tagValue: string) => any) | undefined;
65
+ onRemoveTag?: ((tagValue: string | number | undefined) => any) | undefined;
66
66
  }, {
67
67
  variant: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special";
68
68
  align: "left" | "right" | "center";
69
- selectable: boolean;
70
69
  removable: boolean;
70
+ selectable: boolean;
71
71
  tags: TJoyTagsList;
72
72
  }, {}>, {
73
73
  tag?(_: {
@@ -77,7 +77,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
77
77
  link?: boolean | undefined;
78
78
  size?: import("../JoyTag/JoyTag.types").TJoyTagSizes | undefined;
79
79
  variant?: "primary" | "secondary" | "important" | "inactive" | "pending" | "pricing" | "special" | undefined;
80
- value?: string | undefined;
80
+ value?: string | number | undefined;
81
81
  draggable?: boolean | undefined;
82
82
  label?: string | undefined;
83
83
  style?: unknown;
@@ -126,9 +126,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
126
126
  [key: string]: any;
127
127
  }>) => void)[] | undefined;
128
128
  onSelected?: ((tag: IJoyTagSelected) => any) | undefined;
129
- onRemove?: ((value: {
130
- value: string;
131
- }) => any) | undefined;
129
+ onRemove?: ((value: IJoyTagRemoved) => any) | undefined;
132
130
  }): any;
133
131
  }>;
134
132
  export default _default;
@@ -29,6 +29,7 @@ export * from './JoySeparator/JoySeparator.types';
29
29
  export * from './JoySnackbar/JoySnackbar.types';
30
30
  export * from './JoySpinner/JoySpinner.types';
31
31
  export * from './JoyTag/JoyTag.types';
32
+ export * from './JoyTagsInput/JoyTagsInput.types';
32
33
  export * from './JoyTagsList/JoyTagsList.types';
33
34
  export * from './JoyTemplate/JoyTemplate.types';
34
35
  export * from './JoyText/JoyText.types';
@@ -54,6 +54,7 @@ import { default as VJoyStepper } from './JoyStepper/VJoyStepper.vue';
54
54
  import { default as VJoyTab } from './JoyTab/VJoyTab.vue';
55
55
  import { default as VJoyTabs } from './JoyTabs/VJoyTabs.vue';
56
56
  import { default as VJoyTag } from './JoyTag/VJoyTag.vue';
57
+ import { default as VJoyTagsInput } from './JoyTagsInput/VJoyTagsInput.vue';
57
58
  import { default as VJoyTagsList } from './JoyTagsList/VJoyTagsList.vue';
58
59
  import { default as VJoyTemplate } from './JoyTemplate/VJoyTemplate.vue';
59
60
  import { default as VJoyTemplateShape } from './JoyTemplateShape/VJoyTemplateShape.vue';
@@ -63,4 +64,4 @@ import { default as VJoyToggle } from './JoyToggle/VJoyToggle.vue';
63
64
  import { default as VJoyTooltip } from './JoyTooltip/VJoyTooltip.vue';
64
65
  import { default as VJoyUserCard } from './JoyUserCard/VJoyUserCard.vue';
65
66
  import { default as VJoyWrapper } from './JoyWrapper/VJoyWrapper.vue';
66
- export { VJoyAvailability, VJoyAvatar, VJoyAvatarsList, VJoyBadge, VJoyBadgeLevel, VJoyBlockSkeleton, VJoyBottomSheet, VJoyBottomSheetTrigger, VJoyButton, VJoyCheckbox, VJoyCollapse, VJoyCollapseItem, VJoyCompanyAvatar, VJoyCounter, VJoyDialog, VJoyDialogTrigger, VJoyDividerCta, VJoyDrawer, VJoyDrawerTrigger, VJoyDropdown, VJoyDropdownList, VJoyFilterBar, VJoyFilterBarButton, VJoyFooter, VJoyFormError, VJoyFormFieldSkeleton, VJoyFunnel, VJoyHeader, VJoyHighlight, VJoyIcon, VJoyIndicator, VJoyIndicators, VJoyInput, VJoyLabel, VJoyLink, VJoyMenu, VJoyMultiCheckbox, VJoyPagination, VJoyPanel, VJoyPanelSection, VJoyProgressBar, VJoyRadio, VJoyRadioGroup, VJoyRatingStars, VJoyScreenLoader, VJoySelect, VJoySelectableItem, VJoySelectableItemGroup, VJoySeparator, VJoySnackbar, VJoySpinner, VJoyStep, VJoyStepper, VJoyTab, VJoyTabs, VJoyTag, VJoyTagsList, VJoyTemplate, VJoyTemplateShape, VJoyText, VJoyTextarea, VJoyToggle, VJoyTooltip, VJoyUserCard, VJoyWrapper, };
67
+ export { VJoyAvailability, VJoyAvatar, VJoyAvatarsList, VJoyBadge, VJoyBadgeLevel, VJoyBlockSkeleton, VJoyBottomSheet, VJoyBottomSheetTrigger, VJoyButton, VJoyCheckbox, VJoyCollapse, VJoyCollapseItem, VJoyCompanyAvatar, VJoyCounter, VJoyDialog, VJoyDialogTrigger, VJoyDividerCta, VJoyDrawer, VJoyDrawerTrigger, VJoyDropdown, VJoyDropdownList, VJoyFilterBar, VJoyFilterBarButton, VJoyFooter, VJoyFormError, VJoyFormFieldSkeleton, VJoyFunnel, VJoyHeader, VJoyHighlight, VJoyIcon, VJoyIndicator, VJoyIndicators, VJoyInput, VJoyLabel, VJoyLink, VJoyMenu, VJoyMultiCheckbox, VJoyPagination, VJoyPanel, VJoyPanelSection, VJoyProgressBar, VJoyRadio, VJoyRadioGroup, VJoyRatingStars, VJoyScreenLoader, VJoySelect, VJoySelectableItem, VJoySelectableItemGroup, VJoySeparator, VJoySnackbar, VJoySpinner, VJoyStep, VJoyStepper, VJoyTab, VJoyTabs, VJoyTag, VJoyTagsInput, VJoyTagsList, VJoyTemplate, VJoyTemplateShape, VJoyText, VJoyTextarea, VJoyToggle, VJoyTooltip, VJoyUserCard, VJoyWrapper, };