@cdek-it/angular-ui-kit 0.2.4-test → 0.2.6-test
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/components/accordion/index.d.ts +21 -0
- package/components/autocomplete/index.d.ts +65 -0
- package/components/avatar/index.d.ts +5 -5
- package/components/badge/index.d.ts +5 -5
- package/components/breadcrumb/index.d.ts +3 -3
- package/components/button/index.d.ts +16 -14
- package/components/carousel/index.d.ts +41 -0
- package/components/checkbox/index.d.ts +7 -6
- package/components/confirm-dialog/index.d.ts +37 -0
- package/components/date-picker/index.d.ts +89 -0
- package/components/dialog/index.d.ts +16 -9
- package/components/divider/index.d.ts +7 -7
- package/components/drawer/index.d.ts +33 -0
- package/components/galleria/index.d.ts +65 -0
- package/components/inputgroup/index.d.ts +17 -0
- package/components/inputmask/index.d.ts +43 -0
- package/components/inputnumber/index.d.ts +50 -0
- package/components/inputotp/index.d.ts +40 -0
- package/components/inputtext/index.d.ts +5 -4
- package/components/listbox/index.d.ts +43 -0
- package/components/megamenu/index.d.ts +10 -10
- package/components/menu/index.d.ts +24 -0
- package/components/menubar/index.d.ts +16 -0
- package/components/message/index.d.ts +19 -0
- package/components/metergroup/index.d.ts +9 -8
- package/components/paginator/index.d.ts +25 -0
- package/components/panelmenu/index.d.ts +19 -0
- package/components/password/index.d.ts +54 -0
- package/components/popover/index.d.ts +12 -0
- package/components/progressbar/index.d.ts +3 -3
- package/components/progressspinner/index.d.ts +3 -3
- package/components/radiobutton/index.d.ts +7 -6
- package/components/rating/index.d.ts +6 -6
- package/components/scroll-panel/index.d.ts +11 -0
- package/components/select/index.d.ts +78 -0
- package/components/skeleton/index.d.ts +5 -5
- package/components/slider/index.d.ts +4 -3
- package/components/stepper/index.d.ts +25 -0
- package/components/tabs/index.d.ts +22 -0
- package/components/tag/index.d.ts +3 -3
- package/components/textarea/index.d.ts +40 -0
- package/components/tieredmenu/index.d.ts +2 -2
- package/components/timeline/index.d.ts +17 -5
- package/components/toast/index.d.ts +52 -0
- package/components/toggleswitch/index.d.ts +26 -0
- package/components/tooltip/index.d.ts +5 -5
- package/fesm2022/cdek-it-angular-ui-kit-components-accordion.mjs +69 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-accordion.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-autocomplete.mjs +269 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-autocomplete.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-avatar.mjs +7 -5
- package/fesm2022/cdek-it-angular-ui-kit-components-avatar.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-badge.mjs +4 -15
- package/fesm2022/cdek-it-angular-ui-kit-components-badge.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-breadcrumb.mjs +4 -13
- package/fesm2022/cdek-it-angular-ui-kit-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-button.mjs +3 -2
- package/fesm2022/cdek-it-angular-ui-kit-components-button.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-card.mjs +2 -2
- package/fesm2022/cdek-it-angular-ui-kit-components-card.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-carousel.mjs +166 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-carousel.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-checkbox.mjs +3 -2
- package/fesm2022/cdek-it-angular-ui-kit-components-checkbox.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-chip.mjs +4 -3
- package/fesm2022/cdek-it-angular-ui-kit-components-chip.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-confirm-dialog.mjs +192 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-confirm-dialog.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-date-picker.mjs +640 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-date-picker.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-dialog.mjs +28 -10
- package/fesm2022/cdek-it-angular-ui-kit-components-dialog.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-divider.mjs +6 -13
- package/fesm2022/cdek-it-angular-ui-kit-components-divider.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-drawer.mjs +153 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-drawer.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-galleria.mjs +284 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-galleria.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-inputgroup.mjs +64 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-inputgroup.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-inputmask.mjs +164 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-inputmask.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-inputnumber.mjs +267 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-inputnumber.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-inputotp.mjs +148 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-inputotp.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-inputtext.mjs +13 -11
- package/fesm2022/cdek-it-angular-ui-kit-components-inputtext.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-listbox.mjs +172 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-listbox.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-megamenu.mjs +22 -9
- package/fesm2022/cdek-it-angular-ui-kit-components-megamenu.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-menu.mjs +114 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-menu.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-menubar.mjs +88 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-menubar.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-message.mjs +105 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-message.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-metergroup.mjs +4 -3
- package/fesm2022/cdek-it-angular-ui-kit-components-metergroup.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-paginator.mjs +95 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-paginator.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-panelmenu.mjs +69 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-panelmenu.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-password.mjs +258 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-password.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-popover.mjs +48 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-popover.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-progressbar.mjs +4 -15
- package/fesm2022/cdek-it-angular-ui-kit-components-progressbar.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-progressspinner.mjs +3 -2
- package/fesm2022/cdek-it-angular-ui-kit-components-progressspinner.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-radiobutton.mjs +8 -7
- package/fesm2022/cdek-it-angular-ui-kit-components-radiobutton.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-rating.mjs +8 -7
- package/fesm2022/cdek-it-angular-ui-kit-components-rating.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-scroll-panel.mjs +42 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-scroll-panel.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-select.mjs +350 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-select.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-skeleton.mjs +4 -3
- package/fesm2022/cdek-it-angular-ui-kit-components-skeleton.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-slider.mjs +6 -6
- package/fesm2022/cdek-it-angular-ui-kit-components-slider.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-stepper.mjs +227 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-stepper.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-tabs.mjs +83 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-tabs.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-tag.mjs +6 -15
- package/fesm2022/cdek-it-angular-ui-kit-components-tag.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-textarea.mjs +214 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-textarea.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-tieredmenu.mjs +5 -16
- package/fesm2022/cdek-it-angular-ui-kit-components-tieredmenu.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-timeline.mjs +74 -50
- package/fesm2022/cdek-it-angular-ui-kit-components-timeline.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-components-toast.mjs +106 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-toast.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-toggleswitch.mjs +93 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-toggleswitch.mjs.map +1 -0
- package/fesm2022/cdek-it-angular-ui-kit-components-tooltip.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-providers.mjs +2497 -125
- package/fesm2022/cdek-it-angular-ui-kit-providers.mjs.map +1 -1
- package/fesm2022/cdek-it-angular-ui-kit-shared.mjs +4 -0
- package/fesm2022/cdek-it-angular-ui-kit-shared.mjs.map +1 -0
- package/package.json +109 -1
- package/shared/index.d.ts +49 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive, EventEmitter, TemplateRef, forwardRef, Output, ContentChild, Input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
|
+
import { Listbox } from 'primeng/listbox';
|
|
6
|
+
import * as i2 from 'primeng/api';
|
|
7
|
+
import { SharedModule } from 'primeng/api';
|
|
8
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
9
|
+
|
|
10
|
+
class ExtraListboxItemDirective {
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraListboxItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
12
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: ExtraListboxItemDirective, isStandalone: true, selector: "[extraListboxItem]", ngImport: i0 });
|
|
13
|
+
}
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraListboxItemDirective, decorators: [{
|
|
15
|
+
type: Directive,
|
|
16
|
+
args: [{ selector: '[extraListboxItem]', standalone: true }]
|
|
17
|
+
}] });
|
|
18
|
+
class ExtraListboxComponent {
|
|
19
|
+
options = [];
|
|
20
|
+
optionLabel = 'label';
|
|
21
|
+
optionValue = undefined;
|
|
22
|
+
multiple = false;
|
|
23
|
+
filter = false;
|
|
24
|
+
filterPlaceHolder = undefined;
|
|
25
|
+
checkmark = false;
|
|
26
|
+
group = false;
|
|
27
|
+
optionGroupLabel = undefined;
|
|
28
|
+
optionGroupChildren = undefined;
|
|
29
|
+
scrollHeight = '200px';
|
|
30
|
+
emptyMessage = undefined;
|
|
31
|
+
itemTemplate = null;
|
|
32
|
+
onFocus = new EventEmitter();
|
|
33
|
+
onBlur = new EventEmitter();
|
|
34
|
+
modelValue = null;
|
|
35
|
+
_disabled = false;
|
|
36
|
+
_onChange = () => { };
|
|
37
|
+
_onTouched = () => { };
|
|
38
|
+
get isDisabled() {
|
|
39
|
+
return this._disabled;
|
|
40
|
+
}
|
|
41
|
+
onChangeHandler(event) {
|
|
42
|
+
// Обновляем внутреннее значение и уведомляем форму об изменении.
|
|
43
|
+
this.modelValue = event.value;
|
|
44
|
+
this._onChange(event.value);
|
|
45
|
+
}
|
|
46
|
+
onBlurHandler(event) {
|
|
47
|
+
// emit external onBlur and mark control as touched for forms
|
|
48
|
+
this.onBlur.emit(event);
|
|
49
|
+
this._onTouched();
|
|
50
|
+
}
|
|
51
|
+
writeValue(value) {
|
|
52
|
+
this.modelValue = value;
|
|
53
|
+
}
|
|
54
|
+
registerOnChange(fn) {
|
|
55
|
+
this._onChange = fn;
|
|
56
|
+
}
|
|
57
|
+
registerOnTouched(fn) {
|
|
58
|
+
this._onTouched = fn;
|
|
59
|
+
}
|
|
60
|
+
setDisabledState(isDisabled) {
|
|
61
|
+
this._disabled = isDisabled;
|
|
62
|
+
}
|
|
63
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraListboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
64
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ExtraListboxComponent, isStandalone: true, selector: "extra-listbox", inputs: { options: "options", optionLabel: "optionLabel", optionValue: "optionValue", multiple: "multiple", filter: "filter", filterPlaceHolder: "filterPlaceHolder", checkmark: "checkmark", group: "group", optionGroupLabel: "optionGroupLabel", optionGroupChildren: "optionGroupChildren", scrollHeight: "scrollHeight", emptyMessage: "emptyMessage" }, outputs: { onFocus: "onFocus", onBlur: "onBlur" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => ExtraListboxComponent), multi: true }], queries: [{ propertyName: "itemTemplate", first: true, predicate: ExtraListboxItemDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: `
|
|
65
|
+
<p-listbox
|
|
66
|
+
[options]="options"
|
|
67
|
+
[(ngModel)]="modelValue"
|
|
68
|
+
[optionLabel]="optionLabel"
|
|
69
|
+
[optionValue]="optionValue"
|
|
70
|
+
[multiple]="multiple"
|
|
71
|
+
[filter]="filter"
|
|
72
|
+
[filterPlaceHolder]="filterPlaceHolder"
|
|
73
|
+
[checkmark]="checkmark"
|
|
74
|
+
[group]="group"
|
|
75
|
+
[optionGroupLabel]="optionGroupLabel"
|
|
76
|
+
[optionGroupChildren]="optionGroupChildren"
|
|
77
|
+
[scrollHeight]="scrollHeight"
|
|
78
|
+
[emptyMessage]="emptyMessage"
|
|
79
|
+
[disabled]="isDisabled"
|
|
80
|
+
(onChange)="onChangeHandler($event)"
|
|
81
|
+
(onFocus)="onFocus.emit($event)"
|
|
82
|
+
(onBlur)="onBlurHandler($event)"
|
|
83
|
+
>
|
|
84
|
+
@if (itemTemplate) {
|
|
85
|
+
<ng-template pTemplate="item" let-item>
|
|
86
|
+
<ng-container
|
|
87
|
+
[ngTemplateOutlet]="itemTemplate"
|
|
88
|
+
[ngTemplateOutletContext]="{ $implicit: item }"
|
|
89
|
+
></ng-container>
|
|
90
|
+
</ng-template>
|
|
91
|
+
}
|
|
92
|
+
</p-listbox>
|
|
93
|
+
`, isInline: true, dependencies: [{ kind: "component", type: Listbox, selector: "p-listbox, p-listBox, p-list-box", inputs: ["hostName", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "ariaLabel", "selectOnFocus", "searchLocale", "focusOnHover", "filterMessage", "filterFields", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "scrollHeight", "tabindex", "multiple", "styleClass", "listStyle", "listStyleClass", "readonly", "checkbox", "filter", "filterBy", "filterMatchMode", "filterLocale", "metaKeySelection", "dataKey", "showToggleAll", "optionLabel", "optionValue", "optionGroupChildren", "optionGroupLabel", "optionDisabled", "ariaFilterLabel", "filterPlaceHolder", "emptyFilterMessage", "emptyMessage", "group", "options", "filterValue", "selectAll", "striped", "highlightOnSelect", "checkmark", "dragdrop", "dropListData", "fluid"], outputs: ["onChange", "onClick", "onDblClick", "onFilter", "onFocus", "onBlur", "onSelectAllChange", "onLazyLoad", "onDrop"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
94
|
+
}
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraListboxComponent, decorators: [{
|
|
96
|
+
type: Component,
|
|
97
|
+
args: [{
|
|
98
|
+
selector: 'extra-listbox',
|
|
99
|
+
standalone: true,
|
|
100
|
+
imports: [Listbox, FormsModule, SharedModule, NgTemplateOutlet],
|
|
101
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
102
|
+
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => ExtraListboxComponent), multi: true }],
|
|
103
|
+
template: `
|
|
104
|
+
<p-listbox
|
|
105
|
+
[options]="options"
|
|
106
|
+
[(ngModel)]="modelValue"
|
|
107
|
+
[optionLabel]="optionLabel"
|
|
108
|
+
[optionValue]="optionValue"
|
|
109
|
+
[multiple]="multiple"
|
|
110
|
+
[filter]="filter"
|
|
111
|
+
[filterPlaceHolder]="filterPlaceHolder"
|
|
112
|
+
[checkmark]="checkmark"
|
|
113
|
+
[group]="group"
|
|
114
|
+
[optionGroupLabel]="optionGroupLabel"
|
|
115
|
+
[optionGroupChildren]="optionGroupChildren"
|
|
116
|
+
[scrollHeight]="scrollHeight"
|
|
117
|
+
[emptyMessage]="emptyMessage"
|
|
118
|
+
[disabled]="isDisabled"
|
|
119
|
+
(onChange)="onChangeHandler($event)"
|
|
120
|
+
(onFocus)="onFocus.emit($event)"
|
|
121
|
+
(onBlur)="onBlurHandler($event)"
|
|
122
|
+
>
|
|
123
|
+
@if (itemTemplate) {
|
|
124
|
+
<ng-template pTemplate="item" let-item>
|
|
125
|
+
<ng-container
|
|
126
|
+
[ngTemplateOutlet]="itemTemplate"
|
|
127
|
+
[ngTemplateOutletContext]="{ $implicit: item }"
|
|
128
|
+
></ng-container>
|
|
129
|
+
</ng-template>
|
|
130
|
+
}
|
|
131
|
+
</p-listbox>
|
|
132
|
+
`
|
|
133
|
+
}]
|
|
134
|
+
}], propDecorators: { options: [{
|
|
135
|
+
type: Input
|
|
136
|
+
}], optionLabel: [{
|
|
137
|
+
type: Input
|
|
138
|
+
}], optionValue: [{
|
|
139
|
+
type: Input
|
|
140
|
+
}], multiple: [{
|
|
141
|
+
type: Input
|
|
142
|
+
}], filter: [{
|
|
143
|
+
type: Input
|
|
144
|
+
}], filterPlaceHolder: [{
|
|
145
|
+
type: Input
|
|
146
|
+
}], checkmark: [{
|
|
147
|
+
type: Input
|
|
148
|
+
}], group: [{
|
|
149
|
+
type: Input
|
|
150
|
+
}], optionGroupLabel: [{
|
|
151
|
+
type: Input
|
|
152
|
+
}], optionGroupChildren: [{
|
|
153
|
+
type: Input
|
|
154
|
+
}], scrollHeight: [{
|
|
155
|
+
type: Input
|
|
156
|
+
}], emptyMessage: [{
|
|
157
|
+
type: Input
|
|
158
|
+
}], itemTemplate: [{
|
|
159
|
+
type: ContentChild,
|
|
160
|
+
args: [ExtraListboxItemDirective, { read: TemplateRef }]
|
|
161
|
+
}], onFocus: [{
|
|
162
|
+
type: Output
|
|
163
|
+
}], onBlur: [{
|
|
164
|
+
type: Output
|
|
165
|
+
}] } });
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Generated bundle index. Do not edit.
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
export { ExtraListboxComponent, ExtraListboxItemDirective };
|
|
172
|
+
//# sourceMappingURL=cdek-it-angular-ui-kit-components-listbox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cdek-it-angular-ui-kit-components-listbox.mjs","sources":["../../src/lib/components/listbox/listbox.component.ts","../../src/lib/components/listbox/cdek-it-angular-ui-kit-components-listbox.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n Directive,\n EventEmitter,\n forwardRef,\n Input,\n Output,\n TemplateRef\n} from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Listbox, ListboxChangeEvent } from 'primeng/listbox';\nimport { SharedModule } from 'primeng/api';\nimport { NgTemplateOutlet } from '@angular/common';\n\nexport type ExtraListboxChangeEvent = ListboxChangeEvent;\n\n@Directive({ selector: '[extraListboxItem]', standalone: true })\nexport class ExtraListboxItemDirective {}\n\n@Component({\n selector: 'extra-listbox',\n standalone: true,\n imports: [Listbox, FormsModule, SharedModule, NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => ExtraListboxComponent), multi: true }],\n template: `\n <p-listbox\n [options]=\"options\"\n [(ngModel)]=\"modelValue\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [multiple]=\"multiple\"\n [filter]=\"filter\"\n [filterPlaceHolder]=\"filterPlaceHolder\"\n [checkmark]=\"checkmark\"\n [group]=\"group\"\n [optionGroupLabel]=\"optionGroupLabel\"\n [optionGroupChildren]=\"optionGroupChildren\"\n [scrollHeight]=\"scrollHeight\"\n [emptyMessage]=\"emptyMessage\"\n [disabled]=\"isDisabled\"\n (onChange)=\"onChangeHandler($event)\"\n (onFocus)=\"onFocus.emit($event)\"\n (onBlur)=\"onBlurHandler($event)\"\n >\n @if (itemTemplate) {\n <ng-template pTemplate=\"item\" let-item>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-container>\n </ng-template>\n }\n </p-listbox>\n `\n})\nexport class ExtraListboxComponent implements ControlValueAccessor {\n @Input() options: any[] = [];\n @Input() optionLabel = 'label';\n @Input() optionValue: string | undefined = undefined;\n @Input() multiple = false;\n @Input() filter = false;\n @Input() filterPlaceHolder: string | undefined = undefined;\n @Input() checkmark = false;\n @Input() group = false;\n @Input() optionGroupLabel: string | undefined = undefined;\n @Input() optionGroupChildren: string | undefined = undefined;\n @Input() scrollHeight = '200px';\n @Input() emptyMessage: string | undefined = undefined;\n @ContentChild(ExtraListboxItemDirective, { read: TemplateRef }) itemTemplate: TemplateRef<any> | null = null;\n\n @Output() onFocus = new EventEmitter<FocusEvent>();\n @Output() onBlur = new EventEmitter<FocusEvent>();\n\n protected modelValue: any = null;\n\n private _disabled = false;\n private _onChange: (value: any) => void = () => {};\n private _onTouched: () => void = () => {};\n\n get isDisabled(): boolean {\n return this._disabled;\n }\n\n onChangeHandler(event: ExtraListboxChangeEvent): void {\n // Обновляем внутреннее значение и уведомляем форму об изменении.\n this.modelValue = event.value;\n this._onChange(event.value);\n }\n\n onBlurHandler(event: FocusEvent): void {\n // emit external onBlur and mark control as touched for forms\n this.onBlur.emit(event);\n this._onTouched();\n }\n\n writeValue(value: any): void {\n this.modelValue = value;\n }\n\n registerOnChange(fn: (value: any) => void): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._disabled = isDisabled;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nex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import * as i0 from '@angular/core';
|
|
2
|
-
import { Input, Component } from '@angular/core';
|
|
2
|
+
import { Directive, TemplateRef, ContentChild, Input, Component } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet } from '@angular/common';
|
|
4
4
|
import { MegaMenu } from 'primeng/megamenu';
|
|
5
5
|
import { PrimeTemplate } from 'primeng/api';
|
|
6
6
|
import { Badge } from 'primeng/badge';
|
|
7
7
|
|
|
8
|
+
class ExtraMegaMenuItemDirective {
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraMegaMenuItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
10
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: ExtraMegaMenuItemDirective, isStandalone: true, selector: "[extraMegaMenuItem]", ngImport: i0 });
|
|
11
|
+
}
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraMegaMenuItemDirective, decorators: [{
|
|
13
|
+
type: Directive,
|
|
14
|
+
args: [{ selector: '[extraMegaMenuItem]', standalone: true }]
|
|
15
|
+
}] });
|
|
8
16
|
class ExtraMegaMenuComponent {
|
|
9
17
|
model = [];
|
|
10
18
|
orientation = 'horizontal';
|
|
@@ -16,7 +24,7 @@ class ExtraMegaMenuComponent {
|
|
|
16
24
|
tabindex = 0;
|
|
17
25
|
itemTemplate = null;
|
|
18
26
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraMegaMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ExtraMegaMenuComponent, isStandalone: true, selector: "extra-megamenu", inputs: { model: "model", orientation: "orientation", breakpoint: "breakpoint", scrollHeight: "scrollHeight", disabled: "disabled", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", tabindex: "tabindex",
|
|
27
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ExtraMegaMenuComponent, isStandalone: true, selector: "extra-megamenu", inputs: { model: "model", orientation: "orientation", breakpoint: "breakpoint", scrollHeight: "scrollHeight", disabled: "disabled", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", tabindex: "tabindex" }, host: { styleAttribute: "display: contents" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: ExtraMegaMenuItemDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: `
|
|
20
28
|
<p-megamenu
|
|
21
29
|
[model]="model"
|
|
22
30
|
[orientation]="orientation"
|
|
@@ -29,8 +37,10 @@ class ExtraMegaMenuComponent {
|
|
|
29
37
|
>
|
|
30
38
|
<ng-template pTemplate="item" let-item let-hasSubmenu="hasSubmenu">
|
|
31
39
|
@if (itemTemplate) {
|
|
32
|
-
<ng-container
|
|
33
|
-
[
|
|
40
|
+
<ng-container
|
|
41
|
+
[ngTemplateOutlet]="itemTemplate"
|
|
42
|
+
[ngTemplateOutletContext]="{ $implicit: item, hasSubmenu: hasSubmenu }"
|
|
43
|
+
>
|
|
34
44
|
</ng-container>
|
|
35
45
|
} @else {
|
|
36
46
|
<a
|
|
@@ -84,8 +94,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
84
94
|
>
|
|
85
95
|
<ng-template pTemplate="item" let-item let-hasSubmenu="hasSubmenu">
|
|
86
96
|
@if (itemTemplate) {
|
|
87
|
-
<ng-container
|
|
88
|
-
[
|
|
97
|
+
<ng-container
|
|
98
|
+
[ngTemplateOutlet]="itemTemplate"
|
|
99
|
+
[ngTemplateOutletContext]="{ $implicit: item, hasSubmenu: hasSubmenu }"
|
|
100
|
+
>
|
|
89
101
|
</ng-container>
|
|
90
102
|
} @else {
|
|
91
103
|
<a
|
|
@@ -117,7 +129,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
117
129
|
}
|
|
118
130
|
</ng-template>
|
|
119
131
|
</p-megamenu>
|
|
120
|
-
|
|
132
|
+
`
|
|
121
133
|
}]
|
|
122
134
|
}], propDecorators: { model: [{
|
|
123
135
|
type: Input
|
|
@@ -136,12 +148,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
136
148
|
}], tabindex: [{
|
|
137
149
|
type: Input
|
|
138
150
|
}], itemTemplate: [{
|
|
139
|
-
type:
|
|
151
|
+
type: ContentChild,
|
|
152
|
+
args: [ExtraMegaMenuItemDirective, { read: TemplateRef }]
|
|
140
153
|
}] } });
|
|
141
154
|
|
|
142
155
|
/**
|
|
143
156
|
* Generated bundle index. Do not edit.
|
|
144
157
|
*/
|
|
145
158
|
|
|
146
|
-
export { ExtraMegaMenuComponent };
|
|
159
|
+
export { ExtraMegaMenuComponent, ExtraMegaMenuItemDirective };
|
|
147
160
|
//# sourceMappingURL=cdek-it-angular-ui-kit-components-megamenu.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdek-it-angular-ui-kit-components-megamenu.mjs","sources":["../../src/lib/components/megamenu/megamenu.component.ts","../../src/lib/components/megamenu/cdek-it-angular-ui-kit-components-megamenu.ts"],"sourcesContent":["import { Component, Input, TemplateRef } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MegaMenu } from 'primeng/megamenu';\nimport { MegaMenuItem, PrimeTemplate } from 'primeng/api';\nimport { Badge } from 'primeng/badge';\n\nexport type
|
|
1
|
+
{"version":3,"file":"cdek-it-angular-ui-kit-components-megamenu.mjs","sources":["../../src/lib/components/megamenu/megamenu.component.ts","../../src/lib/components/megamenu/cdek-it-angular-ui-kit-components-megamenu.ts"],"sourcesContent":["import { Component, ContentChild, Directive, Input, TemplateRef } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MegaMenu } from 'primeng/megamenu';\nimport { MegaMenuItem, PrimeTemplate } from 'primeng/api';\nimport { Badge } from 'primeng/badge';\n\nexport type ExtraMegaMenuOrientation = 'horizontal' | 'vertical';\n\nexport type ExtraMegaMenuItem = MegaMenuItem;\n\n@Directive({ selector: '[extraMegaMenuItem]', standalone: true })\nexport class ExtraMegaMenuItemDirective {}\n\n@Component({\n selector: 'extra-megamenu',\n host: { style: 'display: contents' },\n standalone: true,\n imports: [MegaMenu, PrimeTemplate, NgTemplateOutlet, Badge],\n template: `\n <p-megamenu\n [model]=\"model\"\n [orientation]=\"orientation\"\n [breakpoint]=\"breakpoint\"\n [scrollHeight]=\"scrollHeight\"\n [disabled]=\"disabled\"\n [ariaLabel]=\"ariaLabel\"\n [ariaLabelledBy]=\"ariaLabelledBy\"\n [tabindex]=\"tabindex\"\n >\n <ng-template pTemplate=\"item\" let-item let-hasSubmenu=\"hasSubmenu\">\n @if (itemTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item, hasSubmenu: hasSubmenu }\"\n >\n </ng-container>\n } @else {\n <a\n class=\"p-megamenu-item-link\"\n role=\"menuitem\"\n tabindex=\"0\"\n [class.p-disabled]=\"item.disabled\"\n [attr.href]=\"item.url || null\"\n [attr.target]=\"item.target || null\"\n >\n @if (item.icon) {\n <span [class]=\"item.icon + ' p-megamenu-item-icon'\"></span>\n }\n @if ($any(item).description) {\n <div class=\"megamenu-item-label\">\n <span class=\"p-megamenu-item-label\">{{ item.label }}</span>\n <small class=\"megamenu-item-caption\">{{ $any(item).description }}</small>\n </div>\n } @else {\n <span class=\"p-megamenu-item-label\">{{ item.label }}</span>\n }\n @if ($any(item).badge) {\n <p-badge [value]=\"$any(item).badge\"></p-badge>\n }\n @if (hasSubmenu) {\n <span class=\"p-megamenu-submenu-icon ti ti-chevron-down\"></span>\n }\n </a>\n }\n </ng-template>\n </p-megamenu>\n `\n})\nexport class ExtraMegaMenuComponent {\n @Input() model: ExtraMegaMenuItem[] = [];\n @Input() orientation: ExtraMegaMenuOrientation = 'horizontal';\n @Input() breakpoint: string = '960px';\n @Input() scrollHeight: string = '';\n @Input() disabled: boolean = false;\n @Input() ariaLabel: string | undefined = undefined;\n @Input() ariaLabelledBy: string | undefined = undefined;\n @Input() tabindex: number = 0;\n @ContentChild(ExtraMegaMenuItemDirective, { read: TemplateRef }) itemTemplate: TemplateRef<any> | null = null;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAWa,0BAA0B,CAAA;wGAA1B,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,QAAQ,EAAE,qBAAqB,EAAE,UAAU,EAAE,IAAI,EAAE;;MA0DnD,sBAAsB,CAAA;IACxB,KAAK,GAAwB,EAAE;IAC/B,WAAW,GAA6B,YAAY;IACpD,UAAU,GAAW,OAAO;IAC5B,YAAY,GAAW,EAAE;IACzB,QAAQ,GAAY,KAAK;IACzB,SAAS,GAAuB,SAAS;IACzC,cAAc,GAAuB,SAAS;IAC9C,QAAQ,GAAW,CAAC;IACoC,YAAY,GAA4B,IAAI;wGATlG,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA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;;4FAmD/C,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAvDlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE;AACpC,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,gBAAgB,EAAE,KAAK,CAAC;AAC3D,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDT,EAAA;AACF,iBAAA;;sBAEE;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,0BAA0B,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;;;AC7EjE;;AAEG;;;;"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive, TemplateRef, ContentChild, Input, ViewChild, Component } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { Menu } from 'primeng/menu';
|
|
5
|
+
import { PrimeTemplate } from 'primeng/api';
|
|
6
|
+
|
|
7
|
+
class ExtraMenuItemDirective {
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraMenuItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: ExtraMenuItemDirective, isStandalone: true, selector: "[extraMenuItem]", ngImport: i0 });
|
|
10
|
+
}
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraMenuItemDirective, decorators: [{
|
|
12
|
+
type: Directive,
|
|
13
|
+
args: [{ selector: '[extraMenuItem]', standalone: true }]
|
|
14
|
+
}] });
|
|
15
|
+
class ExtraMenuComponent {
|
|
16
|
+
menuRef;
|
|
17
|
+
model = [];
|
|
18
|
+
popup = false;
|
|
19
|
+
itemTemplate = null;
|
|
20
|
+
toggle(event) {
|
|
21
|
+
this.menuRef.toggle(event);
|
|
22
|
+
}
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
24
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ExtraMenuComponent, isStandalone: true, selector: "extra-menu", inputs: { model: "model", popup: "popup" }, host: { styleAttribute: "display: contents" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: ExtraMenuItemDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "menuRef", first: true, predicate: ["menuRef"], descendants: true }], ngImport: i0, template: `
|
|
25
|
+
<p-menu #menuRef [model]="model" [popup]="popup" [appendTo]="popup ? 'body' : null">
|
|
26
|
+
<ng-template pTemplate="item" let-item>
|
|
27
|
+
@if (itemTemplate) {
|
|
28
|
+
<ng-container [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ $implicit: item }">
|
|
29
|
+
</ng-container>
|
|
30
|
+
} @else {
|
|
31
|
+
<a
|
|
32
|
+
class="p-menu-item-link"
|
|
33
|
+
role="menuitem"
|
|
34
|
+
tabindex="0"
|
|
35
|
+
[class.p-disabled]="item.disabled"
|
|
36
|
+
[attr.href]="item.url || null"
|
|
37
|
+
[attr.target]="item.target || null"
|
|
38
|
+
(click)="!item.disabled && item.command && item.command({ originalEvent: $event, item: item })"
|
|
39
|
+
>
|
|
40
|
+
@if (item.icon) {
|
|
41
|
+
<span [class]="item.icon + ' p-menu-item-icon'"></span>
|
|
42
|
+
}
|
|
43
|
+
@if ($any(item).caption) {
|
|
44
|
+
<div class="menu-item-label">
|
|
45
|
+
<span class="p-menu-item-label">{{ item.label }}</span>
|
|
46
|
+
<small class="menu-item-caption">{{ $any(item).caption }}</small>
|
|
47
|
+
</div>
|
|
48
|
+
} @else {
|
|
49
|
+
<span class="p-menu-item-label">{{ item.label }}</span>
|
|
50
|
+
}
|
|
51
|
+
</a>
|
|
52
|
+
}
|
|
53
|
+
</ng-template>
|
|
54
|
+
</p-menu>
|
|
55
|
+
`, isInline: true, dependencies: [{ kind: "component", type: Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex", "appendTo"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "directive", type: PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
56
|
+
}
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraMenuComponent, decorators: [{
|
|
58
|
+
type: Component,
|
|
59
|
+
args: [{
|
|
60
|
+
selector: 'extra-menu',
|
|
61
|
+
host: { style: 'display: contents' },
|
|
62
|
+
standalone: true,
|
|
63
|
+
imports: [Menu, PrimeTemplate, NgTemplateOutlet],
|
|
64
|
+
template: `
|
|
65
|
+
<p-menu #menuRef [model]="model" [popup]="popup" [appendTo]="popup ? 'body' : null">
|
|
66
|
+
<ng-template pTemplate="item" let-item>
|
|
67
|
+
@if (itemTemplate) {
|
|
68
|
+
<ng-container [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ $implicit: item }">
|
|
69
|
+
</ng-container>
|
|
70
|
+
} @else {
|
|
71
|
+
<a
|
|
72
|
+
class="p-menu-item-link"
|
|
73
|
+
role="menuitem"
|
|
74
|
+
tabindex="0"
|
|
75
|
+
[class.p-disabled]="item.disabled"
|
|
76
|
+
[attr.href]="item.url || null"
|
|
77
|
+
[attr.target]="item.target || null"
|
|
78
|
+
(click)="!item.disabled && item.command && item.command({ originalEvent: $event, item: item })"
|
|
79
|
+
>
|
|
80
|
+
@if (item.icon) {
|
|
81
|
+
<span [class]="item.icon + ' p-menu-item-icon'"></span>
|
|
82
|
+
}
|
|
83
|
+
@if ($any(item).caption) {
|
|
84
|
+
<div class="menu-item-label">
|
|
85
|
+
<span class="p-menu-item-label">{{ item.label }}</span>
|
|
86
|
+
<small class="menu-item-caption">{{ $any(item).caption }}</small>
|
|
87
|
+
</div>
|
|
88
|
+
} @else {
|
|
89
|
+
<span class="p-menu-item-label">{{ item.label }}</span>
|
|
90
|
+
}
|
|
91
|
+
</a>
|
|
92
|
+
}
|
|
93
|
+
</ng-template>
|
|
94
|
+
</p-menu>
|
|
95
|
+
`
|
|
96
|
+
}]
|
|
97
|
+
}], propDecorators: { menuRef: [{
|
|
98
|
+
type: ViewChild,
|
|
99
|
+
args: ['menuRef']
|
|
100
|
+
}], model: [{
|
|
101
|
+
type: Input
|
|
102
|
+
}], popup: [{
|
|
103
|
+
type: Input
|
|
104
|
+
}], itemTemplate: [{
|
|
105
|
+
type: ContentChild,
|
|
106
|
+
args: [ExtraMenuItemDirective, { read: TemplateRef }]
|
|
107
|
+
}] } });
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Generated bundle index. Do not edit.
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
export { ExtraMenuComponent, ExtraMenuItemDirective };
|
|
114
|
+
//# sourceMappingURL=cdek-it-angular-ui-kit-components-menu.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cdek-it-angular-ui-kit-components-menu.mjs","sources":["../../src/lib/components/menu/menu.component.ts","../../src/lib/components/menu/cdek-it-angular-ui-kit-components-menu.ts"],"sourcesContent":["import { Component, ContentChild, Directive, Input, TemplateRef, ViewChild } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { Menu } from 'primeng/menu';\nimport { PrimeTemplate } from 'primeng/api';\nimport { ExtraMenuItem } from '@cdek-it/angular-ui-kit/shared';\n\nexport interface ExtraMenuModel extends ExtraMenuItem {\n caption?: string;\n}\n\n@Directive({ selector: '[extraMenuItem]', standalone: true })\nexport class ExtraMenuItemDirective {}\n\n@Component({\n selector: 'extra-menu',\n host: { style: 'display: contents' },\n standalone: true,\n imports: [Menu, PrimeTemplate, NgTemplateOutlet],\n template: `\n <p-menu #menuRef [model]=\"model\" [popup]=\"popup\" [appendTo]=\"popup ? 'body' : null\">\n <ng-template pTemplate=\"item\" let-item>\n @if (itemTemplate) {\n <ng-container [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: item }\">\n </ng-container>\n } @else {\n <a\n class=\"p-menu-item-link\"\n role=\"menuitem\"\n tabindex=\"0\"\n [class.p-disabled]=\"item.disabled\"\n [attr.href]=\"item.url || null\"\n [attr.target]=\"item.target || null\"\n (click)=\"!item.disabled && item.command && item.command({ originalEvent: $event, item: item })\"\n >\n @if (item.icon) {\n <span [class]=\"item.icon + ' p-menu-item-icon'\"></span>\n }\n @if ($any(item).caption) {\n <div class=\"menu-item-label\">\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\n <small class=\"menu-item-caption\">{{ $any(item).caption }}</small>\n </div>\n } @else {\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\n }\n </a>\n }\n </ng-template>\n </p-menu>\n `\n})\nexport class ExtraMenuComponent {\n @ViewChild('menuRef') menuRef!: Menu;\n\n @Input() model: ExtraMenuModel[] = [];\n @Input() popup = false;\n @ContentChild(ExtraMenuItemDirective, { read: TemplateRef }) itemTemplate: TemplateRef<any> | null = null;\n\n toggle(event: Event): void {\n this.menuRef.toggle(event);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings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AS;uBAAC,SAAS;;sBAEnB;;sBACA;;sBACA,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,sBAAsB,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;;;ACxD7D;;AAEG;;;;"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive, TemplateRef, ContentChild, Input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { Menubar } from 'primeng/menubar';
|
|
5
|
+
import { PrimeTemplate } from 'primeng/api';
|
|
6
|
+
|
|
7
|
+
class ExtraMenubarItemDirective {
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraMenubarItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: ExtraMenubarItemDirective, isStandalone: true, selector: "[extraMenubarItem]", ngImport: i0 });
|
|
10
|
+
}
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraMenubarItemDirective, decorators: [{
|
|
12
|
+
type: Directive,
|
|
13
|
+
args: [{ selector: '[extraMenubarItem]', standalone: true }]
|
|
14
|
+
}] });
|
|
15
|
+
class ExtraMenubarComponent {
|
|
16
|
+
model = [];
|
|
17
|
+
itemTemplate = null;
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraMenubarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ExtraMenubarComponent, isStandalone: true, selector: "extra-menubar", inputs: { model: "model" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: ExtraMenubarItemDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: `
|
|
20
|
+
<p-menubar [model]="model">
|
|
21
|
+
<ng-template pTemplate="item" let-item let-hasSubmenu="hasSubmenu" let-root="root">
|
|
22
|
+
@if (itemTemplate) {
|
|
23
|
+
<ng-container
|
|
24
|
+
[ngTemplateOutlet]="itemTemplate"
|
|
25
|
+
[ngTemplateOutletContext]="{ $implicit: item, hasSubmenu: hasSubmenu, root: root }"
|
|
26
|
+
></ng-container>
|
|
27
|
+
} @else {
|
|
28
|
+
<a class="p-menubar-item-link flex items-center gap-2">
|
|
29
|
+
@if (item.icon) {
|
|
30
|
+
<span [class]="'p-menubar-item-icon ' + item.icon"></span>
|
|
31
|
+
}
|
|
32
|
+
<span class="p-menubar-item-label">{{ item.label }}</span>
|
|
33
|
+
@if (hasSubmenu) {
|
|
34
|
+
<span
|
|
35
|
+
[class]="root ? 'p-menubar-submenu-icon ti ti-chevron-down' : 'p-menubar-submenu-icon ti ti-chevron-right'"
|
|
36
|
+
></span>
|
|
37
|
+
}
|
|
38
|
+
</a>
|
|
39
|
+
}
|
|
40
|
+
</ng-template>
|
|
41
|
+
</p-menubar>
|
|
42
|
+
`, isInline: true, dependencies: [{ kind: "component", type: Menubar, selector: "p-menubar", inputs: ["model", "styleClass", "autoZIndex", "baseZIndex", "autoDisplay", "autoHide", "breakpoint", "autoHideDelay", "id", "ariaLabel", "ariaLabelledBy"], outputs: ["onFocus", "onBlur"] }, { kind: "directive", type: PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
43
|
+
}
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraMenubarComponent, decorators: [{
|
|
45
|
+
type: Component,
|
|
46
|
+
args: [{
|
|
47
|
+
selector: 'extra-menubar',
|
|
48
|
+
standalone: true,
|
|
49
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
50
|
+
imports: [Menubar, PrimeTemplate, NgTemplateOutlet],
|
|
51
|
+
template: `
|
|
52
|
+
<p-menubar [model]="model">
|
|
53
|
+
<ng-template pTemplate="item" let-item let-hasSubmenu="hasSubmenu" let-root="root">
|
|
54
|
+
@if (itemTemplate) {
|
|
55
|
+
<ng-container
|
|
56
|
+
[ngTemplateOutlet]="itemTemplate"
|
|
57
|
+
[ngTemplateOutletContext]="{ $implicit: item, hasSubmenu: hasSubmenu, root: root }"
|
|
58
|
+
></ng-container>
|
|
59
|
+
} @else {
|
|
60
|
+
<a class="p-menubar-item-link flex items-center gap-2">
|
|
61
|
+
@if (item.icon) {
|
|
62
|
+
<span [class]="'p-menubar-item-icon ' + item.icon"></span>
|
|
63
|
+
}
|
|
64
|
+
<span class="p-menubar-item-label">{{ item.label }}</span>
|
|
65
|
+
@if (hasSubmenu) {
|
|
66
|
+
<span
|
|
67
|
+
[class]="root ? 'p-menubar-submenu-icon ti ti-chevron-down' : 'p-menubar-submenu-icon ti ti-chevron-right'"
|
|
68
|
+
></span>
|
|
69
|
+
}
|
|
70
|
+
</a>
|
|
71
|
+
}
|
|
72
|
+
</ng-template>
|
|
73
|
+
</p-menubar>
|
|
74
|
+
`
|
|
75
|
+
}]
|
|
76
|
+
}], propDecorators: { model: [{
|
|
77
|
+
type: Input
|
|
78
|
+
}], itemTemplate: [{
|
|
79
|
+
type: ContentChild,
|
|
80
|
+
args: [ExtraMenubarItemDirective, { read: TemplateRef }]
|
|
81
|
+
}] } });
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Generated bundle index. Do not edit.
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
export { ExtraMenubarComponent, ExtraMenubarItemDirective };
|
|
88
|
+
//# sourceMappingURL=cdek-it-angular-ui-kit-components-menubar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cdek-it-angular-ui-kit-components-menubar.mjs","sources":["../../src/lib/components/menubar/menubar.component.ts","../../src/lib/components/menubar/cdek-it-angular-ui-kit-components-menubar.ts"],"sourcesContent":["import { Directive, Input } from '@angular/core';\nimport { ChangeDetectionStrategy, Component, ContentChild, TemplateRef } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { Menubar } from 'primeng/menubar';\nimport { PrimeTemplate } from 'primeng/api';\nimport { ExtraMenuItem } from '@cdek-it/angular-ui-kit/shared';\n\n@Directive({ selector: '[extraMenubarItem]', standalone: true })\nexport class ExtraMenubarItemDirective {}\n\n@Component({\n selector: 'extra-menubar',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [Menubar, PrimeTemplate, NgTemplateOutlet],\n template: `\n <p-menubar [model]=\"model\">\n <ng-template pTemplate=\"item\" let-item let-hasSubmenu=\"hasSubmenu\" let-root=\"root\">\n @if (itemTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item, hasSubmenu: hasSubmenu, root: root }\"\n ></ng-container>\n } @else {\n <a class=\"p-menubar-item-link flex items-center gap-2\">\n @if (item.icon) {\n <span [class]=\"'p-menubar-item-icon ' + item.icon\"></span>\n }\n <span class=\"p-menubar-item-label\">{{ item.label }}</span>\n @if (hasSubmenu) {\n <span\n [class]=\"root ? 'p-menubar-submenu-icon ti ti-chevron-down' : 'p-menubar-submenu-icon ti ti-chevron-right'\"\n ></span>\n }\n </a>\n }\n </ng-template>\n </p-menubar>\n `\n})\nexport class ExtraMenubarComponent {\n @Input() model: ExtraMenuItem[] = [];\n @ContentChild(ExtraMenubarItemDirective, { read: TemplateRef }) itemTemplate: TemplateRef<any> | null = null;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MAQa,yBAAyB,C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eAAA,EAAA,IAAA,EAAA,WAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,EAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,aAAa,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FA0BvC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBA9BjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,gBAAgB,CAAC;AACnD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;AAuBT,EAAA;AACF,iBAAA;;sBAEE;;sBACA,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,yBAAyB,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;;;AC1ChE;;AAEG;;;;"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Output, Input, Component } from '@angular/core';
|
|
3
|
+
import { Message } from 'primeng/message';
|
|
4
|
+
import { ButtonDirective } from 'primeng/button';
|
|
5
|
+
import * as i1 from 'primeng/api';
|
|
6
|
+
import { SharedModule } from 'primeng/api';
|
|
7
|
+
|
|
8
|
+
const SEVERITY_ICONS = {
|
|
9
|
+
info: 'ti ti-info-circle',
|
|
10
|
+
success: 'ti ti-circle-check',
|
|
11
|
+
warn: 'ti ti-alert-triangle',
|
|
12
|
+
error: 'ti ti-alert-circle'
|
|
13
|
+
};
|
|
14
|
+
class ExtraMessageComponent {
|
|
15
|
+
severity = 'info';
|
|
16
|
+
summary = '';
|
|
17
|
+
detail = '';
|
|
18
|
+
icon = undefined;
|
|
19
|
+
closable = false;
|
|
20
|
+
life = undefined;
|
|
21
|
+
onClose = new EventEmitter();
|
|
22
|
+
get resolvedIcon() {
|
|
23
|
+
return this.icon ?? SEVERITY_ICONS[this.severity] ?? 'ti ti-info-circle';
|
|
24
|
+
}
|
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ExtraMessageComponent, isStandalone: true, selector: "extra-message", inputs: { severity: "severity", summary: "summary", detail: "detail", icon: "icon", closable: "closable", life: "life" }, outputs: { onClose: "onClose" }, ngImport: i0, template: `
|
|
27
|
+
<p-message [severity]="severity" [closable]="false" [life]="life">
|
|
28
|
+
<ng-template pTemplate="container" let-closeCallback="closeCallback">
|
|
29
|
+
<div class="p-message-accent-line"></div>
|
|
30
|
+
<i [class]="resolvedIcon + ' p-message-icon'"></i>
|
|
31
|
+
<div class="p-message-text">
|
|
32
|
+
<span class="p-message-summary">{{ summary }}</span>
|
|
33
|
+
@if (detail) {
|
|
34
|
+
<div class="p-message-detail">{{ detail }}</div>
|
|
35
|
+
}
|
|
36
|
+
<ng-content></ng-content>
|
|
37
|
+
</div>
|
|
38
|
+
@if (closable) {
|
|
39
|
+
<button
|
|
40
|
+
type="button"
|
|
41
|
+
pButton
|
|
42
|
+
[text]="true"
|
|
43
|
+
icon="ti ti-x"
|
|
44
|
+
class="p-message-close-button"
|
|
45
|
+
(click)="closeCallback($event); onClose.emit($event)"
|
|
46
|
+
></button>
|
|
47
|
+
}
|
|
48
|
+
</ng-template>
|
|
49
|
+
</p-message>
|
|
50
|
+
`, isInline: true, dependencies: [{ kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "directive", type: ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }] });
|
|
51
|
+
}
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraMessageComponent, decorators: [{
|
|
53
|
+
type: Component,
|
|
54
|
+
args: [{
|
|
55
|
+
selector: 'extra-message',
|
|
56
|
+
standalone: true,
|
|
57
|
+
imports: [Message, ButtonDirective, SharedModule],
|
|
58
|
+
template: `
|
|
59
|
+
<p-message [severity]="severity" [closable]="false" [life]="life">
|
|
60
|
+
<ng-template pTemplate="container" let-closeCallback="closeCallback">
|
|
61
|
+
<div class="p-message-accent-line"></div>
|
|
62
|
+
<i [class]="resolvedIcon + ' p-message-icon'"></i>
|
|
63
|
+
<div class="p-message-text">
|
|
64
|
+
<span class="p-message-summary">{{ summary }}</span>
|
|
65
|
+
@if (detail) {
|
|
66
|
+
<div class="p-message-detail">{{ detail }}</div>
|
|
67
|
+
}
|
|
68
|
+
<ng-content></ng-content>
|
|
69
|
+
</div>
|
|
70
|
+
@if (closable) {
|
|
71
|
+
<button
|
|
72
|
+
type="button"
|
|
73
|
+
pButton
|
|
74
|
+
[text]="true"
|
|
75
|
+
icon="ti ti-x"
|
|
76
|
+
class="p-message-close-button"
|
|
77
|
+
(click)="closeCallback($event); onClose.emit($event)"
|
|
78
|
+
></button>
|
|
79
|
+
}
|
|
80
|
+
</ng-template>
|
|
81
|
+
</p-message>
|
|
82
|
+
`
|
|
83
|
+
}]
|
|
84
|
+
}], propDecorators: { severity: [{
|
|
85
|
+
type: Input
|
|
86
|
+
}], summary: [{
|
|
87
|
+
type: Input
|
|
88
|
+
}], detail: [{
|
|
89
|
+
type: Input
|
|
90
|
+
}], icon: [{
|
|
91
|
+
type: Input
|
|
92
|
+
}], closable: [{
|
|
93
|
+
type: Input
|
|
94
|
+
}], life: [{
|
|
95
|
+
type: Input
|
|
96
|
+
}], onClose: [{
|
|
97
|
+
type: Output
|
|
98
|
+
}] } });
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Generated bundle index. Do not edit.
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
export { ExtraMessageComponent };
|
|
105
|
+
//# sourceMappingURL=cdek-it-angular-ui-kit-components-message.mjs.map
|