@crystaldesign/diva-backoffice 24.14.0-beta.11 → 24.14.0-beta.13

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.
@@ -32223,7 +32223,7 @@ function PrefilterSelector (_ref) {
32223
32223
  value: '${_id}'
32224
32224
  },
32225
32225
  autoSelectFirst: true,
32226
- title: t('backoffice.menu.items.label.IDMCatalogEditorTable.serie'),
32226
+ title: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures'),
32227
32227
  value: selectedFeature,
32228
32228
  onChange: function onChange(value) {
32229
32229
  return setSelectedFeature ? setSelectedFeature(value) : null;
@@ -32270,6 +32270,26 @@ function useModule (currentModules) {
32270
32270
  to: 'catalogs/idmeditor/catalogs/' + catalogId + '/items' + (searchParams ? '?' + searchParams.toString() : ''),
32271
32271
  children: t('backoffice.menu.items.label.IDMCatalogEditorTableItems')
32272
32272
  })
32273
+ }, {
32274
+ key: 'features',
32275
+ style: {
32276
+ margin: 0
32277
+ },
32278
+ icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
32279
+ label: /*#__PURE__*/jsx(Link, {
32280
+ to: 'catalogs/idmeditor/catalogs/' + catalogId + '/features' + (searchParams ? '?' + searchParams.toString() : ''),
32281
+ children: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures')
32282
+ })
32283
+ }, {
32284
+ key: 'options',
32285
+ style: {
32286
+ margin: 0
32287
+ },
32288
+ icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
32289
+ label: /*#__PURE__*/jsx(Link, {
32290
+ to: 'catalogs/idmeditor/catalogs/' + catalogId + '/options' + (searchParams ? '?' + searchParams.toString() : ''),
32291
+ children: t('backoffice.menu.items.label.IDMCatalogEditorTableOptions')
32292
+ })
32273
32293
  }];
32274
32294
  }, [catalogId]);
32275
32295
  if (!catalogId) throw new Error('catalogId is required');
@@ -32823,6 +32843,330 @@ function TableSeries () {
32823
32843
  });
32824
32844
  }
32825
32845
 
32846
+ function TableFeatures () {
32847
+ var _useTranslation = useTranslation(),
32848
+ t = _useTranslation.t;
32849
+ var _useModule = useModule(['features']),
32850
+ catalogId = _useModule.catalogId,
32851
+ organizationId = _useModule.organizationId,
32852
+ updateNavigation = _useModule.updateNavigation,
32853
+ apiConfig = _useModule.apiConfig;
32854
+ var headerPosVariationTypeDic = {
32855
+ I: t('backoffice.idmCatalog.features.label.vt.I'),
32856
+ K: t('backoffice.idmCatalog.features.label.vt.K'),
32857
+ P: t('backoffice.idmCatalog.features.label.vt.P')
32858
+ };
32859
+ var featureTDic = {
32860
+ M: t('backoffice.idmCatalog.features.label.featureTDic.M'),
32861
+ C: t('backoffice.idmCatalog.features.label.featureTDic.C'),
32862
+ O: t('backoffice.idmCatalog.features.label.featureTDic.O')
32863
+ };
32864
+ var applicationData = useMemo(function () {
32865
+ return {
32866
+ catalogId: catalogId,
32867
+ organizationId: organizationId
32868
+ };
32869
+ }, [catalogId]);
32870
+ return /*#__PURE__*/jsxs(Fragment, {
32871
+ children: [/*#__PURE__*/jsx(Descriptions$1, {
32872
+ title: /*#__PURE__*/jsxs("div", {
32873
+ children: [t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures'), /*#__PURE__*/jsx(Space$1, {
32874
+ style: {
32875
+ "float": 'right'
32876
+ },
32877
+ children: /*#__PURE__*/jsx(CatalogSelector, {
32878
+ selectedCatalog: catalogId,
32879
+ setSelectedCatalog: function setSelectedCatalog(id) {
32880
+ return updateNavigation(id);
32881
+ },
32882
+ idmService: apiConfig.idmService
32883
+ })
32884
+ })]
32885
+ })
32886
+ }), /*#__PURE__*/jsx(Spreadsheet, {
32887
+ gridId: 'crud-grid_features',
32888
+ applicationData: applicationData,
32889
+ configuration: {
32890
+ type: 'dotnetSSM',
32891
+ apiInterface: {
32892
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features',
32893
+ create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features',
32894
+ restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/${_id}',
32895
+ "delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/${_id}',
32896
+ update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/${_id}'
32897
+ },
32898
+ dateFormat: 'LL',
32899
+ colDef: [{
32900
+ field: 'featureNo',
32901
+ headerName: 'backoffice.idmCatalog.features.label.featureNo',
32902
+ required: true
32903
+ }, {
32904
+ headerName: 'backoffice.idmCatalog.features.label.featureText',
32905
+ marryChildren: true,
32906
+ children: [{
32907
+ field: 'featureText.DE',
32908
+ headerName: 'backoffice.idmEnricher.general.label.DE',
32909
+ isDictionary: true,
32910
+ required: true
32911
+ }, {
32912
+ field: 'featureText.EN',
32913
+ headerName: 'backoffice.idmEnricher.general.label.EN',
32914
+ isDictionary: true
32915
+ }, {
32916
+ field: 'featureText.FR',
32917
+ headerName: 'backoffice.idmEnricher.general.label.FR',
32918
+ isDictionary: true
32919
+ }, {
32920
+ field: 'featureText.IT',
32921
+ headerName: 'backoffice.idmEnricher.general.label.IT',
32922
+ isDictionary: true
32923
+ }]
32924
+ }, {
32925
+ field: 'sequenceNo',
32926
+ headerName: 'backoffice.idmCatalog.features.label.sequenceNo',
32927
+ required: true,
32928
+ cellDataType: 'number'
32929
+ }, {
32930
+ field: 'headerPosVariationType',
32931
+ headerName: 'backoffice.idmCatalog.features.label.headerPosVariationType',
32932
+ required: true,
32933
+ cellDataType: 'enum',
32934
+ customParams: {
32935
+ displayTexts: headerPosVariationTypeDic,
32936
+ values: Object.keys(headerPosVariationTypeDic),
32937
+ displayLabelTemplate: '${name} (${value})'
32938
+ }
32939
+ }, {
32940
+ field: 'featureT',
32941
+ headerName: 'backoffice.idmCatalog.features.label.featureT',
32942
+ cellDataType: 'enum',
32943
+ customParams: {
32944
+ displayTexts: featureTDic,
32945
+ values: Object.keys(featureTDic),
32946
+ displayLabelTemplate: '${name} (${value})'
32947
+ }
32948
+ }, {
32949
+ field: 'measureUnit',
32950
+ headerName: 'backoffice.idmCatalog.features.label.measureUnit'
32951
+ }, {
32952
+ field: 'measureParameter',
32953
+ headerName: 'backoffice.idmCatalog.features.label.measureParameter'
32954
+ }, {
32955
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
32956
+ field: 'lastUpdatedDate',
32957
+ cellDataType: 'dateString',
32958
+ editable: false
32959
+ }, {
32960
+ headerName: 'backoffice.idmCatalog.general.label.createdDate',
32961
+ field: 'createdDate',
32962
+ cellDataType: 'dateString',
32963
+ editable: false
32964
+ }, {
32965
+ headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
32966
+ field: 'createdByDisplayText',
32967
+ editable: false
32968
+ }, {
32969
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
32970
+ field: 'lastUpdatedByDisplayText',
32971
+ editable: false
32972
+ }, {
32973
+ headerName: 'backoffice.idmCatalog.general.label._id',
32974
+ field: '_id',
32975
+ editable: false
32976
+ }, {
32977
+ field: 'organizationId',
32978
+ editable: false,
32979
+ hide: true,
32980
+ lockVisible: true,
32981
+ suppressColumnsToolPanel: true,
32982
+ defaultValue: '${organizationId}'
32983
+ }, {
32984
+ field: 'catalogId',
32985
+ editable: false,
32986
+ hide: true,
32987
+ lockVisible: true,
32988
+ suppressColumnsToolPanel: true,
32989
+ defaultValue: '${catalogId}'
32990
+ }]
32991
+ }
32992
+ })]
32993
+ });
32994
+ }
32995
+
32996
+ function TableOptions () {
32997
+ var _useTranslation = useTranslation(),
32998
+ t = _useTranslation.t;
32999
+ var _useModule = useModule(['options']),
33000
+ catalogId = _useModule.catalogId,
33001
+ updateNavigation = _useModule.updateNavigation,
33002
+ apiConfig = _useModule.apiConfig,
33003
+ organizationId = _useModule.organizationId;
33004
+ var _React$useState = React.useState(),
33005
+ _React$useState2 = _slicedToArray(_React$useState, 2),
33006
+ selectedFeature = _React$useState2[0],
33007
+ setSelectedFeature = _React$useState2[1];
33008
+ return /*#__PURE__*/jsxs(Fragment, {
33009
+ children: [/*#__PURE__*/jsx(Descriptions$1, {
33010
+ title: /*#__PURE__*/jsxs("div", {
33011
+ children: [t('backoffice.menu.items.label.IDMCatalogEditorTableOptions'), /*#__PURE__*/jsxs(Space$1, {
33012
+ style: {
33013
+ "float": 'right'
33014
+ },
33015
+ children: [/*#__PURE__*/jsx(CatalogSelector, {
33016
+ selectedCatalog: catalogId,
33017
+ setSelectedCatalog: function setSelectedCatalog(id) {
33018
+ return updateNavigation(id);
33019
+ },
33020
+ idmService: apiConfig.idmService
33021
+ }), /*#__PURE__*/jsx(PrefilterSelector, {
33022
+ type: 'option',
33023
+ catalogId: catalogId,
33024
+ selectedFeature: selectedFeature,
33025
+ setSelectedFeature: setSelectedFeature,
33026
+ idmService: apiConfig.idmService
33027
+ })]
33028
+ })]
33029
+ })
33030
+ }), selectedFeature && /*#__PURE__*/jsx(Spreadsheet, {
33031
+ gridId: 'crud-grid_options',
33032
+ applicationData: {
33033
+ organizationId: organizationId,
33034
+ catalogId: catalogId
33035
+ },
33036
+ configuration: {
33037
+ type: 'dotnetSSM',
33038
+ idCol: 'optionKey',
33039
+ apiInterface: {
33040
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/' + (selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature._id) + '/options',
33041
+ create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/' + (selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature._id) + '/options',
33042
+ restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/' + (selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature._id) + '/options/${optionKey}',
33043
+ "delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/' + (selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature._id) + '/options/${optionKey}',
33044
+ update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/' + (selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature._id) + '/options/${optionKey}'
33045
+ },
33046
+ dateFormat: 'LL',
33047
+ floatingFilter: true,
33048
+ colDef: [{
33049
+ field: 'optionKey',
33050
+ required: true,
33051
+ unique: true
33052
+ }, {
33053
+ headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
33054
+ field: 'sequenceNo',
33055
+ cellDataType: 'number'
33056
+ }, {
33057
+ headerName: 'backoffice.idmCatalog.common.label.texts',
33058
+ children: [{
33059
+ headerName: 'backoffice.idmCatalog.options.label.optionText',
33060
+ marryChildren: true,
33061
+ children: [{
33062
+ field: 'optionText.DE',
33063
+ headerName: 'backoffice.idmEnricher.general.label.DE',
33064
+ isDictionary: true,
33065
+ required: true
33066
+ }, {
33067
+ field: 'optionText.EN',
33068
+ headerName: 'backoffice.idmEnricher.general.label.EN',
33069
+ isDictionary: true
33070
+ }, {
33071
+ field: 'optionText.FR',
33072
+ headerName: 'backoffice.idmEnricher.general.label.FR',
33073
+ isDictionary: true
33074
+ }, {
33075
+ field: 'optionText.IT',
33076
+ headerName: 'backoffice.idmEnricher.general.label.IT',
33077
+ isDictionary: true
33078
+ }]
33079
+ }, {
33080
+ headerName: 'backoffice.idmCatalog.options.label.optionCommentText',
33081
+ marryChildren: true,
33082
+ children: [{
33083
+ field: 'optionCommentText.DE',
33084
+ headerName: 'backoffice.idmEnricher.general.label.DE',
33085
+ isDictionary: true
33086
+ }, {
33087
+ field: 'optionCommentText.EN',
33088
+ headerName: 'backoffice.idmEnricher.general.label.EN',
33089
+ isDictionary: true
33090
+ }, {
33091
+ field: 'optionCommentText.FR',
33092
+ headerName: 'backoffice.idmEnricher.general.label.FR',
33093
+ isDictionary: true
33094
+ }, {
33095
+ field: 'optionCommentText.IT',
33096
+ headerName: 'backoffice.idmEnricher.general.label.IT',
33097
+ isDictionary: true
33098
+ }]
33099
+ }, {
33100
+ headerName: 'backoffice.idmCatalog.options.label.optionFreeText',
33101
+ field: 'optionFreeText',
33102
+ cellDataType: 'boolean'
33103
+ }]
33104
+ }, {
33105
+ headerName: 'backoffice.idmCatalog.items.label.validation',
33106
+ children: [{
33107
+ headerName: 'backoffice.idmCatalog.general.label.validFromDate',
33108
+ field: 'validFromDate',
33109
+ cellDataType: 'dateString'
33110
+ }, {
33111
+ headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
33112
+ field: 'validUntilDate',
33113
+ cellDataType: 'dateString'
33114
+ }]
33115
+ }, {
33116
+ headerName: 'backoffice.idmCatalog.options.label.material',
33117
+ children: [{
33118
+ headerName: 'backoffice.idmCatalog.options.label.materialNo',
33119
+ field: 'materialNo'
33120
+ }, {
33121
+ headerName: 'backoffice.idmCatalog.options.label.materialColorR',
33122
+ field: 'materialColorR',
33123
+ cellDataType: 'number'
33124
+ }, {
33125
+ headerName: 'backoffice.idmCatalog.options.label.materialColorG',
33126
+ field: 'materialColorG',
33127
+ cellDataType: 'number'
33128
+ }, {
33129
+ headerName: 'backoffice.idmCatalog.options.label.materialColorB',
33130
+ field: 'materialColorR',
33131
+ cellDataType: 'number'
33132
+ }]
33133
+ }, {
33134
+ headerName: 'backoffice.idmCatalog.options.label.measurement',
33135
+ children: [{
33136
+ headerName: 'backoffice.idmCatalog.options.label.measureNo',
33137
+ field: 'measureNo'
33138
+ }, {
33139
+ headerName: 'backoffice.idmCatalog.options.label.measureValue',
33140
+ field: 'measureValue',
33141
+ cellDataType: 'number'
33142
+ }, {
33143
+ headerName: 'backoffice.idmCatalog.options.label.measureUnit',
33144
+ field: 'measureUnit'
33145
+ }]
33146
+ }, {
33147
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
33148
+ field: 'lastUpdatedDate',
33149
+ cellDataType: 'dateString',
33150
+ editable: false
33151
+ }, {
33152
+ headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
33153
+ field: 'lastUpdatedByDisplayText',
33154
+ editable: false
33155
+ }, {
33156
+ headerName: 'backoffice.idmCatalog.general.label.createdDate',
33157
+ field: 'createdDate',
33158
+ cellDataType: 'dateString',
33159
+ editable: false
33160
+ }, {
33161
+ headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
33162
+ field: 'createdByDisplayText',
33163
+ editable: false
33164
+ }]
33165
+ }
33166
+ })]
33167
+ });
33168
+ }
33169
+
32826
33170
  function IDMCatalogEditor (_ref) {
32827
33171
  _objectDestructuringEmpty(_ref);
32828
33172
  return /*#__PURE__*/jsx("div", {
@@ -32846,6 +33190,12 @@ function Content$1() {
32846
33190
  }), /*#__PURE__*/jsx(Route, {
32847
33191
  path: ":catalogId/items",
32848
33192
  element: /*#__PURE__*/jsx(TableItems, {})
33193
+ }), /*#__PURE__*/jsx(Route, {
33194
+ path: ":catalogId/features",
33195
+ element: /*#__PURE__*/jsx(TableFeatures, {})
33196
+ }), /*#__PURE__*/jsx(Route, {
33197
+ path: ":catalogId/options",
33198
+ element: /*#__PURE__*/jsx(TableOptions, {})
32849
33199
  })]
32850
33200
  });
32851
33201
  }
@@ -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;AAIxD,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;AAMxD,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,3 @@
1
+ import React from 'react';
2
+ export default function (): React.JSX.Element;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/modules/TableFeatures/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAQvC,MAAM,CAAC,OAAO,gCAsKb"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export default function (): React.JSX.Element;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMCatalogEditor/modules/TableOptions/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,CAAC,OAAO,gCA0Mb"}
@@ -1 +1 @@
1
- {"version":3,"file":"useModule.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCatalogEditor/useModule.tsx"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,WAAW,cAAc,EAAE,MAAM,EAAE;uCAmC5B,MAAM,YAAW,MAAM,EAAE;;;;EAmC7C"}
1
+ {"version":3,"file":"useModule.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/IDMCatalogEditor/useModule.tsx"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,WAAW,cAAc,EAAE,MAAM,EAAE;uCAuD5B,MAAM,YAAW,MAAM,EAAE;;;;EAmC7C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-backoffice",
3
- "version": "24.14.0-beta.11",
3
+ "version": "24.14.0-beta.13",
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": "24.14.0-beta.11",
19
- "@crystaldesign/content-item": "24.14.0-beta.11",
20
- "@crystaldesign/diva-core": "24.14.0-beta.11",
21
- "@crystaldesign/diva-utils": "24.14.0-beta.11",
22
- "@crystaldesign/media-upload": "24.14.0-beta.11",
23
- "@crystaldesign/rtf-editor": "24.14.0-beta.11",
24
- "@crystaldesign/spreadsheet": "24.14.0-beta.11",
18
+ "@crystaldesign/content-box": "24.14.0-beta.13",
19
+ "@crystaldesign/content-item": "24.14.0-beta.13",
20
+ "@crystaldesign/diva-core": "24.14.0-beta.13",
21
+ "@crystaldesign/diva-utils": "24.14.0-beta.13",
22
+ "@crystaldesign/media-upload": "24.14.0-beta.13",
23
+ "@crystaldesign/rtf-editor": "24.14.0-beta.13",
24
+ "@crystaldesign/spreadsheet": "24.14.0-beta.13",
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": "aca40fa747af32f5361ff3e4a80b38a8dcc45e92"
54
+ "gitHead": "a640f548dbcf0d4cf3283ac2734eb46c5cc0da54"
55
55
  }