@kontur.candy/generator 5.28.0-filename-3format.1 → 5.28.0-fixnavigation.1

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 (2) hide show
  1. package/dist/index.js +15 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -60364,6 +60364,7 @@ __webpack_require__.r(__webpack_exports__);
60364
60364
  /* harmony export */ getAllUnitIdInstances: () => (/* binding */ getAllUnitIdInstances),
60365
60365
  /* harmony export */ isUnitIdEquals: () => (/* binding */ isUnitIdEquals),
60366
60366
  /* harmony export */ sectionNameToUnitId: () => (/* binding */ sectionNameToUnitId),
60367
+ /* harmony export */ sectionNameToUnitIdForNavigation: () => (/* binding */ sectionNameToUnitIdForNavigation),
60367
60368
  /* harmony export */ unitIdToLegacyUnitId: () => (/* binding */ unitIdToLegacyUnitId),
60368
60369
  /* harmony export */ unitIdWithInstance: () => (/* binding */ unitIdWithInstance),
60369
60370
  /* harmony export */ unitWithoutInstance: () => (/* binding */ unitWithoutInstance)
@@ -60415,6 +60416,20 @@ function sectionNameToUnitId(sectionName) {
60415
60416
  };
60416
60417
  }
60417
60418
  }
60419
+ function sectionNameToUnitIdForNavigation(sectionName) {
60420
+ const [id, ...instances] = sectionName.split("-");
60421
+ if (instances.length === 0) {
60422
+ return {
60423
+ pageId: id !== null && id !== void 0 ? id : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)()
60424
+ };
60425
+ } else {
60426
+ var _instances$2;
60427
+ return {
60428
+ pageId: id !== null && id !== void 0 ? id : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)(),
60429
+ instance: (_instances$2 = instances[0]) !== null && _instances$2 !== void 0 ? _instances$2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)()
60430
+ };
60431
+ }
60432
+ }
60418
60433
  function getAllUnitIdInstances(unitId) {
60419
60434
  var _unitId$parentInstanc, _unitId$instance;
60420
60435
  return ((_unitId$parentInstanc = unitId.parentInstances) !== null && _unitId$parentInstanc !== void 0 ? _unitId$parentInstanc : []).concat((_unitId$instance = unitId.instance) !== null && _unitId$instance !== void 0 ? _unitId$instance : []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontur.candy/generator",
3
- "version": "5.28.0-filename-3format.1",
3
+ "version": "5.28.0-fixnavigation.1",
4
4
  "description": "Candy forms generator",
5
5
  "author": "SKBKontur Candy Team",
6
6
  "private": false,