@scalar/api-client 3.27.0 → 3.28.0
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/CHANGELOG.md +19 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +1 -2
- package/dist/assets/computer.ascii_raw.js +1 -2
- package/dist/components/HelpfulLink.vue.js +1 -2
- package/dist/components/HelpfulLink.vue.js.map +1 -1
- package/dist/components/HelpfulLink.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -2
- package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.js +2 -3
- package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue.js.map +1 -1
- package/dist/components/ScalarAsciiArt/ScalarAsciiArt.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/SectionFilter.vue.js +2 -3
- package/dist/components/SectionFilter.vue.js.map +1 -1
- package/dist/components/SectionFilter.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/components/SectionFilterButton.vue.js +1 -2
- package/dist/components/SectionFilterButton.vue.js.map +1 -1
- package/dist/components/SectionFilterButton.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/Server/ServerVariablesForm.vue.js +1 -2
- package/dist/components/Server/ServerVariablesForm.vue.js.map +1 -1
- package/dist/components/Server/ServerVariablesForm.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/Server/ServerVariablesForm.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.js +1 -2
- package/dist/components/Server/ServerVariablesSelect.vue.js.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/Server/ServerVariablesSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.js +1 -2
- package/dist/components/Server/ServerVariablesTextbox.vue.js.map +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +1 -2
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +1 -2
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/ViewLayout/ViewLayout.vue.js +1 -2
- package/dist/components/ViewLayout/ViewLayout.vue.js.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -2
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -2
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/ViewLayout/ViewLayoutSection.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/hooks/use-file-dialog.js +1 -2
- package/dist/plugins/posthog/index.js +1 -2
- package/dist/plugins/posthog/sanitize-event-payload.js +1 -2
- package/dist/style.css +562 -448
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +1 -2
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue_vue_type_script_setup_true_lang.js +11 -7
- package/dist/v2/blocks/operation-block/OperationBlock.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -3
- package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/v2/blocks/operation-block/components/Header.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +2 -3
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +1 -2
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +1 -2
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-request.js +1 -2
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.js +1 -2
- package/dist/v2/blocks/operation-block/helpers/persist-response-cookies.js +1 -2
- package/dist/v2/blocks/operation-block/helpers/persist-script-environment.js +1 -2
- package/dist/v2/blocks/operation-block/helpers/response-cache.js +1 -2
- package/dist/v2/blocks/operation-block/helpers/send-request.js +1 -2
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js +1 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +3 -4
- package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue_vue_type_script_setup_true_lang.js +13 -7
- package/dist/v2/blocks/request-block/RequestBlock.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +3 -4
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue_vue_type_script_setup_true_lang.js +17 -13
- package/dist/v2/blocks/request-block/components/RequestBody.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +1 -2
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue.d.ts +3 -0
- package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue.js +1 -2
- package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue_vue_type_script_setup_true_lang.js +9 -4
- package/dist/v2/blocks/request-block/components/RequestBodyMultipart.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.js +1 -2
- package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.js +1 -2
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +1 -2
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue_vue_type_script_setup_true_lang.js +4 -3
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +1 -2
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/blocks/request-block/components/RequestParams.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +2 -3
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/v2/blocks/request-block/components/RequestTableFileList.vue.js +1 -2
- package/dist/v2/blocks/request-block/components/RequestTableFileList.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableFileList.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/blocks/request-block/components/RequestTableFileList.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +1 -2
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue_vue_type_script_setup_true_lang.js +37 -12
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +1 -2
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +1 -2
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.d.ts +2 -0
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js +6 -3
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/files.js +1 -2
- package/dist/v2/blocks/request-block/helpers/fold-structured-body-rows.js +1 -2
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +1 -2
- package/dist/v2/blocks/request-block/helpers/get-parameter-content.js +1 -2
- package/dist/v2/blocks/request-block/helpers/get-parameter-schema.js +1 -2
- package/dist/v2/blocks/request-block/helpers/get-structured-body-rows.js +1 -2
- package/dist/v2/blocks/request-block/helpers/group-by.js +1 -2
- package/dist/v2/blocks/request-block/helpers/group-form-body-files.js +2 -3
- package/dist/v2/blocks/request-block/helpers/group-form-body-files.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/group-global-cookies.js +1 -2
- package/dist/v2/blocks/request-block/helpers/multipart-body.js +1 -2
- package/dist/v2/blocks/request-block/helpers/structured-body-codec.js +1 -2
- package/dist/v2/blocks/request-block/helpers/validate-parameter.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/validate-parameter.js +8 -3
- package/dist/v2/blocks/request-block/helpers/validate-parameter.js.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +2 -3
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue_vue_type_script_setup_true_lang.js +4 -5
- package/dist/v2/blocks/response-block/ResponseBlock.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.js +1 -2
- package/dist/v2/blocks/response-block/components/Headers.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +2 -3
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue_vue_type_script_setup_true_lang.js +5 -6
- package/dist/v2/blocks/response-block/components/ResponseBody.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +1 -2
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js +1 -2
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +2 -3
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +2 -3
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +1 -2
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +1 -2
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js +1 -2
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +1 -2
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +2 -3
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +2 -3
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +1 -2
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/response-block/helpers/extract-filename.js +1 -2
- package/dist/v2/blocks/response-block/helpers/get-content-length.js +1 -2
- package/dist/v2/blocks/response-block/helpers/media-types.js +1 -2
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +1 -2
- package/dist/v2/blocks/response-block/helpers/prettify-jsonc-string.js +1 -2
- package/dist/v2/blocks/response-block/helpers/prettify-ndjson.js +1 -2
- package/dist/v2/blocks/response-block/helpers/process-response-body.js +1 -2
- package/dist/v2/blocks/response-block/helpers/resolve-response-body-handler.js +1 -2
- package/dist/v2/blocks/response-block/helpers/resolve-response-content-type.js +1 -2
- package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js +1 -2
- package/dist/v2/blocks/response-block/helpers/response-stream.js +1 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -3
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +2 -3
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +1 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +1 -2
- package/dist/v2/blocks/scalar-address-bar-block/helpers/is-placeholder-path.js +1 -2
- package/dist/v2/blocks/scalar-address-bar-block/helpers/refocus-blur-target.js +1 -2
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +1 -2
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-path-masking.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue_vue_type_script_setup_true_lang.js +4 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2Metadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue_vue_type_script_setup_true_lang.js +4 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue_vue_type_script_setup_true_lang.js +7 -8
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-callback.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.js +2 -3
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-flows.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/run-oauth2-authorize.js +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +2 -3
- package/dist/v2/components/code-input/CodeInput.vue.js +2 -3
- package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/components/code-input/CodeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/components/code-input/CodeInputLite.vue.js +2 -3
- package/dist/v2/components/code-input/CodeInputLite.vue.js.map +1 -1
- package/dist/v2/components/code-input/CodeInputLite.vue_vue_type_script_setup_true_lang.js +4 -5
- package/dist/v2/components/code-input/CodeInputLite.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/components/code-input/PillTooltipHost.vue.js +1 -2
- package/dist/v2/components/code-input/PillTooltipHost.vue.js.map +1 -1
- package/dist/v2/components/code-input/PillTooltipHost.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/code-input/code-variable-widget.js +1 -2
- package/dist/v2/components/code-input/helpers/build-pill-context.js +1 -2
- package/dist/v2/components/code-input/helpers/lookup-variable-value.js +1 -2
- package/dist/v2/components/code-input/helpers/pill-signature.js +1 -2
- package/dist/v2/components/code-input/helpers/serialize-value.js +1 -2
- package/dist/v2/components/context-menu/ContextMenu.vue.js +1 -2
- package/dist/v2/components/context-menu/ContextMenu.vue.js.map +1 -1
- package/dist/v2/components/context-menu/ContextMenu.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/data-table/DataTable.vue.js +1 -2
- package/dist/v2/components/data-table/DataTable.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTable.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/data-table/DataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/components/data-table/DataTableCell.vue.js +1 -2
- package/dist/v2/components/data-table/DataTableCell.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTableCell.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js +1 -2
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTableCheckbox.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/data-table/DataTableHeader.vue.js +1 -2
- package/dist/v2/components/data-table/DataTableHeader.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTableHeader.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/data-table/DataTableInput.vue.js +2 -3
- package/dist/v2/components/data-table/DataTableInput.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/v2/components/data-table/DataTableInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +1 -2
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/data-table/DataTableInputSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/components/data-table/DataTableRow.vue.js +1 -2
- package/dist/v2/components/data-table/DataTableText.vue.js +1 -2
- package/dist/v2/components/data-table/DataTableText.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTableText.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/data-table/index.js +1 -1
- package/dist/v2/components/date-picker/DatePicker.vue.d.ts +17 -0
- package/dist/v2/components/date-picker/DatePicker.vue.d.ts.map +1 -0
- package/dist/v2/components/date-picker/DatePicker.vue.js +6 -0
- package/dist/v2/components/date-picker/DatePicker.vue.js.map +1 -0
- package/dist/v2/components/date-picker/DatePicker.vue_vue_type_script_setup_true_lang.js +342 -0
- package/dist/v2/components/date-picker/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/v2/components/date-picker/date-parts.d.ts +68 -0
- package/dist/v2/components/date-picker/date-parts.d.ts.map +1 -0
- package/dist/v2/components/date-picker/date-parts.js +123 -0
- package/dist/v2/components/date-picker/date-parts.js.map +1 -0
- package/dist/v2/components/date-picker/index.d.ts +3 -0
- package/dist/v2/components/date-picker/index.d.ts.map +1 -0
- package/dist/v2/components/forms/ConfirmationForm.vue.js +1 -2
- package/dist/v2/components/forms/ConfirmationForm.vue.js.map +1 -1
- package/dist/v2/components/forms/ConfirmationForm.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -2
- package/dist/v2/components/layout/CollapsibleSection.vue.js.map +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/layout/CollapsibleSection.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/components/layout/ValueEmitter.vue.js +1 -2
- package/dist/v2/components/layout/ValueEmitter.vue.js.map +1 -1
- package/dist/v2/components/layout/ValueEmitter.vue_vue_type_script_setup_true_lang.js +0 -1
- package/dist/v2/components/layout/collapsible-section-heading-level.js +1 -2
- package/dist/v2/components/layout/index.js +1 -1
- package/dist/v2/components/modals/DeleteModal.vue.js +1 -2
- package/dist/v2/components/modals/DeleteModal.vue.js.map +1 -1
- package/dist/v2/components/modals/DeleteModal.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/components/modals/DeleteModal.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.js +2 -3
- package/dist/v2/components/modals/ModalClientContainer.vue.js.map +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/resize/Resize.vue.js +2 -3
- package/dist/v2/components/resize/Resize.vue.js.map +1 -1
- package/dist/v2/components/resize/Resize.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/resize/use-split-resize.js +1 -2
- package/dist/v2/components/server/ServerDropdown.vue.js +1 -2
- package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/components/server/ServerDropdown.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/components/server/ServerDropdownItem.vue.js +2 -3
- package/dist/v2/components/server/ServerDropdownItem.vue.js.map +1 -1
- package/dist/v2/components/server/ServerDropdownItem.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/server/ServerDropdownItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +1 -2
- package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/components/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +1 -2
- package/dist/v2/components/sidebar/SidebarMenu.vue.js.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/sidebar/SidebarToggle.vue.js +2 -3
- package/dist/v2/components/sidebar/SidebarToggle.vue.js.map +1 -1
- package/dist/v2/components/sidebar/SidebarToggle.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/components/sidebar/index.js +1 -1
- package/dist/v2/constants.js +2 -3
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +1 -2
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandActionForm.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +1 -2
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandActionInput.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -2
- package/dist/v2/features/environments/EnvironmentsList.vue.js.map +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/features/environments/components/Environment.vue.js +1 -2
- package/dist/v2/features/environments/components/Environment.vue.js.map +1 -1
- package/dist/v2/features/environments/components/Environment.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/features/environments/components/Environment.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentColors.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js +1 -2
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentColors.vue_vue_type_script_setup_true_lang.js +9 -10
- package/dist/v2/features/environments/components/EnvironmentColors.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +1 -2
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +1 -2
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +1 -2
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +2 -3
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/features/localization/index.js +1 -2
- package/dist/v2/features/localization/locales/ar.d.ts +21 -0
- package/dist/v2/features/localization/locales/ar.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/ar.js +22 -2
- package/dist/v2/features/localization/locales/ar.js.map +1 -1
- package/dist/v2/features/localization/locales/de.d.ts +21 -0
- package/dist/v2/features/localization/locales/de.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/de.js +22 -2
- package/dist/v2/features/localization/locales/de.js.map +1 -1
- package/dist/v2/features/localization/locales/es.d.ts +21 -0
- package/dist/v2/features/localization/locales/es.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/es.js +22 -2
- package/dist/v2/features/localization/locales/es.js.map +1 -1
- package/dist/v2/features/localization/locales/fr.d.ts +21 -0
- package/dist/v2/features/localization/locales/fr.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/fr.js +22 -2
- package/dist/v2/features/localization/locales/fr.js.map +1 -1
- package/dist/v2/features/localization/locales/pt.d.ts +21 -0
- package/dist/v2/features/localization/locales/pt.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/pt.js +22 -2
- package/dist/v2/features/localization/locales/pt.js.map +1 -1
- package/dist/v2/features/localization/locales/ru.d.ts +21 -0
- package/dist/v2/features/localization/locales/ru.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/ru.js +22 -2
- package/dist/v2/features/localization/locales/ru.js.map +1 -1
- package/dist/v2/features/localization/locales/zh-cn.d.ts +21 -0
- package/dist/v2/features/localization/locales/zh-cn.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/zh-cn.js +22 -2
- package/dist/v2/features/localization/locales/zh-cn.js.map +1 -1
- package/dist/v2/features/localization/locales/zh-tw.d.ts +21 -0
- package/dist/v2/features/localization/locales/zh-tw.d.ts.map +1 -1
- package/dist/v2/features/localization/locales/zh-tw.js +22 -2
- package/dist/v2/features/localization/locales/zh-tw.js.map +1 -1
- package/dist/v2/features/localization/translations.d.ts +21 -0
- package/dist/v2/features/localization/translations.d.ts.map +1 -1
- package/dist/v2/features/localization/translations.js +22 -2
- package/dist/v2/features/localization/translations.js.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +1 -2
- package/dist/v2/features/modal/Modal.vue.js.map +1 -1
- package/dist/v2/features/modal/Modal.vue_vue_type_script_setup_true_lang.js +4 -5
- package/dist/v2/features/modal/helpers/create-api-client-modal.js +1 -2
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +1 -2
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js +1 -2
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js +1 -2
- package/dist/v2/features/modal/index.js +2 -2
- package/dist/v2/features/modal/modal-events.js +1 -2
- package/dist/v2/features/modal/use-lazy-api-client.js +1 -2
- package/dist/v2/features/operation/Operation.vue.js +1 -2
- package/dist/v2/features/operation/Operation.vue.js.map +1 -1
- package/dist/v2/features/operation/Operation.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/v2/features/search/components/DocumentSearchModal.vue.js +2 -3
- package/dist/v2/features/search/components/DocumentSearchModal.vue.js.map +1 -1
- package/dist/v2/features/search/components/DocumentSearchModal.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/features/search/components/SearchResult.vue.js +1 -2
- package/dist/v2/features/search/components/SearchResult.vue.js.map +1 -1
- package/dist/v2/features/search/components/SearchResult.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/v2/features/search/components/SearchResult.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/v2/features/search/helpers/create-fuse-instance.js +1 -2
- package/dist/v2/features/search/helpers/create-search-index.js +1 -2
- package/dist/v2/features/search/hooks/use-document-search.js +1 -2
- package/dist/v2/features/search/hooks/use-search-index.js +1 -2
- package/dist/v2/features/search/index.js +1 -1
- package/dist/v2/helpers/generate-location-id.js +1 -2
- package/dist/v2/helpers/handle-hotkeys.js +1 -2
- package/dist/v2/helpers/test-utils.js +1 -2
- package/dist/v2/hooks/use-global-hot-keys.js +1 -2
- package/dist/v2/hooks/use-scroll-lock.js +1 -2
- package/dist/v2/workspace-events.js +1 -2
- package/dist/vue-styles.css +130 -130
- package/package.json +29 -28
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import { useLocalization } from "../../features/localization/index.js";
|
|
2
|
+
import { formatValue, parseValue, partsFromDate, resolveLocalDateTime } from "./date-parts.js";
|
|
3
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, renderList, shallowRef, toDisplayString, unref, watch, withCtx } from "vue";
|
|
4
|
+
import { ScalarButton } from "@scalar/components/button";
|
|
5
|
+
import { ScalarIconCalendarBlank, ScalarIconCaretLeft, ScalarIconCaretRight, ScalarIconClock } from "@scalar/icons";
|
|
6
|
+
import { ScalarIconButton } from "@scalar/components/icon-button";
|
|
7
|
+
import { Disclosure, DisclosureButton, DisclosurePanel } from "@headlessui/vue";
|
|
8
|
+
import { CalendarDate, CalendarDateTime } from "@internationalized/date";
|
|
9
|
+
import { ScalarPopover } from "@scalar/components/popover";
|
|
10
|
+
import { CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNext, CalendarPrev, CalendarRoot, DateFieldInput, DateFieldRoot } from "radix-vue";
|
|
11
|
+
// src/v2/components/date-picker/DatePicker.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
+
var _hoisted_1 = ["aria-label", "dir"];
|
|
13
|
+
var _hoisted_2 = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "flex items-center justify-between gap-2 px-2 text-sm"
|
|
16
|
+
};
|
|
17
|
+
var _hoisted_3 = { class: "text-c-2" };
|
|
18
|
+
var _hoisted_4 = { class: "flex items-center justify-between gap-2 px-2" };
|
|
19
|
+
var DatePicker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
20
|
+
__name: "DatePicker",
|
|
21
|
+
props: {
|
|
22
|
+
modelValue: {},
|
|
23
|
+
fieldName: {},
|
|
24
|
+
type: {}
|
|
25
|
+
},
|
|
26
|
+
emits: ["update:modelValue"],
|
|
27
|
+
setup(__props, { emit: __emit }) {
|
|
28
|
+
const emit = __emit;
|
|
29
|
+
const { direction, locale, translate } = useLocalization();
|
|
30
|
+
const pickerLabel = computed(() => {
|
|
31
|
+
if (__props.fieldName) return translate(__props.type === "time" ? "apiClient.datePicker.pickTimeFor" : "apiClient.datePicker.pickDateFor", { name: __props.fieldName });
|
|
32
|
+
return translate(__props.type === "time" ? "apiClient.datePicker.pickTime" : "apiClient.datePicker.pickDate");
|
|
33
|
+
});
|
|
34
|
+
/** Intl requires a BCP 47 locale, while client configuration also accepts aliases such as pt_BR. */
|
|
35
|
+
const calendarLocale = computed(() => {
|
|
36
|
+
try {
|
|
37
|
+
return Intl.getCanonicalLocales(locale.value.replaceAll("_", "-"))[0] ?? "en";
|
|
38
|
+
} catch {
|
|
39
|
+
return "en";
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
/** Whether the calendar grid is shown (everything except the time-only picker). */
|
|
43
|
+
const showCalendar = computed(() => __props.type !== "time");
|
|
44
|
+
/** Whether the time controls are shown. */
|
|
45
|
+
const showTime = computed(() => __props.type !== "date");
|
|
46
|
+
const timeSegmentLabels = computed(() => ({
|
|
47
|
+
hour: translate("apiClient.datePicker.hour"),
|
|
48
|
+
minute: translate("apiClient.datePicker.minute"),
|
|
49
|
+
second: translate("apiClient.datePicker.second")
|
|
50
|
+
}));
|
|
51
|
+
/**
|
|
52
|
+
* The currently committed selection parsed from `modelValue`, or `null` when
|
|
53
|
+
* the field holds free text or a variable. Drives both the highlighted day and
|
|
54
|
+
* the time input, and lets us leave the field untouched until the user picks.
|
|
55
|
+
*/
|
|
56
|
+
const selection = computed(() => parseValue(__props.modelValue, __props.type));
|
|
57
|
+
/**
|
|
58
|
+
* Working fields. Seeded from the current value when it is a valid date/time,
|
|
59
|
+
* otherwise from "now" so the calendar opens on a sensible month.
|
|
60
|
+
*/
|
|
61
|
+
const draft = ref(selection.value ?? partsFromDate(/* @__PURE__ */ new Date()));
|
|
62
|
+
/** The month the calendar shows before a date is chosen. */
|
|
63
|
+
const placeholder = shallowRef(new CalendarDate(draft.value.year, draft.value.month, draft.value.day));
|
|
64
|
+
/** Keep the working fields and calendar view in sync with the field. */
|
|
65
|
+
watch(() => __props.modelValue, () => {
|
|
66
|
+
draft.value = selection.value ?? partsFromDate(/* @__PURE__ */ new Date());
|
|
67
|
+
placeholder.value = new CalendarDate(draft.value.year, draft.value.month, draft.value.day);
|
|
68
|
+
});
|
|
69
|
+
/** The selected day as a calendar value, or `undefined` when nothing is selected. */
|
|
70
|
+
const calendarValue = computed(() => selection.value ? new CalendarDate(selection.value.year, selection.value.month, selection.value.day) : void 0);
|
|
71
|
+
/**
|
|
72
|
+
* The time bound to the segmented time field. radix-vue has no standalone time
|
|
73
|
+
* field in this version, so we back it with a `CalendarDateTime` and only render
|
|
74
|
+
* its hour/minute/second segments; the date part is ignored. A writable computed
|
|
75
|
+
* (rather than a one-way `:modelValue`) is what keeps the segments prefilled with
|
|
76
|
+
* the current time — DateField only populates from `modelValue` via `v-model`.
|
|
77
|
+
*/
|
|
78
|
+
const timeModel = computed({
|
|
79
|
+
get: () => new CalendarDateTime(draft.value.year || 2e3, draft.value.month || 1, draft.value.day || 1, draft.value.hour, draft.value.minute, draft.value.second),
|
|
80
|
+
set: (value) => {
|
|
81
|
+
if (!value || !("hour" in value)) return;
|
|
82
|
+
commit({
|
|
83
|
+
...draft.value,
|
|
84
|
+
hour: value.hour,
|
|
85
|
+
minute: value.minute,
|
|
86
|
+
second: value.second
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
/** The faker variables offered as shortcuts, contextual to the format. */
|
|
91
|
+
const fakerOptions = computed(() => __props.type === "date-time" ? [
|
|
92
|
+
{
|
|
93
|
+
name: "$isoTimestamp",
|
|
94
|
+
label: translate("apiClient.datePicker.currentTimestamp")
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "$randomDateFuture",
|
|
98
|
+
label: translate("apiClient.datePicker.randomFutureDate")
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "$randomDatePast",
|
|
102
|
+
label: translate("apiClient.datePicker.randomPastDate")
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "$randomDateRecent",
|
|
106
|
+
label: translate("apiClient.datePicker.randomRecentDate")
|
|
107
|
+
}
|
|
108
|
+
] : []);
|
|
109
|
+
/** Emit a value built from the working fields, filling a local offset for `date-time`. */
|
|
110
|
+
const commit = (next) => {
|
|
111
|
+
const resolved = __props.type === "date-time" && !next.offset ? resolveLocalDateTime(next) : next;
|
|
112
|
+
draft.value = resolved;
|
|
113
|
+
emit("update:modelValue", formatValue(resolved, __props.type));
|
|
114
|
+
};
|
|
115
|
+
const handleCalendarSelect = (value, close) => {
|
|
116
|
+
if (!value) return;
|
|
117
|
+
commit({
|
|
118
|
+
...draft.value,
|
|
119
|
+
year: value.year,
|
|
120
|
+
month: value.month,
|
|
121
|
+
day: value.day,
|
|
122
|
+
offset: selection.value?.offset ?? ""
|
|
123
|
+
});
|
|
124
|
+
if (__props.type === "date") close();
|
|
125
|
+
};
|
|
126
|
+
/** Seed the picker with the current date/time. */
|
|
127
|
+
const selectNow = (close) => {
|
|
128
|
+
commit(partsFromDate(/* @__PURE__ */ new Date()));
|
|
129
|
+
if (__props.type === "date") close();
|
|
130
|
+
};
|
|
131
|
+
/** Insert a faker variable so the value is generated fresh at send time. */
|
|
132
|
+
const selectFaker = (name, close) => {
|
|
133
|
+
emit("update:modelValue", `{{${name}}}`);
|
|
134
|
+
close();
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Keep only the time-related segments (hour/minute/second and the `:` literals
|
|
138
|
+
* between them). The backing value is a `CalendarDateTime`, so radix also yields
|
|
139
|
+
* date segments we do not want to show — we slice from the first time part. The
|
|
140
|
+
* generic preserves radix's `SegmentPart` type so it stays assignable to `part`.
|
|
141
|
+
*/
|
|
142
|
+
const timeSegments = (segments) => {
|
|
143
|
+
const start = segments.findIndex((segment) => segment.part === "hour");
|
|
144
|
+
return start === -1 ? segments : segments.slice(start);
|
|
145
|
+
};
|
|
146
|
+
return (_ctx, _cache) => {
|
|
147
|
+
return openBlock(), createBlock(unref(ScalarPopover), {
|
|
148
|
+
focus: "",
|
|
149
|
+
placement: "bottom-end",
|
|
150
|
+
teleport: ""
|
|
151
|
+
}, {
|
|
152
|
+
popover: withCtx(({ close }) => [createElementVNode("div", {
|
|
153
|
+
"aria-label": pickerLabel.value,
|
|
154
|
+
class: "flex w-64 flex-col gap-3 py-2",
|
|
155
|
+
dir: unref(direction),
|
|
156
|
+
role: "group"
|
|
157
|
+
}, [
|
|
158
|
+
showCalendar.value ? (openBlock(), createBlock(unref(CalendarRoot), {
|
|
159
|
+
key: 0,
|
|
160
|
+
calendarLabel: unref(translate)("apiClient.datePicker.calendar"),
|
|
161
|
+
class: "px-2",
|
|
162
|
+
dir: unref(direction),
|
|
163
|
+
locale: calendarLocale.value,
|
|
164
|
+
modelValue: calendarValue.value,
|
|
165
|
+
placeholder: placeholder.value,
|
|
166
|
+
"onUpdate:modelValue": (v) => handleCalendarSelect(v, close),
|
|
167
|
+
"onUpdate:placeholder": _cache[0] || (_cache[0] = (v) => placeholder.value = v)
|
|
168
|
+
}, {
|
|
169
|
+
default: withCtx(({ weekDays, grid }) => [createVNode(unref(CalendarHeader), { class: "mb-2 flex items-center justify-between" }, {
|
|
170
|
+
default: withCtx(() => [
|
|
171
|
+
createVNode(unref(CalendarPrev), {
|
|
172
|
+
"aria-label": unref(translate)("apiClient.datePicker.previousMonth"),
|
|
173
|
+
class: "text-c-2 hover:text-c-1 hover:bg-b-2 flex size-7 items-center justify-center rounded"
|
|
174
|
+
}, {
|
|
175
|
+
default: withCtx(() => [createVNode(unref(ScalarIconCaretLeft), { class: "size-4 rtl:rotate-180" })]),
|
|
176
|
+
_: 1
|
|
177
|
+
}, 8, ["aria-label"]),
|
|
178
|
+
createVNode(unref(CalendarHeading), { class: "text-c-1 text-sm font-medium" }),
|
|
179
|
+
createVNode(unref(CalendarNext), {
|
|
180
|
+
"aria-label": unref(translate)("apiClient.datePicker.nextMonth"),
|
|
181
|
+
class: "text-c-2 hover:text-c-1 hover:bg-b-2 flex size-7 items-center justify-center rounded"
|
|
182
|
+
}, {
|
|
183
|
+
default: withCtx(() => [createVNode(unref(ScalarIconCaretRight), { class: "size-4 rtl:rotate-180" })]),
|
|
184
|
+
_: 1
|
|
185
|
+
}, 8, ["aria-label"])
|
|
186
|
+
]),
|
|
187
|
+
_: 1
|
|
188
|
+
}), (openBlock(true), createElementBlock(Fragment, null, renderList(grid, (month) => {
|
|
189
|
+
return openBlock(), createBlock(unref(CalendarGrid), {
|
|
190
|
+
key: month.value.toString(),
|
|
191
|
+
class: "w-full border-collapse"
|
|
192
|
+
}, {
|
|
193
|
+
default: withCtx(() => [createVNode(unref(CalendarGridHead), null, {
|
|
194
|
+
default: withCtx(() => [createVNode(unref(CalendarGridRow), { class: "grid grid-cols-7" }, {
|
|
195
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(weekDays, (day, index) => {
|
|
196
|
+
return openBlock(), createBlock(unref(CalendarHeadCell), {
|
|
197
|
+
key: index,
|
|
198
|
+
class: "text-c-3 flex h-6 items-center justify-center text-xs font-normal"
|
|
199
|
+
}, {
|
|
200
|
+
default: withCtx(() => [createTextVNode(toDisplayString(day), 1)]),
|
|
201
|
+
_: 2
|
|
202
|
+
}, 1024);
|
|
203
|
+
}), 128))]),
|
|
204
|
+
_: 2
|
|
205
|
+
}, 1024)]),
|
|
206
|
+
_: 2
|
|
207
|
+
}, 1024), createVNode(unref(CalendarGridBody), null, {
|
|
208
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(month.rows, (weekDates, index) => {
|
|
209
|
+
return openBlock(), createBlock(unref(CalendarGridRow), {
|
|
210
|
+
key: index,
|
|
211
|
+
class: "grid grid-cols-7"
|
|
212
|
+
}, {
|
|
213
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(weekDates, (weekDate) => {
|
|
214
|
+
return openBlock(), createBlock(unref(CalendarCell), {
|
|
215
|
+
key: weekDate.toString(),
|
|
216
|
+
class: "text-center text-sm",
|
|
217
|
+
date: weekDate
|
|
218
|
+
}, {
|
|
219
|
+
default: withCtx(() => [createVNode(unref(CalendarCellTrigger), {
|
|
220
|
+
class: "text-c-1 hover:bg-b-2 data-[selected]:bg-b-btn data-[selected]:text-c-btn data-[outside-view]:text-c-3 mx-auto flex size-8 cursor-pointer items-center justify-center rounded text-sm outline-offset-2 data-[today]:font-bold",
|
|
221
|
+
day: weekDate,
|
|
222
|
+
month: month.value
|
|
223
|
+
}, null, 8, ["day", "month"])]),
|
|
224
|
+
_: 2
|
|
225
|
+
}, 1032, ["date"]);
|
|
226
|
+
}), 128))]),
|
|
227
|
+
_: 2
|
|
228
|
+
}, 1024);
|
|
229
|
+
}), 128))]),
|
|
230
|
+
_: 2
|
|
231
|
+
}, 1024)]),
|
|
232
|
+
_: 2
|
|
233
|
+
}, 1024);
|
|
234
|
+
}), 128))]),
|
|
235
|
+
_: 1
|
|
236
|
+
}, 8, [
|
|
237
|
+
"calendarLabel",
|
|
238
|
+
"dir",
|
|
239
|
+
"locale",
|
|
240
|
+
"modelValue",
|
|
241
|
+
"placeholder",
|
|
242
|
+
"onUpdate:modelValue"
|
|
243
|
+
])) : createCommentVNode("", true),
|
|
244
|
+
showTime.value ? (openBlock(), createElementBlock("div", _hoisted_2, [createElementVNode("span", _hoisted_3, toDisplayString(unref(translate)("apiClient.datePicker.time")), 1), createVNode(unref(DateFieldRoot), {
|
|
245
|
+
modelValue: timeModel.value,
|
|
246
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => timeModel.value = $event),
|
|
247
|
+
"aria-label": unref(translate)("apiClient.datePicker.time"),
|
|
248
|
+
class: "border-c-3 bg-b-1 text-c-1 flex items-center rounded border px-2 py-1.5",
|
|
249
|
+
granularity: "second",
|
|
250
|
+
hourCycle: 24,
|
|
251
|
+
locale: calendarLocale.value
|
|
252
|
+
}, {
|
|
253
|
+
default: withCtx(({ segments }) => [(openBlock(true), createElementBlock(Fragment, null, renderList(timeSegments(segments), (item, index) => {
|
|
254
|
+
return openBlock(), createBlock(unref(DateFieldInput), {
|
|
255
|
+
key: index,
|
|
256
|
+
"aria-label": timeSegmentLabels.value[item.part],
|
|
257
|
+
class: normalizeClass(item.part === "literal" ? "text-c-3" : "data-[placeholder]:text-c-3 focus:bg-b-btn focus:text-c-btn rounded focus:outline-none"),
|
|
258
|
+
part: item.part
|
|
259
|
+
}, {
|
|
260
|
+
default: withCtx(() => [createTextVNode(toDisplayString(item.value), 1)]),
|
|
261
|
+
_: 2
|
|
262
|
+
}, 1032, [
|
|
263
|
+
"aria-label",
|
|
264
|
+
"class",
|
|
265
|
+
"part"
|
|
266
|
+
]);
|
|
267
|
+
}), 128))]),
|
|
268
|
+
_: 1
|
|
269
|
+
}, 8, [
|
|
270
|
+
"modelValue",
|
|
271
|
+
"aria-label",
|
|
272
|
+
"locale"
|
|
273
|
+
])])) : createCommentVNode("", true),
|
|
274
|
+
createElementVNode("div", _hoisted_4, [createVNode(unref(ScalarButton), {
|
|
275
|
+
size: "sm",
|
|
276
|
+
variant: "outlined",
|
|
277
|
+
onClick: ($event) => selectNow(close)
|
|
278
|
+
}, {
|
|
279
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(translate)(__props.type === "date" ? "apiClient.datePicker.today" : "apiClient.datePicker.now")), 1)]),
|
|
280
|
+
_: 1
|
|
281
|
+
}, 8, ["onClick"]), showTime.value ? (openBlock(), createBlock(unref(ScalarButton), {
|
|
282
|
+
key: 0,
|
|
283
|
+
size: "sm",
|
|
284
|
+
onClick: close
|
|
285
|
+
}, {
|
|
286
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("apiClient.datePicker.done")), 1)]),
|
|
287
|
+
_: 1
|
|
288
|
+
}, 8, ["onClick"])) : createCommentVNode("", true)]),
|
|
289
|
+
fakerOptions.value.length ? (openBlock(), createBlock(unref(Disclosure), {
|
|
290
|
+
key: 2,
|
|
291
|
+
as: "div",
|
|
292
|
+
class: "-mx-0.75 -mb-2 border-t"
|
|
293
|
+
}, {
|
|
294
|
+
default: withCtx(({ open }) => [createVNode(unref(DisclosureButton), { as: "template" }, {
|
|
295
|
+
default: withCtx(() => [createVNode(unref(ScalarButton), {
|
|
296
|
+
class: "w-full justify-start gap-2 px-2.75 text-start",
|
|
297
|
+
size: "sm",
|
|
298
|
+
variant: "ghost"
|
|
299
|
+
}, {
|
|
300
|
+
default: withCtx(() => [createVNode(unref(ScalarIconCaretRight), { class: normalizeClass(["text-c-3 size-3.5 shrink-0", open ? "rotate-90" : "rtl:rotate-180"]) }, null, 8, ["class"]), createElementVNode("span", null, toDisplayString(unref(translate)("apiClient.datePicker.insertVariable")), 1)]),
|
|
301
|
+
_: 2
|
|
302
|
+
}, 1024)]),
|
|
303
|
+
_: 2
|
|
304
|
+
}, 1024), createVNode(unref(DisclosurePanel), { class: "flex flex-col px-2.75 pb-2" }, {
|
|
305
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(fakerOptions.value, (option) => {
|
|
306
|
+
return openBlock(), createBlock(unref(ScalarButton), {
|
|
307
|
+
key: option.name,
|
|
308
|
+
class: "justify-start ps-5.5 pe-2 text-start",
|
|
309
|
+
size: "sm",
|
|
310
|
+
variant: "ghost",
|
|
311
|
+
onClick: ($event) => selectFaker(option.name, close)
|
|
312
|
+
}, {
|
|
313
|
+
default: withCtx(() => [createTextVNode(toDisplayString(option.label), 1)]),
|
|
314
|
+
_: 2
|
|
315
|
+
}, 1032, ["onClick"]);
|
|
316
|
+
}), 128))]),
|
|
317
|
+
_: 2
|
|
318
|
+
}, 1024)]),
|
|
319
|
+
_: 2
|
|
320
|
+
}, 1024)) : createCommentVNode("", true)
|
|
321
|
+
], 8, _hoisted_1)]),
|
|
322
|
+
default: withCtx(() => [createVNode(unref(ScalarIconButton), {
|
|
323
|
+
"aria-label": pickerLabel.value,
|
|
324
|
+
class: "-mr-0.5",
|
|
325
|
+
icon: __props.type === "time" ? unref(ScalarIconClock) : unref(ScalarIconCalendarBlank),
|
|
326
|
+
label: pickerLabel.value,
|
|
327
|
+
size: "xs",
|
|
328
|
+
tooltip: "top",
|
|
329
|
+
variant: "ghost"
|
|
330
|
+
}, null, 8, [
|
|
331
|
+
"aria-label",
|
|
332
|
+
"icon",
|
|
333
|
+
"label"
|
|
334
|
+
])]),
|
|
335
|
+
_: 1
|
|
336
|
+
});
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
export { DatePicker_vue_vue_type_script_setup_true_lang_default as default };
|
|
341
|
+
|
|
342
|
+
//# sourceMappingURL=DatePicker.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_unref","_withCtx","_createElementVNode","_createVNode","_createElementBlock","_Fragment","_renderList","_createTextVNode","_toDisplayString","_normalizeClass"],"sources":["../../../../src/v2/components/date-picker/DatePicker.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'\nimport {\n CalendarDate,\n CalendarDateTime,\n type DateValue,\n} from '@internationalized/date'\nimport { ScalarButton } from '@scalar/components/button'\nimport { ScalarIconButton } from '@scalar/components/icon-button'\nimport { ScalarPopover } from '@scalar/components/popover'\nimport {\n ScalarIconCalendarBlank,\n ScalarIconCaretLeft,\n ScalarIconCaretRight,\n ScalarIconClock,\n} from '@scalar/icons'\nimport {\n CalendarCell,\n CalendarCellTrigger,\n CalendarGrid,\n CalendarGridBody,\n CalendarGridHead,\n CalendarGridRow,\n CalendarHeadCell,\n CalendarHeader,\n CalendarHeading,\n CalendarNext,\n CalendarPrev,\n CalendarRoot,\n DateFieldInput,\n DateFieldRoot,\n} from 'radix-vue'\nimport { computed, ref, shallowRef, watch } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nimport {\n formatValue,\n parseValue,\n partsFromDate,\n resolveLocalDateTime,\n type DateParts,\n type DatePickerType,\n} from './date-parts'\n\nconst { modelValue, fieldName, type } = defineProps<{\n /** The current field value; may be a formatted value, free text, or a variable. */\n modelValue: string\n /** Field name used to distinguish picker triggers in the request table. */\n fieldName?: string\n /** Which OpenAPI string format this field carries. */\n type: DatePickerType\n}>()\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: string): void\n}>()\n\nconst { direction, locale, translate } = useLocalization()\n\nconst pickerLabel = computed(() => {\n if (fieldName) {\n return translate(\n type === 'time'\n ? 'apiClient.datePicker.pickTimeFor'\n : 'apiClient.datePicker.pickDateFor',\n {\n name: fieldName,\n },\n )\n }\n return translate(\n type === 'time'\n ? 'apiClient.datePicker.pickTime'\n : 'apiClient.datePicker.pickDate',\n )\n})\n\n/** Intl requires a BCP 47 locale, while client configuration also accepts aliases such as pt_BR. */\nconst calendarLocale = computed(() => {\n try {\n return (\n Intl.getCanonicalLocales(locale.value.replaceAll('_', '-'))[0] ?? 'en'\n )\n } catch {\n return 'en'\n }\n})\n\n/** Whether the calendar grid is shown (everything except the time-only picker). */\nconst showCalendar = computed(() => type !== 'time')\n\n/** Whether the time controls are shown. */\nconst showTime = computed(() => type !== 'date')\n\nconst timeSegmentLabels = computed<Record<string, string>>(() => ({\n hour: translate('apiClient.datePicker.hour'),\n minute: translate('apiClient.datePicker.minute'),\n second: translate('apiClient.datePicker.second'),\n}))\n\n/**\n * The currently committed selection parsed from `modelValue`, or `null` when\n * the field holds free text or a variable. Drives both the highlighted day and\n * the time input, and lets us leave the field untouched until the user picks.\n */\nconst selection = computed<DateParts | null>(() => parseValue(modelValue, type))\n\n/**\n * Working fields. Seeded from the current value when it is a valid date/time,\n * otherwise from \"now\" so the calendar opens on a sensible month.\n */\nconst draft = ref<DateParts>(selection.value ?? partsFromDate(new Date()))\n\n/** The month the calendar shows before a date is chosen. */\n// Calendar values are immutable class instances; keep their private fields intact.\nconst placeholder = shallowRef<DateValue>(\n new CalendarDate(draft.value.year, draft.value.month, draft.value.day),\n)\n\n/** Keep the working fields and calendar view in sync with the field. */\nwatch(\n () => modelValue,\n () => {\n draft.value = selection.value ?? partsFromDate(new Date())\n placeholder.value = new CalendarDate(\n draft.value.year,\n draft.value.month,\n draft.value.day,\n )\n },\n)\n\n/** The selected day as a calendar value, or `undefined` when nothing is selected. */\nconst calendarValue = computed<DateValue | undefined>(() =>\n selection.value\n ? new CalendarDate(\n selection.value.year,\n selection.value.month,\n selection.value.day,\n )\n : undefined,\n)\n\n/**\n * The time bound to the segmented time field. radix-vue has no standalone time\n * field in this version, so we back it with a `CalendarDateTime` and only render\n * its hour/minute/second segments; the date part is ignored. A writable computed\n * (rather than a one-way `:modelValue`) is what keeps the segments prefilled with\n * the current time — DateField only populates from `modelValue` via `v-model`.\n */\nconst timeModel = computed<DateValue | undefined>({\n get: () =>\n new CalendarDateTime(\n draft.value.year || 2000,\n draft.value.month || 1,\n draft.value.day || 1,\n draft.value.hour,\n draft.value.minute,\n draft.value.second,\n ),\n set: (value) => {\n // Only `CalendarDateTime`/`ZonedDateTime` carry time parts; ignore bare dates.\n if (!value || !('hour' in value)) {\n return\n }\n commit({\n ...draft.value,\n hour: value.hour,\n minute: value.minute,\n second: value.second,\n })\n },\n})\n\n/** The faker variables offered as shortcuts, contextual to the format. */\nconst fakerOptions = computed<{ name: string; label: string }[]>(() =>\n type === 'date-time'\n ? [\n {\n name: '$isoTimestamp',\n label: translate('apiClient.datePicker.currentTimestamp'),\n },\n {\n name: '$randomDateFuture',\n label: translate('apiClient.datePicker.randomFutureDate'),\n },\n {\n name: '$randomDatePast',\n label: translate('apiClient.datePicker.randomPastDate'),\n },\n {\n name: '$randomDateRecent',\n label: translate('apiClient.datePicker.randomRecentDate'),\n },\n ]\n : [],\n)\n\n/** Emit a value built from the working fields, filling a local offset for `date-time`. */\nconst commit = (next: DateParts): void => {\n const resolved =\n type === 'date-time' && !next.offset ? resolveLocalDateTime(next) : next\n draft.value = resolved\n emit('update:modelValue', formatValue(resolved, type))\n}\n\nconst handleCalendarSelect = (\n value: DateValue | undefined,\n close: () => void,\n): void => {\n if (!value) {\n return\n }\n commit({\n ...draft.value,\n year: value.year,\n month: value.month,\n day: value.day,\n // Unzoned input uses the selected date's local offset, which can differ across seasons.\n offset: selection.value?.offset ?? '',\n })\n // A date has nothing left to pick, so close; date-time keeps the time controls open.\n if (type === 'date') {\n close()\n }\n}\n\n/** Seed the picker with the current date/time. */\nconst selectNow = (close: () => void): void => {\n commit(partsFromDate(new Date()))\n if (type === 'date') {\n close()\n }\n}\n\n/** Insert a faker variable so the value is generated fresh at send time. */\nconst selectFaker = (name: string, close: () => void): void => {\n emit('update:modelValue', `{{${name}}}`)\n close()\n}\n\n/**\n * Keep only the time-related segments (hour/minute/second and the `:` literals\n * between them). The backing value is a `CalendarDateTime`, so radix also yields\n * date segments we do not want to show — we slice from the first time part. The\n * generic preserves radix's `SegmentPart` type so it stays assignable to `part`.\n */\nconst timeSegments = <T extends { part: string }>(segments: T[]): T[] => {\n const start = segments.findIndex((segment) => segment.part === 'hour')\n return start === -1 ? segments : segments.slice(start)\n}\n</script>\n\n<template>\n <ScalarPopover\n focus\n placement=\"bottom-end\"\n teleport>\n <ScalarIconButton\n :aria-label=\"pickerLabel\"\n class=\"-mr-0.5\"\n :icon=\"type === 'time' ? ScalarIconClock : ScalarIconCalendarBlank\"\n :label=\"pickerLabel\"\n size=\"xs\"\n tooltip=\"top\"\n variant=\"ghost\" />\n <template #popover=\"{ close }\">\n <div\n :aria-label=\"pickerLabel\"\n class=\"flex w-64 flex-col gap-3 py-2\"\n :dir=\"direction\"\n role=\"group\">\n <!-- Calendar (accessible grid from radix-vue) -->\n <CalendarRoot\n v-if=\"showCalendar\"\n v-slot=\"{ weekDays, grid }\"\n :calendarLabel=\"translate('apiClient.datePicker.calendar')\"\n class=\"px-2\"\n :dir=\"direction\"\n :locale=\"calendarLocale\"\n :modelValue=\"calendarValue\"\n :placeholder=\"placeholder\"\n @update:modelValue=\"(v) => handleCalendarSelect(v, close)\"\n @update:placeholder=\"(v) => (placeholder = v)\">\n <CalendarHeader class=\"mb-2 flex items-center justify-between\">\n <CalendarPrev\n :aria-label=\"translate('apiClient.datePicker.previousMonth')\"\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 flex size-7 items-center justify-center rounded\">\n <ScalarIconCaretLeft class=\"size-4 rtl:rotate-180\" />\n </CalendarPrev>\n <CalendarHeading class=\"text-c-1 text-sm font-medium\" />\n <CalendarNext\n :aria-label=\"translate('apiClient.datePicker.nextMonth')\"\n class=\"text-c-2 hover:text-c-1 hover:bg-b-2 flex size-7 items-center justify-center rounded\">\n <ScalarIconCaretRight class=\"size-4 rtl:rotate-180\" />\n </CalendarNext>\n </CalendarHeader>\n <CalendarGrid\n v-for=\"month in grid\"\n :key=\"month.value.toString()\"\n class=\"w-full border-collapse\">\n <CalendarGridHead>\n <CalendarGridRow class=\"grid grid-cols-7\">\n <CalendarHeadCell\n v-for=\"(day, index) in weekDays\"\n :key=\"index\"\n class=\"text-c-3 flex h-6 items-center justify-center text-xs font-normal\">\n {{ day }}\n </CalendarHeadCell>\n </CalendarGridRow>\n </CalendarGridHead>\n <CalendarGridBody>\n <CalendarGridRow\n v-for=\"(weekDates, index) in month.rows\"\n :key=\"index\"\n class=\"grid grid-cols-7\">\n <CalendarCell\n v-for=\"weekDate in weekDates\"\n :key=\"weekDate.toString()\"\n class=\"text-center text-sm\"\n :date=\"weekDate\">\n <CalendarCellTrigger\n class=\"text-c-1 hover:bg-b-2 data-[selected]:bg-b-btn data-[selected]:text-c-btn data-[outside-view]:text-c-3 mx-auto flex size-8 cursor-pointer items-center justify-center rounded text-sm outline-offset-2 data-[today]:font-bold\"\n :day=\"weekDate\"\n :month=\"month.value\" />\n </CalendarCell>\n </CalendarGridRow>\n </CalendarGridBody>\n </CalendarGrid>\n </CalendarRoot>\n\n <!-- Time: a themed segmented field (radix-vue has no standalone time field here) -->\n <div\n v-if=\"showTime\"\n class=\"flex items-center justify-between gap-2 px-2 text-sm\">\n <span class=\"text-c-2\">{{\n translate('apiClient.datePicker.time')\n }}</span>\n <DateFieldRoot\n v-slot=\"{ segments }\"\n v-model=\"timeModel\"\n :aria-label=\"translate('apiClient.datePicker.time')\"\n class=\"border-c-3 bg-b-1 text-c-1 flex items-center rounded border px-2 py-1.5\"\n granularity=\"second\"\n :hourCycle=\"24\"\n :locale=\"calendarLocale\">\n <DateFieldInput\n v-for=\"(item, index) in timeSegments(segments)\"\n :key=\"index\"\n :aria-label=\"timeSegmentLabels[item.part]\"\n :class=\"\n item.part === 'literal'\n ? 'text-c-3'\n : 'data-[placeholder]:text-c-3 focus:bg-b-btn focus:text-c-btn rounded focus:outline-none'\n \"\n :part=\"item.part\">\n {{ item.value }}\n </DateFieldInput>\n </DateFieldRoot>\n </div>\n\n <div class=\"flex items-center justify-between gap-2 px-2\">\n <ScalarButton\n size=\"sm\"\n variant=\"outlined\"\n @click=\"selectNow(close)\">\n {{\n translate(\n type === 'date'\n ? 'apiClient.datePicker.today'\n : 'apiClient.datePicker.now',\n )\n }}\n </ScalarButton>\n <ScalarButton\n v-if=\"showTime\"\n size=\"sm\"\n @click=\"close\">\n {{ translate('apiClient.datePicker.done') }}\n </ScalarButton>\n </div>\n\n <!-- Faker shortcuts (date-time only) -->\n <Disclosure\n v-if=\"fakerOptions.length\"\n v-slot=\"{ open }\"\n as=\"div\"\n class=\"-mx-0.75 -mb-2 border-t\">\n <DisclosureButton as=\"template\">\n <ScalarButton\n class=\"w-full justify-start gap-2 px-2.75 text-start\"\n size=\"sm\"\n variant=\"ghost\">\n <ScalarIconCaretRight\n class=\"text-c-3 size-3.5 shrink-0\"\n :class=\"open ? 'rotate-90' : 'rtl:rotate-180'\" />\n <span>{{\n translate('apiClient.datePicker.insertVariable')\n }}</span>\n </ScalarButton>\n </DisclosureButton>\n <DisclosurePanel class=\"flex flex-col px-2.75 pb-2\">\n <ScalarButton\n v-for=\"option in fakerOptions\"\n :key=\"option.name\"\n class=\"justify-start ps-5.5 pe-2 text-start\"\n size=\"sm\"\n variant=\"ghost\"\n @click=\"selectFaker(option.name, close)\">\n {{ option.label }}\n </ScalarButton>\n </DisclosurePanel>\n </Disclosure>\n </div>\n </template>\n </ScalarPopover>\n</template>\n"],"mappings":"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"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure date/time helpers for the {@link DatePicker}.
|
|
3
|
+
*
|
|
4
|
+
* The picker edits three OpenAPI string formats — `date`, `date-time`, and
|
|
5
|
+
* `time` — as a small bag of integer fields. Keeping the parse/format logic
|
|
6
|
+
* here (free of Vue and, where possible, of the ambient timezone) makes it
|
|
7
|
+
* straightforward to unit test the exact strings we hand back to the request.
|
|
8
|
+
*/
|
|
9
|
+
/** The OpenAPI string formats the picker knows how to edit. */
|
|
10
|
+
export type DatePickerType = 'date' | 'date-time' | 'time';
|
|
11
|
+
/**
|
|
12
|
+
* A date/time broken into its editable fields.
|
|
13
|
+
*
|
|
14
|
+
* `offset` applies to both time and date-time values: it holds the timezone
|
|
15
|
+
* designator (`Z` or `±HH:MM`) so a round-trip preserves whatever the user
|
|
16
|
+
* originally typed instead of silently rewriting it to the local zone.
|
|
17
|
+
*/
|
|
18
|
+
export type DateParts = {
|
|
19
|
+
year: number;
|
|
20
|
+
/** 1-12 (human month, not the 0-based `Date` month) */
|
|
21
|
+
month: number;
|
|
22
|
+
day: number;
|
|
23
|
+
hour: number;
|
|
24
|
+
minute: number;
|
|
25
|
+
second: number;
|
|
26
|
+
/** Timezone designator, e.g. `Z` or `+02:00`, when present in the original value. */
|
|
27
|
+
offset: string;
|
|
28
|
+
/** Fractional seconds, including the leading decimal point, preserved during edits. */
|
|
29
|
+
fraction?: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Parse a formatted value into editable fields, or return `null` when it does
|
|
33
|
+
* not match the given format. A `null` result is how the picker recognizes
|
|
34
|
+
* free-text or `{{variable}}` values it should not try to interpret — it just
|
|
35
|
+
* falls back to "now" for its initial view without touching the field.
|
|
36
|
+
*/
|
|
37
|
+
export declare const parseValue: (value: string, type: DatePickerType) => DateParts | null;
|
|
38
|
+
/** Format the date portion as `YYYY-MM-DD`. */
|
|
39
|
+
export declare const formatDate: (parts: DateParts) => string;
|
|
40
|
+
/** Format the time portion as `HH:MM:SS`. */
|
|
41
|
+
export declare const formatTime: (parts: DateParts) => string;
|
|
42
|
+
/**
|
|
43
|
+
* Format editable fields back into the string the request expects.
|
|
44
|
+
*
|
|
45
|
+
* For `date-time` the caller is responsible for supplying a non-empty
|
|
46
|
+
* `offset`; use {@link getLocalTimezoneOffset} to derive one when the original
|
|
47
|
+
* value had none.
|
|
48
|
+
*/
|
|
49
|
+
export declare const formatValue: (parts: DateParts, type: DatePickerType) => string;
|
|
50
|
+
/**
|
|
51
|
+
* Read the current fields from a `Date`, in the host's local timezone. Used to
|
|
52
|
+
* seed the picker with "now"/"today" and to fill in an offset when a
|
|
53
|
+
* `date-time` value arrives without one.
|
|
54
|
+
*/
|
|
55
|
+
export declare const partsFromDate: (date: Date) => DateParts;
|
|
56
|
+
/**
|
|
57
|
+
* The host's UTC offset for the given date as an RFC 3339 designator
|
|
58
|
+
* (`+02:00`, `-05:00`, or `+00:00`). `Date.getTimezoneOffset` reports minutes
|
|
59
|
+
* *behind* UTC, so the sign is inverted here.
|
|
60
|
+
*/
|
|
61
|
+
export declare const getLocalTimezoneOffset: (date: Date) => string;
|
|
62
|
+
/**
|
|
63
|
+
* Resolve an unzoned selection in the host timezone. If the wall time falls in
|
|
64
|
+
* a daylight-saving gap, move it forward by the gap so the fields and offset
|
|
65
|
+
* describe the same instant.
|
|
66
|
+
*/
|
|
67
|
+
export declare const resolveLocalDateTime: (parts: DateParts) => DateParts;
|
|
68
|
+
//# sourceMappingURL=date-parts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-parts.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/date-picker/date-parts.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,+DAA+D;AAC/D,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAA;AAE1D;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,qFAAqF;IACrF,MAAM,EAAE,MAAM,CAAA;IACd,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAqBD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,EAAE,MAAM,cAAc,KAAG,SAAS,GAAG,IAkD5E,CAAA;AAED,+CAA+C;AAC/C,eAAO,MAAM,UAAU,GAAI,OAAO,SAAS,KAAG,MAAuE,CAAA;AAErH,6CAA6C;AAC7C,eAAO,MAAM,UAAU,GAAI,OAAO,SAAS,KAAG,MAC4C,CAAA;AAE1F;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,SAAS,EAAE,MAAM,cAAc,KAAG,MAQpE,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,IAAI,KAAG,SAQzC,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM,IAAI,KAAG,MAInD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,SAAS,KAAG,SAQvD,CAAA"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { CalendarDate } from "@internationalized/date";
|
|
2
|
+
// src/v2/components/date-picker/date-parts.ts
|
|
3
|
+
/** Zero-pad a number to two digits. */
|
|
4
|
+
var pad2 = (value) => String(Math.abs(value)).padStart(2, "0");
|
|
5
|
+
/** Zero-pad a year to four digits. */
|
|
6
|
+
var pad4 = (value) => String(value).padStart(4, "0");
|
|
7
|
+
var DATE_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
8
|
+
var TIME_RE = /^(\d{2}):(\d{2})(?::(\d{2})(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?$/i;
|
|
9
|
+
var DATE_TIME_RE = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?(\.\d+)?(Z|[+-]\d{2}:\d{2})?$/i;
|
|
10
|
+
/** Reject values that the calendar would silently clamp to a different day. */
|
|
11
|
+
var isCalendarDate = (match) => {
|
|
12
|
+
const year = Number(match[1]);
|
|
13
|
+
const month = Number(match[2]);
|
|
14
|
+
const day = Number(match[3]);
|
|
15
|
+
const date = new CalendarDate(year, month, day);
|
|
16
|
+
return date.year === year && date.month === month && date.day === day;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Parse a formatted value into editable fields, or return `null` when it does
|
|
20
|
+
* not match the given format. A `null` result is how the picker recognizes
|
|
21
|
+
* free-text or `{{variable}}` values it should not try to interpret — it just
|
|
22
|
+
* falls back to "now" for its initial view without touching the field.
|
|
23
|
+
*/
|
|
24
|
+
var parseValue = (value, type) => {
|
|
25
|
+
const trimmed = value.trim();
|
|
26
|
+
if (type === "date") {
|
|
27
|
+
const match = DATE_RE.exec(trimmed);
|
|
28
|
+
if (!match || !isCalendarDate(match)) return null;
|
|
29
|
+
return {
|
|
30
|
+
year: Number(match[1]),
|
|
31
|
+
month: Number(match[2]),
|
|
32
|
+
day: Number(match[3]),
|
|
33
|
+
hour: 0,
|
|
34
|
+
minute: 0,
|
|
35
|
+
second: 0,
|
|
36
|
+
offset: ""
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
if (type === "time") {
|
|
40
|
+
const match = TIME_RE.exec(trimmed);
|
|
41
|
+
if (!match) return null;
|
|
42
|
+
return {
|
|
43
|
+
year: 0,
|
|
44
|
+
month: 0,
|
|
45
|
+
day: 0,
|
|
46
|
+
hour: Number(match[1]),
|
|
47
|
+
minute: Number(match[2]),
|
|
48
|
+
second: Number(match[3] ?? 0),
|
|
49
|
+
offset: match[5] ?? "",
|
|
50
|
+
...match[4] ? { fraction: match[4] } : {}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const match = DATE_TIME_RE.exec(trimmed);
|
|
54
|
+
if (!match || !isCalendarDate(match)) return null;
|
|
55
|
+
return {
|
|
56
|
+
year: Number(match[1]),
|
|
57
|
+
month: Number(match[2]),
|
|
58
|
+
day: Number(match[3]),
|
|
59
|
+
hour: Number(match[4]),
|
|
60
|
+
minute: Number(match[5]),
|
|
61
|
+
second: Number(match[6] ?? 0),
|
|
62
|
+
offset: match[8] ?? "",
|
|
63
|
+
...match[7] ? { fraction: match[7] } : {}
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
/** Format the date portion as `YYYY-MM-DD`. */
|
|
67
|
+
var formatDate = (parts) => `${pad4(parts.year)}-${pad2(parts.month)}-${pad2(parts.day)}`;
|
|
68
|
+
/** Format the time portion as `HH:MM:SS`. */
|
|
69
|
+
var formatTime = (parts) => `${pad2(parts.hour)}:${pad2(parts.minute)}:${pad2(parts.second)}${parts.fraction ?? ""}`;
|
|
70
|
+
/**
|
|
71
|
+
* Format editable fields back into the string the request expects.
|
|
72
|
+
*
|
|
73
|
+
* For `date-time` the caller is responsible for supplying a non-empty
|
|
74
|
+
* `offset`; use {@link getLocalTimezoneOffset} to derive one when the original
|
|
75
|
+
* value had none.
|
|
76
|
+
*/
|
|
77
|
+
var formatValue = (parts, type) => {
|
|
78
|
+
if (type === "date") return formatDate(parts);
|
|
79
|
+
if (type === "time") return `${formatTime(parts)}${parts.offset}`;
|
|
80
|
+
return `${formatDate(parts)}T${formatTime(parts)}${parts.offset}`;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Read the current fields from a `Date`, in the host's local timezone. Used to
|
|
84
|
+
* seed the picker with "now"/"today" and to fill in an offset when a
|
|
85
|
+
* `date-time` value arrives without one.
|
|
86
|
+
*/
|
|
87
|
+
var partsFromDate = (date) => ({
|
|
88
|
+
year: date.getFullYear(),
|
|
89
|
+
month: date.getMonth() + 1,
|
|
90
|
+
day: date.getDate(),
|
|
91
|
+
hour: date.getHours(),
|
|
92
|
+
minute: date.getMinutes(),
|
|
93
|
+
second: date.getSeconds(),
|
|
94
|
+
offset: getLocalTimezoneOffset(date)
|
|
95
|
+
});
|
|
96
|
+
/**
|
|
97
|
+
* The host's UTC offset for the given date as an RFC 3339 designator
|
|
98
|
+
* (`+02:00`, `-05:00`, or `+00:00`). `Date.getTimezoneOffset` reports minutes
|
|
99
|
+
* *behind* UTC, so the sign is inverted here.
|
|
100
|
+
*/
|
|
101
|
+
var getLocalTimezoneOffset = (date) => {
|
|
102
|
+
const offsetMinutes = -date.getTimezoneOffset();
|
|
103
|
+
return `${offsetMinutes >= 0 ? "+" : "-"}${pad2(Math.floor(Math.abs(offsetMinutes) / 60))}:${pad2(Math.abs(offsetMinutes) % 60)}`;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Resolve an unzoned selection in the host timezone. If the wall time falls in
|
|
107
|
+
* a daylight-saving gap, move it forward by the gap so the fields and offset
|
|
108
|
+
* describe the same instant.
|
|
109
|
+
*/
|
|
110
|
+
var resolveLocalDateTime = (parts) => {
|
|
111
|
+
const local = new Date(parts.year, parts.month - 1, parts.day, parts.hour, parts.minute, parts.second);
|
|
112
|
+
if (parts.year < 100) {
|
|
113
|
+
local.setFullYear(parts.year, parts.month - 1, parts.day);
|
|
114
|
+
local.setHours(parts.hour, parts.minute, parts.second, 0);
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
...parts,
|
|
118
|
+
...partsFromDate(local)
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
export { formatDate, formatTime, formatValue, getLocalTimezoneOffset, parseValue, partsFromDate, resolveLocalDateTime };
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=date-parts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-parts.js","names":[],"sources":["../../../../src/v2/components/date-picker/date-parts.ts"],"sourcesContent":["import { CalendarDate } from '@internationalized/date'\n\n/**\n * Pure date/time helpers for the {@link DatePicker}.\n *\n * The picker edits three OpenAPI string formats — `date`, `date-time`, and\n * `time` — as a small bag of integer fields. Keeping the parse/format logic\n * here (free of Vue and, where possible, of the ambient timezone) makes it\n * straightforward to unit test the exact strings we hand back to the request.\n */\n\n/** The OpenAPI string formats the picker knows how to edit. */\nexport type DatePickerType = 'date' | 'date-time' | 'time'\n\n/**\n * A date/time broken into its editable fields.\n *\n * `offset` applies to both time and date-time values: it holds the timezone\n * designator (`Z` or `±HH:MM`) so a round-trip preserves whatever the user\n * originally typed instead of silently rewriting it to the local zone.\n */\nexport type DateParts = {\n year: number\n /** 1-12 (human month, not the 0-based `Date` month) */\n month: number\n day: number\n hour: number\n minute: number\n second: number\n /** Timezone designator, e.g. `Z` or `+02:00`, when present in the original value. */\n offset: string\n /** Fractional seconds, including the leading decimal point, preserved during edits. */\n fraction?: string\n}\n\n/** Zero-pad a number to two digits. */\nconst pad2 = (value: number): string => String(Math.abs(value)).padStart(2, '0')\n\n/** Zero-pad a year to four digits. */\nconst pad4 = (value: number): string => String(value).padStart(4, '0')\n\nconst DATE_RE = /^(\\d{4})-(\\d{2})-(\\d{2})$/\nconst TIME_RE = /^(\\d{2}):(\\d{2})(?::(\\d{2})(\\.\\d+)?)?(Z|[+-]\\d{2}:\\d{2})?$/i\nconst DATE_TIME_RE = /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2})(?::(\\d{2}))?(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})?$/i\n\n/** Reject values that the calendar would silently clamp to a different day. */\nconst isCalendarDate = (match: RegExpExecArray): boolean => {\n const year = Number(match[1])\n const month = Number(match[2])\n const day = Number(match[3])\n const date = new CalendarDate(year, month, day)\n return date.year === year && date.month === month && date.day === day\n}\n\n/**\n * Parse a formatted value into editable fields, or return `null` when it does\n * not match the given format. A `null` result is how the picker recognizes\n * free-text or `{{variable}}` values it should not try to interpret — it just\n * falls back to \"now\" for its initial view without touching the field.\n */\nexport const parseValue = (value: string, type: DatePickerType): DateParts | null => {\n const trimmed = value.trim()\n\n if (type === 'date') {\n const match = DATE_RE.exec(trimmed)\n if (!match || !isCalendarDate(match)) {\n return null\n }\n return {\n year: Number(match[1]),\n month: Number(match[2]),\n day: Number(match[3]),\n hour: 0,\n minute: 0,\n second: 0,\n offset: '',\n }\n }\n\n if (type === 'time') {\n const match = TIME_RE.exec(trimmed)\n if (!match) {\n return null\n }\n return {\n year: 0,\n month: 0,\n day: 0,\n hour: Number(match[1]),\n minute: Number(match[2]),\n second: Number(match[3] ?? 0),\n offset: match[5] ?? '',\n ...(match[4] ? { fraction: match[4] } : {}),\n }\n }\n\n const match = DATE_TIME_RE.exec(trimmed)\n if (!match || !isCalendarDate(match)) {\n return null\n }\n return {\n year: Number(match[1]),\n month: Number(match[2]),\n day: Number(match[3]),\n hour: Number(match[4]),\n minute: Number(match[5]),\n second: Number(match[6] ?? 0),\n offset: match[8] ?? '',\n ...(match[7] ? { fraction: match[7] } : {}),\n }\n}\n\n/** Format the date portion as `YYYY-MM-DD`. */\nexport const formatDate = (parts: DateParts): string => `${pad4(parts.year)}-${pad2(parts.month)}-${pad2(parts.day)}`\n\n/** Format the time portion as `HH:MM:SS`. */\nexport const formatTime = (parts: DateParts): string =>\n `${pad2(parts.hour)}:${pad2(parts.minute)}:${pad2(parts.second)}${parts.fraction ?? ''}`\n\n/**\n * Format editable fields back into the string the request expects.\n *\n * For `date-time` the caller is responsible for supplying a non-empty\n * `offset`; use {@link getLocalTimezoneOffset} to derive one when the original\n * value had none.\n */\nexport const formatValue = (parts: DateParts, type: DatePickerType): string => {\n if (type === 'date') {\n return formatDate(parts)\n }\n if (type === 'time') {\n return `${formatTime(parts)}${parts.offset}`\n }\n return `${formatDate(parts)}T${formatTime(parts)}${parts.offset}`\n}\n\n/**\n * Read the current fields from a `Date`, in the host's local timezone. Used to\n * seed the picker with \"now\"/\"today\" and to fill in an offset when a\n * `date-time` value arrives without one.\n */\nexport const partsFromDate = (date: Date): DateParts => ({\n year: date.getFullYear(),\n month: date.getMonth() + 1,\n day: date.getDate(),\n hour: date.getHours(),\n minute: date.getMinutes(),\n second: date.getSeconds(),\n offset: getLocalTimezoneOffset(date),\n})\n\n/**\n * The host's UTC offset for the given date as an RFC 3339 designator\n * (`+02:00`, `-05:00`, or `+00:00`). `Date.getTimezoneOffset` reports minutes\n * *behind* UTC, so the sign is inverted here.\n */\nexport const getLocalTimezoneOffset = (date: Date): string => {\n const offsetMinutes = -date.getTimezoneOffset()\n const sign = offsetMinutes >= 0 ? '+' : '-'\n return `${sign}${pad2(Math.floor(Math.abs(offsetMinutes) / 60))}:${pad2(Math.abs(offsetMinutes) % 60)}`\n}\n\n/**\n * Resolve an unzoned selection in the host timezone. If the wall time falls in\n * a daylight-saving gap, move it forward by the gap so the fields and offset\n * describe the same instant.\n */\nexport const resolveLocalDateTime = (parts: DateParts): DateParts => {\n const local = new Date(parts.year, parts.month - 1, parts.day, parts.hour, parts.minute, parts.second)\n // The numeric Date constructor treats years 0–99 as 1900–1999.\n if (parts.year < 100) {\n local.setFullYear(parts.year, parts.month - 1, parts.day)\n local.setHours(parts.hour, parts.minute, parts.second, 0)\n }\n return { ...parts, ...partsFromDate(local) }\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/date-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import ConfirmationForm_vue_vue_type_script_setup_true_lang_default from "./ConfirmationForm.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
|
|
2
|
+
// src/v2/components/forms/ConfirmationForm.vue
|
|
3
3
|
var ConfirmationForm_default = ConfirmationForm_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { ConfirmationForm_default as default };
|
|
6
5
|
|
|
7
6
|
//# sourceMappingURL=ConfirmationForm.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationForm.vue.js","names":[
|
|
1
|
+
{"version":3,"file":"ConfirmationForm.vue.js","names":[],"sources":[],"mappings":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useLocalization } from "../../features/localization/index.js";
|
|
2
2
|
import { createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, renderSlot, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
3
3
|
import { ScalarButton } from "@scalar/components/button";
|
|
4
|
-
|
|
4
|
+
// src/v2/components/forms/ConfirmationForm.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = { class: "flex justify-between gap-10" };
|
|
6
6
|
var ConfirmationForm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
7
7
|
__name: "ConfirmationForm",
|
|
@@ -36,7 +36,6 @@ var ConfirmationForm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
//#endregion
|
|
40
39
|
export { ConfirmationForm_vue_vue_type_script_setup_true_lang_default as default };
|
|
41
40
|
|
|
42
41
|
//# sourceMappingURL=ConfirmationForm.vue_vue_type_script_setup_true_lang.js.map
|