kui-crm 0.0.325 → 0.0.327

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.
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
- import { KUIComplexSettings, InputWithControllerProps as InputWithControllerProps$3 } from 'kui-complex';
2
+ import { KUIComplexSettings, InputWithControllerProps as InputWithControllerProps$1, UploadFileParams as UploadFileParams$1, InputWithAddressAutocompleteProps, MapWrapperProps, AvatarSizes } from 'kui-complex';
3
3
  import { DateTime } from 'luxon';
4
4
  import { PaginationRes as PaginationRes$1, Loader, SortingFilter, Paginator, MultistepForm as MultistepForm$1, ObjectType as ObjectType$1 } from 'kui-utils';
5
5
  import * as react_hook_form from 'react-hook-form';
@@ -9,17 +9,12 @@ import * as React$1 from 'react';
9
9
  import React__default, { ReactNode, DependencyList, RefObject, ReactElement, MutableRefObject } from 'react';
10
10
  import * as kui_basic from 'kui-basic';
11
11
  import { GridSize, InputProps, ModalProps as ModalProps$1, ButtonProps, GridProps, TooltipProps, CaptionProps } from 'kui-basic';
12
- import { InputWithControllerProps as InputWithControllerProps$1 } from 'kui-complex/dist/InputWithController';
13
12
  import * as yup from 'yup';
14
- import { UploadFileParams as UploadFileParams$1 } from 'kui-complex/dist/FileItem';
15
13
  import { InputFileProps } from 'kui-complex/InputFile';
16
14
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
17
- import { InputWithAddressAutocompleteProps } from 'kui-complex/dist/InputWithAddressAutocomplete';
18
- import { MapWrapperProps } from 'kui-complex/dist/MapWrapper';
19
15
  import { FieldValues as FieldValues$1 } from 'react-hook-form/dist/types/fields';
20
16
  import * as _emotion_styled from '@emotion/styled';
21
17
  import * as _emotion_react from '@emotion/react';
22
- import { AvatarSizes } from 'kui-complex/dist/Avatar';
23
18
  import { SwiperRef } from 'kui-swiper';
24
19
 
25
20
  declare type KUICrmSettings = {
@@ -266,10 +261,12 @@ declare type FileBodyRequest = {
266
261
  temp_file_id?: number;
267
262
  name: string;
268
263
  visibility?: DocumentVisibilityAPIVariants;
264
+ url: string;
269
265
  };
270
266
  declare type ImageBodyRequest = {
271
267
  temp_file_id: number;
272
268
  image_name: string;
269
+ url: string;
273
270
  };
274
271
  declare type UploadFileResponse = {
275
272
  id: number;
@@ -958,12 +955,6 @@ type CompanyAutocompleteFields = {
958
955
  }
959
956
 
960
957
  declare function CompanyAutocomplete<TFormValues extends object>(props: CompanyAutocompleteProps<TFormValues>): JSX.Element;
961
- declare namespace CompanyAutocomplete {
962
- var defaultProps: {
963
- label: string;
964
- name: string;
965
- };
966
- }
967
958
  declare const _default$l: typeof CompanyAutocomplete;
968
959
 
969
960
  declare class FileStore implements FileStoreInterface {
@@ -981,7 +972,8 @@ declare class FileStore implements FileStoreInterface {
981
972
  uploadStatus: LoadStatus;
982
973
  uploadedData: FileBodyRequest | ImageBodyRequest | null;
983
974
  loader: Loader;
984
- constructor(file: FileStoreParams, filesStore?: FilesStoreInterface);
975
+ withFileCleanUp: boolean;
976
+ constructor(file: FileStoreParams, filesStore?: FilesStoreInterface | null, withFileCleanUp?: boolean);
985
977
  uploadFile: (variant: FileVariant) => Promise<void>;
986
978
  updateUploadStatus: (status: LoadStatus) => void;
987
979
  updateUploadedData: (data: FileBodyRequest | ImageBodyRequest) => void;
@@ -994,7 +986,7 @@ declare class FileStore implements FileStoreInterface {
994
986
  static initFromFileModel: (file: FileModel) => FileStore;
995
987
  static initFromDocumentModel: (file: DocumentModel) => FileStore;
996
988
  static initFromImageModel: (file: ImageModel, name?: string | undefined) => FileStore;
997
- static initFromFile: (file: File, index: number) => FileStore;
989
+ static initFromFile: (file: File, index: number, withFileCleanUp?: boolean | undefined) => FileStore;
998
990
  static initFromFileStore: (file: FileStore) => FileStore;
999
991
  }
1000
992
 
@@ -1883,6 +1875,7 @@ declare const getBodyForFileRequest: (file: FileWithVisibility | DocumentWithVis
1883
1875
  temp_file_id: number;
1884
1876
  name: string;
1885
1877
  visibility: DocumentVisibilityAPIVariants;
1878
+ url: string;
1886
1879
  } | null;
1887
1880
  declare const getBodyForImageRequest: (file: UploadFileParams$1, res?: UploadFileResponse | undefined) => ImageBodyRequest | null;
1888
1881
  declare const getPatchFileParams: (file: InputFileWithVisibilityFields | FileStore) => {
@@ -2358,32 +2351,12 @@ declare class MapStore {
2358
2351
  }
2359
2352
 
2360
2353
  declare function CountryAutocomplete<TFormValues extends object>(props: CountryAutocompleteProps<TFormValues>): JSX.Element;
2361
- declare namespace CountryAutocomplete {
2362
- var defaultProps: {
2363
- label: string;
2364
- name: string;
2365
- };
2366
- }
2367
2354
  declare const _default$k: typeof CountryAutocomplete;
2368
2355
 
2369
2356
  declare function RegionAutocomplete<TFormValues extends object>(props: RegionAutocompleteProps<TFormValues>): JSX.Element;
2370
- declare namespace RegionAutocomplete {
2371
- var defaultProps: {
2372
- label: string;
2373
- name: string;
2374
- countryName: string;
2375
- };
2376
- }
2377
2357
  declare const _default$j: typeof RegionAutocomplete;
2378
2358
 
2379
2359
  declare function CityAutocomplete<TFormValues extends object>(props: CityAutocompleteProps<TFormValues>): JSX.Element;
2380
- declare namespace CityAutocomplete {
2381
- var defaultProps: {
2382
- label: string;
2383
- name: string;
2384
- regionName: string;
2385
- };
2386
- }
2387
2360
  declare const _default$i: typeof CityAutocomplete;
2388
2361
 
2389
2362
  type ModalProps = {
@@ -2424,14 +2397,7 @@ type FormBottomProps = {
2424
2397
  startButton?: ReactNode
2425
2398
  } & Omit<ButtonProps, "form" | "variant">
2426
2399
 
2427
- declare function FormBottom({ label, variant, handleClick, withPrevStep, handlePrevClick, withDeleteButton, handleDelete, isFixed, isLoading, endButton, startButton, withReverse, ...otherProps }: FormBottomProps): _emotion_react_jsx_runtime.JSX.Element;
2428
- declare namespace FormBottom {
2429
- var defaultProps: {
2430
- type: string;
2431
- variant: string;
2432
- label: string;
2433
- };
2434
- }
2400
+ declare function FormBottom({ label, variant, handleClick, withPrevStep, handlePrevClick, withDeleteButton, handleDelete, isFixed, isLoading, endButton, startButton, withReverse, ...otherProps }: FormBottomProps): _emotion_react_jsx_runtime.JSX.Element;
2435
2401
 
2436
2402
  declare function InputWithMap<T extends object>({ form, name, disabled, handlePlaceSelect: onPlaceSelect, ...inputProps }: InputWithAddressAutocompleteProps<T>): JSX.Element;
2437
2403
 
@@ -2440,16 +2406,6 @@ type MapComponentProps = {
2440
2406
  } & MapWrapperProps
2441
2407
 
2442
2408
  declare function MapComponent(props: MapComponentProps): _emotion_react_jsx_runtime.JSX.Element;
2443
- declare namespace MapComponent {
2444
- var defaultProps: {
2445
- center: {
2446
- lat: number;
2447
- lng: number;
2448
- };
2449
- zoom: number;
2450
- withMarker: boolean;
2451
- };
2452
- }
2453
2409
  declare const _default$g: typeof MapComponent;
2454
2410
 
2455
2411
  declare function Modal({ open, ...other }: ModalProps): JSX.Element;
@@ -2514,12 +2470,6 @@ declare function FillingTagCreationModal(props: FillingTagCreationModalProps): J
2514
2470
  declare const _default$e: typeof FillingTagCreationModal;
2515
2471
 
2516
2472
  declare function FillingTagsAutocomplete<TFormValues extends object>({ form, name, label, type, defaultValue, ...otherProps }: FillingTagsAutocompleteProps<TFormValues>): JSX.Element;
2517
- declare namespace FillingTagsAutocomplete {
2518
- var defaultProps: {
2519
- label: string;
2520
- name: string;
2521
- };
2522
- }
2523
2473
  declare const _default$d: typeof FillingTagsAutocomplete;
2524
2474
 
2525
2475
  type FormChildren = ReactElement | ReactNode | boolean | null
@@ -2544,16 +2494,7 @@ declare type HeadingWithButtonProps = {
2544
2494
  className?: string;
2545
2495
  showButton?: boolean;
2546
2496
  } & ButtonProps;
2547
- declare function HeadingWithButton({ title, onClick, isEditing, icon, children, className, variant, showButton, ...otherProps }: HeadingWithButtonProps): JSX.Element;
2548
- declare namespace HeadingWithButton {
2549
- var defaultProps: {
2550
- isEditing: boolean;
2551
- icon: JSX.Element;
2552
- children: null;
2553
- variant: "white";
2554
- showButton: boolean;
2555
- };
2556
- }
2497
+ declare function HeadingWithButton({ title, onClick, isEditing, icon, children, className, variant, showButton, ...otherProps }: HeadingWithButtonProps): JSX.Element;
2557
2498
 
2558
2499
  type TariffGroupAutocompleteProps<TFormValues> = {
2559
2500
  name?: string
@@ -2686,12 +2627,7 @@ type MeterFeaturesFormProps = {
2686
2627
 
2687
2628
  declare function MeterFeaturesForm(props: MeterFeaturesFormProps): JSX.Element;
2688
2629
 
2689
- declare const PartialPayer: {
2690
- <T extends object>(props: PartialPayerProps<T>): JSX.Element;
2691
- defaultProps: {
2692
- variant: string;
2693
- };
2694
- };
2630
+ declare const PartialPayer: <T extends object>(props: PartialPayerProps<T>) => JSX.Element;
2695
2631
 
2696
2632
  declare type ReplaceableCountersBlockProps<TFormValue extends FieldValues$1> = {
2697
2633
  form: UseFormReturn<TFormValue>;
@@ -2702,21 +2638,9 @@ declare function ReplaceableCountersBlock<TFormValues extends FieldValues$1>({ f
2702
2638
  declare const _default$c: typeof ReplaceableCountersBlock;
2703
2639
 
2704
2640
  declare function DistrictAutocomplete<TFormValues extends object>(props: DistrictAutocompleteProps<TFormValues>): JSX.Element;
2705
- declare namespace DistrictAutocomplete {
2706
- var defaultProps: {
2707
- label: string;
2708
- name: string;
2709
- cityName: string;
2710
- };
2711
- }
2712
2641
  declare const _default$b: typeof DistrictAutocomplete;
2713
2642
 
2714
2643
  declare function TariffGroupAutocomplete<TFormValues extends object>(props: TariffGroupAutocompleteProps<TFormValues>): JSX.Element;
2715
- declare namespace TariffGroupAutocomplete {
2716
- var defaultProps: {
2717
- name: string;
2718
- };
2719
- }
2720
2644
  declare const _default$a: typeof TariffGroupAutocomplete;
2721
2645
 
2722
2646
  declare const CommonTariffFieldsSchema: yup.ObjectSchema<{
@@ -2870,17 +2794,7 @@ type MapOverlayProps = {
2870
2794
  children: ReactElement
2871
2795
  }
2872
2796
 
2873
- declare function MapOverlay({ map, position, children }: MapOverlayProps): React$1.ReactPortal | null;
2874
- declare namespace MapOverlay {
2875
- var defaultProps: {
2876
- map: null;
2877
- position: {
2878
- lat: number;
2879
- lng: number;
2880
- };
2881
- children: null;
2882
- };
2883
- }
2797
+ declare function MapOverlay({ map, position, children, }: MapOverlayProps): React$1.ReactPortal | null;
2884
2798
 
2885
2799
  interface LinkProps
2886
2800
  extends Omit<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, "href"> {
@@ -3057,17 +2971,9 @@ type MetroAutocompleteProps<TFormValues> = {
3057
2971
  hideName?: string
3058
2972
  handleChange?: (name: string, id: number) => void
3059
2973
  metroStore: MetroStore
3060
- } & InputWithControllerProps$3<TFormValues>
2974
+ } & InputWithControllerProps$1<TFormValues>
3061
2975
 
3062
2976
  declare function MetroAutocomplete<TFormValues extends object>({ form, name, label, hideName, defaultValue, handleChange, metroStore, ...otherProps }: MetroAutocompleteProps<TFormValues>): JSX.Element;
3063
- declare namespace MetroAutocomplete {
3064
- var defaultProps: {
3065
- label: string;
3066
- hideName: string;
3067
- name: string;
3068
- handleChange: () => null;
3069
- };
3070
- }
3071
2977
  declare const _default$3: typeof MetroAutocomplete;
3072
2978
 
3073
2979
  type MetroBlockProps$1 = {