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

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.
@@ -7902,6 +7902,9 @@ function loadConfiguration(t, root, config, lang) {
7902
7902
  label: t('backoffice.form.organizationdetails.items.api2Location.ek'),
7903
7903
  type: 'select',
7904
7904
  mode: 'single',
7905
+ required: function required(data) {
7906
+ return (data === null || data === void 0 ? void 0 : data.type) !== undefined;
7907
+ },
7905
7908
  hidden: function hidden(data) {
7906
7909
  return (data === null || data === void 0 ? void 0 : data.type) === undefined;
7907
7910
  },
@@ -35731,6 +35734,16 @@ function useModule (currentModules) {
35731
35734
  to: 'catalogs/idmeditor/catalogs/' + catalogId + '/options' + (searchParams ? '?' + searchParams.toString() : ''),
35732
35735
  children: t('backoffice.menu.items.label.IDMCatalogEditorTableOptions')
35733
35736
  })
35737
+ }, {
35738
+ key: 'catalogoptions',
35739
+ style: {
35740
+ margin: 0
35741
+ },
35742
+ icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
35743
+ label: /*#__PURE__*/jsx(Link, {
35744
+ to: 'catalogs/idmeditor/catalogs/' + catalogId + '/catalogoptions' + (searchParams ? '?' + searchParams.toString() : ''),
35745
+ children: t('backoffice.menu.items.label.IDMCatalogEditorTableCatalogOptions')
35746
+ })
35734
35747
  }, {
35735
35748
  key: 'optiongroups',
35736
35749
  style: {
@@ -36736,6 +36749,184 @@ var TableOptions = observer(function () {
36736
36749
  });
36737
36750
  });
36738
36751
 
36752
+ function CatalogOptions(_ref) {
36753
+ var organizationId = _ref.organizationId,
36754
+ selectedCatalog = _ref.selectedCatalog,
36755
+ apiConfig = _ref.apiConfig;
36756
+ var applicationData = useMemo(function () {
36757
+ return {
36758
+ organizationId: organizationId,
36759
+ catalogId: selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog._id
36760
+ };
36761
+ }, [organizationId, selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog._id]);
36762
+ var configuration = useMemo(function () {
36763
+ return {
36764
+ type: 'dotnetSSM',
36765
+ idCol: '_id',
36766
+ apiInterface: {
36767
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/options',
36768
+ create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/options',
36769
+ restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/options/${_id}',
36770
+ "delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/options/${_id}',
36771
+ update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/options/${_id}'
36772
+ },
36773
+ dateFormat: 'DD.MM.YYYY, HH:mm:ss',
36774
+ floatingFilter: true,
36775
+ colDef: [{
36776
+ field: 'optionKey',
36777
+ required: true,
36778
+ unique: true
36779
+ }, {
36780
+ headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
36781
+ field: 'sequenceNo',
36782
+ cellDataType: 'number'
36783
+ }, 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), {
36784
+ headerName: 'backoffice.idmCatalog.options.label.optionFreeText',
36785
+ field: 'optionFreeText',
36786
+ cellDataType: 'boolean'
36787
+ }, {
36788
+ field: 'featureIds',
36789
+ headerName: 'backoffice.idmCatalogEditor.catalogoptions.label.featureIds',
36790
+ cellDataType: 'lookup',
36791
+ editable: true,
36792
+ required: true,
36793
+ customParams: {
36794
+ nameField: 'featureNosDisplayTexts',
36795
+ filterCellType: 'objectId',
36796
+ displayLabelTemplate: '${name} (${value})',
36797
+ apiInterface: {
36798
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
36799
+ },
36800
+ lookupValue: 'featureText',
36801
+ lookupKey: '_id',
36802
+ lookupKeyFilterType: {
36803
+ type: 'equals',
36804
+ filterType: 'text'
36805
+ },
36806
+ multiple: true,
36807
+ translated: true
36808
+ },
36809
+ additionalFields: ['featureNosDisplayTexts'],
36810
+ isDictionary: true
36811
+ }, {
36812
+ headerName: 'backoffice.idmCatalog.items.label.validation',
36813
+ children: [{
36814
+ headerName: 'backoffice.idmCatalog.general.label.validFromDate',
36815
+ field: 'validFromDate',
36816
+ cellDataType: 'dateString'
36817
+ }, {
36818
+ headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
36819
+ field: 'validUntilDate',
36820
+ cellDataType: 'dateString'
36821
+ }]
36822
+ }, {
36823
+ headerName: 'backoffice.idmCatalog.options.label.material',
36824
+ children: [{
36825
+ headerName: 'backoffice.idmCatalog.options.label.materialNo',
36826
+ field: 'materialNo'
36827
+ }, {
36828
+ headerName: 'backoffice.idmCatalog.options.label.materialColorR',
36829
+ field: 'materialColorR',
36830
+ cellDataType: 'number'
36831
+ }, {
36832
+ headerName: 'backoffice.idmCatalog.options.label.materialColorG',
36833
+ field: 'materialColorG',
36834
+ cellDataType: 'number'
36835
+ }, {
36836
+ headerName: 'backoffice.idmCatalog.options.label.materialColorB',
36837
+ field: 'materialColorR',
36838
+ cellDataType: 'number'
36839
+ }]
36840
+ }, {
36841
+ headerName: 'backoffice.idmCatalog.options.label.measurement',
36842
+ children: [{
36843
+ headerName: 'backoffice.idmCatalog.options.label.measureNo',
36844
+ field: 'measureNo',
36845
+ cellDataType: 'number'
36846
+ }, {
36847
+ headerName: 'backoffice.idmCatalog.options.label.measureValue',
36848
+ field: 'measureValue',
36849
+ cellDataType: 'number'
36850
+ }, {
36851
+ headerName: 'backoffice.idmCatalog.options.label.measureUnit',
36852
+ field: 'measureUnit'
36853
+ }]
36854
+ }, {
36855
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
36856
+ field: 'lastUpdatedDate',
36857
+ cellDataType: 'dateString',
36858
+ editable: false
36859
+ }, {
36860
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
36861
+ field: 'lastUpdatedByDisplayText',
36862
+ editable: false
36863
+ }, {
36864
+ headerName: 'backoffice.idmCatalog.general.label.createdDate',
36865
+ field: 'createdDate',
36866
+ cellDataType: 'dateString',
36867
+ editable: false
36868
+ }, {
36869
+ headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
36870
+ field: 'createdByDisplayText',
36871
+ editable: false
36872
+ }, {
36873
+ headerName: 'backoffice.idmCatalog.general.label._id',
36874
+ field: '_id',
36875
+ cellDataType: 'objectId',
36876
+ editable: false
36877
+ }, {
36878
+ field: 'organizationId',
36879
+ editable: false,
36880
+ hide: true,
36881
+ lockVisible: true,
36882
+ suppressColumnsToolPanel: true,
36883
+ defaultValue: '${organizationId}'
36884
+ }, {
36885
+ field: 'catalogId',
36886
+ editable: false,
36887
+ hide: true,
36888
+ lockVisible: true,
36889
+ suppressColumnsToolPanel: true,
36890
+ defaultValue: '${catalogId}'
36891
+ }]
36892
+ };
36893
+ }, [selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds]);
36894
+ return /*#__PURE__*/jsx(Spreadsheet, {
36895
+ gridId: 'crud-grid_catalogoptions',
36896
+ applicationData: applicationData,
36897
+ configuration: configuration
36898
+ });
36899
+ }
36900
+
36901
+ var TableCatalogOptions = observer(function () {
36902
+ var _useTranslation = useTranslation(),
36903
+ t = _useTranslation.t;
36904
+ var _useModule = useModule(['catalogoptions']),
36905
+ selectedCatalog = _useModule.selectedCatalog,
36906
+ apiConfig = _useModule.apiConfig,
36907
+ organizationId = _useModule.organizationId;
36908
+ return /*#__PURE__*/jsxs(Fragment, {
36909
+ children: [/*#__PURE__*/jsx(Descriptions$1, {
36910
+ title: /*#__PURE__*/jsxs("div", {
36911
+ children: [t('backoffice.menu.items.label.IDMCatalogEditorTableCatalogOptions'), /*#__PURE__*/jsxs(Space$1, {
36912
+ style: {
36913
+ "float": 'right'
36914
+ },
36915
+ children: [/*#__PURE__*/jsx(CatalogSelector$1, {
36916
+ modules: ['options']
36917
+ }), /*#__PURE__*/jsx(FeatureSelector$1, {
36918
+ modules: ['options']
36919
+ })]
36920
+ })]
36921
+ })
36922
+ }), selectedCatalog && /*#__PURE__*/jsx(CatalogOptions, {
36923
+ organizationId: organizationId,
36924
+ selectedCatalog: selectedCatalog,
36925
+ apiConfig: apiConfig
36926
+ })]
36927
+ });
36928
+ });
36929
+
36739
36930
  var TableFeatureClasses = observer(function () {
36740
36931
  var _useTranslation = useTranslation(),
36741
36932
  t = _useTranslation.t;
@@ -39132,6 +39323,9 @@ function Content$2() {
39132
39323
  }), /*#__PURE__*/jsx(Route, {
39133
39324
  path: ":catalogId/options",
39134
39325
  element: /*#__PURE__*/jsx(TableOptions, {})
39326
+ }), /*#__PURE__*/jsx(Route, {
39327
+ path: ":catalogId/catalogoptions",
39328
+ element: /*#__PURE__*/jsx(TableCatalogOptions, {})
39135
39329
  }), /*#__PURE__*/jsx(Route, {
39136
39330
  path: ":catalogId/optiongroups",
39137
39331
  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.43",
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.43",
19
+ "@crystaldesign/content-item": "25.4.0-beta.43",
20
+ "@crystaldesign/diva-core": "25.4.0-beta.43",
21
+ "@crystaldesign/diva-utils": "25.4.0-beta.43",
22
+ "@crystaldesign/media-upload": "25.4.0-beta.43",
23
+ "@crystaldesign/rtf-editor": "25.4.0-beta.43",
24
+ "@crystaldesign/spreadsheet": "25.4.0-beta.43",
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": "53e69b640d05ec5690f74011e8bd803ae562ac68"
55
55
  }