@festo-ui/angular 10.0.1-dev.852 → 10.1.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/fesm2022/festo-ui-angular.mjs +232 -9
- package/fesm2022/festo-ui-angular.mjs.map +1 -1
- package/index.d.ts +97 -6
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1399,15 +1399,90 @@ declare class FngDatePickerComponent implements ControlValueAccessor {
|
|
|
1399
1399
|
hint: string | undefined;
|
|
1400
1400
|
error: string | undefined;
|
|
1401
1401
|
options: FngDatePickerOptions;
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
/**
|
|
1406
|
-
|
|
1402
|
+
private _deprecatedFormat;
|
|
1403
|
+
private _deprecatedLocale;
|
|
1404
|
+
private _deprecatedTimezone;
|
|
1405
|
+
/**
|
|
1406
|
+
* @deprecated Use the `formatDate` input instead.
|
|
1407
|
+
* This property is kept for backward compatibility and will be removed in version 11.0.0.
|
|
1408
|
+
* Migration: Replace `format` with a custom `formatDate` function.
|
|
1409
|
+
*/
|
|
1410
|
+
set format(value: string | undefined);
|
|
1411
|
+
/**
|
|
1412
|
+
* @deprecated Use Angular's built-in locale support with injection tokens instead.
|
|
1413
|
+
* This property is kept for backward compatibility and will be removed in version 11.0.0.
|
|
1414
|
+
* Migration: Use LOCALE_ID injection token or pass locale via the `formatDate` function.
|
|
1415
|
+
*/
|
|
1416
|
+
set locale(value: string | undefined);
|
|
1417
|
+
/**
|
|
1418
|
+
* @deprecated Timezone handling is now delegated to the JavaScript Date object and platform implementation.
|
|
1419
|
+
* This property is kept for backward compatibility and will be removed in version 11.0.0.
|
|
1420
|
+
* Migration: Timezone conversion should be handled in your application layer or via the `formatDate` function.
|
|
1421
|
+
*/
|
|
1422
|
+
set timezone(value: string | undefined);
|
|
1423
|
+
/**
|
|
1424
|
+
* Function to format the date for display in the input field.
|
|
1425
|
+
* Defaults to using the application's configured locale (via LOCALE_ID) for consistent, predictable formatting.
|
|
1426
|
+
*
|
|
1427
|
+
* @default Uses `Intl.DateTimeFormat(localeId)` where localeId is the injected LOCALE_ID token.
|
|
1428
|
+
* This ensures consistent rendering across all users and browser/OS locales.
|
|
1429
|
+
*
|
|
1430
|
+
* @example
|
|
1431
|
+
* // Custom format with specific options (e.g., short date format)
|
|
1432
|
+
* formatDate = (date: Date) => {
|
|
1433
|
+
* return new Intl.DateTimeFormat('en-US', {
|
|
1434
|
+
* year: 'numeric',
|
|
1435
|
+
* month: '2-digit',
|
|
1436
|
+
* day: '2-digit'
|
|
1437
|
+
* }).format(date);
|
|
1438
|
+
* }
|
|
1439
|
+
*
|
|
1440
|
+
* @example
|
|
1441
|
+
* // Custom format using date-fns
|
|
1442
|
+
* formatDate = (date: Date) => {
|
|
1443
|
+
* return format(date, 'dd/MM/yyyy', { locale: enUS });
|
|
1444
|
+
* }
|
|
1445
|
+
*
|
|
1446
|
+
* @example
|
|
1447
|
+
* // Custom format using day.js
|
|
1448
|
+
* formatDate = (date: Date) => {
|
|
1449
|
+
* return dayjs(date).locale('en-US').format('DD/MM/YYYY');
|
|
1450
|
+
* }
|
|
1451
|
+
*/
|
|
1452
|
+
formatDate: (date: Date) => string;
|
|
1453
|
+
/**
|
|
1454
|
+
* Function to parse user input into a Date object.
|
|
1455
|
+
* If not provided, uses intelligent heuristics to guess the date format (dd-mm-yyyy by default).
|
|
1456
|
+
* This input gives consumers full control over locale-aware date parsing.
|
|
1457
|
+
*
|
|
1458
|
+
* @example
|
|
1459
|
+
* // Custom parser using date-fns
|
|
1460
|
+
* parseDate = (input: string) => {
|
|
1461
|
+
* const locale = enUS; // or your desired locale
|
|
1462
|
+
* try {
|
|
1463
|
+
* return parse(input, 'MM/dd/yyyy', new Date(), { locale });
|
|
1464
|
+
* } catch {
|
|
1465
|
+
* return null;
|
|
1466
|
+
* }
|
|
1467
|
+
* }
|
|
1468
|
+
*
|
|
1469
|
+
* @example
|
|
1470
|
+
* // Custom parser using day.js
|
|
1471
|
+
* parseDate = (input: string) => {
|
|
1472
|
+
* const parsed = dayjs(input, 'MM/DD/YYYY');
|
|
1473
|
+
* return parsed.isValid() ? parsed.toDate() : null;
|
|
1474
|
+
* }
|
|
1475
|
+
*/
|
|
1476
|
+
parseDate?: (input: string) => Date | null;
|
|
1407
1477
|
get required(): boolean;
|
|
1408
1478
|
set required(value: boolean);
|
|
1409
1479
|
protected innerRequired: boolean;
|
|
1480
|
+
/** If true, allows manual input in the date picker field */
|
|
1481
|
+
allowManualInput: boolean;
|
|
1482
|
+
/** If true, opening the calendar is triggered on input click; if false, only the calendar icon opens it */
|
|
1483
|
+
openOnInputClick: boolean;
|
|
1410
1484
|
connector: ElementRef | undefined;
|
|
1485
|
+
dateInput: ElementRef | undefined;
|
|
1411
1486
|
width: string | undefined;
|
|
1412
1487
|
display: string;
|
|
1413
1488
|
get displayValue(): string;
|
|
@@ -1415,6 +1490,9 @@ declare class FngDatePickerComponent implements ControlValueAccessor {
|
|
|
1415
1490
|
private innerValue;
|
|
1416
1491
|
private complete;
|
|
1417
1492
|
private datePicker;
|
|
1493
|
+
private static readonly DATE_PATTERN;
|
|
1494
|
+
/** Expand 2-digit years: 0–99 → 2000–2099 */
|
|
1495
|
+
private static expandYear;
|
|
1418
1496
|
constructor(overlay: Overlay, localeDefault: string, cd: ChangeDetectorRef);
|
|
1419
1497
|
onTouched: (() => any) | undefined;
|
|
1420
1498
|
onChange: ((date: Date) => any) | undefined;
|
|
@@ -1426,8 +1504,21 @@ declare class FngDatePickerComponent implements ControlValueAccessor {
|
|
|
1426
1504
|
setDisabledState?(isDisabled: boolean): void;
|
|
1427
1505
|
toggle(event: Event): void;
|
|
1428
1506
|
private dispose;
|
|
1507
|
+
onDateInputBlur(): void;
|
|
1508
|
+
/**
|
|
1509
|
+
* Default date parsing implementation using intelligent heuristics.
|
|
1510
|
+
* Tries to guess the date format by analyzing which parts could be day/month/year.
|
|
1511
|
+
* Accepts common separators: / - . and space
|
|
1512
|
+
* Defaults to dd-mm-yyyy when ambiguous.
|
|
1513
|
+
*
|
|
1514
|
+
* This is used as a fallback when no custom parseDate input is provided.
|
|
1515
|
+
* For locale-aware or custom format parsing, provide your own parseDate function.
|
|
1516
|
+
*/
|
|
1517
|
+
private defaultParseDate;
|
|
1518
|
+
onDateInputClick(event: Event): void;
|
|
1519
|
+
onDateInputKeyDown(event: KeyboardEvent): void;
|
|
1429
1520
|
static ɵfac: i0.ɵɵFactoryDeclaration<FngDatePickerComponent, never>;
|
|
1430
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FngDatePickerComponent, "fng-date-picker", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "error": { "alias": "error"; "required": false; }; "options": { "alias": "options"; "required": false; }; "
|
|
1521
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FngDatePickerComponent, "fng-date-picker", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "error": { "alias": "error"; "required": false; }; "options": { "alias": "options"; "required": false; }; "format": { "alias": "format"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "timezone": { "alias": "timezone"; "required": false; }; "formatDate": { "alias": "formatDate"; "required": false; }; "parseDate": { "alias": "parseDate"; "required": false; }; "required": { "alias": "required"; "required": false; }; "allowManualInput": { "alias": "allowManualInput"; "required": false; }; "openOnInputClick": { "alias": "openOnInputClick"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
1431
1522
|
}
|
|
1432
1523
|
|
|
1433
1524
|
interface FngDateRangePickerOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@festo-ui/angular",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"author": "Festo UI (styleguide@festo.com)",
|
|
5
5
|
"copyright": "Copyright (c) 2025 Festo SE & Co. KG. All rights reserved.",
|
|
6
6
|
"license": "apache-2.0",
|
|
@@ -40,4 +40,4 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false
|
|
43
|
-
}
|
|
43
|
+
}
|