@cdek-it/angular-ui-kit 0.2.4-test → 0.2.7-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 +118 -2
- package/shared/index.d.ts +49 -0
- package/tailwind/theme.css +461 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Input, Component, Injectable, makeEnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { Toast } from 'primeng/toast';
|
|
4
|
+
import * as i1 from 'primeng/api';
|
|
5
|
+
import { SharedModule, MessageService } from 'primeng/api';
|
|
6
|
+
|
|
7
|
+
const SEVERITY_ICONS = {
|
|
8
|
+
info: 'ti ti-info-circle',
|
|
9
|
+
success: 'ti ti-circle-check',
|
|
10
|
+
warn: 'ti ti-alert-triangle',
|
|
11
|
+
error: 'ti ti-alert-circle'
|
|
12
|
+
};
|
|
13
|
+
class ExtraToastComponent {
|
|
14
|
+
position = 'top-right';
|
|
15
|
+
key = undefined;
|
|
16
|
+
life = 5000;
|
|
17
|
+
pt = undefined;
|
|
18
|
+
resolveIcon(message) {
|
|
19
|
+
return message.icon ?? SEVERITY_ICONS[message.severity ?? 'info'] ?? 'ti ti-info-circle';
|
|
20
|
+
}
|
|
21
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ExtraToastComponent, isStandalone: true, selector: "extra-toast", inputs: { position: "position", key: "key", life: "life", pt: "pt" }, ngImport: i0, template: `
|
|
23
|
+
<p-toast [position]="position" [key]="key" [life]="life" [pt]="pt">
|
|
24
|
+
<ng-template #message let-message>
|
|
25
|
+
<div class="p-toast-accent-line"></div>
|
|
26
|
+
<i [class]="resolveIcon(message) + ' p-toast-message-icon'"></i>
|
|
27
|
+
<div class="p-toast-message-text">
|
|
28
|
+
<span class="p-toast-summary">{{ message.summary }}</span>
|
|
29
|
+
@if (message.detail) {
|
|
30
|
+
<div class="p-toast-detail">{{ message.detail }}</div>
|
|
31
|
+
}
|
|
32
|
+
</div>
|
|
33
|
+
</ng-template>
|
|
34
|
+
</p-toast>
|
|
35
|
+
`, isInline: true, dependencies: [{ kind: "component", type: Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "ngmodule", type: SharedModule }] });
|
|
36
|
+
}
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraToastComponent, decorators: [{
|
|
38
|
+
type: Component,
|
|
39
|
+
args: [{
|
|
40
|
+
selector: 'extra-toast',
|
|
41
|
+
standalone: true,
|
|
42
|
+
imports: [Toast, SharedModule],
|
|
43
|
+
template: `
|
|
44
|
+
<p-toast [position]="position" [key]="key" [life]="life" [pt]="pt">
|
|
45
|
+
<ng-template #message let-message>
|
|
46
|
+
<div class="p-toast-accent-line"></div>
|
|
47
|
+
<i [class]="resolveIcon(message) + ' p-toast-message-icon'"></i>
|
|
48
|
+
<div class="p-toast-message-text">
|
|
49
|
+
<span class="p-toast-summary">{{ message.summary }}</span>
|
|
50
|
+
@if (message.detail) {
|
|
51
|
+
<div class="p-toast-detail">{{ message.detail }}</div>
|
|
52
|
+
}
|
|
53
|
+
</div>
|
|
54
|
+
</ng-template>
|
|
55
|
+
</p-toast>
|
|
56
|
+
`
|
|
57
|
+
}]
|
|
58
|
+
}], propDecorators: { position: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], key: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], life: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], pt: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}] } });
|
|
67
|
+
|
|
68
|
+
class ExtraToastService {
|
|
69
|
+
messageService;
|
|
70
|
+
constructor(messageService) {
|
|
71
|
+
this.messageService = messageService;
|
|
72
|
+
}
|
|
73
|
+
add(message) {
|
|
74
|
+
this.messageService.add(message);
|
|
75
|
+
}
|
|
76
|
+
clear(key) {
|
|
77
|
+
this.messageService.clear(key);
|
|
78
|
+
}
|
|
79
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraToastService, deps: [{ token: i1.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
80
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraToastService, providedIn: 'root' });
|
|
81
|
+
}
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraToastService, decorators: [{
|
|
83
|
+
type: Injectable,
|
|
84
|
+
args: [{ providedIn: 'root' }]
|
|
85
|
+
}], ctorParameters: () => [{ type: i1.MessageService }] });
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Регистрирует зависимости, необходимые для работы `ExtraToastService` и `<extra-toast>`.
|
|
89
|
+
* Вызывать один раз в `ApplicationConfig.providers` или в `bootstrapApplication`.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* // app.config.ts
|
|
93
|
+
* export const appConfig: ApplicationConfig = {
|
|
94
|
+
* providers: [provideExtraToast()],
|
|
95
|
+
* };
|
|
96
|
+
*/
|
|
97
|
+
function provideExtraToast() {
|
|
98
|
+
return makeEnvironmentProviders([MessageService]);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Generated bundle index. Do not edit.
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
export { ExtraToastComponent, ExtraToastService, provideExtraToast };
|
|
106
|
+
//# sourceMappingURL=cdek-it-angular-ui-kit-components-toast.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cdek-it-angular-ui-kit-components-toast.mjs","sources":["../../src/lib/components/toast/toast.component.ts","../../src/lib/components/toast/toast.service.ts","../../src/lib/components/toast/provide-toast.ts","../../src/lib/components/toast/cdek-it-angular-ui-kit-components-toast.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\nimport { Toast } from 'primeng/toast';\nimport { SharedModule } from 'primeng/api';\n\nexport type ExtraToastSeverity = 'success' | 'info' | 'warn' | 'error' | 'secondary' | 'contrast';\nexport type ExtraToastPosition =\n | 'top-right'\n | 'top-left'\n | 'top-center'\n | 'bottom-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'center';\n\nconst SEVERITY_ICONS: Record<string, string> = {\n info: 'ti ti-info-circle',\n success: 'ti ti-circle-check',\n warn: 'ti ti-alert-triangle',\n error: 'ti ti-alert-circle'\n};\n\n@Component({\n selector: 'extra-toast',\n standalone: true,\n imports: [Toast, SharedModule],\n template: `\n <p-toast [position]=\"position\" [key]=\"key\" [life]=\"life\" [pt]=\"pt\">\n <ng-template #message let-message>\n <div class=\"p-toast-accent-line\"></div>\n <i [class]=\"resolveIcon(message) + ' p-toast-message-icon'\"></i>\n <div class=\"p-toast-message-text\">\n <span class=\"p-toast-summary\">{{ message.summary }}</span>\n @if (message.detail) {\n <div class=\"p-toast-detail\">{{ message.detail }}</div>\n }\n </div>\n </ng-template>\n </p-toast>\n `\n})\nexport class ExtraToastComponent {\n @Input() position: ExtraToastPosition = 'top-right';\n @Input() key: string | undefined = undefined;\n @Input() life = 5000;\n @Input() pt: Record<string, any> | undefined = undefined;\n\n resolveIcon(message: { severity?: string; icon?: string }): string {\n return message.icon ?? SEVERITY_ICONS[message.severity ?? 'info'] ?? 'ti ti-info-circle';\n }\n}\n","import { Injectable } from '@angular/core';\nimport { MessageService } from 'primeng/api';\nimport { ExtraToastSeverity } from './toast.component';\n\nexport interface ExtraToastMessage {\n key?: string;\n severity?: ExtraToastSeverity;\n summary?: string;\n detail?: string;\n life?: number;\n icon?: string;\n closable?: boolean;\n data?: unknown;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ExtraToastService {\n constructor(private readonly messageService: MessageService) {}\n\n add(message: ExtraToastMessage): void {\n this.messageService.add(message);\n }\n\n clear(key?: string): void {\n this.messageService.clear(key);\n }\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { MessageService } from 'primeng/api';\n\n/**\n * Регистрирует зависимости, необходимые для работы `ExtraToastService` и `<extra-toast>`.\n * Вызывать один раз в `ApplicationConfig.providers` или в `bootstrapApplication`.\n *\n * @example\n * // app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [provideExtraToast()],\n * };\n */\nexport function provideExtraToast(): EnvironmentProviders {\n return makeEnvironmentProviders([MessageService]);\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAcA,MAAM,cAAc,GAA2B;AAC7C,IAAA,IAAI,EAAE,mBAAmB;AACzB,IAAA,OAAO,EAAE,oBAAoB;AAC7B,IAAA,IAAI,EAAE,sBAAsB;AAC5B,IAAA,KAAK,EAAE;CACR;MAqBY,mBAAmB,CAAA;IACrB,QAAQ,GAAuB,WAAW;IAC1C,GAAG,GAAuB,SAAS;IACnC,IAAI,GAAG,IAAI;IACX,EAAE,GAAoC,SAAS;AAExD,IAAA,WAAW,CAAC,OAA6C,EAAA;AACvD,QAAA,OAAO,OAAO,CAAC,IAAI,IAAI,cAAc,CAAC,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,mBAAmB;IAC1F;wGARW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,GAAA,EAAA,KAAA,EAAA,I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AA,EAAA,CAAA;kBAD7B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACZlC;;;;;;;;;AASG;SACa,iBAAiB,GAAA;AAC/B,IAAA,OAAO,wBAAwB,CAAC,CAAC,cAAc,CAAC,CAAC;AACnD;;ACfA;;AAEG;;;;"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Output, Optional, Self, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { FormsModule } from '@angular/forms';
|
|
5
|
+
import { ToggleSwitch } from 'primeng/toggleswitch';
|
|
6
|
+
|
|
7
|
+
class ExtraToggleSwitchComponent {
|
|
8
|
+
ngControl;
|
|
9
|
+
onChange = new EventEmitter();
|
|
10
|
+
onFocus = new EventEmitter();
|
|
11
|
+
onBlur = new EventEmitter();
|
|
12
|
+
modelValue = false;
|
|
13
|
+
_disabled = false;
|
|
14
|
+
_onChange = () => { };
|
|
15
|
+
_onTouched = () => { };
|
|
16
|
+
constructor(ngControl) {
|
|
17
|
+
this.ngControl = ngControl;
|
|
18
|
+
if (ngControl) {
|
|
19
|
+
ngControl.valueAccessor = this;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
get isDisabled() {
|
|
23
|
+
return this._disabled;
|
|
24
|
+
}
|
|
25
|
+
get isInvalid() {
|
|
26
|
+
return !!this.ngControl?.invalid;
|
|
27
|
+
}
|
|
28
|
+
handleChange(value) {
|
|
29
|
+
this.modelValue = value;
|
|
30
|
+
this._onChange(value);
|
|
31
|
+
this._onTouched();
|
|
32
|
+
}
|
|
33
|
+
writeValue(value) {
|
|
34
|
+
this.modelValue = value ?? false;
|
|
35
|
+
}
|
|
36
|
+
registerOnChange(fn) {
|
|
37
|
+
this._onChange = fn;
|
|
38
|
+
}
|
|
39
|
+
registerOnTouched(fn) {
|
|
40
|
+
this._onTouched = fn;
|
|
41
|
+
}
|
|
42
|
+
setDisabledState(isDisabled) {
|
|
43
|
+
this._disabled = isDisabled;
|
|
44
|
+
}
|
|
45
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraToggleSwitchComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: ExtraToggleSwitchComponent, isStandalone: true, selector: "extra-toggleswitch", outputs: { onChange: "onChange", onFocus: "onFocus", onBlur: "onBlur" }, ngImport: i0, template: `
|
|
47
|
+
<p-toggleswitch
|
|
48
|
+
[ngModel]="modelValue"
|
|
49
|
+
(ngModelChange)="handleChange($event)"
|
|
50
|
+
[invalid]="isInvalid"
|
|
51
|
+
[disabled]="isDisabled"
|
|
52
|
+
(onChange)="onChange.emit($event)"
|
|
53
|
+
(onFocus)="onFocus.emit($event)"
|
|
54
|
+
(onBlur)="onBlur.emit($event)"
|
|
55
|
+
></p-toggleswitch>
|
|
56
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { 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"] }] });
|
|
57
|
+
}
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExtraToggleSwitchComponent, decorators: [{
|
|
59
|
+
type: Component,
|
|
60
|
+
args: [{
|
|
61
|
+
selector: 'extra-toggleswitch',
|
|
62
|
+
standalone: true,
|
|
63
|
+
imports: [ToggleSwitch, FormsModule],
|
|
64
|
+
template: `
|
|
65
|
+
<p-toggleswitch
|
|
66
|
+
[ngModel]="modelValue"
|
|
67
|
+
(ngModelChange)="handleChange($event)"
|
|
68
|
+
[invalid]="isInvalid"
|
|
69
|
+
[disabled]="isDisabled"
|
|
70
|
+
(onChange)="onChange.emit($event)"
|
|
71
|
+
(onFocus)="onFocus.emit($event)"
|
|
72
|
+
(onBlur)="onBlur.emit($event)"
|
|
73
|
+
></p-toggleswitch>
|
|
74
|
+
`
|
|
75
|
+
}]
|
|
76
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
77
|
+
type: Optional
|
|
78
|
+
}, {
|
|
79
|
+
type: Self
|
|
80
|
+
}] }], propDecorators: { onChange: [{
|
|
81
|
+
type: Output
|
|
82
|
+
}], onFocus: [{
|
|
83
|
+
type: Output
|
|
84
|
+
}], onBlur: [{
|
|
85
|
+
type: Output
|
|
86
|
+
}] } });
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Generated bundle index. Do not edit.
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
export { ExtraToggleSwitchComponent };
|
|
93
|
+
//# sourceMappingURL=cdek-it-angular-ui-kit-components-toggleswitch.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cdek-it-angular-ui-kit-components-toggleswitch.mjs","sources":["../../src/lib/components/toggleswitch/toggleswitch.component.ts","../../src/lib/components/toggleswitch/cdek-it-angular-ui-kit-components-toggleswitch.ts"],"sourcesContent":["import { Component, EventEmitter, Optional, Output, Self } from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NgControl } from '@angular/forms';\nimport { ToggleSwitch } from 'primeng/toggleswitch';\n\n@Component({\n selector: 'extra-toggleswitch',\n standalone: true,\n imports: [ToggleSwitch, FormsModule],\n template: `\n <p-toggleswitch\n [ngModel]=\"modelValue\"\n (ngModelChange)=\"handleChange($event)\"\n [invalid]=\"isInvalid\"\n [disabled]=\"isDisabled\"\n (onChange)=\"onChange.emit($event)\"\n (onFocus)=\"onFocus.emit($event)\"\n (onBlur)=\"onBlur.emit($event)\"\n ></p-toggleswitch>\n `\n})\nexport class ExtraToggleSwitchComponent implements ControlValueAccessor {\n @Output() onChange = new EventEmitter<unknown>();\n @Output() onFocus = new EventEmitter<Event>();\n @Output() onBlur = new EventEmitter<Event>();\n\n modelValue = false;\n\n private _disabled = false;\n\n private _onChange: (value: boolean) => void = () => {};\n private _onTouched: () => void = () => {};\n\n constructor(@Optional() @Self() private ngControl: NgControl) {\n if (ngControl) {\n ngControl.valueAccessor = this;\n }\n }\n\n get isDisabled(): boolean {\n return this._disabled;\n }\n\n get isInvalid(): boolean {\n return !!this.ngControl?.invalid;\n }\n\n handleChange(value: boolean): void {\n this.modelValue = value;\n this._onChange(value);\n this._onTouched();\n }\n\n writeValue(value: boolean): void {\n this.modelValue = value ?? false;\n }\n\n registerOnChange(fn: (value: boolean) => 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\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MAoBa,0BAA0B,CAAA;AAYG,IAAA,SAAA;AAX9B,IAAA,QAAQ,GAAG,IAAI,YAAY,EAAW;AACtC,IAAA,OAAO,GAAG,IAAI,YAAY,EAAS;AACnC,IAAA,MAAM,GAAG,IAAI,YAAY,EAAS;IAE5C,UAAU,GAAG,KAAK;IAEV,SAAS,GAAG,KAAK;AAEjB,IAAA,SAAS,GAA6B,MAAK,EAAE,CAAC;AAC9C,IAAA,UAAU,GAAe,MAAK,EAAE,CAAC;AAEzC,IAAA,WAAA,CAAwC,SAAoB,EAAA;QAApB,IAAA,CAAA,SAAS,GAAT,SAAS;QAC/C,IAAI,SAAS,EAAE;AACb,YAAA,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AAA,EAZ3B;;;;;;;;;;GAUT,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAXS,YAAY,4PAAE,WAAW,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAaxB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAhBtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;AACpC,oBAAA,QAAQ,EAAE;;;;;;;;;;AAUT,EAAA;AACF,iBAAA;;0BAac;;0BAAY;;sBAXxB;;sBACA;;sBACA;;;ACvBH;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdek-it-angular-ui-kit-components-tooltip.mjs","sources":["../../src/lib/components/tooltip/tooltip.directive.ts","../../src/lib/components/tooltip/cdek-it-angular-ui-kit-components-tooltip.ts"],"sourcesContent":["import { Directive, Input } from '@angular/core';\nimport { Tooltip } from 'primeng/tooltip';\n\nexport type
|
|
1
|
+
{"version":3,"file":"cdek-it-angular-ui-kit-components-tooltip.mjs","sources":["../../src/lib/components/tooltip/tooltip.directive.ts","../../src/lib/components/tooltip/cdek-it-angular-ui-kit-components-tooltip.ts"],"sourcesContent":["import { Directive, Input } from '@angular/core';\nimport { Tooltip } from 'primeng/tooltip';\n\nexport type ExtraTooltipPosition = 'right' | 'left' | 'top' | 'bottom';\nexport type ExtraTooltipEvent = 'hover' | 'focus' | 'both';\n\n@Directive({\n selector: '[extra-tooltip]',\n standalone: true,\n hostDirectives: [\n {\n directive: Tooltip,\n inputs: [\n 'pTooltip: tooltip',\n 'tooltipPosition: position',\n 'tooltipEvent: event',\n 'showDelay: showDelay',\n 'hideDelay: hideDelay',\n 'tooltipDisabled: disabled',\n 'escape: escape',\n 'autoHide: autoHide',\n 'fitContent: fitContent',\n 'hideOnEscape: hideOnEscape',\n 'positionTop: positionTop',\n 'positionLeft: positionLeft'\n ]\n }\n ]\n})\nexport class ExtraTooltipDirective {\n @Input() tooltip: string | undefined;\n @Input() position: ExtraTooltipPosition = 'right';\n @Input() event: ExtraTooltipEvent = 'hover';\n @Input() showDelay: number | undefined;\n @Input() hideDelay: number | undefined;\n @Input() disabled: boolean = false;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;MA6Ba,qBAAqB,CAAA;AACvB,IAAA,OAAO;IACP,QAAQ,GAAyB,OAAO;IACxC,KAAK,GAAsB,OAAO;AAClC,IAAA,SAAS;AACT,IAAA,SAAS;IACT,QAAQ,GAAY,KAAK;wGANvB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,UAAA,EAAA,KAAA,EAAA,OAAA,EAAA,SAAA,EAAA,WAAA,EAAA,SAAA,EAAA,WAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,CAAA,UA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