@ryuzaki13/react-foundation-lib 2.31.0 → 2.31.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -5
- package/dist/analytical-table/definition/analyticalDefinitionConstants.d.ts +17 -0
- package/dist/analytical-table/definition/analyticalDefinitionConstants.d.ts.map +1 -0
- package/dist/analytical-table/definition/compileAnalyticalTableDefinition.d.ts.map +1 -1
- package/dist/analytical-table/definition/types.d.ts +6 -5
- package/dist/analytical-table/definition/types.d.ts.map +1 -1
- package/dist/analytical-table/dynamic-columns/analyticalDateColumnConstants.d.ts +7 -0
- package/dist/analytical-table/dynamic-columns/analyticalDateColumnConstants.d.ts.map +1 -0
- package/dist/analytical-table/dynamic-columns/dateColumns.d.ts.map +1 -1
- package/dist/analytical-table/dynamic-columns/types.d.ts +2 -1
- package/dist/analytical-table/dynamic-columns/types.d.ts.map +1 -1
- package/dist/analytical-table/index.js +124 -113
- package/dist/analytical-table/index.js.map +1 -1
- package/dist/analytical-table/projections/analyticalExportConstants.d.ts +7 -0
- package/dist/analytical-table/projections/analyticalExportConstants.d.ts.map +1 -0
- package/dist/analytical-table/projections/expansion.d.ts +2 -1
- package/dist/analytical-table/projections/expansion.d.ts.map +1 -1
- package/dist/analytical-table/projections/exportProjection.d.ts.map +1 -1
- package/dist/analytical-table/projections/types.d.ts +3 -2
- package/dist/analytical-table/projections/types.d.ts.map +1 -1
- package/dist/analytical-table/runtime/aggregation.d.ts.map +1 -1
- package/dist/analytical-table/runtime/analyticalRowConstants.d.ts +4 -0
- package/dist/analytical-table/runtime/analyticalRowConstants.d.ts.map +1 -0
- package/dist/analytical-table/runtime/analyticalViewConstants.d.ts +16 -0
- package/dist/analytical-table/runtime/analyticalViewConstants.d.ts.map +1 -0
- package/dist/analytical-table/runtime/buildGroupedModel.d.ts.map +1 -1
- package/dist/analytical-table/runtime/filtering.d.ts.map +1 -1
- package/dist/analytical-table/runtime/grouping.d.ts.map +1 -1
- package/dist/analytical-table/runtime/hierarchy.d.ts +2 -1
- package/dist/analytical-table/runtime/hierarchy.d.ts.map +1 -1
- package/dist/analytical-table/runtime/totals.d.ts +2 -2
- package/dist/analytical-table/runtime/totals.d.ts.map +1 -1
- package/dist/analytical-table/runtime/types.d.ts +5 -3
- package/dist/analytical-table/runtime/types.d.ts.map +1 -1
- package/dist/analytical-table/runtime/valueComparison.d.ts.map +1 -1
- package/dist/array/index.js +1 -1
- package/dist/array/reorder.d.ts +6 -1
- package/dist/array/reorder.d.ts.map +1 -1
- package/dist/async-task-runner/createCoalescingTaskRunner.d.ts.map +1 -1
- package/dist/async-task-runner/createDeadlineTimer.d.ts.map +1 -1
- package/dist/async-task-runner/index.js +39 -36
- package/dist/async-task-runner/index.js.map +1 -1
- package/dist/async-task-runner/nativeTimerConstants.d.ts +3 -0
- package/dist/async-task-runner/nativeTimerConstants.d.ts.map +1 -0
- package/dist/binary/base64Constants.d.ts +6 -0
- package/dist/binary/base64Constants.d.ts.map +1 -0
- package/dist/binary/binaryToBlob.d.ts.map +1 -1
- package/dist/binary/getBase64DecodedSize.d.ts.map +1 -1
- package/dist/binary/index.js +95 -70
- package/dist/binary/index.js.map +1 -1
- package/dist/browser-notifications/browserNotificationConstants.d.ts +3 -0
- package/dist/browser-notifications/browserNotificationConstants.d.ts.map +1 -0
- package/dist/browser-notifications/browserNotificationTypes.d.ts +2 -1
- package/dist/browser-notifications/browserNotificationTypes.d.ts.map +1 -1
- package/dist/browser-notifications/createBrowserNotificationPresenter.d.ts.map +1 -1
- package/dist/browser-notifications/index.js +38 -37
- package/dist/browser-notifications/index.js.map +1 -1
- package/dist/chunks/{array-D-_yMMUK.js → array-bd7LYFto.js} +1 -3
- package/dist/chunks/{array-D-_yMMUK.js.map → array-bd7LYFto.js.map} +1 -1
- package/dist/chunks/{dom-BK22UmgF.js → dom-ZSeWZ0Gg.js} +103 -98
- package/dist/chunks/dom-ZSeWZ0Gg.js.map +1 -0
- package/dist/chunks/formatDate-CNPcfNte.js +133 -0
- package/dist/chunks/formatDate-CNPcfNte.js.map +1 -0
- package/dist/chunks/{formatters-CZnnbdud.js → formatters-CO40zvVB.js} +496 -496
- package/dist/chunks/formatters-CO40zvVB.js.map +1 -0
- package/dist/chunks/{formulas-BXT_XBWI.js → formulas-Y0HOcFhe.js} +90 -86
- package/dist/chunks/formulas-Y0HOcFhe.js.map +1 -0
- package/dist/chunks/hasSignatureBytes-D2wO_Myl.js +11 -0
- package/dist/chunks/hasSignatureBytes-D2wO_Myl.js.map +1 -0
- package/dist/chunks/keyboardConstants-BZKskWsm.js +6 -0
- package/dist/chunks/keyboardConstants-BZKskWsm.js.map +1 -0
- package/dist/chunks/media-imBOXWwa.js +192 -0
- package/dist/chunks/media-imBOXWwa.js.map +1 -0
- package/dist/chunks/mimeTypeConstants-BzONV-b1.js +6 -0
- package/dist/chunks/mimeTypeConstants-BzONV-b1.js.map +1 -0
- package/dist/chunks/{query-client-CVRfrYZM.js → query-client-D0HQZ84w.js} +142 -142
- package/dist/chunks/query-client-D0HQZ84w.js.map +1 -0
- package/dist/chunks/scalarTypeClassification-D4YcGxtQ.js +766 -0
- package/dist/chunks/scalarTypeClassification-D4YcGxtQ.js.map +1 -0
- package/dist/chunks/scalarTypeConstants-CnSsjpGO.js +6 -0
- package/dist/chunks/scalarTypeConstants-CnSsjpGO.js.map +1 -0
- package/dist/chunks/utils-DW0Yso1Q.js +210 -0
- package/dist/chunks/utils-DW0Yso1Q.js.map +1 -0
- package/dist/chunks/{uuid-CUJPAbRY.js → uuid-izDzLv18.js} +1 -2
- package/dist/chunks/uuid-izDzLv18.js.map +1 -0
- package/dist/chunks/validate-8URYKKly.js +613 -0
- package/dist/chunks/validate-8URYKKly.js.map +1 -0
- package/dist/copy/index.js +5 -5
- package/dist/copy/index.js.map +1 -1
- package/dist/copy/useCopyFeedback.d.ts.map +1 -1
- package/dist/crypto/hashString.d.ts.map +1 -1
- package/dist/crypto/hexadecimalConstants.d.ts +3 -0
- package/dist/crypto/hexadecimalConstants.d.ts.map +1 -0
- package/dist/crypto/index.js +25 -24
- package/dist/crypto/index.js.map +1 -1
- package/dist/crypto/uuid.d.ts.map +1 -1
- package/dist/date-segments/index.js +81 -81
- package/dist/date-segments/index.js.map +1 -1
- package/dist/date-segments/mask.d.ts +13 -3
- package/dist/date-segments/mask.d.ts.map +1 -1
- package/dist/decimal/decimalConstants.d.ts +3 -0
- package/dist/decimal/decimalConstants.d.ts.map +1 -0
- package/dist/decimal/index.js +0 -2
- package/dist/decimal/index.js.map +1 -1
- package/dist/decimal/normalizeDecimal.d.ts.map +1 -1
- package/dist/decimal/normalizeDecimalLiteral.d.ts.map +1 -1
- package/dist/decimal/resolveDecimalMaxLength.d.ts.map +1 -1
- package/dist/decimal/sumDecimals.d.ts.map +1 -1
- package/dist/decimal/writeDecimalParts.d.ts.map +1 -1
- package/dist/dom/document-scroll/acquireDocumentScrollLock.d.ts.map +1 -1
- package/dist/dom/document-scroll/attachDocumentTouchScrollGuard.d.ts.map +1 -1
- package/dist/dom/document-scroll/canConsumeVerticalTouchScroll.d.ts.map +1 -1
- package/dist/dom/domEventConstants.d.ts +4 -0
- package/dist/dom/domEventConstants.d.ts.map +1 -0
- package/dist/dom/domScrollConstants.d.ts +3 -0
- package/dist/dom/domScrollConstants.d.ts.map +1 -0
- package/dist/dom/index.js +1 -1
- package/dist/dom/installFaviconOverride.d.ts.map +1 -1
- package/dist/dom/overlayFocusConstants.d.ts +4 -0
- package/dist/dom/overlayFocusConstants.d.ts.map +1 -0
- package/dist/dom/scroll-anchor/captureScrollAnchor.d.ts.map +1 -1
- package/dist/dom/useClickOutside.d.ts +1 -1
- package/dist/dom/useClickOutside.d.ts.map +1 -1
- package/dist/dom/useEscapeDismiss.d.ts +1 -1
- package/dist/dom/useEscapeDismiss.d.ts.map +1 -1
- package/dist/dom/useFocusTrap.d.ts.map +1 -1
- package/dist/dom/useIsTouchDevice.d.ts.map +1 -1
- package/dist/dom/useOverlayFocus.d.ts +3 -2
- package/dist/dom/useOverlayFocus.d.ts.map +1 -1
- package/dist/dom/visual-viewport/attachVisualViewportFrame.d.ts.map +1 -1
- package/dist/error-report/breadcrumbs.d.ts.map +1 -1
- package/dist/error-report/capture.d.ts.map +1 -1
- package/dist/error-report/captureOptions.d.ts +3 -2
- package/dist/error-report/captureOptions.d.ts.map +1 -1
- package/dist/error-report/capturePolicyConstants.d.ts +4 -0
- package/dist/error-report/capturePolicyConstants.d.ts.map +1 -0
- package/dist/error-report/dataPreview.d.ts.map +1 -1
- package/dist/error-report/diagnostics.d.ts.map +1 -1
- package/dist/error-report/drafts.d.ts.map +1 -1
- package/dist/error-report/environment.d.ts.map +1 -1
- package/dist/error-report/errorInfo.d.ts.map +1 -1
- package/dist/error-report/errorReportCaptureLimits.d.ts +26 -0
- package/dist/error-report/errorReportCaptureLimits.d.ts.map +1 -0
- package/dist/error-report/errorReportContractConstants.d.ts +32 -0
- package/dist/error-report/errorReportContractConstants.d.ts.map +1 -0
- package/dist/error-report/index.js +586 -587
- package/dist/error-report/index.js.map +1 -1
- package/dist/error-report/payload.d.ts.map +1 -1
- package/dist/error-report/queue.d.ts.map +1 -1
- package/dist/error-report/queueContract.d.ts +7 -6
- package/dist/error-report/queueContract.d.ts.map +1 -1
- package/dist/error-report/queueRecord.d.ts.map +1 -1
- package/dist/error-report/queueResultConstants.d.ts +14 -0
- package/dist/error-report/queueResultConstants.d.ts.map +1 -0
- package/dist/error-report/runtimeDeduplication.d.ts +2 -1
- package/dist/error-report/runtimeDeduplication.d.ts.map +1 -1
- package/dist/error-report/safeValue.d.ts.map +1 -1
- package/dist/error-report/safeValueMarkerConstants.d.ts +16 -0
- package/dist/error-report/safeValueMarkerConstants.d.ts.map +1 -0
- package/dist/error-report/schema.d.ts.map +1 -1
- package/dist/error-report/types.d.ts +10 -8
- package/dist/error-report/types.d.ts.map +1 -1
- package/dist/error-report-source-maps/archive.d.ts.map +1 -1
- package/dist/error-report-source-maps/artifact.d.ts.map +1 -1
- package/dist/error-report-source-maps/index.js +238 -238
- package/dist/error-report-source-maps/index.js.map +1 -1
- package/dist/error-report-source-maps/manifest.d.ts.map +1 -1
- package/dist/error-report-source-maps/package.d.ts.map +1 -1
- package/dist/error-report-source-maps/sourceMapArtifactConstants.d.ts +11 -0
- package/dist/error-report-source-maps/sourceMapArtifactConstants.d.ts.map +1 -0
- package/dist/error-report-source-maps/symbolicate.d.ts.map +1 -1
- package/dist/error-report-source-maps/symbolicationResultConstants.d.ts +6 -0
- package/dist/error-report-source-maps/symbolicationResultConstants.d.ts.map +1 -0
- package/dist/error-report-source-maps/types.d.ts +4 -2
- package/dist/error-report-source-maps/types.d.ts.map +1 -1
- package/dist/excel/excel.d.ts.map +1 -1
- package/dist/excel/excelWorkbookConstants.d.ts +6 -0
- package/dist/excel/excelWorkbookConstants.d.ts.map +1 -0
- package/dist/excel/index.js +121 -120
- package/dist/excel/index.js.map +1 -1
- package/dist/excel/matrixWorkbook.d.ts +6 -1
- package/dist/excel/matrixWorkbook.d.ts.map +1 -1
- package/dist/excel/tableExport.d.ts +2 -2
- package/dist/excel/tableExport.d.ts.map +1 -1
- package/dist/file/checkFileSignature.d.ts.map +1 -1
- package/dist/file/contentDisposition.d.ts.map +1 -1
- package/dist/file/fileSignatureConstants.d.ts +14 -18
- package/dist/file/fileSignatureConstants.d.ts.map +1 -1
- package/dist/file/fileSignatureTypes.d.ts +3 -3
- package/dist/file/fileSignatureTypes.d.ts.map +1 -1
- package/dist/file/image/imageReadConstants.d.ts +3 -0
- package/dist/file/image/imageReadConstants.d.ts.map +1 -0
- package/dist/file/image/readImageFile.d.ts +3 -2
- package/dist/file/image/readImageFile.d.ts.map +1 -1
- package/dist/file/image/types.d.ts +5 -3
- package/dist/file/image/types.d.ts.map +1 -1
- package/dist/file/index.js +139 -165
- package/dist/file/index.js.map +1 -1
- package/dist/file/mimeType.d.ts.map +1 -1
- package/dist/file/mimeTypeConstants.d.ts +18 -0
- package/dist/file/mimeTypeConstants.d.ts.map +1 -0
- package/dist/file/read-file/assert.d.ts.map +1 -1
- package/dist/file/read-file/readFile.d.ts +3 -11
- package/dist/file/read-file/readFile.d.ts.map +1 -1
- package/dist/file/read-file/readFileConstants.d.ts +13 -0
- package/dist/file/read-file/readFileConstants.d.ts.map +1 -0
- package/dist/file/read-file/types.d.ts +7 -6
- package/dist/file/read-file/types.d.ts.map +1 -1
- package/dist/file/signature/checkArchiveSignature.d.ts.map +1 -1
- package/dist/file-system/fileSystemConstants.d.ts +5 -0
- package/dist/file-system/fileSystemConstants.d.ts.map +1 -0
- package/dist/file-system/fileSystemTypes.d.ts +2 -1
- package/dist/file-system/fileSystemTypes.d.ts.map +1 -1
- package/dist/file-system/index.js +11 -10
- package/dist/file-system/index.js.map +1 -1
- package/dist/file-system/resolvePathInsideRoot.d.ts.map +1 -1
- package/dist/formatters/boolean/parseAbapBoolean.d.ts.map +1 -1
- package/dist/formatters/boolean/toAbapBoolean.d.ts.map +1 -1
- package/dist/formatters/date/calendarDate.d.ts.map +1 -1
- package/dist/formatters/date/calendarDateConstants.d.ts +13 -0
- package/dist/formatters/date/calendarDateConstants.d.ts.map +1 -0
- package/dist/formatters/date/calendarPeriod.d.ts +11 -2
- package/dist/formatters/date/calendarPeriod.d.ts.map +1 -1
- package/dist/formatters/date/dateFormatConstants.d.ts +17 -0
- package/dist/formatters/date/dateFormatConstants.d.ts.map +1 -0
- package/dist/formatters/date/datePatternConstants.d.ts +16 -0
- package/dist/formatters/date/datePatternConstants.d.ts.map +1 -0
- package/dist/formatters/date/datePresetNameConstants.d.ts +27 -0
- package/dist/formatters/date/datePresetNameConstants.d.ts.map +1 -0
- package/dist/formatters/date/dateRange.d.ts +3 -1
- package/dist/formatters/date/dateRange.d.ts.map +1 -1
- package/dist/formatters/date/dateValueConstants.d.ts +15 -0
- package/dist/formatters/date/dateValueConstants.d.ts.map +1 -0
- package/dist/formatters/date/educationDate.d.ts.map +1 -1
- package/dist/formatters/date/formatDate.d.ts.map +1 -1
- package/dist/formatters/date/formatInstantDateTime.d.ts.map +1 -1
- package/dist/formatters/date/parseDate.d.ts.map +1 -1
- package/dist/formatters/date/pattern.d.ts.map +1 -1
- package/dist/formatters/date/presets.d.ts.map +1 -1
- package/dist/formatters/date/types.d.ts +8 -6
- package/dist/formatters/date/types.d.ts.map +1 -1
- package/dist/formatters/formatDurationMinutes.d.ts.map +1 -1
- package/dist/formatters/formatFileSize.d.ts.map +1 -1
- package/dist/formatters/formatPhone.d.ts.map +1 -1
- package/dist/formatters/index.js +6 -5
- package/dist/formatters/normalizeLeadingZeros.d.ts.map +1 -1
- package/dist/formatters/number/compact.d.ts.map +1 -1
- package/dist/formatters/number/formatCompactNumber.d.ts.map +1 -1
- package/dist/formatters/number/formatNumber.d.ts.map +1 -1
- package/dist/formatters/number/numberFormatConstants.d.ts +11 -0
- package/dist/formatters/number/numberFormatConstants.d.ts.map +1 -0
- package/dist/formatters/number/numberPresetNameConstants.d.ts +16 -0
- package/dist/formatters/number/numberPresetNameConstants.d.ts.map +1 -0
- package/dist/formatters/number/parseNumber.d.ts.map +1 -1
- package/dist/formatters/number/presets.d.ts.map +1 -1
- package/dist/formatters/number/types.d.ts +2 -1
- package/dist/formatters/number/types.d.ts.map +1 -1
- package/dist/formatters/pipeline/clone.d.ts.map +1 -1
- package/dist/formatters/pipeline/definitions.d.ts.map +1 -1
- package/dist/formatters/pipeline/dependencies.d.ts.map +1 -1
- package/dist/formatters/pipeline/execute.d.ts +4 -1
- package/dist/formatters/pipeline/execute.d.ts.map +1 -1
- package/dist/formatters/pipeline/formattersPipelineConstants.d.ts +19 -0
- package/dist/formatters/pipeline/formattersPipelineConstants.d.ts.map +1 -0
- package/dist/formatters/pipeline/normalize.d.ts.map +1 -1
- package/dist/formatters/pipeline/pipelineValidationConstants.d.ts +40 -0
- package/dist/formatters/pipeline/pipelineValidationConstants.d.ts.map +1 -0
- package/dist/formatters/pipeline/registry.d.ts +1 -1
- package/dist/formatters/pipeline/registry.d.ts.map +1 -1
- package/dist/formatters/pipeline/rekey.d.ts.map +1 -1
- package/dist/formatters/pipeline/runtime.d.ts.map +1 -1
- package/dist/formatters/pipeline/types.d.ts +28 -25
- package/dist/formatters/pipeline/types.d.ts.map +1 -1
- package/dist/formatters/pipeline/validate.d.ts +2 -1
- package/dist/formatters/pipeline/validate.d.ts.map +1 -1
- package/dist/formatters/strings/spaceCharacterConstants.d.ts +5 -0
- package/dist/formatters/strings/spaceCharacterConstants.d.ts.map +1 -0
- package/dist/formatters/strings/stripInnerSpaces.d.ts.map +1 -1
- package/dist/formatters/strings/stripLeadingZeros.d.ts.map +1 -1
- package/dist/formatters/valueState/fixedValueStateResolver.d.ts.map +1 -1
- package/dist/formatters/valueState/presentation.d.ts.map +1 -1
- package/dist/formatters/valueState/resolveValueStateClassName.d.ts.map +1 -1
- package/dist/formatters/valueState/thresholdValueStateResolver.d.ts.map +1 -1
- package/dist/formatters/valueState/types.d.ts +2 -1
- package/dist/formatters/valueState/types.d.ts.map +1 -1
- package/dist/formatters/valueState/valueStateRegistry.d.ts.map +1 -1
- package/dist/formatters/valueState/valueStateResolverConstants.d.ts +6 -0
- package/dist/formatters/valueState/valueStateResolverConstants.d.ts.map +1 -0
- package/dist/formulas/execute.d.ts +3 -2
- package/dist/formulas/execute.d.ts.map +1 -1
- package/dist/formulas/index.js +1 -1
- package/dist/formulas/isTableFormulaDependency.d.ts.map +1 -1
- package/dist/formulas/tableFormulaConstants.d.ts +12 -0
- package/dist/formulas/tableFormulaConstants.d.ts.map +1 -0
- package/dist/formulas/types.d.ts +2 -1
- package/dist/formulas/types.d.ts.map +1 -1
- package/dist/formulas/validate.d.ts +2 -1
- package/dist/formulas/validate.d.ts.map +1 -1
- package/dist/hooks/index.js +110 -107
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useBlockBrowserZoom.d.ts.map +1 -1
- package/dist/hooks/useDndSortableSensors.d.ts.map +1 -1
- package/dist/hooks/useFloatingListbox.d.ts +15 -33
- package/dist/hooks/useFloatingListbox.d.ts.map +1 -1
- package/dist/http/index.js +8 -7
- package/dist/http/index.js.map +1 -1
- package/dist/http/textResponse.d.ts.map +1 -1
- package/dist/indexed-records/createIndexedRecordsSchema.d.ts.map +1 -1
- package/dist/indexed-records/schema.js +24 -23
- package/dist/indexed-records/schema.js.map +1 -1
- package/dist/media/breakpointConstants.d.ts +5 -0
- package/dist/media/breakpointConstants.d.ts.map +1 -0
- package/dist/media/breakpoints.d.ts +2 -1
- package/dist/media/breakpoints.d.ts.map +1 -1
- package/dist/media/createNotificationTonePlayer.d.ts.map +1 -1
- package/dist/media/getCurrentFontSize.d.ts.map +1 -1
- package/dist/media/index.js +1 -1
- package/dist/media/mediaQueryConstants.d.ts +3 -0
- package/dist/media/mediaQueryConstants.d.ts.map +1 -0
- package/dist/media/responsive.d.ts +1 -1
- package/dist/media/responsive.d.ts.map +1 -1
- package/dist/media/useMatchMedia.d.ts.map +1 -1
- package/dist/media/useMediaQuery.d.ts.map +1 -1
- package/dist/metadata/baseMetaTypes.d.ts +7 -0
- package/dist/metadata/baseMetaTypes.d.ts.map +1 -0
- package/dist/metadata/metadataTypes.d.ts +17 -0
- package/dist/metadata/metadataTypes.d.ts.map +1 -0
- package/dist/metadata/scalarTypeClassification.d.ts +8 -0
- package/dist/metadata/scalarTypeClassification.d.ts.map +1 -0
- package/dist/metadata/scalarTypeConstants.d.ts +21 -0
- package/dist/metadata/scalarTypeConstants.d.ts.map +1 -0
- package/dist/notifications/index.js +62 -62
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/notificationTypeConstants.d.ts +6 -0
- package/dist/notifications/notificationTypeConstants.d.ts.map +1 -0
- package/dist/notifications/notify.d.ts.map +1 -1
- package/dist/notifications/store.d.ts.map +1 -1
- package/dist/notifications/types.d.ts +2 -1
- package/dist/notifications/types.d.ts.map +1 -1
- package/dist/number-scale/index.js +47 -46
- package/dist/number-scale/index.js.map +1 -1
- package/dist/number-scale/marksPositionConstants.d.ts +4 -0
- package/dist/number-scale/marksPositionConstants.d.ts.map +1 -0
- package/dist/number-scale/numberScale.d.ts +1 -1
- package/dist/number-scale/numberScale.d.ts.map +1 -1
- package/dist/number-scale/types.d.ts +2 -1
- package/dist/number-scale/types.d.ts.map +1 -1
- package/dist/odata-service/baseTypes.d.ts +1 -5
- package/dist/odata-service/baseTypes.d.ts.map +1 -1
- package/dist/odata-service/builder.d.ts.map +1 -1
- package/dist/odata-service/columns.d.ts.map +1 -1
- package/dist/odata-service/entityOperationConstants.d.ts +4 -0
- package/dist/odata-service/entityOperationConstants.d.ts.map +1 -0
- package/dist/odata-service/filterDefinitionConstants.d.ts +24 -0
- package/dist/odata-service/filterDefinitionConstants.d.ts.map +1 -0
- package/dist/odata-service/filterDefinitions.d.ts +19 -17
- package/dist/odata-service/filterDefinitions.d.ts.map +1 -1
- package/dist/odata-service/filterOperationConstants.d.ts +14 -0
- package/dist/odata-service/filterOperationConstants.d.ts.map +1 -0
- package/dist/odata-service/filters.d.ts.map +1 -1
- package/dist/odata-service/formatters.d.ts +1 -2
- package/dist/odata-service/formatters.d.ts.map +1 -1
- package/dist/odata-service/index.js +1317 -2
- package/dist/odata-service/index.js.map +1 -0
- package/dist/odata-service/odataMetadataConstants.d.ts +8 -0
- package/dist/odata-service/odataMetadataConstants.d.ts.map +1 -0
- package/dist/odata-service/parser.d.ts +1 -3
- package/dist/odata-service/parser.d.ts.map +1 -1
- package/dist/odata-service/schema.d.ts.map +1 -1
- package/dist/odata-service/sorts.d.ts.map +1 -1
- package/dist/odata-service/sqlFilters.d.ts +10 -5
- package/dist/odata-service/sqlFilters.d.ts.map +1 -1
- package/dist/odata-service/types.d.ts +13 -14
- package/dist/odata-service/types.d.ts.map +1 -1
- package/dist/odata-service/typesValidation.d.ts +1 -5
- package/dist/odata-service/typesValidation.d.ts.map +1 -1
- package/dist/pwa/index.js +72 -71
- package/dist/pwa/index.js.map +1 -1
- package/dist/pwa/sw-cache-policy.js +47 -47
- package/dist/pwa/sw-cache-policy.js.map +1 -1
- package/dist/pwa/swCachePolicy.d.ts +5 -1
- package/dist/pwa/swCachePolicy.d.ts.map +1 -1
- package/dist/pwa/useBrowserOnlineStatus.d.ts.map +1 -1
- package/dist/query-client/broadcast.d.ts +4 -3
- package/dist/query-client/broadcast.d.ts.map +1 -1
- package/dist/query-client/createQueryRestoreSchedulerGuard.d.ts.map +1 -1
- package/dist/query-client/createQueryRestoreStorage.d.ts.map +1 -1
- package/dist/query-client/index.js +1 -1
- package/dist/query-client/invalidationBroadcast.d.ts +2 -1
- package/dist/query-client/invalidationBroadcast.d.ts.map +1 -1
- package/dist/query-client/persistence.d.ts +9 -6
- package/dist/query-client/persistence.d.ts.map +1 -1
- package/dist/query-client/queryCacheEventConstants.d.ts +11 -0
- package/dist/query-client/queryCacheEventConstants.d.ts.map +1 -0
- package/dist/query-client/queryClient.d.ts +2 -1
- package/dist/query-client/queryClient.d.ts.map +1 -1
- package/dist/query-client/queryMeta.d.ts.map +1 -1
- package/dist/query-client/sessionPersistenceConstants.d.ts +5 -0
- package/dist/query-client/sessionPersistenceConstants.d.ts.map +1 -0
- package/dist/query-client/sessionScoped.d.ts.map +1 -1
- package/dist/query-client/sessionScopedResetConstants.d.ts +4 -0
- package/dist/query-client/sessionScopedResetConstants.d.ts.map +1 -0
- package/dist/query-client/sessionScopedResetLifecycleTypes.d.ts +2 -1
- package/dist/query-client/sessionScopedResetLifecycleTypes.d.ts.map +1 -1
- package/dist/seo/index.js +0 -1
- package/dist/seo/index.js.map +1 -1
- package/dist/seo/seo.d.ts +3 -2
- package/dist/seo/seo.d.ts.map +1 -1
- package/dist/seo/seoContentTypeConstants.d.ts +6 -0
- package/dist/seo/seoContentTypeConstants.d.ts.map +1 -0
- package/dist/seo/types.d.ts +2 -1
- package/dist/seo/types.d.ts.map +1 -1
- package/dist/session-storage/index.js +1 -1
- package/dist/table/cellSelection.d.ts.map +1 -1
- package/dist/table/index.js +83 -79
- package/dist/table/index.js.map +1 -1
- package/dist/table/odataAdapter.d.ts +3 -3
- package/dist/table/odataAdapter.d.ts.map +1 -1
- package/dist/table/selection.d.ts +2 -2
- package/dist/table/selection.d.ts.map +1 -1
- package/dist/table/tableColumnConstants.d.ts +5 -0
- package/dist/table/tableColumnConstants.d.ts.map +1 -0
- package/dist/table/tableSelectionConstants.d.ts +8 -0
- package/dist/table/tableSelectionConstants.d.ts.map +1 -0
- package/dist/table/tanStackFeatures.d.ts +8 -8
- package/dist/table/types.d.ts +5 -3
- package/dist/table/types.d.ts.map +1 -1
- package/dist/table/useTableRowSelection.d.ts +2 -2
- package/dist/table/useTableRowSelection.d.ts.map +1 -1
- package/dist/table-document/index.js +88 -87
- package/dist/table-document/index.js.map +1 -1
- package/dist/table-document/insertTableDocumentAxis.d.ts +2 -1
- package/dist/table-document/insertTableDocumentAxis.d.ts.map +1 -1
- package/dist/table-document/tableDocument.d.ts +2 -1
- package/dist/table-document/tableDocument.d.ts.map +1 -1
- package/dist/table-document/tableDocumentAxisGroups.d.ts +4 -3
- package/dist/table-document/tableDocumentAxisGroups.d.ts.map +1 -1
- package/dist/table-document/tableDocumentConstants.d.ts +8 -0
- package/dist/table-document/tableDocumentConstants.d.ts.map +1 -0
- package/dist/table-document/tableDocumentGeometry.d.ts.map +1 -1
- package/dist/three-scene/index.js +32 -32
- package/dist/three-scene/index.js.map +1 -1
- package/dist/three-scene/threeSceneAvailability.d.ts +4 -3
- package/dist/three-scene/threeSceneAvailability.d.ts.map +1 -1
- package/dist/three-scene/threeSceneConstants.d.ts +14 -0
- package/dist/three-scene/threeSceneConstants.d.ts.map +1 -0
- package/dist/three-scene/useThreeSceneAvailability.d.ts.map +1 -1
- package/dist/tree-table/index.js +1 -1
- package/dist/types/abapBooleanConstants.d.ts +4 -0
- package/dist/types/abapBooleanConstants.d.ts.map +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/types.d.ts +4 -2
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/valueStateConstants.d.ts +8 -0
- package/dist/types/valueStateConstants.d.ts.map +1 -0
- package/dist/utils/cloneFunctionStrategyConstants.d.ts +4 -0
- package/dist/utils/cloneFunctionStrategyConstants.d.ts.map +1 -0
- package/dist/utils/createLazyComponent.d.ts.map +1 -1
- package/dist/utils/deepCloneWithoutFunctions.d.ts +2 -1
- package/dist/utils/deepCloneWithoutFunctions.d.ts.map +1 -1
- package/dist/utils/deepCopyWithoutFunctions.d.ts +2 -1
- package/dist/utils/deepCopyWithoutFunctions.d.ts.map +1 -1
- package/dist/utils/index.js +2 -209
- package/dist/utils/keyboard.d.ts +2 -1
- package/dist/utils/keyboard.d.ts.map +1 -1
- package/dist/utils/keyboardConstants.d.ts +16 -0
- package/dist/utils/keyboardConstants.d.ts.map +1 -0
- package/dist/validators/index.js +3 -3
- package/dist/validators/index.js.map +1 -1
- package/dist/validators/validateUrl.d.ts.map +1 -1
- package/dist/value-transformers/execute.d.ts.map +1 -1
- package/dist/value-transformers/index.js +9 -6
- package/dist/value-transformers/index.js.map +1 -1
- package/dist/value-transformers/types.d.ts +3 -2
- package/dist/value-transformers/types.d.ts.map +1 -1
- package/dist/value-transformers/valueTransformerConstants.d.ts +4 -0
- package/dist/value-transformers/valueTransformerConstants.d.ts.map +1 -0
- package/package.json +6 -5
- package/src/binary/README.mdx +1 -1
- package/src/dom/README.mdx +1 -1
- package/src/formatters/README.mdx +5 -0
- package/src/foundationLib.mdx +8 -0
- package/src/metadata/README.md +35 -0
- package/src/odata-service/README.mdx +36 -1
- package/src/query-client/README.mdx +4 -4
- package/dist/chunks/dom-BK22UmgF.js.map +0 -1
- package/dist/chunks/formatters-CZnnbdud.js.map +0 -1
- package/dist/chunks/formulas-BXT_XBWI.js.map +0 -1
- package/dist/chunks/media-WK38KtMl.js +0 -191
- package/dist/chunks/media-WK38KtMl.js.map +0 -1
- package/dist/chunks/odata-service-tp2U5yIr.js +0 -2211
- package/dist/chunks/odata-service-tp2U5yIr.js.map +0 -1
- package/dist/chunks/query-client-CVRfrYZM.js.map +0 -1
- package/dist/chunks/uuid-CUJPAbRY.js.map +0 -1
- package/dist/chunks/validate-CEQHqevt.js +0 -608
- package/dist/chunks/validate-CEQHqevt.js.map +0 -1
- package/dist/utils/index.js.map +0 -1
|
@@ -1,2211 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./isRecord-DXDTW-jA.js";
|
|
2
|
-
import { t } from "./string-comparison-BKT7PXmq.js";
|
|
3
|
-
import { z as n } from "zod";
|
|
4
|
-
import { create as r } from "zustand";
|
|
5
|
-
import { immer as i } from "zustand/middleware/immer";
|
|
6
|
-
//#region src/formatters/boolean/parseAbapBoolean.ts
|
|
7
|
-
function a(e) {
|
|
8
|
-
return !!(e && typeof e == "string" && e === "X");
|
|
9
|
-
}
|
|
10
|
-
function o(e) {
|
|
11
|
-
return e ? typeof e == "string" ? [
|
|
12
|
-
"true",
|
|
13
|
-
"x",
|
|
14
|
-
"1"
|
|
15
|
-
].includes(e.toLowerCase()) : !!e : !1;
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/formatters/number/parseNumber.ts
|
|
19
|
-
function s(e) {
|
|
20
|
-
if (typeof e == "number") return Number.isFinite(e) ? e : void 0;
|
|
21
|
-
if (typeof e != "string") return;
|
|
22
|
-
let t = e.trim();
|
|
23
|
-
if (!t) return;
|
|
24
|
-
let n = Number(t);
|
|
25
|
-
if (Number.isFinite(n)) return n;
|
|
26
|
-
let r = "";
|
|
27
|
-
for (let e = 0; e < t.length; e++) {
|
|
28
|
-
let n = t.charCodeAt(e);
|
|
29
|
-
n !== 32 && n !== 160 && n !== 8239 && n !== 39 && (r += t[e]);
|
|
30
|
-
}
|
|
31
|
-
let i = r.indexOf(",") !== -1, a = r.indexOf(".") !== -1;
|
|
32
|
-
i && a ? r = r.replace(/,/g, "") : i && (r = r.replace(/,/g, "."));
|
|
33
|
-
let o = Number(r);
|
|
34
|
-
return Number.isFinite(o) ? o : void 0;
|
|
35
|
-
}
|
|
36
|
-
function c(e) {
|
|
37
|
-
return s(e) ?? 0;
|
|
38
|
-
}
|
|
39
|
-
function l(e) {
|
|
40
|
-
let t = s(e);
|
|
41
|
-
return t ? t > 0 : !1;
|
|
42
|
-
}
|
|
43
|
-
function u(e) {
|
|
44
|
-
let t = s(e);
|
|
45
|
-
if (!(t === void 0 || !Number.isInteger(t) || t <= 0)) return t;
|
|
46
|
-
}
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/formatters/date/pattern.ts
|
|
49
|
-
var d = Object.freeze([
|
|
50
|
-
"dd",
|
|
51
|
-
"MM",
|
|
52
|
-
"yyyy",
|
|
53
|
-
"yy"
|
|
54
|
-
]), f = Object.freeze([
|
|
55
|
-
"HH",
|
|
56
|
-
"mm",
|
|
57
|
-
"ss"
|
|
58
|
-
]), p = Object.freeze([...d, ...f]), m = /(yyyy|yy|MM|dd|HH|mm|ss)/g, ee = new Set(p), te = Object.freeze({
|
|
59
|
-
day: new Set(p),
|
|
60
|
-
month: /* @__PURE__ */ new Set([
|
|
61
|
-
"MM",
|
|
62
|
-
"yyyy",
|
|
63
|
-
"yy"
|
|
64
|
-
]),
|
|
65
|
-
year: /* @__PURE__ */ new Set(["yyyy", "yy"])
|
|
66
|
-
});
|
|
67
|
-
function ne(e) {
|
|
68
|
-
return ee.has(e);
|
|
69
|
-
}
|
|
70
|
-
function h(e, t) {
|
|
71
|
-
return t.some((t) => e.includes(t));
|
|
72
|
-
}
|
|
73
|
-
function re(e) {
|
|
74
|
-
return m.lastIndex = 0, m.test(e);
|
|
75
|
-
}
|
|
76
|
-
function ie(e) {
|
|
77
|
-
return te[e];
|
|
78
|
-
}
|
|
79
|
-
function g(e, t) {
|
|
80
|
-
if (t === "day") return e;
|
|
81
|
-
let n = ie(t), r = [], i = "", a = !1, o = 0, s = 0, c;
|
|
82
|
-
for (m.lastIndex = 0; c = m.exec(e);) {
|
|
83
|
-
let t = e.slice(s, c.index), l = c[0];
|
|
84
|
-
a && (i += t), n.has(l) && (a && r.push(i), r.push(l), i = "", a = !0, o += 1), s = c.index + l.length;
|
|
85
|
-
}
|
|
86
|
-
return o === 0 ? e : r.join("");
|
|
87
|
-
}
|
|
88
|
-
//#endregion
|
|
89
|
-
//#region src/formatters/date/presets.ts
|
|
90
|
-
var ae = "ru-RU", _ = Object.freeze([
|
|
91
|
-
"short",
|
|
92
|
-
"medium",
|
|
93
|
-
"long"
|
|
94
|
-
]), oe = Object.freeze([
|
|
95
|
-
"day",
|
|
96
|
-
"month",
|
|
97
|
-
"year"
|
|
98
|
-
]), v = {
|
|
99
|
-
locale: ae,
|
|
100
|
-
intlOptions: {
|
|
101
|
-
day: "2-digit",
|
|
102
|
-
month: "2-digit",
|
|
103
|
-
year: "numeric"
|
|
104
|
-
},
|
|
105
|
-
invalidFallback: ""
|
|
106
|
-
}, y = Object.freeze({
|
|
107
|
-
date: "date",
|
|
108
|
-
dateShort: "date-short",
|
|
109
|
-
dateMedium: "date-medium",
|
|
110
|
-
dateLong: "date-long",
|
|
111
|
-
monthShort: "month-short",
|
|
112
|
-
monthMedium: "month-medium",
|
|
113
|
-
monthLong: "month-long",
|
|
114
|
-
monthYearMedium: "month-year-medium",
|
|
115
|
-
monthYearLong: "month-year-long",
|
|
116
|
-
datetime: "datetime",
|
|
117
|
-
datetimeSeconds: "datetime-seconds",
|
|
118
|
-
datetimeShort: "datetime-short",
|
|
119
|
-
datetimeMedium: "datetime-medium",
|
|
120
|
-
datetimeLong: "datetime-long",
|
|
121
|
-
time: "time",
|
|
122
|
-
timeSeconds: "time-seconds",
|
|
123
|
-
timeShort: "time-short",
|
|
124
|
-
timeMedium: "time-medium",
|
|
125
|
-
timeLong: "time-long",
|
|
126
|
-
odataDate: "odata-date",
|
|
127
|
-
odataDatetime: "odata-datetime",
|
|
128
|
-
abapDatetime: "abap-datetime",
|
|
129
|
-
abapDate: "abap-date",
|
|
130
|
-
abapMonth: "abap-month",
|
|
131
|
-
abapYear: "abap-year"
|
|
132
|
-
}), se = Object.freeze({
|
|
133
|
-
short: y.dateShort,
|
|
134
|
-
medium: y.dateMedium,
|
|
135
|
-
long: y.dateLong
|
|
136
|
-
}), ce = /* @__PURE__ */ new Map(), le = [
|
|
137
|
-
{
|
|
138
|
-
name: y.date,
|
|
139
|
-
intlOptions: {
|
|
140
|
-
day: "2-digit",
|
|
141
|
-
month: "2-digit",
|
|
142
|
-
year: "numeric"
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
name: y.datetime,
|
|
147
|
-
intlDateOptions: {
|
|
148
|
-
day: "2-digit",
|
|
149
|
-
month: "2-digit",
|
|
150
|
-
year: "numeric"
|
|
151
|
-
},
|
|
152
|
-
intlTimeOptions: {
|
|
153
|
-
hour: "2-digit",
|
|
154
|
-
minute: "2-digit",
|
|
155
|
-
hourCycle: "h23"
|
|
156
|
-
},
|
|
157
|
-
intlJoiner: " "
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
name: y.datetimeSeconds,
|
|
161
|
-
intlDateOptions: {
|
|
162
|
-
day: "2-digit",
|
|
163
|
-
month: "2-digit",
|
|
164
|
-
year: "numeric"
|
|
165
|
-
},
|
|
166
|
-
intlTimeOptions: {
|
|
167
|
-
hour: "2-digit",
|
|
168
|
-
minute: "2-digit",
|
|
169
|
-
second: "2-digit",
|
|
170
|
-
hourCycle: "h23"
|
|
171
|
-
},
|
|
172
|
-
intlJoiner: " "
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
name: y.time,
|
|
176
|
-
intlOptions: {
|
|
177
|
-
hour: "2-digit",
|
|
178
|
-
minute: "2-digit",
|
|
179
|
-
hourCycle: "h23"
|
|
180
|
-
},
|
|
181
|
-
durationPattern: "HH:mm"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
name: y.timeSeconds,
|
|
185
|
-
intlOptions: {
|
|
186
|
-
hour: "2-digit",
|
|
187
|
-
minute: "2-digit",
|
|
188
|
-
second: "2-digit",
|
|
189
|
-
hourCycle: "h23"
|
|
190
|
-
},
|
|
191
|
-
durationPattern: "HH:mm:ss"
|
|
192
|
-
},
|
|
193
|
-
..._.map((e) => ({
|
|
194
|
-
name: `date-${e}`,
|
|
195
|
-
intlOptions: de(e)
|
|
196
|
-
})),
|
|
197
|
-
..._.map((e) => ({
|
|
198
|
-
name: `month-${e}`,
|
|
199
|
-
intlOptions: fe(e)
|
|
200
|
-
})),
|
|
201
|
-
{
|
|
202
|
-
name: y.monthYearMedium,
|
|
203
|
-
intlOptions: {
|
|
204
|
-
month: "short",
|
|
205
|
-
year: "numeric"
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
name: y.monthYearLong,
|
|
210
|
-
intlOptions: {
|
|
211
|
-
month: "long",
|
|
212
|
-
year: "numeric"
|
|
213
|
-
}
|
|
214
|
-
},
|
|
215
|
-
..._.map((e) => ({
|
|
216
|
-
name: `time-${e}`,
|
|
217
|
-
intlOptions: pe(e),
|
|
218
|
-
durationPattern: e === "short" ? "HH:mm" : "HH:mm:ss"
|
|
219
|
-
})),
|
|
220
|
-
..._.map((e) => ({
|
|
221
|
-
name: `datetime-${e}`,
|
|
222
|
-
intlDateOptions: de(e),
|
|
223
|
-
intlTimeOptions: pe(e),
|
|
224
|
-
intlJoiner: ", "
|
|
225
|
-
})),
|
|
226
|
-
{
|
|
227
|
-
name: y.odataDate,
|
|
228
|
-
pattern: "yyyy-MM-dd"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
name: y.odataDatetime,
|
|
232
|
-
pattern: "yyyy-MM-ddTHH:mm:ss"
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
name: y.abapDatetime,
|
|
236
|
-
pattern: "yyyyMMddHHmmss"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
name: y.abapDate,
|
|
240
|
-
pattern: "yyyyMMdd"
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
name: y.abapMonth,
|
|
244
|
-
pattern: "yyyyMM"
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
name: y.abapYear,
|
|
248
|
-
pattern: "yyyy"
|
|
249
|
-
}
|
|
250
|
-
], ue = /* @__PURE__ */ new Map([[y.monthYearMedium, "short"], [y.monthYearLong, "long"]]), b = /* @__PURE__ */ new Map();
|
|
251
|
-
function x(e, t = 2) {
|
|
252
|
-
return String(e).padStart(t, "0");
|
|
253
|
-
}
|
|
254
|
-
function de(e, t = "day") {
|
|
255
|
-
return t === "year" ? { year: "numeric" } : t === "month" ? e === "short" ? {
|
|
256
|
-
month: "2-digit",
|
|
257
|
-
year: "numeric"
|
|
258
|
-
} : e === "medium" ? {
|
|
259
|
-
month: "short",
|
|
260
|
-
year: "numeric"
|
|
261
|
-
} : {
|
|
262
|
-
month: "long",
|
|
263
|
-
year: "numeric"
|
|
264
|
-
} : e === "short" ? {
|
|
265
|
-
day: "2-digit",
|
|
266
|
-
month: "2-digit",
|
|
267
|
-
year: "numeric"
|
|
268
|
-
} : e === "medium" ? {
|
|
269
|
-
day: "numeric",
|
|
270
|
-
month: "short",
|
|
271
|
-
year: "numeric"
|
|
272
|
-
} : {
|
|
273
|
-
day: "numeric",
|
|
274
|
-
month: "long",
|
|
275
|
-
year: "numeric"
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
function fe(e) {
|
|
279
|
-
return e === "short" ? {
|
|
280
|
-
day: "2-digit",
|
|
281
|
-
month: "2-digit"
|
|
282
|
-
} : e === "medium" ? {
|
|
283
|
-
day: "numeric",
|
|
284
|
-
month: "short"
|
|
285
|
-
} : {
|
|
286
|
-
day: "numeric",
|
|
287
|
-
month: "long"
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
function pe(e) {
|
|
291
|
-
return e === "short" ? {
|
|
292
|
-
hour: "2-digit",
|
|
293
|
-
minute: "2-digit",
|
|
294
|
-
hourCycle: "h23"
|
|
295
|
-
} : {
|
|
296
|
-
hour: "2-digit",
|
|
297
|
-
minute: "2-digit",
|
|
298
|
-
second: "2-digit",
|
|
299
|
-
hourCycle: "h23"
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
function me(e) {
|
|
303
|
-
let { timeZone: t, timeZoneName: n, ...r } = e;
|
|
304
|
-
return r;
|
|
305
|
-
}
|
|
306
|
-
function he(e) {
|
|
307
|
-
return !!(e.dateStyle || e.year || e.month || e.day);
|
|
308
|
-
}
|
|
309
|
-
function ge(e, t) {
|
|
310
|
-
let n = me(e);
|
|
311
|
-
return t === "day" || !he(n) ? n : n.dateStyle ? de(n.dateStyle === "short" || n.dateStyle === "medium" ? n.dateStyle : "long", t) : t === "year" ? { year: n.year ?? "numeric" } : {
|
|
312
|
-
month: n.month ?? "2-digit",
|
|
313
|
-
year: n.year ?? "numeric"
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
function _e(e, t) {
|
|
317
|
-
let n = me(t), r = /* @__PURE__ */ new Map();
|
|
318
|
-
if (n.timeStyle) {
|
|
319
|
-
let t = pe(n.timeStyle === "short" ? "short" : "medium");
|
|
320
|
-
if (n.dateStyle) {
|
|
321
|
-
let i = new Intl.DateTimeFormat(e, { dateStyle: n.dateStyle }), a = new Intl.DateTimeFormat(e, t);
|
|
322
|
-
return (t, o = "day") => {
|
|
323
|
-
if (o === "day") return `${i.format(t)}, ${a.format(t)}`;
|
|
324
|
-
let s = ge({ dateStyle: n.dateStyle }, o), c = r.get(o);
|
|
325
|
-
return c || (c = new Intl.DateTimeFormat(e, s), r.set(o, c)), c.format(t);
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
return new Intl.DateTimeFormat(e, t).format;
|
|
329
|
-
}
|
|
330
|
-
let i = new Intl.DateTimeFormat(e, n);
|
|
331
|
-
return (t, a = "day") => {
|
|
332
|
-
if (a === "day") return i.format(t);
|
|
333
|
-
let o = r.get(a);
|
|
334
|
-
return o || (o = new Intl.DateTimeFormat(e, ge(n, a)), r.set(a, o)), o.format(t);
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
function ve(e, t) {
|
|
338
|
-
let n = String(t.getFullYear());
|
|
339
|
-
switch (e) {
|
|
340
|
-
case "yyyy": return n;
|
|
341
|
-
case "yy": return n.slice(-2);
|
|
342
|
-
case "MM": return x(t.getMonth() + 1);
|
|
343
|
-
case "dd": return x(t.getDate());
|
|
344
|
-
case "HH": return x(t.getHours());
|
|
345
|
-
case "mm": return x(t.getMinutes());
|
|
346
|
-
case "ss": return x(t.getSeconds());
|
|
347
|
-
default: return e;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
function ye(e) {
|
|
351
|
-
switch (e) {
|
|
352
|
-
case "yyyyMMdd": return (e) => `${e.getFullYear()}${x(e.getMonth() + 1)}${x(e.getDate())}`;
|
|
353
|
-
case "yyyyMMddHHmmss": return (e) => `${e.getFullYear()}${x(e.getMonth() + 1)}${x(e.getDate())}${x(e.getHours())}${x(e.getMinutes())}${x(e.getSeconds())}`;
|
|
354
|
-
case "yyyy-MM-dd": return (e) => `${e.getFullYear()}-${x(e.getMonth() + 1)}-${x(e.getDate())}`;
|
|
355
|
-
case "yyyy-MM-ddTHH:mm:ss": return (e) => `${e.getFullYear()}-${x(e.getMonth() + 1)}-${x(e.getDate())}T${x(e.getHours())}:${x(e.getMinutes())}:${x(e.getSeconds())}`;
|
|
356
|
-
default: return xe(e);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
function be(e) {
|
|
360
|
-
let t = /* @__PURE__ */ new Map();
|
|
361
|
-
return (n, r = "day") => {
|
|
362
|
-
let i = t.get(r);
|
|
363
|
-
return i || (i = ye(g(e, r)), t.set(r, i)), i(n, "day");
|
|
364
|
-
};
|
|
365
|
-
}
|
|
366
|
-
function xe(e) {
|
|
367
|
-
let t = [], n = 0, r;
|
|
368
|
-
for (m.lastIndex = 0; r = m.exec(e);) r.index > n && t.push(e.slice(n, r.index)), t.push(r[0]), n = r.index + r[0].length;
|
|
369
|
-
return n < e.length && t.push(e.slice(n)), (e) => {
|
|
370
|
-
let n = "";
|
|
371
|
-
for (let r of t) n += ne(r) ? ve(r, e) : r;
|
|
372
|
-
return n;
|
|
373
|
-
};
|
|
374
|
-
}
|
|
375
|
-
function Se(e, t, n) {
|
|
376
|
-
if (h(t, d) || !h(t, f)) return n;
|
|
377
|
-
let r = e < 0 ? "-" : "", i = Math.trunc(Math.abs(e) / 1e3), a = Math.trunc(i / 3600), o = Math.trunc(i % 3600 / 60), s = i % 60;
|
|
378
|
-
return t === "HH:mm" ? `${r}${x(a)}:${x(o)}` : t === "HH:mm:ss" ? `${r}${x(a)}:${x(o)}:${x(s)}` : r + t.replaceAll("HH", x(a)).replaceAll("mm", x(o)).replaceAll("ss", x(s));
|
|
379
|
-
}
|
|
380
|
-
function Ce(e) {
|
|
381
|
-
let t = {
|
|
382
|
-
...v,
|
|
383
|
-
...e
|
|
384
|
-
}, n = we(t), r = t.durationPattern ?? t.pattern, i = {
|
|
385
|
-
...t,
|
|
386
|
-
formatDateTime: n
|
|
387
|
-
};
|
|
388
|
-
return r && (i.formatDuration = (e, t) => Se(e, r, t)), i;
|
|
389
|
-
}
|
|
390
|
-
function we(e) {
|
|
391
|
-
if (e.pattern) return be(e.pattern);
|
|
392
|
-
if (e.intlDateOptions && e.intlTimeOptions) {
|
|
393
|
-
let t = _e(e.locale, e.intlDateOptions), n = _e(e.locale, e.intlTimeOptions), r = e.intlJoiner ?? " ";
|
|
394
|
-
return (e, i = "day") => i === "day" ? `${t(e)}${r}${n(e)}` : t(e, i);
|
|
395
|
-
}
|
|
396
|
-
return _e(e.locale, e.intlOptions ?? v.intlOptions);
|
|
397
|
-
}
|
|
398
|
-
function Te(e, t) {
|
|
399
|
-
let n = new Intl.DateTimeFormat(e, t === "short" ? {
|
|
400
|
-
day: "numeric",
|
|
401
|
-
month: t,
|
|
402
|
-
year: "numeric"
|
|
403
|
-
} : {
|
|
404
|
-
month: t,
|
|
405
|
-
year: "numeric"
|
|
406
|
-
}), r = new Intl.DateTimeFormat(e, { month: "long" }), i = new Intl.DateTimeFormat(e, { year: "numeric" });
|
|
407
|
-
return (e, a = "day") => {
|
|
408
|
-
let o = (a === "year" ? i : n).formatToParts(e), s = o.find((e) => e.type === "year")?.value ?? "";
|
|
409
|
-
if (a === "year") return s;
|
|
410
|
-
let c = o.find((e) => e.type === "month")?.value ?? "";
|
|
411
|
-
return `${t === "short" && !c.endsWith(".") ? r.formatToParts(e).find((e) => e.type === "month")?.value ?? c : c} ${s}`;
|
|
412
|
-
};
|
|
413
|
-
}
|
|
414
|
-
function Ee(e) {
|
|
415
|
-
let t = Ce(e), n = ue.get(e.name);
|
|
416
|
-
return n ? {
|
|
417
|
-
...t,
|
|
418
|
-
formatDateTime: Te(t.locale, n)
|
|
419
|
-
} : t;
|
|
420
|
-
}
|
|
421
|
-
function De() {
|
|
422
|
-
for (let e of le) b.set(e.name, Ee(e));
|
|
423
|
-
}
|
|
424
|
-
De();
|
|
425
|
-
function S(e) {
|
|
426
|
-
return b.get(e);
|
|
427
|
-
}
|
|
428
|
-
function Oe(e) {
|
|
429
|
-
return b.get(e);
|
|
430
|
-
}
|
|
431
|
-
function ke() {
|
|
432
|
-
return Array.from(b.keys());
|
|
433
|
-
}
|
|
434
|
-
function Ae(e) {
|
|
435
|
-
return _.includes(e);
|
|
436
|
-
}
|
|
437
|
-
function je(e) {
|
|
438
|
-
return oe.includes(e);
|
|
439
|
-
}
|
|
440
|
-
function Me(e, t = y.date) {
|
|
441
|
-
let n = e?.trim();
|
|
442
|
-
return n ? Ae(n) ? se[n] : n : t;
|
|
443
|
-
}
|
|
444
|
-
function Ne(e, t, n, r) {
|
|
445
|
-
let i = `${t}\u0000${n}\u0000${r}\u0000${e}`, a = ce.get(i);
|
|
446
|
-
if (a) return a;
|
|
447
|
-
let o = {
|
|
448
|
-
name: `${t}:${e}`,
|
|
449
|
-
pattern: e,
|
|
450
|
-
locale: n,
|
|
451
|
-
invalidFallback: r
|
|
452
|
-
};
|
|
453
|
-
return ce.set(i, o), o;
|
|
454
|
-
}
|
|
455
|
-
function Pe(e, { defaultFormat: t = y.date, patternPresetName: n = "__date_pattern__", locale: r = ae, invalidFallback: i = "" } = {}) {
|
|
456
|
-
let a = Me(e, t);
|
|
457
|
-
return S(a) ? a : Ne(a, n, r, i);
|
|
458
|
-
}
|
|
459
|
-
function Fe(e) {
|
|
460
|
-
let t = Ce(e);
|
|
461
|
-
return b.set(t.name, t), t;
|
|
462
|
-
}
|
|
463
|
-
function Ie() {
|
|
464
|
-
b.clear(), De();
|
|
465
|
-
}
|
|
466
|
-
//#endregion
|
|
467
|
-
//#region src/formatters/date/parseDate.ts
|
|
468
|
-
var Le = /^\/Date\((-?\d+)([+-]\d{4})?\)\/$/, Re = /^(datetimeoffset|datetime)'(.+)'$/i, ze = /^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2})(?::(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?)?)?$/, Be = /(Z|([+-])(\d{2}):?(\d{2}))$/i, Ve = /^\d{8}$/, He = /^\d{14,}$/, Ue = /^(\d{2})\.(\d{2})\.(\d{4})$/, We = /^(\d{2})\/(\d{2})\/(\d{4})$/, Ge = /^([+-])?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)(?:\.(\d+))?S)?)?$/, Ke = /* @__PURE__ */ new Set([
|
|
469
|
-
"",
|
|
470
|
-
"null",
|
|
471
|
-
"undefined"
|
|
472
|
-
]), qe = 1e3, Je = 6e4, Ye = 36e5, Xe = 864e5, Ze = 30, Qe = 365, $e = 70, C = "floating", et = Object.freeze({
|
|
473
|
-
[y.date]: Object.freeze(["dd.MM.yyyy"]),
|
|
474
|
-
[y.dateShort]: Object.freeze(["dd.MM.yyyy"]),
|
|
475
|
-
[y.datetime]: Object.freeze(["dd.MM.yyyy HH:mm"]),
|
|
476
|
-
[y.datetimeSeconds]: Object.freeze(["dd.MM.yyyy HH:mm:ss"]),
|
|
477
|
-
[y.datetimeShort]: Object.freeze(["dd.MM.yyyy, HH:mm"])
|
|
478
|
-
}), tt = /^(\d{1,2})\s+([\p{L}.]+)\s+(\d{4})(?:\s*[\p{L}.]+)?(?:,?\s+(\d{1,2}):(\d{2})(?::(\d{2}))?)?$/iu, nt = /^(\d{1,2})\.(\d{1,2})$/u, rt = /^(\d{1,2})\s+([\p{L}.]+)$/iu, it = /^([\p{L}.]+)\s+(\d{4})(?:\s*[\p{L}.]+)?$/iu, at = /^(\d{4})(?:\s*[\p{L}.]+)?$/iu, ot = /* @__PURE__ */ new Map(), st = /* @__PURE__ */ new Set([
|
|
479
|
-
y.monthShort,
|
|
480
|
-
y.monthMedium,
|
|
481
|
-
y.monthLong
|
|
482
|
-
]), ct = /* @__PURE__ */ new Set([y.monthYearMedium, y.monthYearLong]);
|
|
483
|
-
function w(e, t, n, r = 0, i = 0, a = 0, o = 0) {
|
|
484
|
-
let s = new Date(e, t - 1, n, r, i, a, o);
|
|
485
|
-
return s.getFullYear() === e && s.getMonth() === t - 1 && s.getDate() === n && s.getHours() === r && s.getMinutes() === i && s.getSeconds() === a ? s : null;
|
|
486
|
-
}
|
|
487
|
-
function T(e, t) {
|
|
488
|
-
return e.toLocaleLowerCase(t).replace(/\.$/, "");
|
|
489
|
-
}
|
|
490
|
-
function lt(e, t, n, r) {
|
|
491
|
-
e.set(T(t, r), n);
|
|
492
|
-
}
|
|
493
|
-
function ut(e, t, n, r, i) {
|
|
494
|
-
let a = t.formatToParts(n).find((e) => e.type === "month");
|
|
495
|
-
a && lt(e, a.value, r, i);
|
|
496
|
-
}
|
|
497
|
-
function dt(e) {
|
|
498
|
-
let t = ot.get(e);
|
|
499
|
-
if (t) return t;
|
|
500
|
-
let n = /* @__PURE__ */ new Map(), r = new Intl.DateTimeFormat(e, { month: "short" }), i = new Intl.DateTimeFormat(e, { month: "long" }), a = new Intl.DateTimeFormat(e, {
|
|
501
|
-
day: "numeric",
|
|
502
|
-
month: "short",
|
|
503
|
-
year: "numeric"
|
|
504
|
-
}), o = new Intl.DateTimeFormat(e, {
|
|
505
|
-
day: "numeric",
|
|
506
|
-
month: "long",
|
|
507
|
-
year: "numeric"
|
|
508
|
-
});
|
|
509
|
-
for (let t = 0; t < 12; t += 1) {
|
|
510
|
-
let s = new Date(2026, t, 1);
|
|
511
|
-
lt(n, r.format(s), t, e), lt(n, i.format(s), t, e), ut(n, a, s, t, e), ut(n, o, s, t, e);
|
|
512
|
-
}
|
|
513
|
-
return ot.set(e, n), n;
|
|
514
|
-
}
|
|
515
|
-
function ft(e, t) {
|
|
516
|
-
let n = tt.exec(e.trim());
|
|
517
|
-
if (!n) return null;
|
|
518
|
-
let r = Number(n[1]), i = dt(t).get(T(n[2], t)), a = Number(n[3]), o = Number(n[4] ?? 0), s = Number(n[5] ?? 0), c = Number(n[6] ?? 0);
|
|
519
|
-
if (i === void 0 || !Number.isFinite(r) || !Number.isFinite(a) || !Number.isFinite(o) || !Number.isFinite(s) || !Number.isFinite(c)) return null;
|
|
520
|
-
let l = w(a, i + 1, r, o, s, c);
|
|
521
|
-
return l ? D(l, "iso-local") : null;
|
|
522
|
-
}
|
|
523
|
-
function pt(e, t, n) {
|
|
524
|
-
let r = nt.exec(e.trim());
|
|
525
|
-
if (r) {
|
|
526
|
-
let e = Number(r[1]), t = w(n, Number(r[2]), e);
|
|
527
|
-
return t ? D(t, "iso-local") : null;
|
|
528
|
-
}
|
|
529
|
-
let i = rt.exec(e.trim());
|
|
530
|
-
if (!i) return null;
|
|
531
|
-
let a = Number(i[1]), o = dt(t).get(T(i[2], t));
|
|
532
|
-
if (o === void 0 || !Number.isFinite(a)) return null;
|
|
533
|
-
let s = w(n, o + 1, a);
|
|
534
|
-
return s ? D(s, "iso-local") : null;
|
|
535
|
-
}
|
|
536
|
-
function mt(e, t) {
|
|
537
|
-
let n = it.exec(e.trim());
|
|
538
|
-
if (!n) return null;
|
|
539
|
-
let r = dt(t).get(T(n[1], t)), i = Number(n[2]);
|
|
540
|
-
if (r === void 0 || !Number.isFinite(i)) return null;
|
|
541
|
-
let a = w(i, r + 1, 1);
|
|
542
|
-
return a ? D(a, "iso-local") : null;
|
|
543
|
-
}
|
|
544
|
-
function ht(e) {
|
|
545
|
-
let t = at.exec(e.trim());
|
|
546
|
-
if (!t) return null;
|
|
547
|
-
let n = Number(t[1]);
|
|
548
|
-
if (!Number.isFinite(n)) return null;
|
|
549
|
-
let r = w(n, 1, 1);
|
|
550
|
-
return r ? D(r, "iso-local") : null;
|
|
551
|
-
}
|
|
552
|
-
function gt(e, t, n) {
|
|
553
|
-
return n === "year" ? ht(e) : n === "month" ? mt(e, t) : ft(e, t);
|
|
554
|
-
}
|
|
555
|
-
function _t(e) {
|
|
556
|
-
return st.has(e);
|
|
557
|
-
}
|
|
558
|
-
function vt(e) {
|
|
559
|
-
return ct.has(e);
|
|
560
|
-
}
|
|
561
|
-
function yt(e) {
|
|
562
|
-
return e instanceof Date && !Number.isNaN(e.getTime()) ? e.getFullYear() : (/* @__PURE__ */ new Date()).getFullYear();
|
|
563
|
-
}
|
|
564
|
-
function bt(e) {
|
|
565
|
-
return new Date(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
|
|
566
|
-
}
|
|
567
|
-
function E(e) {
|
|
568
|
-
return new Date(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate(), e.getUTCHours(), e.getUTCMinutes(), e.getUTCSeconds(), e.getUTCMilliseconds());
|
|
569
|
-
}
|
|
570
|
-
function D(e, t) {
|
|
571
|
-
return {
|
|
572
|
-
kind: "date-time",
|
|
573
|
-
source: t,
|
|
574
|
-
date: e
|
|
575
|
-
};
|
|
576
|
-
}
|
|
577
|
-
function xt(e, t = C) {
|
|
578
|
-
if (!Number.isFinite(e)) return null;
|
|
579
|
-
let n = Math.abs(e) < 0xe8d4a51000 ? e * 1e3 : e, r = new Date(n);
|
|
580
|
-
return Number.isNaN(r.getTime()) ? null : D(t === "instant" ? r : E(r), "timestamp");
|
|
581
|
-
}
|
|
582
|
-
function St(e, t = C) {
|
|
583
|
-
let n = Le.exec(e);
|
|
584
|
-
if (!n) return null;
|
|
585
|
-
let r = Number(n[1]);
|
|
586
|
-
if (!Number.isFinite(r)) return null;
|
|
587
|
-
if (t === "instant") {
|
|
588
|
-
let e = new Date(r);
|
|
589
|
-
return Number.isNaN(e.getTime()) ? null : D(e, "odata-ticks");
|
|
590
|
-
}
|
|
591
|
-
let i = n[2];
|
|
592
|
-
if (!i) return D(E(new Date(r)), "odata-ticks");
|
|
593
|
-
let a = i.startsWith("-") ? -1 : 1, o = Number(i.slice(1, 3)), s = Number(i.slice(3, 5));
|
|
594
|
-
if (!Number.isFinite(o) || !Number.isFinite(s)) return null;
|
|
595
|
-
let c = a * (o * Ye + s * Je);
|
|
596
|
-
return D(E(new Date(r + c)), "odata-ticks");
|
|
597
|
-
}
|
|
598
|
-
function Ct(e) {
|
|
599
|
-
let t = ze.exec(e);
|
|
600
|
-
if (!t) return null;
|
|
601
|
-
let n = Number(t[1]), r = Number(t[2]), i = Number(t[3]), a = Number(t[4] ?? 0), o = Number(t[5] ?? 0), s = Number(t[6] ?? 0), c = (t[7] ?? "").slice(0, 3).padEnd(3, "0"), l = w(n, r, i, a, o, s, Number(c || 0));
|
|
602
|
-
return l ? D(l, "iso-local") : null;
|
|
603
|
-
}
|
|
604
|
-
function wt(e) {
|
|
605
|
-
if (e[1].toUpperCase() === "Z") return 0;
|
|
606
|
-
let t = e[2] === "-" ? -1 : 1, n = Number(e[3]), r = Number(e[4]);
|
|
607
|
-
return !Number.isFinite(n) || !Number.isFinite(r) || n > 23 || r > 59 ? null : t * (n * Ye + r * Je);
|
|
608
|
-
}
|
|
609
|
-
function Tt(e, t = C) {
|
|
610
|
-
let n = Be.exec(e);
|
|
611
|
-
if (!n) return null;
|
|
612
|
-
let r = Ct(e.slice(0, n.index));
|
|
613
|
-
if (!r) return null;
|
|
614
|
-
if (t === "floating") return D(r.date, "iso-zoned");
|
|
615
|
-
let i = wt(n);
|
|
616
|
-
if (i === null) return null;
|
|
617
|
-
let a = r.date, o = Date.UTC(a.getFullYear(), a.getMonth(), a.getDate(), a.getHours(), a.getMinutes(), a.getSeconds(), a.getMilliseconds()) - i, s = new Date(o);
|
|
618
|
-
return Number.isNaN(s.getTime()) ? null : D(s, "iso-zoned");
|
|
619
|
-
}
|
|
620
|
-
function Et(e) {
|
|
621
|
-
if (!Ve.test(e)) return null;
|
|
622
|
-
let t = w(Number(e.slice(0, 4)), Number(e.slice(4, 6)), Number(e.slice(6, 8)));
|
|
623
|
-
return t ? D(t, "abap-compact") : null;
|
|
624
|
-
}
|
|
625
|
-
function Dt(e) {
|
|
626
|
-
if (!He.test(e)) return null;
|
|
627
|
-
let t = w(Number(e.slice(0, 4)), Number(e.slice(4, 6)), Number(e.slice(6, 8)), Number(e.slice(8, 10)), Number(e.slice(10, 12)), Number(e.slice(12, 14)));
|
|
628
|
-
return t ? D(t, "abap-timestamp") : null;
|
|
629
|
-
}
|
|
630
|
-
function Ot(e) {
|
|
631
|
-
let t = Ue.exec(e);
|
|
632
|
-
if (!t) return null;
|
|
633
|
-
let n = Number(t[1]), r = Number(t[2]), i = w(Number(t[3]), r, n);
|
|
634
|
-
return i ? D(i, "abap-dotted") : null;
|
|
635
|
-
}
|
|
636
|
-
function kt(e) {
|
|
637
|
-
let t = We.exec(e);
|
|
638
|
-
if (!t) return null;
|
|
639
|
-
let n = Number(t[1]), r = Number(t[2]), i = w(Number(t[3]), n, r);
|
|
640
|
-
return i ? D(i, "slash-date") : null;
|
|
641
|
-
}
|
|
642
|
-
function At(e, t = C) {
|
|
643
|
-
let n = Re.exec(e);
|
|
644
|
-
return n ? Mt(n[2].trim(), "odata-literal", t) : null;
|
|
645
|
-
}
|
|
646
|
-
function jt(e) {
|
|
647
|
-
let t = Ge.exec(e);
|
|
648
|
-
if (!t) return null;
|
|
649
|
-
let n = t[1] === "-" ? -1 : 1, r = Number(t[2] ?? 0), i = Number(t[3] ?? 0), a = Number(t[4] ?? 0), o = Number(t[5] ?? 0), s = Number(t[6] ?? 0), c = Number(t[7] ?? 0), l = (t[8] ?? "").slice(0, 3).padEnd(3, "0"), u = Number(l || 0);
|
|
650
|
-
return r || i || a || o || s || c || u ? {
|
|
651
|
-
kind: "duration",
|
|
652
|
-
source: "iso-duration",
|
|
653
|
-
durationMs: n * (r * Qe * Xe + i * Ze * Xe + a * Xe + o * Ye + s * Je + c * qe + u)
|
|
654
|
-
} : null;
|
|
655
|
-
}
|
|
656
|
-
function O(e, t) {
|
|
657
|
-
return t ? {
|
|
658
|
-
...e,
|
|
659
|
-
source: t
|
|
660
|
-
} : e;
|
|
661
|
-
}
|
|
662
|
-
function Mt(e, t, n = C) {
|
|
663
|
-
let r = Tt(e, n);
|
|
664
|
-
if (r) return O(r, t);
|
|
665
|
-
let i = Ct(e);
|
|
666
|
-
if (i) return O(i, t);
|
|
667
|
-
let a = Ot(e);
|
|
668
|
-
if (a) return O(a, t);
|
|
669
|
-
let o = kt(e);
|
|
670
|
-
if (o) return O(o, t);
|
|
671
|
-
let s = Dt(e);
|
|
672
|
-
if (s) return O(s, t);
|
|
673
|
-
let c = Et(e);
|
|
674
|
-
if (c) return O(c, t);
|
|
675
|
-
let l = Number(e);
|
|
676
|
-
if (/^-?\d+$/.test(e) && Number.isFinite(l)) {
|
|
677
|
-
let e = xt(l, n);
|
|
678
|
-
if (e) return O(e, t);
|
|
679
|
-
}
|
|
680
|
-
return null;
|
|
681
|
-
}
|
|
682
|
-
function Nt(e) {
|
|
683
|
-
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
684
|
-
}
|
|
685
|
-
function Pt(e) {
|
|
686
|
-
return e < $e ? 2e3 + e : 1900 + e;
|
|
687
|
-
}
|
|
688
|
-
function Ft(e, t = "dd.MM.yyyy", n = {}) {
|
|
689
|
-
if (typeof e != "string") return k(e);
|
|
690
|
-
let r = e.trim();
|
|
691
|
-
if (Ke.has(r.toLowerCase())) return null;
|
|
692
|
-
let i = n.precision ?? "day", a = g(t, i), o = [], s = 0, c = "^", l = null;
|
|
693
|
-
for (m.lastIndex = 0; (l = m.exec(a)) !== null;) c += Nt(a.slice(s, l.index)), o.push(l[0]), l[0] === "yyyy" ? c += "(\\d{4})" : c += "(\\d{2})", s = l.index + l[0].length;
|
|
694
|
-
if (o.length === 0) return null;
|
|
695
|
-
c += `${Nt(a.slice(s))}$`;
|
|
696
|
-
let u = new RegExp(c).exec(r);
|
|
697
|
-
if (!u) return null;
|
|
698
|
-
let d = null, f = null, p = null, ee = 0, te = 0, ne = 0;
|
|
699
|
-
for (let e = 0; e < o.length; e += 1) {
|
|
700
|
-
let t = o[e], n = u[e + 1], r = Number(n);
|
|
701
|
-
if (!Number.isFinite(r)) return null;
|
|
702
|
-
t === "yyyy" && (d = r), t === "yy" && (d = Pt(r)), t === "MM" && (f = r), t === "dd" && (p = r), t === "HH" && (ee = r), t === "mm" && (te = r), t === "ss" && (ne = r);
|
|
703
|
-
}
|
|
704
|
-
if (!d || i !== "year" && !f || i === "day" && !p) return null;
|
|
705
|
-
let h = w(d, f ?? 1, p ?? 1, ee, te, ne);
|
|
706
|
-
return h ? D(h, "iso-local") : null;
|
|
707
|
-
}
|
|
708
|
-
function It(e, t) {
|
|
709
|
-
let n = S(e), r = et[e];
|
|
710
|
-
return n?.pattern ? [g(n.pattern, t)] : r ? r.map((e) => g(e, t)) : !n && re(e) ? [g(e, t)] : [];
|
|
711
|
-
}
|
|
712
|
-
function Lt(e, t, n = {}) {
|
|
713
|
-
if (typeof e != "string") {
|
|
714
|
-
let t = k(e);
|
|
715
|
-
return t?.kind === "date-time" ? t : null;
|
|
716
|
-
}
|
|
717
|
-
let r = e.trim();
|
|
718
|
-
if (Ke.has(r.toLowerCase())) return null;
|
|
719
|
-
let i = n.precision ?? "day", a = Me(t, n.defaultFormat ?? y.date);
|
|
720
|
-
for (let e of It(a, i)) {
|
|
721
|
-
let t = Ft(r, e, { precision: i });
|
|
722
|
-
if (t?.kind === "date-time") return t;
|
|
723
|
-
}
|
|
724
|
-
if (i === "day") {
|
|
725
|
-
let e = k(r);
|
|
726
|
-
if (e?.kind === "date-time") return e;
|
|
727
|
-
}
|
|
728
|
-
let o = S(a)?.locale ?? n.locale ?? v.locale;
|
|
729
|
-
if (i === "day" && _t(a)) {
|
|
730
|
-
let e = pt(r, o, yt(n.referenceDate));
|
|
731
|
-
if (e) return e;
|
|
732
|
-
}
|
|
733
|
-
return i !== "year" && vt(a) ? mt(r, o) : gt(r, o, i);
|
|
734
|
-
}
|
|
735
|
-
function Rt(e, { mode: t = C } = {}) {
|
|
736
|
-
if (e == null) return null;
|
|
737
|
-
if (e instanceof Date) return Number.isNaN(e.getTime()) ? null : D(t === "instant" ? new Date(e.getTime()) : bt(e), "date-object");
|
|
738
|
-
if (typeof e == "number") return xt(e, t);
|
|
739
|
-
if (typeof e != "string") return null;
|
|
740
|
-
let n = e.trim();
|
|
741
|
-
return Ke.has(n.toLowerCase()) ? null : St(n, t) || At(n, t) || jt(n) || Mt(n, void 0, t);
|
|
742
|
-
}
|
|
743
|
-
function k(e) {
|
|
744
|
-
return Rt(e);
|
|
745
|
-
}
|
|
746
|
-
function zt(e) {
|
|
747
|
-
return Rt(e, { mode: "instant" });
|
|
748
|
-
}
|
|
749
|
-
function Bt(e) {
|
|
750
|
-
if (!e) return null;
|
|
751
|
-
if (e.kind === "date-time") return e.date;
|
|
752
|
-
let t = new Date(e.durationMs);
|
|
753
|
-
return Number.isNaN(t.getTime()) ? null : E(t);
|
|
754
|
-
}
|
|
755
|
-
function Vt(e) {
|
|
756
|
-
return Bt(k(e));
|
|
757
|
-
}
|
|
758
|
-
function Ht(e) {
|
|
759
|
-
return Bt(zt(e));
|
|
760
|
-
}
|
|
761
|
-
//#endregion
|
|
762
|
-
//#region src/formatters/date/formatDate.ts
|
|
763
|
-
var Ut = /* @__PURE__ */ new WeakMap();
|
|
764
|
-
function Wt(e) {
|
|
765
|
-
return String(e).padStart(2, "0");
|
|
766
|
-
}
|
|
767
|
-
function Gt(e) {
|
|
768
|
-
if (typeof e != "string") {
|
|
769
|
-
let t = Ut.get(e);
|
|
770
|
-
if (t) return t;
|
|
771
|
-
let n = Ce(e);
|
|
772
|
-
return Ut.set(e, n), n;
|
|
773
|
-
}
|
|
774
|
-
let t = Oe(e);
|
|
775
|
-
if (!t) throw Error(`Предустановка даты "${e}" не найдена`);
|
|
776
|
-
return t;
|
|
777
|
-
}
|
|
778
|
-
function Kt(e, t) {
|
|
779
|
-
return t?.fallback ?? e.invalidFallback;
|
|
780
|
-
}
|
|
781
|
-
function qt(e, t, n, r) {
|
|
782
|
-
return e.kind === "duration" ? t.formatDuration ? t.formatDuration(e.durationMs, n) : n : t.formatDateTime(e.date, r);
|
|
783
|
-
}
|
|
784
|
-
function A(e, t = y.date, n) {
|
|
785
|
-
let r = Gt(t), i = Kt(r, n), a = n?.precision ?? "day", o = k(e);
|
|
786
|
-
return o ? qt(o, r, i, a) : i;
|
|
787
|
-
}
|
|
788
|
-
function Jt(e, t) {
|
|
789
|
-
return A(e, y.date, t);
|
|
790
|
-
}
|
|
791
|
-
function Yt(e, t) {
|
|
792
|
-
return A(e, y.datetime, t);
|
|
793
|
-
}
|
|
794
|
-
function Xt(e, t) {
|
|
795
|
-
return A(e, y.time, t);
|
|
796
|
-
}
|
|
797
|
-
function Zt(e, t) {
|
|
798
|
-
return A(e, y.timeSeconds, t);
|
|
799
|
-
}
|
|
800
|
-
function Qt(e, t) {
|
|
801
|
-
return A(e, y.dateShort, t);
|
|
802
|
-
}
|
|
803
|
-
function $t(e, t) {
|
|
804
|
-
return A(e, y.dateMedium, t);
|
|
805
|
-
}
|
|
806
|
-
function en(e, t) {
|
|
807
|
-
return A(e, y.dateLong, t);
|
|
808
|
-
}
|
|
809
|
-
function tn(e, t) {
|
|
810
|
-
return A(e, y.monthShort, t);
|
|
811
|
-
}
|
|
812
|
-
function nn(e, t) {
|
|
813
|
-
return A(e, y.monthMedium, t);
|
|
814
|
-
}
|
|
815
|
-
function rn(e, t) {
|
|
816
|
-
return A(e, y.monthLong, t);
|
|
817
|
-
}
|
|
818
|
-
function an(e, t) {
|
|
819
|
-
return A(e, y.monthYearMedium, t);
|
|
820
|
-
}
|
|
821
|
-
function on(e, t) {
|
|
822
|
-
return A(e, y.monthYearLong, t);
|
|
823
|
-
}
|
|
824
|
-
function sn(e, t) {
|
|
825
|
-
return A(e, y.timeShort, t);
|
|
826
|
-
}
|
|
827
|
-
function cn(e, t) {
|
|
828
|
-
return A(e, y.timeMedium, t);
|
|
829
|
-
}
|
|
830
|
-
function ln(e, t) {
|
|
831
|
-
return A(e, y.timeLong, t);
|
|
832
|
-
}
|
|
833
|
-
function un(e, t) {
|
|
834
|
-
return A(e, y.datetimeShort, t);
|
|
835
|
-
}
|
|
836
|
-
function dn(e, t) {
|
|
837
|
-
return A(e, y.datetimeMedium, t);
|
|
838
|
-
}
|
|
839
|
-
function fn(e, t) {
|
|
840
|
-
return A(e, y.datetimeLong, t);
|
|
841
|
-
}
|
|
842
|
-
function pn(e, t, n = y.date, r) {
|
|
843
|
-
let i = Gt(n), a = Kt(i, r), o = r?.precision ?? "day", s = k(e), c = k(t);
|
|
844
|
-
if (!s || !c) return a;
|
|
845
|
-
let l = qt(s, i, a, o), u = qt(c, i, a, o);
|
|
846
|
-
return !l || !u ? a : `${l} - ${u}`;
|
|
847
|
-
}
|
|
848
|
-
function mn(e, t) {
|
|
849
|
-
return A(e, y.abapYear, t);
|
|
850
|
-
}
|
|
851
|
-
function hn(e, t) {
|
|
852
|
-
return A(e, y.abapMonth, t);
|
|
853
|
-
}
|
|
854
|
-
function gn(e, t) {
|
|
855
|
-
return A(e, y.abapDate, t);
|
|
856
|
-
}
|
|
857
|
-
function _n(e, t) {
|
|
858
|
-
return A(e, y.abapDatetime, t);
|
|
859
|
-
}
|
|
860
|
-
function vn(e, t) {
|
|
861
|
-
return A(e, y.odataDate, t);
|
|
862
|
-
}
|
|
863
|
-
function yn(e, t) {
|
|
864
|
-
return A(e, y.odataDatetime, t);
|
|
865
|
-
}
|
|
866
|
-
function bn(e, t) {
|
|
867
|
-
let n = t?.fallback ?? "", r = k(e);
|
|
868
|
-
if (!r) return n;
|
|
869
|
-
if (r.kind === "duration") {
|
|
870
|
-
let e = Gt(y.timeSeconds).formatDuration?.(r.durationMs, n) ?? n;
|
|
871
|
-
if (e === n) return n;
|
|
872
|
-
let [t = "00", i = "00", a = "00"] = e.split(":");
|
|
873
|
-
return `PT${t}H${i}M${a}S`;
|
|
874
|
-
}
|
|
875
|
-
let i = r.date;
|
|
876
|
-
return `PT${Wt(i.getHours())}H${Wt(i.getMinutes())}M${Wt(i.getSeconds())}S`;
|
|
877
|
-
}
|
|
878
|
-
//#endregion
|
|
879
|
-
//#region src/odata-service/baseTypes.ts
|
|
880
|
-
var xn = Object.freeze([
|
|
881
|
-
"string",
|
|
882
|
-
"number",
|
|
883
|
-
"boolean",
|
|
884
|
-
"date"
|
|
885
|
-
]), Sn = new Set(xn), Cn = Object.freeze({
|
|
886
|
-
string: "строка",
|
|
887
|
-
number: "число",
|
|
888
|
-
boolean: "boolean",
|
|
889
|
-
date: "дата"
|
|
890
|
-
});
|
|
891
|
-
function wn(e) {
|
|
892
|
-
return typeof e == "string" && Sn.has(e);
|
|
893
|
-
}
|
|
894
|
-
function Tn(e) {
|
|
895
|
-
return Cn[e];
|
|
896
|
-
}
|
|
897
|
-
//#endregion
|
|
898
|
-
//#region src/odata-service/buildSeparatedArrays.ts
|
|
899
|
-
function En(e) {
|
|
900
|
-
let t = {};
|
|
901
|
-
return e.forEach((e) => {
|
|
902
|
-
t[e.codeKey] = [];
|
|
903
|
-
}), t;
|
|
904
|
-
}
|
|
905
|
-
function Dn(e, n, r = !0, i = !0) {
|
|
906
|
-
if (!e || e.length === 0) return En(n);
|
|
907
|
-
let a = /* @__PURE__ */ new Set(), o = e[0];
|
|
908
|
-
o && Object.keys(o).forEach((e) => {
|
|
909
|
-
a.add(e);
|
|
910
|
-
});
|
|
911
|
-
let s = n.filter((e) => a.has(e.codeKey) && a.has(e.textKey));
|
|
912
|
-
if (s.length === 0) return En(n);
|
|
913
|
-
let c = {}, l = /* @__PURE__ */ new Map();
|
|
914
|
-
for (let e of s) {
|
|
915
|
-
let t = e.codeKey;
|
|
916
|
-
l.set(t, {
|
|
917
|
-
codeKey: e.codeKey,
|
|
918
|
-
textKey: e.textKey,
|
|
919
|
-
uniqueSet: /* @__PURE__ */ new Set()
|
|
920
|
-
}), c[t] = [];
|
|
921
|
-
}
|
|
922
|
-
n.forEach((e) => {
|
|
923
|
-
let t = e.codeKey;
|
|
924
|
-
l.has(t) || (c[t] = []);
|
|
925
|
-
});
|
|
926
|
-
for (let t of e) for (let [e, n] of l) {
|
|
927
|
-
let { codeKey: i, textKey: a, uniqueSet: o } = n, s = String(t[i]), l = String(t[a]);
|
|
928
|
-
if (r && !l || s == null) continue;
|
|
929
|
-
let u = `${String(s)}|${String(l)}`;
|
|
930
|
-
o.has(u) || (o.add(u), c[e].push({
|
|
931
|
-
[i]: s,
|
|
932
|
-
[a]: l
|
|
933
|
-
}));
|
|
934
|
-
}
|
|
935
|
-
for (let [e, n] of l) {
|
|
936
|
-
let r = c[e];
|
|
937
|
-
if (r.length > 0) {
|
|
938
|
-
let e = i ? n.codeKey : n.textKey;
|
|
939
|
-
r.sort((n, r) => {
|
|
940
|
-
let i = n[e] || "", a = r[e] || "";
|
|
941
|
-
return t(String(i), String(a));
|
|
942
|
-
});
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
return c;
|
|
946
|
-
}
|
|
947
|
-
//#endregion
|
|
948
|
-
//#region src/odata-service/dateUtils.ts
|
|
949
|
-
var j = {
|
|
950
|
-
datetime(e) {
|
|
951
|
-
return `datetime'${yn(e)}'`;
|
|
952
|
-
},
|
|
953
|
-
datetimeOffset(e) {
|
|
954
|
-
return `datetimeoffset'${e.toISOString()}'`;
|
|
955
|
-
},
|
|
956
|
-
time(e) {
|
|
957
|
-
return `time'${bn(e)}'`;
|
|
958
|
-
}
|
|
959
|
-
}, M = {
|
|
960
|
-
string: n.string(),
|
|
961
|
-
guid: n.uuid().or(n.string().regex(/^[0-9a-fA-F-]+$/, "Invalid GUID")),
|
|
962
|
-
boolean: n.boolean(),
|
|
963
|
-
int: n.number().int(),
|
|
964
|
-
long: n.number().int(),
|
|
965
|
-
float: n.number(),
|
|
966
|
-
decimal: n.number(),
|
|
967
|
-
double: n.number(),
|
|
968
|
-
datetime: n.date(),
|
|
969
|
-
datetimeOffset: n.date(),
|
|
970
|
-
time: n.date(),
|
|
971
|
-
binary: n.string(),
|
|
972
|
-
byte: n.number().int().min(0).max(255)
|
|
973
|
-
};
|
|
974
|
-
function N(e, t) {
|
|
975
|
-
return t.safeParse(e).success;
|
|
976
|
-
}
|
|
977
|
-
function On(e) {
|
|
978
|
-
return N(e, M.string);
|
|
979
|
-
}
|
|
980
|
-
function kn(e) {
|
|
981
|
-
return N(e, M.float);
|
|
982
|
-
}
|
|
983
|
-
function An(e) {
|
|
984
|
-
return N(e, M.boolean);
|
|
985
|
-
}
|
|
986
|
-
function jn(e) {
|
|
987
|
-
return N(e, M.datetime);
|
|
988
|
-
}
|
|
989
|
-
//#endregion
|
|
990
|
-
//#region src/odata-service/formatters.ts
|
|
991
|
-
function P(e, t) {
|
|
992
|
-
switch (e) {
|
|
993
|
-
case "string": return `'${String(t).replace(/'/g, "''")}'`;
|
|
994
|
-
case "guid": return `guid'${String(t)}'`;
|
|
995
|
-
case "boolean": return t ? "'X'" : "' '";
|
|
996
|
-
case "long": return `${String(t)}L`;
|
|
997
|
-
case "float": return `${String(t)}F`;
|
|
998
|
-
case "decimal": return `${String(t)}M`;
|
|
999
|
-
case "double": return `${String(t)}D`;
|
|
1000
|
-
case "datetime":
|
|
1001
|
-
case "datetimeOffset":
|
|
1002
|
-
case "time":
|
|
1003
|
-
if (!(t instanceof Date)) throw Error(`Неверная дата для типа '${e}': ${t}`);
|
|
1004
|
-
return j[e](t);
|
|
1005
|
-
case "binary": return `binary'${t}'`;
|
|
1006
|
-
case "byte":
|
|
1007
|
-
case "int": return `${String(t)}`;
|
|
1008
|
-
default: throw Error(`Неподдерживаемый тип: ${e}`);
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
function Mn(e, t) {
|
|
1012
|
-
let n = M[e].safeParse(t);
|
|
1013
|
-
if (!n.success) throw Error(`Некорректное значение для типа '${e}': ${n.error.issues[0]?.message ?? t}`);
|
|
1014
|
-
return P(e, n.data);
|
|
1015
|
-
}
|
|
1016
|
-
function Nn(e) {
|
|
1017
|
-
if (typeof e == "boolean") return e;
|
|
1018
|
-
if (typeof e == "number") return e === 1 || e !== 0 && void 0;
|
|
1019
|
-
if (typeof e != "string") return;
|
|
1020
|
-
if (e === "X") return !0;
|
|
1021
|
-
if (e === " " || e === "") return !1;
|
|
1022
|
-
let t = e.trim().toLowerCase();
|
|
1023
|
-
if (t === "true" || t === "1") return !0;
|
|
1024
|
-
if (t === "false" || t === "0") return !1;
|
|
1025
|
-
}
|
|
1026
|
-
function Pn(e) {
|
|
1027
|
-
if (e == null) return !1;
|
|
1028
|
-
if (typeof e == "string" && (e === "X" || e === " " || e === "")) return a(e);
|
|
1029
|
-
}
|
|
1030
|
-
function Fn(e, t) {
|
|
1031
|
-
switch (e) {
|
|
1032
|
-
case "boolean": return Nn(t) ?? t;
|
|
1033
|
-
case "int":
|
|
1034
|
-
case "long":
|
|
1035
|
-
case "float":
|
|
1036
|
-
case "decimal":
|
|
1037
|
-
case "double":
|
|
1038
|
-
case "byte": return c(t);
|
|
1039
|
-
case "datetime":
|
|
1040
|
-
case "datetimeOffset":
|
|
1041
|
-
case "time": return Vt(t);
|
|
1042
|
-
default: return String(t);
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
function In(e, t) {
|
|
1046
|
-
if (e.abapBooleanLike) {
|
|
1047
|
-
let e = Pn(t);
|
|
1048
|
-
if (e !== void 0) return e;
|
|
1049
|
-
}
|
|
1050
|
-
return Fn(e.type, t);
|
|
1051
|
-
}
|
|
1052
|
-
function Ln(e) {
|
|
1053
|
-
switch (e) {
|
|
1054
|
-
case "boolean": return !1;
|
|
1055
|
-
case "int":
|
|
1056
|
-
case "long":
|
|
1057
|
-
case "float":
|
|
1058
|
-
case "decimal":
|
|
1059
|
-
case "double":
|
|
1060
|
-
case "byte": return 0;
|
|
1061
|
-
case "datetime":
|
|
1062
|
-
case "datetimeOffset":
|
|
1063
|
-
case "time": return /* @__PURE__ */ new Date();
|
|
1064
|
-
default: return "";
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
function Rn(e) {
|
|
1068
|
-
switch (e) {
|
|
1069
|
-
case "boolean": return !1;
|
|
1070
|
-
case "number": return 0;
|
|
1071
|
-
case "date": return /* @__PURE__ */ new Date();
|
|
1072
|
-
default: return "";
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
function F(e, t) {
|
|
1076
|
-
return (...n) => {
|
|
1077
|
-
let r = e.safeParse(n);
|
|
1078
|
-
if (!r.success) throw Error(`Validation failed: ${r.error.message}`);
|
|
1079
|
-
return t(...r.data);
|
|
1080
|
-
};
|
|
1081
|
-
}
|
|
1082
|
-
function I(e) {
|
|
1083
|
-
return F(n.array(n.boolean()), e);
|
|
1084
|
-
}
|
|
1085
|
-
function zn(e) {
|
|
1086
|
-
return F(n.array(n.string()), e);
|
|
1087
|
-
}
|
|
1088
|
-
function Bn(e) {
|
|
1089
|
-
return F(n.array(n.number()), e);
|
|
1090
|
-
}
|
|
1091
|
-
function L(e) {
|
|
1092
|
-
return F(n.array(n.date()), e);
|
|
1093
|
-
}
|
|
1094
|
-
var Vn = L(j.datetime), Hn = L(j.datetimeOffset), Un = L(j.time), Wn = L((e) => P("string", gn(e))), Gn = I((e) => P("boolean", e)), Kn = I((e) => P("string", Number(e))), qn = I((e) => P("byte", Number(e))), Jn = zn((e) => P("string", e)), R = {
|
|
1095
|
-
date: {
|
|
1096
|
-
base: {
|
|
1097
|
-
label: "Базовый datetime",
|
|
1098
|
-
description: "Используется для параметров OData с типом данных datetime",
|
|
1099
|
-
fn: Vn
|
|
1100
|
-
},
|
|
1101
|
-
datetimeOffset: {
|
|
1102
|
-
label: "Базовый datetimeoffset",
|
|
1103
|
-
description: "Используется для параметров OData с типом данных datetimeoffset",
|
|
1104
|
-
fn: Hn
|
|
1105
|
-
},
|
|
1106
|
-
time: {
|
|
1107
|
-
label: "Базовый time",
|
|
1108
|
-
description: "Используется для параметров OData с типом данных time",
|
|
1109
|
-
fn: Un
|
|
1110
|
-
},
|
|
1111
|
-
stringAbapDate: {
|
|
1112
|
-
label: "Дата ABAP YYYYMMDD",
|
|
1113
|
-
description: "Используется для параметров OData с типом данных string(8)",
|
|
1114
|
-
fn: Wn
|
|
1115
|
-
}
|
|
1116
|
-
},
|
|
1117
|
-
boolean: {
|
|
1118
|
-
base: {
|
|
1119
|
-
label: "Базовое ABAP булево",
|
|
1120
|
-
description: "Стандартный формат abap_bool со значением 'X' для true и '' для false",
|
|
1121
|
-
fn: Gn
|
|
1122
|
-
},
|
|
1123
|
-
asChar: {
|
|
1124
|
-
label: "Как символ",
|
|
1125
|
-
description: "Преобразование булево в символы '0' или '1'",
|
|
1126
|
-
fn: Kn
|
|
1127
|
-
},
|
|
1128
|
-
asByte: {
|
|
1129
|
-
label: "Как цифра",
|
|
1130
|
-
description: "Преобразование булево в цифру 0 или 1",
|
|
1131
|
-
fn: qn
|
|
1132
|
-
}
|
|
1133
|
-
},
|
|
1134
|
-
string: { base: {
|
|
1135
|
-
label: "Базовая строка",
|
|
1136
|
-
description: "",
|
|
1137
|
-
fn: Jn
|
|
1138
|
-
} }
|
|
1139
|
-
};
|
|
1140
|
-
function Yn(e) {
|
|
1141
|
-
switch (e) {
|
|
1142
|
-
case "boolean": return "boolean";
|
|
1143
|
-
case "int":
|
|
1144
|
-
case "long":
|
|
1145
|
-
case "float":
|
|
1146
|
-
case "decimal":
|
|
1147
|
-
case "double":
|
|
1148
|
-
case "byte": return "number";
|
|
1149
|
-
case "datetime":
|
|
1150
|
-
case "datetimeOffset":
|
|
1151
|
-
case "time": return "date";
|
|
1152
|
-
default: return "string";
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
function Xn(e) {
|
|
1156
|
-
let t = R[Yn(e)];
|
|
1157
|
-
return t ? Object.entries(t).map(([e, t]) => ({
|
|
1158
|
-
id: e,
|
|
1159
|
-
...t
|
|
1160
|
-
})) : [];
|
|
1161
|
-
}
|
|
1162
|
-
function Zn(e) {
|
|
1163
|
-
let t = R[e];
|
|
1164
|
-
return t ? Object.entries(t).map(([e, t]) => ({
|
|
1165
|
-
id: e,
|
|
1166
|
-
...t
|
|
1167
|
-
})) : [];
|
|
1168
|
-
}
|
|
1169
|
-
function Qn(e, t) {
|
|
1170
|
-
return R[Yn(e)]?.[t];
|
|
1171
|
-
}
|
|
1172
|
-
function $n(e, t) {
|
|
1173
|
-
return R[e]?.[t];
|
|
1174
|
-
}
|
|
1175
|
-
//#endregion
|
|
1176
|
-
//#region src/odata-service/builder.ts
|
|
1177
|
-
function er(e, t) {
|
|
1178
|
-
if (!t || typeof t != "number") return;
|
|
1179
|
-
let n = e.match(/^'(.*)'$/s);
|
|
1180
|
-
if (!n) throw Error(`Значение должно быть заключено в одинарные кавычки: ${e}`);
|
|
1181
|
-
let r = n[1];
|
|
1182
|
-
if (r.length > t) throw Error(`Значение слишком длинное для maxLength=${t}: '${e}' (${r.length} символов внутри кавычек)`);
|
|
1183
|
-
}
|
|
1184
|
-
function tr(e, t) {
|
|
1185
|
-
return e.parameters ? e.parameters.map((e) => {
|
|
1186
|
-
let { id: n, type: r, maxLength: i, mandatory: a } = e, o = t[n] ?? {}, s = o.value, c = o.formatter;
|
|
1187
|
-
if (a && s == null) throw Error(`Отсутствует обязательный параметр: ${n}`);
|
|
1188
|
-
if (s == null) return null;
|
|
1189
|
-
try {
|
|
1190
|
-
if (Array.isArray(s) && !c) throw Error("Массив значений OData-параметра требует custom formatter");
|
|
1191
|
-
let e = c ? c(s) : Mn(r, s);
|
|
1192
|
-
return er(e, i), [n, e];
|
|
1193
|
-
} catch (e) {
|
|
1194
|
-
throw Error(`Ошибка форматирования параметра ${n}: ${String(e)}`);
|
|
1195
|
-
}
|
|
1196
|
-
}).filter((e) => e !== null) : [];
|
|
1197
|
-
}
|
|
1198
|
-
function nr(e, t) {
|
|
1199
|
-
let n = tr(e, t);
|
|
1200
|
-
return n.length ? `(${n.map(([e, t]) => `${e}=${encodeURIComponent(t)}`).join(",")})` : "";
|
|
1201
|
-
}
|
|
1202
|
-
function rr(e, t) {
|
|
1203
|
-
let n = new URLSearchParams();
|
|
1204
|
-
for (let [r, i] of tr(e, t)) n.set(r, i);
|
|
1205
|
-
return n;
|
|
1206
|
-
}
|
|
1207
|
-
function ir(e, t, n, r) {
|
|
1208
|
-
let i = `/${t.service}/${t.target}`;
|
|
1209
|
-
return r === "create" ? i : r === "query" ? e.result ? or(e, t, n) : (__DEV__ && Object.keys(n).length > 0 && console.warn(`Параметры для query-запроса '/${t.service}/${t.target}' проигнорированы: target не поддерживает parameterized query.`), i) : `${i}${nr(e, n)}`;
|
|
1210
|
-
}
|
|
1211
|
-
function ar(e, t, n) {
|
|
1212
|
-
let r = rr(e, n).toString(), i = `/${t.service}/${t.target}`;
|
|
1213
|
-
return r ? `${i}?${r}` : i;
|
|
1214
|
-
}
|
|
1215
|
-
function or(e, t, n) {
|
|
1216
|
-
let r = nr(e, n), i = e.result ? `/${e.result}` : "";
|
|
1217
|
-
return `/${t.service}/${t.target}${r}${i}`;
|
|
1218
|
-
}
|
|
1219
|
-
//#endregion
|
|
1220
|
-
//#region src/odata-service/columns.ts
|
|
1221
|
-
function sr(e) {
|
|
1222
|
-
return e.filter((e) => e.semanticType === "code" && e.filterable);
|
|
1223
|
-
}
|
|
1224
|
-
function cr(e) {
|
|
1225
|
-
return new Set(sr(e).map((e) => e.id));
|
|
1226
|
-
}
|
|
1227
|
-
//#endregion
|
|
1228
|
-
//#region src/odata-service/filters.ts
|
|
1229
|
-
var lr = Object.freeze({
|
|
1230
|
-
eq: "eq",
|
|
1231
|
-
ne: "ne",
|
|
1232
|
-
gt: "gt",
|
|
1233
|
-
ge: "ge",
|
|
1234
|
-
lt: "lt",
|
|
1235
|
-
le: "le",
|
|
1236
|
-
startswith: "startswith",
|
|
1237
|
-
endswith: "endswith",
|
|
1238
|
-
contains: "contains"
|
|
1239
|
-
}), ur = Object.freeze(Object.values(lr)), dr = Object.freeze({
|
|
1240
|
-
eq: "равно",
|
|
1241
|
-
ne: "не равно",
|
|
1242
|
-
gt: "больше",
|
|
1243
|
-
ge: "больше или равно",
|
|
1244
|
-
lt: "меньше",
|
|
1245
|
-
le: "меньше или равно",
|
|
1246
|
-
startswith: "начинается с",
|
|
1247
|
-
endswith: "заканчивается на",
|
|
1248
|
-
contains: "содержит"
|
|
1249
|
-
}), fr = new Set(ur);
|
|
1250
|
-
function pr(e) {
|
|
1251
|
-
return typeof e == "string" && fr.has(e);
|
|
1252
|
-
}
|
|
1253
|
-
function mr(e) {
|
|
1254
|
-
return dr[e];
|
|
1255
|
-
}
|
|
1256
|
-
function hr(e) {
|
|
1257
|
-
switch (typeof e) {
|
|
1258
|
-
case "bigint":
|
|
1259
|
-
case "number": return "int";
|
|
1260
|
-
case "boolean": return "boolean";
|
|
1261
|
-
case "object": if (e instanceof Date) return "datetime";
|
|
1262
|
-
}
|
|
1263
|
-
return "string";
|
|
1264
|
-
}
|
|
1265
|
-
function gr(e) {
|
|
1266
|
-
let { key: t, operation: n = "eq", value: r, type: i } = e, a = Mn(i ?? hr(r), r);
|
|
1267
|
-
return n === "contains" ? `substringof(${a},${String(t)})` : n === "startswith" || n === "endswith" ? `${n}(${String(t)}, ${a})` : `${String(t)} ${n} ${a}`;
|
|
1268
|
-
}
|
|
1269
|
-
function _r(e) {
|
|
1270
|
-
return "conditions" in e && e.conditions !== void 0;
|
|
1271
|
-
}
|
|
1272
|
-
function vr(e) {
|
|
1273
|
-
return "filters" in e && e.filters !== void 0;
|
|
1274
|
-
}
|
|
1275
|
-
function yr(e, t) {
|
|
1276
|
-
let n = [];
|
|
1277
|
-
for (let r of e) {
|
|
1278
|
-
let e = t(r);
|
|
1279
|
-
e && n.push(e);
|
|
1280
|
-
}
|
|
1281
|
-
return n;
|
|
1282
|
-
}
|
|
1283
|
-
function br(e) {
|
|
1284
|
-
if (!e) return "";
|
|
1285
|
-
if (_r(e)) {
|
|
1286
|
-
let { conditions: t, and: n = !1 } = e;
|
|
1287
|
-
if (t.length === 0) return "";
|
|
1288
|
-
if (t.length === 1) return gr(t[0]);
|
|
1289
|
-
let r = n ? "and" : "or";
|
|
1290
|
-
return `(${t.map(gr).join(` ${r} `)})`;
|
|
1291
|
-
}
|
|
1292
|
-
if (vr(e)) {
|
|
1293
|
-
let { filters: t, and: n = !1 } = e;
|
|
1294
|
-
if (t.length === 0) return "";
|
|
1295
|
-
if (t.length === 1) return br(t[0]);
|
|
1296
|
-
let r = n ? "and" : "or", i = yr(t, br);
|
|
1297
|
-
return i.length === 0 ? "" : i.length === 1 ? i[0] : `(${i.join(` ${r} `)})`;
|
|
1298
|
-
}
|
|
1299
|
-
throw Error("Некорректное выражение фильтра");
|
|
1300
|
-
}
|
|
1301
|
-
function xr(e) {
|
|
1302
|
-
let t = (e) => {
|
|
1303
|
-
if (!e) return "";
|
|
1304
|
-
if (_r(e)) {
|
|
1305
|
-
let { conditions: t, and: n = !1 } = e;
|
|
1306
|
-
if (t.length === 0) return "";
|
|
1307
|
-
if (t.length === 1) return gr(t[0]);
|
|
1308
|
-
let r = n ? "and" : "or";
|
|
1309
|
-
return `(${t.map(gr).join(` ${r} `)})`;
|
|
1310
|
-
}
|
|
1311
|
-
if (vr(e)) {
|
|
1312
|
-
let { filters: n, and: r = !1 } = e;
|
|
1313
|
-
if (n.length === 0) return "";
|
|
1314
|
-
if (n.length === 1) return t(n[0]);
|
|
1315
|
-
let i = r ? "and" : "or", a = yr(n, t).map((e) => e.includes(" ") ? `(${e})` : e);
|
|
1316
|
-
return a.length === 0 ? "" : a.length === 1 ? a[0] : `(${a.join(` ${i} `)})`;
|
|
1317
|
-
}
|
|
1318
|
-
return "";
|
|
1319
|
-
};
|
|
1320
|
-
return t(e);
|
|
1321
|
-
}
|
|
1322
|
-
function Sr(e, t, n) {
|
|
1323
|
-
if (t == null) return { conditions: [] };
|
|
1324
|
-
if (Array.isArray(t)) {
|
|
1325
|
-
let r = [];
|
|
1326
|
-
for (let i of t) i != null && r.push({
|
|
1327
|
-
key: e,
|
|
1328
|
-
value: i,
|
|
1329
|
-
operation: n
|
|
1330
|
-
});
|
|
1331
|
-
return { conditions: r };
|
|
1332
|
-
}
|
|
1333
|
-
return { conditions: [{
|
|
1334
|
-
key: e,
|
|
1335
|
-
value: t,
|
|
1336
|
-
operation: n
|
|
1337
|
-
}] };
|
|
1338
|
-
}
|
|
1339
|
-
function Cr(e, t) {
|
|
1340
|
-
if (!t) return { conditions: [] };
|
|
1341
|
-
let n = t[0], r = t[1];
|
|
1342
|
-
return n == null || r == null ? n ? { conditions: [{
|
|
1343
|
-
key: e,
|
|
1344
|
-
value: n,
|
|
1345
|
-
operation: "ge"
|
|
1346
|
-
}] } : r ? { conditions: [{
|
|
1347
|
-
key: e,
|
|
1348
|
-
value: r,
|
|
1349
|
-
operation: "le"
|
|
1350
|
-
}] } : { conditions: [] } : {
|
|
1351
|
-
and: !0,
|
|
1352
|
-
conditions: [{
|
|
1353
|
-
key: e,
|
|
1354
|
-
value: n,
|
|
1355
|
-
operation: "ge"
|
|
1356
|
-
}, {
|
|
1357
|
-
key: e,
|
|
1358
|
-
value: r,
|
|
1359
|
-
operation: "le"
|
|
1360
|
-
}]
|
|
1361
|
-
};
|
|
1362
|
-
}
|
|
1363
|
-
function z(e, t) {
|
|
1364
|
-
return Sr(e, t, "eq");
|
|
1365
|
-
}
|
|
1366
|
-
function wr(e, t) {
|
|
1367
|
-
return Sr(e, Array.isArray(t) ? t.map((e) => e || null) : t || null, "eq");
|
|
1368
|
-
}
|
|
1369
|
-
function Tr(e, t) {
|
|
1370
|
-
return Sr(e, t, "contains");
|
|
1371
|
-
}
|
|
1372
|
-
function Er(e, t) {
|
|
1373
|
-
return e ? t ? {
|
|
1374
|
-
and: !0,
|
|
1375
|
-
filters: [e, t]
|
|
1376
|
-
} : e : t;
|
|
1377
|
-
}
|
|
1378
|
-
//#endregion
|
|
1379
|
-
//#region src/odata-service/filterDefinitions.ts
|
|
1380
|
-
function Dr(e) {
|
|
1381
|
-
return e === "select" || e === "multi-select" || e === "checkbox" || e === "text-input" || e === "number-input";
|
|
1382
|
-
}
|
|
1383
|
-
function B(e, t) {
|
|
1384
|
-
return e?.conditions.length ? e.conditions.map((e) => e.columnId?.trim() || t).filter((e) => !!e) : [];
|
|
1385
|
-
}
|
|
1386
|
-
function Or(e, t) {
|
|
1387
|
-
let n = e.kind === "list" ? e.options.flatMap((e) => B(e.filter, t)) : e.kind === "boolean" ? B(e.trueFilter, t) : B(e.valueFilter, t);
|
|
1388
|
-
return [...new Set(n.length ? n : t ? [t] : [])];
|
|
1389
|
-
}
|
|
1390
|
-
function V(e, t) {
|
|
1391
|
-
let n = B(e, t);
|
|
1392
|
-
return n.length ? n : t ? [t] : [];
|
|
1393
|
-
}
|
|
1394
|
-
function kr(e) {
|
|
1395
|
-
return e.kind === "registered" ? e.valueMode === "multiple" : e.componentId === "multi-select";
|
|
1396
|
-
}
|
|
1397
|
-
function Ar(e) {
|
|
1398
|
-
return Array.isArray(e) ? [...new Set(e.filter((e) => typeof e == "string").map((e) => e.trim()))] : [];
|
|
1399
|
-
}
|
|
1400
|
-
function jr(e, t) {
|
|
1401
|
-
if (kr(e)) return Ar(t);
|
|
1402
|
-
let n = H(t);
|
|
1403
|
-
return typeof n == "string" ? [n] : [];
|
|
1404
|
-
}
|
|
1405
|
-
function Mr(e) {
|
|
1406
|
-
let t = K([e])[0];
|
|
1407
|
-
return t ? t.kind === "registered" ? [...t.columnIds] : t.kind === "segment" || t.kind === "column" || t.kind === "advanced" ? [t.ownerColumnId] : [...t.columnIds] : [];
|
|
1408
|
-
}
|
|
1409
|
-
function Nr(e, t) {
|
|
1410
|
-
let n = K([e])[0], r = q(t);
|
|
1411
|
-
if (!n || r === void 0) return [];
|
|
1412
|
-
switch (n.kind) {
|
|
1413
|
-
case "segment":
|
|
1414
|
-
case "column":
|
|
1415
|
-
case "advanced": return [n.ownerColumnId];
|
|
1416
|
-
case "tree": {
|
|
1417
|
-
let e = W(r);
|
|
1418
|
-
return e ? Object.keys(e).filter((e) => n.columnIds.includes(e)) : [];
|
|
1419
|
-
}
|
|
1420
|
-
case "local":
|
|
1421
|
-
if (n.binding.kind === "list") {
|
|
1422
|
-
let e = jr(n, r);
|
|
1423
|
-
return [...new Set(e.flatMap((e) => {
|
|
1424
|
-
let t = n.binding.kind === "list" ? n.binding.options.find((t) => t.key === e) : void 0;
|
|
1425
|
-
return t ? V(t.filter, n.ownerColumnId) : [];
|
|
1426
|
-
}))];
|
|
1427
|
-
}
|
|
1428
|
-
return n.binding.kind === "boolean" ? r === !0 ? V(n.binding.trueFilter, n.ownerColumnId) : [] : V(n.binding.valueFilter, n.ownerColumnId);
|
|
1429
|
-
case "registered": {
|
|
1430
|
-
let e = n.binding;
|
|
1431
|
-
if (!e) return [];
|
|
1432
|
-
if (e.kind === "list") {
|
|
1433
|
-
let t = jr(n, r);
|
|
1434
|
-
return [...new Set(t.flatMap((t) => {
|
|
1435
|
-
let n = e.options.find((e) => e.key === t);
|
|
1436
|
-
return n ? V(n.filter, "") : [];
|
|
1437
|
-
}))];
|
|
1438
|
-
}
|
|
1439
|
-
return e.kind === "boolean" ? r === !0 ? V(e.trueFilter, "") : [] : V(e.valueFilter, "");
|
|
1440
|
-
}
|
|
1441
|
-
default: return [];
|
|
1442
|
-
}
|
|
1443
|
-
}
|
|
1444
|
-
function Pr(e, t) {
|
|
1445
|
-
let n = e?.trim();
|
|
1446
|
-
return n && n !== t ? n : void 0;
|
|
1447
|
-
}
|
|
1448
|
-
function H(e) {
|
|
1449
|
-
if (e instanceof Date) return Number.isFinite(e.getTime()) ? e : void 0;
|
|
1450
|
-
if (typeof e == "string") return e.trim();
|
|
1451
|
-
if (typeof e == "number") return Number.isFinite(e) ? e : void 0;
|
|
1452
|
-
if (typeof e == "boolean") return e;
|
|
1453
|
-
}
|
|
1454
|
-
function Fr(e) {
|
|
1455
|
-
return e instanceof Date ? `date:${e.toISOString()}` : `${typeof e}:${String(e)}`;
|
|
1456
|
-
}
|
|
1457
|
-
function U(e) {
|
|
1458
|
-
if (!Array.isArray(e)) return;
|
|
1459
|
-
let n = /* @__PURE__ */ new Set(), r = [];
|
|
1460
|
-
for (let t of e) {
|
|
1461
|
-
let e = H(t);
|
|
1462
|
-
if (e === void 0) continue;
|
|
1463
|
-
let i = Fr(e);
|
|
1464
|
-
n.has(i) || (n.add(i), r.push(e));
|
|
1465
|
-
}
|
|
1466
|
-
return r.sort((e, n) => t(Fr(e), Fr(n))), r.length ? r : void 0;
|
|
1467
|
-
}
|
|
1468
|
-
function Ir(e) {
|
|
1469
|
-
if (!Array.isArray(e)) return;
|
|
1470
|
-
let t = [...new Set(e.filter((e) => typeof e == "string").map((e) => e.trim()).filter(Boolean))];
|
|
1471
|
-
return t.length ? t : void 0;
|
|
1472
|
-
}
|
|
1473
|
-
function W(e) {
|
|
1474
|
-
if (!e || typeof e != "object" || Array.isArray(e) || e instanceof Date) return;
|
|
1475
|
-
let t = Object.fromEntries(Object.entries(e).map(([e, t]) => [e.trim(), Ir(t)]).filter((e) => !!e[0] && !!e[1]?.length));
|
|
1476
|
-
return Object.keys(t).length ? t : void 0;
|
|
1477
|
-
}
|
|
1478
|
-
function G(e) {
|
|
1479
|
-
if (!e?.conditions?.length) return;
|
|
1480
|
-
let t = [];
|
|
1481
|
-
for (let n of e.conditions) {
|
|
1482
|
-
let e = H(n.value);
|
|
1483
|
-
(n.valueSource !== "static" || e !== void 0) && t.push({
|
|
1484
|
-
columnId: n.columnId?.trim() || void 0,
|
|
1485
|
-
operation: n.operation,
|
|
1486
|
-
valueSource: n.valueSource,
|
|
1487
|
-
value: e
|
|
1488
|
-
});
|
|
1489
|
-
}
|
|
1490
|
-
if (t.length) return {
|
|
1491
|
-
and: e.and === !1 ? !1 : e.and ? !0 : void 0,
|
|
1492
|
-
conditions: t
|
|
1493
|
-
};
|
|
1494
|
-
}
|
|
1495
|
-
function Lr(e) {
|
|
1496
|
-
if (e) {
|
|
1497
|
-
if (e.kind === "list") {
|
|
1498
|
-
let t = [];
|
|
1499
|
-
for (let n of e.options ?? []) {
|
|
1500
|
-
let e = n.key.trim();
|
|
1501
|
-
t.push({
|
|
1502
|
-
key: e,
|
|
1503
|
-
label: n.label.trim() || e,
|
|
1504
|
-
filter: G(n.filter)
|
|
1505
|
-
});
|
|
1506
|
-
}
|
|
1507
|
-
if (!t.length) return;
|
|
1508
|
-
let n = e.and === !0 || e.and !== !1 && void 0;
|
|
1509
|
-
return {
|
|
1510
|
-
kind: "list",
|
|
1511
|
-
...n === void 0 ? {} : { and: n },
|
|
1512
|
-
options: t
|
|
1513
|
-
};
|
|
1514
|
-
}
|
|
1515
|
-
return e.kind === "boolean" ? {
|
|
1516
|
-
kind: "boolean",
|
|
1517
|
-
trueFilter: G(e.trueFilter)
|
|
1518
|
-
} : {
|
|
1519
|
-
kind: "value",
|
|
1520
|
-
valueFilter: G(e.valueFilter)
|
|
1521
|
-
};
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
function K(e) {
|
|
1525
|
-
if (!e?.length) return [];
|
|
1526
|
-
let t = [];
|
|
1527
|
-
for (let n of e) {
|
|
1528
|
-
let e = n.id.trim();
|
|
1529
|
-
if (!e) continue;
|
|
1530
|
-
let r = { ...n };
|
|
1531
|
-
if (r.kind === "odata-segment" && (r.kind = "segment"), r.kind === "odata-tree" && (r.kind = "tree"), r.kind === "registered") {
|
|
1532
|
-
let n = r.componentId.trim(), i = r.valueMode;
|
|
1533
|
-
if (!n || i !== "single" && i !== "multiple") continue;
|
|
1534
|
-
let a = Lr(r.binding);
|
|
1535
|
-
t.push({
|
|
1536
|
-
...r,
|
|
1537
|
-
id: e,
|
|
1538
|
-
componentId: n,
|
|
1539
|
-
valueMode: i,
|
|
1540
|
-
columnIds: a ? Or(a, "") : [],
|
|
1541
|
-
binding: a
|
|
1542
|
-
});
|
|
1543
|
-
continue;
|
|
1544
|
-
}
|
|
1545
|
-
let i = r.ownerColumnId.trim();
|
|
1546
|
-
if (i) switch (r.kind) {
|
|
1547
|
-
case "segment":
|
|
1548
|
-
t.push({
|
|
1549
|
-
...r,
|
|
1550
|
-
id: e,
|
|
1551
|
-
ownerColumnId: i,
|
|
1552
|
-
columnIds: [i],
|
|
1553
|
-
componentId: r.componentId === "select" ? "select" : "multi-select",
|
|
1554
|
-
dictionaryCodeKey: Pr(r.dictionaryCodeKey, i)
|
|
1555
|
-
});
|
|
1556
|
-
break;
|
|
1557
|
-
case "tree": {
|
|
1558
|
-
let n = [...new Set(r.columnIds.map((e) => e.trim()).filter(Boolean))];
|
|
1559
|
-
if (!n.length) break;
|
|
1560
|
-
let a = r.componentId, o = a === "treeSelect" || a === "tree-select" ? "tree-select" : "tree-multi-select";
|
|
1561
|
-
t.push({
|
|
1562
|
-
...r,
|
|
1563
|
-
id: e,
|
|
1564
|
-
ownerColumnId: n.includes(i) ? i : n[0],
|
|
1565
|
-
columnIds: n,
|
|
1566
|
-
componentId: o,
|
|
1567
|
-
levelOperator: r.levelOperator === "or" ? "or" : void 0
|
|
1568
|
-
});
|
|
1569
|
-
break;
|
|
1570
|
-
}
|
|
1571
|
-
case "local": {
|
|
1572
|
-
let n = Lr(r.binding);
|
|
1573
|
-
if (!n) break;
|
|
1574
|
-
t.push({
|
|
1575
|
-
...r,
|
|
1576
|
-
id: e,
|
|
1577
|
-
ownerColumnId: i,
|
|
1578
|
-
columnIds: Or(n, i),
|
|
1579
|
-
binding: n
|
|
1580
|
-
});
|
|
1581
|
-
break;
|
|
1582
|
-
}
|
|
1583
|
-
case "advanced":
|
|
1584
|
-
t.push({
|
|
1585
|
-
...r,
|
|
1586
|
-
id: e,
|
|
1587
|
-
ownerColumnId: i
|
|
1588
|
-
});
|
|
1589
|
-
break;
|
|
1590
|
-
case "column": t.push({
|
|
1591
|
-
...r,
|
|
1592
|
-
id: e,
|
|
1593
|
-
ownerColumnId: i
|
|
1594
|
-
});
|
|
1595
|
-
}
|
|
1596
|
-
}
|
|
1597
|
-
return t;
|
|
1598
|
-
}
|
|
1599
|
-
function q(e) {
|
|
1600
|
-
if (e == null) return;
|
|
1601
|
-
let t = H(e);
|
|
1602
|
-
return t === void 0 ? U(e) || W(e) : t;
|
|
1603
|
-
}
|
|
1604
|
-
function J(e) {
|
|
1605
|
-
if (!e) return {};
|
|
1606
|
-
let t = {};
|
|
1607
|
-
for (let [n, r] of Object.entries(e)) {
|
|
1608
|
-
let e = n.trim();
|
|
1609
|
-
if (!e) continue;
|
|
1610
|
-
let i = q(r);
|
|
1611
|
-
i !== void 0 && (t[e] = i);
|
|
1612
|
-
}
|
|
1613
|
-
return t;
|
|
1614
|
-
}
|
|
1615
|
-
function Rr(e, t, n) {
|
|
1616
|
-
let r = { ...J(e) }, i = q(n);
|
|
1617
|
-
return i === void 0 ? (delete r[t], r) : (r[t] = i, r);
|
|
1618
|
-
}
|
|
1619
|
-
function zr(e, t, n) {
|
|
1620
|
-
if (!e || Object.keys(e).length === 0) return {};
|
|
1621
|
-
let r = {}, i = {};
|
|
1622
|
-
for (let [e, t] of Object.entries(n)) for (let n of t) i[n.codeKey] = e;
|
|
1623
|
-
let a = {}, o = new Set(t);
|
|
1624
|
-
for (let [t, n] of Object.entries(e)) {
|
|
1625
|
-
let e = i[t], s = o.has(t);
|
|
1626
|
-
if (e && s && (Array.isArray(n) || typeof n == "string")) {
|
|
1627
|
-
a[e] = a[e] ?? [], a[e].push(t);
|
|
1628
|
-
continue;
|
|
1629
|
-
}
|
|
1630
|
-
r[t] = n;
|
|
1631
|
-
}
|
|
1632
|
-
for (let [t, i] of Object.entries(a)) {
|
|
1633
|
-
let a = n[t];
|
|
1634
|
-
if (!a) continue;
|
|
1635
|
-
let o = null;
|
|
1636
|
-
for (let { codeKey: e } of [...a].reverse()) if (i.includes(e)) {
|
|
1637
|
-
o = e;
|
|
1638
|
-
break;
|
|
1639
|
-
}
|
|
1640
|
-
o && e[o] !== void 0 && (r[o] = e[o]);
|
|
1641
|
-
}
|
|
1642
|
-
return r;
|
|
1643
|
-
}
|
|
1644
|
-
function Br(e, t) {
|
|
1645
|
-
return H(t);
|
|
1646
|
-
}
|
|
1647
|
-
function Vr(e, t, n) {
|
|
1648
|
-
let r = Br(t.valueSource, t.valueSource === "input" ? n : t.value);
|
|
1649
|
-
if (r === void 0) return;
|
|
1650
|
-
let i = t.columnId?.trim() || e;
|
|
1651
|
-
if (i) return {
|
|
1652
|
-
key: i,
|
|
1653
|
-
operation: t.operation,
|
|
1654
|
-
value: r
|
|
1655
|
-
};
|
|
1656
|
-
}
|
|
1657
|
-
function Y(e, t, n) {
|
|
1658
|
-
if (!t?.conditions.length) return;
|
|
1659
|
-
let r = t.conditions.map((t) => Vr(e, t, n)).filter((e) => !!e);
|
|
1660
|
-
if (r.length) return {
|
|
1661
|
-
and: t.and !== !1 || void 0,
|
|
1662
|
-
conditions: r
|
|
1663
|
-
};
|
|
1664
|
-
}
|
|
1665
|
-
function Hr(e) {
|
|
1666
|
-
return z(e, !0);
|
|
1667
|
-
}
|
|
1668
|
-
function X(e, t) {
|
|
1669
|
-
return z(e, t);
|
|
1670
|
-
}
|
|
1671
|
-
function Ur(e, t) {
|
|
1672
|
-
let n = W(t);
|
|
1673
|
-
if (!n) return;
|
|
1674
|
-
let r = e.columnIds.map((e) => {
|
|
1675
|
-
let t = n[e];
|
|
1676
|
-
if (t?.length) return z(e, t);
|
|
1677
|
-
}).filter((e) => !!e);
|
|
1678
|
-
if (r.length) return r.length === 1 ? r[0] : {
|
|
1679
|
-
and: e.levelOperator !== "or" || void 0,
|
|
1680
|
-
filters: r
|
|
1681
|
-
};
|
|
1682
|
-
}
|
|
1683
|
-
function Wr(e, t) {
|
|
1684
|
-
if (!e.binding || e.binding.kind !== "list") return;
|
|
1685
|
-
let n = e.binding, r = jr(e, t);
|
|
1686
|
-
if (!r.length) return;
|
|
1687
|
-
let i = e.kind === "local" ? e.ownerColumnId : "", a = r.map((t) => {
|
|
1688
|
-
let r = n.options.find((e) => e.key === t);
|
|
1689
|
-
if (!r) return;
|
|
1690
|
-
let a = Y(i, r.filter);
|
|
1691
|
-
return a || e.kind === "registered" ? a : X(e.ownerColumnId, r.key);
|
|
1692
|
-
}).filter((e) => !!e);
|
|
1693
|
-
if (a.length) return a.length === 1 ? a[0] : {
|
|
1694
|
-
and: n.and === !0 || void 0,
|
|
1695
|
-
filters: a
|
|
1696
|
-
};
|
|
1697
|
-
}
|
|
1698
|
-
function Gr(e, t) {
|
|
1699
|
-
if (t !== void 0) switch (e.kind) {
|
|
1700
|
-
case "segment": {
|
|
1701
|
-
if (e.componentId === "select") {
|
|
1702
|
-
let n = H(t);
|
|
1703
|
-
return n === void 0 ? void 0 : X(e.ownerColumnId, n);
|
|
1704
|
-
}
|
|
1705
|
-
let n = U(t);
|
|
1706
|
-
return n?.length ? X(e.ownerColumnId, n) : void 0;
|
|
1707
|
-
}
|
|
1708
|
-
case "tree": return Ur(e, t);
|
|
1709
|
-
case "local": return e.binding.kind === "list" ? Wr(e, t) : e.binding.kind === "boolean" ? t === !0 ? Y(e.ownerColumnId, e.binding.trueFilter) ?? Hr(e.ownerColumnId) : void 0 : Y(e.ownerColumnId, e.binding.valueFilter, t) ?? (() => {
|
|
1710
|
-
let n = H(t), r = U(t), i = n ?? r;
|
|
1711
|
-
return i === void 0 ? void 0 : X(e.ownerColumnId, i);
|
|
1712
|
-
})();
|
|
1713
|
-
case "registered": return e.binding ? e.binding.kind === "list" ? Wr(e, t) : e.binding.kind === "boolean" ? t === !0 ? Y("", e.binding.trueFilter) : void 0 : Y("", e.binding.valueFilter, t) : void 0;
|
|
1714
|
-
case "column": {
|
|
1715
|
-
let n = H(t), r = U(t), i = n ?? r;
|
|
1716
|
-
return i === void 0 ? void 0 : X(e.ownerColumnId, i);
|
|
1717
|
-
}
|
|
1718
|
-
case "advanced": {
|
|
1719
|
-
let n = U(t);
|
|
1720
|
-
return n?.length ? X(e.ownerColumnId, n) : void 0;
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
function Kr(e, t) {
|
|
1725
|
-
let n = K(e), r = J(t);
|
|
1726
|
-
if (!n.length || !Object.keys(r).length) return;
|
|
1727
|
-
let i = n.map((e) => Gr(e, r[e.id])).filter((e) => !!e);
|
|
1728
|
-
if (i.length) return i.length === 1 ? i[0] : {
|
|
1729
|
-
and: !0,
|
|
1730
|
-
filters: i
|
|
1731
|
-
};
|
|
1732
|
-
}
|
|
1733
|
-
function qr(e, t) {
|
|
1734
|
-
let n = K(e), r = J(t), i = {};
|
|
1735
|
-
for (let e of n) {
|
|
1736
|
-
if (e.kind !== "segment" && e.kind !== "tree") continue;
|
|
1737
|
-
let t = r[e.id];
|
|
1738
|
-
if (t === void 0) continue;
|
|
1739
|
-
if (e.kind === "segment") {
|
|
1740
|
-
let n = typeof t == "string" ? t : void 0, r = Ir(t), a = n ? [n] : r;
|
|
1741
|
-
if (!a?.length) continue;
|
|
1742
|
-
i[e.dictionaryCodeKey ?? e.ownerColumnId] = a;
|
|
1743
|
-
continue;
|
|
1744
|
-
}
|
|
1745
|
-
let n = W(t);
|
|
1746
|
-
if (n) for (let t of e.columnIds) {
|
|
1747
|
-
let e = n[t];
|
|
1748
|
-
e && e.length && (i[t] = e);
|
|
1749
|
-
}
|
|
1750
|
-
}
|
|
1751
|
-
return i;
|
|
1752
|
-
}
|
|
1753
|
-
//#endregion
|
|
1754
|
-
//#region src/odata-service/findCollectionPairs.ts
|
|
1755
|
-
function Jr(e, t = {}) {
|
|
1756
|
-
let { textSuffixes: n = [
|
|
1757
|
-
"_txt",
|
|
1758
|
-
"_text",
|
|
1759
|
-
"_t",
|
|
1760
|
-
"_Text",
|
|
1761
|
-
"_TXT",
|
|
1762
|
-
"_T"
|
|
1763
|
-
], caseSensitive: r = !1, returnUnpaired: i = !1 } = t, a = Object.keys(e), o = [], s = {}, c = /* @__PURE__ */ new Set(), l = new Set(a), u = n.map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"), d = RegExp(`(.*)(${u})$`, r ? "" : "i"), f = a.filter((e) => d.test(e));
|
|
1764
|
-
for (let e of f) {
|
|
1765
|
-
if (c.has(e)) continue;
|
|
1766
|
-
let t = e.match(d);
|
|
1767
|
-
if (t) {
|
|
1768
|
-
let n = t[1];
|
|
1769
|
-
a.includes(n) && !c.has(n) && (o.push({
|
|
1770
|
-
codeKey: n,
|
|
1771
|
-
textKey: e
|
|
1772
|
-
}), s[n] = e, c.add(n), c.add(e), l.delete(n), l.delete(e));
|
|
1773
|
-
}
|
|
1774
|
-
}
|
|
1775
|
-
let p = {
|
|
1776
|
-
pairs: o,
|
|
1777
|
-
pairsMap: s
|
|
1778
|
-
};
|
|
1779
|
-
return i && (p.unpaired = Array.from(l)), p;
|
|
1780
|
-
}
|
|
1781
|
-
//#endregion
|
|
1782
|
-
//#region src/odata-service/odataCollectionStore.ts
|
|
1783
|
-
var Z = r()(i((e) => ({
|
|
1784
|
-
defaultMaxVisibleItems: 200,
|
|
1785
|
-
defaultMinSearchCodeLength: 3,
|
|
1786
|
-
defaultMinSearchTextLength: 1,
|
|
1787
|
-
defaultSearchDebounceDelay: 100,
|
|
1788
|
-
setDefaultMaxVisibleItems: (t) => e({ defaultMaxVisibleItems: t }),
|
|
1789
|
-
setDefaultMinSearchTextLength: (t) => e({ defaultMinSearchTextLength: t }),
|
|
1790
|
-
setDefaultMinSearchCodeLength: (t) => e({ defaultMinSearchCodeLength: t }),
|
|
1791
|
-
setDefaultSearchDebounceDelay: (t) => e({ defaultSearchDebounceDelay: t })
|
|
1792
|
-
}))), Yr = {
|
|
1793
|
-
useMaxVisibleItems: () => Z((e) => e.defaultMaxVisibleItems),
|
|
1794
|
-
useMinSearchCodeLength: () => Z((e) => e.defaultMinSearchCodeLength),
|
|
1795
|
-
useMinSearchTextLength: () => Z((e) => e.defaultMinSearchTextLength),
|
|
1796
|
-
useSearchDebounce: () => Z((e) => e.defaultSearchDebounceDelay)
|
|
1797
|
-
}, Xr = /^(.+)(_txt|_text|_t)$/i, Q = /* @__PURE__ */ new Set(["ZDIV", "ZCFO1"]);
|
|
1798
|
-
function Zr(e) {
|
|
1799
|
-
return e.label || e.id;
|
|
1800
|
-
}
|
|
1801
|
-
function Qr(e) {
|
|
1802
|
-
return e ? Q.has(e.toUpperCase()) : !1;
|
|
1803
|
-
}
|
|
1804
|
-
function $r(e) {
|
|
1805
|
-
if (!e) return !1;
|
|
1806
|
-
let t = e.toUpperCase();
|
|
1807
|
-
if (Q.has(t)) return !0;
|
|
1808
|
-
let n = t.match(/^(.+)(_TXT|_TEXT|_T)$/);
|
|
1809
|
-
return n ? Q.has(n[1]) : !1;
|
|
1810
|
-
}
|
|
1811
|
-
function ei(e) {
|
|
1812
|
-
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1813
|
-
}
|
|
1814
|
-
function ti(e) {
|
|
1815
|
-
return e.startsWith("Edm.");
|
|
1816
|
-
}
|
|
1817
|
-
function ni(e, t) {
|
|
1818
|
-
if (t) return e[t.toUpperCase()];
|
|
1819
|
-
}
|
|
1820
|
-
function ri(e, t, n) {
|
|
1821
|
-
let r = ni(n, e);
|
|
1822
|
-
if (!r) return;
|
|
1823
|
-
let i = RegExp(`^${ei(r)}(_txt|_text|_t)$`, "i");
|
|
1824
|
-
for (let e of t) if (i.test(e.id)) return e.id;
|
|
1825
|
-
}
|
|
1826
|
-
function ii(e) {
|
|
1827
|
-
let t = {}, n = {};
|
|
1828
|
-
for (let r of e) t[r.id] = r, n[r.id.toUpperCase()] = r.id;
|
|
1829
|
-
for (let t of e) {
|
|
1830
|
-
if (t.role === "measure") {
|
|
1831
|
-
t.semanticType = "none", t.linkedColumnId = void 0;
|
|
1832
|
-
continue;
|
|
1833
|
-
}
|
|
1834
|
-
t.role = "dimension", t.sortable = !0, t.filterable = !0, t.semanticType = Xr.test(t.id) ? "text" : "code";
|
|
1835
|
-
let e = ni(n, t.linkedColumnId);
|
|
1836
|
-
t.linkedColumnId = e && e !== t.id ? e : void 0;
|
|
1837
|
-
}
|
|
1838
|
-
for (let r of e) {
|
|
1839
|
-
if (r.role !== "dimension" || r.semanticType !== "code") continue;
|
|
1840
|
-
let i = r.linkedColumnId;
|
|
1841
|
-
if (i) {
|
|
1842
|
-
let e = t[i];
|
|
1843
|
-
!e || e.role !== "dimension" ? i = void 0 : e.semanticType = "text";
|
|
1844
|
-
}
|
|
1845
|
-
if (i ||= ri(r.id, e, n), !i && Qr(r.id) && (i = ri(r.id, e, n)), r.linkedColumnId = i, i) {
|
|
1846
|
-
let e = t[i];
|
|
1847
|
-
e && e.role === "dimension" && (e.semanticType = "text", e.linkedColumnId = r.id);
|
|
1848
|
-
}
|
|
1849
|
-
}
|
|
1850
|
-
for (let r of e) {
|
|
1851
|
-
if (r.role !== "dimension" || r.semanticType !== "text") continue;
|
|
1852
|
-
let e = r.linkedColumnId;
|
|
1853
|
-
if (e) {
|
|
1854
|
-
let n = t[e];
|
|
1855
|
-
!n || n.role !== "dimension" ? e = void 0 : n.semanticType = "code";
|
|
1856
|
-
}
|
|
1857
|
-
if (!e) {
|
|
1858
|
-
let i = ni(n, r.id.match(Xr)?.[1]);
|
|
1859
|
-
i && t[i]?.role === "dimension" && (e = i);
|
|
1860
|
-
}
|
|
1861
|
-
if (r.linkedColumnId = e, e) {
|
|
1862
|
-
let n = t[e];
|
|
1863
|
-
n && n.role === "dimension" && (n.semanticType = "code", n.linkedColumnId ||= r.id);
|
|
1864
|
-
}
|
|
1865
|
-
}
|
|
1866
|
-
return e;
|
|
1867
|
-
}
|
|
1868
|
-
function ai(e) {
|
|
1869
|
-
switch (e) {
|
|
1870
|
-
case "Edm.String": return "string";
|
|
1871
|
-
case "Edm.Guid": return "guid";
|
|
1872
|
-
case "Edm.Boolean": return "boolean";
|
|
1873
|
-
case "Edm.Int16":
|
|
1874
|
-
case "Edm.Int32": return "int";
|
|
1875
|
-
case "Edm.Int64": return "long";
|
|
1876
|
-
case "Edm.Single": return "float";
|
|
1877
|
-
case "Edm.Decimal": return "decimal";
|
|
1878
|
-
case "Edm.Double": return "double";
|
|
1879
|
-
case "Edm.DateTime": return "datetime";
|
|
1880
|
-
case "Edm.DateTimeOffset": return "datetimeOffset";
|
|
1881
|
-
case "Edm.Time": return "time";
|
|
1882
|
-
case "Edm.Binary": return "binary";
|
|
1883
|
-
case "Edm.Byte": return "byte";
|
|
1884
|
-
default: throw Error(`Неподдерживаемый тип данных ${e}`);
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
function $(e) {
|
|
1888
|
-
let t = e.getAttribute("Name"), n = e.getAttribute("Type") || "", r = ai(n), i = e.hasAttribute("MaxLength") ? Number(e.getAttribute("MaxLength")) : void 0, a = e.hasAttribute("Precision") ? Number(e.getAttribute("Precision")) : void 0, o = e.hasAttribute("Scale") ? Number(e.getAttribute("Scale")) : void 0, s = e.getAttribute("sap:label") || void 0, c = e.getAttribute("sap:parameter") || void 0, l = e.getAttribute("Nullable") !== "false" || void 0;
|
|
1889
|
-
return {
|
|
1890
|
-
id: t,
|
|
1891
|
-
label: s ?? t,
|
|
1892
|
-
type: r,
|
|
1893
|
-
originalType: n,
|
|
1894
|
-
...r === "string" && i === 1 ? { abapBooleanLike: !0 } : {},
|
|
1895
|
-
...i !== void 0 && { maxLength: i },
|
|
1896
|
-
...a !== void 0 && { precision: a },
|
|
1897
|
-
...o !== void 0 && { scale: o },
|
|
1898
|
-
...c !== void 0 && { parameter: c },
|
|
1899
|
-
...l !== void 0 && { nullable: !0 },
|
|
1900
|
-
...c === "mandatory" && { mandatory: !0 }
|
|
1901
|
-
};
|
|
1902
|
-
}
|
|
1903
|
-
function oi(e) {
|
|
1904
|
-
let t = $(e), n = e.getAttribute("sap:text") || void 0, r = e.getAttribute("sap:sortable") !== "false", i = e.getAttribute("sap:filterable") !== "false", a = e.getAttribute("sap:aggregation-role") === "measure" ? "measure" : "dimension", o = e.getAttribute("sap:label") || void 0, { nullable: s, mandatory: c, ...l } = t;
|
|
1905
|
-
return {
|
|
1906
|
-
...l,
|
|
1907
|
-
...n !== void 0 && { linkedColumnId: n },
|
|
1908
|
-
...o !== void 0 && { label: o },
|
|
1909
|
-
semanticType: "none",
|
|
1910
|
-
sortable: r,
|
|
1911
|
-
filterable: i,
|
|
1912
|
-
role: a
|
|
1913
|
-
};
|
|
1914
|
-
}
|
|
1915
|
-
function si(e) {
|
|
1916
|
-
let t = e.getAttribute("Name"), n = e.getAttribute("Type") || "";
|
|
1917
|
-
return !t || !ti(n) ? !1 : !(["CNT", "cnt"].includes(t) || /_F$/i.test(t));
|
|
1918
|
-
}
|
|
1919
|
-
function ci(e) {
|
|
1920
|
-
let t = e.getAttribute("Name"), n = e.getAttribute("Type") || "";
|
|
1921
|
-
return !t || !ti(n) ? !1 : !(["CNT", "cnt"].includes(t) || /_F$/i.test(t));
|
|
1922
|
-
}
|
|
1923
|
-
function li(e) {
|
|
1924
|
-
return Array.from(e.getElementsByTagName("Property"));
|
|
1925
|
-
}
|
|
1926
|
-
function ui(e) {
|
|
1927
|
-
return Array.from(e.getElementsByTagName("PropertyRef"));
|
|
1928
|
-
}
|
|
1929
|
-
function di(e) {
|
|
1930
|
-
return Array.from(e.getElementsByTagName("NavigationProperty"));
|
|
1931
|
-
}
|
|
1932
|
-
function fi(e) {
|
|
1933
|
-
return li(e).filter(si).map($);
|
|
1934
|
-
}
|
|
1935
|
-
function pi(e) {
|
|
1936
|
-
let t = li(e).filter(si), n = ui(e);
|
|
1937
|
-
return t.map((e) => {
|
|
1938
|
-
let t = $(e);
|
|
1939
|
-
return n.find((e) => e.getAttribute("Name") === t.id) && (t.mandatory = !0), t;
|
|
1940
|
-
});
|
|
1941
|
-
}
|
|
1942
|
-
function mi(e) {
|
|
1943
|
-
return ii(li(e).filter(ci).map(oi));
|
|
1944
|
-
}
|
|
1945
|
-
function hi(e) {
|
|
1946
|
-
if (!e) return;
|
|
1947
|
-
let t = e.split(".");
|
|
1948
|
-
return t[t.length - 1] || void 0;
|
|
1949
|
-
}
|
|
1950
|
-
function gi(e) {
|
|
1951
|
-
let t = e.getAttribute("Mode");
|
|
1952
|
-
if (t && t !== "In") {
|
|
1953
|
-
let n = e.getAttribute("Name") || "(unknown)";
|
|
1954
|
-
throw Error(`FunctionImport parameter '${n}' uses unsupported Mode='${t}'`);
|
|
1955
|
-
}
|
|
1956
|
-
let n = e.getAttribute("Type") || "";
|
|
1957
|
-
if (!ti(n)) {
|
|
1958
|
-
let t = e.getAttribute("Name") || "(unknown)";
|
|
1959
|
-
throw Error(`FunctionImport parameter '${t}' uses unsupported Type='${n}'`);
|
|
1960
|
-
}
|
|
1961
|
-
let r = $(e);
|
|
1962
|
-
return e.getAttribute("Nullable") === "false" && (r.mandatory = !0), r;
|
|
1963
|
-
}
|
|
1964
|
-
function _i(e) {
|
|
1965
|
-
return e.reduce((e, t) => {
|
|
1966
|
-
let n = t.getAttribute("Name");
|
|
1967
|
-
return n && (e[n] = t), e;
|
|
1968
|
-
}, {});
|
|
1969
|
-
}
|
|
1970
|
-
function vi(e) {
|
|
1971
|
-
return Array.from(e.getElementsByTagName("EntitySet")).reduce((e, t) => {
|
|
1972
|
-
let n = t.getAttribute("Name"), r = hi(t.getAttribute("EntityType"));
|
|
1973
|
-
return !n || !r || (e[n] = r), e;
|
|
1974
|
-
}, {});
|
|
1975
|
-
}
|
|
1976
|
-
function yi(e) {
|
|
1977
|
-
return Array.from(e.getElementsByTagName("AssociationSet")).reduce((e, t) => {
|
|
1978
|
-
let n = t.getAttribute("Association");
|
|
1979
|
-
if (!n) return e;
|
|
1980
|
-
let r = { ends: Array.from(t.getElementsByTagName("End")).map((e) => {
|
|
1981
|
-
let t = e.getAttribute("Role"), n = e.getAttribute("EntitySet");
|
|
1982
|
-
if (!(!t || !n)) return {
|
|
1983
|
-
role: t,
|
|
1984
|
-
entitySet: n
|
|
1985
|
-
};
|
|
1986
|
-
}).filter((e) => !!e) };
|
|
1987
|
-
e[n] = r;
|
|
1988
|
-
let i = hi(n);
|
|
1989
|
-
return i && (e[i] = r), e;
|
|
1990
|
-
}, {});
|
|
1991
|
-
}
|
|
1992
|
-
function bi(e, t) {
|
|
1993
|
-
for (let n of di(e)) {
|
|
1994
|
-
let e = n.getAttribute("Name");
|
|
1995
|
-
if (e !== "Set" && e !== "Results") continue;
|
|
1996
|
-
let r = n.getAttribute("Relationship"), i = r ? t[r] : void 0, a = n.getAttribute("ToRole"), o = n.getAttribute("FromRole"), s = i?.ends.find((e) => e.role === a)?.entitySet;
|
|
1997
|
-
return !s && i && (s = i.ends.find((e) => e.role !== o)?.entitySet), {
|
|
1998
|
-
name: e,
|
|
1999
|
-
targetEntitySet: s
|
|
2000
|
-
};
|
|
2001
|
-
}
|
|
2002
|
-
}
|
|
2003
|
-
function xi(e, t, n) {
|
|
2004
|
-
let r = /* @__PURE__ */ new Set();
|
|
2005
|
-
for (let [i, a] of Object.entries(e)) {
|
|
2006
|
-
let e = t[a];
|
|
2007
|
-
if (!e) continue;
|
|
2008
|
-
let o = bi(e, n);
|
|
2009
|
-
o?.targetEntitySet && o.targetEntitySet !== i && r.add(o.targetEntitySet);
|
|
2010
|
-
}
|
|
2011
|
-
return r;
|
|
2012
|
-
}
|
|
2013
|
-
function Si(e, t, n, r) {
|
|
2014
|
-
let i = t?.targetEntitySet ? n[t.targetEntitySet] : void 0;
|
|
2015
|
-
return i && r[i] || e;
|
|
2016
|
-
}
|
|
2017
|
-
function Ci(e, t, n) {
|
|
2018
|
-
if (n) return fi(e);
|
|
2019
|
-
if (!t.endsWith("Type")) return pi(e);
|
|
2020
|
-
}
|
|
2021
|
-
function wi(e, t) {
|
|
2022
|
-
if (!e) return /* @__PURE__ */ new Set();
|
|
2023
|
-
let n = hi(e);
|
|
2024
|
-
if (!n) return /* @__PURE__ */ new Set();
|
|
2025
|
-
let r = t[n];
|
|
2026
|
-
return r ? new Set(ui(r).map((e) => e.getAttribute("Name")).filter((e) => !!e)) : /* @__PURE__ */ new Set();
|
|
2027
|
-
}
|
|
2028
|
-
function Ti(e, t, n) {
|
|
2029
|
-
let r = e.getAttribute("Name") || "", i = e.getAttribute("EntitySet") || void 0, a = e.getAttribute("sap:action-for") || void 0, o = wi(a, n), s = Array.from(e.getElementsByTagName("Parameter")).map((e) => {
|
|
2030
|
-
let t = gi(e);
|
|
2031
|
-
return o.has(t.id) && (t.mandatory = !0), t;
|
|
2032
|
-
});
|
|
2033
|
-
return {
|
|
2034
|
-
name: r,
|
|
2035
|
-
title: e.getAttribute("sap:label") || "",
|
|
2036
|
-
httpMethod: e.getAttribute("m:HttpMethod") || void 0,
|
|
2037
|
-
parameters: s.length ? s : void 0,
|
|
2038
|
-
returnType: e.getAttribute("ReturnType") || "",
|
|
2039
|
-
...i !== void 0 && { entitySet: i },
|
|
2040
|
-
...a !== void 0 && { actionFor: a },
|
|
2041
|
-
...i && t[i] ? { resultEntity: i } : {}
|
|
2042
|
-
};
|
|
2043
|
-
}
|
|
2044
|
-
function Ei(e) {
|
|
2045
|
-
let t = new DOMParser().parseFromString(e, "application/xml"), n = Array.from(t.getElementsByTagName("EntityType")), r = Array.from(t.getElementsByTagName("FunctionImport")), i = vi(t), a = _i(n), o = yi(t), s = xi(i, a, o), c = {}, l = {};
|
|
2046
|
-
for (let [e, t] of Object.entries(i)) {
|
|
2047
|
-
if (s.has(e)) continue;
|
|
2048
|
-
let n = a[t];
|
|
2049
|
-
if (!n) continue;
|
|
2050
|
-
let r = bi(n, o), l = Si(n, r, i, a), u = n.getAttribute("sap:label") || l.getAttribute("sap:label") || "", d = mi(l), f = Ci(n, t, r);
|
|
2051
|
-
c[e] = {
|
|
2052
|
-
title: u,
|
|
2053
|
-
columns: d,
|
|
2054
|
-
...f?.length ? { parameters: f } : {},
|
|
2055
|
-
...r ? { result: r.name } : {}
|
|
2056
|
-
};
|
|
2057
|
-
}
|
|
2058
|
-
for (let e of r) {
|
|
2059
|
-
let t = Ti(e, i, a);
|
|
2060
|
-
l[t.name] = t;
|
|
2061
|
-
}
|
|
2062
|
-
return {
|
|
2063
|
-
entities: c,
|
|
2064
|
-
functionImports: l
|
|
2065
|
-
};
|
|
2066
|
-
}
|
|
2067
|
-
//#endregion
|
|
2068
|
-
//#region src/odata-service/sorts.ts
|
|
2069
|
-
function Di(e, t) {
|
|
2070
|
-
return e.findIndex((e) => e.key === t);
|
|
2071
|
-
}
|
|
2072
|
-
function Oi(e) {
|
|
2073
|
-
return e.map((e) => `${String(e.key)} ${e.desc ? "desc" : "asc"}`).join(",");
|
|
2074
|
-
}
|
|
2075
|
-
function ki(e, t, n) {
|
|
2076
|
-
let r = Di(e, t), i = n ? [...e] : [...e.filter((e) => e.key === t)];
|
|
2077
|
-
return r === -1 ? (i.push({ key: t }), i) : e[r].desc ? i.filter((e) => e.key !== t) : i.map((e) => e.key === t ? {
|
|
2078
|
-
key: t,
|
|
2079
|
-
desc: !0
|
|
2080
|
-
} : e);
|
|
2081
|
-
}
|
|
2082
|
-
function Ai(e, t) {
|
|
2083
|
-
return t.length > 0 ? t.map((e) => ({
|
|
2084
|
-
key: e.key,
|
|
2085
|
-
desc: e.desc
|
|
2086
|
-
})) : e.map((e) => ({ key: e }));
|
|
2087
|
-
}
|
|
2088
|
-
function ji(e, t) {
|
|
2089
|
-
let n = Ai(e, t).map((e) => `${String(e.key)} ${e.desc ? "desc" : "asc"}`);
|
|
2090
|
-
return n.length ? n.join(",") : void 0;
|
|
2091
|
-
}
|
|
2092
|
-
function Mi(e, t, n) {
|
|
2093
|
-
let r = t.length > 0, i = e.indexOf(n);
|
|
2094
|
-
if (!r && i !== -1) return {
|
|
2095
|
-
active: !0,
|
|
2096
|
-
order: i + 1,
|
|
2097
|
-
lockedByGrouping: !0
|
|
2098
|
-
};
|
|
2099
|
-
let a = t.findIndex((e) => e.key === n);
|
|
2100
|
-
return a === -1 ? { active: !1 } : {
|
|
2101
|
-
active: !0,
|
|
2102
|
-
desc: t[a]?.desc,
|
|
2103
|
-
order: a + 1
|
|
2104
|
-
};
|
|
2105
|
-
}
|
|
2106
|
-
//#endregion
|
|
2107
|
-
//#region src/odata-service/sqlFilters.ts
|
|
2108
|
-
var Ni = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
2109
|
-
function Pi(e) {
|
|
2110
|
-
return typeof e == "string" || typeof e == "number" || typeof e == "boolean";
|
|
2111
|
-
}
|
|
2112
|
-
function Fi(e) {
|
|
2113
|
-
if (!Ni.test(e)) throw Error(`Некорректное имя поля SQL-фильтра: ${e}`);
|
|
2114
|
-
}
|
|
2115
|
-
function Ii(e, t) {
|
|
2116
|
-
return {
|
|
2117
|
-
fieldId: e,
|
|
2118
|
-
operation: "eq",
|
|
2119
|
-
value: t
|
|
2120
|
-
};
|
|
2121
|
-
}
|
|
2122
|
-
function Li(e, t) {
|
|
2123
|
-
return {
|
|
2124
|
-
fieldId: e,
|
|
2125
|
-
operation: "in",
|
|
2126
|
-
values: t
|
|
2127
|
-
};
|
|
2128
|
-
}
|
|
2129
|
-
function Ri(e, t) {
|
|
2130
|
-
return {
|
|
2131
|
-
operation: "group",
|
|
2132
|
-
conjunction: t,
|
|
2133
|
-
expressions: e
|
|
2134
|
-
};
|
|
2135
|
-
}
|
|
2136
|
-
function zi(e) {
|
|
2137
|
-
if (e instanceof Date) throw Error("Дата должна быть отформатирована вызывающей стороной до формирования SQL-фильтра");
|
|
2138
|
-
if (!Pi(e) || typeof e == "number" && !Number.isFinite(e)) return;
|
|
2139
|
-
let t = String(e);
|
|
2140
|
-
if (!(!t || t.trim() === "")) return `'${t.replaceAll("'", "''")}'`;
|
|
2141
|
-
}
|
|
2142
|
-
function Bi(e) {
|
|
2143
|
-
if (e.operation === "group") {
|
|
2144
|
-
let t = e.expressions.map((e) => Bi(e)).filter((e) => !!e);
|
|
2145
|
-
if (!t.length) return;
|
|
2146
|
-
let n = e.conjunction === "or" ? " OR " : " AND ";
|
|
2147
|
-
return `(${t.join(n)})`;
|
|
2148
|
-
}
|
|
2149
|
-
if (e.operation === "eq") {
|
|
2150
|
-
let t = zi(e.value);
|
|
2151
|
-
return t ? (Fi(e.fieldId), `${e.fieldId}=${t}`) : void 0;
|
|
2152
|
-
}
|
|
2153
|
-
let t = (e.values ?? []).map((e) => zi(e)).filter((e) => !!e);
|
|
2154
|
-
if (t.length !== 0) return Fi(e.fieldId), `${e.fieldId} IN (${t.join(", ")})`;
|
|
2155
|
-
}
|
|
2156
|
-
function Vi(e) {
|
|
2157
|
-
return e ? e.map((e) => Bi(e)).filter((e) => !!e).join(" AND ") : "";
|
|
2158
|
-
}
|
|
2159
|
-
//#endregion
|
|
2160
|
-
//#region src/odata-service/typesValidation.ts
|
|
2161
|
-
function Hi(e) {
|
|
2162
|
-
return e === "boolean";
|
|
2163
|
-
}
|
|
2164
|
-
function Ui(e) {
|
|
2165
|
-
return e === "byte" || e === "int" || e === "long" || e === "float" || e === "decimal" || e === "double";
|
|
2166
|
-
}
|
|
2167
|
-
function Wi(e) {
|
|
2168
|
-
return e === "byte" || e === "int" || e === "long";
|
|
2169
|
-
}
|
|
2170
|
-
function Gi(e) {
|
|
2171
|
-
return e === "datetime" || e === "datetimeOffset" || e === "time";
|
|
2172
|
-
}
|
|
2173
|
-
//#endregion
|
|
2174
|
-
//#region src/odata-service/unwrapODataQueryResult.ts
|
|
2175
|
-
function Ki(e) {
|
|
2176
|
-
let t = e.data?.data, n = e.data?.totalCount;
|
|
2177
|
-
return {
|
|
2178
|
-
...e,
|
|
2179
|
-
data: t,
|
|
2180
|
-
totalCount: n
|
|
2181
|
-
};
|
|
2182
|
-
}
|
|
2183
|
-
//#endregion
|
|
2184
|
-
//#region src/odata-service/utils.ts
|
|
2185
|
-
function qi(e) {
|
|
2186
|
-
return Array.isArray(e) ? [e[0] ?? null, e[1] ?? null] : [Yi(e) ? e ?? null : null, null];
|
|
2187
|
-
}
|
|
2188
|
-
function Ji(t) {
|
|
2189
|
-
return t instanceof Date ? t : Array.isArray(t) || e(t) ? null : t;
|
|
2190
|
-
}
|
|
2191
|
-
function Yi(e) {
|
|
2192
|
-
return e == null || typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e instanceof Date;
|
|
2193
|
-
}
|
|
2194
|
-
//#endregion
|
|
2195
|
-
//#region src/odata-service/wrapParams.ts
|
|
2196
|
-
function Xi(e) {
|
|
2197
|
-
if (!e) return {};
|
|
2198
|
-
let t = {};
|
|
2199
|
-
for (let n in e) t[n] = { value: e[n] };
|
|
2200
|
-
return t;
|
|
2201
|
-
}
|
|
2202
|
-
function Zi(e) {
|
|
2203
|
-
if (!e) return;
|
|
2204
|
-
let t = {};
|
|
2205
|
-
for (let n of Object.keys(e).sort()) t[n] = e[n]?.value ?? null;
|
|
2206
|
-
return t;
|
|
2207
|
-
}
|
|
2208
|
-
//#endregion
|
|
2209
|
-
export { pr as $, an as $t, Jr as A, l as An, j as At, G as B, mn as Bt, Q as C, Ie as Cn, Fn as Ct, Zr as D, f as Dn, kn as Dt, Ei as E, d as En, jn as Et, Rr as F, o as Fn, Tn as Ft, lr as G, Yt as Gt, q as H, en as Ht, Pr as I, A as It, Sr as J, un as Jt, br as K, fn as Kt, Nr as L, gn as Lt, Kr as M, s as Mn, xn as Mt, qr as N, u as Nn, Cn as Nt, Yr as O, p as On, On as Ot, Dr as P, a as Pn, wn as Pt, wr as Q, on as Qt, Mr as R, _n as Rt, ki as S, Fe as Sn, Mn as St, Qr as T, Pe as Tn, An as Tt, J as U, $t as Ut, K as V, Jt as Vt, ur as W, Qt as Wt, Tr as X, nn as Xt, Cr as Y, rn as Yt, z as Z, tn as Zt, Oi as _, y as _n, Yn as _t, qi as a, cn as an, nr as at, Mi as b, je as bn, Xn as bt, Gi as c, pn as cn, ar as ct, Fi as d, Ft as dn, L as dt, vn as en, Er as et, Vi as f, Ht as fn, F as ft, Pi as g, se as gn, Ln as gt, Li as h, v as hn, Rn as ht, Ji as i, ln as in, ir as it, zr as j, c as jn, Dn as jt, Z as k, m as kn, M as kt, Wi as l, Vt as ln, tr as lt, Ri as m, zt as mn, zn as mt, Xi as n, bn as nn, sr as nt, Ki as o, Zt as on, or as ot, Ii as p, k as pn, Bn as pt, xr as q, dn as qt, Yi as r, Xt as rn, cr as rt, Hi as s, sn, rr as st, Zi as t, yn as tn, mr as tt, Ui as u, Lt as un, I as ut, ji as v, S as vn, Qn as vt, $r as w, Me as wn, In as wt, Ai as x, Ae as xn, Zn as xt, Di as y, ke as yn, $n as yt, Lr as z, hn as zt };
|
|
2210
|
-
|
|
2211
|
-
//# sourceMappingURL=odata-service-tp2U5yIr.js.map
|