ux4g-components-angular 1.4.0 → 1.5.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/README.md +330 -48
- package/dist/accessibility-bar/README.md +330 -48
- package/dist/accordion/README.md +330 -48
- package/dist/alert/README.md +330 -48
- package/dist/avatar/README.md +330 -48
- package/dist/badge/README.md +330 -48
- package/dist/breadcrumb/README.md +330 -48
- package/dist/button/README.md +330 -48
- package/dist/card/README.md +330 -48
- package/dist/carousel/README.md +330 -48
- package/dist/checkbox/README.md +330 -48
- package/dist/chip/README.md +330 -48
- package/dist/chip-group/README.md +330 -48
- package/dist/combobox/README.md +330 -48
- package/dist/date-time-picker/README.md +330 -48
- package/dist/divider/README.md +330 -48
- package/dist/draft-status-banner/README.md +330 -48
- package/dist/drawer/README.md +330 -48
- package/dist/dropdown/README.md +330 -48
- package/dist/empty-state/README.md +330 -48
- package/dist/feedback/README.md +330 -48
- package/dist/file-upload/README.md +330 -48
- package/dist/footer/README.md +330 -48
- package/dist/form-field-group/README.md +330 -48
- package/dist/icon-button/README.md +330 -48
- package/dist/image/README.md +330 -48
- package/dist/input/README.md +330 -48
- package/dist/journey-timeline/README.md +330 -48
- package/dist/link/README.md +330 -48
- package/dist/list/README.md +330 -48
- package/dist/mega-menu/README.md +330 -48
- package/dist/modal/README.md +330 -48
- package/dist/native/accordion/README.md +1541 -0
- package/dist/native/accordion/fesm2022/ux4g-components-angular-native-accordion.mjs +85 -0
- package/dist/native/accordion/fesm2022/ux4g-components-angular-native-accordion.mjs.map +1 -0
- package/dist/native/accordion/index.d.ts +6 -0
- package/dist/native/accordion/public-api.d.ts +3 -0
- package/dist/native/accordion/public-api.d.ts.map +1 -0
- package/dist/native/accordion/ux4g-components-angular-native-accordion.d.ts.map +1 -0
- package/dist/native/accordion/ux4g-native-accordion.component.d.ts +31 -0
- package/dist/native/accordion/ux4g-native-accordion.component.d.ts.map +1 -0
- package/dist/native/accordion/ux4g-native-accordion.module.d.ts +12 -0
- package/dist/native/accordion/ux4g-native-accordion.module.d.ts.map +1 -0
- package/dist/native/avatar/README.md +1541 -0
- package/dist/native/avatar/fesm2022/ux4g-components-angular-native-avatar.mjs +81 -0
- package/dist/native/avatar/fesm2022/ux4g-components-angular-native-avatar.mjs.map +1 -0
- package/dist/native/avatar/index.d.ts +6 -0
- package/dist/native/avatar/public-api.d.ts +3 -0
- package/dist/native/avatar/public-api.d.ts.map +1 -0
- package/dist/native/avatar/ux4g-components-angular-native-avatar.d.ts.map +1 -0
- package/dist/native/avatar/ux4g-native-avatar.component.d.ts +34 -0
- package/dist/native/avatar/ux4g-native-avatar.component.d.ts.map +1 -0
- package/dist/native/avatar/ux4g-native-avatar.module.d.ts +8 -0
- package/dist/native/avatar/ux4g-native-avatar.module.d.ts.map +1 -0
- package/dist/native/carousel/README.md +1541 -0
- package/dist/native/carousel/fesm2022/ux4g-components-angular-native-carousel.mjs +91 -0
- package/dist/native/carousel/fesm2022/ux4g-components-angular-native-carousel.mjs.map +1 -0
- package/dist/native/carousel/index.d.ts +6 -0
- package/dist/native/carousel/public-api.d.ts +3 -0
- package/dist/native/carousel/public-api.d.ts.map +1 -0
- package/dist/native/carousel/ux4g-components-angular-native-carousel.d.ts.map +1 -0
- package/dist/native/carousel/ux4g-native-carousel.component.d.ts +34 -0
- package/dist/native/carousel/ux4g-native-carousel.component.d.ts.map +1 -0
- package/dist/native/carousel/ux4g-native-carousel.module.d.ts +8 -0
- package/dist/native/carousel/ux4g-native-carousel.module.d.ts.map +1 -0
- package/dist/native/chip/README.md +1541 -0
- package/dist/native/chip/fesm2022/ux4g-components-angular-native-chip.mjs +99 -0
- package/dist/native/chip/fesm2022/ux4g-components-angular-native-chip.mjs.map +1 -0
- package/dist/native/chip/index.d.ts +6 -0
- package/dist/native/chip/public-api.d.ts +3 -0
- package/dist/native/chip/public-api.d.ts.map +1 -0
- package/dist/native/chip/ux4g-components-angular-native-chip.d.ts.map +1 -0
- package/dist/native/chip/ux4g-native-chip.component.d.ts +34 -0
- package/dist/native/chip/ux4g-native-chip.component.d.ts.map +1 -0
- package/dist/native/chip/ux4g-native-chip.module.d.ts +8 -0
- package/dist/native/chip/ux4g-native-chip.module.d.ts.map +1 -0
- package/dist/native/combobox/README.md +1541 -0
- package/dist/native/combobox/fesm2022/ux4g-components-angular-native-combobox.mjs +107 -0
- package/dist/native/combobox/fesm2022/ux4g-components-angular-native-combobox.mjs.map +1 -0
- package/dist/native/combobox/index.d.ts +6 -0
- package/dist/native/combobox/public-api.d.ts +3 -0
- package/dist/native/combobox/public-api.d.ts.map +1 -0
- package/dist/native/combobox/ux4g-components-angular-native-combobox.d.ts.map +1 -0
- package/dist/native/combobox/ux4g-native-combobox.component.d.ts +30 -0
- package/dist/native/combobox/ux4g-native-combobox.component.d.ts.map +1 -0
- package/dist/native/combobox/ux4g-native-combobox.module.d.ts +8 -0
- package/dist/native/combobox/ux4g-native-combobox.module.d.ts.map +1 -0
- package/dist/native/date-picker/README.md +1541 -0
- package/dist/native/date-picker/fesm2022/ux4g-components-angular-native-date-picker.mjs +181 -0
- package/dist/native/date-picker/fesm2022/ux4g-components-angular-native-date-picker.mjs.map +1 -0
- package/dist/native/date-picker/index.d.ts +6 -0
- package/dist/native/date-picker/public-api.d.ts +3 -0
- package/dist/native/date-picker/public-api.d.ts.map +1 -0
- package/dist/native/date-picker/ux4g-components-angular-native-date-picker.d.ts.map +1 -0
- package/dist/native/date-picker/ux4g-native-date-picker.component.d.ts +39 -0
- package/dist/native/date-picker/ux4g-native-date-picker.component.d.ts.map +1 -0
- package/dist/native/date-picker/ux4g-native-date-picker.module.d.ts +12 -0
- package/dist/native/date-picker/ux4g-native-date-picker.module.d.ts.map +1 -0
- package/dist/native/drawer/README.md +1541 -0
- package/dist/native/drawer/fesm2022/ux4g-components-angular-native-drawer.mjs +159 -0
- package/dist/native/drawer/fesm2022/ux4g-components-angular-native-drawer.mjs.map +1 -0
- package/dist/native/drawer/index.d.ts +6 -0
- package/dist/native/drawer/public-api.d.ts +3 -0
- package/dist/native/drawer/public-api.d.ts.map +1 -0
- package/dist/native/drawer/ux4g-components-angular-native-drawer.d.ts.map +1 -0
- package/dist/native/drawer/ux4g-native-drawer.component.d.ts +37 -0
- package/dist/native/drawer/ux4g-native-drawer.component.d.ts.map +1 -0
- package/dist/native/drawer/ux4g-native-drawer.module.d.ts +12 -0
- package/dist/native/drawer/ux4g-native-drawer.module.d.ts.map +1 -0
- package/dist/native/dropdown/README.md +1541 -0
- package/dist/native/dropdown/fesm2022/ux4g-components-angular-native-dropdown.mjs +108 -0
- package/dist/native/dropdown/fesm2022/ux4g-components-angular-native-dropdown.mjs.map +1 -0
- package/dist/native/dropdown/index.d.ts +6 -0
- package/dist/native/dropdown/public-api.d.ts +3 -0
- package/dist/native/dropdown/public-api.d.ts.map +1 -0
- package/dist/native/dropdown/ux4g-components-angular-native-dropdown.d.ts.map +1 -0
- package/dist/native/dropdown/ux4g-native-dropdown.component.d.ts +32 -0
- package/dist/native/dropdown/ux4g-native-dropdown.component.d.ts.map +1 -0
- package/dist/native/dropdown/ux4g-native-dropdown.module.d.ts +8 -0
- package/dist/native/dropdown/ux4g-native-dropdown.module.d.ts.map +1 -0
- package/dist/native/file-upload/README.md +1541 -0
- package/dist/native/file-upload/fesm2022/ux4g-components-angular-native-file-upload.mjs +193 -0
- package/dist/native/file-upload/fesm2022/ux4g-components-angular-native-file-upload.mjs.map +1 -0
- package/dist/native/file-upload/index.d.ts +6 -0
- package/dist/native/file-upload/public-api.d.ts +3 -0
- package/dist/native/file-upload/public-api.d.ts.map +1 -0
- package/dist/native/file-upload/ux4g-components-angular-native-file-upload.d.ts.map +1 -0
- package/dist/native/file-upload/ux4g-native-file-upload.component.d.ts +40 -0
- package/dist/native/file-upload/ux4g-native-file-upload.component.d.ts.map +1 -0
- package/dist/native/file-upload/ux4g-native-file-upload.module.d.ts +8 -0
- package/dist/native/file-upload/ux4g-native-file-upload.module.d.ts.map +1 -0
- package/dist/native/modal/README.md +1541 -0
- package/dist/native/modal/fesm2022/ux4g-components-angular-native-modal.mjs +219 -0
- package/dist/native/modal/fesm2022/ux4g-components-angular-native-modal.mjs.map +1 -0
- package/dist/native/modal/index.d.ts +6 -0
- package/dist/native/modal/public-api.d.ts +3 -0
- package/dist/native/modal/public-api.d.ts.map +1 -0
- package/dist/native/modal/ux4g-components-angular-native-modal.d.ts.map +1 -0
- package/dist/native/modal/ux4g-native-modal.component.d.ts +42 -0
- package/dist/native/modal/ux4g-native-modal.component.d.ts.map +1 -0
- package/dist/native/modal/ux4g-native-modal.module.d.ts +12 -0
- package/dist/native/modal/ux4g-native-modal.module.d.ts.map +1 -0
- package/dist/native/otp/README.md +1541 -0
- package/dist/native/otp/fesm2022/ux4g-components-angular-native-otp.mjs +176 -0
- package/dist/native/otp/fesm2022/ux4g-components-angular-native-otp.mjs.map +1 -0
- package/dist/native/otp/index.d.ts +6 -0
- package/dist/native/otp/public-api.d.ts +3 -0
- package/dist/native/otp/public-api.d.ts.map +1 -0
- package/dist/native/otp/ux4g-components-angular-native-otp.d.ts.map +1 -0
- package/dist/native/otp/ux4g-native-otp.component.d.ts +32 -0
- package/dist/native/otp/ux4g-native-otp.component.d.ts.map +1 -0
- package/dist/native/otp/ux4g-native-otp.module.d.ts +8 -0
- package/dist/native/otp/ux4g-native-otp.module.d.ts.map +1 -0
- package/dist/native/popover/README.md +1541 -0
- package/dist/native/popover/fesm2022/ux4g-components-angular-native-popover.mjs +75 -0
- package/dist/native/popover/fesm2022/ux4g-components-angular-native-popover.mjs.map +1 -0
- package/dist/native/popover/index.d.ts +6 -0
- package/dist/native/popover/public-api.d.ts +3 -0
- package/dist/native/popover/public-api.d.ts.map +1 -0
- package/dist/native/popover/ux4g-components-angular-native-popover.d.ts.map +1 -0
- package/dist/native/popover/ux4g-native-popover.component.d.ts +29 -0
- package/dist/native/popover/ux4g-native-popover.component.d.ts.map +1 -0
- package/dist/native/popover/ux4g-native-popover.module.d.ts +8 -0
- package/dist/native/popover/ux4g-native-popover.module.d.ts.map +1 -0
- package/dist/native/progress/README.md +1541 -0
- package/dist/native/progress/fesm2022/ux4g-components-angular-native-progress.mjs +79 -0
- package/dist/native/progress/fesm2022/ux4g-components-angular-native-progress.mjs.map +1 -0
- package/dist/native/progress/index.d.ts +6 -0
- package/dist/native/progress/public-api.d.ts +3 -0
- package/dist/native/progress/public-api.d.ts.map +1 -0
- package/dist/native/progress/ux4g-components-angular-native-progress.d.ts.map +1 -0
- package/dist/native/progress/ux4g-native-progress.component.d.ts +29 -0
- package/dist/native/progress/ux4g-native-progress.component.d.ts.map +1 -0
- package/dist/native/progress/ux4g-native-progress.module.d.ts +8 -0
- package/dist/native/progress/ux4g-native-progress.module.d.ts.map +1 -0
- package/dist/native/search/README.md +1541 -0
- package/dist/native/search/fesm2022/ux4g-components-angular-native-search.mjs +148 -0
- package/dist/native/search/fesm2022/ux4g-components-angular-native-search.mjs.map +1 -0
- package/dist/native/search/index.d.ts +6 -0
- package/dist/native/search/public-api.d.ts +3 -0
- package/dist/native/search/public-api.d.ts.map +1 -0
- package/dist/native/search/ux4g-components-angular-native-search.d.ts.map +1 -0
- package/dist/native/search/ux4g-native-search.component.d.ts +46 -0
- package/dist/native/search/ux4g-native-search.component.d.ts.map +1 -0
- package/dist/native/search/ux4g-native-search.module.d.ts +8 -0
- package/dist/native/search/ux4g-native-search.module.d.ts.map +1 -0
- package/dist/native/shared/README.md +1541 -0
- package/dist/native/shared/base-native.component.d.ts +38 -0
- package/dist/native/shared/base-native.component.d.ts.map +1 -0
- package/dist/native/shared/fesm2022/ux4g-components-angular-native-shared.mjs +113 -0
- package/dist/native/shared/fesm2022/ux4g-components-angular-native-shared.mjs.map +1 -0
- package/dist/native/shared/index.d.ts +6 -0
- package/dist/native/shared/public-api.d.ts +3 -0
- package/dist/native/shared/public-api.d.ts.map +1 -0
- package/dist/native/shared/render-descriptor.d.ts +8 -0
- package/dist/native/shared/render-descriptor.d.ts.map +1 -0
- package/dist/native/shared/ux4g-components-angular-native-shared.d.ts.map +1 -0
- package/dist/native/stepper/README.md +1541 -0
- package/dist/native/stepper/fesm2022/ux4g-components-angular-native-stepper.mjs +92 -0
- package/dist/native/stepper/fesm2022/ux4g-components-angular-native-stepper.mjs.map +1 -0
- package/dist/native/stepper/index.d.ts +6 -0
- package/dist/native/stepper/public-api.d.ts +3 -0
- package/dist/native/stepper/public-api.d.ts.map +1 -0
- package/dist/native/stepper/ux4g-components-angular-native-stepper.d.ts.map +1 -0
- package/dist/native/stepper/ux4g-native-stepper.component.d.ts +35 -0
- package/dist/native/stepper/ux4g-native-stepper.component.d.ts.map +1 -0
- package/dist/native/stepper/ux4g-native-stepper.module.d.ts +8 -0
- package/dist/native/stepper/ux4g-native-stepper.module.d.ts.map +1 -0
- package/dist/native/table/README.md +1541 -0
- package/dist/native/table/fesm2022/ux4g-components-angular-native-table.mjs +91 -0
- package/dist/native/table/fesm2022/ux4g-components-angular-native-table.mjs.map +1 -0
- package/dist/native/table/index.d.ts +6 -0
- package/dist/native/table/public-api.d.ts +3 -0
- package/dist/native/table/public-api.d.ts.map +1 -0
- package/dist/native/table/ux4g-components-angular-native-table.d.ts.map +1 -0
- package/dist/native/table/ux4g-native-table.component.d.ts +32 -0
- package/dist/native/table/ux4g-native-table.component.d.ts.map +1 -0
- package/dist/native/table/ux4g-native-table.module.d.ts +12 -0
- package/dist/native/table/ux4g-native-table.module.d.ts.map +1 -0
- package/dist/native/tabs/README.md +1541 -0
- package/dist/native/tabs/fesm2022/ux4g-components-angular-native-tabs.mjs +190 -0
- package/dist/native/tabs/fesm2022/ux4g-components-angular-native-tabs.mjs.map +1 -0
- package/dist/native/tabs/index.d.ts +6 -0
- package/dist/native/tabs/public-api.d.ts +3 -0
- package/dist/native/tabs/public-api.d.ts.map +1 -0
- package/dist/native/tabs/ux4g-components-angular-native-tabs.d.ts.map +1 -0
- package/dist/native/tabs/ux4g-native-tabs.component.d.ts +43 -0
- package/dist/native/tabs/ux4g-native-tabs.component.d.ts.map +1 -0
- package/dist/native/tabs/ux4g-native-tabs.module.d.ts +12 -0
- package/dist/native/tabs/ux4g-native-tabs.module.d.ts.map +1 -0
- package/dist/native/time-picker/README.md +1541 -0
- package/dist/native/time-picker/fesm2022/ux4g-components-angular-native-time-picker.mjs +104 -0
- package/dist/native/time-picker/fesm2022/ux4g-components-angular-native-time-picker.mjs.map +1 -0
- package/dist/native/time-picker/index.d.ts +6 -0
- package/dist/native/time-picker/public-api.d.ts +3 -0
- package/dist/native/time-picker/public-api.d.ts.map +1 -0
- package/dist/native/time-picker/ux4g-components-angular-native-time-picker.d.ts.map +1 -0
- package/dist/native/time-picker/ux4g-native-time-picker.component.d.ts +27 -0
- package/dist/native/time-picker/ux4g-native-time-picker.component.d.ts.map +1 -0
- package/dist/native/time-picker/ux4g-native-time-picker.module.d.ts +8 -0
- package/dist/native/time-picker/ux4g-native-time-picker.module.d.ts.map +1 -0
- package/dist/native/tooltip/README.md +1541 -0
- package/dist/native/tooltip/fesm2022/ux4g-components-angular-native-tooltip.mjs +80 -0
- package/dist/native/tooltip/fesm2022/ux4g-components-angular-native-tooltip.mjs.map +1 -0
- package/dist/native/tooltip/index.d.ts +6 -0
- package/dist/native/tooltip/public-api.d.ts +3 -0
- package/dist/native/tooltip/public-api.d.ts.map +1 -0
- package/dist/native/tooltip/ux4g-components-angular-native-tooltip.d.ts.map +1 -0
- package/dist/native/tooltip/ux4g-native-tooltip.component.d.ts +31 -0
- package/dist/native/tooltip/ux4g-native-tooltip.component.d.ts.map +1 -0
- package/dist/native/tooltip/ux4g-native-tooltip.module.d.ts +8 -0
- package/dist/native/tooltip/ux4g-native-tooltip.module.d.ts.map +1 -0
- package/dist/navbar/README.md +330 -48
- package/dist/otp-input/README.md +330 -48
- package/dist/pagination/README.md +330 -48
- package/dist/popover/README.md +330 -48
- package/dist/progress-indicator/README.md +330 -48
- package/dist/radio/README.md +330 -48
- package/dist/result-list-row/README.md +330 -48
- package/dist/search/README.md +330 -48
- package/dist/sla-progress-indicator/README.md +330 -48
- package/dist/slider/README.md +330 -48
- package/dist/slot-grid/README.md +330 -48
- package/dist/social-links/README.md +330 -48
- package/dist/spinner/README.md +330 -48
- package/dist/status-pipeline/README.md +330 -48
- package/dist/stepper/README.md +330 -48
- package/dist/switch/README.md +330 -48
- package/dist/tab/README.md +330 -48
- package/dist/table/README.md +330 -48
- package/dist/tag/README.md +330 -48
- package/dist/tooltip/README.md +330 -48
- package/package.json +176 -3
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, forwardRef, Output, Input, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
+
import { generateDatePickerDOM } from 'ux4g-components-web/dom-generators';
|
|
5
|
+
import { BaseNativeComponent, renderDescriptorToDOM } from '@ux4g-native-shared';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* UX4G Native DatePicker — Angular Native Wrapper for the UX4G DatePicker component.
|
|
9
|
+
*
|
|
10
|
+
* Generates the complete calendar grid DOM with proper ARIA attributes,
|
|
11
|
+
* day cells with `role="gridcell"`, navigation buttons, and weekday headers.
|
|
12
|
+
*
|
|
13
|
+
* Implements ControlValueAccessor for Angular forms integration (ngModel/formControl).
|
|
14
|
+
*
|
|
15
|
+
* Usage:
|
|
16
|
+
* ```html
|
|
17
|
+
* <ux4g-native-date-picker
|
|
18
|
+
* [(ngModel)]="selectedDate"
|
|
19
|
+
* [min]="'2024-01-01'"
|
|
20
|
+
* [max]="'2024-12-31'"
|
|
21
|
+
* locale="en-US">
|
|
22
|
+
* </ux4g-native-date-picker>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
class UX4GNativeDatePickerComponent extends BaseNativeComponent {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
this.locale = 'en-US';
|
|
29
|
+
this.dateChange = new EventEmitter();
|
|
30
|
+
this.clickListener = null;
|
|
31
|
+
}
|
|
32
|
+
ngOnChanges(_changes) {
|
|
33
|
+
this.renderComponent();
|
|
34
|
+
}
|
|
35
|
+
renderComponent() {
|
|
36
|
+
// Clear existing children
|
|
37
|
+
const hostEl = this.elementRef.nativeElement;
|
|
38
|
+
while (hostEl.firstChild) {
|
|
39
|
+
this.renderer.removeChild(hostEl, hostEl.firstChild);
|
|
40
|
+
}
|
|
41
|
+
// Determine display month/year from value or current date
|
|
42
|
+
if (this.displayMonth === undefined || this.displayYear === undefined) {
|
|
43
|
+
if (this.value) {
|
|
44
|
+
const parts = this.value.split('-');
|
|
45
|
+
this.displayMonth = parseInt(parts[1], 10) - 1;
|
|
46
|
+
this.displayYear = parseInt(parts[0], 10);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const now = new Date();
|
|
50
|
+
this.displayMonth = now.getMonth();
|
|
51
|
+
this.displayYear = now.getFullYear();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// Generate descriptor and render to DOM
|
|
55
|
+
const descriptor = generateDatePickerDOM({
|
|
56
|
+
value: this.value,
|
|
57
|
+
min: this.min,
|
|
58
|
+
max: this.max,
|
|
59
|
+
locale: this.locale,
|
|
60
|
+
displayMonth: this.displayMonth,
|
|
61
|
+
displayYear: this.displayYear,
|
|
62
|
+
});
|
|
63
|
+
renderDescriptorToDOM(this.renderer, descriptor, hostEl);
|
|
64
|
+
this.attachEventListeners();
|
|
65
|
+
}
|
|
66
|
+
attachEventListeners() {
|
|
67
|
+
this.removeEventListeners();
|
|
68
|
+
const hostEl = this.elementRef.nativeElement;
|
|
69
|
+
this.clickListener = this.renderer.listen(hostEl, 'click', (event) => {
|
|
70
|
+
const target = event.target;
|
|
71
|
+
// Handle prev/next month navigation
|
|
72
|
+
if (target.closest('.ux4g-date-picker-prev')) {
|
|
73
|
+
this.navigateMonth(-1);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (target.closest('.ux4g-date-picker-next')) {
|
|
77
|
+
this.navigateMonth(1);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
// Handle day cell selection
|
|
81
|
+
const cell = target.closest('[role="gridcell"]');
|
|
82
|
+
if (cell && !cell.classList.contains('ux4g-date-picker-cell-empty')) {
|
|
83
|
+
if (cell.getAttribute('aria-disabled') === 'true') {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const dayText = cell.textContent?.trim();
|
|
87
|
+
if (dayText) {
|
|
88
|
+
const day = parseInt(dayText, 10);
|
|
89
|
+
const month = (this.displayMonth + 1).toString().padStart(2, '0');
|
|
90
|
+
const dayStr = day.toString().padStart(2, '0');
|
|
91
|
+
const newValue = `${this.displayYear}-${month}-${dayStr}`;
|
|
92
|
+
this.notifyChange(newValue);
|
|
93
|
+
this.notifyTouched();
|
|
94
|
+
this.dateChange.emit(newValue);
|
|
95
|
+
this.renderComponent();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
navigateMonth(direction) {
|
|
101
|
+
let month = this.displayMonth + direction;
|
|
102
|
+
let year = this.displayYear;
|
|
103
|
+
if (month < 0) {
|
|
104
|
+
month = 11;
|
|
105
|
+
year--;
|
|
106
|
+
}
|
|
107
|
+
else if (month > 11) {
|
|
108
|
+
month = 0;
|
|
109
|
+
year++;
|
|
110
|
+
}
|
|
111
|
+
this.displayMonth = month;
|
|
112
|
+
this.displayYear = year;
|
|
113
|
+
this.renderComponent();
|
|
114
|
+
}
|
|
115
|
+
removeEventListeners() {
|
|
116
|
+
if (this.clickListener) {
|
|
117
|
+
this.clickListener();
|
|
118
|
+
this.clickListener = null;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
ngOnDestroy() {
|
|
122
|
+
this.removeEventListeners();
|
|
123
|
+
super.ngOnDestroy();
|
|
124
|
+
}
|
|
125
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeDatePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
126
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: UX4GNativeDatePickerComponent, isStandalone: true, selector: "ux4g-native-date-picker", inputs: { min: "min", max: "max", locale: "locale" }, outputs: { dateChange: "dateChange" }, providers: [
|
|
127
|
+
{
|
|
128
|
+
provide: NG_VALUE_ACCESSOR,
|
|
129
|
+
useExisting: forwardRef(() => UX4GNativeDatePickerComponent),
|
|
130
|
+
multi: true,
|
|
131
|
+
},
|
|
132
|
+
], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
|
133
|
+
}
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeDatePickerComponent, decorators: [{
|
|
135
|
+
type: Component,
|
|
136
|
+
args: [{
|
|
137
|
+
selector: 'ux4g-native-date-picker',
|
|
138
|
+
standalone: true,
|
|
139
|
+
template: '',
|
|
140
|
+
encapsulation: ViewEncapsulation.None,
|
|
141
|
+
providers: [
|
|
142
|
+
{
|
|
143
|
+
provide: NG_VALUE_ACCESSOR,
|
|
144
|
+
useExisting: forwardRef(() => UX4GNativeDatePickerComponent),
|
|
145
|
+
multi: true,
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
}]
|
|
149
|
+
}], propDecorators: { min: [{
|
|
150
|
+
type: Input
|
|
151
|
+
}], max: [{
|
|
152
|
+
type: Input
|
|
153
|
+
}], locale: [{
|
|
154
|
+
type: Input
|
|
155
|
+
}], dateChange: [{
|
|
156
|
+
type: Output
|
|
157
|
+
}] } });
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* NgModule for backward compatibility with module-based Angular applications.
|
|
161
|
+
* For standalone components (Angular 17+), import UX4GNativeDatePickerComponent directly.
|
|
162
|
+
*/
|
|
163
|
+
class UX4GNativeDatePickerModule {
|
|
164
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeDatePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
165
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeDatePickerModule, imports: [UX4GNativeDatePickerComponent], exports: [UX4GNativeDatePickerComponent] }); }
|
|
166
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeDatePickerModule }); }
|
|
167
|
+
}
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UX4GNativeDatePickerModule, decorators: [{
|
|
169
|
+
type: NgModule,
|
|
170
|
+
args: [{
|
|
171
|
+
imports: [UX4GNativeDatePickerComponent],
|
|
172
|
+
exports: [UX4GNativeDatePickerComponent],
|
|
173
|
+
}]
|
|
174
|
+
}] });
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Generated bundle index. Do not edit.
|
|
178
|
+
*/
|
|
179
|
+
|
|
180
|
+
export { UX4GNativeDatePickerComponent, UX4GNativeDatePickerModule };
|
|
181
|
+
//# sourceMappingURL=ux4g-components-angular-native-date-picker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ux4g-components-angular-native-date-picker.mjs","sources":["../../../../src/native/date-picker/ux4g-native-date-picker.component.ts","../../../../src/native/date-picker/ux4g-native-date-picker.module.ts","../../../../src/native/date-picker/ux4g-components-angular-native-date-picker.ts"],"sourcesContent":["import {\r\n Component,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n ViewEncapsulation,\r\n OnChanges,\r\n SimpleChanges,\r\n OnDestroy,\r\n forwardRef,\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { generateDatePickerDOM } from 'ux4g-components-web/dom-generators';\r\nimport { BaseNativeComponent, renderDescriptorToDOM } from '@ux4g-native-shared';\r\n\r\n/**\r\n * UX4G Native DatePicker — Angular Native Wrapper for the UX4G DatePicker component.\r\n *\r\n * Generates the complete calendar grid DOM with proper ARIA attributes,\r\n * day cells with `role=\"gridcell\"`, navigation buttons, and weekday headers.\r\n *\r\n * Implements ControlValueAccessor for Angular forms integration (ngModel/formControl).\r\n *\r\n * Usage:\r\n * ```html\r\n * <ux4g-native-date-picker\r\n * [(ngModel)]=\"selectedDate\"\r\n * [min]=\"'2024-01-01'\"\r\n * [max]=\"'2024-12-31'\"\r\n * locale=\"en-US\">\r\n * </ux4g-native-date-picker>\r\n * ```\r\n */\r\n@Component({\r\n selector: 'ux4g-native-date-picker',\r\n standalone: true,\r\n template: '',\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => UX4GNativeDatePickerComponent),\r\n multi: true,\r\n },\r\n ],\r\n})\r\nexport class UX4GNativeDatePickerComponent\r\n extends BaseNativeComponent\r\n implements OnChanges, OnDestroy\r\n{\r\n @Input() min?: string;\r\n @Input() max?: string;\r\n @Input() locale: string = 'en-US';\r\n\r\n @Output() dateChange = new EventEmitter<string>();\r\n\r\n private displayMonth?: number;\r\n private displayYear?: number;\r\n private clickListener: (() => void) | null = null;\r\n\r\n ngOnChanges(_changes: SimpleChanges): void {\r\n this.renderComponent();\r\n }\r\n\r\n protected override renderComponent(): void {\r\n // Clear existing children\r\n const hostEl = this.elementRef.nativeElement;\r\n while (hostEl.firstChild) {\r\n this.renderer.removeChild(hostEl, hostEl.firstChild);\r\n }\r\n\r\n // Determine display month/year from value or current date\r\n if (this.displayMonth === undefined || this.displayYear === undefined) {\r\n if (this.value) {\r\n const parts = (this.value as string).split('-');\r\n this.displayMonth = parseInt(parts[1], 10) - 1;\r\n this.displayYear = parseInt(parts[0], 10);\r\n } else {\r\n const now = new Date();\r\n this.displayMonth = now.getMonth();\r\n this.displayYear = now.getFullYear();\r\n }\r\n }\r\n\r\n // Generate descriptor and render to DOM\r\n const descriptor = generateDatePickerDOM({\r\n value: this.value as string | undefined,\r\n min: this.min,\r\n max: this.max,\r\n locale: this.locale,\r\n displayMonth: this.displayMonth,\r\n displayYear: this.displayYear,\r\n });\r\n\r\n renderDescriptorToDOM(this.renderer, descriptor, hostEl);\r\n\r\n this.attachEventListeners();\r\n }\r\n\r\n private attachEventListeners(): void {\r\n this.removeEventListeners();\r\n\r\n const hostEl = this.elementRef.nativeElement;\r\n\r\n this.clickListener = this.renderer.listen(hostEl, 'click', (event: Event) => {\r\n const target = event.target as HTMLElement;\r\n\r\n // Handle prev/next month navigation\r\n if (target.closest('.ux4g-date-picker-prev')) {\r\n this.navigateMonth(-1);\r\n return;\r\n }\r\n if (target.closest('.ux4g-date-picker-next')) {\r\n this.navigateMonth(1);\r\n return;\r\n }\r\n\r\n // Handle day cell selection\r\n const cell = target.closest('[role=\"gridcell\"]') as HTMLElement | null;\r\n if (cell && !cell.classList.contains('ux4g-date-picker-cell-empty')) {\r\n if (cell.getAttribute('aria-disabled') === 'true') {\r\n return;\r\n }\r\n const dayText = cell.textContent?.trim();\r\n if (dayText) {\r\n const day = parseInt(dayText, 10);\r\n const month = (this.displayMonth! + 1).toString().padStart(2, '0');\r\n const dayStr = day.toString().padStart(2, '0');\r\n const newValue = `${this.displayYear}-${month}-${dayStr}`;\r\n this.notifyChange(newValue);\r\n this.notifyTouched();\r\n this.dateChange.emit(newValue);\r\n this.renderComponent();\r\n }\r\n }\r\n });\r\n }\r\n\r\n private navigateMonth(direction: number): void {\r\n let month = this.displayMonth! + direction;\r\n let year = this.displayYear!;\r\n\r\n if (month < 0) {\r\n month = 11;\r\n year--;\r\n } else if (month > 11) {\r\n month = 0;\r\n year++;\r\n }\r\n\r\n this.displayMonth = month;\r\n this.displayYear = year;\r\n this.renderComponent();\r\n }\r\n\r\n private removeEventListeners(): void {\r\n if (this.clickListener) {\r\n this.clickListener();\r\n this.clickListener = null;\r\n }\r\n }\r\n\r\n override ngOnDestroy(): void {\r\n this.removeEventListeners();\r\n super.ngOnDestroy();\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { UX4GNativeDatePickerComponent } from './ux4g-native-date-picker.component';\r\n\r\n/**\r\n * NgModule for backward compatibility with module-based Angular applications.\r\n * For standalone components (Angular 17+), import UX4GNativeDatePickerComponent directly.\r\n */\r\n@NgModule({\r\n imports: [UX4GNativeDatePickerComponent],\r\n exports: [UX4GNativeDatePickerComponent],\r\n})\r\nexport class UX4GNativeDatePickerModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAeA;;;;;;;;;;;;;;;;;AAiBG;AAcG,MAAO,6BACX,SAAQ,mBAAmB,CAAA;AAd7B,IAAA,WAAA,GAAA;;QAmBW,IAAA,CAAA,MAAM,GAAW,OAAO;AAEvB,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAAU;QAIzC,IAAA,CAAA,aAAa,GAAwB,IAAI;AA4GlD,IAAA;AA1GC,IAAA,WAAW,CAAC,QAAuB,EAAA;QACjC,IAAI,CAAC,eAAe,EAAE;IACxB;IAEmB,eAAe,GAAA;;AAEhC,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;AAC5C,QAAA,OAAO,MAAM,CAAC,UAAU,EAAE;YACxB,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC;QACtD;;AAGA,QAAA,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE;AACrE,YAAA,IAAI,IAAI,CAAC,KAAK,EAAE;gBACd,MAAM,KAAK,GAAI,IAAI,CAAC,KAAgB,CAAC,KAAK,CAAC,GAAG,CAA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ings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ux4g-components-angular-native-date-picker.d.ts","sourceRoot":"","sources":["../../../src/native/date-picker/ux4g-components-angular-native-date-picker.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges, OnDestroy } from '@angular/core';
|
|
2
|
+
import { BaseNativeComponent } from '@ux4g-native-shared';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* UX4G Native DatePicker — Angular Native Wrapper for the UX4G DatePicker component.
|
|
6
|
+
*
|
|
7
|
+
* Generates the complete calendar grid DOM with proper ARIA attributes,
|
|
8
|
+
* day cells with `role="gridcell"`, navigation buttons, and weekday headers.
|
|
9
|
+
*
|
|
10
|
+
* Implements ControlValueAccessor for Angular forms integration (ngModel/formControl).
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* ```html
|
|
14
|
+
* <ux4g-native-date-picker
|
|
15
|
+
* [(ngModel)]="selectedDate"
|
|
16
|
+
* [min]="'2024-01-01'"
|
|
17
|
+
* [max]="'2024-12-31'"
|
|
18
|
+
* locale="en-US">
|
|
19
|
+
* </ux4g-native-date-picker>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare class UX4GNativeDatePickerComponent extends BaseNativeComponent implements OnChanges, OnDestroy {
|
|
23
|
+
min?: string;
|
|
24
|
+
max?: string;
|
|
25
|
+
locale: string;
|
|
26
|
+
dateChange: EventEmitter<string>;
|
|
27
|
+
private displayMonth?;
|
|
28
|
+
private displayYear?;
|
|
29
|
+
private clickListener;
|
|
30
|
+
ngOnChanges(_changes: SimpleChanges): void;
|
|
31
|
+
protected renderComponent(): void;
|
|
32
|
+
private attachEventListeners;
|
|
33
|
+
private navigateMonth;
|
|
34
|
+
private removeEventListeners;
|
|
35
|
+
ngOnDestroy(): void;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UX4GNativeDatePickerComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UX4GNativeDatePickerComponent, "ux4g-native-date-picker", never, { "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; }, { "dateChange": "dateChange"; }, never, never, true, never>;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=ux4g-native-date-picker.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ux4g-native-date-picker.component.d.ts","sourceRoot":"","sources":["../../../src/native/date-picker/ux4g-native-date-picker.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEZ,SAAS,EACT,aAAa,EACb,SAAS,EAEV,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,mBAAmB,EAAyB,MAAM,qBAAqB,CAAC;;AAEjF;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAaa,6BACX,SAAQ,mBACR,YAAW,SAAS,EAAE,SAAS;IAEtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAW;IAExB,UAAU,uBAA8B;IAElD,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,aAAa,CAA6B;IAElD,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;cAIvB,eAAe,IAAI,IAAI;IAmC1C,OAAO,CAAC,oBAAoB;IAuC5B,OAAO,CAAC,aAAa;IAiBrB,OAAO,CAAC,oBAAoB;IAOnB,WAAW,IAAI,IAAI;yCApHjB,6BAA6B;2CAA7B,6BAA6B;CAwHzC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./ux4g-native-date-picker.component";
|
|
3
|
+
/**
|
|
4
|
+
* NgModule for backward compatibility with module-based Angular applications.
|
|
5
|
+
* For standalone components (Angular 17+), import UX4GNativeDatePickerComponent directly.
|
|
6
|
+
*/
|
|
7
|
+
export declare class UX4GNativeDatePickerModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UX4GNativeDatePickerModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<UX4GNativeDatePickerModule, never, [typeof i1.UX4GNativeDatePickerComponent], [typeof i1.UX4GNativeDatePickerComponent]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<UX4GNativeDatePickerModule>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=ux4g-native-date-picker.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ux4g-native-date-picker.module.d.ts","sourceRoot":"","sources":["../../../src/native/date-picker/ux4g-native-date-picker.module.ts"],"names":[],"mappings":";;AAGA;;;GAGG;AACH,qBAIa,0BAA0B;yCAA1B,0BAA0B;0CAA1B,0BAA0B;0CAA1B,0BAA0B;CAAG"}
|