@cdek-it/angular-ui-kit 0.0.2 → 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.
Files changed (173) hide show
  1. package/components/accordion/index.d.ts +21 -0
  2. package/components/autocomplete/index.d.ts +65 -0
  3. package/components/avatar/index.d.ts +22 -0
  4. package/components/badge/index.d.ts +19 -0
  5. package/components/breadcrumb/index.d.ts +11 -0
  6. package/components/button/index.d.ts +40 -0
  7. package/components/card/index.d.ts +20 -0
  8. package/components/carousel/index.d.ts +41 -0
  9. package/components/checkbox/index.d.ts +44 -0
  10. package/components/chip/index.d.ts +14 -0
  11. package/components/confirm-dialog/index.d.ts +37 -0
  12. package/components/date-picker/index.d.ts +89 -0
  13. package/components/dialog/index.d.ts +47 -0
  14. package/components/divider/index.d.ts +15 -0
  15. package/components/drawer/index.d.ts +33 -0
  16. package/components/galleria/index.d.ts +65 -0
  17. package/components/inputgroup/index.d.ts +17 -0
  18. package/components/inputmask/index.d.ts +43 -0
  19. package/components/inputnumber/index.d.ts +50 -0
  20. package/components/inputotp/index.d.ts +40 -0
  21. package/components/inputtext/index.d.ts +35 -0
  22. package/components/listbox/index.d.ts +43 -0
  23. package/components/megamenu/index.d.ts +26 -0
  24. package/components/menu/index.d.ts +24 -0
  25. package/components/menubar/index.d.ts +16 -0
  26. package/components/message/index.d.ts +19 -0
  27. package/components/metergroup/index.d.ts +21 -0
  28. package/components/paginator/index.d.ts +25 -0
  29. package/components/panelmenu/index.d.ts +19 -0
  30. package/components/password/index.d.ts +54 -0
  31. package/components/popover/index.d.ts +12 -0
  32. package/components/progressbar/index.d.ts +13 -0
  33. package/components/progressspinner/index.d.ts +17 -0
  34. package/components/radiobutton/index.d.ts +39 -0
  35. package/components/rating/index.d.ts +27 -0
  36. package/components/scroll-panel/index.d.ts +11 -0
  37. package/components/select/index.d.ts +78 -0
  38. package/components/skeleton/index.d.ts +17 -0
  39. package/components/slider/index.d.ts +33 -0
  40. package/components/stepper/index.d.ts +25 -0
  41. package/components/tabs/index.d.ts +22 -0
  42. package/components/tag/index.d.ts +15 -0
  43. package/components/textarea/index.d.ts +40 -0
  44. package/components/tieredmenu/index.d.ts +19 -0
  45. package/components/timeline/index.d.ts +35 -0
  46. package/components/toast/index.d.ts +52 -0
  47. package/components/toggleswitch/index.d.ts +26 -0
  48. package/components/tooltip/index.d.ts +18 -0
  49. package/fesm2022/cdek-it-angular-ui-kit-components-accordion.mjs +69 -0
  50. package/fesm2022/cdek-it-angular-ui-kit-components-accordion.mjs.map +1 -0
  51. package/fesm2022/cdek-it-angular-ui-kit-components-autocomplete.mjs +269 -0
  52. package/fesm2022/cdek-it-angular-ui-kit-components-autocomplete.mjs.map +1 -0
  53. package/fesm2022/cdek-it-angular-ui-kit-components-avatar.mjs +93 -0
  54. package/fesm2022/cdek-it-angular-ui-kit-components-avatar.mjs.map +1 -0
  55. package/fesm2022/cdek-it-angular-ui-kit-components-badge.mjs +46 -0
  56. package/fesm2022/cdek-it-angular-ui-kit-components-badge.mjs.map +1 -0
  57. package/fesm2022/cdek-it-angular-ui-kit-components-breadcrumb.mjs +31 -0
  58. package/fesm2022/cdek-it-angular-ui-kit-components-breadcrumb.mjs.map +1 -0
  59. package/fesm2022/cdek-it-angular-ui-kit-components-button.mjs +143 -0
  60. package/fesm2022/cdek-it-angular-ui-kit-components-button.mjs.map +1 -0
  61. package/fesm2022/cdek-it-angular-ui-kit-components-card.mjs +124 -0
  62. package/fesm2022/cdek-it-angular-ui-kit-components-card.mjs.map +1 -0
  63. package/fesm2022/cdek-it-angular-ui-kit-components-carousel.mjs +166 -0
  64. package/fesm2022/cdek-it-angular-ui-kit-components-carousel.mjs.map +1 -0
  65. package/fesm2022/cdek-it-angular-ui-kit-components-checkbox.mjs +179 -0
  66. package/fesm2022/cdek-it-angular-ui-kit-components-checkbox.mjs.map +1 -0
  67. package/fesm2022/cdek-it-angular-ui-kit-components-chip.mjs +56 -0
  68. package/fesm2022/cdek-it-angular-ui-kit-components-chip.mjs.map +1 -0
  69. package/fesm2022/cdek-it-angular-ui-kit-components-confirm-dialog.mjs +192 -0
  70. package/fesm2022/cdek-it-angular-ui-kit-components-confirm-dialog.mjs.map +1 -0
  71. package/fesm2022/cdek-it-angular-ui-kit-components-date-picker.mjs +640 -0
  72. package/fesm2022/cdek-it-angular-ui-kit-components-date-picker.mjs.map +1 -0
  73. package/fesm2022/cdek-it-angular-ui-kit-components-dialog.mjs +179 -0
  74. package/fesm2022/cdek-it-angular-ui-kit-components-dialog.mjs.map +1 -0
  75. package/fesm2022/cdek-it-angular-ui-kit-components-divider.mjs +42 -0
  76. package/fesm2022/cdek-it-angular-ui-kit-components-divider.mjs.map +1 -0
  77. package/fesm2022/cdek-it-angular-ui-kit-components-drawer.mjs +153 -0
  78. package/fesm2022/cdek-it-angular-ui-kit-components-drawer.mjs.map +1 -0
  79. package/fesm2022/cdek-it-angular-ui-kit-components-galleria.mjs +284 -0
  80. package/fesm2022/cdek-it-angular-ui-kit-components-galleria.mjs.map +1 -0
  81. package/fesm2022/cdek-it-angular-ui-kit-components-inputgroup.mjs +64 -0
  82. package/fesm2022/cdek-it-angular-ui-kit-components-inputgroup.mjs.map +1 -0
  83. package/fesm2022/cdek-it-angular-ui-kit-components-inputmask.mjs +164 -0
  84. package/fesm2022/cdek-it-angular-ui-kit-components-inputmask.mjs.map +1 -0
  85. package/fesm2022/cdek-it-angular-ui-kit-components-inputnumber.mjs +267 -0
  86. package/fesm2022/cdek-it-angular-ui-kit-components-inputnumber.mjs.map +1 -0
  87. package/fesm2022/cdek-it-angular-ui-kit-components-inputotp.mjs +148 -0
  88. package/fesm2022/cdek-it-angular-ui-kit-components-inputotp.mjs.map +1 -0
  89. package/fesm2022/cdek-it-angular-ui-kit-components-inputtext.mjs +187 -0
  90. package/fesm2022/cdek-it-angular-ui-kit-components-inputtext.mjs.map +1 -0
  91. package/fesm2022/cdek-it-angular-ui-kit-components-listbox.mjs +172 -0
  92. package/fesm2022/cdek-it-angular-ui-kit-components-listbox.mjs.map +1 -0
  93. package/fesm2022/cdek-it-angular-ui-kit-components-megamenu.mjs +160 -0
  94. package/fesm2022/cdek-it-angular-ui-kit-components-megamenu.mjs.map +1 -0
  95. package/fesm2022/cdek-it-angular-ui-kit-components-menu.mjs +114 -0
  96. package/fesm2022/cdek-it-angular-ui-kit-components-menu.mjs.map +1 -0
  97. package/fesm2022/cdek-it-angular-ui-kit-components-menubar.mjs +88 -0
  98. package/fesm2022/cdek-it-angular-ui-kit-components-menubar.mjs.map +1 -0
  99. package/fesm2022/cdek-it-angular-ui-kit-components-message.mjs +105 -0
  100. package/fesm2022/cdek-it-angular-ui-kit-components-message.mjs.map +1 -0
  101. package/fesm2022/cdek-it-angular-ui-kit-components-metergroup.mjs +69 -0
  102. package/fesm2022/cdek-it-angular-ui-kit-components-metergroup.mjs.map +1 -0
  103. package/fesm2022/cdek-it-angular-ui-kit-components-paginator.mjs +95 -0
  104. package/fesm2022/cdek-it-angular-ui-kit-components-paginator.mjs.map +1 -0
  105. package/fesm2022/cdek-it-angular-ui-kit-components-panelmenu.mjs +69 -0
  106. package/fesm2022/cdek-it-angular-ui-kit-components-panelmenu.mjs.map +1 -0
  107. package/fesm2022/cdek-it-angular-ui-kit-components-password.mjs +258 -0
  108. package/fesm2022/cdek-it-angular-ui-kit-components-password.mjs.map +1 -0
  109. package/fesm2022/cdek-it-angular-ui-kit-components-popover.mjs +48 -0
  110. package/fesm2022/cdek-it-angular-ui-kit-components-popover.mjs.map +1 -0
  111. package/fesm2022/cdek-it-angular-ui-kit-components-progressbar.mjs +34 -0
  112. package/fesm2022/cdek-it-angular-ui-kit-components-progressbar.mjs.map +1 -0
  113. package/fesm2022/cdek-it-angular-ui-kit-components-progressspinner.mjs +64 -0
  114. package/fesm2022/cdek-it-angular-ui-kit-components-progressspinner.mjs.map +1 -0
  115. package/fesm2022/cdek-it-angular-ui-kit-components-radiobutton.mjs +148 -0
  116. package/fesm2022/cdek-it-angular-ui-kit-components-radiobutton.mjs.map +1 -0
  117. package/fesm2022/cdek-it-angular-ui-kit-components-rating.mjs +105 -0
  118. package/fesm2022/cdek-it-angular-ui-kit-components-rating.mjs.map +1 -0
  119. package/fesm2022/cdek-it-angular-ui-kit-components-scroll-panel.mjs +42 -0
  120. package/fesm2022/cdek-it-angular-ui-kit-components-scroll-panel.mjs.map +1 -0
  121. package/fesm2022/cdek-it-angular-ui-kit-components-select.mjs +350 -0
  122. package/fesm2022/cdek-it-angular-ui-kit-components-select.mjs.map +1 -0
  123. package/fesm2022/cdek-it-angular-ui-kit-components-skeleton.mjs +62 -0
  124. package/fesm2022/cdek-it-angular-ui-kit-components-skeleton.mjs.map +1 -0
  125. package/fesm2022/cdek-it-angular-ui-kit-components-slider.mjs +124 -0
  126. package/fesm2022/cdek-it-angular-ui-kit-components-slider.mjs.map +1 -0
  127. package/fesm2022/cdek-it-angular-ui-kit-components-stepper.mjs +227 -0
  128. package/fesm2022/cdek-it-angular-ui-kit-components-stepper.mjs.map +1 -0
  129. package/fesm2022/cdek-it-angular-ui-kit-components-tabs.mjs +83 -0
  130. package/fesm2022/cdek-it-angular-ui-kit-components-tabs.mjs.map +1 -0
  131. package/fesm2022/cdek-it-angular-ui-kit-components-tag.mjs +46 -0
  132. package/fesm2022/cdek-it-angular-ui-kit-components-tag.mjs.map +1 -0
  133. package/fesm2022/cdek-it-angular-ui-kit-components-textarea.mjs +214 -0
  134. package/fesm2022/cdek-it-angular-ui-kit-components-textarea.mjs.map +1 -0
  135. package/fesm2022/cdek-it-angular-ui-kit-components-tieredmenu.mjs +70 -0
  136. package/fesm2022/cdek-it-angular-ui-kit-components-tieredmenu.mjs.map +1 -0
  137. package/fesm2022/cdek-it-angular-ui-kit-components-timeline.mjs +164 -0
  138. package/fesm2022/cdek-it-angular-ui-kit-components-timeline.mjs.map +1 -0
  139. package/fesm2022/cdek-it-angular-ui-kit-components-toast.mjs +106 -0
  140. package/fesm2022/cdek-it-angular-ui-kit-components-toast.mjs.map +1 -0
  141. package/fesm2022/cdek-it-angular-ui-kit-components-toggleswitch.mjs +93 -0
  142. package/fesm2022/cdek-it-angular-ui-kit-components-toggleswitch.mjs.map +1 -0
  143. package/fesm2022/cdek-it-angular-ui-kit-components-tooltip.mjs +60 -0
  144. package/fesm2022/cdek-it-angular-ui-kit-components-tooltip.mjs.map +1 -0
  145. package/fesm2022/cdek-it-angular-ui-kit-providers.mjs +8028 -0
  146. package/fesm2022/cdek-it-angular-ui-kit-providers.mjs.map +1 -0
  147. package/fesm2022/cdek-it-angular-ui-kit-shared.mjs +4 -0
  148. package/fesm2022/cdek-it-angular-ui-kit-shared.mjs.map +1 -0
  149. package/fesm2022/cdek-it-angular-ui-kit.mjs +6 -0
  150. package/fesm2022/cdek-it-angular-ui-kit.mjs.map +1 -0
  151. package/index.d.ts +2 -0
  152. package/package.json +227 -112
  153. package/providers/index.d.ts +5 -0
  154. package/shared/index.d.ts +49 -0
  155. package/LICENSE.md +0 -75
  156. package/README.md +0 -70
  157. package/dist-css/css/brand-dark-primary-theme.css/theme.css +0 -9924
  158. package/dist-css/css/brand-dark-primary-theme.min.css/theme.min.css +0 -2852
  159. package/dist-css/css/brand-dark-secondary-theme.css/theme.css +0 -9924
  160. package/dist-css/css/brand-dark-secondary-theme.min.css/theme.min.css +0 -2852
  161. package/dist-css/css/brand-light-primary-theme.css/theme.css +0 -10007
  162. package/dist-css/css/brand-light-primary-theme.min.css/theme.min.css +0 -2868
  163. package/dist-css/css/brand-light-secondary-theme.css/theme.css +0 -9924
  164. package/dist-css/css/brand-light-secondary-theme.min.css/theme.min.css +0 -2852
  165. package/dist-css/css/dark-primary-theme.css/theme.css +0 -9924
  166. package/dist-css/css/dark-primary-theme.min.css/theme.min.css +0 -2852
  167. package/dist-css/css/dark-secondary-theme.css/theme.css +0 -9924
  168. package/dist-css/css/dark-secondary-theme.min.css/theme.min.css +0 -2852
  169. package/dist-css/css/light-primary-theme.css/theme.css +0 -10007
  170. package/dist-css/css/light-primary-theme.min.css/theme.min.css +0 -2868
  171. package/dist-css/css/light-secondary-theme.css/theme.css +0 -9924
  172. package/dist-css/css/light-secondary-theme.min.css/theme.min.css +0 -2852
  173. package/dist-css/package.json +0 -15
@@ -0,0 +1,350 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, inject, Injector, EventEmitter, TemplateRef, forwardRef, Output, ContentChild, Input, Component } from '@angular/core';
3
+ import { NgClass, NgTemplateOutlet } from '@angular/common';
4
+ import * as i1 from '@angular/forms';
5
+ import { NgControl, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
6
+ import { Select } from 'primeng/select';
7
+ import { FloatLabel } from 'primeng/floatlabel';
8
+ import { PrimeTemplate } from 'primeng/api';
9
+
10
+ // export class ExtraAnimationEvent
11
+ class ExtraSelectOptionDirective {
12
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraSelectOptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
13
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: ExtraSelectOptionDirective, isStandalone: true, selector: "[extraSelectOption]", ngImport: i0 });
14
+ }
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraSelectOptionDirective, decorators: [{
16
+ type: Directive,
17
+ args: [{ selector: '[extraSelectOption]', standalone: true }]
18
+ }] });
19
+ class ExtraSelectSelectedItemDirective {
20
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraSelectSelectedItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
21
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: ExtraSelectSelectedItemDirective, isStandalone: true, selector: "[extraSelectSelectedItem]", ngImport: i0 });
22
+ }
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraSelectSelectedItemDirective, decorators: [{
24
+ type: Directive,
25
+ args: [{ selector: '[extraSelectSelectedItem]', standalone: true }]
26
+ }] });
27
+ class ExtraSelectOptionGroupDirective {
28
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraSelectOptionGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
29
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: ExtraSelectOptionGroupDirective, isStandalone: true, selector: "[extraSelectOptionGroup]", ngImport: i0 });
30
+ }
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraSelectOptionGroupDirective, decorators: [{
32
+ type: Directive,
33
+ args: [{ selector: '[extraSelectOptionGroup]', standalone: true }]
34
+ }] });
35
+ class ExtraSelectComponent {
36
+ _injector = inject(Injector);
37
+ _ngControl = null;
38
+ ngOnInit() {
39
+ this._ngControl = this._injector.get(NgControl, null, { self: true, optional: true });
40
+ }
41
+ options;
42
+ optionLabel;
43
+ optionValue;
44
+ optionDisabled;
45
+ optionGroupLabel;
46
+ optionGroupChildren = 'items';
47
+ group = false;
48
+ placeholder = '';
49
+ size = 'base';
50
+ filter = false;
51
+ showClear = false;
52
+ editable = false;
53
+ readonly = false;
54
+ loading = false;
55
+ inputId;
56
+ appendTo = 'body';
57
+ floatLabel = false;
58
+ label = '';
59
+ checkmark = true;
60
+ checkmarkIcon = 'ea5e';
61
+ emptyMessage = 'Нет данных';
62
+ emptyFilterMessage = 'Результаты не найдены';
63
+ optionTemplate = null;
64
+ selectedItemTemplate = null;
65
+ optionGroupTemplate = null;
66
+ disabled = false;
67
+ modelValue = null;
68
+ onClear = new EventEmitter();
69
+ onFilter = new EventEmitter();
70
+ onShow = new EventEmitter();
71
+ onHide = new EventEmitter();
72
+ onFocus = new EventEmitter();
73
+ onBlur = new EventEmitter();
74
+ get invalid() {
75
+ return !!(this._ngControl?.invalid && this._ngControl?.touched);
76
+ }
77
+ get primeSize() {
78
+ if (this.size === 'small')
79
+ return 'small';
80
+ if (this.size === 'large')
81
+ return 'large';
82
+ return undefined;
83
+ }
84
+ get panelStyle() {
85
+ const char = String.fromCodePoint(parseInt(this.checkmarkIcon, 16));
86
+ return { '--p-select-checkmark-content': `"${char}"` };
87
+ }
88
+ get selectClasses() {
89
+ return {
90
+ 'p-select-xlg': this.size === 'xlarge',
91
+ 'p-invalid': this.invalid
92
+ };
93
+ }
94
+ _onChange = () => { };
95
+ _onTouched = () => { };
96
+ onSelectChange(event) {
97
+ this.modelValue = event.value;
98
+ this._onChange(event.value);
99
+ }
100
+ handleBlur(event) {
101
+ this._onTouched();
102
+ this.onBlur.emit(event);
103
+ }
104
+ writeValue(value) {
105
+ this.modelValue = value ?? null;
106
+ }
107
+ registerOnChange(fn) {
108
+ this._onChange = fn;
109
+ }
110
+ registerOnTouched(fn) {
111
+ this._onTouched = fn;
112
+ }
113
+ setDisabledState(isDisabled) {
114
+ this.disabled = isDisabled;
115
+ }
116
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
117
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ExtraSelectComponent, isStandalone: true, selector: "extra-select", inputs: { options: "options", optionLabel: "optionLabel", optionValue: "optionValue", optionDisabled: "optionDisabled", optionGroupLabel: "optionGroupLabel", optionGroupChildren: "optionGroupChildren", group: "group", placeholder: "placeholder", size: "size", filter: "filter", showClear: "showClear", editable: "editable", readonly: "readonly", loading: "loading", inputId: "inputId", appendTo: "appendTo", floatLabel: "floatLabel", label: "label", checkmark: "checkmark", checkmarkIcon: "checkmarkIcon", emptyMessage: "emptyMessage", emptyFilterMessage: "emptyFilterMessage" }, outputs: { onClear: "onClear", onFilter: "onFilter", onShow: "onShow", onHide: "onHide", onFocus: "onFocus", onBlur: "onBlur" }, providers: [
118
+ {
119
+ provide: NG_VALUE_ACCESSOR,
120
+ useExisting: forwardRef(() => ExtraSelectComponent),
121
+ multi: true
122
+ }
123
+ ], queries: [{ propertyName: "optionTemplate", first: true, predicate: ExtraSelectOptionDirective, descendants: true, read: TemplateRef }, { propertyName: "selectedItemTemplate", first: true, predicate: ExtraSelectSelectedItemDirective, descendants: true, read: TemplateRef }, { propertyName: "optionGroupTemplate", first: true, predicate: ExtraSelectOptionGroupDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: `
124
+ @if (floatLabel) {
125
+ <p-floatlabel variant="in">
126
+ <ng-container *ngTemplateOutlet="selectTpl"></ng-container>
127
+ <label [attr.for]="inputId">{{ label }}</label>
128
+ </p-floatlabel>
129
+ } @else {
130
+ <ng-container *ngTemplateOutlet="selectTpl"></ng-container>
131
+ }
132
+
133
+ <ng-template #selectTpl>
134
+ <p-select
135
+ [ngClass]="selectClasses"
136
+ [ngModel]="modelValue"
137
+ [disabled]="disabled"
138
+ [options]="options"
139
+ [optionLabel]="optionLabel"
140
+ [optionValue]="optionValue"
141
+ [optionDisabled]="optionDisabled"
142
+ [optionGroupLabel]="optionGroupLabel"
143
+ [optionGroupChildren]="optionGroupChildren"
144
+ [group]="group"
145
+ [placeholder]="placeholder"
146
+ [filter]="filter"
147
+ [showClear]="showClear"
148
+ [editable]="editable"
149
+ [readonly]="readonly"
150
+ [loading]="loading"
151
+ [inputId]="inputId"
152
+ [appendTo]="appendTo"
153
+ [size]="primeSize"
154
+ [checkmark]="checkmark"
155
+ [panelStyle]="panelStyle"
156
+ [emptyMessage]="emptyMessage"
157
+ [emptyFilterMessage]="emptyFilterMessage"
158
+ (onChange)="onSelectChange($event)"
159
+ (onClear)="onClear.emit($event)"
160
+ (onFilter)="onFilter.emit($event)"
161
+ (onShow)="onShow.emit($event)"
162
+ (onHide)="onHide.emit($event)"
163
+ (onFocus)="onFocus.emit($event)"
164
+ (onBlur)="handleBlur($event)"
165
+ >
166
+ @if (optionTemplate) {
167
+ <ng-template pTemplate="item" let-option>
168
+ <ng-container
169
+ [ngTemplateOutlet]="optionTemplate"
170
+ [ngTemplateOutletContext]="{ $implicit: option }"
171
+ ></ng-container>
172
+ </ng-template>
173
+ }
174
+ @if (selectedItemTemplate) {
175
+ <ng-template pTemplate="selectedItem" let-option>
176
+ <ng-container
177
+ [ngTemplateOutlet]="selectedItemTemplate"
178
+ [ngTemplateOutletContext]="{ $implicit: option }"
179
+ ></ng-container>
180
+ </ng-template>
181
+ }
182
+ @if (optionGroupTemplate) {
183
+ <ng-template pTemplate="group" let-group>
184
+ <ng-container
185
+ [ngTemplateOutlet]="optionGroupTemplate"
186
+ [ngTemplateOutletContext]="{ $implicit: group }"
187
+ ></ng-container>
188
+ </ng-template>
189
+ }
190
+ </p-select>
191
+ </ng-template>
192
+ `, isInline: true, dependencies: [{ kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { 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: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }] });
193
+ }
194
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraSelectComponent, decorators: [{
195
+ type: Component,
196
+ args: [{
197
+ selector: 'extra-select',
198
+ standalone: true,
199
+ imports: [Select, NgClass, NgTemplateOutlet, PrimeTemplate, FormsModule, FloatLabel],
200
+ providers: [
201
+ {
202
+ provide: NG_VALUE_ACCESSOR,
203
+ useExisting: forwardRef(() => ExtraSelectComponent),
204
+ multi: true
205
+ }
206
+ ],
207
+ template: `
208
+ @if (floatLabel) {
209
+ <p-floatlabel variant="in">
210
+ <ng-container *ngTemplateOutlet="selectTpl"></ng-container>
211
+ <label [attr.for]="inputId">{{ label }}</label>
212
+ </p-floatlabel>
213
+ } @else {
214
+ <ng-container *ngTemplateOutlet="selectTpl"></ng-container>
215
+ }
216
+
217
+ <ng-template #selectTpl>
218
+ <p-select
219
+ [ngClass]="selectClasses"
220
+ [ngModel]="modelValue"
221
+ [disabled]="disabled"
222
+ [options]="options"
223
+ [optionLabel]="optionLabel"
224
+ [optionValue]="optionValue"
225
+ [optionDisabled]="optionDisabled"
226
+ [optionGroupLabel]="optionGroupLabel"
227
+ [optionGroupChildren]="optionGroupChildren"
228
+ [group]="group"
229
+ [placeholder]="placeholder"
230
+ [filter]="filter"
231
+ [showClear]="showClear"
232
+ [editable]="editable"
233
+ [readonly]="readonly"
234
+ [loading]="loading"
235
+ [inputId]="inputId"
236
+ [appendTo]="appendTo"
237
+ [size]="primeSize"
238
+ [checkmark]="checkmark"
239
+ [panelStyle]="panelStyle"
240
+ [emptyMessage]="emptyMessage"
241
+ [emptyFilterMessage]="emptyFilterMessage"
242
+ (onChange)="onSelectChange($event)"
243
+ (onClear)="onClear.emit($event)"
244
+ (onFilter)="onFilter.emit($event)"
245
+ (onShow)="onShow.emit($event)"
246
+ (onHide)="onHide.emit($event)"
247
+ (onFocus)="onFocus.emit($event)"
248
+ (onBlur)="handleBlur($event)"
249
+ >
250
+ @if (optionTemplate) {
251
+ <ng-template pTemplate="item" let-option>
252
+ <ng-container
253
+ [ngTemplateOutlet]="optionTemplate"
254
+ [ngTemplateOutletContext]="{ $implicit: option }"
255
+ ></ng-container>
256
+ </ng-template>
257
+ }
258
+ @if (selectedItemTemplate) {
259
+ <ng-template pTemplate="selectedItem" let-option>
260
+ <ng-container
261
+ [ngTemplateOutlet]="selectedItemTemplate"
262
+ [ngTemplateOutletContext]="{ $implicit: option }"
263
+ ></ng-container>
264
+ </ng-template>
265
+ }
266
+ @if (optionGroupTemplate) {
267
+ <ng-template pTemplate="group" let-group>
268
+ <ng-container
269
+ [ngTemplateOutlet]="optionGroupTemplate"
270
+ [ngTemplateOutletContext]="{ $implicit: group }"
271
+ ></ng-container>
272
+ </ng-template>
273
+ }
274
+ </p-select>
275
+ </ng-template>
276
+ `
277
+ }]
278
+ }], propDecorators: { options: [{
279
+ type: Input
280
+ }], optionLabel: [{
281
+ type: Input
282
+ }], optionValue: [{
283
+ type: Input
284
+ }], optionDisabled: [{
285
+ type: Input
286
+ }], optionGroupLabel: [{
287
+ type: Input
288
+ }], optionGroupChildren: [{
289
+ type: Input
290
+ }], group: [{
291
+ type: Input
292
+ }], placeholder: [{
293
+ type: Input
294
+ }], size: [{
295
+ type: Input
296
+ }], filter: [{
297
+ type: Input
298
+ }], showClear: [{
299
+ type: Input
300
+ }], editable: [{
301
+ type: Input
302
+ }], readonly: [{
303
+ type: Input
304
+ }], loading: [{
305
+ type: Input
306
+ }], inputId: [{
307
+ type: Input
308
+ }], appendTo: [{
309
+ type: Input
310
+ }], floatLabel: [{
311
+ type: Input
312
+ }], label: [{
313
+ type: Input
314
+ }], checkmark: [{
315
+ type: Input
316
+ }], checkmarkIcon: [{
317
+ type: Input
318
+ }], emptyMessage: [{
319
+ type: Input
320
+ }], emptyFilterMessage: [{
321
+ type: Input
322
+ }], optionTemplate: [{
323
+ type: ContentChild,
324
+ args: [ExtraSelectOptionDirective, { read: TemplateRef }]
325
+ }], selectedItemTemplate: [{
326
+ type: ContentChild,
327
+ args: [ExtraSelectSelectedItemDirective, { read: TemplateRef }]
328
+ }], optionGroupTemplate: [{
329
+ type: ContentChild,
330
+ args: [ExtraSelectOptionGroupDirective, { read: TemplateRef }]
331
+ }], onClear: [{
332
+ type: Output
333
+ }], onFilter: [{
334
+ type: Output
335
+ }], onShow: [{
336
+ type: Output
337
+ }], onHide: [{
338
+ type: Output
339
+ }], onFocus: [{
340
+ type: Output
341
+ }], onBlur: [{
342
+ type: Output
343
+ }] } });
344
+
345
+ /**
346
+ * Generated bundle index. Do not edit.
347
+ */
348
+
349
+ export { ExtraSelectComponent, ExtraSelectOptionDirective, ExtraSelectOptionGroupDirective, ExtraSelectSelectedItemDirective };
350
+ //# sourceMappingURL=cdek-it-angular-ui-kit-components-select.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdek-it-angular-ui-kit-components-select.mjs","sources":["../../src/lib/components/select/select.component.ts","../../src/lib/components/select/cdek-it-angular-ui-kit-components-select.ts"],"sourcesContent":["import {\n Component,\n ContentChild,\n Directive,\n EventEmitter,\n forwardRef,\n inject,\n Injector,\n Input,\n OnInit,\n Output,\n TemplateRef\n} from '@angular/core';\nimport { NgClass, NgTemplateOutlet } from '@angular/common';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';\nimport { Select } from 'primeng/select';\nimport { FloatLabel } from 'primeng/floatlabel';\nimport { PrimeTemplate } from 'primeng/api';\nimport { AnimationEvent as NativeAnimationEvent } from '@angular/animations';\nimport type { SelectChangeEvent, SelectFilterEvent } from 'primeng/types/select';\n\nexport type ExtraSelectSize = 'small' | 'base' | 'large' | 'xlarge';\nexport type ExtraSelectChangeEvent = SelectChangeEvent;\nexport type ExtraSelectFilterEvent = SelectFilterEvent;\n\nexport interface ExtraAnimationEvent extends NativeAnimationEvent {}\n\n// export class ExtraAnimationEvent\n\n@Directive({ selector: '[extraSelectOption]', standalone: true })\nexport class ExtraSelectOptionDirective {}\n\n@Directive({ selector: '[extraSelectSelectedItem]', standalone: true })\nexport class ExtraSelectSelectedItemDirective {}\n\n@Directive({ selector: '[extraSelectOptionGroup]', standalone: true })\nexport class ExtraSelectOptionGroupDirective {}\n\n@Component({\n selector: 'extra-select',\n standalone: true,\n imports: [Select, NgClass, NgTemplateOutlet, PrimeTemplate, FormsModule, FloatLabel],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ExtraSelectComponent),\n multi: true\n }\n ],\n template: `\n @if (floatLabel) {\n <p-floatlabel variant=\"in\">\n <ng-container *ngTemplateOutlet=\"selectTpl\"></ng-container>\n <label [attr.for]=\"inputId\">{{ label }}</label>\n </p-floatlabel>\n } @else {\n <ng-container *ngTemplateOutlet=\"selectTpl\"></ng-container>\n }\n\n <ng-template #selectTpl>\n <p-select\n [ngClass]=\"selectClasses\"\n [ngModel]=\"modelValue\"\n [disabled]=\"disabled\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [optionDisabled]=\"optionDisabled\"\n [optionGroupLabel]=\"optionGroupLabel\"\n [optionGroupChildren]=\"optionGroupChildren\"\n [group]=\"group\"\n [placeholder]=\"placeholder\"\n [filter]=\"filter\"\n [showClear]=\"showClear\"\n [editable]=\"editable\"\n [readonly]=\"readonly\"\n [loading]=\"loading\"\n [inputId]=\"inputId\"\n [appendTo]=\"appendTo\"\n [size]=\"primeSize\"\n [checkmark]=\"checkmark\"\n [panelStyle]=\"panelStyle\"\n [emptyMessage]=\"emptyMessage\"\n [emptyFilterMessage]=\"emptyFilterMessage\"\n (onChange)=\"onSelectChange($event)\"\n (onClear)=\"onClear.emit($event)\"\n (onFilter)=\"onFilter.emit($event)\"\n (onShow)=\"onShow.emit($event)\"\n (onHide)=\"onHide.emit($event)\"\n (onFocus)=\"onFocus.emit($event)\"\n (onBlur)=\"handleBlur($event)\"\n >\n @if (optionTemplate) {\n <ng-template pTemplate=\"item\" let-option>\n <ng-container\n [ngTemplateOutlet]=\"optionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: option }\"\n ></ng-container>\n </ng-template>\n }\n @if (selectedItemTemplate) {\n <ng-template pTemplate=\"selectedItem\" let-option>\n <ng-container\n [ngTemplateOutlet]=\"selectedItemTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: option }\"\n ></ng-container>\n </ng-template>\n }\n @if (optionGroupTemplate) {\n <ng-template pTemplate=\"group\" let-group>\n <ng-container\n [ngTemplateOutlet]=\"optionGroupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"\n ></ng-container>\n </ng-template>\n }\n </p-select>\n </ng-template>\n `\n})\nexport class ExtraSelectComponent implements ControlValueAccessor, OnInit {\n private readonly _injector = inject(Injector);\n private _ngControl: NgControl | null = null;\n\n ngOnInit(): void {\n this._ngControl = this._injector.get(NgControl, null, { self: true, optional: true });\n }\n\n @Input() options: any[] | null | undefined;\n @Input() optionLabel: string | undefined;\n @Input() optionValue: string | undefined;\n @Input() optionDisabled: string | undefined;\n @Input() optionGroupLabel: string | undefined;\n @Input() optionGroupChildren = 'items';\n @Input() group = false;\n @Input() placeholder = '';\n @Input() size: ExtraSelectSize = 'base';\n @Input() filter = false;\n @Input() showClear = false;\n @Input() editable = false;\n @Input() readonly = false;\n @Input() loading = false;\n @Input() inputId: string | undefined;\n @Input() appendTo: any = 'body';\n @Input() floatLabel = false;\n @Input() label = '';\n @Input() checkmark = true;\n @Input() checkmarkIcon = 'ea5e';\n @Input() emptyMessage = 'Нет данных';\n @Input() emptyFilterMessage = 'Результаты не найдены';\n @ContentChild(ExtraSelectOptionDirective, { read: TemplateRef }) optionTemplate: TemplateRef<any> | null = null;\n @ContentChild(ExtraSelectSelectedItemDirective, { read: TemplateRef }) selectedItemTemplate: TemplateRef<any> | null =\n null;\n @ContentChild(ExtraSelectOptionGroupDirective, { read: TemplateRef }) optionGroupTemplate: TemplateRef<any> | null =\n null;\n\n disabled = false;\n modelValue: any = null;\n\n @Output() onClear = new EventEmitter<Event>();\n @Output() onFilter = new EventEmitter<ExtraSelectFilterEvent>();\n @Output() onShow = new EventEmitter<ExtraAnimationEvent>();\n @Output() onHide = new EventEmitter<ExtraAnimationEvent>();\n @Output() onFocus = new EventEmitter<Event>();\n @Output() onBlur = new EventEmitter<Event>();\n\n get invalid(): boolean {\n return !!(this._ngControl?.invalid && this._ngControl?.touched);\n }\n\n get primeSize(): 'small' | 'large' | undefined {\n if (this.size === 'small') return 'small';\n if (this.size === 'large') return 'large';\n return undefined;\n }\n\n get panelStyle(): Record<string, string> {\n const char = String.fromCodePoint(parseInt(this.checkmarkIcon, 16));\n return { '--p-select-checkmark-content': `\"${char}\"` };\n }\n\n get selectClasses(): Record<string, boolean> {\n return {\n 'p-select-xlg': this.size === 'xlarge',\n 'p-invalid': this.invalid\n };\n }\n\n private _onChange: (value: any) => void = () => {};\n private _onTouched: () => void = () => {};\n\n onSelectChange(event: ExtraSelectChangeEvent): void {\n this.modelValue = event.value;\n this._onChange(event.value);\n }\n\n handleBlur(event: Event): void {\n this._onTouched();\n this.onBlur.emit(event);\n }\n\n writeValue(value: any): void {\n this.modelValue = value ?? null;\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 {\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Q,EAAE,cAAc;AACxB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC;AACpF,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;AACnD,4BAAA,KAAK,EAAE;AACR;AACF,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqET,EAAA;AACF,iBAAA;;sBASE;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,0BAA0B,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;;sBAC9D,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,gCAAgC,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;;sBAEpE,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,+BAA+B,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;;sBAMnE;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;;ACpKH;;AAEG;;;;"}
@@ -0,0 +1,62 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { Skeleton } from 'primeng/skeleton';
4
+
5
+ class ExtraSkeletonComponent {
6
+ shape = 'rectangle';
7
+ animation = 'wave';
8
+ width = '100%';
9
+ height = '1rem';
10
+ size = undefined;
11
+ borderRadius = undefined;
12
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
13
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: ExtraSkeletonComponent, isStandalone: true, selector: "extra-skeleton", inputs: { shape: "shape", animation: "animation", width: "width", height: "height", size: "size", borderRadius: "borderRadius" }, host: { styleAttribute: "display: block" }, ngImport: i0, template: `
14
+ <p-skeleton
15
+ [shape]="shape"
16
+ [animation]="animation"
17
+ [width]="width"
18
+ [height]="height"
19
+ [size]="size"
20
+ [borderRadius]="borderRadius"
21
+ ></p-skeleton>
22
+ `, isInline: true, dependencies: [{ kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
23
+ }
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraSkeletonComponent, decorators: [{
25
+ type: Component,
26
+ args: [{
27
+ selector: 'extra-skeleton',
28
+ host: { style: 'display: block' },
29
+ standalone: true,
30
+ changeDetection: ChangeDetectionStrategy.OnPush,
31
+ imports: [Skeleton],
32
+ template: `
33
+ <p-skeleton
34
+ [shape]="shape"
35
+ [animation]="animation"
36
+ [width]="width"
37
+ [height]="height"
38
+ [size]="size"
39
+ [borderRadius]="borderRadius"
40
+ ></p-skeleton>
41
+ `
42
+ }]
43
+ }], propDecorators: { shape: [{
44
+ type: Input
45
+ }], animation: [{
46
+ type: Input
47
+ }], width: [{
48
+ type: Input
49
+ }], height: [{
50
+ type: Input
51
+ }], size: [{
52
+ type: Input
53
+ }], borderRadius: [{
54
+ type: Input
55
+ }] } });
56
+
57
+ /**
58
+ * Generated bundle index. Do not edit.
59
+ */
60
+
61
+ export { ExtraSkeletonComponent };
62
+ //# sourceMappingURL=cdek-it-angular-ui-kit-components-skeleton.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdek-it-angular-ui-kit-components-skeleton.mjs","sources":["../../src/lib/components/skeleton/skeleton.component.ts","../../src/lib/components/skeleton/cdek-it-angular-ui-kit-components-skeleton.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { Skeleton } from 'primeng/skeleton';\n\nexport type ExtraSkeletonShape = 'rectangle' | 'circle';\nexport type ExtraSkeletonAnimation = 'wave' | 'none';\n\n@Component({\n selector: 'extra-skeleton',\n host: { style: 'display: block' },\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [Skeleton],\n template: `\n <p-skeleton\n [shape]=\"shape\"\n [animation]=\"animation\"\n [width]=\"width\"\n [height]=\"height\"\n [size]=\"size\"\n [borderRadius]=\"borderRadius\"\n ></p-skeleton>\n `\n})\nexport class ExtraSkeletonComponent {\n @Input() shape: ExtraSkeletonShape = 'rectangle';\n @Input() animation: ExtraSkeletonAnimation = 'wave';\n @Input() width = '100%';\n @Input() height = '1rem';\n @Input() size: string | undefined = undefined;\n @Input() borderRadius: string | undefined = undefined;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MAuBa,sBAAsB,CAAA;IACxB,KAAK,GAAuB,WAAW;IACvC,SAAS,GAA2B,MAAM;IAC1C,KAAK,GAAG,MAAM;IACd,MAAM,GAAG,MAAM;IACf,IAAI,GAAuB,SAAS;IACpC,YAAY,GAAuB,SAAS;wGAN1C,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,EAAA,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,SAAA,EAAA,WAAA,EAAA,KAAA,EAAA,OAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAXvB;;;;;;;;;AAST,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAVS,QAAQ,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,OAAA,EAAA,WAAA,EAAA,cAAA,EAAA,MAAA,EAAA,OAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAYP,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAjBlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE;AACjC,oBAAA,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,OAAO,EAAE,CAAC,QAAQ,CAAC;AACnB,oBAAA,QAAQ,EAAE;;;;;;;;;AAST,EAAA;AACF,iBAAA;;sBAEE;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;;AC7BH;;AAEG;;;;"}
@@ -0,0 +1,124 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, forwardRef, Output, Input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { FormControl, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
5
+ import { Slider } from 'primeng/slider';
6
+
7
+ class ExtraSliderComponent {
8
+ min = 0;
9
+ max = 100;
10
+ step = undefined;
11
+ range = false;
12
+ orientation = 'horizontal';
13
+ set disabled(value) {
14
+ value ? this.control.disable() : this.control.enable();
15
+ }
16
+ onSlideEnd = new EventEmitter();
17
+ control = new FormControl(0, { nonNullable: true });
18
+ _onChange = () => { };
19
+ _onTouched = () => { };
20
+ _sub;
21
+ constructor() {
22
+ this._sub = this.control.valueChanges.subscribe((v) => this._onChange(v));
23
+ }
24
+ ngOnChanges(changes) {
25
+ if (changes['range']) {
26
+ const current = this.control.value;
27
+ if (this.range && !Array.isArray(current)) {
28
+ this.control.setValue([this.min, this.max], { emitEvent: false });
29
+ }
30
+ else if (!this.range && Array.isArray(current)) {
31
+ this.control.setValue(current[0], { emitEvent: false });
32
+ }
33
+ }
34
+ }
35
+ ngOnDestroy() {
36
+ this._sub.unsubscribe();
37
+ }
38
+ writeValue(value) {
39
+ this.control.setValue(this.normalize(value ?? 0), { emitEvent: false });
40
+ }
41
+ registerOnChange(fn) {
42
+ this._onChange = fn;
43
+ }
44
+ registerOnTouched(fn) {
45
+ this._onTouched = fn;
46
+ }
47
+ setDisabledState(isDisabled) {
48
+ isDisabled ? this.control.disable() : this.control.enable();
49
+ }
50
+ normalize(value) {
51
+ if (this.range && !Array.isArray(value))
52
+ return [this.min, this.max];
53
+ if (!this.range && Array.isArray(value))
54
+ return value[0];
55
+ return value;
56
+ }
57
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
58
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: ExtraSliderComponent, isStandalone: true, selector: "extra-slider", inputs: { min: "min", max: "max", step: "step", range: "range", orientation: "orientation", disabled: "disabled" }, outputs: { onSlideEnd: "onSlideEnd" }, host: { styleAttribute: "display: block" }, providers: [
59
+ {
60
+ provide: NG_VALUE_ACCESSOR,
61
+ useExisting: forwardRef(() => ExtraSliderComponent),
62
+ multi: true
63
+ }
64
+ ], usesOnChanges: true, ngImport: i0, template: `
65
+ <p-slider
66
+ [formControl]="control"
67
+ [min]="min"
68
+ [max]="max"
69
+ [step]="step"
70
+ [range]="range"
71
+ [orientation]="orientation"
72
+ (onSlideEnd)="onSlideEnd.emit($event)"
73
+ ></p-slider>
74
+ `, isInline: true, dependencies: [{ kind: "component", type: Slider, selector: "p-slider", inputs: ["animate", "min", "max", "orientation", "step", "range", "styleClass", "ariaLabel", "ariaLabelledBy", "tabindex", "autofocus"], outputs: ["onChange", "onSlideEnd"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
75
+ }
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraSliderComponent, decorators: [{
77
+ type: Component,
78
+ args: [{
79
+ selector: 'extra-slider',
80
+ host: { style: 'display: block' },
81
+ standalone: true,
82
+ changeDetection: ChangeDetectionStrategy.OnPush,
83
+ imports: [Slider, ReactiveFormsModule],
84
+ providers: [
85
+ {
86
+ provide: NG_VALUE_ACCESSOR,
87
+ useExisting: forwardRef(() => ExtraSliderComponent),
88
+ multi: true
89
+ }
90
+ ],
91
+ template: `
92
+ <p-slider
93
+ [formControl]="control"
94
+ [min]="min"
95
+ [max]="max"
96
+ [step]="step"
97
+ [range]="range"
98
+ [orientation]="orientation"
99
+ (onSlideEnd)="onSlideEnd.emit($event)"
100
+ ></p-slider>
101
+ `
102
+ }]
103
+ }], ctorParameters: () => [], propDecorators: { min: [{
104
+ type: Input
105
+ }], max: [{
106
+ type: Input
107
+ }], step: [{
108
+ type: Input
109
+ }], range: [{
110
+ type: Input
111
+ }], orientation: [{
112
+ type: Input
113
+ }], disabled: [{
114
+ type: Input
115
+ }], onSlideEnd: [{
116
+ type: Output
117
+ }] } });
118
+
119
+ /**
120
+ * Generated bundle index. Do not edit.
121
+ */
122
+
123
+ export { ExtraSliderComponent };
124
+ //# sourceMappingURL=cdek-it-angular-ui-kit-components-slider.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdek-it-angular-ui-kit-components-slider.mjs","sources":["../../src/lib/components/slider/slider.component.ts","../../src/lib/components/slider/cdek-it-angular-ui-kit-components-slider.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n forwardRef,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges\n} from '@angular/core';\nimport { ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';\nimport type { SliderSlideEndEvent } from 'primeng/slider';\nimport { Slider } from 'primeng/slider';\nimport { Subscription } from 'rxjs';\n\nexport type ExtraSliderOrientation = 'horizontal' | 'vertical';\nexport type ExtraSliderSlideEndEvent = SliderSlideEndEvent;\n\n@Component({\n selector: 'extra-slider',\n host: { style: 'display: block' },\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [Slider, ReactiveFormsModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ExtraSliderComponent),\n multi: true\n }\n ],\n template: `\n <p-slider\n [formControl]=\"control\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [range]=\"range\"\n [orientation]=\"orientation\"\n (onSlideEnd)=\"onSlideEnd.emit($event)\"\n ></p-slider>\n `\n})\nexport class ExtraSliderComponent implements ControlValueAccessor, OnChanges, OnDestroy {\n @Input() min = 0;\n @Input() max = 100;\n @Input() step: number | undefined = undefined;\n @Input() range = false;\n @Input() orientation: ExtraSliderOrientation = 'horizontal';\n @Input() set disabled(value: boolean) {\n value ? this.control.disable() : this.control.enable();\n }\n @Output() onSlideEnd = new EventEmitter<ExtraSliderSlideEndEvent>();\n\n readonly control = new FormControl<number | number[]>(0, { nonNullable: true });\n\n private _onChange: (value: number | number[]) => void = () => {};\n private _onTouched: () => void = () => {};\n private readonly _sub: Subscription;\n\n constructor() {\n this._sub = this.control.valueChanges.subscribe((v) => this._onChange(v));\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['range']) {\n const current = this.control.value;\n if (this.range && !Array.isArray(current)) {\n this.control.setValue([this.min, this.max], { emitEvent: false });\n } else if (!this.range && Array.isArray(current)) {\n this.control.setValue(current[0], { emitEvent: false });\n }\n }\n }\n\n ngOnDestroy(): void {\n this._sub.unsubscribe();\n }\n\n writeValue(value: number | number[]): void {\n this.control.setValue(this.normalize(value ?? 0), { emitEvent: false });\n }\n\n registerOnChange(fn: (value: number | number[]) => 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 isDisabled ? this.control.disable() : this.control.enable();\n }\n\n private normalize(value: number | number[]): number | number[] {\n if (this.range && !Array.isArray(value)) return [this.min, this.max];\n if (!this.range && Array.isArray(value)) return value[0];\n return value;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MA4Ca,oBAAoB,CAAA;IACtB,GAAG,GAAG,CAAC;IACP,GAAG,GAAG,GAAG;IACT,IAAI,GAAuB,SAAS;IACpC,KAAK,GAAG,KAAK;IACb,WAAW,GAA2B,YAAY;IAC3D,IAAa,QAAQ,CAAC,KAAc,EAAA;AAClC,QAAA,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;IACxD;AACU,IAAA,UAAU,GAAG,IAAI,YAAY,EAA4B;AAE1D,IAAA,OAAO,GAAG,IAAI,WAAW,CAAoB,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AAEvE,IAAA,SAAS,GAAuC,MA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