@crystaldesign/diva-backoffice 26.12.0-beta.8 → 26.12.0-beta.9

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 (15) hide show
  1. package/build/esm/index.js +77 -19
  2. package/build/types/backoffice/src/tests/unit/ui/IDMCollectionEditor/Tables/collectionMemberUtils.test.d.ts +2 -0
  3. package/build/types/backoffice/src/tests/unit/ui/IDMCollectionEditor/Tables/collectionMemberUtils.test.d.ts.map +1 -0
  4. package/build/types/backoffice/src/tests/unit/ui/IDMEnricherEditor/TablePackages/publishUtils.test.d.ts +2 -0
  5. package/build/types/backoffice/src/tests/unit/ui/IDMEnricherEditor/TablePackages/publishUtils.test.d.ts.map +1 -0
  6. package/build/types/backoffice/src/ui/IDMCollectionEditor/Tables/CollectionMembers.d.ts.map +1 -1
  7. package/build/types/backoffice/src/ui/IDMCollectionEditor/Tables/collectionMemberUtils.d.ts +13 -0
  8. package/build/types/backoffice/src/ui/IDMCollectionEditor/Tables/collectionMemberUtils.d.ts.map +1 -0
  9. package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/PackagePublishSwitch.d.ts.map +1 -1
  10. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/PackagePublishControls.d.ts.map +1 -1
  11. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/publishUtils.d.ts +23 -0
  12. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/publishUtils.d.ts.map +1 -1
  13. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/usePackagePublishing.d.ts +6 -0
  14. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/usePackagePublishing.d.ts.map +1 -1
  15. package/package.json +10 -10
@@ -36152,11 +36152,6 @@ var Spreadsheet = observer(SpreadsheetWrapper);
36152
36152
  function fetchAutomaticPublishingOrganizations(_x) {
36153
36153
  return _fetchAutomaticPublishingOrganizations.apply(this, arguments);
36154
36154
  }
36155
-
36156
- /**
36157
- * Returns true if the package was last updated after it was published, meaning the published version
36158
- * is outdated.
36159
- */
36160
36155
  function _fetchAutomaticPublishingOrganizations() {
36161
36156
  _fetchAutomaticPublishingOrganizations = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
36162
36157
  var authServiceUrl, organizationId, jwt, packageData, url, response, result, allowedOrgIds, currentOrg, currentOrgParentIds, isOwner;
@@ -36193,7 +36188,7 @@ function _fetchAutomaticPublishingOrganizations() {
36193
36188
  // 1. In package settings with AutomaticPublishing === true, OR
36194
36189
  // 2. Has access to the package AND have automaticPublishing === true in their own organization settings
36195
36190
  return _context.abrupt("return", (result.data || []).filter(function (org) {
36196
- var _packageData$settings;
36191
+ var _packageData$publishe2, _packageData$dependin, _packageData$dependin2, _packageData$settings;
36197
36192
  // EXCLUDE the current organization
36198
36193
  if (org._id === organizationId) {
36199
36194
  return false;
@@ -36215,6 +36210,20 @@ function _fetchAutomaticPublishingOrganizations() {
36215
36210
  return false;
36216
36211
  }
36217
36212
  }
36213
+
36214
+ //an organization inherits any publication in its parent chain automatically (same rule as the
36215
+ //server-side auto-publish skip), so automatic publishing only makes sense for it when one of its
36216
+ //own packages is based on this package
36217
+ var publishingOrgIds = [organizationId].concat(_toConsumableArray(Object.keys((_packageData$publishe2 = packageData.published) !== null && _packageData$publishe2 !== void 0 ? _packageData$publishe2 : {})));
36218
+ var inheritsAPublication = orgParentIds.some(function (parentId) {
36219
+ return parentId !== org._id && publishingOrgIds.includes(parentId);
36220
+ });
36221
+ var hasDependingPackage = (_packageData$dependin = (_packageData$dependin2 = packageData.dependingPackages) === null || _packageData$dependin2 === void 0 ? void 0 : _packageData$dependin2.some(function (dependingPackage) {
36222
+ return dependingPackage.organizationId === org._id;
36223
+ })) !== null && _packageData$dependin !== void 0 ? _packageData$dependin : false;
36224
+ if (inheritsAPublication && !hasDependingPackage) {
36225
+ return false;
36226
+ }
36218
36227
  var hasAutomaticPublishingForPackage = ((_packageData$settings = packageData.settings) === null || _packageData$settings === void 0 || (_packageData$settings = _packageData$settings[org._id]) === null || _packageData$settings === void 0 ? void 0 : _packageData$settings.automaticPublishing) === true;
36219
36228
  var hasAccessToPackage = orgParentIds.includes(packageData.organizationId) || allowedOrgIds.includes(org._id) || allowedOrgIds.some(function (id) {
36220
36229
  return orgParentIds.includes(id);
@@ -36231,6 +36240,27 @@ function _fetchAutomaticPublishingOrganizations() {
36231
36240
  }));
36232
36241
  return _fetchAutomaticPublishingOrganizations.apply(this, arguments);
36233
36242
  }
36243
+ /**
36244
+ * Returns the parent organization whose publication of the package the given organization inherits, or
36245
+ * undefined when the package is not inherited. A parent organization's publication is inherited
36246
+ * automatically, so such a package must not be published separately. An own published entry of the
36247
+ * organization shadows the inherited one, so the package does not count as inherited while the
36248
+ * organization has published it itself.
36249
+ */
36250
+ function getInheritedPublishOrganization(packageData, organizationId, parentOrganizations) {
36251
+ if (!(packageData !== null && packageData !== void 0 && packageData.published) || packageData.published[organizationId]) {
36252
+ return undefined;
36253
+ }
36254
+ return parentOrganizations.find(function (parentOrganization) {
36255
+ var _packageData$publishe;
36256
+ return !!((_packageData$publishe = packageData.published) !== null && _packageData$publishe !== void 0 && _packageData$publishe[parentOrganization._id]);
36257
+ });
36258
+ }
36259
+
36260
+ /**
36261
+ * Returns true if the package was last updated after it was published, meaning the published version
36262
+ * is outdated.
36263
+ */
36234
36264
  function hasUnpublishedChanges(publishDateString, lastUpdatedDateString) {
36235
36265
  var publishDate = publishDateString ? new Date(publishDateString) : undefined;
36236
36266
  var lastUpdatedDate = lastUpdatedDateString ? new Date(lastUpdatedDateString) : undefined;
@@ -36247,7 +36277,7 @@ function hasUnpublishedChanges(publishDateString, lastUpdatedDateString) {
36247
36277
  * standalone publish button next to the package selector.
36248
36278
  */
36249
36279
  function usePackagePublishing(_ref) {
36250
- var _data$published, _data$removedOrganiza;
36280
+ var _data$published, _data$removedOrganiza, _root$dataStore$curre, _root$dataStore$curre2, _ref2, _inheritedPublishOrga;
36251
36281
  var packageId = _ref.packageId,
36252
36282
  data = _ref.data,
36253
36283
  organizationId = _ref.organizationId,
@@ -36290,7 +36320,15 @@ function usePackagePublishing(_ref) {
36290
36320
  return id === organizationId;
36291
36321
  }));
36292
36322
  var unpublishedChanges = hasUnpublishedChanges(publishedData === null || publishedData === void 0 ? void 0 : publishedData.publishDate, data === null || data === void 0 ? void 0 : data.lastUpdatedDate);
36293
- var disabled = isPublishing || !(data !== null && data !== void 0 && data.basedCatalogId) && !(data !== null && data !== void 0 && data.basedPackageId) || !(data !== null && data !== void 0 && data.name);
36323
+ //a parent organization's publication is inherited automatically, so an inherited package must not be published separately
36324
+ var inheritedPublishOrganization = getInheritedPublishOrganization(data, organizationId, (_root$dataStore$curre = (_root$dataStore$curre2 = root.dataStore.currentOrganization) === null || _root$dataStore$curre2 === void 0 ? void 0 : _root$dataStore$curre2.parentOrganizations) !== null && _root$dataStore$curre !== void 0 ? _root$dataStore$curre : []);
36325
+ var isInherited = !!inheritedPublishOrganization;
36326
+ //built here once, since both the packages list checkbox and the standalone publish switch show it
36327
+ var inheritedTooltip = t('backoffice.idmEnricher.packages.tooltips.inheritedFromParent', {
36328
+ defaultValue: 'Das Paket ist bereits von der Organisation {{organization}} veröffentlicht und wird automatisch vererbt. Es kann daher nicht separat veröffentlicht werden.',
36329
+ organization: (_ref2 = (_inheritedPublishOrga = inheritedPublishOrganization === null || inheritedPublishOrganization === void 0 ? void 0 : inheritedPublishOrganization.displayName) !== null && _inheritedPublishOrga !== void 0 ? _inheritedPublishOrga : inheritedPublishOrganization === null || inheritedPublishOrganization === void 0 ? void 0 : inheritedPublishOrganization._id) !== null && _ref2 !== void 0 ? _ref2 : ''
36330
+ });
36331
+ var disabled = isPublishing || !(data !== null && data !== void 0 && data.basedCatalogId) && !(data !== null && data !== void 0 && data.basedPackageId) || !(data !== null && data !== void 0 && data.name) || isInherited;
36294
36332
  var fetchOrganizationsWithAutomaticPublishing = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
36295
36333
  var filtered;
36296
36334
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -36329,7 +36367,7 @@ function usePackagePublishing(_ref) {
36329
36367
  }, _callee, null, [[1, 10, 15, 18]]);
36330
36368
  })), [apiConfig.authService, organizationId, root.dataStore.jwt, modalState, data]);
36331
36369
  var performPublish = React.useCallback(/*#__PURE__*/function () {
36332
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(publish) {
36370
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(publish) {
36333
36371
  var automaticPublishingOrgIds,
36334
36372
  url,
36335
36373
  response,
@@ -36414,7 +36452,7 @@ function usePackagePublishing(_ref) {
36414
36452
  }, _callee2, null, [[4, 34, 37, 41], [18, 25]]);
36415
36453
  }));
36416
36454
  return function (_x) {
36417
- return _ref3.apply(this, arguments);
36455
+ return _ref4.apply(this, arguments);
36418
36456
  };
36419
36457
  }(), [apiConfig.enricherService, packageId, organizationId, root.dataStore.jwt, modalState, t, onPublished, blockUiWhilePublishing]);
36420
36458
  var handlePublishClick = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
@@ -36457,7 +36495,7 @@ function usePackagePublishing(_ref) {
36457
36495
  }, _callee4);
36458
36496
  })), [selectedOrganizationIds, performPublish]);
36459
36497
  var onChange = React.useCallback(/*#__PURE__*/function () {
36460
- var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(publish) {
36498
+ var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(publish) {
36461
36499
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
36462
36500
  while (1) switch (_context5.prev = _context5.next) {
36463
36501
  case 0:
@@ -36480,7 +36518,7 @@ function usePackagePublishing(_ref) {
36480
36518
  }, _callee5);
36481
36519
  }));
36482
36520
  return function (_x2) {
36483
- return _ref6.apply(this, arguments);
36521
+ return _ref7.apply(this, arguments);
36484
36522
  };
36485
36523
  }(), [handlePublishClick, performPublish]);
36486
36524
  return {
@@ -36490,6 +36528,8 @@ function usePackagePublishing(_ref) {
36490
36528
  isPublished: isPublished,
36491
36529
  isReleaseWithdrawn: isReleaseWithdrawn,
36492
36530
  unpublishedChanges: unpublishedChanges,
36531
+ isInherited: isInherited,
36532
+ inheritedTooltip: inheritedTooltip,
36493
36533
  disabled: disabled,
36494
36534
  organizationModalVisible: organizationModalVisible,
36495
36535
  setOrganizationModalVisible: setOrganizationModalVisible,
@@ -36589,15 +36629,17 @@ function PackagePublishControls(_ref) {
36589
36629
  isReleaseWithdrawn = publishing.isReleaseWithdrawn,
36590
36630
  unpublishedChanges = publishing.unpublishedChanges,
36591
36631
  disabled = publishing.disabled,
36632
+ isInherited = publishing.isInherited,
36633
+ inheritedTooltip = publishing.inheritedTooltip,
36592
36634
  _onChange = publishing.onChange;
36593
36635
  return /*#__PURE__*/jsxs(Fragment, {
36594
36636
  children: [/*#__PURE__*/jsxs(Space$1, {
36595
36637
  size: "middle",
36596
36638
  align: "center",
36597
36639
  children: [/*#__PURE__*/jsx(Tooltip, {
36598
- title: disabled ? '' : !!isPublished ? t('backoffice.idmEnricher.packages.label.unpublish') : t('backoffice.idmEnricher.packages.label.publish'),
36640
+ title: isInherited ? inheritedTooltip : disabled ? '' : !!isPublished ? t('backoffice.idmEnricher.packages.label.unpublish') : t('backoffice.idmEnricher.packages.label.publish'),
36599
36641
  children: /*#__PURE__*/jsx(Checkbox$2, {
36600
- checked: !!isPublished,
36642
+ checked: !!isPublished || isInherited,
36601
36643
  disabled: disabled,
36602
36644
  indeterminate: unpublishedChanges,
36603
36645
  onChange: function onChange(e) {
@@ -38522,13 +38564,17 @@ function PackagePublishSwitch(_ref) {
38522
38564
  isReleaseWithdrawn = publishing.isReleaseWithdrawn,
38523
38565
  unpublishedChanges = publishing.unpublishedChanges,
38524
38566
  disabled = publishing.disabled,
38567
+ isInherited = publishing.isInherited,
38568
+ inheritedTooltip = publishing.inheritedTooltip,
38525
38569
  _onChange = publishing.onChange;
38526
38570
  var publishingLabel = pendingAction === 'unpublish' ? t('backoffice.idmEnricher.packages.label.statusUnpublishing', {
38527
38571
  defaultValue: 'Veröffentlichung wird entfernt'
38528
38572
  }) : t('backoffice.idmEnricher.packages.label.statusPublishing', {
38529
38573
  defaultValue: 'Wird gerade publiziert'
38530
38574
  });
38531
- var stateLabel = isPublished ? t('backoffice.idmEnricher.packages.label.statusPublished', {
38575
+ var stateLabel = isInherited ? t('backoffice.idmEnricher.packages.label.statusInherited', {
38576
+ defaultValue: 'Automatisch vererbt'
38577
+ }) : isPublished ? t('backoffice.idmEnricher.packages.label.statusPublished', {
38532
38578
  defaultValue: 'Publiziert'
38533
38579
  }) : t('backoffice.idmEnricher.packages.label.statusNotPublished', {
38534
38580
  defaultValue: 'Nicht publiziert'
@@ -38559,10 +38605,10 @@ function PackagePublishSwitch(_ref) {
38559
38605
  children: publishingLabel
38560
38606
  }) : /*#__PURE__*/jsxs(Fragment, {
38561
38607
  children: [/*#__PURE__*/jsx(Tooltip, {
38562
- title: disabled ? '' : isPublished ? t('backoffice.idmEnricher.packages.label.unpublish') : t('backoffice.idmEnricher.packages.label.publish'),
38608
+ title: isInherited ? inheritedTooltip : disabled ? '' : isPublished ? t('backoffice.idmEnricher.packages.label.unpublish') : t('backoffice.idmEnricher.packages.label.publish'),
38563
38609
  children: /*#__PURE__*/jsx(Switch$1, {
38564
38610
  size: "small",
38565
- checked: !!isPublished,
38611
+ checked: !!isPublished || isInherited,
38566
38612
  disabled: disabled,
38567
38613
  onChange: function onChange(checked) {
38568
38614
  return _onChange(checked);
@@ -55637,6 +55683,17 @@ function Content$9() {
55637
55683
  });
55638
55684
  }
55639
55685
 
55686
+ /**
55687
+ * Whether a package can be selected as a collection member: it must be published for the organization
55688
+ * itself or by a parent organization (whose publication is inherited automatically), and must not be a
55689
+ * configurator light package.
55690
+ */
55691
+ function isPackageSelectableAsCollectionMember(packageData, organizationId, parentOrganizations) {
55692
+ var _packageData$publishe;
55693
+ var publishedOrInherited = !!(packageData !== null && packageData !== void 0 && (_packageData$publishe = packageData.published) !== null && _packageData$publishe !== void 0 && _packageData$publishe[organizationId]) || !!getInheritedPublishOrganization(packageData, organizationId, parentOrganizations);
55694
+ return publishedOrInherited && !(packageData !== null && packageData !== void 0 && packageData.isApi);
55695
+ }
55696
+
55640
55697
  function CollectionMembers(_ref) {
55641
55698
  var collection = _ref.collection,
55642
55699
  organizationId = _ref.organizationId,
@@ -55644,6 +55701,7 @@ function CollectionMembers(_ref) {
55644
55701
  var _useTranslation = useTranslation();
55645
55702
  _useTranslation.t;
55646
55703
  var i18n = _useTranslation.i18n;
55704
+ var root = useStore();
55647
55705
  var applicationData = useMemo(function () {
55648
55706
  return {
55649
55707
  organizationId: organizationId,
@@ -55685,8 +55743,8 @@ function CollectionMembers(_ref) {
55685
55743
  multiple: false,
55686
55744
  translated: false,
55687
55745
  filter: function filter(_, lookupData) {
55688
- var _lookupData$published;
55689
- return ((_lookupData$published = lookupData.published) === null || _lookupData$published === void 0 ? void 0 : _lookupData$published[organizationId]) && !lookupData.isApi;
55746
+ var _root$dataStore$curre, _root$dataStore$curre2;
55747
+ return isPackageSelectableAsCollectionMember(lookupData, organizationId, (_root$dataStore$curre = (_root$dataStore$curre2 = root.dataStore.currentOrganization) === null || _root$dataStore$curre2 === void 0 ? void 0 : _root$dataStore$curre2.parentOrganizations) !== null && _root$dataStore$curre !== void 0 ? _root$dataStore$curre : []);
55690
55748
  },
55691
55749
  additionalMappings: [{
55692
55750
  lookupField: 'published'
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=collectionMemberUtils.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectionMemberUtils.test.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/tests/unit/ui/IDMCollectionEditor/Tables/collectionMemberUtils.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=publishUtils.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publishUtils.test.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/tests/unit/ui/IDMEnricherEditor/TablePackages/publishUtils.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"CollectionMembers.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCollectionEditor/Tables/CollectionMembers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAiB,MAAM,4BAA4B,CAAC;AAEjF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,UAAU,EACV,cAAc,EACd,SAAS,GACV,EAAE;IACD,UAAU,EAAE,GAAG,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,oBAAoB,CAAC,GAAG,CAAC,CAAC;CACnC,qBA2FA"}
1
+ {"version":3,"file":"CollectionMembers.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCollectionEditor/Tables/CollectionMembers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAiB,MAAM,4BAA4B,CAAC;AAIjF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,UAAU,EACV,cAAc,EACd,SAAS,GACV,EAAE;IACD,UAAU,EAAE,GAAG,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,oBAAoB,CAAC,GAAG,CAAC,CAAC;CACnC,qBA2FA"}
@@ -0,0 +1,13 @@
1
+ import { ParentOrganization } from '../../IDMEnricherEditor/modules/TablePackages/publishUtils';
2
+ /**
3
+ * Whether a package can be selected as a collection member: it must be published for the organization
4
+ * itself or by a parent organization (whose publication is inherited automatically), and must not be a
5
+ * configurator light package.
6
+ */
7
+ export declare function isPackageSelectableAsCollectionMember(packageData: {
8
+ published?: {
9
+ [organizationId: string]: unknown;
10
+ };
11
+ isApi?: boolean;
12
+ } | undefined, organizationId: string, parentOrganizations: ParentOrganization[]): boolean;
13
+ //# sourceMappingURL=collectionMemberUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectionMemberUtils.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/IDMCollectionEditor/Tables/collectionMemberUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAEjI;;;;GAIG;AACH,wBAAgB,qCAAqC,CACnD,WAAW,EAAE;IAAE,SAAS,CAAC,EAAE;QAAE,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,EAC/F,cAAc,EAAE,MAAM,EACtB,mBAAmB,EAAE,kBAAkB,EAAE,GACxC,OAAO,CAIT"}
@@ -1 +1 @@
1
- {"version":3,"file":"PackagePublishSwitch.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/components/PrefilterSelectors/PackagePublishSwitch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAGxF,UAAU,KAAK;IACb,UAAU,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;CACrD;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAAE,UAAU,EAAE,EAAE,KAAK,qBAuEjE"}
1
+ {"version":3,"file":"PackagePublishSwitch.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/components/PrefilterSelectors/PackagePublishSwitch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAGxF,UAAU,KAAK;IACb,UAAU,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;CACrD;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAAE,UAAU,EAAE,EAAE,KAAK,qBAgFjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"PackagePublishControls.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/modules/TablePackages/PackagePublishControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAK/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,UAAU,KAAK;IACb,UAAU,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;IACpD,2FAA2F;IAC3F,UAAU,CAAC,EAAE,QAAQ,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,KAAK,qBAiC/E"}
1
+ {"version":3,"file":"PackagePublishControls.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/modules/TablePackages/PackagePublishControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAK/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,UAAU,KAAK;IACb,UAAU,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;IACpD,2FAA2F;IAC3F,UAAU,CAAC,EAAE,QAAQ,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,KAAK,qBA4C/E"}
@@ -10,6 +10,13 @@ interface AutomaticPublishingOrganizationsParams {
10
10
  automaticPublishing?: boolean;
11
11
  };
12
12
  };
13
+ dependingPackages?: {
14
+ organizationId?: string;
15
+ packageName?: string;
16
+ }[];
17
+ published?: {
18
+ [organizationId: string]: unknown;
19
+ };
13
20
  };
14
21
  }
15
22
  /**
@@ -21,6 +28,22 @@ export declare function fetchAutomaticPublishingOrganizations({ authServiceUrl,
21
28
  _id: string;
22
29
  displayName: string;
23
30
  }>>;
31
+ export interface ParentOrganization {
32
+ _id: string;
33
+ displayName?: string;
34
+ }
35
+ /**
36
+ * Returns the parent organization whose publication of the package the given organization inherits, or
37
+ * undefined when the package is not inherited. A parent organization's publication is inherited
38
+ * automatically, so such a package must not be published separately. An own published entry of the
39
+ * organization shadows the inherited one, so the package does not count as inherited while the
40
+ * organization has published it itself.
41
+ */
42
+ export declare function getInheritedPublishOrganization(packageData: {
43
+ published?: {
44
+ [organizationId: string]: unknown;
45
+ };
46
+ } | undefined, organizationId: string, parentOrganizations: ParentOrganization[]): ParentOrganization | undefined;
24
47
  /**
25
48
  * Returns true if the package was last updated after it was published, meaning the published version
26
49
  * is outdated.
@@ -1 +1 @@
1
- {"version":3,"file":"publishUtils.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/modules/TablePackages/publishUtils.ts"],"names":[],"mappings":"AAAA,UAAU,sCAAsC;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE;QACX,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;QAClC,QAAQ,CAAC,EAAE;YAAE,CAAC,cAAc,EAAE,MAAM,GAAG;gBAAE,mBAAmB,CAAC,EAAE,OAAO,CAAA;aAAE,CAAA;SAAE,CAAC;KAC5E,CAAC;CACH;AAED;;;;GAIG;AACH,wBAAsB,qCAAqC,CAAC,EAC1D,cAAc,EACd,cAAc,EACd,GAAG,EACH,WAAW,GACZ,EAAE,sCAAsC,GAAG,OAAO,CAAC,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAqD/F;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,qBAAqB,CAAC,EAAE,MAAM,GAAG,OAAO,CASzG"}
1
+ {"version":3,"file":"publishUtils.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/modules/TablePackages/publishUtils.ts"],"names":[],"mappings":"AAAA,UAAU,sCAAsC;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE;QACX,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;QAClC,QAAQ,CAAC,EAAE;YAAE,CAAC,cAAc,EAAE,MAAM,GAAG;gBAAE,mBAAmB,CAAC,EAAE,OAAO,CAAA;aAAE,CAAA;SAAE,CAAC;QAC3E,iBAAiB,CAAC,EAAE;YAAE,cAAc,CAAC,EAAE,MAAM,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;QACxE,SAAS,CAAC,EAAE;YAAE,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC;KACnD,CAAC;CACH;AAED;;;;GAIG;AACH,wBAAsB,qCAAqC,CAAC,EAC1D,cAAc,EACd,cAAc,EACd,GAAG,EACH,WAAW,GACZ,EAAE,sCAAsC,GAAG,OAAO,CAAC,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CA+D/F;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,WAAW,EAAE;IAAE,SAAS,CAAC,EAAE;QAAE,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;CAAE,GAAG,SAAS,EAC9E,cAAc,EAAE,MAAM,EACtB,mBAAmB,EAAE,kBAAkB,EAAE,GACxC,kBAAkB,GAAG,SAAS,CAKhC;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,qBAAqB,CAAC,EAAE,MAAM,GAAG,OAAO,CASzG"}
@@ -20,6 +20,10 @@ export interface PackagePublishData {
20
20
  publishDate?: string;
21
21
  };
22
22
  };
23
+ dependingPackages?: {
24
+ organizationId?: string;
25
+ packageName?: string;
26
+ }[];
23
27
  }
24
28
  interface UsePackagePublishingParams {
25
29
  packageId: string;
@@ -43,6 +47,8 @@ export declare function usePackagePublishing({ packageId, data, organizationId,
43
47
  isPublished: boolean | undefined;
44
48
  isReleaseWithdrawn: boolean;
45
49
  unpublishedChanges: boolean;
50
+ isInherited: boolean;
51
+ inheritedTooltip: string;
46
52
  disabled: boolean;
47
53
  organizationModalVisible: boolean;
48
54
  setOrganizationModalVisible: React.Dispatch<React.SetStateAction<boolean>>;
@@ -1 +1 @@
1
- {"version":3,"file":"usePackagePublishing.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/modules/TablePackages/usePackagePublishing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAG9E,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,EAAE;QAAE,CAAC,cAAc,EAAE,MAAM,GAAG;YAAE,mBAAmB,CAAC,EAAE,OAAO,CAAA;SAAE,CAAA;KAAE,CAAC;IAC3E,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE;QAAE,CAAC,cAAc,EAAE,MAAM,GAAG;YAAE,UAAU,CAAC,EAAE,OAAO,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;CAC1F;AAED,UAAU,0BAA0B;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,kBAAkB,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,+GAA+G;IAC/G,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,wHAAwH;IACxH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,IAAI,EACJ,cAAc,EACd,SAAS,EACT,UAAU,EACV,WAAW,EACX,sBAAsB,GACvB,EAAE,0BAA0B;;;;;;;;;;;aAO6D,MAAM;qBAAe,MAAM;;;;;wBAyFjG,OAAO;;EA2B1B"}
1
+ {"version":3,"file":"usePackagePublishing.d.ts","sourceRoot":"","sources":["../../../../../../../../src/ui/IDMEnricherEditor/modules/TablePackages/usePackagePublishing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAG9E,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,EAAE;QAAE,CAAC,cAAc,EAAE,MAAM,GAAG;YAAE,mBAAmB,CAAC,EAAE,OAAO,CAAA;SAAE,CAAA;KAAE,CAAC;IAC3E,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE;QAAE,CAAC,cAAc,EAAE,MAAM,GAAG;YAAE,UAAU,CAAC,EAAE,OAAO,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;IACzF,iBAAiB,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACzE;AAED,UAAU,0BAA0B;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,kBAAkB,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,+GAA+G;IAC/G,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,wHAAwH;IACxH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,IAAI,EACJ,cAAc,EACd,SAAS,EACT,UAAU,EACV,WAAW,EACX,sBAAsB,GACvB,EAAE,0BAA0B;;;;;;;;;;;;;aAO6D,MAAM;qBAAe,MAAM;;;;;wBAsGjG,OAAO;;EA6B1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-backoffice",
3
- "version": "26.12.0-beta.8",
3
+ "version": "26.12.0-beta.9",
4
4
  "description": "Ant Design backoffice shell: configuration plus the IDM and enricher editors.",
5
5
  "license": "COMMERCIAL",
6
6
  "devDependencies": {
@@ -16,14 +16,14 @@
16
16
  "dependencies": {
17
17
  "@ant-design/icons": "6.3.4",
18
18
  "@babel/runtime": "7.24.7",
19
- "@crystaldesign/content-box": "26.12.0-beta.8",
20
- "@crystaldesign/content-item": "26.12.0-beta.8",
21
- "@crystaldesign/diva-agent": "26.12.0-beta.8",
22
- "@crystaldesign/diva-core": "26.12.0-beta.8",
23
- "@crystaldesign/diva-utils": "26.12.0-beta.8",
24
- "@crystaldesign/media-upload": "26.12.0-beta.8",
25
- "@crystaldesign/rtf-editor": "26.12.0-beta.8",
26
- "@crystaldesign/spreadsheet": "26.12.0-beta.8",
19
+ "@crystaldesign/content-box": "26.12.0-beta.9",
20
+ "@crystaldesign/content-item": "26.12.0-beta.9",
21
+ "@crystaldesign/diva-agent": "26.12.0-beta.9",
22
+ "@crystaldesign/diva-core": "26.12.0-beta.9",
23
+ "@crystaldesign/diva-utils": "26.12.0-beta.9",
24
+ "@crystaldesign/media-upload": "26.12.0-beta.9",
25
+ "@crystaldesign/rtf-editor": "26.12.0-beta.9",
26
+ "@crystaldesign/spreadsheet": "26.12.0-beta.9",
27
27
  "@dnd-kit/core": "^6.1.0",
28
28
  "@dnd-kit/sortable": "^8.0.0",
29
29
  "@dnd-kit/utilities": "^3.2.2",
@@ -57,5 +57,5 @@
57
57
  },
58
58
  "module": "build/esm/index.js",
59
59
  "types": "./build/types/backoffice/src/index.d.ts",
60
- "gitHead": "c3096c67fa996ffef19460e98637b5d418ff5c7c"
60
+ "gitHead": "62f51ceee2ea71c54b990c666eb7ae864f13d374"
61
61
  }