@ryuzaki13/react-foundation-lib 2.31.0 → 2.31.3
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.
- package/README.md +17 -5
- package/dist/analytical-table/definition/analyticalDefinitionConstants.d.ts +17 -0
- package/dist/analytical-table/definition/analyticalDefinitionConstants.d.ts.map +1 -0
- package/dist/analytical-table/definition/compileAnalyticalTableDefinition.d.ts.map +1 -1
- package/dist/analytical-table/definition/types.d.ts +6 -5
- package/dist/analytical-table/definition/types.d.ts.map +1 -1
- package/dist/analytical-table/dynamic-columns/analyticalDateColumnConstants.d.ts +7 -0
- package/dist/analytical-table/dynamic-columns/analyticalDateColumnConstants.d.ts.map +1 -0
- package/dist/analytical-table/dynamic-columns/dateColumns.d.ts.map +1 -1
- package/dist/analytical-table/dynamic-columns/types.d.ts +2 -1
- package/dist/analytical-table/dynamic-columns/types.d.ts.map +1 -1
- package/dist/analytical-table/index.js +124 -113
- package/dist/analytical-table/index.js.map +1 -1
- package/dist/analytical-table/projections/analyticalExportConstants.d.ts +7 -0
- package/dist/analytical-table/projections/analyticalExportConstants.d.ts.map +1 -0
- package/dist/analytical-table/projections/expansion.d.ts +2 -1
- package/dist/analytical-table/projections/expansion.d.ts.map +1 -1
- package/dist/analytical-table/projections/exportProjection.d.ts.map +1 -1
- package/dist/analytical-table/projections/types.d.ts +3 -2
- package/dist/analytical-table/projections/types.d.ts.map +1 -1
- package/dist/analytical-table/runtime/aggregation.d.ts.map +1 -1
- package/dist/analytical-table/runtime/analyticalRowConstants.d.ts +4 -0
- package/dist/analytical-table/runtime/analyticalRowConstants.d.ts.map +1 -0
- package/dist/analytical-table/runtime/analyticalViewConstants.d.ts +16 -0
- package/dist/analytical-table/runtime/analyticalViewConstants.d.ts.map +1 -0
- package/dist/analytical-table/runtime/buildGroupedModel.d.ts.map +1 -1
- package/dist/analytical-table/runtime/filtering.d.ts.map +1 -1
- package/dist/analytical-table/runtime/grouping.d.ts.map +1 -1
- package/dist/analytical-table/runtime/hierarchy.d.ts +2 -1
- package/dist/analytical-table/runtime/hierarchy.d.ts.map +1 -1
- package/dist/analytical-table/runtime/totals.d.ts +2 -2
- package/dist/analytical-table/runtime/totals.d.ts.map +1 -1
- package/dist/analytical-table/runtime/types.d.ts +5 -3
- package/dist/analytical-table/runtime/types.d.ts.map +1 -1
- package/dist/analytical-table/runtime/valueComparison.d.ts.map +1 -1
- package/dist/array/index.js +1 -1
- package/dist/array/reorder.d.ts +6 -1
- package/dist/array/reorder.d.ts.map +1 -1
- package/dist/async-task-runner/createCoalescingTaskRunner.d.ts.map +1 -1
- package/dist/async-task-runner/createDeadlineTimer.d.ts.map +1 -1
- package/dist/async-task-runner/index.js +39 -36
- package/dist/async-task-runner/index.js.map +1 -1
- package/dist/async-task-runner/nativeTimerConstants.d.ts +3 -0
- package/dist/async-task-runner/nativeTimerConstants.d.ts.map +1 -0
- package/dist/binary/base64Constants.d.ts +6 -0
- package/dist/binary/base64Constants.d.ts.map +1 -0
- package/dist/binary/binaryToBlob.d.ts.map +1 -1
- package/dist/binary/getBase64DecodedSize.d.ts.map +1 -1
- package/dist/binary/index.js +95 -70
- package/dist/binary/index.js.map +1 -1
- package/dist/browser-notifications/browserNotificationConstants.d.ts +3 -0
- package/dist/browser-notifications/browserNotificationConstants.d.ts.map +1 -0
- package/dist/browser-notifications/browserNotificationTypes.d.ts +2 -1
- package/dist/browser-notifications/browserNotificationTypes.d.ts.map +1 -1
- package/dist/browser-notifications/createBrowserNotificationPresenter.d.ts.map +1 -1
- package/dist/browser-notifications/index.js +38 -37
- package/dist/browser-notifications/index.js.map +1 -1
- package/dist/chunks/{array-D-_yMMUK.js → array-bd7LYFto.js} +1 -3
- package/dist/chunks/{array-D-_yMMUK.js.map → array-bd7LYFto.js.map} +1 -1
- package/dist/chunks/{dom-BK22UmgF.js → dom-ZSeWZ0Gg.js} +103 -98
- package/dist/chunks/dom-ZSeWZ0Gg.js.map +1 -0
- package/dist/chunks/formatDate-CNPcfNte.js +133 -0
- package/dist/chunks/formatDate-CNPcfNte.js.map +1 -0
- package/dist/chunks/{formatters-CZnnbdud.js → formatters-CO40zvVB.js} +496 -496
- package/dist/chunks/formatters-CO40zvVB.js.map +1 -0
- package/dist/chunks/{formulas-BXT_XBWI.js → formulas-Y0HOcFhe.js} +90 -86
- package/dist/chunks/formulas-Y0HOcFhe.js.map +1 -0
- package/dist/chunks/hasSignatureBytes-D2wO_Myl.js +11 -0
- package/dist/chunks/hasSignatureBytes-D2wO_Myl.js.map +1 -0
- package/dist/chunks/keyboardConstants-BZKskWsm.js +6 -0
- package/dist/chunks/keyboardConstants-BZKskWsm.js.map +1 -0
- package/dist/chunks/media-imBOXWwa.js +192 -0
- package/dist/chunks/media-imBOXWwa.js.map +1 -0
- package/dist/chunks/mimeTypeConstants-BzONV-b1.js +6 -0
- package/dist/chunks/mimeTypeConstants-BzONV-b1.js.map +1 -0
- package/dist/chunks/{query-client-CVRfrYZM.js → query-client-D0HQZ84w.js} +142 -142
- package/dist/chunks/query-client-D0HQZ84w.js.map +1 -0
- package/dist/chunks/scalarTypeClassification-D4YcGxtQ.js +766 -0
- package/dist/chunks/scalarTypeClassification-D4YcGxtQ.js.map +1 -0
- package/dist/chunks/scalarTypeConstants-CnSsjpGO.js +6 -0
- package/dist/chunks/scalarTypeConstants-CnSsjpGO.js.map +1 -0
- package/dist/chunks/utils-DW0Yso1Q.js +210 -0
- package/dist/chunks/utils-DW0Yso1Q.js.map +1 -0
- package/dist/chunks/{uuid-CUJPAbRY.js → uuid-izDzLv18.js} +1 -2
- package/dist/chunks/uuid-izDzLv18.js.map +1 -0
- package/dist/chunks/validate-8URYKKly.js +613 -0
- package/dist/chunks/validate-8URYKKly.js.map +1 -0
- package/dist/copy/index.js +5 -5
- package/dist/copy/index.js.map +1 -1
- package/dist/copy/useCopyFeedback.d.ts.map +1 -1
- package/dist/crypto/hashString.d.ts.map +1 -1
- package/dist/crypto/hexadecimalConstants.d.ts +3 -0
- package/dist/crypto/hexadecimalConstants.d.ts.map +1 -0
- package/dist/crypto/index.js +25 -24
- package/dist/crypto/index.js.map +1 -1
- package/dist/crypto/uuid.d.ts.map +1 -1
- package/dist/date-segments/index.js +81 -81
- package/dist/date-segments/index.js.map +1 -1
- package/dist/date-segments/mask.d.ts +13 -3
- package/dist/date-segments/mask.d.ts.map +1 -1
- package/dist/decimal/decimalConstants.d.ts +3 -0
- package/dist/decimal/decimalConstants.d.ts.map +1 -0
- package/dist/decimal/index.js +0 -2
- package/dist/decimal/index.js.map +1 -1
- package/dist/decimal/normalizeDecimal.d.ts.map +1 -1
- package/dist/decimal/normalizeDecimalLiteral.d.ts.map +1 -1
- package/dist/decimal/resolveDecimalMaxLength.d.ts.map +1 -1
- package/dist/decimal/sumDecimals.d.ts.map +1 -1
- package/dist/decimal/writeDecimalParts.d.ts.map +1 -1
- package/dist/dom/document-scroll/acquireDocumentScrollLock.d.ts.map +1 -1
- package/dist/dom/document-scroll/attachDocumentTouchScrollGuard.d.ts.map +1 -1
- package/dist/dom/document-scroll/canConsumeVerticalTouchScroll.d.ts.map +1 -1
- package/dist/dom/domEventConstants.d.ts +4 -0
- package/dist/dom/domEventConstants.d.ts.map +1 -0
- package/dist/dom/domScrollConstants.d.ts +3 -0
- package/dist/dom/domScrollConstants.d.ts.map +1 -0
- package/dist/dom/index.js +1 -1
- package/dist/dom/installFaviconOverride.d.ts.map +1 -1
- package/dist/dom/overlayFocusConstants.d.ts +4 -0
- package/dist/dom/overlayFocusConstants.d.ts.map +1 -0
- package/dist/dom/scroll-anchor/captureScrollAnchor.d.ts.map +1 -1
- package/dist/dom/useClickOutside.d.ts +1 -1
- package/dist/dom/useClickOutside.d.ts.map +1 -1
- package/dist/dom/useEscapeDismiss.d.ts +1 -1
- package/dist/dom/useEscapeDismiss.d.ts.map +1 -1
- package/dist/dom/useFocusTrap.d.ts.map +1 -1
- package/dist/dom/useIsTouchDevice.d.ts.map +1 -1
- package/dist/dom/useOverlayFocus.d.ts +3 -2
- package/dist/dom/useOverlayFocus.d.ts.map +1 -1
- package/dist/dom/visual-viewport/attachVisualViewportFrame.d.ts.map +1 -1
- package/dist/error-report/breadcrumbs.d.ts.map +1 -1
- package/dist/error-report/capture.d.ts.map +1 -1
- package/dist/error-report/captureOptions.d.ts +3 -2
- package/dist/error-report/captureOptions.d.ts.map +1 -1
- package/dist/error-report/capturePolicyConstants.d.ts +4 -0
- package/dist/error-report/capturePolicyConstants.d.ts.map +1 -0
- package/dist/error-report/dataPreview.d.ts.map +1 -1
- package/dist/error-report/diagnostics.d.ts.map +1 -1
- package/dist/error-report/drafts.d.ts.map +1 -1
- package/dist/error-report/environment.d.ts.map +1 -1
- package/dist/error-report/errorInfo.d.ts.map +1 -1
- package/dist/error-report/errorReportCaptureLimits.d.ts +26 -0
- package/dist/error-report/errorReportCaptureLimits.d.ts.map +1 -0
- package/dist/error-report/errorReportContractConstants.d.ts +32 -0
- package/dist/error-report/errorReportContractConstants.d.ts.map +1 -0
- package/dist/error-report/index.js +586 -587
- package/dist/error-report/index.js.map +1 -1
- package/dist/error-report/payload.d.ts.map +1 -1
- package/dist/error-report/queue.d.ts.map +1 -1
- package/dist/error-report/queueContract.d.ts +7 -6
- package/dist/error-report/queueContract.d.ts.map +1 -1
- package/dist/error-report/queueRecord.d.ts.map +1 -1
- package/dist/error-report/queueResultConstants.d.ts +14 -0
- package/dist/error-report/queueResultConstants.d.ts.map +1 -0
- package/dist/error-report/runtimeDeduplication.d.ts +2 -1
- package/dist/error-report/runtimeDeduplication.d.ts.map +1 -1
- package/dist/error-report/safeValue.d.ts.map +1 -1
- package/dist/error-report/safeValueMarkerConstants.d.ts +16 -0
- package/dist/error-report/safeValueMarkerConstants.d.ts.map +1 -0
- package/dist/error-report/schema.d.ts.map +1 -1
- package/dist/error-report/types.d.ts +10 -8
- package/dist/error-report/types.d.ts.map +1 -1
- package/dist/error-report-source-maps/archive.d.ts.map +1 -1
- package/dist/error-report-source-maps/artifact.d.ts.map +1 -1
- package/dist/error-report-source-maps/index.js +238 -238
- package/dist/error-report-source-maps/index.js.map +1 -1
- package/dist/error-report-source-maps/manifest.d.ts.map +1 -1
- package/dist/error-report-source-maps/package.d.ts.map +1 -1
- package/dist/error-report-source-maps/sourceMapArtifactConstants.d.ts +11 -0
- package/dist/error-report-source-maps/sourceMapArtifactConstants.d.ts.map +1 -0
- package/dist/error-report-source-maps/symbolicate.d.ts.map +1 -1
- package/dist/error-report-source-maps/symbolicationResultConstants.d.ts +6 -0
- package/dist/error-report-source-maps/symbolicationResultConstants.d.ts.map +1 -0
- package/dist/error-report-source-maps/types.d.ts +4 -2
- package/dist/error-report-source-maps/types.d.ts.map +1 -1
- package/dist/excel/excel.d.ts.map +1 -1
- package/dist/excel/excelWorkbookConstants.d.ts +6 -0
- package/dist/excel/excelWorkbookConstants.d.ts.map +1 -0
- package/dist/excel/index.js +121 -120
- package/dist/excel/index.js.map +1 -1
- package/dist/excel/matrixWorkbook.d.ts +6 -1
- package/dist/excel/matrixWorkbook.d.ts.map +1 -1
- package/dist/excel/tableExport.d.ts +2 -2
- package/dist/excel/tableExport.d.ts.map +1 -1
- package/dist/file/checkFileSignature.d.ts.map +1 -1
- package/dist/file/contentDisposition.d.ts.map +1 -1
- package/dist/file/fileSignatureConstants.d.ts +14 -18
- package/dist/file/fileSignatureConstants.d.ts.map +1 -1
- package/dist/file/fileSignatureTypes.d.ts +3 -3
- package/dist/file/fileSignatureTypes.d.ts.map +1 -1
- package/dist/file/image/imageReadConstants.d.ts +3 -0
- package/dist/file/image/imageReadConstants.d.ts.map +1 -0
- package/dist/file/image/readImageFile.d.ts +3 -2
- package/dist/file/image/readImageFile.d.ts.map +1 -1
- package/dist/file/image/types.d.ts +5 -3
- package/dist/file/image/types.d.ts.map +1 -1
- package/dist/file/index.js +139 -165
- package/dist/file/index.js.map +1 -1
- package/dist/file/mimeType.d.ts.map +1 -1
- package/dist/file/mimeTypeConstants.d.ts +18 -0
- package/dist/file/mimeTypeConstants.d.ts.map +1 -0
- package/dist/file/read-file/assert.d.ts.map +1 -1
- package/dist/file/read-file/readFile.d.ts +3 -11
- package/dist/file/read-file/readFile.d.ts.map +1 -1
- package/dist/file/read-file/readFileConstants.d.ts +13 -0
- package/dist/file/read-file/readFileConstants.d.ts.map +1 -0
- package/dist/file/read-file/types.d.ts +7 -6
- package/dist/file/read-file/types.d.ts.map +1 -1
- package/dist/file/signature/checkArchiveSignature.d.ts.map +1 -1
- package/dist/file-system/fileSystemConstants.d.ts +5 -0
- package/dist/file-system/fileSystemConstants.d.ts.map +1 -0
- package/dist/file-system/fileSystemTypes.d.ts +2 -1
- package/dist/file-system/fileSystemTypes.d.ts.map +1 -1
- package/dist/file-system/index.js +11 -10
- package/dist/file-system/index.js.map +1 -1
- package/dist/file-system/resolvePathInsideRoot.d.ts.map +1 -1
- package/dist/formatters/boolean/parseAbapBoolean.d.ts.map +1 -1
- package/dist/formatters/boolean/toAbapBoolean.d.ts.map +1 -1
- package/dist/formatters/date/calendarDate.d.ts.map +1 -1
- package/dist/formatters/date/calendarDateConstants.d.ts +13 -0
- package/dist/formatters/date/calendarDateConstants.d.ts.map +1 -0
- package/dist/formatters/date/calendarPeriod.d.ts +11 -2
- package/dist/formatters/date/calendarPeriod.d.ts.map +1 -1
- package/dist/formatters/date/dateFormatConstants.d.ts +17 -0
- package/dist/formatters/date/dateFormatConstants.d.ts.map +1 -0
- package/dist/formatters/date/datePatternConstants.d.ts +16 -0
- package/dist/formatters/date/datePatternConstants.d.ts.map +1 -0
- package/dist/formatters/date/datePresetNameConstants.d.ts +27 -0
- package/dist/formatters/date/datePresetNameConstants.d.ts.map +1 -0
- package/dist/formatters/date/dateRange.d.ts +3 -1
- package/dist/formatters/date/dateRange.d.ts.map +1 -1
- package/dist/formatters/date/dateValueConstants.d.ts +15 -0
- package/dist/formatters/date/dateValueConstants.d.ts.map +1 -0
- package/dist/formatters/date/educationDate.d.ts.map +1 -1
- package/dist/formatters/date/formatDate.d.ts.map +1 -1
- package/dist/formatters/date/formatInstantDateTime.d.ts.map +1 -1
- package/dist/formatters/date/parseDate.d.ts.map +1 -1
- package/dist/formatters/date/pattern.d.ts.map +1 -1
- package/dist/formatters/date/presets.d.ts.map +1 -1
- package/dist/formatters/date/types.d.ts +8 -6
- package/dist/formatters/date/types.d.ts.map +1 -1
- package/dist/formatters/formatDurationMinutes.d.ts.map +1 -1
- package/dist/formatters/formatFileSize.d.ts.map +1 -1
- package/dist/formatters/formatPhone.d.ts.map +1 -1
- package/dist/formatters/index.js +6 -5
- package/dist/formatters/normalizeLeadingZeros.d.ts.map +1 -1
- package/dist/formatters/number/compact.d.ts.map +1 -1
- package/dist/formatters/number/formatCompactNumber.d.ts.map +1 -1
- package/dist/formatters/number/formatNumber.d.ts.map +1 -1
- package/dist/formatters/number/numberFormatConstants.d.ts +11 -0
- package/dist/formatters/number/numberFormatConstants.d.ts.map +1 -0
- package/dist/formatters/number/numberPresetNameConstants.d.ts +16 -0
- package/dist/formatters/number/numberPresetNameConstants.d.ts.map +1 -0
- package/dist/formatters/number/parseNumber.d.ts.map +1 -1
- package/dist/formatters/number/presets.d.ts.map +1 -1
- package/dist/formatters/number/types.d.ts +2 -1
- package/dist/formatters/number/types.d.ts.map +1 -1
- package/dist/formatters/pipeline/clone.d.ts.map +1 -1
- package/dist/formatters/pipeline/definitions.d.ts.map +1 -1
- package/dist/formatters/pipeline/dependencies.d.ts.map +1 -1
- package/dist/formatters/pipeline/execute.d.ts +4 -1
- package/dist/formatters/pipeline/execute.d.ts.map +1 -1
- package/dist/formatters/pipeline/formattersPipelineConstants.d.ts +19 -0
- package/dist/formatters/pipeline/formattersPipelineConstants.d.ts.map +1 -0
- package/dist/formatters/pipeline/normalize.d.ts.map +1 -1
- package/dist/formatters/pipeline/pipelineValidationConstants.d.ts +40 -0
- package/dist/formatters/pipeline/pipelineValidationConstants.d.ts.map +1 -0
- package/dist/formatters/pipeline/registry.d.ts +1 -1
- package/dist/formatters/pipeline/registry.d.ts.map +1 -1
- package/dist/formatters/pipeline/rekey.d.ts.map +1 -1
- package/dist/formatters/pipeline/runtime.d.ts.map +1 -1
- package/dist/formatters/pipeline/types.d.ts +28 -25
- package/dist/formatters/pipeline/types.d.ts.map +1 -1
- package/dist/formatters/pipeline/validate.d.ts +2 -1
- package/dist/formatters/pipeline/validate.d.ts.map +1 -1
- package/dist/formatters/strings/spaceCharacterConstants.d.ts +5 -0
- package/dist/formatters/strings/spaceCharacterConstants.d.ts.map +1 -0
- package/dist/formatters/strings/stripInnerSpaces.d.ts.map +1 -1
- package/dist/formatters/strings/stripLeadingZeros.d.ts.map +1 -1
- package/dist/formatters/valueState/fixedValueStateResolver.d.ts.map +1 -1
- package/dist/formatters/valueState/presentation.d.ts.map +1 -1
- package/dist/formatters/valueState/resolveValueStateClassName.d.ts.map +1 -1
- package/dist/formatters/valueState/thresholdValueStateResolver.d.ts.map +1 -1
- package/dist/formatters/valueState/types.d.ts +2 -1
- package/dist/formatters/valueState/types.d.ts.map +1 -1
- package/dist/formatters/valueState/valueStateRegistry.d.ts.map +1 -1
- package/dist/formatters/valueState/valueStateResolverConstants.d.ts +6 -0
- package/dist/formatters/valueState/valueStateResolverConstants.d.ts.map +1 -0
- package/dist/formulas/execute.d.ts +3 -2
- package/dist/formulas/execute.d.ts.map +1 -1
- package/dist/formulas/index.js +1 -1
- package/dist/formulas/isTableFormulaDependency.d.ts.map +1 -1
- package/dist/formulas/tableFormulaConstants.d.ts +12 -0
- package/dist/formulas/tableFormulaConstants.d.ts.map +1 -0
- package/dist/formulas/types.d.ts +2 -1
- package/dist/formulas/types.d.ts.map +1 -1
- package/dist/formulas/validate.d.ts +2 -1
- package/dist/formulas/validate.d.ts.map +1 -1
- package/dist/hooks/index.js +110 -107
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useBlockBrowserZoom.d.ts.map +1 -1
- package/dist/hooks/useDndSortableSensors.d.ts.map +1 -1
- package/dist/hooks/useFloatingListbox.d.ts +15 -33
- package/dist/hooks/useFloatingListbox.d.ts.map +1 -1
- package/dist/http/index.js +8 -7
- package/dist/http/index.js.map +1 -1
- package/dist/http/textResponse.d.ts.map +1 -1
- package/dist/indexed-records/createIndexedRecordsSchema.d.ts.map +1 -1
- package/dist/indexed-records/schema.js +24 -23
- package/dist/indexed-records/schema.js.map +1 -1
- package/dist/media/breakpointConstants.d.ts +5 -0
- package/dist/media/breakpointConstants.d.ts.map +1 -0
- package/dist/media/breakpoints.d.ts +2 -1
- package/dist/media/breakpoints.d.ts.map +1 -1
- package/dist/media/createNotificationTonePlayer.d.ts.map +1 -1
- package/dist/media/getCurrentFontSize.d.ts.map +1 -1
- package/dist/media/index.js +1 -1
- package/dist/media/mediaQueryConstants.d.ts +3 -0
- package/dist/media/mediaQueryConstants.d.ts.map +1 -0
- package/dist/media/responsive.d.ts +1 -1
- package/dist/media/responsive.d.ts.map +1 -1
- package/dist/media/useMatchMedia.d.ts.map +1 -1
- package/dist/media/useMediaQuery.d.ts.map +1 -1
- package/dist/metadata/baseMetaTypes.d.ts +7 -0
- package/dist/metadata/baseMetaTypes.d.ts.map +1 -0
- package/dist/metadata/metadataTypes.d.ts +17 -0
- package/dist/metadata/metadataTypes.d.ts.map +1 -0
- package/dist/metadata/scalarTypeClassification.d.ts +8 -0
- package/dist/metadata/scalarTypeClassification.d.ts.map +1 -0
- package/dist/metadata/scalarTypeConstants.d.ts +21 -0
- package/dist/metadata/scalarTypeConstants.d.ts.map +1 -0
- package/dist/notifications/index.js +62 -62
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/notificationTypeConstants.d.ts +6 -0
- package/dist/notifications/notificationTypeConstants.d.ts.map +1 -0
- package/dist/notifications/notify.d.ts.map +1 -1
- package/dist/notifications/store.d.ts.map +1 -1
- package/dist/notifications/types.d.ts +2 -1
- package/dist/notifications/types.d.ts.map +1 -1
- package/dist/number-scale/index.js +47 -46
- package/dist/number-scale/index.js.map +1 -1
- package/dist/number-scale/marksPositionConstants.d.ts +4 -0
- package/dist/number-scale/marksPositionConstants.d.ts.map +1 -0
- package/dist/number-scale/numberScale.d.ts +1 -1
- package/dist/number-scale/numberScale.d.ts.map +1 -1
- package/dist/number-scale/types.d.ts +2 -1
- package/dist/number-scale/types.d.ts.map +1 -1
- package/dist/odata-service/baseTypes.d.ts +1 -5
- package/dist/odata-service/baseTypes.d.ts.map +1 -1
- package/dist/odata-service/builder.d.ts.map +1 -1
- package/dist/odata-service/columns.d.ts.map +1 -1
- package/dist/odata-service/entityOperationConstants.d.ts +4 -0
- package/dist/odata-service/entityOperationConstants.d.ts.map +1 -0
- package/dist/odata-service/filterDefinitionConstants.d.ts +24 -0
- package/dist/odata-service/filterDefinitionConstants.d.ts.map +1 -0
- package/dist/odata-service/filterDefinitions.d.ts +19 -17
- package/dist/odata-service/filterDefinitions.d.ts.map +1 -1
- package/dist/odata-service/filterOperationConstants.d.ts +14 -0
- package/dist/odata-service/filterOperationConstants.d.ts.map +1 -0
- package/dist/odata-service/filters.d.ts.map +1 -1
- package/dist/odata-service/formatters.d.ts +1 -2
- package/dist/odata-service/formatters.d.ts.map +1 -1
- package/dist/odata-service/index.js +1317 -2
- package/dist/odata-service/index.js.map +1 -0
- package/dist/odata-service/odataMetadataConstants.d.ts +8 -0
- package/dist/odata-service/odataMetadataConstants.d.ts.map +1 -0
- package/dist/odata-service/parser.d.ts +1 -3
- package/dist/odata-service/parser.d.ts.map +1 -1
- package/dist/odata-service/schema.d.ts.map +1 -1
- package/dist/odata-service/sorts.d.ts.map +1 -1
- package/dist/odata-service/sqlFilters.d.ts +10 -5
- package/dist/odata-service/sqlFilters.d.ts.map +1 -1
- package/dist/odata-service/types.d.ts +13 -14
- package/dist/odata-service/types.d.ts.map +1 -1
- package/dist/odata-service/typesValidation.d.ts +1 -5
- package/dist/odata-service/typesValidation.d.ts.map +1 -1
- package/dist/pwa/index.js +72 -71
- package/dist/pwa/index.js.map +1 -1
- package/dist/pwa/sw-cache-policy.js +47 -47
- package/dist/pwa/sw-cache-policy.js.map +1 -1
- package/dist/pwa/swCachePolicy.d.ts +5 -1
- package/dist/pwa/swCachePolicy.d.ts.map +1 -1
- package/dist/pwa/useBrowserOnlineStatus.d.ts.map +1 -1
- package/dist/query-client/broadcast.d.ts +4 -3
- package/dist/query-client/broadcast.d.ts.map +1 -1
- package/dist/query-client/createQueryRestoreSchedulerGuard.d.ts.map +1 -1
- package/dist/query-client/createQueryRestoreStorage.d.ts.map +1 -1
- package/dist/query-client/index.js +1 -1
- package/dist/query-client/invalidationBroadcast.d.ts +2 -1
- package/dist/query-client/invalidationBroadcast.d.ts.map +1 -1
- package/dist/query-client/persistence.d.ts +9 -6
- package/dist/query-client/persistence.d.ts.map +1 -1
- package/dist/query-client/queryCacheEventConstants.d.ts +11 -0
- package/dist/query-client/queryCacheEventConstants.d.ts.map +1 -0
- package/dist/query-client/queryClient.d.ts +2 -1
- package/dist/query-client/queryClient.d.ts.map +1 -1
- package/dist/query-client/queryMeta.d.ts.map +1 -1
- package/dist/query-client/sessionPersistenceConstants.d.ts +5 -0
- package/dist/query-client/sessionPersistenceConstants.d.ts.map +1 -0
- package/dist/query-client/sessionScoped.d.ts.map +1 -1
- package/dist/query-client/sessionScopedResetConstants.d.ts +4 -0
- package/dist/query-client/sessionScopedResetConstants.d.ts.map +1 -0
- package/dist/query-client/sessionScopedResetLifecycleTypes.d.ts +2 -1
- package/dist/query-client/sessionScopedResetLifecycleTypes.d.ts.map +1 -1
- package/dist/seo/index.js +0 -1
- package/dist/seo/index.js.map +1 -1
- package/dist/seo/seo.d.ts +3 -2
- package/dist/seo/seo.d.ts.map +1 -1
- package/dist/seo/seoContentTypeConstants.d.ts +6 -0
- package/dist/seo/seoContentTypeConstants.d.ts.map +1 -0
- package/dist/seo/types.d.ts +2 -1
- package/dist/seo/types.d.ts.map +1 -1
- package/dist/session-storage/index.js +1 -1
- package/dist/table/cellSelection.d.ts.map +1 -1
- package/dist/table/index.js +83 -79
- package/dist/table/index.js.map +1 -1
- package/dist/table/odataAdapter.d.ts +3 -3
- package/dist/table/odataAdapter.d.ts.map +1 -1
- package/dist/table/selection.d.ts +2 -2
- package/dist/table/selection.d.ts.map +1 -1
- package/dist/table/tableColumnConstants.d.ts +5 -0
- package/dist/table/tableColumnConstants.d.ts.map +1 -0
- package/dist/table/tableSelectionConstants.d.ts +8 -0
- package/dist/table/tableSelectionConstants.d.ts.map +1 -0
- package/dist/table/tanStackFeatures.d.ts +8 -8
- package/dist/table/types.d.ts +5 -3
- package/dist/table/types.d.ts.map +1 -1
- package/dist/table/useTableRowSelection.d.ts +2 -2
- package/dist/table/useTableRowSelection.d.ts.map +1 -1
- package/dist/table-document/index.js +88 -87
- package/dist/table-document/index.js.map +1 -1
- package/dist/table-document/insertTableDocumentAxis.d.ts +2 -1
- package/dist/table-document/insertTableDocumentAxis.d.ts.map +1 -1
- package/dist/table-document/tableDocument.d.ts +2 -1
- package/dist/table-document/tableDocument.d.ts.map +1 -1
- package/dist/table-document/tableDocumentAxisGroups.d.ts +4 -3
- package/dist/table-document/tableDocumentAxisGroups.d.ts.map +1 -1
- package/dist/table-document/tableDocumentConstants.d.ts +8 -0
- package/dist/table-document/tableDocumentConstants.d.ts.map +1 -0
- package/dist/table-document/tableDocumentGeometry.d.ts.map +1 -1
- package/dist/three-scene/index.js +32 -32
- package/dist/three-scene/index.js.map +1 -1
- package/dist/three-scene/threeSceneAvailability.d.ts +4 -3
- package/dist/three-scene/threeSceneAvailability.d.ts.map +1 -1
- package/dist/three-scene/threeSceneConstants.d.ts +14 -0
- package/dist/three-scene/threeSceneConstants.d.ts.map +1 -0
- package/dist/three-scene/useThreeSceneAvailability.d.ts.map +1 -1
- package/dist/tree-table/index.js +1 -1
- package/dist/types/abapBooleanConstants.d.ts +4 -0
- package/dist/types/abapBooleanConstants.d.ts.map +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/types.d.ts +4 -2
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/valueStateConstants.d.ts +8 -0
- package/dist/types/valueStateConstants.d.ts.map +1 -0
- package/dist/utils/cloneFunctionStrategyConstants.d.ts +4 -0
- package/dist/utils/cloneFunctionStrategyConstants.d.ts.map +1 -0
- package/dist/utils/createLazyComponent.d.ts.map +1 -1
- package/dist/utils/deepCloneWithoutFunctions.d.ts +2 -1
- package/dist/utils/deepCloneWithoutFunctions.d.ts.map +1 -1
- package/dist/utils/deepCopyWithoutFunctions.d.ts +2 -1
- package/dist/utils/deepCopyWithoutFunctions.d.ts.map +1 -1
- package/dist/utils/index.js +2 -209
- package/dist/utils/keyboard.d.ts +2 -1
- package/dist/utils/keyboard.d.ts.map +1 -1
- package/dist/utils/keyboardConstants.d.ts +16 -0
- package/dist/utils/keyboardConstants.d.ts.map +1 -0
- package/dist/validators/index.js +3 -3
- package/dist/validators/index.js.map +1 -1
- package/dist/validators/validateUrl.d.ts.map +1 -1
- package/dist/value-transformers/execute.d.ts.map +1 -1
- package/dist/value-transformers/index.js +9 -6
- package/dist/value-transformers/index.js.map +1 -1
- package/dist/value-transformers/types.d.ts +3 -2
- package/dist/value-transformers/types.d.ts.map +1 -1
- package/dist/value-transformers/valueTransformerConstants.d.ts +4 -0
- package/dist/value-transformers/valueTransformerConstants.d.ts.map +1 -0
- package/package.json +6 -5
- package/src/binary/README.mdx +1 -1
- package/src/dom/README.mdx +1 -1
- package/src/formatters/README.mdx +5 -0
- package/src/foundationLib.mdx +8 -0
- package/src/metadata/README.md +35 -0
- package/src/odata-service/README.mdx +36 -1
- package/src/query-client/README.mdx +4 -4
- package/dist/chunks/dom-BK22UmgF.js.map +0 -1
- package/dist/chunks/formatters-CZnnbdud.js.map +0 -1
- package/dist/chunks/formulas-BXT_XBWI.js.map +0 -1
- package/dist/chunks/media-WK38KtMl.js +0 -191
- package/dist/chunks/media-WK38KtMl.js.map +0 -1
- package/dist/chunks/odata-service-tp2U5yIr.js +0 -2211
- package/dist/chunks/odata-service-tp2U5yIr.js.map +0 -1
- package/dist/chunks/query-client-CVRfrYZM.js.map +0 -1
- package/dist/chunks/uuid-CUJPAbRY.js.map +0 -1
- package/dist/chunks/validate-CEQHqevt.js +0 -608
- package/dist/chunks/validate-CEQHqevt.js.map +0 -1
- package/dist/utils/index.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate-CEQHqevt.js","names":[],"sources":["../../src/formatters/number/presets.ts","../../src/formatters/pipeline/clone.ts","../../src/formatters/rowBased/context.ts","../../src/formatters/rowBased/registry.ts","../../src/formatters/pipeline/validate.ts"],"sourcesContent":["import type { NumberFormatPreset, NumberFormatPresetConfig } from \"./types\";\n\n/** Символ группировки из ru-RU (U+00A0 или U+202F в зависимости от среды) */\nconst ruGroupChar = new Intl.NumberFormat(\"ru-RU\").formatToParts(1000).find((p) => p.type === \"group\")?.value ?? \"\\u00A0\";\n\n/** Значения по умолчанию — совпадают с ru-RU форматированием */\nexport const NUMBER_FORMAT_DEFAULTS: Omit<NumberFormatPreset, \"name\"> = {\n\tdecimals: 1,\n\tdecimalSeparator: \",\",\n\tgrouping: true,\n\tgroupingSeparator: ruGroupChar,\n\tgroupingSize: 3\n};\n\nexport const DEFAULT_NUMBER_PRESET_NAMES = Object.freeze({\n\tinteger: \"integer\",\n\tdecimal: \"decimal\",\n\tdecimal2: \"decimal-2\",\n\tdecimal3: \"decimal-3\",\n\tcurrency: \"currency\",\n\tprice: \"price\",\n\tpercent: \"percent\",\n\ttonnage: \"tonnage\",\n\tcompactCurrency: \"compact-currency\",\n\tcompactCurrencyRound: \"compact-currency-round\",\n\tcompactPercent: \"compact-percent\",\n\tcompactPercentRound: \"compact-percent-round\",\n\tcompactTonnage: \"compact-tonnage\",\n\tcompactTonnageRound: \"compact-tonnage-round\"\n});\n\n/**\n * Типовые предустановки числового форматирования.\n *\n * Compact-пресеты без суффикса сохраняют консервативное усечение, а парные\n * `*-round` дают явный математический режим без runtime-переопределения пресета.\n * Недостающие поля каждой предустановки заполняются из `NUMBER_FORMAT_DEFAULTS`.\n */\nconst BUILTIN: NumberFormatPresetConfig[] = [\n\t{ name: \"integer\", decimals: 0, decimalSeparator: \"\" },\n\t{ name: \"decimal\" },\n\t{ name: \"decimal-2\", decimals: 2 },\n\t{ name: \"decimal-3\", decimals: 3 },\n\t{ name: \"currency\", decimals: 0, decimalSeparator: \"\" },\n\t{ name: \"price\", decimals: 0, decimalSeparator: \"\" },\n\t{ name: \"percent\", decimals: 2 },\n\t{ name: \"tonnage\" },\n\t{ name: \"compact-currency\", decimals: 0, decimalSeparator: \"\", compact: {} },\n\t{ name: \"compact-currency-round\", decimals: 0, decimalSeparator: \"\", compact: { roundingMode: \"round\" } },\n\t{ name: \"compact-percent\", decimals: 2, compact: { maxDecimals: 2 } },\n\t{ name: \"compact-percent-round\", decimals: 2, compact: { maxDecimals: 2, roundingMode: \"round\" } },\n\t{ name: \"compact-tonnage\", compact: { maxDecimals: 1 } },\n\t{ name: \"compact-tonnage-round\", compact: { maxDecimals: 1, roundingMode: \"round\" } }\n];\n\nconst registry = new Map<string, NumberFormatPreset>();\n\nfunction init(): void {\n\tfor (const cfg of BUILTIN) {\n\t\tregistry.set(cfg.name, { ...NUMBER_FORMAT_DEFAULTS, ...cfg });\n\t}\n}\n\ninit();\n\nexport function getNumberPreset(name: string): NumberFormatPreset | undefined {\n\treturn registry.get(name);\n}\n\nexport function getNumberPresetNames(): string[] {\n\treturn Array.from(registry.keys());\n}\n\n/** Зарегистрировать или перезаписать предустановку. Недостающие поля берутся из FORMAT_DEFAULTS. */\nexport function registerNumberPreset(config: NumberFormatPresetConfig): NumberFormatPreset {\n\tconst preset: NumberFormatPreset = { ...NUMBER_FORMAT_DEFAULTS, ...config };\n\tregistry.set(preset.name, preset);\n\treturn preset;\n}\n\n/** Сбросить реестр к начальному состоянию (только типовые предустановки) */\nexport function resetNumberPresets(): void {\n\tregistry.clear();\n\tinit();\n}\n\nexport function resolveNumberPreset(presetOrName: string | NumberFormatPreset): NumberFormatPreset {\n\tif (typeof presetOrName !== \"string\") return presetOrName;\n\n\tconst found = getNumberPreset(presetOrName);\n\tif (!found) throw new Error(`Предустановка \"${presetOrName}\" не найдена`);\n\n\treturn found;\n}\n","import type {\n\tFormattersPipelineConfig,\n\tFormattersPipelineGraph,\n\tFormattersPipelineNode,\n\tFormattersPipelineNormalizeLeadingZerosConfig,\n\tFormattersPipelinePlan,\n\tFormattersPipelineResolveValueStateConfig,\n\tFormattersPipelineRowBasedOverrideConfig,\n\tFormattersPipelineStep,\n\tFormattersPipelineTypedValueFormatConfig\n} from \"./types\";\n\nexport function cloneTypedValueFormatConfig(\n\tconfig: FormattersPipelineTypedValueFormatConfig | undefined\n): FormattersPipelineTypedValueFormatConfig | undefined {\n\treturn config ? { ...config } : undefined;\n}\n\nexport function cloneNormalizeLeadingZerosConfig(\n\tconfig: FormattersPipelineNormalizeLeadingZerosConfig | undefined\n): FormattersPipelineNormalizeLeadingZerosConfig | undefined {\n\treturn config ? { ...config } : undefined;\n}\n\nexport function cloneRowBasedOverrideConfig(config: FormattersPipelineRowBasedOverrideConfig): FormattersPipelineRowBasedOverrideConfig {\n\treturn config.mode === \"formula\"\n\t\t? { ...config, dependencyIds: config.dependencyIds ? [...config.dependencyIds] : undefined }\n\t\t: { ...config };\n}\n\nexport function cloneResolveValueStateConfig(config: FormattersPipelineResolveValueStateConfig): FormattersPipelineResolveValueStateConfig {\n\treturn {\n\t\tresolver:\n\t\t\tconfig.resolver.kind === \"fixed\"\n\t\t\t\t? {\n\t\t\t\t\t\tkind: \"fixed\",\n\t\t\t\t\t\tentries: { ...config.resolver.entries },\n\t\t\t\t\t\tfallbackState: config.resolver.fallbackState\n\t\t\t\t\t}\n\t\t\t\t: {\n\t\t\t\t\t\tkind: \"threshold\",\n\t\t\t\t\t\tthresholds: config.resolver.thresholds.map((item) => (typeof item === \"number\" ? item : { ...item })),\n\t\t\t\t\t\tstates: [...config.resolver.states],\n\t\t\t\t\t\tinvalidState: config.resolver.invalidState\n\t\t\t\t\t},\n\t\tvalueSource:\n\t\t\tconfig.valueSource?.kind === \"formula\"\n\t\t\t\t? { ...config.valueSource, dependencyIds: [...config.valueSource.dependencyIds] }\n\t\t\t\t: config.valueSource\n\t\t\t\t\t? { ...config.valueSource }\n\t\t\t\t\t: undefined,\n\t\ticon: config.icon ? { ...config.icon } : undefined\n\t};\n}\n\nexport function cloneFormatterPipelinePlanStep(step: FormattersPipelineStep): FormattersPipelineStep {\n\tswitch (step.type) {\n\t\tcase \"typedValueFormat\":\n\t\t\treturn {\n\t\t\t\t...step,\n\t\t\t\tconfig: cloneTypedValueFormatConfig(step.config)\n\t\t\t};\n\t\tcase \"normalizeLeadingZeros\":\n\t\t\treturn {\n\t\t\t\t...step,\n\t\t\t\tconfig: cloneNormalizeLeadingZerosConfig(step.config)\n\t\t\t};\n\t\tcase \"rowBasedOverride\":\n\t\t\treturn {\n\t\t\t\t...step,\n\t\t\t\tconfig: cloneRowBasedOverrideConfig(step.config)\n\t\t\t};\n\t\tcase \"resolveValueState\":\n\t\t\treturn {\n\t\t\t\t...step,\n\t\t\t\tconfig: cloneResolveValueStateConfig(step.config)\n\t\t\t};\n\t\tdefault: {\n\t\t\tconst checker: never = step;\n\t\t\tvoid checker;\n\t\t}\n\t}\n\n\tthrow new Error(`Недопустимый тип '${(step as Record<string, unknown>)?.type}' для шага FormatterPipeline`);\n}\n\nexport function cloneFormatterPipelinePlanStepToNode(\n\tstep: FormattersPipelineStep,\n\tposition: { x: number; y: number }\n): FormattersPipelineNode {\n\tswitch (step.type) {\n\t\tcase \"typedValueFormat\":\n\t\t\treturn {\n\t\t\t\t...step,\n\t\t\t\tposition: { ...position },\n\t\t\t\tconfig: cloneTypedValueFormatConfig(step.config)\n\t\t\t};\n\t\tcase \"normalizeLeadingZeros\":\n\t\t\treturn {\n\t\t\t\t...step,\n\t\t\t\tposition: { ...position },\n\t\t\t\tconfig: cloneNormalizeLeadingZerosConfig(step.config)\n\t\t\t};\n\t\tcase \"rowBasedOverride\":\n\t\t\treturn {\n\t\t\t\t...step,\n\t\t\t\tposition: { ...position },\n\t\t\t\tconfig: cloneRowBasedOverrideConfig(step.config)\n\t\t\t};\n\t\tcase \"resolveValueState\":\n\t\t\treturn {\n\t\t\t\t...step,\n\t\t\t\tposition: { ...position },\n\t\t\t\tconfig: cloneResolveValueStateConfig(step.config)\n\t\t\t};\n\t\tdefault: {\n\t\t\tconst checker: never = step;\n\t\t\tvoid checker;\n\t\t}\n\t}\n\n\tthrow new Error(`Недопустимый тип '${(step as Record<string, unknown>)?.type}' для шага FormatterPipeline`);\n}\n\nfunction cloneNode(node: FormattersPipelineNode): FormattersPipelineNode {\n\tswitch (node.type) {\n\t\tcase \"source\":\n\t\tcase \"sink\":\n\t\t\treturn {\n\t\t\t\t...node,\n\t\t\t\tposition: { ...node.position }\n\t\t\t};\n\t\tdefault:\n\t\t\treturn cloneFormatterPipelinePlanStepToNode(node, node.position);\n\t}\n}\n\nfunction cloneGraph(graph: FormattersPipelineGraph): FormattersPipelineGraph {\n\treturn {\n\t\tnodes: graph.nodes.map(cloneNode),\n\t\tedges: graph.edges.map((edge) => ({ ...edge })),\n\t\tviewport: graph.viewport ? { ...graph.viewport } : undefined\n\t};\n}\n\nfunction clonePlan(plan: FormattersPipelinePlan): FormattersPipelinePlan {\n\treturn {\n\t\tsteps: plan.steps.map(cloneFormatterPipelinePlanStep)\n\t};\n}\n\n/**\n * Возвращает полную копию конфигурации pipeline для безопасного хранения в сторе.\n */\nexport function cloneFormattersPipelineConfig(config: FormattersPipelineConfig | undefined): FormattersPipelineConfig | undefined {\n\tif (!config) return undefined;\n\n\tconst version = config.version;\n\tconst graph = config.graph ? cloneGraph(config.graph) : undefined;\n\tconst plan = config.plan ? clonePlan(config.plan) : undefined;\n\n\treturn { version, graph, plan };\n}\n","import { parseNumber } from \"../number\";\n\nimport type { RowBasedFormatterContext, RowBasedFormatterContextInstrumentation } from \"./types\";\n\nexport function createRowBasedFormatterContext(args: {\n\trowData: Record<string, unknown>;\n\trawValue: unknown;\n\tcolumnId: string;\n\tkeys?: readonly string[];\n\tinstrumentation?: RowBasedFormatterContextInstrumentation;\n}): RowBasedFormatterContext {\n\t// TODO: duplicate createTableFormulaContext src\\shared\\lib\\formulas\\execute.ts\n\tconst keys = [...(args.keys ?? [])];\n\n\tconst readKey = (index: number): string | undefined => {\n\t\tif (!Number.isInteger(index) || index < 0) {\n\t\t\targs.instrumentation?.onOutOfRangeIndex?.(index);\n\t\t\treturn undefined;\n\t\t}\n\n\t\targs.instrumentation?.onReadIndex?.(index);\n\n\t\tif (index >= keys.length) {\n\t\t\targs.instrumentation?.onOutOfRangeIndex?.(index);\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn keys[index];\n\t};\n\n\tconst readValue = (index: number): unknown => {\n\t\tconst key = readKey(index);\n\t\tif (!key) return undefined;\n\t\treturn args.rowData[key];\n\t};\n\n\tconst readNum = (index: number): number => {\n\t\tconst key = readKey(index);\n\t\tif (!key) return 0;\n\t\treturn parseNumber(args.rowData[key]);\n\t};\n\n\treturn {\n\t\trowData: args.rowData,\n\t\trawValue: args.rawValue,\n\t\tcolumnId: args.columnId,\n\t\tkey: readKey,\n\t\tvalue: readValue,\n\t\tnum: readNum\n\t};\n}\n","import type { RowBasedFormatterDefinition } from \"./types\";\n\nexport type RowBasedFormatterRegistry = Readonly<{\n\tlist: readonly RowBasedFormatterDefinition[];\n\tbyId: ReadonlyMap<string, RowBasedFormatterDefinition>;\n}>;\n\n/**\n * Создаёт реестр формул для подмены значения в групповой строке.\n */\nexport function createRowBasedFormatterRegistry(definitions: readonly RowBasedFormatterDefinition[]): RowBasedFormatterRegistry {\n\tconst byId = new Map<string, RowBasedFormatterDefinition>();\n\tconst list: RowBasedFormatterDefinition[] = [];\n\n\tfor (const definition of definitions) {\n\t\tconst normalizedId = definition.id.trim();\n\t\tif (!normalizedId) {\n\t\t\tthrow new Error(\"Formula id для RowBasedFormatter не может быть пустым\");\n\t\t}\n\n\t\tif (byId.has(normalizedId)) {\n\t\t\tthrow new Error(`Найден дублирующийся formulaId в RowBasedFormatter: ${normalizedId}`);\n\t\t}\n\n\t\tconst normalizedDefinition: RowBasedFormatterDefinition = Object.freeze({\n\t\t\t...definition,\n\t\t\tid: normalizedId,\n\t\t\tname: definition.name.trim(),\n\t\t\tdescription: definition.description.trim()\n\t\t});\n\n\t\tbyId.set(normalizedId, normalizedDefinition);\n\t\tlist.push(normalizedDefinition);\n\t}\n\n\treturn Object.freeze({\n\t\tlist: Object.freeze(list),\n\t\tbyId\n\t});\n}\n\nlet rowBasedFormatterRegistry = createRowBasedFormatterRegistry([]);\n\n/**\n * Устанавливает реестр row-based форматтеров host-приложения.\n *\n * Pipeline использует этот реестр при валидации и компиляции formula-режима,\n * поэтому конфигурация должна завершиться до первого построения runtime.\n */\nexport function configureRowBasedFormatterRegistry(registry: RowBasedFormatterRegistry): void {\n\trowBasedFormatterRegistry = registry;\n}\n\n/**\n * Возвращает список доступных формул для групповой подмены.\n */\nexport function getRowBasedFormatterList(): readonly RowBasedFormatterDefinition[] {\n\treturn rowBasedFormatterRegistry.list;\n}\n\n/**\n * Возвращает формулу по id.\n */\nexport function getRowBasedFormatterById(formulaId: string | undefined): RowBasedFormatterDefinition | undefined {\n\tconst normalizedId = formulaId?.trim();\n\tif (!normalizedId) return undefined;\n\treturn rowBasedFormatterRegistry.byId.get(normalizedId);\n}\n","import { validateTableFormulaDependencies } from \"../../formulas\";\nimport { getNumberPreset } from \"../number\";\nimport { createRowBasedFormatterContext, getRowBasedFormatterById } from \"../rowBased\";\n\nimport { cloneResolveValueStateConfig } from \"./clone\";\n\nimport type {\n\tFormattersPipelineConfig,\n\tFormattersPipelineEdge,\n\tFormattersPipelineGraph,\n\tFormattersPipelineNode,\n\tFormattersPipelinePlan,\n\tFormattersPipelineRowBasedOverrideFormulaConfig,\n\tFormattersPipelineStep,\n\tFormattersPipelineValueStateFormulaSource\n} from \"./types\";\n\nexport type FormattersPipelineValidationCode =\n\t| \"config_not_defined\"\n\t| \"unsupported_version\"\n\t| \"graph_or_plan_required\"\n\t| \"node_id_duplicate\"\n\t| \"edge_id_duplicate\"\n\t| \"edge_node_not_found\"\n\t| \"source_count_invalid\"\n\t| \"sink_count_invalid\"\n\t| \"source_incoming_invalid\"\n\t| \"sink_outgoing_invalid\"\n\t| \"node_degree_invalid\"\n\t| \"path_broken\"\n\t| \"path_cycle_detected\"\n\t| \"path_disconnected_nodes\"\n\t| \"step_id_duplicate\"\n\t| \"step_resolve_value_state_multiple\"\n\t| \"step_typed_value_format_multiple\"\n\t| \"step_row_based_override_multiple\"\n\t| \"step_normalize_leading_zeros_multiple\"\n\t| \"step_typed_before_value_state\"\n\t| \"step_row_based_override_field_key_empty\"\n\t| \"step_row_based_override_formula_id_empty\"\n\t| \"step_row_based_override_formula_not_found\"\n\t| \"step_row_based_override_dependency_index_out_of_range\"\n\t| \"step_row_based_override_unused_dependencies\"\n\t| \"step_row_based_override_formula_does_not_use_dependencies\"\n\t| \"step_row_based_override_formula_runtime_error\"\n\t| \"step_value_state_formula_id_empty\"\n\t| \"step_value_state_formula_not_found\"\n\t| \"step_value_state_dependency_id_empty\"\n\t| \"step_value_state_dependency_index_out_of_range\"\n\t| \"step_value_state_unused_dependencies\"\n\t| \"step_value_state_formula_does_not_use_dependencies\"\n\t| \"step_value_state_formula_runtime_error\"\n\t| \"step_threshold_states_count_invalid\"\n\t| \"step_value_hidden_without_icon\"\n\t| \"step_typed_value_format_preset_empty\"\n\t| \"step_typed_value_format_preset_not_found\";\n\nexport type FormattersPipelineValidationMessage = {\n\tcode: FormattersPipelineValidationCode;\n\tmessage: string;\n};\n\nexport type FormattersPipelineValidationResult = {\n\tok: boolean;\n\terrors: FormattersPipelineValidationMessage[];\n\twarnings: FormattersPipelineValidationMessage[];\n\tplan?: FormattersPipelinePlan;\n};\n\ntype MutableValidationState = {\n\terrors: FormattersPipelineValidationMessage[];\n\twarnings: FormattersPipelineValidationMessage[];\n};\n\nfunction pushError(state: MutableValidationState, code: FormattersPipelineValidationCode, message: string) {\n\tstate.errors.push({ code, message });\n}\n\nfunction pushWarning(state: MutableValidationState, code: FormattersPipelineValidationCode, message: string) {\n\tstate.warnings.push({ code, message });\n}\n\nfunction toSortedArray(items: Set<number>): number[] {\n\treturn [...items].sort((left, right) => left - right);\n}\n\nfunction createSampleRowData(dependencies: readonly string[], multiplier: number): Record<string, unknown> {\n\treturn dependencies.reduce<Record<string, unknown>>((acc, dependencyId, index) => {\n\t\tacc[dependencyId] = (index + 1) * multiplier;\n\t\treturn acc;\n\t}, {});\n}\n\nfunction validateRowBasedOverrideFormulaConfig(config: FormattersPipelineRowBasedOverrideFormulaConfig, state: MutableValidationState) {\n\tif (!config.formulaId.trim()) {\n\t\tpushError(state, \"step_row_based_override_formula_id_empty\", \"Для rowBasedOverride (formula) необходимо заполнить formulaId.\");\n\t\treturn;\n\t}\n\n\tconst formula = getRowBasedFormatterById(config.formulaId);\n\tconst dependencies = [...(config.dependencyIds ?? [])];\n\n\tif (!formula) {\n\t\tpushError(state, \"step_row_based_override_formula_not_found\", \"Формула rowBasedOverride не найдена в реестре.\");\n\t\treturn;\n\t}\n\n\tconst usedIndexes = new Set<number>();\n\tconst outOfRangeIndexes = new Set<number>();\n\tlet runtimeErrorCount = 0;\n\n\tconst runValidationPass = (sampleRowData: Record<string, unknown>) => {\n\t\ttry {\n\t\t\tconst context = createRowBasedFormatterContext({\n\t\t\t\trowData: sampleRowData,\n\t\t\t\trawValue: 100,\n\t\t\t\tcolumnId: \"__validation__\",\n\t\t\t\tkeys: dependencies,\n\t\t\t\tinstrumentation: {\n\t\t\t\t\tonReadIndex: (index) => {\n\t\t\t\t\t\tusedIndexes.add(index);\n\t\t\t\t\t},\n\t\t\t\t\tonOutOfRangeIndex: (index) => {\n\t\t\t\t\t\toutOfRangeIndexes.add(index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tformula.fn(context);\n\t\t} catch {\n\t\t\truntimeErrorCount += 1;\n\t\t}\n\t};\n\n\t// Несколько прогонов повышают шанс увидеть обращения к индексам в разных ветках формулы.\n\trunValidationPass(createSampleRowData(dependencies, 100));\n\trunValidationPass(createSampleRowData(dependencies, -100));\n\n\tconst sortedUsedIndexes = toSortedArray(usedIndexes);\n\tconst requiredDependencyCount = sortedUsedIndexes.length > 0 ? sortedUsedIndexes[sortedUsedIndexes.length - 1] + 1 : 0;\n\n\tif (outOfRangeIndexes.size > 0) {\n\t\tpushError(\n\t\t\tstate,\n\t\t\t\"step_row_based_override_dependency_index_out_of_range\",\n\t\t\t`Формула rowBasedOverride обращается к несуществующим индексам. Минимально требуется зависимостей: ${requiredDependencyCount}, выбрано: ${dependencies.length}.`\n\t\t);\n\t}\n\n\tif (sortedUsedIndexes.length === 0) {\n\t\tpushWarning(\n\t\t\tstate,\n\t\t\t\"step_row_based_override_formula_does_not_use_dependencies\",\n\t\t\t\"Формула rowBasedOverride не использует dependencyIds.\"\n\t\t);\n\t}\n\n\tconst unusedDependencies = dependencies.filter((_, index) => !usedIndexes.has(index));\n\tif (unusedDependencies.length > 0) {\n\t\tpushWarning(\n\t\t\tstate,\n\t\t\t\"step_row_based_override_unused_dependencies\",\n\t\t\t`Выбраны, но не используются формулой rowBasedOverride: ${unusedDependencies.join(\", \")}.`\n\t\t);\n\t}\n\n\tif (runtimeErrorCount > 0) {\n\t\tpushWarning(\n\t\t\tstate,\n\t\t\t\"step_row_based_override_formula_runtime_error\",\n\t\t\t\"На тестовых данных формула rowBasedOverride завершилась с ошибкой.\"\n\t\t);\n\t}\n}\n\n/**\n * Pipeline проверяет контракт формулы и индексы, а наличие полей в конкретном\n * источнике данных проверяет потребитель через collectRuntimeFieldDependencyIds.\n */\nfunction validateValueStateFormulaSource(source: FormattersPipelineValueStateFormulaSource, state: MutableValidationState) {\n\tif (!source.formulaId.trim()) {\n\t\tpushError(state, \"step_value_state_formula_id_empty\", \"Для источника состояния необходимо выбрать формулу.\");\n\t\treturn;\n\t}\n\n\tif (source.dependencyIds.some((dependencyId) => !dependencyId.trim())) {\n\t\tpushError(state, \"step_value_state_dependency_id_empty\", \"Зависимость формулы состояния не может иметь пустой id.\");\n\t\treturn;\n\t}\n\n\tconst validation = validateTableFormulaDependencies({\n\t\tformulaId: source.formulaId,\n\t\tdependencies: source.dependencyIds,\n\t\tavailableColumnIds: source.dependencyIds\n\t});\n\tfor (const error of validation.errors) {\n\t\tif (error.code === \"formula_not_found\") {\n\t\t\tpushError(state, \"step_value_state_formula_not_found\", \"Формула источника состояния не найдена в реестре.\");\n\t\t} else if (error.code === \"dependency_index_out_of_range\") {\n\t\t\tpushError(state, \"step_value_state_dependency_index_out_of_range\", error.message);\n\t\t}\n\t}\n\tfor (const warning of validation.warnings) {\n\t\tswitch (warning.code) {\n\t\t\tcase \"unused_dependencies\":\n\t\t\t\tpushWarning(state, \"step_value_state_unused_dependencies\", warning.message);\n\t\t\t\tbreak;\n\t\t\tcase \"formula_does_not_use_dependencies\":\n\t\t\t\tpushWarning(state, \"step_value_state_formula_does_not_use_dependencies\", warning.message);\n\t\t\t\tbreak;\n\t\t\tcase \"formula_runtime_error\":\n\t\t\t\tpushWarning(state, \"step_value_state_formula_runtime_error\", warning.message);\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\nfunction validateStepDefinitions(steps: readonly FormattersPipelineStep[], state: MutableValidationState) {\n\tconst stepIdSet = new Set<string>();\n\tconst counters = {\n\t\tnormalizeLeadingZeros: 0,\n\t\trowBasedOverride: 0,\n\t\tresolveValueState: 0,\n\t\ttypedValueFormat: 0\n\t};\n\n\tfor (const step of steps) {\n\t\tconst normalizedId = step.id.trim();\n\t\tif (!normalizedId) {\n\t\t\tpushError(state, \"step_id_duplicate\", \"Шаг pipeline не может иметь пустой id.\");\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (stepIdSet.has(normalizedId)) {\n\t\t\tpushError(state, \"step_id_duplicate\", `Найден дублирующийся id шага pipeline: ${normalizedId}.`);\n\t\t}\n\t\tstepIdSet.add(normalizedId);\n\n\t\tswitch (step.type) {\n\t\t\tcase \"normalizeLeadingZeros\":\n\t\t\t\tcounters.normalizeLeadingZeros += 1;\n\t\t\t\tbreak;\n\t\t\tcase \"rowBasedOverride\":\n\t\t\t\tcounters.rowBasedOverride += 1;\n\n\t\t\t\tif (step.config.mode === \"field\" && !step.config.fieldKey.trim()) {\n\t\t\t\t\tpushError(\n\t\t\t\t\t\tstate,\n\t\t\t\t\t\t\"step_row_based_override_field_key_empty\",\n\t\t\t\t\t\t\"Для rowBasedOverride (field) необходимо заполнить fieldKey.\"\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (step.config.mode === \"formula\") {\n\t\t\t\t\tvalidateRowBasedOverrideFormulaConfig(step.config, state);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"resolveValueState\":\n\t\t\t\tcounters.resolveValueState += 1;\n\t\t\t\tif (step.config.valueSource?.kind === \"formula\") {\n\t\t\t\t\tvalidateValueStateFormulaSource(step.config.valueSource, state);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tstep.config.resolver.kind === \"threshold\" &&\n\t\t\t\t\tstep.config.resolver.states.length !== step.config.resolver.thresholds.length + 1\n\t\t\t\t) {\n\t\t\t\t\tpushError(\n\t\t\t\t\t\tstate,\n\t\t\t\t\t\t\"step_threshold_states_count_invalid\",\n\t\t\t\t\t\t\"Для threshold-резолвера количество states должно быть равно thresholds + 1.\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"typedValueFormat\":\n\t\t\t\tcounters.typedValueFormat += 1;\n\t\t\t\tif (step.config?.numberPresetName !== undefined) {\n\t\t\t\t\tconst normalizedPresetName = step.config.numberPresetName.trim();\n\t\t\t\t\tif (!normalizedPresetName) {\n\t\t\t\t\t\tpushError(state, \"step_typed_value_format_preset_empty\", \"Для typedValueFormat указан пустой numberPresetName.\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!getNumberPreset(normalizedPresetName)) {\n\t\t\t\t\t\tpushError(\n\t\t\t\t\t\t\tstate,\n\t\t\t\t\t\t\t\"step_typed_value_format_preset_not_found\",\n\t\t\t\t\t\t\t`Для typedValueFormat указан неизвестный пресет: ${normalizedPresetName}.`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (counters.normalizeLeadingZeros > 1) {\n\t\tpushError(state, \"step_normalize_leading_zeros_multiple\", \"В pipeline может быть только один шаг normalizeLeadingZeros.\");\n\t}\n\n\tif (counters.rowBasedOverride > 1) {\n\t\tpushError(state, \"step_row_based_override_multiple\", \"В pipeline может быть только один шаг rowBasedOverride.\");\n\t}\n\n\tif (counters.resolveValueState > 1) {\n\t\tpushError(state, \"step_resolve_value_state_multiple\", \"В pipeline может быть только один шаг resolveValueState.\");\n\t}\n\n\tif (counters.typedValueFormat > 1) {\n\t\tpushError(state, \"step_typed_value_format_multiple\", \"В pipeline может быть только один шаг typedValueFormat.\");\n\t}\n\n\tconst resolveIndex = steps.findIndex((step) => step.type === \"resolveValueState\");\n\tconst typedIndex = steps.findIndex((step) => step.type === \"typedValueFormat\");\n\tif (resolveIndex !== -1 && typedIndex !== -1 && typedIndex < resolveIndex) {\n\t\tpushError(state, \"step_typed_before_value_state\", \"Шаг typedValueFormat не может выполняться до шага resolveValueState.\");\n\t}\n\n\tfor (const step of steps) {\n\t\tif (step.type !== \"resolveValueState\") continue;\n\t\tif (!step.config.icon?.enabled && step.config.icon?.showValue === false) {\n\t\t\tpushWarning(\n\t\t\t\tstate,\n\t\t\t\t\"step_value_hidden_without_icon\",\n\t\t\t\t\"Для resolveValueState установлено showValue=false при выключенной иконке: значение не будет отображаться.\"\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * Валидация облегчённого плана pipeline.\n */\nexport function validateFormattersPipelinePlan(plan: FormattersPipelinePlan): FormattersPipelineValidationResult {\n\tconst state: MutableValidationState = { errors: [], warnings: [] };\n\n\tvalidateStepDefinitions(plan.steps, state);\n\n\treturn {\n\t\tok: state.errors.length === 0,\n\t\terrors: state.errors,\n\t\twarnings: state.warnings,\n\t\tplan: state.errors.length === 0 ? { steps: [...plan.steps] } : undefined\n\t};\n}\n\nfunction buildLinearPathFromGraph(\n\tnodes: readonly FormattersPipelineNode[],\n\tedges: readonly FormattersPipelineEdge[],\n\tstate: MutableValidationState\n): string[] | undefined {\n\tconst nodeById = new Map(nodes.map((node) => [node.id, node]));\n\tconst outgoing = new Map<string, string[]>();\n\tconst incoming = new Map<string, string[]>();\n\n\tfor (const node of nodes) {\n\t\toutgoing.set(node.id, []);\n\t\tincoming.set(node.id, []);\n\t}\n\n\tfor (const edge of edges) {\n\t\tconst source = edge.source.trim();\n\t\tconst target = edge.target.trim();\n\t\tif (!nodeById.has(source) || !nodeById.has(target)) {\n\t\t\tpushError(state, \"edge_node_not_found\", `Ребро ${edge.id} ссылается на несуществующий узел: ${source} -> ${target}.`);\n\t\t\tcontinue;\n\t\t}\n\n\t\toutgoing.get(source)?.push(target);\n\t\tincoming.get(target)?.push(source);\n\t}\n\n\tconst sources = nodes.filter((node) => node.type === \"source\");\n\tconst sinks = nodes.filter((node) => node.type === \"sink\");\n\n\tif (sources.length !== 1) {\n\t\tpushError(state, \"source_count_invalid\", \"В графе должен быть ровно один узел source.\");\n\t}\n\tif (sinks.length !== 1) {\n\t\tpushError(state, \"sink_count_invalid\", \"В графе должен быть ровно один узел sink.\");\n\t}\n\tif (state.errors.length > 0) return undefined;\n\n\tconst sourceNodeId = sources[0]!.id;\n\tconst sinkNodeId = sinks[0]!.id;\n\n\tfor (const node of nodes) {\n\t\tconst inDegree = incoming.get(node.id)?.length ?? 0;\n\t\tconst outDegree = outgoing.get(node.id)?.length ?? 0;\n\n\t\tif (node.type === \"source\") {\n\t\t\tif (inDegree !== 0) {\n\t\t\t\tpushError(state, \"source_incoming_invalid\", \"Узел source не должен иметь входящих рёбер.\");\n\t\t\t}\n\t\t\tif (outDegree !== 1) {\n\t\t\t\tpushError(state, \"node_degree_invalid\", \"Узел source должен иметь ровно одно исходящее ребро.\");\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (node.type === \"sink\") {\n\t\t\tif (outDegree !== 0) {\n\t\t\t\tpushError(state, \"sink_outgoing_invalid\", \"Узел sink не должен иметь исходящих рёбер.\");\n\t\t\t}\n\t\t\tif (inDegree !== 1) {\n\t\t\t\tpushError(state, \"node_degree_invalid\", \"Узел sink должен иметь ровно одно входящее ребро.\");\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (inDegree !== 1 || outDegree !== 1) {\n\t\t\tpushError(\n\t\t\t\tstate,\n\t\t\t\t\"node_degree_invalid\",\n\t\t\t\t`Узел ${node.id} должен иметь ровно одно входящее и одно исходящее ребро для линейного pipeline.`\n\t\t\t);\n\t\t}\n\t}\n\n\tif (state.errors.length > 0) return undefined;\n\n\tconst visited = new Set<string>();\n\tconst path: string[] = [];\n\tlet cursor = sourceNodeId;\n\n\twhile (true) {\n\t\tif (visited.has(cursor)) {\n\t\t\tpushError(state, \"path_cycle_detected\", \"В графе pipeline обнаружен цикл.\");\n\t\t\treturn undefined;\n\t\t}\n\t\tvisited.add(cursor);\n\t\tpath.push(cursor);\n\n\t\tif (cursor === sinkNodeId) {\n\t\t\tbreak;\n\t\t}\n\n\t\tconst nextCandidates = outgoing.get(cursor) ?? [];\n\t\tif (nextCandidates.length !== 1) {\n\t\t\tpushError(state, \"path_broken\", \"Не удалось построить линейный путь от source к sink.\");\n\t\t\treturn undefined;\n\t\t}\n\n\t\tcursor = nextCandidates[0]!;\n\t}\n\n\tif (visited.size !== nodes.length) {\n\t\tpushError(state, \"path_disconnected_nodes\", \"Граф содержит узлы, которые не входят в линейный путь source -> sink.\");\n\t\treturn undefined;\n\t}\n\n\treturn path;\n}\n\n/**\n * Валидация графа pipeline и построение линейного плана исполнения.\n */\nexport function validateFormattersPipelineGraph(graph: FormattersPipelineGraph): FormattersPipelineValidationResult {\n\tconst state: MutableValidationState = { errors: [], warnings: [] };\n\n\tif (!graph.nodes.length) {\n\t\tpushError(state, \"path_broken\", \"Граф pipeline не содержит узлов.\");\n\t\treturn { ok: false, errors: state.errors, warnings: state.warnings };\n\t}\n\n\tconst nodeById = new Map<string, FormattersPipelineNode>();\n\tfor (const node of graph.nodes) {\n\t\tconst normalizedId = node.id.trim();\n\t\tif (!normalizedId) {\n\t\t\tpushError(state, \"node_id_duplicate\", \"Узел pipeline не может иметь пустой id.\");\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (nodeById.has(normalizedId)) {\n\t\t\tpushError(state, \"node_id_duplicate\", `Найден дублирующийся id узла pipeline: ${normalizedId}.`);\n\t\t\tcontinue;\n\t\t}\n\n\t\tnodeById.set(normalizedId, node);\n\t}\n\n\tconst edgeIdSet = new Set<string>();\n\tfor (const edge of graph.edges) {\n\t\tconst normalizedEdgeId = edge.id.trim();\n\t\tif (!normalizedEdgeId) {\n\t\t\tpushError(state, \"edge_id_duplicate\", \"Ребро pipeline не может иметь пустой id.\");\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (edgeIdSet.has(normalizedEdgeId)) {\n\t\t\tpushError(state, \"edge_id_duplicate\", `Найден дублирующийся id ребра pipeline: ${normalizedEdgeId}.`);\n\t\t\tcontinue;\n\t\t}\n\n\t\tedgeIdSet.add(normalizedEdgeId);\n\t}\n\n\tif (state.errors.length > 0) {\n\t\treturn {\n\t\t\tok: false,\n\t\t\terrors: state.errors,\n\t\t\twarnings: state.warnings\n\t\t};\n\t}\n\n\tconst path = buildLinearPathFromGraph(graph.nodes, graph.edges, state);\n\tif (!path) {\n\t\treturn {\n\t\t\tok: false,\n\t\t\terrors: state.errors,\n\t\t\twarnings: state.warnings\n\t\t};\n\t}\n\n\tconst steps: FormattersPipelineStep[] = [];\n\tfor (const nodeId of path) {\n\t\tconst node = nodeById.get(nodeId);\n\t\tif (!node || node.type === \"source\" || node.type === \"sink\") continue;\n\n\t\tswitch (node.type) {\n\t\t\tcase \"normalizeLeadingZeros\":\n\t\t\t\tsteps.push({\n\t\t\t\t\tid: node.id,\n\t\t\t\t\ttype: \"normalizeLeadingZeros\",\n\t\t\t\t\tconfig: node.config ? { ...node.config } : undefined\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"rowBasedOverride\":\n\t\t\t\tsteps.push({\n\t\t\t\t\tid: node.id,\n\t\t\t\t\ttype: \"rowBasedOverride\",\n\t\t\t\t\tconfig:\n\t\t\t\t\t\tnode.config.mode === \"formula\"\n\t\t\t\t\t\t\t? { ...node.config, dependencyIds: node.config.dependencyIds ? [...node.config.dependencyIds] : undefined }\n\t\t\t\t\t\t\t: { ...node.config }\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"resolveValueState\":\n\t\t\t\tsteps.push({\n\t\t\t\t\tid: node.id,\n\t\t\t\t\ttype: \"resolveValueState\",\n\t\t\t\t\tconfig: cloneResolveValueStateConfig(node.config)\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase \"typedValueFormat\":\n\t\t\t\tsteps.push({\n\t\t\t\t\tid: node.id,\n\t\t\t\t\ttype: \"typedValueFormat\",\n\t\t\t\t\tconfig: node.config ? { ...node.config } : undefined\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tvalidateStepDefinitions(steps, state);\n\n\treturn {\n\t\tok: state.errors.length === 0,\n\t\terrors: state.errors,\n\t\twarnings: state.warnings,\n\t\tplan: state.errors.length === 0 ? { steps } : undefined\n\t};\n}\n\n/**\n * Валидация конфигурации pipeline c выбором рабочего плана исполнения.\n *\n * Приоритет источника плана:\n * 1) `plan` из конфигурации;\n * 2) построение плана из `graph`.\n */\nexport function validateFormattersPipelineConfig(config: FormattersPipelineConfig | undefined): FormattersPipelineValidationResult {\n\tconst state: MutableValidationState = { errors: [], warnings: [] };\n\n\tif (!config) {\n\t\tpushError(state, \"config_not_defined\", \"Конфигурация pipeline не задана.\");\n\t\treturn {\n\t\t\tok: false,\n\t\t\terrors: state.errors,\n\t\t\twarnings: state.warnings\n\t\t};\n\t}\n\n\tif (config.version !== 1) {\n\t\tpushError(state, \"unsupported_version\", `Неподдерживаемая версия pipeline: ${String(config.version)}.`);\n\t\treturn {\n\t\t\tok: false,\n\t\t\terrors: state.errors,\n\t\t\twarnings: state.warnings\n\t\t};\n\t}\n\n\tif (!config.plan && !config.graph) {\n\t\tpushError(state, \"graph_or_plan_required\", \"Для pipeline должен быть задан хотя бы один источник: graph или plan.\");\n\t\treturn {\n\t\t\tok: false,\n\t\t\terrors: state.errors,\n\t\t\twarnings: state.warnings\n\t\t};\n\t}\n\n\tif (config.plan) {\n\t\tconst planResult = validateFormattersPipelinePlan(config.plan);\n\t\tstate.errors.push(...planResult.errors);\n\t\tstate.warnings.push(...planResult.warnings);\n\n\t\tif (planResult.ok && planResult.plan) {\n\t\t\treturn {\n\t\t\t\tok: true,\n\t\t\t\terrors: state.errors,\n\t\t\t\twarnings: state.warnings,\n\t\t\t\tplan: planResult.plan\n\t\t\t};\n\t\t}\n\n\t\tif (config.graph) {\n\t\t\tpushWarning(state, \"path_broken\", \"Линейный plan невалиден. Выполнена попытка построить план из graph.\");\n\t\t\tstate.errors.length = 0;\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tok: false,\n\t\t\t\terrors: state.errors,\n\t\t\t\twarnings: state.warnings\n\t\t\t};\n\t\t}\n\t}\n\n\tif (config.graph) {\n\t\tconst graphResult = validateFormattersPipelineGraph(config.graph);\n\t\treturn {\n\t\t\tok: graphResult.ok,\n\t\t\terrors: [...state.errors, ...graphResult.errors],\n\t\t\twarnings: [...state.warnings, ...graphResult.warnings],\n\t\t\tplan: graphResult.plan\n\t\t};\n\t}\n\n\treturn {\n\t\tok: false,\n\t\terrors: state.errors,\n\t\twarnings: state.warnings\n\t};\n}\n"],"mappings":";;AAMA,IAAa,IAA2D;CACvE,UAAU;CACV,kBAAkB;CAClB,UAAU;CACV,mBAPmB,IAAI,KAAK,aAAa,OAAO,CAAC,CAAC,cA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,OAEV,AADA,EAAY,GAAO,eAAe,qEAAqE,GACvG,EAAM,OAAO,SAAS;OAEtB,OAAO;GACN,IAAI;GACJ,QAAQ,EAAM;GACd,UAAU,EAAM;EACjB;CAEF;CAEA,IAAI,EAAO,OAAO;EACjB,IAAM,IAAc,EAAgC,EAAO,KAAK;EAChE,OAAO;GACN,IAAI,EAAY;GAChB,QAAQ,CAAC,GAAG,EAAM,QAAQ,GAAG,EAAY,MAAM;GAC/C,UAAU,CAAC,GAAG,EAAM,UAAU,GAAG,EAAY,QAAQ;GACrD,MAAM,EAAY;EACnB;CACD;CAEA,OAAO;EACN,IAAI;EACJ,QAAQ,EAAM;EACd,UAAU,EAAM;CACjB;AACD"}
|
package/dist/utils/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/utils/childrenCount.ts","../../src/utils/cn.ts","../../src/utils/createLazyComponent.ts","../../src/utils/deepCloneWithoutFunctions.ts","../../src/utils/deepCopyWithoutFunctions.ts","../../src/utils/keyboard.ts","../../src/utils/logger.ts","../../src/utils/selectNavigation.ts","../../src/utils/stableStringify.ts","../../src/utils/toBase64.ts","../../src/utils/treeNode.ts"],"sourcesContent":["import { Children, Fragment, isValidElement, PropsWithChildren, ReactElement, ReactNode } from \"react\";\n\nfunction isFragmentElement(node: ReactNode): node is ReactElement<PropsWithChildren> {\n\treturn isValidElement<PropsWithChildren>(node) && node.type === Fragment;\n}\n\nexport function childrenCount(node: ReactNode): number {\n\treturn Children.toArray(node).reduce<number>((count, child) => {\n\t\tif (isFragmentElement(child)) {\n\t\t\treturn count + childrenCount(child.props.children);\n\t\t}\n\t\treturn count + 1;\n\t}, 0);\n}\n","export type ToggleClassName = Record<string, boolean | undefined>;\nexport type PureClassName = string | boolean | undefined | null;\ntype ClassNameArg = PureClassName | ToggleClassName;\n\nexport function cn(...args: ClassNameArg[]): string;\nexport function cn(): string {\n\tlet out = \"\";\n\n\tfor (let i = 0; i < arguments.length; i++) {\n\t\tconst v = arguments[i] as ClassNameArg;\n\n\t\tif (!v || v === true) continue;\n\n\t\tif (typeof v === \"string\") {\n\t\t\tout = out ? out + \" \" + v : v;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (typeof v !== \"object\" || Array.isArray(v)) continue;\n\n\t\tfor (const k in v) {\n\t\t\tif (v[k]) {\n\t\t\t\tout = out ? out + \" \" + k : k;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn out;\n}\n","import { lazy, type ComponentType, type LazyExoticComponent } from \"react\";\n\ntype LazyComponentModule<TProps extends object> = Record<string, ComponentType<TProps>>;\ntype LazyComponentImport<TProps extends object> = () => Promise<LazyComponentModule<TProps> | null>;\n\nconst lazyComponentCache = new WeakMap<object, Map<string | undefined, unknown>>();\nconst lazyComponentCacheByKey = new Map<string, unknown>();\n\n/**\n * Создает ленивую компоненту, которая будет загружена только при первом рендере.\n *\n * @example\n *\n * ```tsx\n * const TextEditor = createLazyComponent(\n * () => import(\"@components/content/article/editor/TextEditor\"),\n * \"TextEditor\"\n * );\n * ```\n *\n * @param importPath - функция, которая возвращает промис, который резолвится в объект с компонентами\n * @param componentName - имя компонента, который нужно загрузить\n * @returns\n */\nexport const createLazyComponent = <TProps extends object>(\n\timportPath: LazyComponentImport<TProps>,\n\tcomponentName: string,\n\tcacheKey?: string\n): LazyExoticComponent<ComponentType<TProps>> => {\n\tconst lazyCacheKey = cacheKey ? `${cacheKey}:${componentName ?? \"default\"}` : undefined;\n\tif (lazyCacheKey && lazyComponentCacheByKey.has(lazyCacheKey)) {\n\t\treturn lazyComponentCacheByKey.get(lazyCacheKey)! as LazyExoticComponent<ComponentType<TProps>>;\n\t}\n\n\tif (!lazyComponentCache.has(importPath)) {\n\t\tlazyComponentCache.set(importPath, new Map());\n\t}\n\n\tconst componentMap = lazyComponentCache.get(importPath)!;\n\n\tif (!componentMap.has(componentName)) {\n\t\tconst lazyComponent = lazy(() =>\n\t\t\timportPath().then((module) => {\n\t\t\t\tif (!module) {\n\t\t\t\t\tthrow new Error(`Component not found or invalid in module: ${componentName ?? \"default\"}`);\n\t\t\t\t}\n\n\t\t\t\tconst component =\n\t\t\t\t\tcomponentName && module[componentName] ? module[componentName] : (module.default ?? Object.values(module)[0]);\n\n\t\t\t\tif (!component || typeof component !== \"function\") {\n\t\t\t\t\tthrow new Error(`Could not lazy-load component \"${componentName ?? \"default\"}\"`);\n\t\t\t\t}\n\n\t\t\t\treturn { default: component };\n\t\t\t})\n\t\t);\n\n\t\tcomponentMap.set(componentName, lazyComponent);\n\t\tif (lazyCacheKey) {\n\t\t\tlazyComponentCacheByKey.set(lazyCacheKey, lazyComponent);\n\t\t}\n\t}\n\n\treturn componentMap.get(componentName)! as LazyExoticComponent<ComponentType<TProps>>;\n};\n","type DeepCloneOptions = {\n\t/**\n\t * undefined — сохраняет длину массива и индексную структуру.\n\t * omit — удаляет элементы-функции из массива.\n\t */\n\tarrayFunctionStrategy?: \"undefined\" | \"omit\";\n\n\t/**\n\t * false — возвращает plain object.\n\t * true — сохраняет prototype исходного объекта.\n\t *\n\t * Для Zustand-состояния обычно лучше false.\n\t */\n\tpreservePrototype?: boolean;\n};\n\ntype DeepCloneWithoutFunctions<T> = T extends (...args: infer _Args) => unknown\n\t? never\n\t: T extends Date\n\t\t? Date\n\t\t: T extends RegExp\n\t\t\t? RegExp\n\t\t\t: T extends Map<infer K, infer V>\n\t\t\t\t? Map<DeepCloneWithoutFunctions<K>, DeepCloneWithoutFunctions<V>>\n\t\t\t\t: T extends Set<infer V>\n\t\t\t\t\t? Set<DeepCloneWithoutFunctions<V>>\n\t\t\t\t\t: T extends readonly (infer Item)[]\n\t\t\t\t\t\t? DeepCloneWithoutFunctions<Item>[]\n\t\t\t\t\t\t: T extends object\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t[K in keyof T as T[K] extends (...args: infer _Args) => unknown ? never : K]: DeepCloneWithoutFunctions<\n\t\t\t\t\t\t\t\t\t\tT[K]\n\t\t\t\t\t\t\t\t\t>;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: T;\n\nconst SKIP = Symbol(\"deep-copy-skip\");\n\nexport function deepCloneWithoutFunctions<T>(value: T, options: DeepCloneOptions = {}): DeepCloneWithoutFunctions<T> {\n\tconst seen = new WeakMap<object, unknown>();\n\n\tconst clone = (input: unknown): unknown => {\n\t\tif (typeof input === \"function\") {\n\t\t\treturn SKIP;\n\t\t}\n\n\t\tif (input === null || typeof input !== \"object\") {\n\t\t\treturn input;\n\t\t}\n\n\t\tconst cached = seen.get(input);\n\n\t\tif (cached !== undefined) {\n\t\t\treturn cached;\n\t\t}\n\n\t\tif (input instanceof Date) {\n\t\t\treturn new Date(input.getTime());\n\t\t}\n\n\t\tif (input instanceof RegExp) {\n\t\t\tconst result = new RegExp(input.source, input.flags);\n\t\t\tresult.lastIndex = input.lastIndex;\n\t\t\treturn result;\n\t\t}\n\n\t\tif (input instanceof Map) {\n\t\t\tconst result = new Map<unknown, unknown>();\n\t\t\tseen.set(input, result);\n\n\t\t\tfor (const [key, mapValue] of input) {\n\t\t\t\tconst clonedKey = clone(key);\n\t\t\t\tconst clonedValue = clone(mapValue);\n\n\t\t\t\tif (clonedKey !== SKIP && clonedValue !== SKIP) {\n\t\t\t\t\tresult.set(clonedKey, clonedValue);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tif (input instanceof Set) {\n\t\t\tconst result = new Set<unknown>();\n\t\t\tseen.set(input, result);\n\n\t\t\tfor (const item of input) {\n\t\t\t\tconst clonedItem = clone(item);\n\n\t\t\t\tif (clonedItem !== SKIP) {\n\t\t\t\t\tresult.add(clonedItem);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tif (Array.isArray(input)) {\n\t\t\tconst result: unknown[] = [];\n\t\t\tseen.set(input, result);\n\n\t\t\tfor (let index = 0; index < input.length; index += 1) {\n\t\t\t\tif (!(index in input)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst clonedItem = clone(input[index]);\n\n\t\t\t\tif (clonedItem === SKIP) {\n\t\t\t\t\tif (options.arrayFunctionStrategy === \"omit\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tresult[index] = undefined;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (options.arrayFunctionStrategy === \"omit\") {\n\t\t\t\t\tresult.push(clonedItem);\n\t\t\t\t} else {\n\t\t\t\t\tresult[index] = clonedItem;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options.arrayFunctionStrategy !== \"omit\") {\n\t\t\t\tresult.length = input.length;\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tconst prototype = options.preservePrototype ? Object.getPrototypeOf(input) : Object.prototype;\n\n\t\tconst result = Object.create(prototype) as Record<PropertyKey, unknown>;\n\t\tseen.set(input, result);\n\n\t\tfor (const key of Reflect.ownKeys(input)) {\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(input, key);\n\n\t\t\tif (!descriptor) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Getters/setters не вызываем.\n\t\t\t * В Zustand-состоянии их лучше вообще не хранить.\n\t\t\t */\n\t\t\tif (!(\"value\" in descriptor)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst clonedValue = clone(descriptor.value);\n\n\t\t\tif (clonedValue === SKIP) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tObject.defineProperty(result, key, {\n\t\t\t\t...descriptor,\n\t\t\t\tvalue: clonedValue\n\t\t\t});\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tconst result = clone(value);\n\n\tif (result === SKIP) {\n\t\treturn undefined as DeepCloneWithoutFunctions<T>;\n\t}\n\n\treturn result as DeepCloneWithoutFunctions<T>;\n}\n","import { isPlainObject } from \"../validators/isRecord\";\n\ntype CopyFunctionStrategy = \"omit\" | \"undefined\";\n\ntype CopyOptions = {\n\tarrayFunctionStrategy?: CopyFunctionStrategy;\n};\n\ntype DeepCopyWithoutFunctions<T> = T extends (...args: never[]) => unknown\n\t? never\n\t: T extends Date\n\t\t? Date\n\t\t: T extends readonly (infer Item)[]\n\t\t\t? DeepCopyWithoutFunctions<Item>[]\n\t\t\t: T extends object\n\t\t\t\t? {\n\t\t\t\t\t\t[K in keyof T as T[K] extends (...args: never[]) => unknown ? never : K]: DeepCopyWithoutFunctions<T[K]>;\n\t\t\t\t\t}\n\t\t\t\t: T;\n\nconst SKIP_CLONE_VALUE = Symbol(\"SKIP_CLONE_VALUE\");\n\nexport function deepCopyWithoutFunctions<T>(value: T, options: CopyOptions = {}): DeepCopyWithoutFunctions<T> {\n\tconst arrayFunctionStrategy = options.arrayFunctionStrategy ?? \"omit\";\n\tconst seen = new WeakMap<object, unknown>();\n\n\tconst clone = (input: unknown): unknown => {\n\t\tif (typeof input === \"function\") {\n\t\t\treturn SKIP_CLONE_VALUE;\n\t\t}\n\n\t\tif (input === null || typeof input !== \"object\") {\n\t\t\treturn input;\n\t\t}\n\n\t\tconst cached = seen.get(input);\n\n\t\tif (cached !== undefined) {\n\t\t\treturn cached;\n\t\t}\n\n\t\tif (input instanceof Date) {\n\t\t\treturn new Date(input.getTime());\n\t\t}\n\n\t\tif (Array.isArray(input)) {\n\t\t\tconst result: unknown[] = [];\n\t\t\tseen.set(input, result);\n\n\t\t\tfor (let index = 0; index < input.length; index += 1) {\n\t\t\t\tconst clonedItem = clone(input[index]);\n\n\t\t\t\tif (clonedItem === SKIP_CLONE_VALUE) {\n\t\t\t\t\tif (arrayFunctionStrategy === \"undefined\") {\n\t\t\t\t\t\tresult[index] = undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (arrayFunctionStrategy === \"omit\") {\n\t\t\t\t\tresult.push(clonedItem);\n\t\t\t\t} else {\n\t\t\t\t\tresult[index] = clonedItem;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (arrayFunctionStrategy === \"undefined\") {\n\t\t\t\tresult.length = input.length;\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tif (!isPlainObject(input)) {\n\t\t\tthrow new TypeError(`Unsupported object for config clone: ${Object.prototype.toString.call(input)}`);\n\t\t}\n\n\t\tconst result: Record<string, unknown> = {};\n\t\tseen.set(input, result);\n\n\t\tfor (const key of Object.keys(input)) {\n\t\t\tconst clonedValue = clone(input[key]);\n\n\t\t\tif (clonedValue !== SKIP_CLONE_VALUE) {\n\t\t\t\tresult[key] = clonedValue;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tconst result = clone(value);\n\n\tif (result === SKIP_CLONE_VALUE) {\n\t\treturn undefined as DeepCopyWithoutFunctions<T>;\n\t}\n\n\treturn result as DeepCopyWithoutFunctions<T>;\n}\n","/**\n * Клавиши, которые должны активировать кастомные элементы с поведением кнопки.\n */\nexport const keyboardActivationKeys = [\"Enter\", \" \"] as const;\n\nexport type KeyboardActivationKey = (typeof keyboardActivationKeys)[number];\n\ninterface KeyboardActivationEventLike {\n\tkey: string;\n\tpreventDefault: () => void;\n}\n\n/**\n * Проверяет, что нажатая клавиша должна активировать действие элемента.\n */\nexport function isKeyboardActivationKey(key: string): key is KeyboardActivationKey {\n\treturn key === \"Enter\" || key === \" \";\n}\n\ninterface HandleKeyboardActivationOptions {\n\tdisabled?: boolean;\n}\n\n/**\n * Выполняет действие по Enter/Space для кастомных интерактивных элементов.\n *\n * Возвращает `true`, если событие было обработано библиотечной логикой.\n */\nexport function handleKeyboardActivation(\n\tevent: KeyboardActivationEventLike,\n\taction: () => void,\n\toptions: HandleKeyboardActivationOptions = {}\n) {\n\tif (options.disabled || !isKeyboardActivationKey(event.key)) {\n\t\treturn false;\n\t}\n\n\tevent.preventDefault();\n\taction();\n\treturn true;\n}\n\nexport interface RovingFocusTargetOptions {\n\tcurrentIndex: number;\n\titemCount: number;\n\tkey: string;\n\torientation: \"horizontal\" | \"vertical\";\n\twrap?: boolean;\n}\n\n/**\n * Вычисляет следующую позицию для паттерна roving focus в `Tabs`, `RadioGroup`\n * и других линейных составных виджетах.\n */\nexport function getRovingFocusTargetIndex({ currentIndex, itemCount, key, orientation, wrap = true }: RovingFocusTargetOptions) {\n\tif (itemCount <= 0) {\n\t\treturn null;\n\t}\n\n\tconst safeCurrentIndex = Math.min(itemCount - 1, Math.max(0, currentIndex));\n\tconst previousKey = orientation === \"horizontal\" ? \"ArrowLeft\" : \"ArrowUp\";\n\tconst nextKey = orientation === \"horizontal\" ? \"ArrowRight\" : \"ArrowDown\";\n\n\tif (key === \"Home\") {\n\t\treturn 0;\n\t}\n\n\tif (key === \"End\") {\n\t\treturn itemCount - 1;\n\t}\n\n\tif (key === previousKey) {\n\t\tif (safeCurrentIndex > 0) {\n\t\t\treturn safeCurrentIndex - 1;\n\t\t}\n\n\t\treturn wrap ? itemCount - 1 : 0;\n\t}\n\n\tif (key === nextKey) {\n\t\tif (safeCurrentIndex < itemCount - 1) {\n\t\t\treturn safeCurrentIndex + 1;\n\t\t}\n\n\t\treturn wrap ? 0 : itemCount - 1;\n\t}\n\n\treturn null;\n}\n","export function logError(...args: unknown[]) {\n\t// косвенный вызов, terser не удалит\n\tglobalThis.console.error(...args);\n}\n","export function findFirstEnabledIndex<T>(options: readonly T[], getOptionDisabled?: (option: T) => boolean) {\n\tfor (let index = 0; index < options.length; index += 1) {\n\t\tif (!getOptionDisabled?.(options[index])) {\n\t\t\treturn index;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\nexport function findLastEnabledIndex<T>(options: readonly T[], getOptionDisabled?: (option: T) => boolean) {\n\tfor (let index = options.length - 1; index >= 0; index -= 1) {\n\t\tif (!getOptionDisabled?.(options[index])) {\n\t\t\treturn index;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\ninterface FindNextEnabledIndexOptions {\n\twrap?: boolean;\n}\n\nexport function findNextEnabledIndex<T>(\n\toptions: readonly T[],\n\tcurrentIndex: number,\n\tstep: 1 | -1,\n\tgetOptionDisabled?: (option: T) => boolean,\n\toptionsConfig: FindNextEnabledIndexOptions = {}\n) {\n\tconst { wrap = false } = optionsConfig;\n\tconst fallbackIndex = currentIndex >= 0 && currentIndex < options.length ? currentIndex : -1;\n\n\tconst tryResolve = (start: number, end: number) => {\n\t\tfor (let index = start; step === 1 ? index <= end : index >= end; index += step) {\n\t\t\tif (!getOptionDisabled?.(options[index])) {\n\t\t\t\treturn index;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t};\n\n\tconst inBoundsResult = tryResolve(currentIndex + step, step === 1 ? options.length - 1 : 0);\n\tif (inBoundsResult !== null) {\n\t\treturn inBoundsResult;\n\t}\n\n\tif (!wrap || options.length === 0) {\n\t\treturn fallbackIndex;\n\t}\n\n\tconst wrappedResult =\n\t\tstep === 1\n\t\t\t? tryResolve(0, Math.min(currentIndex - 1, options.length - 1))\n\t\t\t: tryResolve(options.length - 1, Math.max(currentIndex + 1, 0));\n\n\treturn wrappedResult ?? fallbackIndex;\n}\n","/**\n * Детерминированная JSON-сериализация: ключи объектов сортируются по алфавиту.\n *\n * Зачем: стандартный `JSON.stringify` не гарантирует порядок ключей,\n * что делает его непригодным для кэш-ключей и сравнений на равенство.\n */\nexport function stableStringify(value: unknown): string {\n\treturn JSON.stringify(value, (_k, v) => {\n\t\tif (!v || typeof v !== \"object\") return v;\n\n\t\tif (Array.isArray(v)) return v;\n\n\t\t// Дата -> ISO (на всякий случай)\n\t\tif (v instanceof Date) return v.toISOString();\n\n\t\tconst obj = v as Record<string, unknown>;\n\t\tconst out: Record<string, unknown> = {};\n\t\tfor (const key of Object.keys(obj).sort()) out[key] = obj[key];\n\t\treturn out;\n\t});\n}\n","export function toBase64(str: string): string {\n\treturn btoa(new TextEncoder().encode(str).reduce((acc, byte) => acc + String.fromCharCode(byte), \"\"));\n}\n\nexport function encodeBase64(str: string): string {\n\treturn btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (_, p1) => String.fromCharCode(parseInt(p1, 16))));\n}\n","type TreeNode<T> = T & {\n\tchildren?: TreeNode<T>[];\n};\n\nexport function deepCopyNodes<T extends { children?: TreeNode<T>[] }>(nodes: TreeNode<T>[]): TreeNode<T>[] {\n\treturn nodes.map((node) => {\n\t\tconst copy = { ...node } as TreeNode<T>;\n\n\t\tif (node.children) {\n\t\t\tcopy.children = deepCopyNodes(node.children);\n\t\t}\n\n\t\treturn copy;\n\t});\n}\n\nexport function deepCopyTree<T>(nodes: T[], childrenField: keyof T = \"children\" as keyof T): T[] {\n\treturn nodes.map((node) => {\n\t\tconst copy = { ...node };\n\n\t\tconst children = node[childrenField] as unknown as T[];\n\t\tif (children && Array.isArray(children)) {\n\t\t\t(copy[childrenField] as unknown) = deepCopyTree(children, childrenField);\n\t\t}\n\n\t\treturn copy;\n\t});\n}\n"],"mappings":";;;AAEA,SAAS,EAAkB,GAA0D;CACpF,OAAO,EAAkC,CAAI,KAAK,EAAK,SAAS;AACjE;AAEA,SAAgB,EAAc,GAAyB;CACtD,OAAO,EAAS,QAAQ,CAAI,CAAC,CAAC,QAAgB,GAAO,MAChD,EAAkB,CAAK,IACnB,IAAQ,EAAc,EAAM,MAAM,QAAQ,IAE3C,IAAQ,GACb,CAAC;AACL;;;ACRA,SAAgB,IAAa;CAC5B,IAAI,IAAM;CAEV,KAAK,IAAI,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;EAC1C,IAAM,IAAI,UAAU;EAEhB,OAAC,KAAK,MAAM,KAEhB;OAAI,OAAO,KAAM,UAAU;IAC1B,IAAM,IAAM,IAAM,MAAM,IAAI;IAC5B;GACD;GAEI,aAAO,KAAM,YAAY,MAAM,QAAQ,CAAC,IAE5C,KAAK,IAAM,KAAK,GACf,AAAI,EAAE,OACL,IAAM,IAAM,IAAM,MAAM,IAAI;EAN9B;CASD;CAEA,OAAO;AACR;;;ACvBA,IAAM,oBAAqB,IAAI,QAAkD,GAC3E,o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