@ryuzaki13/react-foundation-lib 2.31.1 → 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 -114
- 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-rxriDRPk.js → formatters-CO40zvVB.js} +496 -497
- 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 +117 -116
- 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.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 -6
- 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 +24 -21
- 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.map +1 -1
- package/dist/metadata/metadataTypes.d.ts +8 -7
- package/dist/metadata/metadataTypes.d.ts.map +1 -1
- package/dist/metadata/scalarTypeClassification.d.ts.map +1 -1
- 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/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.map +1 -1
- package/dist/odata-service/index.js +439 -433
- package/dist/odata-service/index.js.map +1 -1
- 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 +5 -3
- package/dist/odata-service/types.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/query-client/README.mdx +4 -4
- package/dist/chunks/dom-BK22UmgF.js.map +0 -1
- package/dist/chunks/formatDate-BUvpRI7H.js +0 -133
- package/dist/chunks/formatDate-BUvpRI7H.js.map +0 -1
- package/dist/chunks/formatters-rxriDRPk.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/query-client-CVRfrYZM.js.map +0 -1
- package/dist/chunks/scalarTypeClassification-BZcFmIyR.js +0 -764
- package/dist/chunks/scalarTypeClassification-BZcFmIyR.js.map +0 -1
- package/dist/chunks/uuid-CUJPAbRY.js.map +0 -1
- package/dist/chunks/validate-DsUR-bFF.js +0 -608
- package/dist/chunks/validate-DsUR-bFF.js.map +0 -1
- package/dist/utils/index.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-8URYKKly.js","names":[],"sources":["../../src/formatters/number/numberFormatConstants.ts","../../src/formatters/number/numberPresetNameConstants.ts","../../src/formatters/number/presets.ts","../../src/formatters/valueState/valueStateResolverConstants.ts","../../src/formatters/pipeline/formattersPipelineConstants.ts","../../src/formatters/pipeline/clone.ts","../../src/formatters/rowBased/context.ts","../../src/formatters/rowBased/registry.ts","../../src/formatters/pipeline/pipelineValidationConstants.ts","../../src/formatters/pipeline/validate.ts"],"sourcesContent":["/** Режимы compact и поля Intl имеют один источник значений для форматтеров, пресетов и типов. */\nexport const COMPACT_ROUNDING_MODE_ROUND = \"round\";\nexport const COMPACT_ROUNDING_MODE_FLOOR = \"floor\";\nexport const COMPACT_ROUNDING_MODE_CEIL = \"ceil\";\nexport const COMPACT_ROUNDING_MODE_TRUNC = \"trunc\";\nexport const NUMBER_FORMAT_LOCALE = \"ru-RU\";\nexport const INTL_NUMBER_PART_GROUP = \"group\";\nexport const INTL_NUMBER_PART_DECIMAL = \"decimal\";\nexport const STANDARD_NUMBER_GROUP_SIZE = 3;\nexport const FORMATTED_NUMBER_ZERO = \"0\";\n","/** Имена встроенных пресетов разделяют внутренние обращения и сохраняемый публичный объект имён. */\nexport const NUMBER_PRESET_NAME_INTEGER = \"integer\";\nexport const NUMBER_PRESET_NAME_DECIMAL = \"decimal\";\nexport const NUMBER_PRESET_NAME_DECIMAL2 = \"decimal-2\";\nexport const NUMBER_PRESET_NAME_DECIMAL3 = \"decimal-3\";\nexport const NUMBER_PRESET_NAME_CURRENCY = \"currency\";\nexport const NUMBER_PRESET_NAME_PRICE = \"price\";\nexport const NUMBER_PRESET_NAME_PERCENT = \"percent\";\nexport const NUMBER_PRESET_NAME_TONNAGE = \"tonnage\";\nexport const NUMBER_PRESET_NAME_COMPACT_CURRENCY = \"compact-currency\";\nexport const NUMBER_PRESET_NAME_COMPACT_CURRENCY_ROUND = \"compact-currency-round\";\nexport const NUMBER_PRESET_NAME_COMPACT_PERCENT = \"compact-percent\";\nexport const NUMBER_PRESET_NAME_COMPACT_PERCENT_ROUND = \"compact-percent-round\";\nexport const NUMBER_PRESET_NAME_COMPACT_TONNAGE = \"compact-tonnage\";\nexport const NUMBER_PRESET_NAME_COMPACT_TONNAGE_ROUND = \"compact-tonnage-round\";\n","import {\n\tSTANDARD_NUMBER_GROUP_SIZE,\n\tNUMBER_FORMAT_LOCALE,\n\tINTL_NUMBER_PART_GROUP,\n\tCOMPACT_ROUNDING_MODE_ROUND\n} from \"./numberFormatConstants\";\nimport {\n\tNUMBER_PRESET_NAME_INTEGER,\n\tNUMBER_PRESET_NAME_DECIMAL,\n\tNUMBER_PRESET_NAME_DECIMAL2,\n\tNUMBER_PRESET_NAME_DECIMAL3,\n\tNUMBER_PRESET_NAME_CURRENCY,\n\tNUMBER_PRESET_NAME_PRICE,\n\tNUMBER_PRESET_NAME_PERCENT,\n\tNUMBER_PRESET_NAME_TONNAGE,\n\tNUMBER_PRESET_NAME_COMPACT_CURRENCY,\n\tNUMBER_PRESET_NAME_COMPACT_CURRENCY_ROUND,\n\tNUMBER_PRESET_NAME_COMPACT_PERCENT,\n\tNUMBER_PRESET_NAME_COMPACT_PERCENT_ROUND,\n\tNUMBER_PRESET_NAME_COMPACT_TONNAGE,\n\tNUMBER_PRESET_NAME_COMPACT_TONNAGE_ROUND\n} from \"./numberPresetNameConstants\";\n\nimport type { NumberFormatPreset, NumberFormatPresetConfig } from \"./types\";\n\n/** Четырёхзначная проба извлекает групповой разделитель выбранной локали. */\nconst GROUP_SEPARATOR_PROBE_VALUE = 1_000;\n\n/** Символ группировки из ru-RU (U+00A0 или U+202F в зависимости от среды) */\nconst ruGroupChar =\n\tnew Intl.NumberFormat(NUMBER_FORMAT_LOCALE).formatToParts(GROUP_SEPARATOR_PROBE_VALUE).find((p) => p.type === INTL_NUMBER_PART_GROUP)\n\t\t?.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: STANDARD_NUMBER_GROUP_SIZE\n};\n\nexport const DEFAULT_NUMBER_PRESET_NAMES = Object.freeze({\n\tinteger: NUMBER_PRESET_NAME_INTEGER,\n\tdecimal: NUMBER_PRESET_NAME_DECIMAL,\n\tdecimal2: NUMBER_PRESET_NAME_DECIMAL2,\n\tdecimal3: NUMBER_PRESET_NAME_DECIMAL3,\n\tcurrency: NUMBER_PRESET_NAME_CURRENCY,\n\tprice: NUMBER_PRESET_NAME_PRICE,\n\tpercent: NUMBER_PRESET_NAME_PERCENT,\n\ttonnage: NUMBER_PRESET_NAME_TONNAGE,\n\tcompactCurrency: NUMBER_PRESET_NAME_COMPACT_CURRENCY,\n\tcompactCurrencyRound: NUMBER_PRESET_NAME_COMPACT_CURRENCY_ROUND,\n\tcompactPercent: NUMBER_PRESET_NAME_COMPACT_PERCENT,\n\tcompactPercentRound: NUMBER_PRESET_NAME_COMPACT_PERCENT_ROUND,\n\tcompactTonnage: NUMBER_PRESET_NAME_COMPACT_TONNAGE,\n\tcompactTonnageRound: NUMBER_PRESET_NAME_COMPACT_TONNAGE_ROUND\n});\n\n/**\n * Типовые предустановки числового форматирования.\n *\n * Compact-пресеты без суффикса сохраняют консервативное усечение, а парные\n * `*-round` дают явный математический режим без runtime-переопределения пресета.\n * Недостающие поля каждой предустановки заполняются из `NUMBER_FORMAT_DEFAULTS`.\n */\nconst BUILTIN: NumberFormatPresetConfig[] = [\n\t{ name: NUMBER_PRESET_NAME_INTEGER, decimals: 0, decimalSeparator: \"\" },\n\t{ name: NUMBER_PRESET_NAME_DECIMAL },\n\t{ name: NUMBER_PRESET_NAME_DECIMAL2, decimals: 2 },\n\t{ name: NUMBER_PRESET_NAME_DECIMAL3, decimals: 3 },\n\t{ name: NUMBER_PRESET_NAME_CURRENCY, decimals: 0, decimalSeparator: \"\" },\n\t{ name: NUMBER_PRESET_NAME_PRICE, decimals: 0, decimalSeparator: \"\" },\n\t{ name: NUMBER_PRESET_NAME_PERCENT, decimals: 2 },\n\t{ name: NUMBER_PRESET_NAME_TONNAGE },\n\t{ name: NUMBER_PRESET_NAME_COMPACT_CURRENCY, decimals: 0, decimalSeparator: \"\", compact: {} },\n\t{\n\t\tname: NUMBER_PRESET_NAME_COMPACT_CURRENCY_ROUND,\n\t\tdecimals: 0,\n\t\tdecimalSeparator: \"\",\n\t\tcompact: { roundingMode: COMPACT_ROUNDING_MODE_ROUND }\n\t},\n\t{ name: NUMBER_PRESET_NAME_COMPACT_PERCENT, decimals: 2, compact: { maxDecimals: 2 } },\n\t{\n\t\tname: NUMBER_PRESET_NAME_COMPACT_PERCENT_ROUND,\n\t\tdecimals: 2,\n\t\tcompact: { maxDecimals: 2, roundingMode: COMPACT_ROUNDING_MODE_ROUND }\n\t},\n\t{ name: NUMBER_PRESET_NAME_COMPACT_TONNAGE, compact: { maxDecimals: 1 } },\n\t{ name: NUMBER_PRESET_NAME_COMPACT_TONNAGE_ROUND, compact: { maxDecimals: 1, roundingMode: COMPACT_ROUNDING_MODE_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","/** Виды резолверов и правила включения порога связывают runtime-конфигурацию с её литеральными типами. */\nexport const VALUE_STATE_RESOLVER_KIND_FIXED = \"fixed\";\nexport const VALUE_STATE_RESOLVER_KIND_THRESHOLD = \"threshold\";\nexport const THRESHOLD_BOUNDARY_LOWER = \"lower\";\nexport const THRESHOLD_BOUNDARY_UPPER = \"upper\";\n","/** Устойчивые значения сериализуемого pipeline общие для проверки, графа, плана и runtime. */\nexport const PIPELINE_FORMATTER_NORMALIZE_LEADING_ZEROS = \"normalizeLeadingZeros\";\nexport const PIPELINE_FORMATTER_ROW_BASED_OVERRIDE = \"rowBasedOverride\";\nexport const PIPELINE_FORMATTER_RESOLVE_VALUE_STATE = \"resolveValueState\";\nexport const PIPELINE_FORMATTER_TYPED_VALUE_FORMAT = \"typedValueFormat\";\nexport const PIPELINE_NODE_SOURCE = \"source\";\nexport const PIPELINE_NODE_SINK = \"sink\";\nexport const PIPELINE_OVERRIDE_MODE_FIELD = \"field\";\nexport const PIPELINE_OVERRIDE_MODE_FORMULA = \"formula\";\nexport const PIPELINE_STATE_SOURCE_VALUE = \"value\";\nexport const PIPELINE_ICON_POSITION_LEFT = \"left\";\nexport const PIPELINE_ICON_POSITION_RIGHT = \"right\";\nexport const PIPELINE_ROW_KIND_PLAIN = \"plain\";\nexport const PIPELINE_ROW_KIND_TREE = \"tree\";\nexport const PIPELINE_ROW_KIND_GROUP = \"group\";\nexport const PIPELINE_ROW_KIND_TOTALS = \"totals\";\nexport const PIPELINE_STATE_SOURCE_FORMULA = \"formula\";\nexport const FORMATTERS_PIPELINE_VERSION = 1;\n","import { VALUE_STATE_RESOLVER_KIND_FIXED, VALUE_STATE_RESOLVER_KIND_THRESHOLD } from \"../valueState/valueStateResolverConstants\";\n\nimport {\n\tPIPELINE_OVERRIDE_MODE_FORMULA,\n\tPIPELINE_FORMATTER_TYPED_VALUE_FORMAT,\n\tPIPELINE_FORMATTER_NORMALIZE_LEADING_ZEROS,\n\tPIPELINE_FORMATTER_ROW_BASED_OVERRIDE,\n\tPIPELINE_FORMATTER_RESOLVE_VALUE_STATE,\n\tPIPELINE_NODE_SOURCE,\n\tPIPELINE_NODE_SINK,\n\tPIPELINE_STATE_SOURCE_FORMULA\n} from \"./formattersPipelineConstants\";\n\nimport 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 === PIPELINE_OVERRIDE_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 === VALUE_STATE_RESOLVER_KIND_FIXED\n\t\t\t\t? {\n\t\t\t\t\t\tkind: VALUE_STATE_RESOLVER_KIND_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: VALUE_STATE_RESOLVER_KIND_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 === PIPELINE_STATE_SOURCE_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 PIPELINE_FORMATTER_TYPED_VALUE_FORMAT:\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 PIPELINE_FORMATTER_NORMALIZE_LEADING_ZEROS:\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 PIPELINE_FORMATTER_ROW_BASED_OVERRIDE:\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 PIPELINE_FORMATTER_RESOLVE_VALUE_STATE:\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 PIPELINE_FORMATTER_TYPED_VALUE_FORMAT:\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 PIPELINE_FORMATTER_NORMALIZE_LEADING_ZEROS:\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 PIPELINE_FORMATTER_ROW_BASED_OVERRIDE:\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 PIPELINE_FORMATTER_RESOLVE_VALUE_STATE:\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 PIPELINE_NODE_SOURCE:\n\t\tcase PIPELINE_NODE_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","/** Коды диагностики сохраняют единый источник для сообщений валидации и их runtime-потребителей. */\nexport const PIPELINE_VALIDATION_CONFIG_NOT_DEFINED = \"config_not_defined\";\nexport const PIPELINE_VALIDATION_UNSUPPORTED_VERSION = \"unsupported_version\";\nexport const PIPELINE_VALIDATION_GRAPH_OR_PLAN_REQUIRED = \"graph_or_plan_required\";\nexport const PIPELINE_VALIDATION_NODE_ID_DUPLICATE = \"node_id_duplicate\";\nexport const PIPELINE_VALIDATION_EDGE_ID_DUPLICATE = \"edge_id_duplicate\";\nexport const PIPELINE_VALIDATION_EDGE_NODE_NOT_FOUND = \"edge_node_not_found\";\nexport const PIPELINE_VALIDATION_SOURCE_COUNT_INVALID = \"source_count_invalid\";\nexport const PIPELINE_VALIDATION_SINK_COUNT_INVALID = \"sink_count_invalid\";\nexport const PIPELINE_VALIDATION_SOURCE_INCOMING_INVALID = \"source_incoming_invalid\";\nexport const PIPELINE_VALIDATION_SINK_OUTGOING_INVALID = \"sink_outgoing_invalid\";\nexport const PIPELINE_VALIDATION_NODE_DEGREE_INVALID = \"node_degree_invalid\";\nexport const PIPELINE_VALIDATION_PATH_BROKEN = \"path_broken\";\nexport const PIPELINE_VALIDATION_PATH_CYCLE_DETECTED = \"path_cycle_detected\";\nexport const PIPELINE_VALIDATION_PATH_DISCONNECTED_NODES = \"path_disconnected_nodes\";\nexport const PIPELINE_VALIDATION_STEP_ID_DUPLICATE = \"step_id_duplicate\";\nexport const PIPELINE_VALIDATION_STEP_RESOLVE_VALUE_STATE_MULTIPLE = \"step_resolve_value_state_multiple\";\nexport const PIPELINE_VALIDATION_STEP_TYPED_VALUE_FORMAT_MULTIPLE = \"step_typed_value_format_multiple\";\nexport const PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_MULTIPLE = \"step_row_based_override_multiple\";\nexport const PIPELINE_VALIDATION_STEP_NORMALIZE_LEADING_ZEROS_MULTIPLE = \"step_normalize_leading_zeros_multiple\";\nexport const PIPELINE_VALIDATION_STEP_TYPED_BEFORE_VALUE_STATE = \"step_typed_before_value_state\";\nexport const PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FIELD_KEY_EMPTY = \"step_row_based_override_field_key_empty\";\nexport const PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FORMULA_ID_EMPTY = \"step_row_based_override_formula_id_empty\";\nexport const PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FORMULA_NOT_FOUND = \"step_row_based_override_formula_not_found\";\nexport const PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_DEPENDENCY_INDEX_OUT_OF_RANGE =\n\t\"step_row_based_override_dependency_index_out_of_range\";\nexport const PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_UNUSED_DEPENDENCIES = \"step_row_based_override_unused_dependencies\";\nexport const PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FORMULA_DOES_NOT_USE_DEPENDENCIES =\n\t\"step_row_based_override_formula_does_not_use_dependencies\";\nexport const PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FORMULA_RUNTIME_ERROR = \"step_row_based_override_formula_runtime_error\";\nexport const PIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_ID_EMPTY = \"step_value_state_formula_id_empty\";\nexport const PIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_NOT_FOUND = \"step_value_state_formula_not_found\";\nexport const PIPELINE_VALIDATION_STEP_VALUE_STATE_DEPENDENCY_ID_EMPTY = \"step_value_state_dependency_id_empty\";\nexport const PIPELINE_VALIDATION_STEP_VALUE_STATE_DEPENDENCY_INDEX_OUT_OF_RANGE = \"step_value_state_dependency_index_out_of_range\";\nexport const PIPELINE_VALIDATION_STEP_VALUE_STATE_UNUSED_DEPENDENCIES = \"step_value_state_unused_dependencies\";\nexport const PIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_DOES_NOT_USE_DEPENDENCIES = \"step_value_state_formula_does_not_use_dependencies\";\nexport const PIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_RUNTIME_ERROR = \"step_value_state_formula_runtime_error\";\nexport const PIPELINE_VALIDATION_STEP_THRESHOLD_STATES_COUNT_INVALID = \"step_threshold_states_count_invalid\";\nexport const PIPELINE_VALIDATION_STEP_VALUE_HIDDEN_WITHOUT_ICON = \"step_value_hidden_without_icon\";\nexport const PIPELINE_VALIDATION_STEP_TYPED_VALUE_FORMAT_PRESET_EMPTY = \"step_typed_value_format_preset_empty\";\nexport const PIPELINE_VALIDATION_STEP_TYPED_VALUE_FORMAT_PRESET_NOT_FOUND = \"step_typed_value_format_preset_not_found\";\n","import { validateTableFormulaDependencies } from \"../../formulas\";\nimport {\n\tTABLE_FORMULA_NOT_FOUND,\n\tTABLE_FORMULA_DEPENDENCY_INDEX_OUT_OF_RANGE,\n\tTABLE_FORMULA_UNUSED_DEPENDENCIES,\n\tTABLE_FORMULA_DOES_NOT_USE_DEPENDENCIES,\n\tTABLE_FORMULA_VALIDATION_RUNTIME_ERROR\n} from \"../../formulas/tableFormulaConstants\";\nimport { getNumberPreset } from \"../number\";\nimport { createRowBasedFormatterContext, getRowBasedFormatterById } from \"../rowBased\";\nimport { VALUE_STATE_RESOLVER_KIND_THRESHOLD } from \"../valueState/valueStateResolverConstants\";\n\nimport { cloneResolveValueStateConfig } from \"./clone\";\nimport {\n\tPIPELINE_FORMATTER_NORMALIZE_LEADING_ZEROS,\n\tPIPELINE_FORMATTER_ROW_BASED_OVERRIDE,\n\tPIPELINE_OVERRIDE_MODE_FIELD,\n\tPIPELINE_OVERRIDE_MODE_FORMULA,\n\tPIPELINE_FORMATTER_RESOLVE_VALUE_STATE,\n\tPIPELINE_FORMATTER_TYPED_VALUE_FORMAT,\n\tPIPELINE_NODE_SOURCE,\n\tPIPELINE_NODE_SINK,\n\tPIPELINE_STATE_SOURCE_FORMULA,\n\tFORMATTERS_PIPELINE_VERSION\n} from \"./formattersPipelineConstants\";\nimport {\n\tPIPELINE_VALIDATION_CONFIG_NOT_DEFINED,\n\tPIPELINE_VALIDATION_UNSUPPORTED_VERSION,\n\tPIPELINE_VALIDATION_GRAPH_OR_PLAN_REQUIRED,\n\tPIPELINE_VALIDATION_NODE_ID_DUPLICATE,\n\tPIPELINE_VALIDATION_EDGE_ID_DUPLICATE,\n\tPIPELINE_VALIDATION_EDGE_NODE_NOT_FOUND,\n\tPIPELINE_VALIDATION_SOURCE_COUNT_INVALID,\n\tPIPELINE_VALIDATION_SINK_COUNT_INVALID,\n\tPIPELINE_VALIDATION_SOURCE_INCOMING_INVALID,\n\tPIPELINE_VALIDATION_SINK_OUTGOING_INVALID,\n\tPIPELINE_VALIDATION_NODE_DEGREE_INVALID,\n\tPIPELINE_VALIDATION_PATH_BROKEN,\n\tPIPELINE_VALIDATION_PATH_CYCLE_DETECTED,\n\tPIPELINE_VALIDATION_PATH_DISCONNECTED_NODES,\n\tPIPELINE_VALIDATION_STEP_ID_DUPLICATE,\n\tPIPELINE_VALIDATION_STEP_RESOLVE_VALUE_STATE_MULTIPLE,\n\tPIPELINE_VALIDATION_STEP_TYPED_VALUE_FORMAT_MULTIPLE,\n\tPIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_MULTIPLE,\n\tPIPELINE_VALIDATION_STEP_NORMALIZE_LEADING_ZEROS_MULTIPLE,\n\tPIPELINE_VALIDATION_STEP_TYPED_BEFORE_VALUE_STATE,\n\tPIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FIELD_KEY_EMPTY,\n\tPIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FORMULA_ID_EMPTY,\n\tPIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FORMULA_NOT_FOUND,\n\tPIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_DEPENDENCY_INDEX_OUT_OF_RANGE,\n\tPIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_UNUSED_DEPENDENCIES,\n\tPIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FORMULA_DOES_NOT_USE_DEPENDENCIES,\n\tPIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FORMULA_RUNTIME_ERROR,\n\tPIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_ID_EMPTY,\n\tPIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_NOT_FOUND,\n\tPIPELINE_VALIDATION_STEP_VALUE_STATE_DEPENDENCY_ID_EMPTY,\n\tPIPELINE_VALIDATION_STEP_VALUE_STATE_DEPENDENCY_INDEX_OUT_OF_RANGE,\n\tPIPELINE_VALIDATION_STEP_VALUE_STATE_UNUSED_DEPENDENCIES,\n\tPIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_DOES_NOT_USE_DEPENDENCIES,\n\tPIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_RUNTIME_ERROR,\n\tPIPELINE_VALIDATION_STEP_THRESHOLD_STATES_COUNT_INVALID,\n\tPIPELINE_VALIDATION_STEP_VALUE_HIDDEN_WITHOUT_ICON,\n\tPIPELINE_VALIDATION_STEP_TYPED_VALUE_FORMAT_PRESET_EMPTY,\n\tPIPELINE_VALIDATION_STEP_TYPED_VALUE_FORMAT_PRESET_NOT_FOUND\n} from \"./pipelineValidationConstants\";\n\nimport type {\n\tFormattersPipelineConfig,\n\tFormattersPipelineEdge,\n\tFormattersPipelineGraph,\n\tFormattersPipelineNode,\n\tFormattersPipelinePlan,\n\tFormattersPipelineRowBasedOverrideFormulaConfig,\n\tFormattersPipelineStep,\n\tFormattersPipelineValueStateFormulaSource\n} from \"./types\";\n\n/** Положительная и отрицательная пробы выявляют обращения к зависимостям в разных ветках формулы. */\nconst FORMULA_VALIDATION_PROBE_VALUE = 100;\n\nexport type FormattersPipelineValidationCode =\n\t| typeof PIPELINE_VALIDATION_CONFIG_NOT_DEFINED\n\t| typeof PIPELINE_VALIDATION_UNSUPPORTED_VERSION\n\t| typeof PIPELINE_VALIDATION_GRAPH_OR_PLAN_REQUIRED\n\t| typeof PIPELINE_VALIDATION_NODE_ID_DUPLICATE\n\t| typeof PIPELINE_VALIDATION_EDGE_ID_DUPLICATE\n\t| typeof PIPELINE_VALIDATION_EDGE_NODE_NOT_FOUND\n\t| typeof PIPELINE_VALIDATION_SOURCE_COUNT_INVALID\n\t| typeof PIPELINE_VALIDATION_SINK_COUNT_INVALID\n\t| typeof PIPELINE_VALIDATION_SOURCE_INCOMING_INVALID\n\t| typeof PIPELINE_VALIDATION_SINK_OUTGOING_INVALID\n\t| typeof PIPELINE_VALIDATION_NODE_DEGREE_INVALID\n\t| typeof PIPELINE_VALIDATION_PATH_BROKEN\n\t| typeof PIPELINE_VALIDATION_PATH_CYCLE_DETECTED\n\t| typeof PIPELINE_VALIDATION_PATH_DISCONNECTED_NODES\n\t| typeof PIPELINE_VALIDATION_STEP_ID_DUPLICATE\n\t| typeof PIPELINE_VALIDATION_STEP_RESOLVE_VALUE_STATE_MULTIPLE\n\t| typeof PIPELINE_VALIDATION_STEP_TYPED_VALUE_FORMAT_MULTIPLE\n\t| typeof PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_MULTIPLE\n\t| typeof PIPELINE_VALIDATION_STEP_NORMALIZE_LEADING_ZEROS_MULTIPLE\n\t| typeof PIPELINE_VALIDATION_STEP_TYPED_BEFORE_VALUE_STATE\n\t| typeof PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FIELD_KEY_EMPTY\n\t| typeof PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FORMULA_ID_EMPTY\n\t| typeof PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FORMULA_NOT_FOUND\n\t| typeof PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_DEPENDENCY_INDEX_OUT_OF_RANGE\n\t| typeof PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_UNUSED_DEPENDENCIES\n\t| typeof PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FORMULA_DOES_NOT_USE_DEPENDENCIES\n\t| typeof PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FORMULA_RUNTIME_ERROR\n\t| typeof PIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_ID_EMPTY\n\t| typeof PIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_NOT_FOUND\n\t| typeof PIPELINE_VALIDATION_STEP_VALUE_STATE_DEPENDENCY_ID_EMPTY\n\t| typeof PIPELINE_VALIDATION_STEP_VALUE_STATE_DEPENDENCY_INDEX_OUT_OF_RANGE\n\t| typeof PIPELINE_VALIDATION_STEP_VALUE_STATE_UNUSED_DEPENDENCIES\n\t| typeof PIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_DOES_NOT_USE_DEPENDENCIES\n\t| typeof PIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_RUNTIME_ERROR\n\t| typeof PIPELINE_VALIDATION_STEP_THRESHOLD_STATES_COUNT_INVALID\n\t| typeof PIPELINE_VALIDATION_STEP_VALUE_HIDDEN_WITHOUT_ICON\n\t| typeof PIPELINE_VALIDATION_STEP_TYPED_VALUE_FORMAT_PRESET_EMPTY\n\t| typeof PIPELINE_VALIDATION_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(\n\t\t\tstate,\n\t\t\tPIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_FORMULA_ID_EMPTY,\n\t\t\t\"Для rowBasedOverride (formula) необходимо заполнить formulaId.\"\n\t\t);\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, PIPELINE_VALIDATION_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: FORMULA_VALIDATION_PROBE_VALUE,\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, FORMULA_VALIDATION_PROBE_VALUE));\n\trunValidationPass(createSampleRowData(dependencies, -FORMULA_VALIDATION_PROBE_VALUE));\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\tPIPELINE_VALIDATION_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\tPIPELINE_VALIDATION_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\tPIPELINE_VALIDATION_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\tPIPELINE_VALIDATION_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, PIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_ID_EMPTY, \"Для источника состояния необходимо выбрать формулу.\");\n\t\treturn;\n\t}\n\n\tif (source.dependencyIds.some((dependencyId) => !dependencyId.trim())) {\n\t\tpushError(\n\t\t\tstate,\n\t\t\tPIPELINE_VALIDATION_STEP_VALUE_STATE_DEPENDENCY_ID_EMPTY,\n\t\t\t\"Зависимость формулы состояния не может иметь пустой id.\"\n\t\t);\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 === TABLE_FORMULA_NOT_FOUND) {\n\t\t\tpushError(state, PIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_NOT_FOUND, \"Формула источника состояния не найдена в реестре.\");\n\t\t} else if (error.code === TABLE_FORMULA_DEPENDENCY_INDEX_OUT_OF_RANGE) {\n\t\t\tpushError(state, PIPELINE_VALIDATION_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 TABLE_FORMULA_UNUSED_DEPENDENCIES:\n\t\t\t\tpushWarning(state, PIPELINE_VALIDATION_STEP_VALUE_STATE_UNUSED_DEPENDENCIES, warning.message);\n\t\t\t\tbreak;\n\t\t\tcase TABLE_FORMULA_DOES_NOT_USE_DEPENDENCIES:\n\t\t\t\tpushWarning(state, PIPELINE_VALIDATION_STEP_VALUE_STATE_FORMULA_DOES_NOT_USE_DEPENDENCIES, warning.message);\n\t\t\t\tbreak;\n\t\t\tcase TABLE_FORMULA_VALIDATION_RUNTIME_ERROR:\n\t\t\t\tpushWarning(state, PIPELINE_VALIDATION_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, PIPELINE_VALIDATION_STEP_ID_DUPLICATE, \"Шаг pipeline не может иметь пустой id.\");\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (stepIdSet.has(normalizedId)) {\n\t\t\tpushError(state, PIPELINE_VALIDATION_STEP_ID_DUPLICATE, `Найден дублирующийся id шага pipeline: ${normalizedId}.`);\n\t\t}\n\t\tstepIdSet.add(normalizedId);\n\n\t\tswitch (step.type) {\n\t\t\tcase PIPELINE_FORMATTER_NORMALIZE_LEADING_ZEROS:\n\t\t\t\tcounters.normalizeLeadingZeros += 1;\n\t\t\t\tbreak;\n\t\t\tcase PIPELINE_FORMATTER_ROW_BASED_OVERRIDE:\n\t\t\t\tcounters.rowBasedOverride += 1;\n\n\t\t\t\tif (step.config.mode === PIPELINE_OVERRIDE_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\tPIPELINE_VALIDATION_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 === PIPELINE_OVERRIDE_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 PIPELINE_FORMATTER_RESOLVE_VALUE_STATE:\n\t\t\t\tcounters.resolveValueState += 1;\n\t\t\t\tif (step.config.valueSource?.kind === PIPELINE_STATE_SOURCE_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 === VALUE_STATE_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\tPIPELINE_VALIDATION_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 PIPELINE_FORMATTER_TYPED_VALUE_FORMAT:\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(\n\t\t\t\t\t\t\tstate,\n\t\t\t\t\t\t\tPIPELINE_VALIDATION_STEP_TYPED_VALUE_FORMAT_PRESET_EMPTY,\n\t\t\t\t\t\t\t\"Для typedValueFormat указан пустой numberPresetName.\"\n\t\t\t\t\t\t);\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\tPIPELINE_VALIDATION_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(\n\t\t\tstate,\n\t\t\tPIPELINE_VALIDATION_STEP_NORMALIZE_LEADING_ZEROS_MULTIPLE,\n\t\t\t\"В pipeline может быть только один шаг normalizeLeadingZeros.\"\n\t\t);\n\t}\n\n\tif (counters.rowBasedOverride > 1) {\n\t\tpushError(state, PIPELINE_VALIDATION_STEP_ROW_BASED_OVERRIDE_MULTIPLE, \"В pipeline может быть только один шаг rowBasedOverride.\");\n\t}\n\n\tif (counters.resolveValueState > 1) {\n\t\tpushError(state, PIPELINE_VALIDATION_STEP_RESOLVE_VALUE_STATE_MULTIPLE, \"В pipeline может быть только один шаг resolveValueState.\");\n\t}\n\n\tif (counters.typedValueFormat > 1) {\n\t\tpushError(state, PIPELINE_VALIDATION_STEP_TYPED_VALUE_FORMAT_MULTIPLE, \"В pipeline может быть только один шаг typedValueFormat.\");\n\t}\n\n\tconst resolveIndex = steps.findIndex((step) => step.type === PIPELINE_FORMATTER_RESOLVE_VALUE_STATE);\n\tconst typedIndex = steps.findIndex((step) => step.type === PIPELINE_FORMATTER_TYPED_VALUE_FORMAT);\n\tif (resolveIndex !== -1 && typedIndex !== -1 && typedIndex < resolveIndex) {\n\t\tpushError(\n\t\t\tstate,\n\t\t\tPIPELINE_VALIDATION_STEP_TYPED_BEFORE_VALUE_STATE,\n\t\t\t\"Шаг typedValueFormat не может выполняться до шага resolveValueState.\"\n\t\t);\n\t}\n\n\tfor (const step of steps) {\n\t\tif (step.type !== PIPELINE_FORMATTER_RESOLVE_VALUE_STATE) 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\tPIPELINE_VALIDATION_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(\n\t\t\t\tstate,\n\t\t\t\tPIPELINE_VALIDATION_EDGE_NODE_NOT_FOUND,\n\t\t\t\t`Ребро ${edge.id} ссылается на несуществующий узел: ${source} -> ${target}.`\n\t\t\t);\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 === PIPELINE_NODE_SOURCE);\n\tconst sinks = nodes.filter((node) => node.type === PIPELINE_NODE_SINK);\n\n\tif (sources.length !== 1) {\n\t\tpushError(state, PIPELINE_VALIDATION_SOURCE_COUNT_INVALID, \"В графе должен быть ровно один узел source.\");\n\t}\n\tif (sinks.length !== 1) {\n\t\tpushError(state, PIPELINE_VALIDATION_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 === PIPELINE_NODE_SOURCE) {\n\t\t\tif (inDegree !== 0) {\n\t\t\t\tpushError(state, PIPELINE_VALIDATION_SOURCE_INCOMING_INVALID, \"Узел source не должен иметь входящих рёбер.\");\n\t\t\t}\n\t\t\tif (outDegree !== 1) {\n\t\t\t\tpushError(state, PIPELINE_VALIDATION_NODE_DEGREE_INVALID, \"Узел source должен иметь ровно одно исходящее ребро.\");\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (node.type === PIPELINE_NODE_SINK) {\n\t\t\tif (outDegree !== 0) {\n\t\t\t\tpushError(state, PIPELINE_VALIDATION_SINK_OUTGOING_INVALID, \"Узел sink не должен иметь исходящих рёбер.\");\n\t\t\t}\n\t\t\tif (inDegree !== 1) {\n\t\t\t\tpushError(state, PIPELINE_VALIDATION_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\tPIPELINE_VALIDATION_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, PIPELINE_VALIDATION_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, PIPELINE_VALIDATION_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(\n\t\t\tstate,\n\t\t\tPIPELINE_VALIDATION_PATH_DISCONNECTED_NODES,\n\t\t\t\"Граф содержит узлы, которые не входят в линейный путь source -> sink.\"\n\t\t);\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, PIPELINE_VALIDATION_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, PIPELINE_VALIDATION_NODE_ID_DUPLICATE, \"Узел pipeline не может иметь пустой id.\");\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (nodeById.has(normalizedId)) {\n\t\t\tpushError(state, PIPELINE_VALIDATION_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, PIPELINE_VALIDATION_EDGE_ID_DUPLICATE, \"Ребро pipeline не может иметь пустой id.\");\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (edgeIdSet.has(normalizedEdgeId)) {\n\t\t\tpushError(state, PIPELINE_VALIDATION_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 === PIPELINE_NODE_SOURCE || node.type === PIPELINE_NODE_SINK) continue;\n\n\t\tswitch (node.type) {\n\t\t\tcase PIPELINE_FORMATTER_NORMALIZE_LEADING_ZEROS:\n\t\t\t\tsteps.push({\n\t\t\t\t\tid: node.id,\n\t\t\t\t\ttype: PIPELINE_FORMATTER_NORMALIZE_LEADING_ZEROS,\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 PIPELINE_FORMATTER_ROW_BASED_OVERRIDE:\n\t\t\t\tsteps.push({\n\t\t\t\t\tid: node.id,\n\t\t\t\t\ttype: PIPELINE_FORMATTER_ROW_BASED_OVERRIDE,\n\t\t\t\t\tconfig:\n\t\t\t\t\t\tnode.config.mode === PIPELINE_OVERRIDE_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 PIPELINE_FORMATTER_RESOLVE_VALUE_STATE:\n\t\t\t\tsteps.push({\n\t\t\t\t\tid: node.id,\n\t\t\t\t\ttype: PIPELINE_FORMATTER_RESOLVE_VALUE_STATE,\n\t\t\t\t\tconfig: cloneResolveValueStateConfig(node.config)\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase PIPELINE_FORMATTER_TYPED_VALUE_FORMAT:\n\t\t\t\tsteps.push({\n\t\t\t\t\tid: node.id,\n\t\t\t\t\ttype: PIPELINE_FORMATTER_TYPED_VALUE_FORMAT,\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, PIPELINE_VALIDATION_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 !== FORMATTERS_PIPELINE_VERSION) {\n\t\tpushError(state, PIPELINE_VALIDATION_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(\n\t\t\tstate,\n\t\t\tPIPELINE_VALIDATION_GRAPH_OR_PLAN_REQUIRED,\n\t\t\t\"Для pipeline должен быть задан хотя бы один источник: graph или plan.\"\n\t\t);\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, PIPELINE_VALIDATION_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":";;;AACA,IAAa,IAA8B,SAC9B,IAA8B,SAC9B,IAA6B,QAC7B,IAA8B,SAC9B,IAAuB,SACvB,IAAyB,SACzB,IAA2B,WCN3B,IAA6B,WAC7B,IAA6B,WAC7B,IAA8B,aAC9B,IAA8B,aAC9B,IAA8B,YAC9B,IAA2B,SAC3B,IAA6B,WAC7B,IAA6B,WAC7B,IAAsC,oBACtC,IAA4C,0BAC5C,IAAqC,mBACrC,IAA2C,yBA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ACD;CAEA,OAAO;EACN,IAAI;EACJ,QAAQ,EAAM;EACd,UAAU,EAAM;CACjB;AACD"}
|
package/dist/copy/index.js
CHANGED
|
@@ -28,18 +28,18 @@ var r = async (e) => {
|
|
|
28
28
|
}, [o, r]),
|
|
29
29
|
getElementText: o
|
|
30
30
|
};
|
|
31
|
-
}, s = () => {
|
|
31
|
+
}, s = 2e3, c = () => {
|
|
32
32
|
let [t, r] = n(!1);
|
|
33
33
|
return {
|
|
34
34
|
isCopied: t,
|
|
35
35
|
showFeedback: e(() => {
|
|
36
36
|
r(!0);
|
|
37
|
-
let e = setTimeout(() => r(!1),
|
|
37
|
+
let e = setTimeout(() => r(!1), s);
|
|
38
38
|
return () => clearTimeout(e);
|
|
39
39
|
}, [])
|
|
40
40
|
};
|
|
41
|
-
},
|
|
42
|
-
let { containerRef: t, copyElementText: n, getElementText: r } = o(), { isCopied: i, showFeedback: a } =
|
|
41
|
+
}, l = () => {
|
|
42
|
+
let { containerRef: t, copyElementText: n, getElementText: r } = o(), { isCopied: i, showFeedback: a } = c();
|
|
43
43
|
return {
|
|
44
44
|
containerRef: t,
|
|
45
45
|
copyElementText: e(async () => {
|
|
@@ -51,6 +51,6 @@ var r = async (e) => {
|
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
53
|
//#endregion
|
|
54
|
-
export { o as useCopyElementText,
|
|
54
|
+
export { o as useCopyElementText, l as useCopyElementTextWithFeedback, c as useCopyFeedback, i as useCopyText, a as useElementText };
|
|
55
55
|
|
|
56
56
|
//# sourceMappingURL=index.js.map
|
package/dist/copy/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/copy/useCopyText.ts","../../src/copy/useElementText.ts","../../src/copy/useCopyElementText.ts","../../src/copy/useCopyFeedback.ts"],"sourcesContent":["import { useCallback } from \"react\";\n\nconst clipboardFallback = async (text: string): Promise<boolean> => {\n\ttry {\n\t\t// Создаем временный элемент с выделением\n\t\tconst tempElement = document.createElement(\"div\");\n\t\ttempElement.contentEditable = \"true\";\n\t\ttempElement.style.position = \"fixed\";\n\t\ttempElement.style.opacity = \"0\";\n\t\ttempElement.style.pointerEvents = \"none\";\n\t\ttempElement.textContent = text;\n\n\t\tdocument.body.appendChild(tempElement);\n\n\t\t// Выделяем текст\n\t\tconst selection = window.getSelection();\n\t\tconst range = document.createRange();\n\t\trange.selectNodeContents(tempElement);\n\t\tselection?.removeAllRanges();\n\t\tselection?.addRange(range);\n\n\t\t// Пытаемся скопировать через современный API\n\t\tconst success = document.execCommand(\"copy\"); // Это пока оставляем, но с try/catch\n\t\tselection?.removeAllRanges();\n\t\tdocument.body.removeChild(tempElement);\n\n\t\treturn success;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport const useCopyText = () => {\n\tconst copyToClipboard = useCallback(async (text: string): Promise<boolean> => {\n\t\tif (!text.trim()) return false;\n\n\t\ttry {\n\t\t\t// Современный API\n\t\t\tif (navigator.clipboard && window.isSecureContext) {\n\t\t\t\tawait navigator.clipboard.writeText(text);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// Fallback для старых браузеров\n\t\t\t\treturn await clipboardFallback(text);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error(\"Failed to copy text:\", err);\n\t\t\treturn false;\n\t\t}\n\t}, []);\n\n\treturn { copyToClipboard };\n};\n","import { RefObject, useCallback } from \"react\";\n\nexport const useElementText = <T extends HTMLElement = HTMLElement>(ref: RefObject<T | null>) => {\n\tconst getElementText = useCallback((): string => {\n\t\treturn ref.current?.textContent?.trim() || \"\";\n\t}, [ref]);\n\n\treturn { getElementText };\n};\n","import { useCallback, useRef } from \"react\";\n\nimport { useCopyText } from \"./useCopyText\";\nimport { useElementText } from \"./useElementText\";\n\nexport const useCopyElementText = <T extends HTMLElement = HTMLElement>() => {\n\tconst containerRef = useRef<T>(null);\n\tconst { copyToClipboard } = useCopyText();\n\tconst { getElementText } = useElementText(containerRef);\n\n\tconst copyElementText = useCallback(async (): Promise<boolean> => {\n\t\tconst text = getElementText();\n\t\tif (!text) return false;\n\n\t\treturn await copyToClipboard(text);\n\t}, [getElementText, copyToClipboard]);\n\n\treturn {\n\t\tcontainerRef,\n\t\tcopyElementText,\n\t\tgetElementText\n\t};\n};\n","import { useCallback, useState } from \"react\";\n\nimport { useCopyElementText } from \"./useCopyElementText\";\n\nexport const useCopyFeedback = () => {\n\tconst [isCopied, setIsCopied] = useState(false);\n\n\tconst showFeedback = useCallback(() => {\n\t\tsetIsCopied(true);\n\t\tconst timer = setTimeout(() => setIsCopied(false),
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/copy/useCopyText.ts","../../src/copy/useElementText.ts","../../src/copy/useCopyElementText.ts","../../src/copy/useCopyFeedback.ts"],"sourcesContent":["import { useCallback } from \"react\";\n\nconst clipboardFallback = async (text: string): Promise<boolean> => {\n\ttry {\n\t\t// Создаем временный элемент с выделением\n\t\tconst tempElement = document.createElement(\"div\");\n\t\ttempElement.contentEditable = \"true\";\n\t\ttempElement.style.position = \"fixed\";\n\t\ttempElement.style.opacity = \"0\";\n\t\ttempElement.style.pointerEvents = \"none\";\n\t\ttempElement.textContent = text;\n\n\t\tdocument.body.appendChild(tempElement);\n\n\t\t// Выделяем текст\n\t\tconst selection = window.getSelection();\n\t\tconst range = document.createRange();\n\t\trange.selectNodeContents(tempElement);\n\t\tselection?.removeAllRanges();\n\t\tselection?.addRange(range);\n\n\t\t// Пытаемся скопировать через современный API\n\t\tconst success = document.execCommand(\"copy\"); // Это пока оставляем, но с try/catch\n\t\tselection?.removeAllRanges();\n\t\tdocument.body.removeChild(tempElement);\n\n\t\treturn success;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport const useCopyText = () => {\n\tconst copyToClipboard = useCallback(async (text: string): Promise<boolean> => {\n\t\tif (!text.trim()) return false;\n\n\t\ttry {\n\t\t\t// Современный API\n\t\t\tif (navigator.clipboard && window.isSecureContext) {\n\t\t\t\tawait navigator.clipboard.writeText(text);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// Fallback для старых браузеров\n\t\t\t\treturn await clipboardFallback(text);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error(\"Failed to copy text:\", err);\n\t\t\treturn false;\n\t\t}\n\t}, []);\n\n\treturn { copyToClipboard };\n};\n","import { RefObject, useCallback } from \"react\";\n\nexport const useElementText = <T extends HTMLElement = HTMLElement>(ref: RefObject<T | null>) => {\n\tconst getElementText = useCallback((): string => {\n\t\treturn ref.current?.textContent?.trim() || \"\";\n\t}, [ref]);\n\n\treturn { getElementText };\n};\n","import { useCallback, useRef } from \"react\";\n\nimport { useCopyText } from \"./useCopyText\";\nimport { useElementText } from \"./useElementText\";\n\nexport const useCopyElementText = <T extends HTMLElement = HTMLElement>() => {\n\tconst containerRef = useRef<T>(null);\n\tconst { copyToClipboard } = useCopyText();\n\tconst { getElementText } = useElementText(containerRef);\n\n\tconst copyElementText = useCallback(async (): Promise<boolean> => {\n\t\tconst text = getElementText();\n\t\tif (!text) return false;\n\n\t\treturn await copyToClipboard(text);\n\t}, [getElementText, copyToClipboard]);\n\n\treturn {\n\t\tcontainerRef,\n\t\tcopyElementText,\n\t\tgetElementText\n\t};\n};\n","import { useCallback, useState } from \"react\";\n\nimport { useCopyElementText } from \"./useCopyElementText\";\n\nconst COPY_FEEDBACK_DURATION_MS = 2_000;\n\nexport const useCopyFeedback = () => {\n\tconst [isCopied, setIsCopied] = useState(false);\n\n\tconst showFeedback = useCallback(() => {\n\t\tsetIsCopied(true);\n\t\tconst timer = setTimeout(() => setIsCopied(false), COPY_FEEDBACK_DURATION_MS);\n\t\treturn () => clearTimeout(timer);\n\t}, []);\n\n\treturn { isCopied, showFeedback };\n};\n\n// Обновленный useCopyElementText с фидбэком\nexport const useCopyElementTextWithFeedback = <T extends HTMLElement = HTMLElement>() => {\n\tconst { containerRef, copyElementText, getElementText } = useCopyElementText<T>();\n\tconst { isCopied, showFeedback } = useCopyFeedback();\n\n\tconst copyWithFeedback = useCallback(async (): Promise<boolean> => {\n\t\tconst success = await copyElementText();\n\t\tif (success) {\n\t\t\tshowFeedback();\n\t\t}\n\t\treturn success;\n\t}, [copyElementText, showFeedback]);\n\n\treturn {\n\t\tcontainerRef,\n\t\tcopyElementText: copyWithFeedback,\n\t\tgetElementText,\n\t\tisCopied\n\t};\n};\n"],"mappings":";;AAEA,IAAM,IAAoB,OAAO,MAAmC;CACnE,IAAI;EAEH,IAAM,IAAc,SAAS,cAAc,KAAK;EAOhD,AANA,EAAY,kBAAkB,QAC9B,EAAY,MAAM,WAAW,SAC7B,EAAY,MAAM,UAAU,KAC5B,EAAY,MAAM,gBAAgB,QAClC,EAAY,cAAc,GAE1B,SAAS,KAAK,YAAY,CAAW;EAGrC,IAAM,IAAY,OAAO,aAAa,GAChC,IAAQ,SAAS,YAAY;EAGnC,AAFA,EAAM,mBAAmB,CAAW,GACpC,GAAW,gBAAgB,GAC3B,GAAW,SAAS,CAAK;EAGzB,IAAM,IAAU,SAAS,YAAY,MAAM;EAI3C,OAHA,GAAW,gBAAgB,GAC3B,SAAS,KAAK,YAAY,CAAW,GAE9B;CACR,QAAQ;EACP,OAAO;CACR;AACD,GAEa,WAmBL,EAAE,iBAlBe,EAAY,OAAO,MAAmC;CAC7E,IAAI,CAAC,EAAK,KAAK,GAAG,OAAO;CAEzB,IAAI;EAOF,OALG,UAAU,aAAa,OAAO,mBACjC,MAAM,UAAU,UAAU,UAAU,CAAI,GACjC,MAGA,MAAM,EAAkB,CAAI;CAErC,SAAS,GAAK;EAEb,OADA,QAAQ,MAAM,wBAAwB,CAAG,GAClC;CACR;AACD,GAAG,CAAC,CAEK,EAAgB,ICjDb,KAAuD,OAK5D,EAAE,gBAJc,QACf,EAAI,SAAS,aAAa,KAAK,KAAK,IACzC,CAAC,CAAG,CAEE,EAAe,ICFZ,UAAgE;CAC5E,IAAM,IAAe,EAAU,IAAI,GAC7B,EAAE,uBAAoB,EAAY,GAClC,EAAE,sBAAmB,EAAe,CAAY;CAStD,OAAO;EACN;EACA,iBATuB,EAAY,YAA8B;GACjE,IAAM,IAAO,EAAe;GAG5B,OAFK,IAEE,MAAM,EAAgB,CAAI,IAFf;EAGnB,GAAG,CAAC,GAAgB,CAAe,CAIlC;EACA;CACD;AACD,GClBM,IAA4B,KAErB,UAAwB;CACpC,IAAM,CAAC,GAAU,KAAe,EAAS,EAAK;CAQ9C,OAAO;EAAE;EAAU,cANE,QAAkB;GACtC,EAAY,EAAI;GAChB,IAAM,IAAQ,iBAAiB,EAAY,EAAK,GAAG,CAAyB;GAC5E,aAAa,aAAa,CAAK;EAChC,GAAG,CAAC,CAEe;CAAa;AACjC,GAGa,UAA4E;CACxF,IAAM,EAAE,iBAAc,oBAAiB,sBAAmB,EAAsB,GAC1E,EAAE,aAAU,oBAAiB,EAAgB;CAUnD,OAAO;EACN;EACA,iBAVwB,EAAY,YAA8B;GAClE,IAAM,IAAU,MAAM,EAAgB;GAItC,OAHI,KACH,EAAa,GAEP;EACR,GAAG,CAAC,GAAiB,CAAY,CAIf;EACjB;EACA;CACD;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCopyFeedback.d.ts","sourceRoot":"","sources":["../../src/copy/useCopyFeedback.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCopyFeedback.d.ts","sourceRoot":"","sources":["../../src/copy/useCopyFeedback.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;;;CAU3B,CAAC;AAGF,eAAO,MAAM,8BAA8B,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW;;2BAIlC,OAAO,CAAC,OAAO,CAAC;;;CAc/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashString.d.ts","sourceRoot":"","sources":["../../src/crypto/hashString.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hashString.d.ts","sourceRoot":"","sources":["../../src/crypto/hashString.ts"],"names":[],"mappings":"AAoBA,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAYhD;AA8BD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CASnD;AAeD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAI5D;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,SAAQ,GAAG,MAAM,CAEvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hexadecimalConstants.d.ts","sourceRoot":"","sources":["../../src/crypto/hexadecimalConstants.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,KAAK,CAAC"}
|
package/dist/crypto/index.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { t as e } from "../chunks/uuid-
|
|
1
|
+
import { t as e } from "../chunks/uuid-izDzLv18.js";
|
|
2
2
|
//#region src/crypto/hashString.ts
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
var t = 2166136261, n = 36, r = 8, i = "0", a = 3735928559, o = 1103547991, s = 3235826430, c = 305419896, l = 2654435761, u = 1597334677, d = 2246822507, f = 3266489909, p = 597399067, m = 2869860233, h = 951274213, g = 2716044179;
|
|
4
|
+
function _(e) {
|
|
5
|
+
let r = t;
|
|
6
|
+
for (let t = 0; t < e.length; t++) r ^= e.charCodeAt(t), r += (r << 1) + (r << 4) + (r << 7) + (r << 8) + (r << 24);
|
|
7
|
+
return (r >>> 0).toString(n);
|
|
7
8
|
}
|
|
8
|
-
function
|
|
9
|
-
let t =
|
|
9
|
+
function v(e) {
|
|
10
|
+
let t = a ^ e.length, n = o ^ e.length, r = s ^ e.length, i = c ^ e.length;
|
|
10
11
|
for (let a = 0; a < e.length; a++) {
|
|
11
12
|
let o = e.charCodeAt(a);
|
|
12
|
-
t = Math.imul(t ^ o,
|
|
13
|
+
t = Math.imul(t ^ o, l), n = Math.imul(n ^ o, u), r = Math.imul(r ^ o, d), i = Math.imul(i ^ o, f);
|
|
13
14
|
}
|
|
14
|
-
return t = Math.imul(r ^ t >>> 18,
|
|
15
|
+
return t = Math.imul(r ^ t >>> 18, p), n = Math.imul(i ^ n >>> 22, m), r = Math.imul(t ^ r >>> 17, h), i = Math.imul(n ^ i >>> 19, g), [
|
|
15
16
|
(t ^ n ^ r ^ i) >>> 0,
|
|
16
17
|
(n ^ t) >>> 0,
|
|
17
18
|
(r ^ t) >>> 0,
|
|
18
19
|
(i ^ t) >>> 0
|
|
19
20
|
];
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
let t =
|
|
23
|
-
return t[0].toString(16).padStart(
|
|
22
|
+
function y(e) {
|
|
23
|
+
let t = v(e);
|
|
24
|
+
return t[0].toString(16).padStart(r, i) + t[1].toString(16).padStart(r, i) + t[2].toString(16).padStart(r, i) + t[3].toString(16).padStart(r, i);
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function b(e) {
|
|
26
27
|
return [
|
|
27
28
|
e >>> 24 & 255,
|
|
28
29
|
e >>> 16 & 255,
|
|
@@ -30,24 +31,24 @@ function i(e) {
|
|
|
30
31
|
e & 255
|
|
31
32
|
];
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
+
function x(e) {
|
|
34
35
|
let t = "";
|
|
35
36
|
for (let n = 0; n < e.length; n++) t += String.fromCharCode(e[n]);
|
|
36
37
|
return btoa(t).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, "");
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
-
let t =
|
|
40
|
-
return
|
|
41
|
-
...
|
|
42
|
-
...
|
|
43
|
-
...
|
|
44
|
-
...
|
|
39
|
+
function S(e) {
|
|
40
|
+
let t = v(e);
|
|
41
|
+
return x([
|
|
42
|
+
...b(t[0]),
|
|
43
|
+
...b(t[1]),
|
|
44
|
+
...b(t[2]),
|
|
45
|
+
...b(t[3])
|
|
45
46
|
]);
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
-
return `${t}-${
|
|
48
|
+
function C(e, t = "row") {
|
|
49
|
+
return `${t}-${S(e)}`;
|
|
49
50
|
}
|
|
50
51
|
//#endregion
|
|
51
|
-
export {
|
|
52
|
+
export { _ as hashString, y as hashString128, S as hashString128Base64Url, C as stringToElementId, e as uuidv4 };
|
|
52
53
|
|
|
53
54
|
//# sourceMappingURL=index.js.map
|
package/dist/crypto/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/crypto/hashString.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/crypto/hashString.ts"],"sourcesContent":["import { HEXADECIMAL_RADIX } from \"./hexadecimalConstants\";\n\n// Эти параметры закрепляют существующее детерминированное представление hash и ID.\nconst FNV1A_OFFSET_BASIS = 0x811c9dc5;\nconst HASH_STRING_RADIX = 36;\nconst HASH128_WORD_HEX_WIDTH = 8;\nconst HASH128_HEX_PADDING = \"0\";\nconst HASH128_INITIAL_SEED_1 = 0xdeadbeef;\nconst HASH128_INITIAL_SEED_2 = 0x41c6ce57;\nconst HASH128_INITIAL_SEED_3 = 0xc0decafe;\nconst HASH128_INITIAL_SEED_4 = 0x12345678;\nconst HASH128_CHARACTER_MULTIPLIER_1 = 2654435761;\nconst HASH128_CHARACTER_MULTIPLIER_2 = 1597334677;\nconst HASH128_CHARACTER_MULTIPLIER_3 = 2246822507;\nconst HASH128_CHARACTER_MULTIPLIER_4 = 3266489909;\nconst HASH128_FINAL_MULTIPLIER_1 = 597399067;\nconst HASH128_FINAL_MULTIPLIER_2 = 2869860233;\nconst HASH128_FINAL_MULTIPLIER_3 = 951274213;\nconst HASH128_FINAL_MULTIPLIER_4 = 2716044179;\n\nexport function hashString(input: string): string {\n\tlet hash = FNV1A_OFFSET_BASIS;\n\n\tfor (let i = 0; i < input.length; i++) {\n\t\thash ^= input.charCodeAt(i);\n\n\t\t// FNV-1a 32-bit\n\t\thash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24);\n\t}\n\n\t// unsigned 32-bit -> compact string\n\treturn (hash >>> 0).toString(HASH_STRING_RADIX);\n}\n\nfunction hashString128Base(input: string) {\n\tlet h1 = HASH128_INITIAL_SEED_1 ^ input.length;\n\tlet h2 = HASH128_INITIAL_SEED_2 ^ input.length;\n\tlet h3 = HASH128_INITIAL_SEED_3 ^ input.length;\n\tlet h4 = HASH128_INITIAL_SEED_4 ^ input.length;\n\n\tfor (let i = 0; i < input.length; i++) {\n\t\tconst ch = input.charCodeAt(i);\n\n\t\th1 = Math.imul(h1 ^ ch, HASH128_CHARACTER_MULTIPLIER_1);\n\t\th2 = Math.imul(h2 ^ ch, HASH128_CHARACTER_MULTIPLIER_2);\n\t\th3 = Math.imul(h3 ^ ch, HASH128_CHARACTER_MULTIPLIER_3);\n\t\th4 = Math.imul(h4 ^ ch, HASH128_CHARACTER_MULTIPLIER_4);\n\t}\n\n\th1 = Math.imul(h3 ^ (h1 >>> 18), HASH128_FINAL_MULTIPLIER_1);\n\th2 = Math.imul(h4 ^ (h2 >>> 22), HASH128_FINAL_MULTIPLIER_2);\n\th3 = Math.imul(h1 ^ (h3 >>> 17), HASH128_FINAL_MULTIPLIER_3);\n\th4 = Math.imul(h2 ^ (h4 >>> 19), HASH128_FINAL_MULTIPLIER_4);\n\n\tconst p1 = (h1 ^ h2 ^ h3 ^ h4) >>> 0;\n\tconst p2 = (h2 ^ h1) >>> 0;\n\tconst p3 = (h3 ^ h1) >>> 0;\n\tconst p4 = (h4 ^ h1) >>> 0;\n\n\treturn [p1, p2, p3, p4];\n}\n\nexport function hashString128(input: string): string {\n\tconst p = hashString128Base(input);\n\n\treturn (\n\t\tp[0].toString(HEXADECIMAL_RADIX).padStart(HASH128_WORD_HEX_WIDTH, HASH128_HEX_PADDING) +\n\t\tp[1].toString(HEXADECIMAL_RADIX).padStart(HASH128_WORD_HEX_WIDTH, HASH128_HEX_PADDING) +\n\t\tp[2].toString(HEXADECIMAL_RADIX).padStart(HASH128_WORD_HEX_WIDTH, HASH128_HEX_PADDING) +\n\t\tp[3].toString(HEXADECIMAL_RADIX).padStart(HASH128_WORD_HEX_WIDTH, HASH128_HEX_PADDING)\n\t);\n}\n\nfunction uint32ToBytes(value: number): number[] {\n\treturn [(value >>> 24) & 0xff, (value >>> 16) & 0xff, (value >>> 8) & 0xff, value & 0xff];\n}\n\nfunction bytesToBase64Url(bytes: number[]): string {\n\tlet binary = \"\";\n\tfor (let i = 0; i < bytes.length; i++) {\n\t\tbinary += String.fromCharCode(bytes[i]);\n\t}\n\n\treturn btoa(binary).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=+$/g, \"\");\n}\n\nexport function hashString128Base64Url(input: string): string {\n\tconst p = hashString128Base(input);\n\n\treturn bytesToBase64Url([...uint32ToBytes(p[0]), ...uint32ToBytes(p[1]), ...uint32ToBytes(p[2]), ...uint32ToBytes(p[3])]);\n}\n\nexport function stringToElementId(input: string, prefix = \"row\"): string {\n\treturn `${prefix}-${hashString128Base64Url(input)}`;\n}\n"],"mappings":";;AAGA,IAAM,IAAqB,YACrB,IAAoB,IACpB,IAAyB,GACzB,IAAsB,KACtB,IAAyB,YACzB,IAAyB,YACzB,IAAyB,YACzB,IAAyB,WACzB,IAAiC,YACjC,IAAiC,YACjC,IAAiC,YACjC,IAAiC,YACjC,IAA6B,WAC7B,IAA6B,YAC7B,IAA6B,WAC7B,IAA6B;AAEnC,SAAgB,EAAW,GAAuB;CACjD,IAAI,IAAO;CAEX,KAAK,IAAI,IAAI,GAAG,IAAI,EAAM,QAAQ,KAIjC,AAHA,KAAQ,EAAM,WAAW,CAAC,GAG1B,MAAS,KAAQ,MAAM,KAAQ,MAAM,KAAQ,MAAM,KAAQ,MAAM,KAAQ;CAI1E,QAAQ,MAAS,EAAA,CAAG,SAAS,CAAiB;AAC/C;AAEA,SA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AAK,IAAI,IAAI,GAAG,IAAI,EAAM,QAAQ,KACjC,KAAU,OAAO,aAAa,EAAM,EAAE;CAGvC,OAAO,KAAK,CAAM,CAAC,CAAC,QAAQ,OAAO,GAAG,CAAC,CAAC,QAAQ,OAAO,GAAG,CAAC,CAAC,QAAQ,QAAQ,EAAE;AAC/E;AAEA,SAAgB,EAAuB,GAAuB;CAC7D,IAAM,IAAI,EAAkB,CAAK;CAEjC,OAAO,EAAiB;EAAC,GAAG,EAAc,EAAE,EAAE;EAAG,GAAG,EAAc,EAAE,EAAE;EAAG,GAAG,EAAc,EAAE,EAAE;EAAG,GAAG,EAAc,EAAE,EAAE;CAAC,CAAC;AACzH;AAEA,SAAgB,EAAkB,GAAe,IAAS,OAAe;CACxE,OAAO,GAAG,EAAO,GAAG,EAAuB,CAAK;AACjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/crypto/uuid.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/crypto/uuid.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,wBAAgB,MAAM,IAAI,MAAM,CAwC/B"}
|
|
@@ -1,160 +1,160 @@
|
|
|
1
1
|
//#region src/date-segments/mask.ts
|
|
2
|
-
var e = {
|
|
2
|
+
var e = "year", t = "month", n = "day", r = "hours", i = "minutes", a = "seconds", o = "editable", s = "Год", c = "День", l = "Часы", u = "чч", d = 9999, f = 99, p = 12, m = 31, h = 23, g = 59, _ = 59, v = {
|
|
3
3
|
YYYY: {
|
|
4
|
-
id:
|
|
4
|
+
id: e,
|
|
5
5
|
length: 4,
|
|
6
6
|
min: 1,
|
|
7
|
-
max:
|
|
7
|
+
max: d,
|
|
8
8
|
placeholder: "ГГГГ",
|
|
9
|
-
ariaLabel:
|
|
9
|
+
ariaLabel: s
|
|
10
10
|
},
|
|
11
11
|
yyyy: {
|
|
12
|
-
id:
|
|
12
|
+
id: e,
|
|
13
13
|
length: 4,
|
|
14
14
|
min: 1,
|
|
15
|
-
max:
|
|
15
|
+
max: d,
|
|
16
16
|
placeholder: "гггг",
|
|
17
|
-
ariaLabel:
|
|
17
|
+
ariaLabel: s
|
|
18
18
|
},
|
|
19
19
|
yy: {
|
|
20
|
-
id:
|
|
20
|
+
id: e,
|
|
21
21
|
length: 2,
|
|
22
22
|
min: 0,
|
|
23
|
-
max:
|
|
23
|
+
max: f,
|
|
24
24
|
placeholder: "гг",
|
|
25
|
-
ariaLabel:
|
|
25
|
+
ariaLabel: s
|
|
26
26
|
},
|
|
27
27
|
MM: {
|
|
28
|
-
id:
|
|
28
|
+
id: t,
|
|
29
29
|
length: 2,
|
|
30
30
|
min: 1,
|
|
31
|
-
max:
|
|
31
|
+
max: p,
|
|
32
32
|
placeholder: "мм",
|
|
33
33
|
ariaLabel: "Месяц"
|
|
34
34
|
},
|
|
35
35
|
DD: {
|
|
36
|
-
id:
|
|
36
|
+
id: n,
|
|
37
37
|
length: 2,
|
|
38
38
|
min: 1,
|
|
39
|
-
max:
|
|
39
|
+
max: m,
|
|
40
40
|
placeholder: "ДД",
|
|
41
|
-
ariaLabel:
|
|
41
|
+
ariaLabel: c
|
|
42
42
|
},
|
|
43
43
|
dd: {
|
|
44
|
-
id:
|
|
44
|
+
id: n,
|
|
45
45
|
length: 2,
|
|
46
46
|
min: 1,
|
|
47
|
-
max:
|
|
47
|
+
max: m,
|
|
48
48
|
placeholder: "дд",
|
|
49
|
-
ariaLabel:
|
|
49
|
+
ariaLabel: c
|
|
50
50
|
},
|
|
51
51
|
hh: {
|
|
52
|
-
id:
|
|
52
|
+
id: r,
|
|
53
53
|
length: 2,
|
|
54
54
|
min: 0,
|
|
55
|
-
max:
|
|
56
|
-
placeholder:
|
|
57
|
-
ariaLabel:
|
|
55
|
+
max: h,
|
|
56
|
+
placeholder: u,
|
|
57
|
+
ariaLabel: l
|
|
58
58
|
},
|
|
59
59
|
HH: {
|
|
60
|
-
id:
|
|
60
|
+
id: r,
|
|
61
61
|
length: 2,
|
|
62
62
|
min: 0,
|
|
63
|
-
max:
|
|
64
|
-
placeholder:
|
|
65
|
-
ariaLabel:
|
|
63
|
+
max: h,
|
|
64
|
+
placeholder: u,
|
|
65
|
+
ariaLabel: l
|
|
66
66
|
},
|
|
67
67
|
mm: {
|
|
68
|
-
id:
|
|
68
|
+
id: i,
|
|
69
69
|
length: 2,
|
|
70
70
|
min: 0,
|
|
71
|
-
max:
|
|
71
|
+
max: g,
|
|
72
72
|
placeholder: "мм",
|
|
73
73
|
ariaLabel: "Минуты"
|
|
74
74
|
},
|
|
75
75
|
ss: {
|
|
76
|
-
id:
|
|
76
|
+
id: a,
|
|
77
77
|
length: 2,
|
|
78
78
|
min: 0,
|
|
79
|
-
max:
|
|
79
|
+
max: _,
|
|
80
80
|
placeholder: "сс",
|
|
81
81
|
ariaLabel: "Секунды"
|
|
82
82
|
}
|
|
83
|
-
},
|
|
84
|
-
function
|
|
85
|
-
let
|
|
86
|
-
|
|
83
|
+
}, y = Object.keys(v).sort((e, t) => t.length - e.length);
|
|
84
|
+
function b(e) {
|
|
85
|
+
let t = [], n = 0, r = "", i = () => {
|
|
86
|
+
r &&= (t.push({
|
|
87
87
|
kind: "literal",
|
|
88
|
-
text:
|
|
88
|
+
text: r
|
|
89
89
|
}), "");
|
|
90
90
|
};
|
|
91
|
-
for (;
|
|
92
|
-
let
|
|
93
|
-
for (let
|
|
94
|
-
|
|
91
|
+
for (; n < e.length;) {
|
|
92
|
+
let a = null;
|
|
93
|
+
for (let t of y) if (e.slice(n, n + t.length) === t) {
|
|
94
|
+
a = t;
|
|
95
95
|
break;
|
|
96
96
|
}
|
|
97
|
-
if (!
|
|
98
|
-
|
|
97
|
+
if (!a) {
|
|
98
|
+
r += e[n], n += 1;
|
|
99
99
|
continue;
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
kind:
|
|
103
|
-
token:
|
|
104
|
-
...
|
|
105
|
-
}),
|
|
101
|
+
i(), t.push({
|
|
102
|
+
kind: o,
|
|
103
|
+
token: a,
|
|
104
|
+
...v[a]
|
|
105
|
+
}), n += a.length;
|
|
106
106
|
}
|
|
107
|
-
return
|
|
107
|
+
return i(), t;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
return e.kind ===
|
|
109
|
+
function x(e) {
|
|
110
|
+
return e.kind === o;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function S(e, t) {
|
|
113
113
|
let n = /* @__PURE__ */ new Map();
|
|
114
|
-
return t.forEach((t,
|
|
115
|
-
if (!
|
|
114
|
+
return t.forEach((t, r) => {
|
|
115
|
+
if (!x(t)) return;
|
|
116
116
|
if (!(e instanceof Date) || Number.isNaN(e.getTime())) {
|
|
117
|
-
n.set(
|
|
117
|
+
n.set(r, "");
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
|
-
let
|
|
121
|
-
n.set(
|
|
120
|
+
let i = T(e, t);
|
|
121
|
+
n.set(r, i);
|
|
122
122
|
}), n;
|
|
123
123
|
}
|
|
124
|
-
function
|
|
125
|
-
return e.every((e, n) => !
|
|
124
|
+
function C(e, t) {
|
|
125
|
+
return e.every((e, n) => !x(e) || !(t.get(n) ?? ""));
|
|
126
126
|
}
|
|
127
|
-
function o
|
|
128
|
-
let
|
|
127
|
+
function w(o, s, c) {
|
|
128
|
+
let l = o.map((e, t) => ({
|
|
129
129
|
segment: e,
|
|
130
130
|
index: t
|
|
131
|
-
})).filter((e) =>
|
|
132
|
-
for (let { segment: e, index:
|
|
133
|
-
let
|
|
134
|
-
if (
|
|
135
|
-
let
|
|
136
|
-
return
|
|
131
|
+
})).filter((e) => x(e.segment));
|
|
132
|
+
for (let { segment: e, index: t } of l) if ((s.get(t) ?? "").length < e.length) return null;
|
|
133
|
+
let u = c?.defaultDate ?? new Date(1970, 0, 1, 0, 0, 0, 0), d = E(l, s, e) ?? u.getFullYear(), f = E(l, s, t) ?? u.getMonth() + 1, v = E(l, s, n) ?? u.getDate(), y = E(l, s, r) ?? u.getHours(), b = E(l, s, i) ?? u.getMinutes(), S = E(l, s, a) ?? u.getSeconds();
|
|
134
|
+
if (f < 1 || f > p || v < 1 || v > m || y < 0 || y > h || b < 0 || b > g || S < 0 || S > _) return null;
|
|
135
|
+
let C = new Date(d, f - 1, v, y, b, S, 0);
|
|
136
|
+
return C.getFullYear() === d && C.getMonth() === f - 1 && C.getDate() === v && C.getHours() === y && C.getMinutes() === b && C.getSeconds() === S ? C : null;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
let
|
|
140
|
-
switch (
|
|
141
|
-
case
|
|
142
|
-
case
|
|
143
|
-
case
|
|
144
|
-
case
|
|
145
|
-
case
|
|
146
|
-
case
|
|
138
|
+
function T(o, s) {
|
|
139
|
+
let c = String(o.getFullYear());
|
|
140
|
+
switch (s.id) {
|
|
141
|
+
case e: return s.length === 2 ? c.slice(-2) : c.padStart(s.length, "0");
|
|
142
|
+
case t: return String(o.getMonth() + 1).padStart(s.length, "0");
|
|
143
|
+
case n: return String(o.getDate()).padStart(s.length, "0");
|
|
144
|
+
case r: return String(o.getHours()).padStart(s.length, "0");
|
|
145
|
+
case i: return String(o.getMinutes()).padStart(s.length, "0");
|
|
146
|
+
case a: return String(o.getSeconds()).padStart(s.length, "0");
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
let
|
|
151
|
-
if (!r) return null;
|
|
152
|
-
let i = t.get(r.index);
|
|
149
|
+
function E(t, n, r) {
|
|
150
|
+
let i = t.find(({ segment: e }) => e.id === r);
|
|
153
151
|
if (!i) return null;
|
|
154
|
-
let a =
|
|
155
|
-
|
|
152
|
+
let a = n.get(i.index);
|
|
153
|
+
if (!a) return null;
|
|
154
|
+
let o = Number.parseInt(a, 10);
|
|
155
|
+
return Number.isFinite(o) ? r === e && i.segment.length === 2 ? o < 70 ? 2e3 + o : 1900 + o : o : null;
|
|
156
156
|
}
|
|
157
157
|
//#endregion
|
|
158
|
-
export {
|
|
158
|
+
export { C as areAllDateSegmentsEmpty, S as dateToIndexedSegmentValues, w as indexedSegmentsToDate, x as isEditableDateSegment, b as parseDateSegmentMask };
|
|
159
159
|
|
|
160
160
|
//# sourceMappingURL=index.js.map
|