- Delete old Vite+Svelte frontend - Initialize new SvelteKit project with TypeScript - Configure Tailwind CSS v4 + DaisyUI - Implement JWT authentication with auto-refresh - Create login page with form validation (Zod) - Add protected route guards - Update Docker configuration for single-stage build - Add E2E tests with Playwright (6/11 passing) - Fix Svelte 5 reactivity with $state() runes Known issues: - 5 E2E tests failing (timing/async issues) - Token refresh implementation needs debugging - Validation error display timing
24 lines
1.1 KiB
JavaScript
24 lines
1.1 KiB
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports["default"] = formatIncompletePhoneNumber;
|
|
var _AsYouType = _interopRequireDefault(require("./AsYouType.js"));
|
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
/**
|
|
* Formats a (possibly incomplete) phone number.
|
|
* The phone number can be either in E.164 format
|
|
* or in a form of national number digits.
|
|
* @param {string} value - A possibly incomplete phone number. Either in E.164 format or in a form of national number digits.
|
|
* @param {string|object} [optionsOrDefaultCountry] - A two-letter ("ISO 3166-1 alpha-2") country code, or an object of shape `{ defaultCountry?: string, defaultCallingCode?: string }`.
|
|
* @return {string} Formatted (possibly incomplete) phone number.
|
|
*/
|
|
function formatIncompletePhoneNumber(value, optionsOrDefaultCountry, metadata) {
|
|
if (!metadata) {
|
|
metadata = optionsOrDefaultCountry;
|
|
optionsOrDefaultCountry = undefined;
|
|
}
|
|
return new _AsYouType["default"](optionsOrDefaultCountry, metadata).input(value);
|
|
}
|
|
//# sourceMappingURL=formatIncompletePhoneNumber.js.map
|