@wisemen/wise-crm 0.0.0-alpha.2 → 0.0.0-alpha.4

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 (116) hide show
  1. package/dist/{ActivityIcon-B4QMplig.js → ActivityIcon-D44t-BSn.js} +1 -1
  2. package/dist/{BookIcon-ja89qLFy.js → BookIcon-CutBdbC0.js} +1 -1
  3. package/dist/{BuildingIcon-BNiKxoS8.js → BuildingIcon-ElARxIlR.js} +1 -1
  4. package/dist/{BuildingsIcon-LXxgUobG.js → BuildingsIcon-C0MbMDz1.js} +1 -1
  5. package/dist/{BusinessDetailView-97LmpN-Y.js → BusinessDetailView-i3MZXuUe.js} +2 -2
  6. package/dist/{ChevronDownIcon-i-90_fM4.js → ChevronDownIcon-DZH2vgen.js} +1 -1
  7. package/dist/{ClockPlusIcon-CXcj_h14.js → ClockPlusIcon-CgSXl6Sx.js} +1 -1
  8. package/dist/{CopyIcon-X7mbg7w2.js → CopyIcon-BmIRbs5V.js} +1 -1
  9. package/dist/CrmDetailView.vue_vue_type_script_setup_true_lang-CySrktmd.js +129 -0
  10. package/dist/DealDetailView-CUl42ZTd.js +75 -0
  11. package/dist/DealIcon-C6Px3HJO.js +21 -0
  12. package/dist/{EditWithLineIcon-zoeavQul.js → EditWithLineIcon-CwA3jPQp.js} +1 -1
  13. package/dist/{FileIcon-Dh5IUaK-.js → FileIcon-7MDmblin.js} +1 -1
  14. package/dist/{FilterLinesIcon-DhBdlDSi.js → FilterLinesIcon-Da3BV-iT.js} +1 -1
  15. package/dist/{HashIcon-BWO2mp2V.js → HashIcon-BpSFNhr7.js} +1 -1
  16. package/dist/{HomeFilledIcon-CjVPEU-R.js → HomeFilledIcon-HJC8cV41.js} +1 -1
  17. package/dist/{IndividualDetailView-DxUmJizN.js → IndividualDetailView-nnbBnmG8.js} +2 -2
  18. package/dist/{LayersTreeIcon-BXTML4tp.js → LayersTreeIcon-BgHcjuI_.js} +1 -1
  19. package/dist/{LinkExternalIcon-Ctv8kseX.js → LinkExternalIcon-C_UlFHmu.js} +1 -1
  20. package/dist/{LocationPinIcon-BpTU0qXx.js → LocationPinIcon-CLrEHNef.js} +1 -1
  21. package/dist/{MailIcon-BlZ-p-Uq.js → MailIcon-k_vWPmr0.js} +1 -1
  22. package/dist/{MobilePhoneIcon-CSSxC2fl.js → MobilePhoneIcon-jp_Sdqnw.js} +1 -1
  23. package/dist/{PhoneIcon-FrfZPlie.js → PhoneIcon-NfSpRTNZ.js} +1 -1
  24. package/dist/{SendIcon-DAxhHVkT.js → SendIcon-CmfMQQhD.js} +1 -1
  25. package/dist/{StarOutlineIcon-DB2D7b10.js → StarOutlineIcon-CyWY8Cj8.js} +1 -1
  26. package/dist/{StarYellowIcon-BfY68bs3.js → StarYellowIcon-CyNBsGIx.js} +1 -1
  27. package/dist/{TimeLineMarkerIcon-ugEqqaeO.js → TimeLineMarkerIcon-jCDSGnG-.js} +1 -1
  28. package/dist/{TrashIcon-D3NQhXP1.js → TrashIcon-BDgKB4RM.js} +1 -1
  29. package/dist/{UserCircleIcon-D6yMz8IH.js → UserCircleIcon-OKdaanJV.js} +1 -1
  30. package/dist/{UserIcon-Ckrk_Z2w.js → UserIcon-CLG6DEo_.js} +1 -1
  31. package/dist/{VerticalDotsIcon-BgXBCW_H.js → VerticalDotsIcon--_VYFMTY.js} +1 -1
  32. package/dist/{WalletIcon-CGe2UaGU.js → WalletIcon-7sJZlclI.js} +1 -1
  33. package/dist/api/mutations/deal/dealContactPersonUpdate.mutation.d.ts +10 -0
  34. package/dist/api/mutations/deal/dealCreate.mutation.d.ts +11 -0
  35. package/dist/api/mutations/deal/dealLinkContactPerson.mutation.d.ts +10 -0
  36. package/dist/api/mutations/deal/dealSetPrimaryContactPerson.mutation.d.ts +8 -0
  37. package/dist/api/mutations/deal/dealUnlinkContactPerson.mutation.d.ts +8 -0
  38. package/dist/api/mutations/individual/individualGrant.mutation.d.ts +8 -0
  39. package/dist/api/queries/board/boardColumnsIndex.query.d.ts +2 -0
  40. package/dist/api/queries/business/businessIndex.query.d.ts +1 -1
  41. package/dist/api/queries/cbe/cbeEnterpriseSearchByTerm.query.d.ts +3 -0
  42. package/dist/api/queries/deal/dealContactPersonDetail.query.d.ts +5 -0
  43. package/dist/api/queries/deal/dealDetail.query.d.ts +4 -0
  44. package/dist/api/queries/deal/dealIndex.query.d.ts +220 -0
  45. package/dist/api/services/board.service.d.ts +4 -0
  46. package/dist/api/services/cbe.service.d.ts +5 -0
  47. package/dist/api/services/deal.service.d.ts +22 -0
  48. package/dist/api/services/individual.service.d.ts +2 -0
  49. package/dist/business/BusinessAutocomplete.vue.d.ts +22 -0
  50. package/dist/client/apiErrorCode.gen.d.ts +6 -0
  51. package/dist/client/sdk.gen.d.ts +5 -1
  52. package/dist/client/types.gen.d.ts +210 -8
  53. package/dist/client/zod.gen.d.ts +373 -60
  54. package/dist/components/app/dialog/AppDialogPaddingContainer.vue.d.ts +12 -0
  55. package/dist/components/app/dialog/AppDialogStepper.vue.d.ts +20 -0
  56. package/dist/components/app/group/AppGroup.vue.d.ts +1 -1
  57. package/dist/components/cbe/CbeAutocomplete.vue.d.ts +16 -0
  58. package/dist/components/entity-autocomplete/EntityAutocomplete.vue.d.ts +42 -0
  59. package/dist/components/info-dialog/InfoDialogHeaderCard.vue.d.ts +11 -1
  60. package/dist/composables/keyset-infinite-query/keysetInfiniteQuery.composable.d.ts +234 -0
  61. package/dist/composables/offset-infinite-query/offsetInfiniteQuery.composable.d.ts +234 -0
  62. package/dist/composables/stepper/stepper.composable.d.ts +18 -0
  63. package/dist/deal/components/DealCreateDialog.vue.d.ts +6 -0
  64. package/dist/deal/components/DealCreateDialogBusinessCreateForm.vue.d.ts +8 -0
  65. package/dist/deal/components/DealCreateDialogExtraInfoForm.vue.d.ts +7 -0
  66. package/dist/deal/components/DealCreateDialogSelectBusinessForm.vue.d.ts +11 -0
  67. package/dist/deal/components/DealCreateDialogStepperForm.vue.d.ts +14 -0
  68. package/dist/deal/components/DealOverviewColumn.vue.d.ts +10 -0
  69. package/dist/deal/components/DealOverviewColumnItem.vue.d.ts +10 -0
  70. package/dist/deal/routes/deal.routes.d.ts +3 -0
  71. package/dist/deal/views/DealDetailSidebarProvider.vue.d.ts +6 -0
  72. package/dist/deal/views/DealDetailView.vue.d.ts +2 -0
  73. package/dist/deal/views/DealOverview.vue.d.ts +2 -0
  74. package/dist/dialogs/contact-create/components/BusinessCreateFormFields.vue.d.ts +7 -0
  75. package/dist/icons/DealIcon.vue.d.ts +2 -0
  76. package/dist/icons/icon.d.ts +1 -0
  77. package/dist/{index-DmadkSOr.js → index-Dtk-GIav.js} +10529 -8356
  78. package/dist/index.d.ts +59 -0
  79. package/dist/index.js +9 -8
  80. package/dist/individual/IndividualAutocomplete.vue.d.ts +21 -0
  81. package/dist/models/board/boardColumn.model.d.ts +13 -0
  82. package/dist/models/board/boardColumn.transformer.d.ts +5 -0
  83. package/dist/models/board/boardColumnDto.model.d.ts +6 -0
  84. package/dist/models/board/boardColumnUuid.model.d.ts +3 -0
  85. package/dist/models/business/individualItem.model.d.ts +6 -0
  86. package/dist/models/cbe/cbeEnterpriseNumber.model.d.ts +3 -0
  87. package/dist/models/cbe/search/cbeEnterpriseItem.model.d.ts +6 -0
  88. package/dist/models/cbe/search/cbeEnterpriseSearch.model.d.ts +15 -0
  89. package/dist/models/cbe/search/cbeEnterpriseSearch.transformer.d.ts +5 -0
  90. package/dist/models/cbe/search/cbeEnterpriseSearchDto.model.d.ts +2 -0
  91. package/dist/models/deal/contact-person/dealContactPerson.transformer.d.ts +5 -0
  92. package/dist/models/deal/contact-person/dealContactPersonDetail.model.d.ts +13 -0
  93. package/dist/models/deal/contact-person/dealContactPersonDetailDto.model.d.ts +2 -0
  94. package/dist/models/deal/create/dealCreate.transformer.d.ts +5 -0
  95. package/dist/models/deal/create/dealCreateDto.model.d.ts +2 -0
  96. package/dist/models/deal/create/dealCreateForm.model.d.ts +14 -0
  97. package/dist/models/deal/dealLanguageEnum.model.d.ts +6 -0
  98. package/dist/models/deal/dealSourceEnum.model.d.ts +6 -0
  99. package/dist/models/deal/dealUuid.model.d.ts +3 -0
  100. package/dist/models/deal/detail/dealDetail.model.d.ts +28 -0
  101. package/dist/models/deal/detail/dealDetail.transformer.d.ts +5 -0
  102. package/dist/models/deal/detail/dealDetailDto.model.d.ts +2 -0
  103. package/dist/models/deal/index/dealIndex.model.d.ts +24 -0
  104. package/dist/models/deal/index/dealIndex.transformer.d.ts +5 -0
  105. package/dist/models/deal/index/dealIndexDto.model.d.ts +2 -0
  106. package/dist/models/deal/index/dealIndexPaginationDto.model.d.ts +3 -0
  107. package/dist/models/deal/index/dealIndexQueryParams.model.d.ts +6 -0
  108. package/dist/models/deal/index/dealIndexQueryParams.tranformer.d.ts +6 -0
  109. package/dist/plugins/i18n.plugin.d.ts +58 -0
  110. package/dist/routes/crmRoutes.composable.d.ts +1 -0
  111. package/dist/types/pagination.type.d.ts +37 -0
  112. package/dist/types/query.type.d.ts +21 -0
  113. package/dist/types/queryKey.type.d.ts +18 -0
  114. package/dist/utils/vatNumber.util.d.ts +1 -1
  115. package/package.json +3 -2
  116. package/dist/CrmDetailView.vue_vue_type_script_setup_true_lang-C_VsrCJX.js +0 -117
@@ -0,0 +1,37 @@
1
+ import type { QueryParams } from '@/types/query.type';
2
+ export interface OffsetPaginationParams {
3
+ limit: number;
4
+ offset: number;
5
+ }
6
+ export type OffsetPagination<T extends QueryParams = Record<string, never>> = {
7
+ pagination: OffsetPaginationParams;
8
+ } & T;
9
+ export interface KeysetPaginationParams {
10
+ key?: any;
11
+ limit: number;
12
+ }
13
+ export type KeysetPagination<T extends QueryParams> = {
14
+ pagination: KeysetPaginationParams;
15
+ } & T;
16
+ export interface OffsetPaginationResponse<TData> {
17
+ data: TData[];
18
+ meta: {
19
+ limit: number;
20
+ offset: number;
21
+ total: number;
22
+ };
23
+ }
24
+ export interface KeysetPaginationResponse<TData> {
25
+ data: TData[];
26
+ meta: {
27
+ next: unknown;
28
+ };
29
+ }
30
+ export interface PaginatedDataDto<TSchema> {
31
+ items: TSchema[];
32
+ meta: {
33
+ limit: number;
34
+ offset: number;
35
+ total: number;
36
+ };
37
+ }
@@ -0,0 +1,21 @@
1
+ import type { Ref } from 'vue';
2
+ import type { Sort } from '@/composables/sort/sort.composable';
3
+ export interface QueryParams {
4
+ filters?: Record<string, any>;
5
+ search?: string;
6
+ sort?: Sort[];
7
+ }
8
+ export interface WithSearchQuery {
9
+ search: string;
10
+ }
11
+ export interface WithSortQuery<TKeys extends string> {
12
+ sort: Sort<TKeys>[];
13
+ }
14
+ export interface WithFilterQuery<TFilters extends Record<string, any>> {
15
+ filters: TFilters;
16
+ }
17
+ export interface InfiniteQueryOptions<TParams> {
18
+ params: {
19
+ [K in keyof TParams]: Ref<TParams[K]>;
20
+ };
21
+ }
@@ -5,24 +5,42 @@ import type { WiseCrmBusinessUuid, WiseCrmIndividualUuid } from '@/index';
5
5
  import type { ActivityIndexPagination } from '@/models/activity/activityIndexPagination.model';
6
6
  import type { BillingInformationUuid } from '@/models/billing-information/billingInformationUuid.model';
7
7
  import type { BusinessIndexPagination } from '@/models/business/index/businessIndexPagination.model';
8
+ import type { DealUuid } from '@/models/deal/dealUuid.model';
9
+ import type { DealIndexQueryParams } from '@/models/deal/index/dealIndexQueryParams.model';
8
10
  import type { IndividualIndexPagination } from '@/models/individual/index/individualIndexPagination.model';
11
+ import type { IndividualUuid } from '@/models/individual/individualUuid.model';
9
12
  import type { RecentEntitiesPagination } from '@/models/recent-entities/recentEntitiesPagination.model';
13
+ import type { InfiniteQueryOptions } from '@/types/query.type';
10
14
  interface WiseCrmQueryKeys {
11
15
  billingInformationDetail: {
12
16
  billingInformationUuid: ComputedRef<BillingInformationUuid | null>;
13
17
  };
18
+ boardColumnsIndex: void;
14
19
  businessActivityIndex: {
15
20
  paginationOptions?: ComputedRef<PaginationOptions<ActivityIndexPagination>>;
16
21
  };
17
22
  businessIndex: {
18
23
  paginationOptions?: ComputedRef<PaginationOptions<BusinessIndexPagination>>;
19
24
  };
25
+ cbeEnterpriseSearchByTerm: {
26
+ searchTerm: ComputedRef<string | null>;
27
+ };
20
28
  contactPersonDetail: {
21
29
  contactPersonUuid: ComputedRef<WiseCrmIndividualUuid | null>;
22
30
  };
23
31
  customFieldDefinitionIndex: {
24
32
  entityType: EntityType;
25
33
  };
34
+ dealContactPersonDetail: {
35
+ contactPersonUuid: ComputedRef<IndividualUuid>;
36
+ dealUuid: ComputedRef<DealUuid>;
37
+ };
38
+ dealDetail: {
39
+ dealUuid: ComputedRef<DealUuid>;
40
+ };
41
+ dealIndex: {
42
+ queryParams?: InfiniteQueryOptions<DealIndexQueryParams>['params'];
43
+ };
26
44
  globalSearch: {
27
45
  collections: ComputedRef<GlobalSearchCollectionName[]>;
28
46
  search: ComputedRef<string>;
@@ -1,4 +1,4 @@
1
1
  import type { VatNumber } from '@/models/vat-number/vatNumber.model';
2
2
  export declare class VatNumberUtil {
3
- static format(vatNumber: VatNumber): string;
3
+ static format(vatNumber: VatNumber | null): string;
4
4
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wisemen/wise-crm",
3
3
  "type": "module",
4
- "version": "0.0.0-alpha.2",
4
+ "version": "0.0.0-alpha.4",
5
5
  "private": false,
6
6
  "description": "CRM frontend package with Vue 3 components, composables and types",
7
7
  "author": "Wisemen",
@@ -37,8 +37,9 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@number-flow/vue": "0.4.8",
40
- "@tanstack/vue-query": "^5.83.1",
40
+ "@tanstack/vue-query": "^5.87.4",
41
41
  "@vueuse/core": "^13.9.0",
42
+ "@vueuse/router": "13.9.0",
42
43
  "@wisemen/vue-core-query": "0.0.47",
43
44
  "dayjs": "^1.11.13",
44
45
  "formango": "^3.1.0",
@@ -1,117 +0,0 @@
1
- import { t as S, u as j, o as B, c as E } from "./index-DmadkSOr.js";
2
- import { customRef as $, toValue as d, nextTick as D, watch as L, defineComponent as N, createElementBlock as R, openBlock as b, renderSlot as q, createVNode as m, withCtx as _, createElementVNode as p, unref as a, Fragment as z, renderList as I, createBlock as M, createTextVNode as O, toDisplayString as P } from "vue";
3
- import { useRoute as F, useRouter as G, RouterView as K } from "vue-router";
4
- import { VcIconButton as Q, VcRouterLinkTabs as W, VcRouterLinkTabsItem as A } from "@wisemen/vue-core-components";
5
- const h = /* @__PURE__ */ new WeakMap();
6
- function re(n, i, u = {}) {
7
- const {
8
- mode: y = "replace",
9
- route: l = F(),
10
- router: e = G(),
11
- transform: s
12
- } = u;
13
- let c = (r) => r, w = (r) => r;
14
- typeof s == "function" ? c = s : s && (s.get && (c = s.get), s.set && (w = s.set)), h.has(e) || h.set(e, /* @__PURE__ */ new Map());
15
- const f = h.get(e);
16
- let o = l.params[n];
17
- S(() => {
18
- o = void 0;
19
- });
20
- let g;
21
- const k = $((r, x) => (g = x, {
22
- get() {
23
- return r(), c(o !== void 0 && o !== "" ? o : d(i));
24
- },
25
- set(t) {
26
- t = w(t), o !== t && (o = t === d(i) || t === null ? void 0 : t, f.set(n, t === d(i) || t === null ? void 0 : t), x(), D(() => {
27
- if (f.size === 0)
28
- return;
29
- const v = Object.fromEntries(f.entries());
30
- f.clear();
31
- const { params: T, query: C, hash: V } = l;
32
- e[d(y)]({
33
- params: {
34
- ...T,
35
- ...v
36
- },
37
- query: C,
38
- hash: V
39
- });
40
- }));
41
- }
42
- }));
43
- return L(
44
- () => l.params[n],
45
- (r) => {
46
- o !== c(r) && (o = r, g());
47
- },
48
- { flush: "sync" }
49
- ), k;
50
- }
51
- const H = { class: "flex h-dvh flex-1" }, J = { class: "p-sm flex h-full w-full flex-1 justify-center overflow-hidden" }, U = { class: "mt-xl p-lg absolute top-0 right-6 z-1 flex w-full justify-end" }, X = { class: "flex w-full flex-col" }, Y = { class: "h-full w-full overflow-y-auto" }, se = /* @__PURE__ */ N({
52
- __name: "CrmDetailView",
53
- props: {
54
- entityType: {},
55
- tabs: {}
56
- },
57
- setup(n) {
58
- const i = n, u = j();
59
- return B("Escape", () => {
60
- u.goToReturnRoute();
61
- }), (y, l) => (b(), R("div", H, [
62
- q(y.$slots, "sidebar"),
63
- m(E, {
64
- "entity-type": n.entityType,
65
- class: "relative flex-1"
66
- }, {
67
- default: _(() => [
68
- p("div", J, [
69
- p("div", U, [
70
- m(a(Q), {
71
- icon: "close",
72
- label: "Close",
73
- variant: "tertiary",
74
- onClick: l[0] || (l[0] = (e) => a(u).goToReturnRoute())
75
- })
76
- ]),
77
- p("div", X, [
78
- m(a(W), {
79
- "class-config": {
80
- base: "w-full border-none rounded-full flex justify-center pb-lg pt-lg !overflow-visible",
81
- list: "rounded-full w-fit",
82
- item: "data-[state=active]:text-white",
83
- indicator: "rounded-full bg-gradient-to-b from-brand-900 to-brand-950",
84
- scrollContainer: "!p-xs bg-white shadow-lg rounded-full border border-primary/50"
85
- },
86
- variant: "button-border"
87
- }, {
88
- items: _(() => [
89
- (b(!0), R(z, null, I(i.tabs, (e) => (b(), M(a(A), {
90
- key: e.label,
91
- to: {
92
- name: e.to
93
- }
94
- }, {
95
- default: _(() => [
96
- O(P(e.label), 1)
97
- ]),
98
- _: 2
99
- }, 1032, ["to"]))), 128))
100
- ]),
101
- _: 1
102
- }),
103
- p("div", Y, [
104
- m(a(K))
105
- ])
106
- ])
107
- ])
108
- ]),
109
- _: 1
110
- }, 8, ["entity-type"])
111
- ]));
112
- }
113
- });
114
- export {
115
- se as _,
116
- re as u
117
- };