@mindly/ui-components 5.67.3 → 5.69.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.
Files changed (46) hide show
  1. package/dist/cjs/index.js +7 -7
  2. package/dist/cjs/lib/Consultations/UserInfoModal/UserInfoModal.d.ts +5 -0
  3. package/dist/cjs/lib2/features/ContractTreeFeature/ContractTreeFeature.d.ts +9 -0
  4. package/dist/cjs/lib2/features/ContractTreeFeature/index.d.ts +2 -0
  5. package/dist/cjs/lib2/features/ContractTreeFeature/types.d.ts +9 -0
  6. package/dist/cjs/lib2/features/OutdatedPersonalDataFeature/OutdatedPersonalDataFeature.d.ts +2 -0
  7. package/dist/cjs/lib2/features/OutdatedPersonalDataFeature/index.d.ts +1 -0
  8. package/dist/cjs/lib2/features/OutdatedPersonalDataFeature/types.d.ts +9 -0
  9. package/dist/cjs/lib2/features/ScreenDrumPickerFormFeature/ScreenDrumPickerFormFeature.d.ts +19 -0
  10. package/dist/cjs/lib2/features/ScreenDrumPickerFormFeature/index.d.ts +1 -0
  11. package/dist/cjs/lib2/features/ScreenInputFormFeature/ScreenInputFormFeature.d.ts +23 -0
  12. package/dist/cjs/lib2/features/ScreenInputFormFeature/index.d.ts +1 -0
  13. package/dist/cjs/lib2/features/ScreenInputUpdateFeature/ScreenInputUpdateFeature.d.ts +3 -0
  14. package/dist/cjs/lib2/features/TextAreaFormFeature/TextAreaFormFeature.d.ts +14 -0
  15. package/dist/cjs/lib2/features/TextAreaFormFeature/index.d.ts +1 -0
  16. package/dist/cjs/lib2/features/index.d.ts +5 -0
  17. package/dist/cjs/lib2/shared/types/getCountryKeyByName.d.ts +8 -0
  18. package/dist/cjs/lib2/shared/types/index.d.ts +1 -0
  19. package/dist/cjs/lib2/shared/ui/ListItems/Item.d.ts +2 -0
  20. package/dist/cjs/lib2/shared/utils/getSignAgreementsTabs.d.ts +27 -0
  21. package/dist/cjs/lib2/shared/utils/index.d.ts +2 -0
  22. package/dist/cjs/lib2/shared/utils/replaceAsterisksWithBold.d.ts +1 -0
  23. package/dist/esm/index.js +7 -7
  24. package/dist/esm/lib/Consultations/UserInfoModal/UserInfoModal.d.ts +5 -0
  25. package/dist/esm/lib2/features/ContractTreeFeature/ContractTreeFeature.d.ts +9 -0
  26. package/dist/esm/lib2/features/ContractTreeFeature/index.d.ts +2 -0
  27. package/dist/esm/lib2/features/ContractTreeFeature/types.d.ts +9 -0
  28. package/dist/esm/lib2/features/OutdatedPersonalDataFeature/OutdatedPersonalDataFeature.d.ts +2 -0
  29. package/dist/esm/lib2/features/OutdatedPersonalDataFeature/index.d.ts +1 -0
  30. package/dist/esm/lib2/features/OutdatedPersonalDataFeature/types.d.ts +9 -0
  31. package/dist/esm/lib2/features/ScreenDrumPickerFormFeature/ScreenDrumPickerFormFeature.d.ts +19 -0
  32. package/dist/esm/lib2/features/ScreenDrumPickerFormFeature/index.d.ts +1 -0
  33. package/dist/esm/lib2/features/ScreenInputFormFeature/ScreenInputFormFeature.d.ts +23 -0
  34. package/dist/esm/lib2/features/ScreenInputFormFeature/index.d.ts +1 -0
  35. package/dist/esm/lib2/features/ScreenInputUpdateFeature/ScreenInputUpdateFeature.d.ts +3 -0
  36. package/dist/esm/lib2/features/TextAreaFormFeature/TextAreaFormFeature.d.ts +14 -0
  37. package/dist/esm/lib2/features/TextAreaFormFeature/index.d.ts +1 -0
  38. package/dist/esm/lib2/features/index.d.ts +5 -0
  39. package/dist/esm/lib2/shared/types/getCountryKeyByName.d.ts +8 -0
  40. package/dist/esm/lib2/shared/types/index.d.ts +1 -0
  41. package/dist/esm/lib2/shared/ui/ListItems/Item.d.ts +2 -0
  42. package/dist/esm/lib2/shared/utils/getSignAgreementsTabs.d.ts +27 -0
  43. package/dist/esm/lib2/shared/utils/index.d.ts +2 -0
  44. package/dist/esm/lib2/shared/utils/replaceAsterisksWithBold.d.ts +1 -0
  45. package/dist/index.d.ts +192 -69
  46. package/package.json +1 -1
@@ -12,7 +12,12 @@ type UserInfoModalProps = {
12
12
  onSignUp?: (id: string) => void;
13
13
  onClose: () => void;
14
14
  isClient?: boolean;
15
+ isShowContract?: boolean;
16
+ contractStatus?: 'not_signed' | 'pending' | 'active';
17
+ handleOpenContract: () => void;
15
18
  translations?: {
19
+ contractTitle: string;
20
+ contractSubtitle: string;
16
21
  sessions?: string[];
17
22
  writeBtnLabel?: string;
18
23
  buyBtnLabel?: string;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import './ContractTreeFeature.css';
3
+ import { TreeNode } from './types';
4
+ interface ContentTreeProps {
5
+ data: TreeNode[];
6
+ className?: string;
7
+ }
8
+ declare const ContentTree: React.MemoExoticComponent<React.ForwardRefExoticComponent<ContentTreeProps & React.RefAttributes<HTMLDivElement>>>;
9
+ export default ContentTree;
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export { default as ContractTreeFeature } from './ContractTreeFeature';
@@ -0,0 +1,9 @@
1
+ export type TreeNode = {
2
+ title: string;
3
+ type: string;
4
+ children?: TreeNode[];
5
+ };
6
+ export interface ContentRendererProps {
7
+ node: TreeNode;
8
+ level: number;
9
+ }
@@ -0,0 +1,2 @@
1
+ import { OutdatedPersonalDataFeatureProps } from './types';
2
+ export declare function OutdatedPersonalDataFeature({ isOpen, presentingElement, onApply, onDismiss, subtitle, title, applyText, }: OutdatedPersonalDataFeatureProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './OutdatedPersonalDataFeature';
@@ -0,0 +1,9 @@
1
+ export type OutdatedPersonalDataFeatureProps = {
2
+ isOpen: boolean;
3
+ presentingElement?: HTMLElement;
4
+ title: string;
5
+ subtitle: string;
6
+ applyText?: string;
7
+ onApply: () => void;
8
+ onDismiss: () => void;
9
+ };
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ type SelectionType = {
3
+ value: any;
4
+ label: string;
5
+ };
6
+ type SpecialistDrumPickerWidgetProps = {
7
+ title?: string;
8
+ subtitle?: string;
9
+ buttonText?: string;
10
+ selections: Record<string, SelectionType[]>;
11
+ defaults?: Record<string, string>;
12
+ onChange(value: Record<string, string>): void;
13
+ compareBy?: 'value' | 'label';
14
+ isLoading?: boolean;
15
+ onTouchStart?: () => void;
16
+ onTouchEnd?: () => void;
17
+ };
18
+ declare const _default: React.NamedExoticComponent<SpecialistDrumPickerWidgetProps>;
19
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as ScreenDrumPickerFormFeature } from './ScreenDrumPickerFormFeature';
@@ -0,0 +1,23 @@
1
+ import React, { ReactNode } from 'react';
2
+ type ScreenInputFormFeatureProps = {
3
+ type?: 'text' | 'email' | 'number';
4
+ title?: string;
5
+ subtitle?: string;
6
+ placeholder?: string;
7
+ buttonText?: string;
8
+ defaultValue?: string;
9
+ onSubmit?: (value: string, name: string) => void;
10
+ name?: string;
11
+ isLoading?: boolean;
12
+ resetButtonText?: string;
13
+ resetValue?: string;
14
+ autoComplete?: string;
15
+ required?: boolean;
16
+ isFocus?: boolean;
17
+ pattern?: string;
18
+ isAutoGrow?: boolean;
19
+ icon?: ReactNode | string;
20
+ isKeyboardShown?: boolean;
21
+ };
22
+ declare const _default: React.NamedExoticComponent<ScreenInputFormFeatureProps>;
23
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as ScreenInputFormFeature } from './ScreenInputFormFeature';
@@ -14,5 +14,8 @@ type ScreenInputUpdateFeatureProps = {
14
14
  isDisabled: boolean;
15
15
  isKeyboardShown: boolean;
16
16
  };
17
+ /**
18
+ * @deprecated Use `ScreenInputFormFeature`
19
+ * */
17
20
  declare const ScreenInputUpdateFeature: FC<ScreenInputUpdateFeatureProps>;
18
21
  export default ScreenInputUpdateFeature;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ type TextAreaFormFeatureProps = {
3
+ title?: string;
4
+ placeholder?: string;
5
+ buttonText?: string;
6
+ defaultValue?: string;
7
+ onSubmit?: (value: string, name: string) => void;
8
+ name?: string;
9
+ isLoading?: boolean;
10
+ isFocus?: boolean;
11
+ isKeyboardShown?: boolean;
12
+ };
13
+ declare const _default: React.NamedExoticComponent<TextAreaFormFeatureProps>;
14
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as TextAreaFormFeature } from './TextAreaFormFeature';
@@ -20,3 +20,8 @@ export * from './ReviewCardFeature';
20
20
  export * from './AppNotSupporedFeature';
21
21
  export * from './ScreenInputUpdateFeature';
22
22
  export * from './ErrorCardFeature';
23
+ export * from './ContractTreeFeature';
24
+ export * from './OutdatedPersonalDataFeature';
25
+ export * from './ScreenInputFormFeature';
26
+ export * from './ScreenDrumPickerFormFeature';
27
+ export * from './TextAreaFormFeature';
@@ -0,0 +1,8 @@
1
+ export declare enum SupportedLangs {
2
+ en = "en",
3
+ uk = "uk",
4
+ pl = "pl",
5
+ es = "es"
6
+ }
7
+ export declare const COUNTRIES_MAPPER: Record<string, SupportedLangs>;
8
+ export declare const getCountryKeyByName: (countryName: string) => SupportedLangs;
@@ -2,3 +2,4 @@ export * from './ratingCircleTypes';
2
2
  export * from './specialistPaymentTypes';
3
3
  export * from './iconProps';
4
4
  export * from './common';
5
+ export * from './getCountryKeyByName';
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  type ItemProps = React.HTMLAttributes<HTMLIonItemElement> & {
3
3
  leftContent?: React.ReactNode;
4
4
  rightContent?: React.ReactNode;
5
+ innerItemClassName?: string;
5
6
  withBorders?: boolean;
6
7
  isDisabled?: boolean;
7
8
  isError?: boolean;
@@ -9,6 +10,7 @@ type ItemProps = React.HTMLAttributes<HTMLIonItemElement> & {
9
10
  export declare const Item: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLIonItemElement> & {
10
11
  leftContent?: React.ReactNode;
11
12
  rightContent?: React.ReactNode;
13
+ innerItemClassName?: string | undefined;
12
14
  withBorders?: boolean | undefined;
13
15
  isDisabled?: boolean | undefined;
14
16
  isError?: boolean | undefined;
@@ -0,0 +1,27 @@
1
+ import { SupportedLangs } from '../types';
2
+ import { TreeNode } from '../../features';
3
+ import { WithTranslation } from 'react-i18next';
4
+ type SupportedCountryLocale = string;
5
+ type Tabs = {
6
+ behavior: 'tax-country' | 'profile-lang';
7
+ localeOrCountry: `${SupportedLangs}` | SupportedCountryLocale;
8
+ t: WithTranslation['t'];
9
+ jsonTree: TreeNode[];
10
+ };
11
+ type TabsReturnType = {
12
+ id: `${SupportedLangs}`;
13
+ title: string;
14
+ value: TreeNode;
15
+ };
16
+ /**
17
+ * This function takes json tree and locale and
18
+ * returns tabs for contract modal.
19
+ *
20
+ * @param behavior - 'tax-country' or 'profile-lang'
21
+ * @param localeOrCountry - locale to filter tabs
22
+ * @param jsonTree - json tree with contracts
23
+ * @param t - translation function
24
+ * @returns - array of tabs with id, title and value
25
+ */
26
+ export declare function getSignAgreementsTabs({ behavior, localeOrCountry, jsonTree, t, }: Tabs): TabsReturnType[];
27
+ export {};
@@ -1,3 +1,5 @@
1
1
  export { mergeRefs } from './mergeRefs';
2
2
  export { priceNormalize } from './priceNormalizer';
3
3
  export { newShade } from './newShade';
4
+ export { replaceAsterisksWithBold } from './replaceAsterisksWithBold';
5
+ export { getSignAgreementsTabs } from './getSignAgreementsTabs';
@@ -0,0 +1 @@
1
+ export declare const replaceAsterisksWithBold: (text: string) => JSX.Element[];