@crystaldesign/diva-backoffice 25.10.0-beta.14 → 25.10.0-beta.15

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 (76) hide show
  1. package/build/esm/index.js +1597 -822
  2. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Items.d.ts +5 -3
  3. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Items.d.ts.map +1 -1
  4. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Options.d.ts +4 -3
  5. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Options.d.ts.map +1 -1
  6. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PartlistPos.d.ts +3 -3
  7. package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PartlistPos.d.ts.map +1 -1
  8. package/build/types/backoffice/src/ui/IDMCatalogEditor/hooks/useCatalogContext.d.ts.map +1 -1
  9. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableCatalogs/index.d.ts.map +1 -1
  10. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableItems/index.d.ts.map +1 -1
  11. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableOptions/index.d.ts.map +1 -1
  12. package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePrices/index.d.ts.map +1 -1
  13. package/build/types/backoffice/src/ui/IDMCommonComponents/ActionMenu/components/ExportModal.d.ts +12 -0
  14. package/build/types/backoffice/src/ui/IDMCommonComponents/ActionMenu/components/ExportModal.d.ts.map +1 -0
  15. package/build/types/backoffice/src/ui/IDMCommonComponents/ActionMenu/components/Modals.d.ts +13 -0
  16. package/build/types/backoffice/src/ui/IDMCommonComponents/ActionMenu/components/Modals.d.ts.map +1 -0
  17. package/build/types/backoffice/src/ui/IDMCommonComponents/ActionMenu/index.d.ts +14 -0
  18. package/build/types/backoffice/src/ui/IDMCommonComponents/ActionMenu/index.d.ts.map +1 -0
  19. package/build/types/backoffice/src/ui/IDMCommonComponents/ActionMenu/menuUtils.d.ts +12 -0
  20. package/build/types/backoffice/src/ui/IDMCommonComponents/ActionMenu/menuUtils.d.ts.map +1 -0
  21. package/build/types/backoffice/src/ui/IDMCommonComponents/ActionMenu/types.d.ts +79 -0
  22. package/build/types/backoffice/src/ui/IDMCommonComponents/ActionMenu/types.d.ts.map +1 -0
  23. package/build/types/backoffice/src/ui/IDMCommonComponents/ActionMenu/useModalOpenState.d.ts +11 -0
  24. package/build/types/backoffice/src/ui/IDMCommonComponents/ActionMenu/useModalOpenState.d.ts.map +1 -0
  25. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/elements/Checkbox/index.d.ts +12 -0
  26. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/elements/Checkbox/index.d.ts.map +1 -0
  27. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/elements/Dragger/DraggerComponent.d.ts +37 -0
  28. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/elements/Dragger/DraggerComponent.d.ts.map +1 -0
  29. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/elements/Dragger/index.d.ts +16 -0
  30. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/elements/Dragger/index.d.ts.map +1 -0
  31. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/elements/Dragger/utils.d.ts +28 -0
  32. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/elements/Dragger/utils.d.ts.map +1 -0
  33. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/elements/Input/index.d.ts +13 -0
  34. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/elements/Input/index.d.ts.map +1 -0
  35. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/index.d.ts +22 -0
  36. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/index.d.ts.map +1 -0
  37. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/types.d.ts +57 -0
  38. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/types.d.ts.map +1 -0
  39. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/useForm.d.ts +23 -0
  40. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/useForm.d.ts.map +1 -0
  41. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/utils.d.ts +10 -0
  42. package/build/types/backoffice/src/ui/IDMCommonComponents/Form/utils.d.ts.map +1 -0
  43. package/build/types/backoffice/src/ui/IDMCommonComponents/InformationButton.d.ts +7 -0
  44. package/build/types/backoffice/src/ui/IDMCommonComponents/InformationButton.d.ts.map +1 -1
  45. package/build/types/backoffice/src/ui/IDMCommonComponents/Setting/index.d.ts +18 -0
  46. package/build/types/backoffice/src/ui/IDMCommonComponents/Setting/index.d.ts.map +1 -0
  47. package/build/types/backoffice/src/ui/IDMCommonComponents/SpreadsheetWrapper/index.d.ts.map +1 -1
  48. package/build/types/backoffice/src/ui/IDMCommonComponents/UploadModal/index.d.ts +21 -0
  49. package/build/types/backoffice/src/ui/IDMCommonComponents/UploadModal/index.d.ts.map +1 -0
  50. package/build/types/backoffice/src/ui/IDMCommonComponents/UploadModal/types.d.ts +42 -0
  51. package/build/types/backoffice/src/ui/IDMCommonComponents/UploadModal/types.d.ts.map +1 -0
  52. package/build/types/backoffice/src/ui/IDMCommonComponents/UploadModal/useUploadState.d.ts +36 -0
  53. package/build/types/backoffice/src/ui/IDMCommonComponents/UploadModal/useUploadState.d.ts.map +1 -0
  54. package/build/types/backoffice/src/ui/IDMCommonComponents/UploadModalbutton/index.d.ts +22 -0
  55. package/build/types/backoffice/src/ui/IDMCommonComponents/UploadModalbutton/index.d.ts.map +1 -0
  56. package/build/types/backoffice/src/ui/IDMCommonComponents/commonEnums.d.ts +42 -0
  57. package/build/types/backoffice/src/ui/IDMCommonComponents/commonEnums.d.ts.map +1 -1
  58. package/build/types/backoffice/src/ui/IDMCommonComponents/createTranslatedColumnConfig.d.ts +13 -0
  59. package/build/types/backoffice/src/ui/IDMCommonComponents/createTranslatedColumnConfig.d.ts.map +1 -1
  60. package/build/types/backoffice/src/ui/IDMCommonComponents/useLoadingModal.d.ts +18 -0
  61. package/build/types/backoffice/src/ui/IDMCommonComponents/useLoadingModal.d.ts.map +1 -1
  62. package/build/types/backoffice/src/ui/IDMCommonComponents/usePriceFeatureGroupsFromSerie.d.ts +13 -0
  63. package/build/types/backoffice/src/ui/IDMCommonComponents/usePriceFeatureGroupsFromSerie.d.ts.map +1 -1
  64. package/build/types/backoffice/src/ui/IDMCommonComponents/useTools.d.ts +29 -0
  65. package/build/types/backoffice/src/ui/IDMCommonComponents/useTools.d.ts.map +1 -1
  66. package/package.json +9 -9
  67. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadModalButton/UploadForm.d.ts +0 -10
  68. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadModalButton/UploadForm.d.ts.map +0 -1
  69. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadModalButton/UploadModal.d.ts +0 -10
  70. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadModalButton/UploadModal.d.ts.map +0 -1
  71. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadModalButton/index.d.ts +0 -9
  72. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadModalButton/index.d.ts.map +0 -1
  73. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadModalButton/useUploadState.d.ts +0 -19
  74. package/build/types/backoffice/src/ui/IDMCatalogEditor/components/UploadModalButton/useUploadState.d.ts.map +0 -1
  75. package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/Setting/index.d.ts +0 -8
  76. package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/Setting/index.d.ts.map +0 -1
@@ -0,0 +1,42 @@
1
+ import { FormRef } from '../Form';
2
+ import { FormItemProps } from '../Form/types';
3
+ /**
4
+ * Base props for upload modal functionality
5
+ */
6
+ export interface BaseUploadModalProps {
7
+ /** Authentication token for the upload request */
8
+ authToken: string;
9
+ /** Additional form fields to include in the upload modal */
10
+ additionalFields?: FormItemProps[];
11
+ /** Comma-separated list of accepted file types */
12
+ acceptedFileTypes: string;
13
+ /** Query parameters to include in the upload request */
14
+ queryParams?: Record<string, string>;
15
+ /** Endpoint URL for the upload request */
16
+ endpoint: string;
17
+ /** Callback function when upload is completed successfully */
18
+ onUploadComplete?: (response: any) => void;
19
+ /** Callback function to close the modal */
20
+ onClose: () => void;
21
+ /** Hint text to display in the upload area */
22
+ uploadHint: string;
23
+ /** Whether to automatically zip files before upload */
24
+ autoZip?: boolean;
25
+ }
26
+ /**
27
+ * Props for the UploadModal component
28
+ */
29
+ export interface UploadModalProps extends BaseUploadModalProps {
30
+ /** Title text for the modal */
31
+ modalTitle: string;
32
+ /** Whether the modal is currently open */
33
+ isOpen: boolean;
34
+ }
35
+ /**
36
+ * Props for the useUploadModal hook
37
+ */
38
+ export interface UploadModalHookProps extends BaseUploadModalProps {
39
+ /** Reference to the form component */
40
+ formRef: React.RefObject<FormRef>;
41
+ }
42
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCommonComponents/UploadModal/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,gBAAgB,CAAC,EAAE,aAAa,EAAE,CAAC;IACnC,kDAAkD;IAClD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAC;IAC3C,2CAA2C;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE,sCAAsC;IACtC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;CACnC"}
@@ -0,0 +1,36 @@
1
+ import { FormItemProps } from '../Form/types';
2
+ import { RcFile } from 'antd/es/upload';
3
+ import { UploadModalHookProps } from './types';
4
+ /**
5
+ * Custom hook for managing upload modal state and functionality
6
+ *
7
+ * @param props - The hook props
8
+ * @param props.authToken - Authentication token for the upload request
9
+ * @param props.additionalFields - Additional form fields to include
10
+ * @param props.acceptedFileTypes - Comma-separated list of accepted file types
11
+ * @param props.queryParams - Query parameters for the upload request
12
+ * @param props.endpoint - Endpoint URL for the upload request
13
+ * @param props.onUploadComplete - Callback when upload completes
14
+ * @param props.formRef - Reference to the form component
15
+ * @param props.onClose - Callback to close the modal
16
+ * @param props.uploadHint - Hint text for the upload area
17
+ * @param props.autoZip - Whether to automatically zip files
18
+ * @returns Object containing upload state and handlers
19
+ * @returns {boolean} loading - Whether an upload is currently in progress
20
+ * @returns {number} progress - Current upload progress percentage
21
+ * @returns {string|undefined} error - Current error message if any
22
+ * @returns {Function} onSave - Handler for form submission and upload
23
+ * @returns {FormItemProps[]} fields - Form field configurations
24
+ * @returns {RcFile|undefined} currentFile - Currently selected file
25
+ * @returns {Function} onModalClose - Handler to close the modal and reset state
26
+ */
27
+ export default function useUploadModal({ authToken, additionalFields, acceptedFileTypes, queryParams, endpoint, onUploadComplete, formRef, onClose, uploadHint, autoZip, }: UploadModalHookProps): {
28
+ loading: boolean;
29
+ progress: number;
30
+ error: string | undefined;
31
+ onSave: (values: any) => Promise<void>;
32
+ fields: FormItemProps[];
33
+ currentFile: RcFile | undefined;
34
+ onModalClose: () => void;
35
+ };
36
+ //# sourceMappingURL=useUploadState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUploadState.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCommonComponents/UploadModal/useUploadState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,OAAO,EACP,UAAU,EACV,OAAO,GACR,EAAE,oBAAoB;;;;qBAmCS,GAAG;;;;EA+ElC"}
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { UploadModalProps } from '../UploadModal';
3
+ /**
4
+ * Props for the UploadModalButton component
5
+ */
6
+ export interface UploadModalButtonProps extends Omit<UploadModalProps, 'isOpen' | 'onClose'> {
7
+ /** Button text to display */
8
+ buttonText: string;
9
+ /** Callback when modal is closed */
10
+ onClose?: () => void;
11
+ }
12
+ /**
13
+ * Button component that opens an upload modal when clicked
14
+ *
15
+ * @param props - The component props
16
+ * @param props.buttonText - Text to display on the button
17
+ * @param props.onClose - Optional callback when modal is closed
18
+ * @param props - Additional props passed to the UploadModal component
19
+ * @returns JSX element representing the upload modal button
20
+ */
21
+ export default function UploadModalButton({ buttonText, onClose, ...props }: UploadModalButtonProps): React.JSX.Element;
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCommonComponents/UploadModalbutton/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAoB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC1F,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,qBAiBlG"}
@@ -1,28 +1,70 @@
1
1
  import { TFunction } from 'i18next';
2
+ /**
3
+ * Returns an array of currency options with translated names
4
+ *
5
+ * @param t - Translation function from i18next
6
+ * @returns Array of currency objects with name and value properties
7
+ */
2
8
  export declare const getCurrencyKey: (t: TFunction) => {
3
9
  name: string;
4
10
  value: string;
5
11
  }[];
12
+ /**
13
+ * Returns an array of language options with translated names
14
+ *
15
+ * @param t - Translation function from i18next
16
+ * @returns Array of language objects with name and value properties
17
+ */
6
18
  export declare const getLanguageKey: (t: TFunction) => {
7
19
  name: string;
8
20
  value: string;
9
21
  }[];
22
+ /**
23
+ * Returns an array of country options with translated names
24
+ *
25
+ * @param t - Translation function from i18next
26
+ * @returns Array of country objects with name and value properties
27
+ */
10
28
  export declare const getCountryKey: (t: TFunction) => {
11
29
  name: string;
12
30
  value: string;
13
31
  }[];
32
+ /**
33
+ * Returns an array of form of address options with translated names
34
+ *
35
+ * @param t - Translation function from i18next
36
+ * @returns Array of form of address objects with name and value properties
37
+ */
14
38
  export declare const getFormOfAddressKey: (t: TFunction) => {
15
39
  name: string;
16
40
  value: number;
17
41
  }[];
42
+ /**
43
+ * Returns an array of layer ID options with translated names
44
+ *
45
+ * @param t - Translation function from i18next
46
+ * @returns Array of layer ID objects with name and value properties
47
+ */
18
48
  export declare const getLayerIdKey: (t: TFunction) => {
19
49
  name: string;
20
50
  value: number;
21
51
  }[];
52
+ /**
53
+ * Returns an array of info type options with translated names
54
+ *
55
+ * @param t - Translation function from i18next
56
+ * @returns Array of info type objects with name and value properties
57
+ */
22
58
  export declare const getInfoTypeKey: (t: TFunction) => {
23
59
  name: string;
24
60
  value: number;
25
61
  }[];
62
+ /**
63
+ * Returns an array of item type options with translated names
64
+ *
65
+ * @param t - Translation function from i18next
66
+ * @returns Array of item type objects with name and value properties
67
+ */
26
68
  export declare const getItemTypeKey: (t: TFunction) => {
27
69
  name: string;
28
70
  value: string;
@@ -1 +1 @@
1
- {"version":3,"file":"commonEnums.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCommonComponents/commonEnums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,cAAc,MAAO,SAAS;;;GAK1C,CAAC;AAEF,eAAO,MAAM,cAAc,MAAO,SAAS;;;GAK1C,CAAC;AAEF,eAAO,MAAM,aAAa,MAAO,SAAS;;;GAQzC,CAAC;AAEF,eAAO,MAAM,mBAAmB,MAAO,SAAS;;;GAG/C,CAAC;AAEF,eAAO,MAAM,aAAa,MAAO,SAAS;;;GAOzC,CAAC;AAEF,eAAO,MAAM,cAAc,MAAO,SAAS;;;GAe1C,CAAC;AAEF,eAAO,MAAM,cAAc,MAAO,SAAS;;;GA2B1C,CAAC"}
1
+ {"version":3,"file":"commonEnums.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCommonComponents/commonEnums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;GAKG;AACH,eAAO,MAAM,cAAc,MAAO,SAAS;;;GAK1C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,MAAO,SAAS;;;GAK1C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,MAAO,SAAS;;;GAQzC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,MAAO,SAAS;;;GAG/C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,MAAO,SAAS;;;GAOzC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,MAAO,SAAS;;;GAe1C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,MAAO,SAAS;;;GA2B1C,CAAC"}
@@ -1,4 +1,17 @@
1
1
  import { CellDataTypes } from '@crystaldesign/spreadsheet';
2
+ /**
3
+ * Creates a column configuration for translated fields in a spreadsheet
4
+ *
5
+ * @param field - The base field name for the translated column
6
+ * @param headerName - The header name to display for the column
7
+ * @param languages - Array of language codes to create columns for (defaults to ['DE'])
8
+ * @param required - Whether the field is required
9
+ * @param cellDataType - The data type for the cell
10
+ * @param customParams - Custom parameters to be applied to each language variant
11
+ * @param additionalFields - Additional fields to be included with each language variant
12
+ * @param editable - Whether the field is editable
13
+ * @returns Column configuration object for the spreadsheet
14
+ */
2
15
  export default function createTranslatedColumnConfig(field: string, headerName: string, languages?: string[], required?: boolean, cellDataType?: CellDataTypes, customParams?: any, additionalFields?: string[], editable?: boolean): {
3
16
  headerName: string;
4
17
  field: string;
@@ -1 +1 @@
1
- {"version":3,"file":"createTranslatedColumnConfig.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCommonComponents/createTranslatedColumnConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAClD,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,EAAE,EACpB,QAAQ,GAAE,OAAe,EACzB,YAAY,CAAC,EAAE,aAAa,EAC5B,YAAY,CAAC,EAAE,GAAG,EAClB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAC3B,QAAQ,GAAE,OAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCzB"}
1
+ {"version":3,"file":"createTranslatedColumnConfig.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCommonComponents/createTranslatedColumnConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAClD,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,EAAE,EACpB,QAAQ,GAAE,OAAe,EACzB,YAAY,CAAC,EAAE,aAAa,EAC5B,YAAY,CAAC,EAAE,GAAG,EAClB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAC3B,QAAQ,GAAE,OAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCzB"}
@@ -1,10 +1,28 @@
1
1
  import React from 'react';
2
+ /**
3
+ * State interface for the loading modal hook
4
+ */
2
5
  export interface LoadingModalState {
6
+ /** Function to show a loading modal with text */
3
7
  showLoadingModal: (text: string) => void;
8
+ /** Function to show an error modal with error message */
4
9
  showErrorModal: (error: string) => void;
10
+ /** Function to show a warning modal with warning message */
5
11
  showWarningModal: (warning: string) => void;
12
+ /** Function to close the current modal */
6
13
  closeModal: () => void;
14
+ /** Context holder element for the modal */
7
15
  contextHolder: React.ReactElement;
8
16
  }
17
+ /**
18
+ * Custom hook for managing loading, error, and warning modals
19
+ *
20
+ * @returns Object containing modal management functions and context holder
21
+ * @returns {Function} showLoadingModal - Function to show a loading modal
22
+ * @returns {Function} showErrorModal - Function to show an error modal
23
+ * @returns {Function} showWarningModal - Function to show a warning modal
24
+ * @returns {Function} closeModal - Function to close the current modal
25
+ * @returns {React.ReactElement} contextHolder - Context holder element
26
+ */
9
27
  export declare const useLoadingModal: () => LoadingModalState;
10
28
  //# sourceMappingURL=useLoadingModal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLoadingModal.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCommonComponents/useLoadingModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAIrD,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,gBAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,aAAa,EAAE,KAAK,CAAC,YAAY,CAAC;CACnC;AAED,eAAO,MAAM,eAAe,QAAO,iBAuElC,CAAC"}
1
+ {"version":3,"file":"useLoadingModal.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCommonComponents/useLoadingModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAIrD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,iDAAiD;IACjD,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,yDAAyD;IACzD,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,4DAA4D;IAC5D,gBAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,0CAA0C;IAC1C,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,2CAA2C;IAC3C,aAAa,EAAE,KAAK,CAAC,YAAY,CAAC;CACnC;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,QAAO,iBAuElC,CAAC"}
@@ -1,8 +1,21 @@
1
+ /**
2
+ * Interface for price feature group data
3
+ */
1
4
  export interface PriceFeatureGroup {
5
+ /** Unique identifier for the price feature group */
2
6
  id: string;
7
+ /** Display text for the price feature group */
3
8
  displayText: string;
9
+ /** Array of price feature keys */
4
10
  keys: string[];
11
+ /** Array of display texts for the price feature keys */
5
12
  keysDisplayTexts: (string | undefined)[];
6
13
  }
14
+ /**
15
+ * Custom hook that extracts and formats price feature groups from a serie
16
+ *
17
+ * @param serie - The serie object containing price feature group data
18
+ * @returns Array of PriceFeatureGroup objects
19
+ */
7
20
  export default function usePriceFeatureGroupsFromSerie(serie: any): PriceFeatureGroup[];
8
21
  //# sourceMappingURL=usePriceFeatureGroupsFromSerie.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePriceFeatureGroupsFromSerie.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCommonComponents/usePriceFeatureGroupsFromSerie.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,gBAAgB,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC;CAC1C;AACD,MAAM,CAAC,OAAO,UAAU,8BAA8B,CAAC,KAAK,EAAE,GAAG,uBAGhE"}
1
+ {"version":3,"file":"usePriceFeatureGroupsFromSerie.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCommonComponents/usePriceFeatureGroupsFromSerie.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,wDAAwD;IACxD,gBAAgB,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC;CAC1C;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,8BAA8B,CAAC,KAAK,EAAE,GAAG,uBAGhE"}
@@ -1,16 +1,45 @@
1
1
  import { Tool } from '../../layout/Navigation/types';
2
+ /**
3
+ * Props for the useTools hook
4
+ */
2
5
  export type UseToolsProps = {
6
+ /** Catalog ID for configurator tools */
3
7
  catalogId?: string;
8
+ /** Package ID for configurator tools */
4
9
  packageId?: string;
10
+ /** Serie object for configurator tools */
5
11
  serie?: any;
12
+ /** Item object with type number */
6
13
  item?: {
7
14
  typeNo: number;
8
15
  };
16
+ /** Whether to use API2 mode */
9
17
  isApi2?: boolean;
18
+ /** Main information window codex */
10
19
  mainInformationWindowCodex?: string;
20
+ /** Function to set serie */
11
21
  setSerie?: (serie: any) => void;
22
+ /** Function to set article */
12
23
  setArticle?: (serie: any) => void;
13
24
  };
25
+ /**
26
+ * Custom hook for managing tools and configurator functionality
27
+ *
28
+ * @param props - The hook props
29
+ * @param props.catalogId - Catalog ID for configurator tools
30
+ * @param props.packageId - Package ID for configurator tools
31
+ * @param props.isApi2 - Whether to use API2 mode
32
+ * @param props.mainInformationWindowCodex - Main information window codex
33
+ * @param props.serie - Serie object for configurator tools
34
+ * @param props.item - Item object with type number
35
+ * @param props.setSerie - Function to set serie
36
+ * @param props.setArticle - Function to set article
37
+ * @returns Object containing tool management functions
38
+ * @returns {Function} updateConfigurator - Function to update configurator parameters
39
+ * @returns {Function} openInformationWindow - Function to open information window
40
+ * @returns {Function} addSecondaryTables - Function to add secondary tables
41
+ * @returns {Function} removeSecondaryTables - Function to remove secondary tables
42
+ */
14
43
  export declare const useTools: ({ catalogId, packageId, isApi2, mainInformationWindowCodex, serie, item, setSerie, setArticle }: UseToolsProps) => {
15
44
  updateConfigurator: (parameters?: {
16
45
  [key: string]: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useTools.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCommonComponents/useTools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAErD,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,QAAQ,oGAAqG,aAAa;sCAyCtH;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;mCApC9B,MAAM,QAAQ,OAAO;mCAmBlB,IAAI,EAAE;oCASR,MAAM,EAAE;CA8EpB,CAAC"}
1
+ {"version":3,"file":"useTools.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCommonComponents/useTools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,mCAAmC;IACnC,IAAI,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1B,+BAA+B;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,8BAA8B;IAC9B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,QAAQ,oGAAqG,aAAa;sCAyCtH;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;mCApC9B,MAAM,QAAQ,OAAO;mCAmBlB,IAAI,EAAE;oCASR,MAAM,EAAE;CA8EpB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-backoffice",
3
- "version": "25.10.0-beta.14",
3
+ "version": "25.10.0-beta.15",
4
4
  "license": "COMMERCIAL",
5
5
  "devDependencies": {
6
6
  "@testing-library/jest-dom": "^6.5.0",
@@ -15,13 +15,13 @@
15
15
  "dependencies": {
16
16
  "@ant-design/icons": "5.4.0",
17
17
  "@babel/runtime": "7.24.7",
18
- "@crystaldesign/content-box": "25.10.0-beta.14",
19
- "@crystaldesign/content-item": "25.10.0-beta.14",
20
- "@crystaldesign/diva-core": "25.10.0-beta.14",
21
- "@crystaldesign/diva-utils": "25.10.0-beta.14",
22
- "@crystaldesign/media-upload": "25.10.0-beta.14",
23
- "@crystaldesign/rtf-editor": "25.10.0-beta.14",
24
- "@crystaldesign/spreadsheet": "25.10.0-beta.14",
18
+ "@crystaldesign/content-box": "25.10.0-beta.15",
19
+ "@crystaldesign/content-item": "25.10.0-beta.15",
20
+ "@crystaldesign/diva-core": "25.10.0-beta.15",
21
+ "@crystaldesign/diva-utils": "25.10.0-beta.15",
22
+ "@crystaldesign/media-upload": "25.10.0-beta.15",
23
+ "@crystaldesign/rtf-editor": "25.10.0-beta.15",
24
+ "@crystaldesign/spreadsheet": "25.10.0-beta.15",
25
25
  "@google/model-viewer": "3.5.0",
26
26
  "ag-charts-community": "^10.1.0",
27
27
  "ag-charts-react": "^10.1.0",
@@ -51,5 +51,5 @@
51
51
  },
52
52
  "module": "build/esm/index.js",
53
53
  "types": "./build/types/backoffice/src/index.d.ts",
54
- "gitHead": "75cf583f53ed99d4242d919eaa52556a33cbab55"
54
+ "gitHead": "dfafd54bfd9f8f2f8161dbacddea27cd2b0e10ab"
55
55
  }
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { UploadState } from './useUploadState';
3
- import { RcFile } from 'antd/es/upload/interface';
4
- export interface UploadFormProps {
5
- state: UploadState;
6
- updateState: (updates: Partial<UploadState>) => void;
7
- selectFile: (file: RcFile) => Promise<string | false>;
8
- }
9
- export default function UploadForm({ state, updateState, selectFile }: UploadFormProps): React.JSX.Element;
10
- //# sourceMappingURL=UploadForm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UploadForm.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/components/UploadModalButton/UploadForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACrD,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;CACvD;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,eAAe,qBAwErF"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { UploadFormProps } from './UploadForm';
3
- interface Props extends UploadFormProps {
4
- onUpload: () => void;
5
- onClose: () => void;
6
- isOpen: boolean;
7
- }
8
- export default function UploadModal({ state, onUpload, onClose, isOpen, ...props }: Props): React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=UploadModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UploadModal.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/components/UploadModalButton/UploadModal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAmB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG3D,UAAU,KAAM,SAAQ,eAAe;IACrC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,qBAiBxF"}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- interface Props {
3
- idmService: string;
4
- organizationId: string;
5
- onClose: () => void;
6
- }
7
- export default function UploadModalButton({ idmService, organizationId, onClose }: Props): React.JSX.Element;
8
- export {};
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/components/UploadModalButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,UAAU,KAAK;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,EAAE,KAAK,qBA0BvF"}
@@ -1,19 +0,0 @@
1
- import { UploadFile } from 'antd';
2
- import { RcFile } from 'antd/es/upload/interface';
3
- export interface UploadState {
4
- name: string;
5
- useOriginalMedia: boolean;
6
- error: string | undefined;
7
- fileList: UploadFile<any>[];
8
- uploadProgress: number;
9
- isUploading: boolean;
10
- fileToUpload: File | null;
11
- }
12
- export default function useUploadState(idmService: string, organizationId: string): {
13
- state: UploadState;
14
- updateState: (updates: Partial<UploadState>) => void;
15
- resetState: () => void;
16
- selectFile: (file: RcFile) => Promise<string | false>;
17
- handleUpload: () => Promise<void>;
18
- };
19
- //# sourceMappingURL=useUploadState.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useUploadState.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/components/UploadModalButton/useUploadState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAU,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAIlD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;;2BAarC,OAAO,CAAC,WAAW,CAAC;;uBAgB9B,MAAM;;EA4GvC"}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- export default function Setting({ title, tooltip, className, children, }: {
3
- title?: string;
4
- tooltip?: string;
5
- className?: string;
6
- children: React.ReactNode;
7
- }): React.JSX.Element;
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/ui/IDMEnricherEditor/Tables/Prices/Setting/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,KAAK,EACL,OAAO,EACP,SAAS,EACT,QAAQ,GACT,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBASA"}