pat-shared-components 0.5.0-beta.7 → 0.9.0-beta.2

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 (98) hide show
  1. package/README.md +26 -1
  2. package/dist/index.es.js +8932 -25824
  3. package/dist/index.umd.js +138 -81
  4. package/dist/style.css +1 -1
  5. package/dist/types/src/components/Public/TestResultViewer/Shared/TestExpansion.vue.d.ts +80 -0
  6. package/dist/types/src/components/Public/TestResultViewer/Templates/GXNT1/GXNT1.vue.d.ts +23 -0
  7. package/dist/types/src/components/Public/TestResultViewer/Templates/HPV/HPV.vue.d.ts +23 -0
  8. package/dist/types/{components/BookingDetail/SampleCollectionInfo.vue.d.ts → src/components/Public/TestResultViewer/Templates/HPV/WhatNext.vue.d.ts} +2 -2
  9. package/dist/types/{components/TestResult/BookAppointmentModal/BookAppointment/DateItem.vue.d.ts → src/components/Public/TestResultViewer/Templates/HPV/components/HPVResult.vue.d.ts} +2 -3
  10. package/dist/types/{components/BookingDetail/TotalPayment.vue.d.ts → src/components/Public/TestResultViewer/Templates/HPV/components/HighRiskDetail.vue.d.ts} +2 -1
  11. package/dist/types/{components/Shared/PatientName.vue.d.ts → src/components/Public/TestResultViewer/Templates/HPV/components/LowRiskDetail.vue.d.ts} +2 -1
  12. package/dist/types/src/components/Public/TestResultViewer/Templates/HPV/components/TestTooltipIcon.vue.d.ts +14 -0
  13. package/dist/types/src/components/Public/TestResultViewer/Templates/STD/STD.vue.d.ts +23 -0
  14. package/dist/types/{components/BookingDetail/BasicInfoSection.vue.d.ts → src/components/Public/TestResultViewer/Templates/Shared/CategoryItem/CategoryHeader.vue.d.ts} +13 -7
  15. package/dist/types/{components/BookingDetail/BookingStatusComponent.vue.d.ts → src/components/Public/TestResultViewer/Templates/Shared/CategoryItem/CategoryItem.vue.d.ts} +6 -3
  16. package/dist/types/{components/TestResult/BookAppointmentModal/BookAppointment/BookAppointment.vue.d.ts → src/components/Public/TestResultViewer/Templates/Shared/CategoryItem/TestExtraInfo.vue.d.ts} +13 -10
  17. package/dist/types/{components/BookingDetail/DiagLogo.vue.d.ts → src/components/Public/TestResultViewer/Templates/Shared/CategoryItem/TestHeader/DiagValue.vue.d.ts} +5 -4
  18. package/dist/types/{components/BookingDetail/BookingNote.vue.d.ts → src/components/Public/TestResultViewer/Templates/Shared/CategoryItem/TestHeader/ImagingValue.vue.d.ts} +4 -4
  19. package/dist/types/{components/TestResult/Mobile/ResultTab/TestResultListItem.vue.d.ts → src/components/Public/TestResultViewer/Templates/Shared/CategoryItem/TestHeader/TestHeader.vue.d.ts} +7 -5
  20. package/dist/types/{components/TestResult/Mobile/ResultTab/TestResultDetail/UpcomingAppointment.vue.d.ts → src/components/Public/TestResultViewer/Templates/Shared/CategoryItem/TestHistory.vue.d.ts} +2 -1
  21. package/dist/types/{components/BookingDetail/BookingNumber.vue.d.ts → src/components/Public/TestResultViewer/Templates/Shared/CategoryItem/TestItem.vue.d.ts} +6 -5
  22. package/dist/types/{components/BookingDetail/BasicInfo.vue.d.ts → src/components/Public/TestResultViewer/Templates/Shared/CategoryItem/TestValueLabelRow.vue.d.ts} +13 -6
  23. package/dist/types/{components/BookingDetail/BookingResultStatus.vue.d.ts → src/components/Public/TestResultViewer/Templates/Shared/CategoryItem/TestValueNumeric/RangeGroup.vue.d.ts} +24 -7
  24. package/dist/types/src/components/Public/TestResultViewer/Templates/Shared/CategoryItem/TestValueNumeric/TestValueNumeric.vue.d.ts +48 -0
  25. package/dist/types/{components/BookingDetail/PaymentStatusComponent.vue.d.ts → src/components/Public/TestResultViewer/Templates/Shared/CategoryItem/TestValueText.vue.d.ts} +5 -2
  26. package/dist/types/{components/Shared/CtaButton.vue.d.ts → src/components/Public/TestResultViewer/Templates/Shared/CategoryItem/TestValueXML.vue.d.ts} +6 -7
  27. package/dist/types/src/components/Public/TestResultViewer/Templates/Shared/DigitalView.vue.d.ts +23 -0
  28. package/dist/types/{components/TestResult/BookAppointmentModal/BookAppointment/SuccessMessage.vue.d.ts → src/components/Public/TestResultViewer/Templates/Shared/FAQList.vue.d.ts} +2 -1
  29. package/dist/types/{components/BookingDetail/BookingDetail.vue.d.ts → src/components/Public/TestResultViewer/TestResultViewer.vue.d.ts} +16 -10
  30. package/dist/types/src/components/Public/index.d.ts +1 -0
  31. package/dist/types/src/components/Shared/BButton.vue.d.ts +53 -0
  32. package/dist/types/src/components/Shared/BCollapse.vue.d.ts +35 -0
  33. package/dist/types/{components/TestResult/Mobile/ResultTab/TestResultDetail/TestResultDetail.vue.d.ts → src/components/Shared/BModal/BModal.vue.d.ts} +12 -10
  34. package/dist/types/{components/Shared/SectionTitle.vue.d.ts → src/components/Shared/BTooltips.vue.d.ts} +3 -0
  35. package/dist/types/src/components/Shared/index.d.ts +7 -0
  36. package/dist/types/src/composables/HPV.d.ts +7 -0
  37. package/dist/types/src/composables/TestResult.d.ts +4 -0
  38. package/dist/types/src/constants/Common.d.ts +2 -0
  39. package/dist/types/src/constants/Enums.d.ts +121 -0
  40. package/dist/types/src/helpers/ComponentHelper.d.ts +3 -0
  41. package/dist/types/{index.d.ts → src/index.d.ts} +2 -4
  42. package/dist/types/{types → src/types}/TestResult.d.ts +74 -29
  43. package/dist/types/src/types/index.d.ts +1 -0
  44. package/package.json +5 -8
  45. package/dist/types/components/BookingDetail/BookingCtaButtons.vue.d.ts +0 -34
  46. package/dist/types/components/BookingDetail/BookingDetailDesktop.vue.d.ts +0 -34
  47. package/dist/types/components/BookingDetail/BottomCurved.vue.d.ts +0 -29
  48. package/dist/types/components/BookingDetail/CtaButton.vue.d.ts +0 -40
  49. package/dist/types/components/BookingDetail/DiagSupport.vue.d.ts +0 -2
  50. package/dist/types/components/BookingDetail/TestList.vue.d.ts +0 -27
  51. package/dist/types/components/BookingDetail/index.d.ts +0 -2
  52. package/dist/types/components/Shared/CtaButtonSkeleton.vue.d.ts +0 -2
  53. package/dist/types/components/Shared/LoadingSkeleton.vue.d.ts +0 -2
  54. package/dist/types/components/Shared/NoItemsFound.vue.d.ts +0 -36
  55. package/dist/types/components/Shared/ResultStatus.vue.d.ts +0 -23
  56. package/dist/types/components/Shared/TitleIcon.vue.d.ts +0 -30
  57. package/dist/types/components/Shared/index.d.ts +0 -3
  58. package/dist/types/components/TestResult/BookAppointmentModal/BookAppointment/DayPartItem.vue.d.ts +0 -24
  59. package/dist/types/components/TestResult/BookAppointmentModal/BookAppointment/ErrorMessage.vue.d.ts +0 -2
  60. package/dist/types/components/TestResult/BookAppointmentModal/BookAppointment/TimeSlotItem.vue.d.ts +0 -30
  61. package/dist/types/components/TestResult/BookAppointmentModal/BookAppointmentModal.vue.d.ts +0 -39
  62. package/dist/types/components/TestResult/CallUsFilledButton.vue.d.ts +0 -2
  63. package/dist/types/components/TestResult/Desktop/ResultReady.vue.d.ts +0 -15
  64. package/dist/types/components/TestResult/Mobile/BookingTab/BookingList.vue.d.ts +0 -36
  65. package/dist/types/components/TestResult/Mobile/BookingTab/BookingListItem.vue.d.ts +0 -23
  66. package/dist/types/components/TestResult/Mobile/MyProfile.vue.d.ts +0 -34
  67. package/dist/types/components/TestResult/Mobile/ResultTab/TestResultDetail/BookAppointmentButton.vue.d.ts +0 -4
  68. package/dist/types/components/TestResult/Mobile/ResultTab/TestResultDetail/DoctorNote.vue.d.ts +0 -28
  69. package/dist/types/components/TestResult/Mobile/ResultTab/TestResultDetail/ResultOverview.vue.d.ts +0 -23
  70. package/dist/types/components/TestResult/Mobile/ResultTab/TestResultDetail/TestResultDetailSkeleton/ResultViewerSkeleton.vue.d.ts +0 -2
  71. package/dist/types/components/TestResult/Mobile/ResultTab/TestResultDetail/TestResultDetailSkeleton/TestResultDetailSkeleton.vue.d.ts +0 -2
  72. package/dist/types/components/TestResult/Mobile/ResultTab/TestResultList.vue.d.ts +0 -40
  73. package/dist/types/components/TestResult/PatientFullInfo.vue.d.ts +0 -27
  74. package/dist/types/components/TestResult/RejectedResult.vue.d.ts +0 -10
  75. package/dist/types/components/TestResult/TabTitle.vue.d.ts +0 -9
  76. package/dist/types/components/TestResult/TestResultHistoryDetailModal/TestResultHistoryDetail.vue.d.ts +0 -34
  77. package/dist/types/components/TestResult/TestResultHistoryDetailModal/TestResultHistoryDetailModal.vue.d.ts +0 -27
  78. package/dist/types/components/TestResult/index.d.ts +0 -15
  79. package/dist/types/composables/Booking.d.ts +0 -5
  80. package/dist/types/composables/BookingDetail.d.ts +0 -6
  81. package/dist/types/composables/Patient.d.ts +0 -5
  82. package/dist/types/constants/Common.d.ts +0 -15
  83. package/dist/types/constants/Enums.d.ts +0 -103
  84. package/dist/types/helpers/ComponentHelper.d.ts +0 -2
  85. package/dist/types/helpers/DateHelper.d.ts +0 -1
  86. package/dist/types/types/Appointment.d.ts +0 -14
  87. package/dist/types/types/Booking.d.ts +0 -98
  88. package/dist/types/types/Common.d.ts +0 -5
  89. package/dist/types/types/TestResultHistory.d.ts +0 -23
  90. package/dist/types/types/index.d.ts +0 -5
  91. /package/dist/types/{components/TestResult/Desktop → src/components/Public/TestResultViewer/Shared}/CallUsTextButton.vue.d.ts +0 -0
  92. /package/dist/types/{components/TestResult/Mobile/ResultTab/TestResultDetail/ResultReadyV2.vue.d.ts → src/components/Public/TestResultViewer/Templates/Default/Default.vue.d.ts} +0 -0
  93. /package/dist/types/{components/BasePlayground.vue.d.ts → src/components/Public/TestResultViewer/Templates/Shared/CategoryItem/TestHeader/OutsourceValue.vue.d.ts} +0 -0
  94. /package/dist/types/{components/BookingDetail/BookingDetailDesktopSkeleton/BasicInfoSkeleton.vue.d.ts → src/components/Shared/BModal/BModalBody.vue.d.ts} +0 -0
  95. /package/dist/types/{components/BookingDetail/BookingDetailDesktopSkeleton/BookingDetailDesktopSkeleton.vue.d.ts → src/components/Shared/BModal/BModalFooter.vue.d.ts} +0 -0
  96. /package/dist/types/{components/BookingDetail/BookingDetailSkeleton/BasicInfoSkeleton.vue.d.ts → src/components/Shared/BModal/BModalHeader.vue.d.ts} +0 -0
  97. /package/dist/types/{components/BookingDetail/BookingDetailSkeleton/BookingDetailSkeleton.vue.d.ts → src/playground/PlaygroundView.vue.d.ts} +0 -0
  98. /package/dist/types/{plugin.d.ts → src/plugin.d.ts} +0 -0
@@ -0,0 +1,48 @@
1
+ import type { TestResultRange } from '@/types';
2
+ /**
3
+ * Props
4
+ */
5
+ export interface Props {
6
+ testName: string;
7
+ testValue?: number;
8
+ testValueOPR?: string;
9
+ testUnit?: string;
10
+ testCode: string;
11
+ testRanges: TestResultRange[];
12
+ testReferenceRange?: string;
13
+ showFullBar?: boolean;
14
+ }
15
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
16
+ testValue: number;
17
+ testValueOPR: string;
18
+ testUnit: string;
19
+ testReferenceRange: string;
20
+ showFullBar: boolean;
21
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
22
+ testValue: number;
23
+ testValueOPR: string;
24
+ testUnit: string;
25
+ testReferenceRange: string;
26
+ showFullBar: boolean;
27
+ }>>>, {
28
+ testUnit: string;
29
+ testValue: number;
30
+ testValueOPR: string;
31
+ testReferenceRange: string;
32
+ showFullBar: boolean;
33
+ }>;
34
+ export default _default;
35
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
36
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
37
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
38
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
39
+ } : {
40
+ type: import('vue').PropType<T[K]>;
41
+ required: true;
42
+ };
43
+ };
44
+ declare type __VLS_WithDefaults<P, D> = {
45
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
46
+ default: D[K];
47
+ } : P[K];
48
+ };
@@ -1,9 +1,12 @@
1
- import { PaymentStatus } from '@/constants/Enums';
1
+ import { TestResultConclusion } from '@/constants/Enums';
2
+ import type { TestResultRange } from '@/types';
2
3
  /**
3
4
  * Props
4
5
  */
5
6
  export interface Props {
6
- status: `${PaymentStatus}`;
7
+ testValue: string;
8
+ testIsAbnormal: TestResultConclusion;
9
+ testRanges: TestResultRange[];
7
10
  }
8
11
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>>>, {}>;
9
12
  export default _default;
@@ -1,18 +1,17 @@
1
+ import type { TableTestItem } from '@/types';
1
2
  /**
2
3
  * Props
3
4
  */
4
5
  export interface Props {
5
- url: string;
6
- title: string;
7
- subtitle: string;
8
- hideIcon?: boolean;
6
+ tableData: TableTestItem;
7
+ highlightValue?: string;
9
8
  }
10
9
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
11
- hideIcon: boolean;
10
+ highlightValue: string;
12
11
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
13
- hideIcon: boolean;
12
+ highlightValue: string;
14
13
  }>>>, {
15
- hideIcon: boolean;
14
+ highlightValue: string;
16
15
  }>;
17
16
  export default _default;
18
17
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -0,0 +1,23 @@
1
+ import type { TestResult } from '@/types';
2
+ /**
3
+ * Props
4
+ */
5
+ export interface Props {
6
+ testResult: TestResult;
7
+ }
8
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>>>, {}>;
9
+ export default _default;
10
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
12
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
13
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
14
+ } : {
15
+ type: import('vue').PropType<T[K]>;
16
+ required: true;
17
+ };
18
+ };
19
+ declare type __VLS_WithDefaults<P, D> = {
20
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
21
+ default: D[K];
22
+ } : P[K];
23
+ };
@@ -1,8 +1,9 @@
1
+ import type { Faq } from '@/types';
1
2
  /**
2
3
  * Props
3
4
  */
4
5
  export interface Props {
5
- timeSlot: string;
6
+ faqs: Faq[];
6
7
  }
7
8
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>>>, {}>;
8
9
  export default _default;
@@ -1,21 +1,27 @@
1
- import type { Booking } from '@/types';
1
+ import type { TestResult, TestResultImagingPdf } from '@/types';
2
2
  /**
3
3
  * Props
4
4
  */
5
5
  export interface Props {
6
- booking: Booking;
7
- loading: boolean;
8
- hideSupport?: boolean;
6
+ testResult: TestResult;
7
+ pdf?: string;
8
+ englishPdf?: string;
9
+ imagingPdfs?: TestResultImagingPdf[];
9
10
  }
10
11
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
11
- hideSupport: boolean;
12
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click:view-results" | "click:find-location")[], "click:view-results" | "click:find-location", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
13
- hideSupport: boolean;
12
+ pdf: string;
13
+ englishPdf: string;
14
+ imagingPdfs: () => any[];
15
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click:show-trend"[], "click:show-trend", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
16
+ pdf: string;
17
+ englishPdf: string;
18
+ imagingPdfs: () => any[];
14
19
  }>>> & {
15
- "onClick:view-results"?: (...args: any[]) => any;
16
- "onClick:find-location"?: (...args: any[]) => any;
20
+ "onClick:show-trend"?: (...args: any[]) => any;
17
21
  }, {
18
- hideSupport: boolean;
22
+ pdf: string;
23
+ imagingPdfs: TestResultImagingPdf[];
24
+ englishPdf: string;
19
25
  }>;
20
26
  export default _default;
21
27
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -0,0 +1 @@
1
+ export { default as TestResultViewer } from './TestResultViewer/TestResultViewer.vue';
@@ -0,0 +1,53 @@
1
+ import { BButtonSize, BButtonType } from '@/constants/Enums';
2
+ export interface Props {
3
+ type?: `${BButtonType}`;
4
+ prependIcon?: string;
5
+ appendIcon?: string;
6
+ pill?: boolean;
7
+ size?: `${BButtonSize}`;
8
+ disabled?: boolean;
9
+ }
10
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
11
+ type: BButtonType;
12
+ prependIcon: string;
13
+ appendIcon: string;
14
+ pill: boolean;
15
+ size: BButtonSize;
16
+ disabled: boolean;
17
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
18
+ type: BButtonType;
19
+ prependIcon: string;
20
+ appendIcon: string;
21
+ pill: boolean;
22
+ size: BButtonSize;
23
+ disabled: boolean;
24
+ }>>>, {
25
+ type: "default" | "text" | "primary" | "secondary" | "outline";
26
+ prependIcon: string;
27
+ appendIcon: string;
28
+ pill: boolean;
29
+ size: "xs" | "sm" | "md" | "lg";
30
+ disabled: boolean;
31
+ }>, {
32
+ default: (_: {}) => any;
33
+ }>;
34
+ export default _default;
35
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
36
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
37
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
38
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
39
+ } : {
40
+ type: import('vue').PropType<T[K]>;
41
+ required: true;
42
+ };
43
+ };
44
+ declare type __VLS_WithDefaults<P, D> = {
45
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
46
+ default: D[K];
47
+ } : P[K];
48
+ };
49
+ declare type __VLS_WithTemplateSlots<T, S> = T & {
50
+ new (): {
51
+ $slots: S;
52
+ };
53
+ };
@@ -0,0 +1,35 @@
1
+ export interface Props {
2
+ modelValue: boolean;
3
+ autoFocus?: boolean;
4
+ }
5
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
6
+ autoFocus: boolean;
7
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
8
+ autoFocus: boolean;
9
+ }>>> & {
10
+ "onUpdate:modelValue"?: (...args: any[]) => any;
11
+ }, {
12
+ autoFocus: boolean;
13
+ }>, {
14
+ default: (_: {}) => any;
15
+ }>;
16
+ export default _default;
17
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
18
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
19
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
20
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
21
+ } : {
22
+ type: import('vue').PropType<T[K]>;
23
+ required: true;
24
+ };
25
+ };
26
+ declare type __VLS_WithDefaults<P, D> = {
27
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
28
+ default: D[K];
29
+ } : P[K];
30
+ };
31
+ declare type __VLS_WithTemplateSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -1,21 +1,23 @@
1
- import type { TestResult } from '@/types';
1
+ import { BModalSize } from '@/constants/Enums';
2
2
  /**
3
3
  * Props
4
4
  */
5
5
  export interface Props {
6
- testResult: TestResult;
7
- loading: boolean;
8
- ctaButtonUrl: string;
9
- hidePatientInfo?: boolean;
6
+ modelValue: boolean;
7
+ size?: `${BModalSize}`;
8
+ fullscreen?: boolean;
10
9
  }
11
10
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
12
- hidePatientInfo: boolean;
13
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click:book-appointment"[], "click:book-appointment", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
14
- hidePatientInfo: boolean;
11
+ size: BModalSize;
12
+ fullscreen: boolean;
13
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
14
+ size: BModalSize;
15
+ fullscreen: boolean;
15
16
  }>>> & {
16
- "onClick:book-appointment"?: (...args: any[]) => any;
17
+ "onUpdate:modelValue"?: (...args: any[]) => any;
17
18
  }, {
18
- hidePatientInfo: boolean;
19
+ size: "sm" | "md" | "lg";
20
+ fullscreen: boolean;
19
21
  }>, {
20
22
  default: (_: {}) => any;
21
23
  }>;
@@ -1,5 +1,8 @@
1
1
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, {
2
2
  default: (_: {}) => any;
3
+ content: (_: {
4
+ close: any;
5
+ }) => any;
3
6
  }>;
4
7
  export default _default;
5
8
  declare type __VLS_WithTemplateSlots<T, S> = T & {
@@ -0,0 +1,7 @@
1
+ import BButton from './BButton.vue';
2
+ import BCollapse from './BCollapse.vue';
3
+ import BModal from './BModal/BModal.vue';
4
+ import BModalBody from './BModal/BModalBody.vue';
5
+ import BModalFooter from './BModal/BModalFooter.vue';
6
+ import BModalHeader from './BModal/BModalHeader.vue';
7
+ export { BButton, BCollapse, BModal, BModalBody, BModalFooter, BModalHeader };
@@ -0,0 +1,7 @@
1
+ import { HPVTestResultType } from '@/constants/Enums';
2
+ export declare function useHPV(): {
3
+ getTestValueObj: (testValue: HPVTestResultType) => {
4
+ text: string;
5
+ cssClass: string;
6
+ };
7
+ };
@@ -0,0 +1,4 @@
1
+ export declare function useTestResult(testList: unknown[]): {
2
+ expansions: import("vue").Ref<boolean[]>;
3
+ closeAllExpansions: () => void;
4
+ };
@@ -0,0 +1,2 @@
1
+ export declare const CUSTOMER_SUPPORT_TEL = "1900 1717";
2
+ export declare const TinyNumber = 1e-12;
@@ -0,0 +1,121 @@
1
+ /**
2
+ * BButton
3
+ */
4
+ export declare enum BButtonType {
5
+ Primary = "primary",
6
+ Secondary = "secondary",
7
+ Text = "text",
8
+ Outline = "outline",
9
+ Default = "default"
10
+ }
11
+ export declare enum BButtonSize {
12
+ ExtraSmall = "xs",
13
+ Small = "sm",
14
+ Medium = "md",
15
+ Large = "lg"
16
+ }
17
+ /**
18
+ * BModal
19
+ */
20
+ export declare enum BModalSize {
21
+ Small = "sm",
22
+ Medium = "md",
23
+ Large = "lg"
24
+ }
25
+ /**
26
+ * Test Result
27
+ */
28
+ export declare const DATE_TIME_FORMAT = "DD/MM/YYYY HH:mm";
29
+ export declare enum Gender {
30
+ Male = "Male",
31
+ Female = "Female"
32
+ }
33
+ export declare enum TestResultStatus {
34
+ Ordered = "ordered",
35
+ Ready = "ready",
36
+ PartiallyComplete = "partial",
37
+ InProgress = "in-progress",
38
+ Canceled = "canceled",
39
+ Rejected = "rejected"
40
+ }
41
+ export declare enum TestResultConclusion {
42
+ Abnormal = "A",
43
+ LowerAbnormal = "L",
44
+ Panic = "P",
45
+ Normal = "N"
46
+ }
47
+ export declare enum TestType {
48
+ Group = "GRP",
49
+ Package = "PKG",
50
+ Investigation = "INV"
51
+ }
52
+ export declare enum TestStatus {
53
+ SampleCollected = "SampleCollected",
54
+ SampleReceived = "SampleReceived",
55
+ YetToTransfer = "Yet to Transfer",
56
+ Completed = "Completed",
57
+ Cancel = "Cancel",
58
+ Approve = "Approve"
59
+ }
60
+ export declare enum TestServiceType {
61
+ Diag = "Diag",
62
+ Outsource = "Outsource",
63
+ Imaging = "Imaging"
64
+ }
65
+ export declare enum SampleStatus {
66
+ Rejected = "Rejected",
67
+ Received = "Received",
68
+ Registered = "Registered"
69
+ }
70
+ export declare enum TestView {
71
+ PdfView = "pdf_view_mode",
72
+ DigitalView = "digital_view_mode"
73
+ }
74
+ export declare enum ResultType {
75
+ Numberic = "numeric",
76
+ Text = "text",
77
+ XML = "XML"
78
+ }
79
+ export declare enum ResultSegmentValueOPR {
80
+ GreaterThan = ">",
81
+ GreaterThanOrEqualTo = "\u2265",
82
+ LessThan = "<",
83
+ LessThanOrEqualTo = "\u2264",
84
+ BTW = "btw",
85
+ Txt = "txt"
86
+ }
87
+ export declare enum TestValueNumericColor {
88
+ Abnormal = "#e16c00",
89
+ LowerAbnormal = "#d6a700",
90
+ Panic = "#ec3741",
91
+ Normal = "#00a86b"
92
+ }
93
+ export declare enum TestValueTextColor {
94
+ Negative = "#00a86b",
95
+ Positive = "#ec3741"
96
+ }
97
+ export declare enum HomeKitStatus {
98
+ Available = "available",
99
+ Unavailable = "unavailable",
100
+ SampleCollected = "sample_collected",
101
+ SampleRejected = "sample_rejected"
102
+ }
103
+ export declare enum TestResultTemplate {
104
+ Default = "default",
105
+ GXNT1 = "GXNT1",
106
+ HPV = "HPV",
107
+ STD = "STD"
108
+ }
109
+ export declare enum HPVTestResultType {
110
+ Detected = "DETECTED",
111
+ NotDetected = "NOT DETECTED"
112
+ }
113
+ export declare enum HPVRiskCategory {
114
+ LowRisk = "low_risk",
115
+ HighRisk = "high_risk"
116
+ }
117
+ export declare enum HPVRecommendationType {
118
+ Reminder = "reminder_in_1_year",
119
+ PAPSmear = "pap_smear",
120
+ Colposcopy = "colposcopy"
121
+ }
@@ -0,0 +1,3 @@
1
+ export declare const callCustomerSupport: () => void;
2
+ export declare const scrollToElement: (el: HTMLElement) => void;
3
+ export declare const hexToRgb: (h: string) => number[];
@@ -1,8 +1,6 @@
1
- import './assets/styles/main.scss';
1
+ import './assets/scss/main.scss';
2
+ export { TestResultViewer } from '@/components/Public';
2
3
  export * from './types';
3
- export * from './components/BookingDetail';
4
- export * from './components/Shared';
5
- export * from './components/TestResult';
6
4
  export * from './constants/Common';
7
5
  export * from './constants/Enums';
8
6
  /**
@@ -1,10 +1,33 @@
1
- import type { Gender, ResultSegmentNormalType, ResultSegmentValueOPR, ResultType, TestResultConclusion, TestResultStatus, TestResultTemplate, TestStatus } from '@/constants/Enums';
2
- export interface TestResultCompact {
3
- order_id: string;
1
+ import type { TestResultConclusion, TestResultStatus, TestResultTemplate, HPVTestResultType, HPVRiskCategory, HPVRecommendationType, ResultType, ResultSegmentValueOPR, TestStatus, Gender, TestServiceType } from '@/constants/Enums';
2
+ export interface TableTestItem {
3
+ name: string;
4
+ header: string[];
5
+ content: string[];
6
+ }
7
+ export interface TestResultBase {
8
+ can_booking: boolean;
9
+ date_of_birth: string;
10
+ doctor_name?: string;
11
+ doctor_note?: string;
4
12
  first_name: string;
13
+ gender: Gender;
14
+ order_id: string;
15
+ ordered_at: string;
16
+ pdf: string;
17
+ phone_number: string;
18
+ result_at?: string;
5
19
  result_status: TestResultStatus;
6
- visit_date: string;
7
- key: string;
20
+ sample_collected_at?: string;
21
+ status: string;
22
+ template_type: `${TestResultTemplate}`;
23
+ overview: TestResultOverview[];
24
+ is_free_consultant: boolean;
25
+ consult_time?: string;
26
+ }
27
+ export interface TestResultOverview {
28
+ count: number;
29
+ name: string;
30
+ percent: number;
8
31
  }
9
32
  export interface TestResult extends TestResultBase {
10
33
  categories: TestResultCategory[];
@@ -30,40 +53,62 @@ export interface TestResultItem {
30
53
  test_value_type: ResultType;
31
54
  uom_code: string;
32
55
  delta_value?: any;
56
+ service_type: TestServiceType;
33
57
  }
34
58
  export interface TestResultRange {
35
59
  result_type: `${ResultType}`;
36
60
  value_txt: string;
37
- status: `${ResultSegmentNormalType}`;
38
61
  result_label: string;
39
62
  color: string;
40
63
  is_active: boolean;
41
64
  value_min: number;
42
65
  value_max: number;
43
66
  value_opr?: `${ResultSegmentValueOPR}`;
67
+ result_explanation?: string;
44
68
  }
45
- export interface TestResultBase {
46
- can_booking: boolean;
47
- date_of_birth: string;
48
- doctor_name?: string;
49
- doctor_note?: string;
50
- first_name: string;
51
- gender: Gender;
52
- order_id: string;
53
- ordered_at: string;
54
- pdf: string;
55
- phone_number: string;
56
- result_at?: string;
57
- result_status: TestResultStatus;
58
- sample_collected_at?: string;
59
- status: string;
60
- template_type: `${TestResultTemplate}`;
61
- overview: TestResultOverview[];
62
- is_free_consultant: boolean;
63
- consult_time?: string;
69
+ export interface TestRange {
70
+ min: number;
71
+ max: number;
72
+ minLabel: string;
73
+ maxLabel: string;
74
+ color: string;
75
+ showMin: boolean;
76
+ showMax: boolean;
77
+ active: boolean;
78
+ resultLabel: string;
79
+ showResultLabel: boolean;
80
+ compact: boolean;
64
81
  }
65
- export interface TestResultOverview {
66
- count: number;
67
- name: string;
68
- percent: number;
82
+ export interface TestResultImagingPdf {
83
+ test_code: string;
84
+ pdf?: string;
85
+ }
86
+ export interface TestResultSTD extends TestResultBase {
87
+ categories: TestResultCategory[];
88
+ faqs: Faq[];
89
+ }
90
+ export interface TestResultHPV extends TestResultBase {
91
+ categories: HPVData;
92
+ }
93
+ export interface HPVData {
94
+ results_overview: `${HPVTestResultType}`;
95
+ risks: Risk[];
96
+ mog_guideline: `${HPVRecommendationType}`;
97
+ cta: boolean;
98
+ faqs: Faq[];
99
+ }
100
+ export interface Risk {
101
+ results_overview: `${HPVTestResultType}`;
102
+ name: `${HPVRiskCategory}`;
103
+ tests: RiskTest[];
104
+ }
105
+ export interface RiskTest {
106
+ secondary_test_name: string;
107
+ test_code: string;
108
+ test_name: string;
109
+ test_value: HPVTestResultType;
110
+ }
111
+ export interface Faq {
112
+ question: string;
113
+ answers: string;
69
114
  }
@@ -0,0 +1 @@
1
+ export * from './TestResult';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pat-shared-components",
3
- "version": "0.5.0-beta.7",
3
+ "version": "0.9.0-beta.2",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -32,21 +32,18 @@
32
32
  "format": "prettier . --write"
33
33
  },
34
34
  "dependencies": {
35
- "@juggle/resize-observer": "^3.4.0",
36
- "chart.js": "^3.9.1",
37
- "imask": "^6.4.3",
35
+ "diag-ds": "0.1.5",
38
36
  "lodash": "^4.17.21",
39
37
  "moment-mini": "^2.29.4",
40
- "pat-design-system": "0.3.0-beta.50",
41
38
  "uuid": "^8.3.2",
42
39
  "vue": "^3.2.37",
43
- "vue-i18n": "^9.2.2"
40
+ "vue-i18n": "^9.2.2",
41
+ "vue3-popper": "^1.5.0"
44
42
  },
45
43
  "devDependencies": {
46
44
  "@babel/core": "^7.20.12",
47
45
  "@intlify/eslint-plugin-vue-i18n": "^2.0.0",
48
46
  "@rushstack/eslint-patch": "^1.1.4",
49
- "@tailwindcss/line-clamp": "^0.4.2",
50
47
  "@types/jsdom": "^20.0.0",
51
48
  "@types/lodash": "^4.14.188",
52
49
  "@types/uuid": "^8.3.4",
@@ -67,7 +64,7 @@
67
64
  "prettier": "^2.7.1",
68
65
  "prettier-plugin-tailwindcss": "^0.2.5",
69
66
  "sass": "^1.56.0",
70
- "tailwindcss": "^3.2.2",
67
+ "tailwindcss": "^3.3.1",
71
68
  "typescript": "~4.7.4",
72
69
  "vite": "^3.1.8",
73
70
  "vitest": "^0.24.3",