@crystaldesign/diva-backoffice 25.16.0-beta.25 → 25.16.0-beta.26

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.
@@ -40827,7 +40827,6 @@ var TableSeries = observer(function () {
40827
40827
  var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40828
40828
  var organizationId = _ref.organizationId,
40829
40829
  selectedCatalog = _ref.selectedCatalog,
40830
- featureClassId = _ref.featureClassId,
40831
40830
  apiConfig = _ref.apiConfig,
40832
40831
  hooks = _ref.hooks;
40833
40832
  var _useTranslation = useTranslation(),
@@ -40835,18 +40834,11 @@ var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40835
40834
  var applicationData = useMemo(function () {
40836
40835
  return {
40837
40836
  catalogId: selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog._id,
40838
- organizationId: organizationId,
40839
- featureClassId: featureClassId
40837
+ organizationId: organizationId
40840
40838
  };
40841
- }, [selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog._id, featureClassId, organizationId]);
40839
+ }, [selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog._id, organizationId]);
40842
40840
  var apiInterface = useMemo(function () {
40843
- return featureClassId ? {
40844
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features',
40845
- create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features',
40846
- restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features',
40847
- "delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features/${_id}',
40848
- update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features/${_id}'
40849
- } : {
40841
+ return {
40850
40842
  read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features',
40851
40843
  create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features',
40852
40844
  restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/${_id}',
@@ -40854,7 +40846,7 @@ var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40854
40846
  update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/${_id}',
40855
40847
  bulk: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features/bulk'
40856
40848
  };
40857
- }, [featureClassId]);
40849
+ }, [apiConfig.idmService]);
40858
40850
  var configuration = useMemo(function () {
40859
40851
  var headerPosVariationType = [{
40860
40852
  name: t('backoffice.idmCatalog.features.label.vt.I'),
@@ -40880,41 +40872,7 @@ var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40880
40872
  type: 'dotnetSSM',
40881
40873
  apiInterface: apiInterface,
40882
40874
  dateFormat: 'DD.MM.YYYY, HH:mm:ss',
40883
- colDef: [].concat(_toConsumableArray(featureClassId ? [{
40884
- field: 'invisible',
40885
- headerName: 'backoffice.idmCatalog.features.label.invisible',
40886
- cellDataType: 'boolean',
40887
- required: true,
40888
- pinned: true,
40889
- lockPinned: true,
40890
- defaultValue: false
40891
- }, {
40892
- headerName: 'backoffice.idmCatalog.features.label.featureNo',
40893
- field: 'featureNo',
40894
- cellDataType: 'lookup',
40895
- customParams: {
40896
- nameField: 'featureText',
40897
- filterCellType: 'number',
40898
- displayLabelTemplate: '${value}',
40899
- lookupLabelTemplate: '${name} (${value})',
40900
- apiInterface: {
40901
- read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
40902
- },
40903
- lookupKey: 'featureNo',
40904
- lookupValue: 'featureText',
40905
- lookupKeyFilterType: {
40906
- type: 'equals',
40907
- filterType: 'number'
40908
- },
40909
- multiple: false,
40910
- translated: true,
40911
- allowToAdd: true,
40912
- insertLookup: true
40913
- },
40914
- additionalFields: ['featureText'],
40915
- required: true,
40916
- unique: true
40917
- }] : [{
40875
+ colDef: [{
40918
40876
  headerName: 'backoffice.idmCatalog.features.label.featureNo',
40919
40877
  field: 'featureNo',
40920
40878
  cellDataType: 'lookup',
@@ -40939,11 +40897,12 @@ var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40939
40897
  additionalFields: ['featureText'],
40940
40898
  required: true,
40941
40899
  unique: true
40942
- }]), [createTranslatedColumnConfig('featureText', 'backoffice.idmCatalog.features.label.featureText', (selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds) || ['DE'], true), {
40900
+ }, createTranslatedColumnConfig('featureText', 'backoffice.idmCatalog.features.label.featureText', (selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds) || ['DE'], true, undefined, undefined, undefined, true), {
40943
40901
  field: 'sequenceNo',
40944
40902
  headerName: 'backoffice.idmCatalog.features.label.sequenceNo',
40945
40903
  required: true,
40946
- cellDataType: 'number'
40904
+ cellDataType: 'number',
40905
+ editable: true
40947
40906
  }, {
40948
40907
  field: 'headerPosVariationType',
40949
40908
  headerName: 'backoffice.idmCatalog.features.label.headerPosVariationType',
@@ -40952,7 +40911,8 @@ var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40952
40911
  customParams: {
40953
40912
  enumData: headerPosVariationType,
40954
40913
  displayLabelTemplate: '${name} (${value})'
40955
- }
40914
+ },
40915
+ editable: true
40956
40916
  }, {
40957
40917
  field: 'featureT',
40958
40918
  headerName: 'backoffice.idmCatalog.features.label.featureT',
@@ -40960,13 +40920,16 @@ var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
40960
40920
  customParams: {
40961
40921
  enumData: featureT,
40962
40922
  displayLabelTemplate: '${name} (${value})'
40963
- }
40923
+ },
40924
+ editable: true
40964
40925
  }, {
40965
40926
  field: 'measureUnit',
40966
- headerName: 'backoffice.idmCatalog.features.label.measureUnit'
40927
+ headerName: 'backoffice.idmCatalog.features.label.measureUnit',
40928
+ editable: true
40967
40929
  }, {
40968
40930
  field: 'measureParameter',
40969
- headerName: 'backoffice.idmCatalog.features.label.measureParameter'
40931
+ headerName: 'backoffice.idmCatalog.features.label.measureParameter',
40932
+ editable: true
40970
40933
  }, {
40971
40934
  headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
40972
40935
  field: 'lastUpdatedDate',
@@ -41004,16 +40967,16 @@ var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
41004
40967
  lockVisible: true,
41005
40968
  suppressColumnsToolPanel: true,
41006
40969
  defaultValue: '${catalogId}'
41007
- }])
40970
+ }]
41008
40971
  };
41009
- }, [featureClassId, apiInterface, selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds]);
40972
+ }, [apiInterface, selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds, apiConfig.idmService, t]);
41010
40973
  return /*#__PURE__*/jsx(Spreadsheet, {
41011
40974
  ref: ref,
41012
- gridId: 'crud-grid_features' + (featureClassId ? '_featureClass' : ''),
40975
+ gridId: 'crud-grid_features',
41013
40976
  applicationData: applicationData,
41014
40977
  hooks: hooks,
41015
40978
  configuration: configuration
41016
- }, featureClassId ? featureClassId : 'features');
40979
+ }, "features");
41017
40980
  });
41018
40981
 
41019
40982
  function Features$1(_ref) {
@@ -41413,6 +41376,163 @@ var TableOptions$1 = observer(function () {
41413
41376
  });
41414
41377
  });
41415
41378
 
41379
+ var FeaturesWithFeatureClass = /*#__PURE__*/forwardRef(function FeaturesWithFeatureClass(_ref, ref) {
41380
+ var organizationId = _ref.organizationId,
41381
+ selectedCatalog = _ref.selectedCatalog,
41382
+ featureClassId = _ref.featureClassId,
41383
+ apiConfig = _ref.apiConfig,
41384
+ hooks = _ref.hooks;
41385
+ var _useTranslation = useTranslation(),
41386
+ t = _useTranslation.t;
41387
+ var applicationData = useMemo(function () {
41388
+ return {
41389
+ catalogId: selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog._id,
41390
+ organizationId: organizationId,
41391
+ featureClassId: featureClassId
41392
+ };
41393
+ }, [selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog._id, featureClassId, organizationId]);
41394
+ var apiInterface = useMemo(function () {
41395
+ return {
41396
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features',
41397
+ create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features',
41398
+ restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features',
41399
+ "delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features/${_id}',
41400
+ update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/featureclasses/${featureClassId}/features/${_id}'
41401
+ };
41402
+ }, [apiConfig.idmService, featureClassId]);
41403
+ var configuration = useMemo(function () {
41404
+ var headerPosVariationType = [{
41405
+ name: t('backoffice.idmCatalog.features.label.vt.I'),
41406
+ value: 'I'
41407
+ }, {
41408
+ name: t('backoffice.idmCatalog.features.label.vt.K'),
41409
+ value: 'K'
41410
+ }, {
41411
+ name: t('backoffice.idmCatalog.features.label.vt.P'),
41412
+ value: 'P'
41413
+ }];
41414
+ var featureT = [{
41415
+ name: t('backoffice.idmCatalog.features.label.featureTDic.M'),
41416
+ value: 'M'
41417
+ }, {
41418
+ name: t('backoffice.idmCatalog.features.label.featureTDic.C'),
41419
+ value: 'C'
41420
+ }, {
41421
+ name: t('backoffice.idmCatalog.features.label.featureTDic.O'),
41422
+ value: 'O'
41423
+ }];
41424
+ return {
41425
+ type: 'dotnetSSM',
41426
+ apiInterface: apiInterface,
41427
+ dateFormat: 'DD.MM.YYYY, HH:mm:ss',
41428
+ colDef: [{
41429
+ field: 'invisible',
41430
+ headerName: 'backoffice.idmCatalog.features.label.invisible',
41431
+ cellDataType: 'boolean',
41432
+ required: true,
41433
+ pinned: true,
41434
+ lockPinned: true,
41435
+ defaultValue: false
41436
+ }, {
41437
+ headerName: 'backoffice.idmCatalog.features.label.featureNo',
41438
+ field: 'featureNo',
41439
+ cellDataType: 'lookup',
41440
+ customParams: {
41441
+ nameField: 'featureText',
41442
+ filterCellType: 'number',
41443
+ displayLabelTemplate: '${value}',
41444
+ lookupLabelTemplate: '${name} (${value})',
41445
+ apiInterface: {
41446
+ read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/allfeatures'
41447
+ },
41448
+ lookupKey: 'featureNo',
41449
+ lookupValue: 'featureText',
41450
+ lookupKeyFilterType: {
41451
+ type: 'equals',
41452
+ filterType: 'number'
41453
+ },
41454
+ multiple: false,
41455
+ translated: true,
41456
+ additionalMappings: [{
41457
+ lookupField: 'featureText',
41458
+ targetField: 'featureText'
41459
+ }, {
41460
+ lookupField: 'sequenceNo',
41461
+ targetField: 'sequenceNo'
41462
+ }, {
41463
+ lookupField: 'headerPosVariationType',
41464
+ targetField: 'headerPosVariationType'
41465
+ }, {
41466
+ lookupField: 'featureT',
41467
+ targetField: 'featureT'
41468
+ }, {
41469
+ lookupField: '_id',
41470
+ targetField: '_id'
41471
+ }]
41472
+ },
41473
+ additionalFields: ['featureText', 'sequenceNo', 'headerPosVariationType', 'featureT', '_id'],
41474
+ required: true,
41475
+ unique: true
41476
+ }, createTranslatedColumnConfig('featureText', 'backoffice.idmCatalog.features.label.featureText', (selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds) || ['DE'], false, undefined, undefined, undefined, false), {
41477
+ field: 'sequenceNo',
41478
+ headerName: 'backoffice.idmCatalog.features.label.sequenceNo',
41479
+ required: false,
41480
+ cellDataType: 'number',
41481
+ editable: false,
41482
+ hide: true
41483
+ }, {
41484
+ field: 'headerPosVariationType',
41485
+ headerName: 'backoffice.idmCatalog.features.label.headerPosVariationType',
41486
+ required: false,
41487
+ cellDataType: 'enum',
41488
+ customParams: {
41489
+ enumData: headerPosVariationType,
41490
+ displayLabelTemplate: '${name} (${value})'
41491
+ },
41492
+ editable: false,
41493
+ hide: true
41494
+ }, {
41495
+ field: 'featureT',
41496
+ headerName: 'backoffice.idmCatalog.features.label.featureT',
41497
+ cellDataType: 'enum',
41498
+ customParams: {
41499
+ enumData: featureT,
41500
+ displayLabelTemplate: '${name} (${value})'
41501
+ },
41502
+ editable: false,
41503
+ hide: true
41504
+ }, {
41505
+ headerName: 'backoffice.idmCatalog.general.label._id',
41506
+ field: '_id',
41507
+ editable: false,
41508
+ cellDataType: 'objectId',
41509
+ hide: true
41510
+ }, {
41511
+ field: 'organizationId',
41512
+ editable: false,
41513
+ hide: true,
41514
+ lockVisible: true,
41515
+ suppressColumnsToolPanel: true,
41516
+ defaultValue: '${organizationId}'
41517
+ }, {
41518
+ field: 'catalogId',
41519
+ editable: false,
41520
+ hide: true,
41521
+ lockVisible: true,
41522
+ suppressColumnsToolPanel: true,
41523
+ defaultValue: '${catalogId}'
41524
+ }]
41525
+ };
41526
+ }, [featureClassId, apiInterface, selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds, apiConfig.idmService, t]);
41527
+ return /*#__PURE__*/jsx(Spreadsheet, {
41528
+ ref: ref,
41529
+ gridId: 'crud-grid_features_featureClass',
41530
+ applicationData: applicationData,
41531
+ hooks: hooks,
41532
+ configuration: configuration
41533
+ }, featureClassId);
41534
+ });
41535
+
41416
41536
  var TableFeatureClasses = observer(function () {
41417
41537
  var _useTranslation = useTranslation(),
41418
41538
  t = _useTranslation.t;
@@ -41438,7 +41558,7 @@ var TableFeatureClasses = observer(function () {
41438
41558
  conditionalTools: [{
41439
41559
  id: 'features',
41440
41560
  name: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures'),
41441
- elementComponent: Features$2,
41561
+ elementComponent: FeaturesWithFeatureClass,
41442
41562
  elementProps: {
41443
41563
  organizationId: organizationId,
41444
41564
  selectedCatalog: selectedCatalog,
@@ -5,7 +5,6 @@ import { CatalogData } from '../types';
5
5
  declare const Features: React.ForwardRefExoticComponent<{
6
6
  organizationId: string;
7
7
  selectedCatalog: CatalogData;
8
- featureClassId?: string;
9
8
  apiConfig: ApiConfig;
10
9
  hooks?: DivaSpreadsheetHooks<any>;
11
10
  } & React.RefAttributes<SpreadsheetRefProps>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Features.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCatalogEditor/Tables/Features.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAiB,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtG,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,QAAA,MAAM,QAAQ;oBAGM,MAAM;qBACL,WAAW;qBACX,MAAM;eACZ,SAAS;YACZ,oBAAoB,CAAC,GAAG,CAAC;6CAoNnC,CAAC;AAEH,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Features.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCatalogEditor/Tables/Features.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAiB,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtG,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,QAAA,MAAM,QAAQ;oBAGM,MAAM;qBACL,WAAW;eACjB,SAAS;YACZ,oBAAoB,CAAC,GAAG,CAAC;6CA4KnC,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { ApiConfig } from '@crystaldesign/diva-core';
3
+ import { DivaSpreadsheetHooks, SpreadsheetRefProps } from '@crystaldesign/spreadsheet';
4
+ import { CatalogData } from '../types';
5
+ declare const FeaturesWithFeatureClass: React.ForwardRefExoticComponent<{
6
+ organizationId: string;
7
+ selectedCatalog: CatalogData;
8
+ featureClassId: string;
9
+ apiConfig: ApiConfig;
10
+ hooks?: DivaSpreadsheetHooks<any>;
11
+ } & React.RefAttributes<SpreadsheetRefProps>>;
12
+ export default FeaturesWithFeatureClass;
13
+ //# sourceMappingURL=FeaturesWithFeatureClass.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeaturesWithFeatureClass.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCatalogEditor/Tables/FeaturesWithFeatureClass.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAiB,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtG,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,QAAA,MAAM,wBAAwB;oBAGV,MAAM;qBACL,WAAW;oBACZ,MAAM;eACX,SAAS;YACZ,oBAAoB,CAAC,GAAG,CAAC;6CA+JnC,CAAC;AAEH,eAAe,wBAAwB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-backoffice",
3
- "version": "25.16.0-beta.25",
3
+ "version": "25.16.0-beta.26",
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.16.0-beta.25",
19
- "@crystaldesign/content-item": "25.16.0-beta.25",
20
- "@crystaldesign/diva-core": "25.16.0-beta.25",
21
- "@crystaldesign/diva-utils": "25.16.0-beta.25",
22
- "@crystaldesign/media-upload": "25.16.0-beta.25",
23
- "@crystaldesign/rtf-editor": "25.16.0-beta.25",
24
- "@crystaldesign/spreadsheet": "25.16.0-beta.25",
18
+ "@crystaldesign/content-box": "25.16.0-beta.26",
19
+ "@crystaldesign/content-item": "25.16.0-beta.26",
20
+ "@crystaldesign/diva-core": "25.16.0-beta.26",
21
+ "@crystaldesign/diva-utils": "25.16.0-beta.26",
22
+ "@crystaldesign/media-upload": "25.16.0-beta.26",
23
+ "@crystaldesign/rtf-editor": "25.16.0-beta.26",
24
+ "@crystaldesign/spreadsheet": "25.16.0-beta.26",
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": "e37ef1871e46e1db540f0222df001cefb0886ce1"
54
+ "gitHead": "28165efd12a3403709935937d21b70e75ae243f7"
55
55
  }