@crystaldesign/diva-backoffice 25.4.0-beta.41 → 25.4.0-beta.42

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.
@@ -35731,6 +35731,16 @@ function useModule (currentModules) {
35731
35731
  to: 'catalogs/idmeditor/catalogs/' + catalogId + '/options' + (searchParams ? '?' + searchParams.toString() : ''),
35732
35732
  children: t('backoffice.menu.items.label.IDMCatalogEditorTableOptions')
35733
35733
  })
35734
+ }, {
35735
+ key: 'catalogoptions',
35736
+ style: {
35737
+ margin: 0
35738
+ },
35739
+ icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
35740
+ label: /*#__PURE__*/jsx(Link, {
35741
+ to: 'catalogs/idmeditor/catalogs/' + catalogId + '/catalogoptions' + (searchParams ? '?' + searchParams.toString() : ''),
35742
+ children: t('backoffice.menu.items.label.IDMCatalogEditorTableCatalogOptions')
35743
+ })
35734
35744
  }, {
35735
35745
  key: 'optiongroups',
35736
35746
  style: {
@@ -36736,6 +36746,184 @@ var TableOptions = observer(function () {
36736
36746
  });
36737
36747
  });
36738
36748
 
36749
+ function CatalogOptions(_ref) {
36750
+ var organizationId = _ref.organizationId,
36751
+ selectedCatalog = _ref.selectedCatalog,
36752
+ apiConfig = _ref.apiConfig;
36753
+ var applicationData = useMemo(function () {
36754
+ return {
36755
+ organizationId: organizationId,
36756
+ catalogId: selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog._id
36757
+ };
36758
+ }, [organizationId, selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog._id]);
36759
+ var configuration = useMemo(function () {
36760
+ return {
36761
+ type: 'dotnetSSM',
36762
+ idCol: '_id',
36763
+ apiInterface: {
36764
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/options',
36765
+ create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/options',
36766
+ restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/options/${_id}',
36767
+ "delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/options/${_id}',
36768
+ update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/options/${_id}'
36769
+ },
36770
+ dateFormat: 'DD.MM.YYYY, HH:mm:ss',
36771
+ floatingFilter: true,
36772
+ colDef: [{
36773
+ field: 'optionKey',
36774
+ required: true,
36775
+ unique: true
36776
+ }, {
36777
+ headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
36778
+ field: 'sequenceNo',
36779
+ cellDataType: 'number'
36780
+ }, createTranslatedColumnConfig('optionText', 'backoffice.idmCatalog.options.label.optionText', selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds, true), createTranslatedColumnConfig('optionCommentText', 'backoffice.idmCatalog.options.label.optionCommentText', selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds), {
36781
+ headerName: 'backoffice.idmCatalog.options.label.optionFreeText',
36782
+ field: 'optionFreeText',
36783
+ cellDataType: 'boolean'
36784
+ }, {
36785
+ field: 'featureIds',
36786
+ headerName: 'backoffice.idmCatalogEditor.catalogoptions.label.featureIds',
36787
+ cellDataType: 'lookup',
36788
+ editable: true,
36789
+ required: true,
36790
+ customParams: {
36791
+ nameField: 'featureNosDisplayTexts',
36792
+ filterCellType: 'objectId',
36793
+ displayLabelTemplate: '${name} (${value})',
36794
+ apiInterface: {
36795
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
36796
+ },
36797
+ lookupValue: 'featureText',
36798
+ lookupKey: '_id',
36799
+ lookupKeyFilterType: {
36800
+ type: 'equals',
36801
+ filterType: 'text'
36802
+ },
36803
+ multiple: true,
36804
+ translated: true
36805
+ },
36806
+ additionalFields: ['featureNosDisplayTexts'],
36807
+ isDictionary: true
36808
+ }, {
36809
+ headerName: 'backoffice.idmCatalog.items.label.validation',
36810
+ children: [{
36811
+ headerName: 'backoffice.idmCatalog.general.label.validFromDate',
36812
+ field: 'validFromDate',
36813
+ cellDataType: 'dateString'
36814
+ }, {
36815
+ headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
36816
+ field: 'validUntilDate',
36817
+ cellDataType: 'dateString'
36818
+ }]
36819
+ }, {
36820
+ headerName: 'backoffice.idmCatalog.options.label.material',
36821
+ children: [{
36822
+ headerName: 'backoffice.idmCatalog.options.label.materialNo',
36823
+ field: 'materialNo'
36824
+ }, {
36825
+ headerName: 'backoffice.idmCatalog.options.label.materialColorR',
36826
+ field: 'materialColorR',
36827
+ cellDataType: 'number'
36828
+ }, {
36829
+ headerName: 'backoffice.idmCatalog.options.label.materialColorG',
36830
+ field: 'materialColorG',
36831
+ cellDataType: 'number'
36832
+ }, {
36833
+ headerName: 'backoffice.idmCatalog.options.label.materialColorB',
36834
+ field: 'materialColorR',
36835
+ cellDataType: 'number'
36836
+ }]
36837
+ }, {
36838
+ headerName: 'backoffice.idmCatalog.options.label.measurement',
36839
+ children: [{
36840
+ headerName: 'backoffice.idmCatalog.options.label.measureNo',
36841
+ field: 'measureNo',
36842
+ cellDataType: 'number'
36843
+ }, {
36844
+ headerName: 'backoffice.idmCatalog.options.label.measureValue',
36845
+ field: 'measureValue',
36846
+ cellDataType: 'number'
36847
+ }, {
36848
+ headerName: 'backoffice.idmCatalog.options.label.measureUnit',
36849
+ field: 'measureUnit'
36850
+ }]
36851
+ }, {
36852
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
36853
+ field: 'lastUpdatedDate',
36854
+ cellDataType: 'dateString',
36855
+ editable: false
36856
+ }, {
36857
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
36858
+ field: 'lastUpdatedByDisplayText',
36859
+ editable: false
36860
+ }, {
36861
+ headerName: 'backoffice.idmCatalog.general.label.createdDate',
36862
+ field: 'createdDate',
36863
+ cellDataType: 'dateString',
36864
+ editable: false
36865
+ }, {
36866
+ headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
36867
+ field: 'createdByDisplayText',
36868
+ editable: false
36869
+ }, {
36870
+ headerName: 'backoffice.idmCatalog.general.label._id',
36871
+ field: '_id',
36872
+ cellDataType: 'objectId',
36873
+ editable: false
36874
+ }, {
36875
+ field: 'organizationId',
36876
+ editable: false,
36877
+ hide: true,
36878
+ lockVisible: true,
36879
+ suppressColumnsToolPanel: true,
36880
+ defaultValue: '${organizationId}'
36881
+ }, {
36882
+ field: 'catalogId',
36883
+ editable: false,
36884
+ hide: true,
36885
+ lockVisible: true,
36886
+ suppressColumnsToolPanel: true,
36887
+ defaultValue: '${catalogId}'
36888
+ }]
36889
+ };
36890
+ }, [selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds]);
36891
+ return /*#__PURE__*/jsx(Spreadsheet, {
36892
+ gridId: 'crud-grid_catalogoptions',
36893
+ applicationData: applicationData,
36894
+ configuration: configuration
36895
+ });
36896
+ }
36897
+
36898
+ var TableCatalogOptions = observer(function () {
36899
+ var _useTranslation = useTranslation(),
36900
+ t = _useTranslation.t;
36901
+ var _useModule = useModule(['catalogoptions']),
36902
+ selectedCatalog = _useModule.selectedCatalog,
36903
+ apiConfig = _useModule.apiConfig,
36904
+ organizationId = _useModule.organizationId;
36905
+ return /*#__PURE__*/jsxs(Fragment, {
36906
+ children: [/*#__PURE__*/jsx(Descriptions$1, {
36907
+ title: /*#__PURE__*/jsxs("div", {
36908
+ children: [t('backoffice.menu.items.label.IDMCatalogEditorTableCatalogOptions'), /*#__PURE__*/jsxs(Space$1, {
36909
+ style: {
36910
+ "float": 'right'
36911
+ },
36912
+ children: [/*#__PURE__*/jsx(CatalogSelector$1, {
36913
+ modules: ['options']
36914
+ }), /*#__PURE__*/jsx(FeatureSelector$1, {
36915
+ modules: ['options']
36916
+ })]
36917
+ })]
36918
+ })
36919
+ }), selectedCatalog && /*#__PURE__*/jsx(CatalogOptions, {
36920
+ organizationId: organizationId,
36921
+ selectedCatalog: selectedCatalog,
36922
+ apiConfig: apiConfig
36923
+ })]
36924
+ });
36925
+ });
36926
+
36739
36927
  var TableFeatureClasses = observer(function () {
36740
36928
  var _useTranslation = useTranslation(),
36741
36929
  t = _useTranslation.t;
@@ -39132,6 +39320,9 @@ function Content$2() {
39132
39320
  }), /*#__PURE__*/jsx(Route, {
39133
39321
  path: ":catalogId/options",
39134
39322
  element: /*#__PURE__*/jsx(TableOptions, {})
39323
+ }), /*#__PURE__*/jsx(Route, {
39324
+ path: ":catalogId/catalogoptions",
39325
+ element: /*#__PURE__*/jsx(TableCatalogOptions, {})
39135
39326
  }), /*#__PURE__*/jsx(Route, {
39136
39327
  path: ":catalogId/optiongroups",
39137
39328
  element: /*#__PURE__*/jsx(TableOptionGroups, {})
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { ApiConfig } from '@crystaldesign/diva-core';
3
+ import { CatalogData } from '../types';
4
+ export default function CatalogOptions({ organizationId, selectedCatalog, apiConfig, }: {
5
+ organizationId: string;
6
+ selectedCatalog: CatalogData;
7
+ apiConfig: ApiConfig;
8
+ }): React.JSX.Element;
9
+ //# sourceMappingURL=CatalogOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CatalogOptions.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCatalogEditor/Tables/CatalogOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,cAAc,EACd,eAAe,EACf,SAAS,GACV,EAAE;IACD,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,WAAW,CAAC;IAC7B,SAAS,EAAE,SAAS,CAAC;CACtB,qBA0KA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useModule.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCatalogEditor/hooks/useModule.tsx"],"names":[],"mappings":"AASA,MAAM,CAAC,OAAO,WAAW,cAAc,EAAE,MAAM,EAAE;;;;;;;EA4JhD"}
1
+ {"version":3,"file":"useModule.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCatalogEditor/hooks/useModule.tsx"],"names":[],"mappings":"AASA,MAAM,CAAC,OAAO,WAAW,cAAc,EAAE,MAAM,EAAE;;;;;;;EAsKhD"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCatalogEditor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAcxD,UAAU,KAAK;IACb,aAAa,EAAE,6BAA6B,CAAC;IAC7C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,EAAE,KAAK,qBAMjC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCatalogEditor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAexD,UAAU,KAAK;IACb,aAAa,EAAE,6BAA6B,CAAC;IAC7C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,EAAE,KAAK,qBAMjC"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare const TableCatalogOptions: (() => React.JSX.Element) & {
3
+ displayName: string;
4
+ };
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/modules/TableCatalogOptions/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,eAAO,MAAM,mBAAmB;;CAoB9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-backoffice",
3
- "version": "25.4.0-beta.41",
3
+ "version": "25.4.0-beta.42",
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.4.0-beta.41",
19
- "@crystaldesign/content-item": "25.4.0-beta.41",
20
- "@crystaldesign/diva-core": "25.4.0-beta.41",
21
- "@crystaldesign/diva-utils": "25.4.0-beta.41",
22
- "@crystaldesign/media-upload": "25.4.0-beta.41",
23
- "@crystaldesign/rtf-editor": "25.4.0-beta.41",
24
- "@crystaldesign/spreadsheet": "25.4.0-beta.41",
18
+ "@crystaldesign/content-box": "25.4.0-beta.42",
19
+ "@crystaldesign/content-item": "25.4.0-beta.42",
20
+ "@crystaldesign/diva-core": "25.4.0-beta.42",
21
+ "@crystaldesign/diva-utils": "25.4.0-beta.42",
22
+ "@crystaldesign/media-upload": "25.4.0-beta.42",
23
+ "@crystaldesign/rtf-editor": "25.4.0-beta.42",
24
+ "@crystaldesign/spreadsheet": "25.4.0-beta.42",
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": "b77dccd11273afaf09652d8b4b40a5d28c6d8829"
54
+ "gitHead": "d71f05002ed13ce7246f98ad38c260743061ed06"
55
55
  }