@4byte/shared-lib 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/4byte-shared-lib.mjs +1176 -0
- package/fesm2022/4byte-shared-lib.mjs.map +1 -0
- package/package.json +15 -27
- package/types/4byte-shared-lib.d.ts +343 -0
- package/.editorconfig +0 -17
- package/.prettierrc +0 -12
- package/.vscode/extensions.json +0 -4
- package/.vscode/launch.json +0 -20
- package/.vscode/mcp.json +0 -9
- package/.vscode/tasks.json +0 -42
- package/angular.json +0 -211
- package/ng-package.json +0 -11
- package/projects/storybook-host/.storybook/main.ts +0 -20
- package/projects/storybook-host/.storybook/preview.ts +0 -74
- package/projects/storybook-host/.storybook/tsconfig.doc.json +0 -10
- package/projects/storybook-host/.storybook/tsconfig.json +0 -22
- package/projects/storybook-host/.storybook/tutorial/Installation.mdx +0 -6
- package/projects/storybook-host/.storybook/tutorial/Introduction.mdx +0 -18
- package/projects/storybook-host/.storybook/tutorial/Theming.mdx +0 -14
- package/projects/storybook-host/.storybook/typings.d.ts +0 -4
- package/projects/storybook-host/documentation.json +0 -605
- package/projects/storybook-host/public/favicon.ico +0 -0
- package/projects/storybook-host/src/app/app.config.ts +0 -8
- package/projects/storybook-host/src/app/app.css +0 -0
- package/projects/storybook-host/src/app/app.html +0 -343
- package/projects/storybook-host/src/app/app.ts +0 -11
- package/projects/storybook-host/src/index.html +0 -13
- package/projects/storybook-host/src/main.ts +0 -6
- package/projects/storybook-host/src/stories/assets/accessibility.png +0 -0
- package/projects/storybook-host/src/stories/assets/accessibility.svg +0 -1
- package/projects/storybook-host/src/stories/assets/addon-library.png +0 -0
- package/projects/storybook-host/src/stories/assets/assets.png +0 -0
- package/projects/storybook-host/src/stories/assets/avif-test-image.avif +0 -0
- package/projects/storybook-host/src/stories/assets/context.png +0 -0
- package/projects/storybook-host/src/stories/assets/discord.svg +0 -1
- package/projects/storybook-host/src/stories/assets/docs.png +0 -0
- package/projects/storybook-host/src/stories/assets/figma-plugin.png +0 -0
- package/projects/storybook-host/src/stories/assets/github.svg +0 -1
- package/projects/storybook-host/src/stories/assets/share.png +0 -0
- package/projects/storybook-host/src/stories/assets/styling.png +0 -0
- package/projects/storybook-host/src/stories/assets/testing.png +0 -0
- package/projects/storybook-host/src/stories/assets/theming.png +0 -0
- package/projects/storybook-host/src/stories/assets/tutorials.svg +0 -1
- package/projects/storybook-host/src/stories/assets/youtube.svg +0 -1
- package/projects/storybook-host/src/stories/button.component.ts +0 -50
- package/projects/storybook-host/src/stories/button.css +0 -30
- package/projects/storybook-host/src/stories/button.stories.ts +0 -49
- package/projects/storybook-host/src/stories/header.component.ts +0 -78
- package/projects/storybook-host/src/stories/header.css +0 -32
- package/projects/storybook-host/src/stories/header.stories.ts +0 -33
- package/projects/storybook-host/src/stories/page.component.ts +0 -84
- package/projects/storybook-host/src/stories/page.css +0 -68
- package/projects/storybook-host/src/stories/page.stories.ts +0 -32
- package/projects/storybook-host/src/stories/user.ts +0 -3
- package/projects/storybook-host/src/styles.css +0 -1
- package/projects/storybook-host/tsconfig.app.json +0 -15
- package/projects/storybook-host/tsconfig.spec.json +0 -15
- package/src/lib/components/byte-button/byte-button-group/byte-button-group.css +0 -27
- package/src/lib/components/byte-button/byte-button-group/byte-button-group.html +0 -6
- package/src/lib/components/byte-button/byte-button-group/byte-button-group.spec.ts +0 -22
- package/src/lib/components/byte-button/byte-button-group/byte-button-group.ts +0 -35
- package/src/lib/components/byte-button/byte-button.css +0 -0
- package/src/lib/components/byte-button/byte-button.directive.ts +0 -17
- package/src/lib/components/byte-button/byte-button.html +0 -29
- package/src/lib/components/byte-button/byte-button.module.ts +0 -19
- package/src/lib/components/byte-button/byte-button.stories.ts +0 -449
- package/src/lib/components/byte-button/byte-button.ts +0 -129
- package/src/lib/components/byte-dialog/byte-dialog.css +0 -0
- package/src/lib/components/byte-dialog/byte-dialog.directive.ts +0 -21
- package/src/lib/components/byte-dialog/byte-dialog.html +0 -47
- package/src/lib/components/byte-dialog/byte-dialog.module.ts +0 -21
- package/src/lib/components/byte-dialog/byte-dialog.spec.ts +0 -22
- package/src/lib/components/byte-dialog/byte-dialog.ts +0 -121
- package/src/lib/components/byte-dialog/byte.dialog.stories.ts +0 -215
- package/src/lib/components/byte-input/byte-input.css +0 -29
- package/src/lib/components/byte-input/byte-input.html +0 -58
- package/src/lib/components/byte-input/byte-input.spec.ts +0 -22
- package/src/lib/components/byte-input/byte-input.stories.ts +0 -60
- package/src/lib/components/byte-input/byte-input.ts +0 -97
- package/src/lib/components/byte-select/byte-select.css +0 -16
- package/src/lib/components/byte-select/byte-select.directive.ts +0 -61
- package/src/lib/components/byte-select/byte-select.html +0 -101
- package/src/lib/components/byte-select/byte-select.module.ts +0 -26
- package/src/lib/components/byte-select/byte-select.spec.ts +0 -22
- package/src/lib/components/byte-select/byte-select.stories.ts +0 -194
- package/src/lib/components/byte-select/byte-select.ts +0 -168
- package/src/lib/components/byte-select/index.ts +0 -3
- package/src/lib/components/byte-sidebar/byte-sidebar.css +0 -0
- package/src/lib/components/byte-sidebar/byte-sidebar.directive.ts +0 -11
- package/src/lib/components/byte-sidebar/byte-sidebar.html +0 -31
- package/src/lib/components/byte-sidebar/byte-sidebar.module.ts +0 -16
- package/src/lib/components/byte-sidebar/byte-sidebar.spec.ts +0 -22
- package/src/lib/components/byte-sidebar/byte-sidebar.stories.ts +0 -190
- package/src/lib/components/byte-sidebar/byte-sidebar.ts +0 -108
- package/src/lib/components/byte-table/byte-table.css +0 -0
- package/src/lib/components/byte-table/byte-table.directive.ts +0 -49
- package/src/lib/components/byte-table/byte-table.html +0 -102
- package/src/lib/components/byte-table/byte-table.module.ts +0 -33
- package/src/lib/components/byte-table/byte-table.spec.ts +0 -22
- package/src/lib/components/byte-table/byte-table.stories.ts +0 -296
- package/src/lib/components/byte-table/byte-table.ts +0 -162
- package/src/lib/components/calendar/calendar.css +0 -16
- package/src/lib/components/calendar/calendar.html +0 -15
- package/src/lib/components/calendar/calendar.spec.ts +0 -22
- package/src/lib/components/calendar/calendar.stories.ts +0 -153
- package/src/lib/components/calendar/calendar.ts +0 -89
- package/src/lib/components/select/select.css +0 -16
- package/src/lib/components/select/select.html +0 -14
- package/src/lib/components/select/select.spec.ts +0 -22
- package/src/lib/components/select/select.ts +0 -73
- package/src/lib/config/empresa-ui.token.ts +0 -5
- package/src/lib/providers/empresa-ui-config.ts +0 -8
- package/src/lib/providers/provide-empresa-ui.ts +0 -42
- package/src/lib/themes/CRM-Theme.ts +0 -34
- package/src/lib/themes/aura.ts +0 -3
- package/src/lib/themes/index.ts +0 -2
- package/src/lib/themes/registry.ts +0 -9
- package/src/lib/utils/inject-prime-icons.ts +0 -12
- package/src/public-api.ts +0 -30
- package/tsconfig.json +0 -45
- package/tsconfig.lib.json +0 -11
- package/tsconfig.lib.prod.json +0 -9
- package/tsconfig.spec.json +0 -8
|
@@ -0,0 +1,1176 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, makeEnvironmentProviders, provideEnvironmentInitializer, forwardRef, Input, ChangeDetectionStrategy, Component, Directive, ContentChild, NgModule, EventEmitter, Output } from '@angular/core';
|
|
3
|
+
import { providePrimeNG } from 'primeng/config';
|
|
4
|
+
import Aura from '@primeuix/themes/aura';
|
|
5
|
+
import { definePreset } from '@primeuix/themes';
|
|
6
|
+
import * as i1 from '@angular/forms';
|
|
7
|
+
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
8
|
+
import * as i2 from 'primeng/datepicker';
|
|
9
|
+
import { DatePickerModule } from 'primeng/datepicker';
|
|
10
|
+
import * as i2$1 from 'primeng/select';
|
|
11
|
+
import { SelectModule } from 'primeng/select';
|
|
12
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
13
|
+
import * as i2$2 from 'primeng/api';
|
|
14
|
+
import * as i3 from 'primeng/inputnumber';
|
|
15
|
+
import { InputNumberModule } from 'primeng/inputnumber';
|
|
16
|
+
import * as i2$3 from 'primeng/inputtext';
|
|
17
|
+
import { InputTextModule } from 'primeng/inputtext';
|
|
18
|
+
import * as i4 from 'primeng/textarea';
|
|
19
|
+
import { TextareaModule } from 'primeng/textarea';
|
|
20
|
+
import * as i1$1 from 'primeng/button';
|
|
21
|
+
import { ButtonModule } from 'primeng/button';
|
|
22
|
+
import * as i1$2 from 'primeng/buttongroup';
|
|
23
|
+
import { ButtonGroupModule } from 'primeng/buttongroup';
|
|
24
|
+
import * as i1$3 from 'primeng/table';
|
|
25
|
+
import { TableModule } from 'primeng/table';
|
|
26
|
+
import * as i1$4 from 'primeng/drawer';
|
|
27
|
+
import { DrawerModule } from 'primeng/drawer';
|
|
28
|
+
import * as i1$5 from 'primeng/dialog';
|
|
29
|
+
import { DialogModule } from 'primeng/dialog';
|
|
30
|
+
|
|
31
|
+
const EMPRESA_UI_CONFIG = new InjectionToken('EMPRESA_UI_CONFIG');
|
|
32
|
+
|
|
33
|
+
const AuraTheme = Aura;
|
|
34
|
+
|
|
35
|
+
const CRMTheme = definePreset(Aura, {
|
|
36
|
+
semantic: {
|
|
37
|
+
primary: {
|
|
38
|
+
50: '#EEF4FF',
|
|
39
|
+
100: '#DCE8FF',
|
|
40
|
+
200: '#B9D1FF',
|
|
41
|
+
300: '#8FB4FF',
|
|
42
|
+
400: '#5F91F5',
|
|
43
|
+
500: '#2F6FE4',
|
|
44
|
+
600: '#1F58C4',
|
|
45
|
+
700: '#18489D',
|
|
46
|
+
800: '#123574',
|
|
47
|
+
900: '#0A2453',
|
|
48
|
+
950: '#00011F'
|
|
49
|
+
}
|
|
50
|
+
/* secondary: {
|
|
51
|
+
50: '#F8FAFC',
|
|
52
|
+
100: '#F1F5F9',
|
|
53
|
+
200: '#E2E8F0',
|
|
54
|
+
300: '#CBD5E1',
|
|
55
|
+
400: '#94A3B8',
|
|
56
|
+
500: '#64748B',
|
|
57
|
+
600: '#475569',
|
|
58
|
+
700: '#334155',
|
|
59
|
+
800: '#1E293B',
|
|
60
|
+
900: '#0F172A',
|
|
61
|
+
950: '#020617'
|
|
62
|
+
} */
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const EMPRESA_THEMES = {
|
|
67
|
+
aura: AuraTheme,
|
|
68
|
+
crm: CRMTheme,
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const PRIME_ICONS_LINK_ID = 'empresa-ui-prime-icons';
|
|
72
|
+
const PRIME_ICONS_VERSION = '7.0.0';
|
|
73
|
+
function injectPrimeIconsStylesheet() {
|
|
74
|
+
if (document.getElementById(PRIME_ICONS_LINK_ID))
|
|
75
|
+
return;
|
|
76
|
+
const link = document.createElement('link');
|
|
77
|
+
link.id = PRIME_ICONS_LINK_ID;
|
|
78
|
+
link.rel = 'stylesheet';
|
|
79
|
+
link.href = `https://cdn.jsdelivr.net/npm/primeicons@${PRIME_ICONS_VERSION}/primeicons.css`;
|
|
80
|
+
document.head.appendChild(link);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function provideEmpresaUI(config = {}) {
|
|
84
|
+
const theme = EMPRESA_THEMES[config.theme ?? 'crm'];
|
|
85
|
+
return makeEnvironmentProviders([
|
|
86
|
+
providePrimeNG({
|
|
87
|
+
theme: {
|
|
88
|
+
preset: theme,
|
|
89
|
+
options: {
|
|
90
|
+
darkModeSelector: false
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}),
|
|
94
|
+
{
|
|
95
|
+
provide: EMPRESA_UI_CONFIG,
|
|
96
|
+
useValue: config
|
|
97
|
+
},
|
|
98
|
+
provideEnvironmentInitializer(() => injectPrimeIconsStylesheet()),
|
|
99
|
+
]);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
class Calendar {
|
|
103
|
+
dateFormat = 'dd/mm/yy';
|
|
104
|
+
placeholder = 'dd/mm/yyyy';
|
|
105
|
+
showIcon = true;
|
|
106
|
+
disabled = false;
|
|
107
|
+
minDate;
|
|
108
|
+
maxDate;
|
|
109
|
+
readonlyInput = false;
|
|
110
|
+
showClear = false;
|
|
111
|
+
inputId = '';
|
|
112
|
+
name = '';
|
|
113
|
+
value = null;
|
|
114
|
+
onChange = () => { };
|
|
115
|
+
onTouched = () => { };
|
|
116
|
+
writeValue(value) {
|
|
117
|
+
this.value = value;
|
|
118
|
+
}
|
|
119
|
+
registerOnChange(fn) {
|
|
120
|
+
this.onChange = fn;
|
|
121
|
+
}
|
|
122
|
+
registerOnTouched(fn) {
|
|
123
|
+
this.onTouched = fn;
|
|
124
|
+
}
|
|
125
|
+
setDisabledState(isDisabled) {
|
|
126
|
+
this.disabled = isDisabled;
|
|
127
|
+
}
|
|
128
|
+
onValueChange(value) {
|
|
129
|
+
this.value = value;
|
|
130
|
+
this.onChange(value);
|
|
131
|
+
this.onTouched();
|
|
132
|
+
}
|
|
133
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: Calendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
134
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: Calendar, isStandalone: true, selector: "byte-calendar", inputs: { dateFormat: "dateFormat", placeholder: "placeholder", showIcon: "showIcon", disabled: "disabled", minDate: "minDate", maxDate: "maxDate", readonlyInput: "readonlyInput", showClear: "showClear", inputId: "inputId", name: "name" }, providers: [
|
|
135
|
+
{
|
|
136
|
+
provide: NG_VALUE_ACCESSOR,
|
|
137
|
+
useExisting: forwardRef(() => Calendar),
|
|
138
|
+
multi: true
|
|
139
|
+
}
|
|
140
|
+
], ngImport: i0, template: "<p-datepicker\n [(ngModel)]=\"value\"\n [dateFormat]=\"dateFormat\"\n [placeholder]=\"placeholder\"\n [showIcon]=\"showIcon\"\n [disabled]=\"disabled\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [readonlyInput]=\"readonlyInput\"\n [showClear]=\"showClear\"\n [inputId]=\"inputId\"\n [name]=\"name\"\n (ngModelChange)=\"onValueChange($event)\"\n appendTo=\"body\"\n/>", styles: [":host{display:block;width:100%}:host ::ng-deep .p-inputtext,:host ::ng-deep .p-inputnumber,:host ::ng-deep .p-textarea,:host ::ng-deep .p-datepicker,:host ::ng-deep .p-select{width:100%}:host ::ng-deep .p-inputnumber-input{width:100%}\n"], dependencies: [{ 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: DatePickerModule }, { kind: "component", type: i2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
141
|
+
}
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: Calendar, decorators: [{
|
|
143
|
+
type: Component,
|
|
144
|
+
args: [{ selector: 'byte-calendar', standalone: true, imports: [
|
|
145
|
+
FormsModule,
|
|
146
|
+
DatePickerModule
|
|
147
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
148
|
+
{
|
|
149
|
+
provide: NG_VALUE_ACCESSOR,
|
|
150
|
+
useExisting: forwardRef(() => Calendar),
|
|
151
|
+
multi: true
|
|
152
|
+
}
|
|
153
|
+
], template: "<p-datepicker\n [(ngModel)]=\"value\"\n [dateFormat]=\"dateFormat\"\n [placeholder]=\"placeholder\"\n [showIcon]=\"showIcon\"\n [disabled]=\"disabled\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [readonlyInput]=\"readonlyInput\"\n [showClear]=\"showClear\"\n [inputId]=\"inputId\"\n [name]=\"name\"\n (ngModelChange)=\"onValueChange($event)\"\n appendTo=\"body\"\n/>", styles: [":host{display:block;width:100%}:host ::ng-deep .p-inputtext,:host ::ng-deep .p-inputnumber,:host ::ng-deep .p-textarea,:host ::ng-deep .p-datepicker,:host ::ng-deep .p-select{width:100%}:host ::ng-deep .p-inputnumber-input{width:100%}\n"] }]
|
|
154
|
+
}], propDecorators: { dateFormat: [{
|
|
155
|
+
type: Input
|
|
156
|
+
}], placeholder: [{
|
|
157
|
+
type: Input
|
|
158
|
+
}], showIcon: [{
|
|
159
|
+
type: Input
|
|
160
|
+
}], disabled: [{
|
|
161
|
+
type: Input
|
|
162
|
+
}], minDate: [{
|
|
163
|
+
type: Input
|
|
164
|
+
}], maxDate: [{
|
|
165
|
+
type: Input
|
|
166
|
+
}], readonlyInput: [{
|
|
167
|
+
type: Input
|
|
168
|
+
}], showClear: [{
|
|
169
|
+
type: Input
|
|
170
|
+
}], inputId: [{
|
|
171
|
+
type: Input
|
|
172
|
+
}], name: [{
|
|
173
|
+
type: Input
|
|
174
|
+
}] } });
|
|
175
|
+
|
|
176
|
+
class ByteSelectSelectedItemDirective {
|
|
177
|
+
template;
|
|
178
|
+
constructor(template) {
|
|
179
|
+
this.template = template;
|
|
180
|
+
}
|
|
181
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectSelectedItemDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
182
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteSelectSelectedItemDirective, isStandalone: true, selector: "ng-template[byteSelectSelectedItem]", ngImport: i0 });
|
|
183
|
+
}
|
|
184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectSelectedItemDirective, decorators: [{
|
|
185
|
+
type: Directive,
|
|
186
|
+
args: [{
|
|
187
|
+
selector: 'ng-template[byteSelectSelectedItem]',
|
|
188
|
+
standalone: true
|
|
189
|
+
}]
|
|
190
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
191
|
+
class ByteSelectItemDirective {
|
|
192
|
+
template;
|
|
193
|
+
constructor(template) {
|
|
194
|
+
this.template = template;
|
|
195
|
+
}
|
|
196
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectItemDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
197
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteSelectItemDirective, isStandalone: true, selector: "ng-template[byteSelectItem]", ngImport: i0 });
|
|
198
|
+
}
|
|
199
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectItemDirective, decorators: [{
|
|
200
|
+
type: Directive,
|
|
201
|
+
args: [{
|
|
202
|
+
selector: 'ng-template[byteSelectItem]',
|
|
203
|
+
standalone: true
|
|
204
|
+
}]
|
|
205
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
206
|
+
class ByteSelectHeaderDirective {
|
|
207
|
+
template;
|
|
208
|
+
constructor(template) {
|
|
209
|
+
this.template = template;
|
|
210
|
+
}
|
|
211
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectHeaderDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
212
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteSelectHeaderDirective, isStandalone: true, selector: "ng-template[byteSelectHeader]", ngImport: i0 });
|
|
213
|
+
}
|
|
214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectHeaderDirective, decorators: [{
|
|
215
|
+
type: Directive,
|
|
216
|
+
args: [{
|
|
217
|
+
selector: 'ng-template[byteSelectHeader]',
|
|
218
|
+
standalone: true
|
|
219
|
+
}]
|
|
220
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
221
|
+
class ByteSelectFooterDirective {
|
|
222
|
+
template;
|
|
223
|
+
constructor(template) {
|
|
224
|
+
this.template = template;
|
|
225
|
+
}
|
|
226
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectFooterDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
227
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteSelectFooterDirective, isStandalone: true, selector: "ng-template[byteSelectFooter]", ngImport: i0 });
|
|
228
|
+
}
|
|
229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectFooterDirective, decorators: [{
|
|
230
|
+
type: Directive,
|
|
231
|
+
args: [{
|
|
232
|
+
selector: 'ng-template[byteSelectFooter]',
|
|
233
|
+
standalone: true
|
|
234
|
+
}]
|
|
235
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
236
|
+
class ByteSelectEmptyDirective {
|
|
237
|
+
template;
|
|
238
|
+
constructor(template) {
|
|
239
|
+
this.template = template;
|
|
240
|
+
}
|
|
241
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectEmptyDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
242
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteSelectEmptyDirective, isStandalone: true, selector: "ng-template[byteSelectEmpty]", ngImport: i0 });
|
|
243
|
+
}
|
|
244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectEmptyDirective, decorators: [{
|
|
245
|
+
type: Directive,
|
|
246
|
+
args: [{
|
|
247
|
+
selector: 'ng-template[byteSelectEmpty]',
|
|
248
|
+
standalone: true
|
|
249
|
+
}]
|
|
250
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
251
|
+
class ByteSelectEmptyFilterDirective {
|
|
252
|
+
template;
|
|
253
|
+
constructor(template) {
|
|
254
|
+
this.template = template;
|
|
255
|
+
}
|
|
256
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectEmptyFilterDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
257
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteSelectEmptyFilterDirective, isStandalone: true, selector: "ng-template[byteSelectEmptyFilter]", ngImport: i0 });
|
|
258
|
+
}
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectEmptyFilterDirective, decorators: [{
|
|
260
|
+
type: Directive,
|
|
261
|
+
args: [{
|
|
262
|
+
selector: 'ng-template[byteSelectEmptyFilter]',
|
|
263
|
+
standalone: true
|
|
264
|
+
}]
|
|
265
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
266
|
+
|
|
267
|
+
class ByteSelect {
|
|
268
|
+
// =====================================================
|
|
269
|
+
// INPUTS
|
|
270
|
+
// =====================================================
|
|
271
|
+
options = [];
|
|
272
|
+
optionLabel = '';
|
|
273
|
+
optionValue = '';
|
|
274
|
+
placeholder = 'Seleccione';
|
|
275
|
+
disabled = false;
|
|
276
|
+
inputId = '';
|
|
277
|
+
name = '';
|
|
278
|
+
filter = false;
|
|
279
|
+
filterBy = '';
|
|
280
|
+
showClear = false;
|
|
281
|
+
// =====================================================
|
|
282
|
+
// CUSTOM TEMPLATES
|
|
283
|
+
// =====================================================
|
|
284
|
+
selectedItemTemplate;
|
|
285
|
+
itemTemplate;
|
|
286
|
+
headerTemplate;
|
|
287
|
+
footerTemplate;
|
|
288
|
+
emptyTemplate;
|
|
289
|
+
emptyFilterTemplate;
|
|
290
|
+
// =====================================================
|
|
291
|
+
// VALUE
|
|
292
|
+
// =====================================================
|
|
293
|
+
value = null;
|
|
294
|
+
// =====================================================
|
|
295
|
+
// CONTROL VALUE ACCESSOR
|
|
296
|
+
// =====================================================
|
|
297
|
+
onChange = () => { };
|
|
298
|
+
onTouched = () => { };
|
|
299
|
+
writeValue(value) {
|
|
300
|
+
this.value = value;
|
|
301
|
+
}
|
|
302
|
+
registerOnChange(fn) {
|
|
303
|
+
this.onChange = fn;
|
|
304
|
+
}
|
|
305
|
+
registerOnTouched(fn) {
|
|
306
|
+
this.onTouched = fn;
|
|
307
|
+
}
|
|
308
|
+
setDisabledState(isDisabled) {
|
|
309
|
+
this.disabled = isDisabled;
|
|
310
|
+
}
|
|
311
|
+
// =====================================================
|
|
312
|
+
// CHANGE
|
|
313
|
+
// =====================================================
|
|
314
|
+
onValueChange(value) {
|
|
315
|
+
this.value = value;
|
|
316
|
+
this.onChange(value);
|
|
317
|
+
this.onTouched();
|
|
318
|
+
}
|
|
319
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
320
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ByteSelect, isStandalone: true, selector: "byte-select", inputs: { options: "options", optionLabel: "optionLabel", optionValue: "optionValue", placeholder: "placeholder", disabled: "disabled", inputId: "inputId", name: "name", filter: "filter", filterBy: "filterBy", showClear: "showClear" }, providers: [
|
|
321
|
+
{
|
|
322
|
+
provide: NG_VALUE_ACCESSOR,
|
|
323
|
+
useExisting: forwardRef(() => ByteSelect),
|
|
324
|
+
multi: true
|
|
325
|
+
}
|
|
326
|
+
], queries: [{ propertyName: "selectedItemTemplate", first: true, predicate: ByteSelectSelectedItemDirective, descendants: true }, { propertyName: "itemTemplate", first: true, predicate: ByteSelectItemDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: ByteSelectHeaderDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: ByteSelectFooterDirective, descendants: true }, { propertyName: "emptyTemplate", first: true, predicate: ByteSelectEmptyDirective, descendants: true }, { propertyName: "emptyFilterTemplate", first: true, predicate: ByteSelectEmptyFilterDirective, descendants: true }], ngImport: i0, template: "<p-select\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [inputId]=\"inputId\"\n [name]=\"name\"\n [filter]=\"filter\"\n [filterBy]=\"filterBy\"\n [showClear]=\"showClear\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n appendTo=\"body\"\n>\n\n @if (selectedItemTemplate) {\n\n <ng-template\n pTemplate=\"selectedItem\"\n let-selectedOption\n >\n\n <ng-container\n [ngTemplateOutlet]=\"selectedItemTemplate.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: selectedOption\n }\"\n />\n\n </ng-template>\n\n }\n\n @if (itemTemplate) {\n\n <ng-template\n pTemplate=\"item\"\n let-option\n >\n\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: option\n }\"\n />\n\n </ng-template>\n\n }\n\n @if (headerTemplate) {\n\n <ng-template pTemplate=\"header\">\n\n <ng-container\n [ngTemplateOutlet]=\"headerTemplate.template\"\n />\n\n </ng-template>\n\n }\n\n @if (footerTemplate) {\n\n <ng-template pTemplate=\"footer\">\n\n <ng-container\n [ngTemplateOutlet]=\"footerTemplate.template\"\n />\n\n </ng-template>\n\n }\n\n @if (emptyTemplate) {\n\n <ng-template pTemplate=\"empty\">\n\n <ng-container\n [ngTemplateOutlet]=\"emptyTemplate.template\"\n />\n\n </ng-template>\n\n } \n\n @if (emptyFilterTemplate) {\n\n <ng-template pTemplate=\"emptyfilter\">\n\n <ng-container\n [ngTemplateOutlet]=\"emptyFilterTemplate.template\"\n />\n\n </ng-template>\n\n }\n\n</p-select>", styles: [":host{display:block;width:100%}:host ::ng-deep .p-inputtext,:host ::ng-deep .p-inputnumber,:host ::ng-deep .p-textarea,:host ::ng-deep .p-datepicker,:host ::ng-deep .p-select{width:100%}:host ::ng-deep .p-inputnumber-input{width:100%}\n"], dependencies: [{ 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: SelectModule }, { kind: "component", type: i2$1.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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
327
|
+
}
|
|
328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelect, decorators: [{
|
|
329
|
+
type: Component,
|
|
330
|
+
args: [{ selector: 'byte-select', imports: [
|
|
331
|
+
FormsModule,
|
|
332
|
+
SelectModule,
|
|
333
|
+
NgTemplateOutlet,
|
|
334
|
+
ByteSelectSelectedItemDirective,
|
|
335
|
+
ByteSelectItemDirective,
|
|
336
|
+
ByteSelectHeaderDirective,
|
|
337
|
+
ByteSelectFooterDirective,
|
|
338
|
+
ByteSelectEmptyDirective,
|
|
339
|
+
ByteSelectEmptyFilterDirective
|
|
340
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
341
|
+
{
|
|
342
|
+
provide: NG_VALUE_ACCESSOR,
|
|
343
|
+
useExisting: forwardRef(() => ByteSelect),
|
|
344
|
+
multi: true
|
|
345
|
+
}
|
|
346
|
+
], template: "<p-select\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [inputId]=\"inputId\"\n [name]=\"name\"\n [filter]=\"filter\"\n [filterBy]=\"filterBy\"\n [showClear]=\"showClear\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n appendTo=\"body\"\n>\n\n @if (selectedItemTemplate) {\n\n <ng-template\n pTemplate=\"selectedItem\"\n let-selectedOption\n >\n\n <ng-container\n [ngTemplateOutlet]=\"selectedItemTemplate.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: selectedOption\n }\"\n />\n\n </ng-template>\n\n }\n\n @if (itemTemplate) {\n\n <ng-template\n pTemplate=\"item\"\n let-option\n >\n\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: option\n }\"\n />\n\n </ng-template>\n\n }\n\n @if (headerTemplate) {\n\n <ng-template pTemplate=\"header\">\n\n <ng-container\n [ngTemplateOutlet]=\"headerTemplate.template\"\n />\n\n </ng-template>\n\n }\n\n @if (footerTemplate) {\n\n <ng-template pTemplate=\"footer\">\n\n <ng-container\n [ngTemplateOutlet]=\"footerTemplate.template\"\n />\n\n </ng-template>\n\n }\n\n @if (emptyTemplate) {\n\n <ng-template pTemplate=\"empty\">\n\n <ng-container\n [ngTemplateOutlet]=\"emptyTemplate.template\"\n />\n\n </ng-template>\n\n } \n\n @if (emptyFilterTemplate) {\n\n <ng-template pTemplate=\"emptyfilter\">\n\n <ng-container\n [ngTemplateOutlet]=\"emptyFilterTemplate.template\"\n />\n\n </ng-template>\n\n }\n\n</p-select>", styles: [":host{display:block;width:100%}:host ::ng-deep .p-inputtext,:host ::ng-deep .p-inputnumber,:host ::ng-deep .p-textarea,:host ::ng-deep .p-datepicker,:host ::ng-deep .p-select{width:100%}:host ::ng-deep .p-inputnumber-input{width:100%}\n"] }]
|
|
347
|
+
}], propDecorators: { options: [{
|
|
348
|
+
type: Input
|
|
349
|
+
}], optionLabel: [{
|
|
350
|
+
type: Input
|
|
351
|
+
}], optionValue: [{
|
|
352
|
+
type: Input
|
|
353
|
+
}], placeholder: [{
|
|
354
|
+
type: Input
|
|
355
|
+
}], disabled: [{
|
|
356
|
+
type: Input
|
|
357
|
+
}], inputId: [{
|
|
358
|
+
type: Input
|
|
359
|
+
}], name: [{
|
|
360
|
+
type: Input
|
|
361
|
+
}], filter: [{
|
|
362
|
+
type: Input
|
|
363
|
+
}], filterBy: [{
|
|
364
|
+
type: Input
|
|
365
|
+
}], showClear: [{
|
|
366
|
+
type: Input
|
|
367
|
+
}], selectedItemTemplate: [{
|
|
368
|
+
type: ContentChild,
|
|
369
|
+
args: [ByteSelectSelectedItemDirective]
|
|
370
|
+
}], itemTemplate: [{
|
|
371
|
+
type: ContentChild,
|
|
372
|
+
args: [ByteSelectItemDirective]
|
|
373
|
+
}], headerTemplate: [{
|
|
374
|
+
type: ContentChild,
|
|
375
|
+
args: [ByteSelectHeaderDirective]
|
|
376
|
+
}], footerTemplate: [{
|
|
377
|
+
type: ContentChild,
|
|
378
|
+
args: [ByteSelectFooterDirective]
|
|
379
|
+
}], emptyTemplate: [{
|
|
380
|
+
type: ContentChild,
|
|
381
|
+
args: [ByteSelectEmptyDirective]
|
|
382
|
+
}], emptyFilterTemplate: [{
|
|
383
|
+
type: ContentChild,
|
|
384
|
+
args: [ByteSelectEmptyFilterDirective]
|
|
385
|
+
}] } });
|
|
386
|
+
|
|
387
|
+
class ByteSelectModule {
|
|
388
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
389
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectModule, imports: [ByteSelect,
|
|
390
|
+
ByteSelectEmptyDirective,
|
|
391
|
+
ByteSelectEmptyFilterDirective,
|
|
392
|
+
ByteSelectFooterDirective,
|
|
393
|
+
ByteSelectHeaderDirective,
|
|
394
|
+
ByteSelectItemDirective,
|
|
395
|
+
ByteSelectSelectedItemDirective], exports: [ByteSelect,
|
|
396
|
+
ByteSelectEmptyDirective,
|
|
397
|
+
ByteSelectEmptyFilterDirective,
|
|
398
|
+
ByteSelectFooterDirective,
|
|
399
|
+
ByteSelectHeaderDirective,
|
|
400
|
+
ByteSelectItemDirective,
|
|
401
|
+
ByteSelectSelectedItemDirective] });
|
|
402
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectModule, imports: [ByteSelect] });
|
|
403
|
+
}
|
|
404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSelectModule, decorators: [{
|
|
405
|
+
type: NgModule,
|
|
406
|
+
args: [{
|
|
407
|
+
imports: [
|
|
408
|
+
ByteSelect,
|
|
409
|
+
ByteSelectEmptyDirective,
|
|
410
|
+
ByteSelectEmptyFilterDirective,
|
|
411
|
+
ByteSelectFooterDirective,
|
|
412
|
+
ByteSelectHeaderDirective,
|
|
413
|
+
ByteSelectItemDirective,
|
|
414
|
+
ByteSelectSelectedItemDirective
|
|
415
|
+
],
|
|
416
|
+
exports: [
|
|
417
|
+
ByteSelect,
|
|
418
|
+
ByteSelectEmptyDirective,
|
|
419
|
+
ByteSelectEmptyFilterDirective,
|
|
420
|
+
ByteSelectFooterDirective,
|
|
421
|
+
ByteSelectHeaderDirective,
|
|
422
|
+
ByteSelectItemDirective,
|
|
423
|
+
ByteSelectSelectedItemDirective
|
|
424
|
+
]
|
|
425
|
+
}]
|
|
426
|
+
}] });
|
|
427
|
+
|
|
428
|
+
class ByteInput {
|
|
429
|
+
typeInput = 'text';
|
|
430
|
+
label = '';
|
|
431
|
+
error = '';
|
|
432
|
+
placeholder = '';
|
|
433
|
+
disabled = false;
|
|
434
|
+
required = false;
|
|
435
|
+
inputId = '';
|
|
436
|
+
name = '';
|
|
437
|
+
rows = 3;
|
|
438
|
+
min;
|
|
439
|
+
max;
|
|
440
|
+
step = 1;
|
|
441
|
+
value = null;
|
|
442
|
+
onChange = () => { };
|
|
443
|
+
onTouched = () => { };
|
|
444
|
+
writeValue(value) {
|
|
445
|
+
this.value = value;
|
|
446
|
+
}
|
|
447
|
+
registerOnChange(fn) {
|
|
448
|
+
this.onChange = fn;
|
|
449
|
+
}
|
|
450
|
+
registerOnTouched(fn) {
|
|
451
|
+
this.onTouched = fn;
|
|
452
|
+
}
|
|
453
|
+
setDisabledState(isDisabled) {
|
|
454
|
+
this.disabled = isDisabled;
|
|
455
|
+
}
|
|
456
|
+
onValueChange(value) {
|
|
457
|
+
this.value = value;
|
|
458
|
+
this.onChange(value);
|
|
459
|
+
this.onTouched();
|
|
460
|
+
}
|
|
461
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
462
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ByteInput, isStandalone: true, selector: "byte-input", inputs: { typeInput: "typeInput", label: "label", error: "error", placeholder: "placeholder", disabled: "disabled", required: "required", inputId: "inputId", name: "name", rows: "rows", min: "min", max: "max", step: "step" }, providers: [
|
|
463
|
+
{
|
|
464
|
+
provide: NG_VALUE_ACCESSOR,
|
|
465
|
+
useExisting: forwardRef(() => ByteInput),
|
|
466
|
+
multi: true
|
|
467
|
+
}
|
|
468
|
+
], ngImport: i0, template: "@if (label) {\n <label [for]=\"inputId\" class=\"byte-input-label\">\n {{ label }}\n\n @if (required) {\n <span>*</span>\n }\n </label>\n}\n\n@if (typeInput === 'text') {\n\n <input\n pInputText\n [id]=\"inputId\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n\n} @else if (typeInput === 'number') {\n\n <p-inputnumber\n [inputId]=\"inputId\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n\n} @else if (typeInput === 'area') {\n\n <textarea\n pTextarea\n [id]=\"inputId\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [rows]=\"rows\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n ></textarea>\n\n}\n\n@if (error) {\n <small class=\"byte-input-error\">\n {{ error }}\n </small>\n}", styles: [":host{display:block;width:100%}:host ::ng-deep .p-inputtext,:host ::ng-deep .p-inputnumber,:host ::ng-deep .p-textarea,:host ::ng-deep .p-datepicker,:host ::ng-deep .p-select{width:100%}:host ::ng-deep .p-inputnumber-input{width:100%}.byte-input-label{display:block;margin-bottom:.5rem;font-size:.88rem}.byte-input-error{display:block;margin-top:.5rem;font-size:.7rem;color:var(--p-red-500, #ef4444)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$3.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i3.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i4.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
469
|
+
}
|
|
470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteInput, decorators: [{
|
|
471
|
+
type: Component,
|
|
472
|
+
args: [{ selector: 'byte-input', standalone: true, imports: [
|
|
473
|
+
FormsModule,
|
|
474
|
+
InputTextModule,
|
|
475
|
+
InputNumberModule,
|
|
476
|
+
TextareaModule
|
|
477
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
478
|
+
{
|
|
479
|
+
provide: NG_VALUE_ACCESSOR,
|
|
480
|
+
useExisting: forwardRef(() => ByteInput),
|
|
481
|
+
multi: true
|
|
482
|
+
}
|
|
483
|
+
], template: "@if (label) {\n <label [for]=\"inputId\" class=\"byte-input-label\">\n {{ label }}\n\n @if (required) {\n <span>*</span>\n }\n </label>\n}\n\n@if (typeInput === 'text') {\n\n <input\n pInputText\n [id]=\"inputId\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n\n} @else if (typeInput === 'number') {\n\n <p-inputnumber\n [inputId]=\"inputId\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n />\n\n} @else if (typeInput === 'area') {\n\n <textarea\n pTextarea\n [id]=\"inputId\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [rows]=\"rows\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n ></textarea>\n\n}\n\n@if (error) {\n <small class=\"byte-input-error\">\n {{ error }}\n </small>\n}", styles: [":host{display:block;width:100%}:host ::ng-deep .p-inputtext,:host ::ng-deep .p-inputnumber,:host ::ng-deep .p-textarea,:host ::ng-deep .p-datepicker,:host ::ng-deep .p-select{width:100%}:host ::ng-deep .p-inputnumber-input{width:100%}.byte-input-label{display:block;margin-bottom:.5rem;font-size:.88rem}.byte-input-error{display:block;margin-top:.5rem;font-size:.7rem;color:var(--p-red-500, #ef4444)}\n"] }]
|
|
484
|
+
}], propDecorators: { typeInput: [{
|
|
485
|
+
type: Input
|
|
486
|
+
}], label: [{
|
|
487
|
+
type: Input
|
|
488
|
+
}], error: [{
|
|
489
|
+
type: Input
|
|
490
|
+
}], placeholder: [{
|
|
491
|
+
type: Input
|
|
492
|
+
}], disabled: [{
|
|
493
|
+
type: Input
|
|
494
|
+
}], required: [{
|
|
495
|
+
type: Input
|
|
496
|
+
}], inputId: [{
|
|
497
|
+
type: Input
|
|
498
|
+
}], name: [{
|
|
499
|
+
type: Input
|
|
500
|
+
}], rows: [{
|
|
501
|
+
type: Input
|
|
502
|
+
}], min: [{
|
|
503
|
+
type: Input
|
|
504
|
+
}], max: [{
|
|
505
|
+
type: Input
|
|
506
|
+
}], step: [{
|
|
507
|
+
type: Input
|
|
508
|
+
}] } });
|
|
509
|
+
|
|
510
|
+
class ByteButtonContentDirective {
|
|
511
|
+
template;
|
|
512
|
+
constructor(template) {
|
|
513
|
+
this.template = template;
|
|
514
|
+
}
|
|
515
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteButtonContentDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
516
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteButtonContentDirective, isStandalone: true, selector: "ng-template[byteButtonContent]", ngImport: i0 });
|
|
517
|
+
}
|
|
518
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteButtonContentDirective, decorators: [{
|
|
519
|
+
type: Directive,
|
|
520
|
+
args: [{
|
|
521
|
+
selector: 'ng-template[byteButtonContent]',
|
|
522
|
+
standalone: true
|
|
523
|
+
}]
|
|
524
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
525
|
+
|
|
526
|
+
class ByteButton {
|
|
527
|
+
// =====================================================
|
|
528
|
+
// INPUTS
|
|
529
|
+
// =====================================================
|
|
530
|
+
label = '';
|
|
531
|
+
icon = '';
|
|
532
|
+
iconPos = 'left';
|
|
533
|
+
severity;
|
|
534
|
+
variant;
|
|
535
|
+
size;
|
|
536
|
+
disabled = false;
|
|
537
|
+
loading = false;
|
|
538
|
+
loadingIcon = '';
|
|
539
|
+
raised = false;
|
|
540
|
+
rounded = false;
|
|
541
|
+
text = false;
|
|
542
|
+
outlined = false;
|
|
543
|
+
link = false;
|
|
544
|
+
plain = false;
|
|
545
|
+
fluid = false;
|
|
546
|
+
type = 'button';
|
|
547
|
+
buttonProps = {};
|
|
548
|
+
// =====================================================
|
|
549
|
+
// CUSTOM TEMPLATE
|
|
550
|
+
// =====================================================
|
|
551
|
+
contentTemplate;
|
|
552
|
+
// =====================================================
|
|
553
|
+
// OUTPUT
|
|
554
|
+
// =====================================================
|
|
555
|
+
clicked = new EventEmitter();
|
|
556
|
+
// =====================================================
|
|
557
|
+
// CLICK
|
|
558
|
+
// =====================================================
|
|
559
|
+
onButtonClick(event) {
|
|
560
|
+
this.clicked.emit(event);
|
|
561
|
+
}
|
|
562
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
563
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ByteButton, isStandalone: true, selector: "byte-button", inputs: { label: "label", icon: "icon", iconPos: "iconPos", severity: "severity", variant: "variant", size: "size", disabled: "disabled", loading: "loading", loadingIcon: "loadingIcon", raised: "raised", rounded: "rounded", text: "text", outlined: "outlined", link: "link", plain: "plain", fluid: "fluid", type: "type", buttonProps: "buttonProps" }, outputs: { clicked: "clicked" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: ByteButtonContentDirective, descendants: true }], ngImport: i0, template: "<p-button\n [label]=\"label\"\n [icon]=\"icon\"\n [iconPos]=\"iconPos\"\n [severity]=\"severity\"\n [variant]=\"variant\"\n [size]=\"size\"\n [disabled]=\"disabled\"\n [loading]=\"loading\"\n [loadingIcon]=\"loadingIcon\"\n [raised]=\"raised\"\n [rounded]=\"rounded\"\n [text]=\"text\"\n [outlined]=\"outlined\"\n [link]=\"link\"\n [plain]=\"plain\"\n [fluid]=\"fluid\"\n [type]=\"type\"\n [buttonProps]=\"buttonProps\"\n (onClick)=\"onButtonClick($event)\"\n>\n @if (contentTemplate) {\n <ng-template pTemplate=\"content\">\n <ng-container\n [ngTemplateOutlet]=\"contentTemplate.template\"\n />\n </ng-template>\n }\n</p-button>", styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
564
|
+
}
|
|
565
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteButton, decorators: [{
|
|
566
|
+
type: Component,
|
|
567
|
+
args: [{ selector: 'byte-button', imports: [
|
|
568
|
+
ButtonModule,
|
|
569
|
+
NgTemplateOutlet,
|
|
570
|
+
ByteButtonContentDirective
|
|
571
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-button\n [label]=\"label\"\n [icon]=\"icon\"\n [iconPos]=\"iconPos\"\n [severity]=\"severity\"\n [variant]=\"variant\"\n [size]=\"size\"\n [disabled]=\"disabled\"\n [loading]=\"loading\"\n [loadingIcon]=\"loadingIcon\"\n [raised]=\"raised\"\n [rounded]=\"rounded\"\n [text]=\"text\"\n [outlined]=\"outlined\"\n [link]=\"link\"\n [plain]=\"plain\"\n [fluid]=\"fluid\"\n [type]=\"type\"\n [buttonProps]=\"buttonProps\"\n (onClick)=\"onButtonClick($event)\"\n>\n @if (contentTemplate) {\n <ng-template pTemplate=\"content\">\n <ng-container\n [ngTemplateOutlet]=\"contentTemplate.template\"\n />\n </ng-template>\n }\n</p-button>" }]
|
|
572
|
+
}], propDecorators: { label: [{
|
|
573
|
+
type: Input
|
|
574
|
+
}], icon: [{
|
|
575
|
+
type: Input
|
|
576
|
+
}], iconPos: [{
|
|
577
|
+
type: Input
|
|
578
|
+
}], severity: [{
|
|
579
|
+
type: Input
|
|
580
|
+
}], variant: [{
|
|
581
|
+
type: Input
|
|
582
|
+
}], size: [{
|
|
583
|
+
type: Input
|
|
584
|
+
}], disabled: [{
|
|
585
|
+
type: Input
|
|
586
|
+
}], loading: [{
|
|
587
|
+
type: Input
|
|
588
|
+
}], loadingIcon: [{
|
|
589
|
+
type: Input
|
|
590
|
+
}], raised: [{
|
|
591
|
+
type: Input
|
|
592
|
+
}], rounded: [{
|
|
593
|
+
type: Input
|
|
594
|
+
}], text: [{
|
|
595
|
+
type: Input
|
|
596
|
+
}], outlined: [{
|
|
597
|
+
type: Input
|
|
598
|
+
}], link: [{
|
|
599
|
+
type: Input
|
|
600
|
+
}], plain: [{
|
|
601
|
+
type: Input
|
|
602
|
+
}], fluid: [{
|
|
603
|
+
type: Input
|
|
604
|
+
}], type: [{
|
|
605
|
+
type: Input
|
|
606
|
+
}], buttonProps: [{
|
|
607
|
+
type: Input
|
|
608
|
+
}], contentTemplate: [{
|
|
609
|
+
type: ContentChild,
|
|
610
|
+
args: [ByteButtonContentDirective]
|
|
611
|
+
}], clicked: [{
|
|
612
|
+
type: Output
|
|
613
|
+
}] } });
|
|
614
|
+
|
|
615
|
+
class ByteButtonGroup {
|
|
616
|
+
// =====================================================
|
|
617
|
+
// INPUTS
|
|
618
|
+
// =====================================================
|
|
619
|
+
style;
|
|
620
|
+
styleClass;
|
|
621
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteButtonGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
622
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: ByteButtonGroup, isStandalone: true, selector: "byte-button-group", inputs: { style: "style", styleClass: "styleClass" }, ngImport: i0, template: "<p-buttonGroup\n [style]=\"style\"\n [class]=\"styleClass\"\n>\n <ng-content />\n</p-buttonGroup>", styles: [":host{display:inline-flex}\n"], dependencies: [{ kind: "ngmodule", type: ButtonGroupModule }, { kind: "component", type: i1$2.ButtonGroup, selector: "p-buttonGroup, p-buttongroup, p-button-group" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
623
|
+
}
|
|
624
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteButtonGroup, decorators: [{
|
|
625
|
+
type: Component,
|
|
626
|
+
args: [{ selector: 'byte-button-group', imports: [
|
|
627
|
+
ButtonGroupModule
|
|
628
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-buttonGroup\n [style]=\"style\"\n [class]=\"styleClass\"\n>\n <ng-content />\n</p-buttonGroup>", styles: [":host{display:inline-flex}\n"] }]
|
|
629
|
+
}], propDecorators: { style: [{
|
|
630
|
+
type: Input
|
|
631
|
+
}], styleClass: [{
|
|
632
|
+
type: Input
|
|
633
|
+
}] } });
|
|
634
|
+
|
|
635
|
+
class ByteButtonModule {
|
|
636
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
637
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: ByteButtonModule, imports: [ByteButton,
|
|
638
|
+
ByteButtonContentDirective,
|
|
639
|
+
ByteButtonGroup], exports: [ByteButton,
|
|
640
|
+
ByteButtonContentDirective,
|
|
641
|
+
ByteButtonGroup] });
|
|
642
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteButtonModule, imports: [ByteButton,
|
|
643
|
+
ByteButtonGroup] });
|
|
644
|
+
}
|
|
645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteButtonModule, decorators: [{
|
|
646
|
+
type: NgModule,
|
|
647
|
+
args: [{
|
|
648
|
+
imports: [
|
|
649
|
+
ByteButton,
|
|
650
|
+
ByteButtonContentDirective,
|
|
651
|
+
ByteButtonGroup
|
|
652
|
+
],
|
|
653
|
+
exports: [
|
|
654
|
+
ByteButton,
|
|
655
|
+
ByteButtonContentDirective,
|
|
656
|
+
ByteButtonGroup
|
|
657
|
+
]
|
|
658
|
+
}]
|
|
659
|
+
}] });
|
|
660
|
+
|
|
661
|
+
class ByteTableCaptionDirective {
|
|
662
|
+
template;
|
|
663
|
+
constructor(template) {
|
|
664
|
+
this.template = template;
|
|
665
|
+
}
|
|
666
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableCaptionDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
667
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteTableCaptionDirective, isStandalone: true, selector: "ng-template[byteTableCaption]", ngImport: i0 });
|
|
668
|
+
}
|
|
669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableCaptionDirective, decorators: [{
|
|
670
|
+
type: Directive,
|
|
671
|
+
args: [{
|
|
672
|
+
selector: 'ng-template[byteTableCaption]',
|
|
673
|
+
standalone: true
|
|
674
|
+
}]
|
|
675
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
676
|
+
class ByteTableHeaderDirective {
|
|
677
|
+
template;
|
|
678
|
+
constructor(template) {
|
|
679
|
+
this.template = template;
|
|
680
|
+
}
|
|
681
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableHeaderDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
682
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteTableHeaderDirective, isStandalone: true, selector: "ng-template[byteTableHeader]", ngImport: i0 });
|
|
683
|
+
}
|
|
684
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableHeaderDirective, decorators: [{
|
|
685
|
+
type: Directive,
|
|
686
|
+
args: [{
|
|
687
|
+
selector: 'ng-template[byteTableHeader]',
|
|
688
|
+
standalone: true
|
|
689
|
+
}]
|
|
690
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
691
|
+
class ByteTableBodyDirective {
|
|
692
|
+
template;
|
|
693
|
+
constructor(template) {
|
|
694
|
+
this.template = template;
|
|
695
|
+
}
|
|
696
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableBodyDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
697
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteTableBodyDirective, isStandalone: true, selector: "ng-template[byteTableBody]", ngImport: i0 });
|
|
698
|
+
}
|
|
699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableBodyDirective, decorators: [{
|
|
700
|
+
type: Directive,
|
|
701
|
+
args: [{
|
|
702
|
+
selector: 'ng-template[byteTableBody]',
|
|
703
|
+
standalone: true
|
|
704
|
+
}]
|
|
705
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
706
|
+
class ByteTableFooterDirective {
|
|
707
|
+
template;
|
|
708
|
+
constructor(template) {
|
|
709
|
+
this.template = template;
|
|
710
|
+
}
|
|
711
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableFooterDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
712
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteTableFooterDirective, isStandalone: true, selector: "ng-template[byteTableFooter]", ngImport: i0 });
|
|
713
|
+
}
|
|
714
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableFooterDirective, decorators: [{
|
|
715
|
+
type: Directive,
|
|
716
|
+
args: [{
|
|
717
|
+
selector: 'ng-template[byteTableFooter]',
|
|
718
|
+
standalone: true
|
|
719
|
+
}]
|
|
720
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
721
|
+
class ByteTableEmptyMessageDirective {
|
|
722
|
+
template;
|
|
723
|
+
constructor(template) {
|
|
724
|
+
this.template = template;
|
|
725
|
+
}
|
|
726
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableEmptyMessageDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
727
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteTableEmptyMessageDirective, isStandalone: true, selector: "ng-template[byteTableEmptyMessage]", ngImport: i0 });
|
|
728
|
+
}
|
|
729
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableEmptyMessageDirective, decorators: [{
|
|
730
|
+
type: Directive,
|
|
731
|
+
args: [{
|
|
732
|
+
selector: 'ng-template[byteTableEmptyMessage]',
|
|
733
|
+
standalone: true
|
|
734
|
+
}]
|
|
735
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
736
|
+
class ByteTableSummaryDirective {
|
|
737
|
+
template;
|
|
738
|
+
constructor(template) {
|
|
739
|
+
this.template = template;
|
|
740
|
+
}
|
|
741
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableSummaryDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
742
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteTableSummaryDirective, isStandalone: true, selector: "ng-template[byteTableSummary]", ngImport: i0 });
|
|
743
|
+
}
|
|
744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableSummaryDirective, decorators: [{
|
|
745
|
+
type: Directive,
|
|
746
|
+
args: [{
|
|
747
|
+
selector: 'ng-template[byteTableSummary]',
|
|
748
|
+
standalone: true
|
|
749
|
+
}]
|
|
750
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
751
|
+
|
|
752
|
+
class ByteTable {
|
|
753
|
+
// =====================================================
|
|
754
|
+
// INPUTS
|
|
755
|
+
// =====================================================
|
|
756
|
+
value = [];
|
|
757
|
+
columns = [];
|
|
758
|
+
paginator = false;
|
|
759
|
+
rows = 10;
|
|
760
|
+
rowsPerPageOptions = [10, 25, 50];
|
|
761
|
+
loading = false;
|
|
762
|
+
sortField = '';
|
|
763
|
+
sortOrder = 1;
|
|
764
|
+
selectionMode = null;
|
|
765
|
+
dataKey = '';
|
|
766
|
+
scrollable = false;
|
|
767
|
+
tableStyle = null;
|
|
768
|
+
// =====================================================
|
|
769
|
+
// CUSTOM TEMPLATES
|
|
770
|
+
// =====================================================
|
|
771
|
+
captionTemplate;
|
|
772
|
+
headerTemplate;
|
|
773
|
+
bodyTemplate;
|
|
774
|
+
footerTemplate;
|
|
775
|
+
emptyMessageTemplate;
|
|
776
|
+
summaryTemplate;
|
|
777
|
+
// =====================================================
|
|
778
|
+
// SELECTION (CVA)
|
|
779
|
+
// =====================================================
|
|
780
|
+
selection = null;
|
|
781
|
+
onChange = () => { };
|
|
782
|
+
onTouched = () => { };
|
|
783
|
+
writeValue(value) {
|
|
784
|
+
this.selection = value;
|
|
785
|
+
}
|
|
786
|
+
registerOnChange(fn) {
|
|
787
|
+
this.onChange = fn;
|
|
788
|
+
}
|
|
789
|
+
registerOnTouched(fn) {
|
|
790
|
+
this.onTouched = fn;
|
|
791
|
+
}
|
|
792
|
+
setDisabledState(isDisabled) {
|
|
793
|
+
// p-table no tiene un "disabled" nativo global; se puede usar
|
|
794
|
+
// para deshabilitar selección si lo necesitas más adelante.
|
|
795
|
+
}
|
|
796
|
+
onSelectionChange(value) {
|
|
797
|
+
this.selection = value;
|
|
798
|
+
this.onChange(value);
|
|
799
|
+
this.onTouched();
|
|
800
|
+
}
|
|
801
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
802
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ByteTable, isStandalone: true, selector: "byte-table", inputs: { value: "value", columns: "columns", paginator: "paginator", rows: "rows", rowsPerPageOptions: "rowsPerPageOptions", loading: "loading", sortField: "sortField", sortOrder: "sortOrder", selectionMode: "selectionMode", dataKey: "dataKey", scrollable: "scrollable", tableStyle: "tableStyle" }, providers: [
|
|
803
|
+
{
|
|
804
|
+
provide: NG_VALUE_ACCESSOR,
|
|
805
|
+
useExisting: forwardRef(() => ByteTable),
|
|
806
|
+
multi: true
|
|
807
|
+
}
|
|
808
|
+
], queries: [{ propertyName: "captionTemplate", first: true, predicate: ByteTableCaptionDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: ByteTableHeaderDirective, descendants: true }, { propertyName: "bodyTemplate", first: true, predicate: ByteTableBodyDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: ByteTableFooterDirective, descendants: true }, { propertyName: "emptyMessageTemplate", first: true, predicate: ByteTableEmptyMessageDirective, descendants: true }, { propertyName: "summaryTemplate", first: true, predicate: ByteTableSummaryDirective, descendants: true }], ngImport: i0, template: "<p-table\n [value]=\"value\"\n [columns]=\"columns\"\n [paginator]=\"paginator\"\n [rows]=\"rows\"\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\n [loading]=\"loading\"\n [sortField]=\"sortField\"\n [sortOrder]=\"sortOrder\"\n [selectionMode]=\"selectionMode\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [dataKey]=\"dataKey\"\n [scrollable]=\"scrollable\"\n [tableStyle]=\"tableStyle\"\n>\n\n @if (captionTemplate) {\n\n <ng-template pTemplate=\"caption\">\n\n <ng-container [ngTemplateOutlet]=\"captionTemplate.template\" />\n\n </ng-template>\n\n }\n\n @if (headerTemplate) {\n\n <ng-template\n pTemplate=\"header\"\n let-columns\n >\n\n <ng-container\n [ngTemplateOutlet]=\"headerTemplate.template\"\n [ngTemplateOutletContext]=\"{ $implicit: columns }\"\n />\n\n </ng-template>\n\n }\n\n @if (bodyTemplate) {\n\n <ng-template\n pTemplate=\"body\"\n let-rowData\n let-columns=\"columns\"\n let-rowIndex=\"rowIndex\"\n >\n\n <ng-container\n [ngTemplateOutlet]=\"bodyTemplate.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: rowData,\n columns: columns,\n rowIndex: rowIndex\n }\"\n />\n\n </ng-template>\n\n }\n\n @if (footerTemplate) {\n\n <ng-template\n pTemplate=\"footer\"\n let-columns\n >\n\n <ng-container\n [ngTemplateOutlet]=\"footerTemplate.template\"\n [ngTemplateOutletContext]=\"{ $implicit: columns }\"\n />\n\n </ng-template>\n\n }\n\n @if (emptyMessageTemplate) {\n\n <ng-template pTemplate=\"emptymessage\">\n\n <ng-container [ngTemplateOutlet]=\"emptyMessageTemplate.template\" />\n\n </ng-template>\n\n }\n\n @if (summaryTemplate) {\n\n <ng-template pTemplate=\"summary\">\n\n <ng-container [ngTemplateOutlet]=\"summaryTemplate.template\" />\n\n </ng-template>\n\n }\n\n</p-table>", styles: [""], dependencies: [{ kind: "ngmodule", type: TableModule }, { kind: "component", type: i1$3.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
809
|
+
}
|
|
810
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTable, decorators: [{
|
|
811
|
+
type: Component,
|
|
812
|
+
args: [{ selector: 'byte-table', imports: [
|
|
813
|
+
TableModule,
|
|
814
|
+
NgTemplateOutlet,
|
|
815
|
+
ByteTableCaptionDirective,
|
|
816
|
+
ByteTableHeaderDirective,
|
|
817
|
+
ByteTableBodyDirective,
|
|
818
|
+
ByteTableFooterDirective,
|
|
819
|
+
ByteTableEmptyMessageDirective,
|
|
820
|
+
ByteTableSummaryDirective
|
|
821
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
822
|
+
{
|
|
823
|
+
provide: NG_VALUE_ACCESSOR,
|
|
824
|
+
useExisting: forwardRef(() => ByteTable),
|
|
825
|
+
multi: true
|
|
826
|
+
}
|
|
827
|
+
], template: "<p-table\n [value]=\"value\"\n [columns]=\"columns\"\n [paginator]=\"paginator\"\n [rows]=\"rows\"\n [rowsPerPageOptions]=\"rowsPerPageOptions\"\n [loading]=\"loading\"\n [sortField]=\"sortField\"\n [sortOrder]=\"sortOrder\"\n [selectionMode]=\"selectionMode\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [dataKey]=\"dataKey\"\n [scrollable]=\"scrollable\"\n [tableStyle]=\"tableStyle\"\n>\n\n @if (captionTemplate) {\n\n <ng-template pTemplate=\"caption\">\n\n <ng-container [ngTemplateOutlet]=\"captionTemplate.template\" />\n\n </ng-template>\n\n }\n\n @if (headerTemplate) {\n\n <ng-template\n pTemplate=\"header\"\n let-columns\n >\n\n <ng-container\n [ngTemplateOutlet]=\"headerTemplate.template\"\n [ngTemplateOutletContext]=\"{ $implicit: columns }\"\n />\n\n </ng-template>\n\n }\n\n @if (bodyTemplate) {\n\n <ng-template\n pTemplate=\"body\"\n let-rowData\n let-columns=\"columns\"\n let-rowIndex=\"rowIndex\"\n >\n\n <ng-container\n [ngTemplateOutlet]=\"bodyTemplate.template\"\n [ngTemplateOutletContext]=\"{\n $implicit: rowData,\n columns: columns,\n rowIndex: rowIndex\n }\"\n />\n\n </ng-template>\n\n }\n\n @if (footerTemplate) {\n\n <ng-template\n pTemplate=\"footer\"\n let-columns\n >\n\n <ng-container\n [ngTemplateOutlet]=\"footerTemplate.template\"\n [ngTemplateOutletContext]=\"{ $implicit: columns }\"\n />\n\n </ng-template>\n\n }\n\n @if (emptyMessageTemplate) {\n\n <ng-template pTemplate=\"emptymessage\">\n\n <ng-container [ngTemplateOutlet]=\"emptyMessageTemplate.template\" />\n\n </ng-template>\n\n }\n\n @if (summaryTemplate) {\n\n <ng-template pTemplate=\"summary\">\n\n <ng-container [ngTemplateOutlet]=\"summaryTemplate.template\" />\n\n </ng-template>\n\n }\n\n</p-table>" }]
|
|
828
|
+
}], propDecorators: { value: [{
|
|
829
|
+
type: Input
|
|
830
|
+
}], columns: [{
|
|
831
|
+
type: Input
|
|
832
|
+
}], paginator: [{
|
|
833
|
+
type: Input
|
|
834
|
+
}], rows: [{
|
|
835
|
+
type: Input
|
|
836
|
+
}], rowsPerPageOptions: [{
|
|
837
|
+
type: Input
|
|
838
|
+
}], loading: [{
|
|
839
|
+
type: Input
|
|
840
|
+
}], sortField: [{
|
|
841
|
+
type: Input
|
|
842
|
+
}], sortOrder: [{
|
|
843
|
+
type: Input
|
|
844
|
+
}], selectionMode: [{
|
|
845
|
+
type: Input
|
|
846
|
+
}], dataKey: [{
|
|
847
|
+
type: Input
|
|
848
|
+
}], scrollable: [{
|
|
849
|
+
type: Input
|
|
850
|
+
}], tableStyle: [{
|
|
851
|
+
type: Input
|
|
852
|
+
}], captionTemplate: [{
|
|
853
|
+
type: ContentChild,
|
|
854
|
+
args: [ByteTableCaptionDirective]
|
|
855
|
+
}], headerTemplate: [{
|
|
856
|
+
type: ContentChild,
|
|
857
|
+
args: [ByteTableHeaderDirective]
|
|
858
|
+
}], bodyTemplate: [{
|
|
859
|
+
type: ContentChild,
|
|
860
|
+
args: [ByteTableBodyDirective]
|
|
861
|
+
}], footerTemplate: [{
|
|
862
|
+
type: ContentChild,
|
|
863
|
+
args: [ByteTableFooterDirective]
|
|
864
|
+
}], emptyMessageTemplate: [{
|
|
865
|
+
type: ContentChild,
|
|
866
|
+
args: [ByteTableEmptyMessageDirective]
|
|
867
|
+
}], summaryTemplate: [{
|
|
868
|
+
type: ContentChild,
|
|
869
|
+
args: [ByteTableSummaryDirective]
|
|
870
|
+
}] } });
|
|
871
|
+
|
|
872
|
+
class ByteTableModule {
|
|
873
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
874
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: ByteTableModule, imports: [ByteTable,
|
|
875
|
+
ByteTableCaptionDirective,
|
|
876
|
+
ByteTableHeaderDirective,
|
|
877
|
+
ByteTableBodyDirective,
|
|
878
|
+
ByteTableFooterDirective,
|
|
879
|
+
ByteTableEmptyMessageDirective,
|
|
880
|
+
ByteTableSummaryDirective], exports: [ByteTable,
|
|
881
|
+
ByteTableCaptionDirective,
|
|
882
|
+
ByteTableHeaderDirective,
|
|
883
|
+
ByteTableBodyDirective,
|
|
884
|
+
ByteTableFooterDirective,
|
|
885
|
+
ByteTableEmptyMessageDirective,
|
|
886
|
+
ByteTableSummaryDirective] });
|
|
887
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableModule, imports: [ByteTable] });
|
|
888
|
+
}
|
|
889
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteTableModule, decorators: [{
|
|
890
|
+
type: NgModule,
|
|
891
|
+
args: [{
|
|
892
|
+
imports: [
|
|
893
|
+
ByteTable,
|
|
894
|
+
ByteTableCaptionDirective,
|
|
895
|
+
ByteTableHeaderDirective,
|
|
896
|
+
ByteTableBodyDirective,
|
|
897
|
+
ByteTableFooterDirective,
|
|
898
|
+
ByteTableEmptyMessageDirective,
|
|
899
|
+
ByteTableSummaryDirective
|
|
900
|
+
],
|
|
901
|
+
exports: [
|
|
902
|
+
ByteTable,
|
|
903
|
+
ByteTableCaptionDirective,
|
|
904
|
+
ByteTableHeaderDirective,
|
|
905
|
+
ByteTableBodyDirective,
|
|
906
|
+
ByteTableFooterDirective,
|
|
907
|
+
ByteTableEmptyMessageDirective,
|
|
908
|
+
ByteTableSummaryDirective
|
|
909
|
+
]
|
|
910
|
+
}]
|
|
911
|
+
}] });
|
|
912
|
+
|
|
913
|
+
class ByteSidebarHeaderDirective {
|
|
914
|
+
template;
|
|
915
|
+
constructor(template) {
|
|
916
|
+
this.template = template;
|
|
917
|
+
}
|
|
918
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSidebarHeaderDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
919
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteSidebarHeaderDirective, isStandalone: true, selector: "ng-template[byteSidebarHeader]", ngImport: i0 });
|
|
920
|
+
}
|
|
921
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSidebarHeaderDirective, decorators: [{
|
|
922
|
+
type: Directive,
|
|
923
|
+
args: [{
|
|
924
|
+
selector: 'ng-template[byteSidebarHeader]',
|
|
925
|
+
standalone: true
|
|
926
|
+
}]
|
|
927
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
928
|
+
|
|
929
|
+
class ByteSidebar {
|
|
930
|
+
cdRef;
|
|
931
|
+
constructor(cdRef) {
|
|
932
|
+
this.cdRef = cdRef;
|
|
933
|
+
}
|
|
934
|
+
// =====================================================
|
|
935
|
+
// INPUTS
|
|
936
|
+
// =====================================================
|
|
937
|
+
visible = false;
|
|
938
|
+
position = 'left';
|
|
939
|
+
modal = true;
|
|
940
|
+
dismissible = true;
|
|
941
|
+
closeOnEscape = true;
|
|
942
|
+
showCloseIcon = true;
|
|
943
|
+
blockScroll = false;
|
|
944
|
+
style = null;
|
|
945
|
+
styleClass = '';
|
|
946
|
+
autoZIndex = true;
|
|
947
|
+
baseZIndex = 0;
|
|
948
|
+
// =====================================================
|
|
949
|
+
// OUTPUTS
|
|
950
|
+
// =====================================================
|
|
951
|
+
visibleChange = new EventEmitter();
|
|
952
|
+
// =====================================================
|
|
953
|
+
// CUSTOM TEMPLATES
|
|
954
|
+
// =====================================================
|
|
955
|
+
headerTemplate;
|
|
956
|
+
// =====================================================
|
|
957
|
+
// CHANGE
|
|
958
|
+
// =====================================================
|
|
959
|
+
onVisibleChange(value) {
|
|
960
|
+
this.visible = value;
|
|
961
|
+
this.visibleChange.emit(value);
|
|
962
|
+
this.cdRef.markForCheck();
|
|
963
|
+
}
|
|
964
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSidebar, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
965
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ByteSidebar, isStandalone: true, selector: "byte-sidebar", inputs: { visible: "visible", position: "position", modal: "modal", dismissible: "dismissible", closeOnEscape: "closeOnEscape", showCloseIcon: "showCloseIcon", blockScroll: "blockScroll", style: "style", styleClass: "styleClass", autoZIndex: "autoZIndex", baseZIndex: "baseZIndex" }, outputs: { visibleChange: "visibleChange" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ByteSidebarHeaderDirective, descendants: true }], ngImport: i0, template: "<p-drawer\n [visible]=\"visible\"\n (visibleChange)=\"onVisibleChange($event)\"\n [position]=\"position\"\n [modal]=\"modal\"\n [dismissible]=\"dismissible\"\n [closeOnEscape]=\"closeOnEscape\"\n [showCloseIcon]=\"showCloseIcon\"\n [blockScroll]=\"blockScroll\"\n [style]=\"style\"\n [styleClass]=\"styleClass\"\n [autoZIndex]=\"autoZIndex\"\n [baseZIndex]=\"baseZIndex\"\n appendTo=\"body\"\n>\n\n @if (headerTemplate) {\n\n <ng-template pTemplate=\"header\">\n\n <ng-container\n [ngTemplateOutlet]=\"headerTemplate.template\"\n />\n\n </ng-template>\n\n }\n\n <ng-content></ng-content>\n\n</p-drawer>", styles: [""], dependencies: [{ kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i1$4.Drawer, selector: "p-drawer", inputs: ["appendTo", "motionOptions", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
966
|
+
}
|
|
967
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSidebar, decorators: [{
|
|
968
|
+
type: Component,
|
|
969
|
+
args: [{ selector: 'byte-sidebar', imports: [
|
|
970
|
+
DrawerModule,
|
|
971
|
+
NgTemplateOutlet,
|
|
972
|
+
ByteSidebarHeaderDirective
|
|
973
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-drawer\n [visible]=\"visible\"\n (visibleChange)=\"onVisibleChange($event)\"\n [position]=\"position\"\n [modal]=\"modal\"\n [dismissible]=\"dismissible\"\n [closeOnEscape]=\"closeOnEscape\"\n [showCloseIcon]=\"showCloseIcon\"\n [blockScroll]=\"blockScroll\"\n [style]=\"style\"\n [styleClass]=\"styleClass\"\n [autoZIndex]=\"autoZIndex\"\n [baseZIndex]=\"baseZIndex\"\n appendTo=\"body\"\n>\n\n @if (headerTemplate) {\n\n <ng-template pTemplate=\"header\">\n\n <ng-container\n [ngTemplateOutlet]=\"headerTemplate.template\"\n />\n\n </ng-template>\n\n }\n\n <ng-content></ng-content>\n\n</p-drawer>" }]
|
|
974
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { visible: [{
|
|
975
|
+
type: Input
|
|
976
|
+
}], position: [{
|
|
977
|
+
type: Input
|
|
978
|
+
}], modal: [{
|
|
979
|
+
type: Input
|
|
980
|
+
}], dismissible: [{
|
|
981
|
+
type: Input
|
|
982
|
+
}], closeOnEscape: [{
|
|
983
|
+
type: Input
|
|
984
|
+
}], showCloseIcon: [{
|
|
985
|
+
type: Input
|
|
986
|
+
}], blockScroll: [{
|
|
987
|
+
type: Input
|
|
988
|
+
}], style: [{
|
|
989
|
+
type: Input
|
|
990
|
+
}], styleClass: [{
|
|
991
|
+
type: Input
|
|
992
|
+
}], autoZIndex: [{
|
|
993
|
+
type: Input
|
|
994
|
+
}], baseZIndex: [{
|
|
995
|
+
type: Input
|
|
996
|
+
}], visibleChange: [{
|
|
997
|
+
type: Output
|
|
998
|
+
}], headerTemplate: [{
|
|
999
|
+
type: ContentChild,
|
|
1000
|
+
args: [ByteSidebarHeaderDirective]
|
|
1001
|
+
}] } });
|
|
1002
|
+
|
|
1003
|
+
class ByteSidebarModule {
|
|
1004
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSidebarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1005
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: ByteSidebarModule, imports: [ByteSidebar,
|
|
1006
|
+
ByteSidebarHeaderDirective], exports: [ByteSidebar,
|
|
1007
|
+
ByteSidebarHeaderDirective] });
|
|
1008
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSidebarModule, imports: [ByteSidebar] });
|
|
1009
|
+
}
|
|
1010
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteSidebarModule, decorators: [{
|
|
1011
|
+
type: NgModule,
|
|
1012
|
+
args: [{
|
|
1013
|
+
imports: [
|
|
1014
|
+
ByteSidebar,
|
|
1015
|
+
ByteSidebarHeaderDirective
|
|
1016
|
+
],
|
|
1017
|
+
exports: [
|
|
1018
|
+
ByteSidebar,
|
|
1019
|
+
ByteSidebarHeaderDirective
|
|
1020
|
+
]
|
|
1021
|
+
}]
|
|
1022
|
+
}] });
|
|
1023
|
+
|
|
1024
|
+
class ByteDialogHeaderDirective {
|
|
1025
|
+
template;
|
|
1026
|
+
constructor(template) {
|
|
1027
|
+
this.template = template;
|
|
1028
|
+
}
|
|
1029
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteDialogHeaderDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1030
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteDialogHeaderDirective, isStandalone: true, selector: "ng-template[byteDialogHeader]", ngImport: i0 });
|
|
1031
|
+
}
|
|
1032
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteDialogHeaderDirective, decorators: [{
|
|
1033
|
+
type: Directive,
|
|
1034
|
+
args: [{
|
|
1035
|
+
selector: 'ng-template[byteDialogHeader]',
|
|
1036
|
+
standalone: true
|
|
1037
|
+
}]
|
|
1038
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1039
|
+
class ByteDialogFooterDirective {
|
|
1040
|
+
template;
|
|
1041
|
+
constructor(template) {
|
|
1042
|
+
this.template = template;
|
|
1043
|
+
}
|
|
1044
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteDialogFooterDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1045
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ByteDialogFooterDirective, isStandalone: true, selector: "ng-template[byteDialogFooter]", ngImport: i0 });
|
|
1046
|
+
}
|
|
1047
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteDialogFooterDirective, decorators: [{
|
|
1048
|
+
type: Directive,
|
|
1049
|
+
args: [{
|
|
1050
|
+
selector: 'ng-template[byteDialogFooter]',
|
|
1051
|
+
standalone: true
|
|
1052
|
+
}]
|
|
1053
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
1054
|
+
|
|
1055
|
+
class ByteDialog {
|
|
1056
|
+
// =====================================================
|
|
1057
|
+
// INPUTS
|
|
1058
|
+
// =====================================================
|
|
1059
|
+
visible = false;
|
|
1060
|
+
header = '';
|
|
1061
|
+
modal = true;
|
|
1062
|
+
closable = true;
|
|
1063
|
+
draggable = true;
|
|
1064
|
+
resizable = false;
|
|
1065
|
+
dismissableMask = false;
|
|
1066
|
+
closeOnEscape = true;
|
|
1067
|
+
maximizable = false;
|
|
1068
|
+
blockScroll = true;
|
|
1069
|
+
position = 'center';
|
|
1070
|
+
style = null;
|
|
1071
|
+
styleClass = '';
|
|
1072
|
+
contentStyle = null;
|
|
1073
|
+
breakpoints = null;
|
|
1074
|
+
// =====================================================
|
|
1075
|
+
// OUTPUTS
|
|
1076
|
+
// =====================================================
|
|
1077
|
+
visibleChange = new EventEmitter();
|
|
1078
|
+
// =====================================================
|
|
1079
|
+
// CUSTOM TEMPLATES
|
|
1080
|
+
// =====================================================
|
|
1081
|
+
headerTemplate;
|
|
1082
|
+
footerTemplate;
|
|
1083
|
+
// =====================================================
|
|
1084
|
+
// CHANGE
|
|
1085
|
+
// =====================================================
|
|
1086
|
+
onVisibleChange(value) {
|
|
1087
|
+
this.visible = value;
|
|
1088
|
+
this.visibleChange.emit(value);
|
|
1089
|
+
}
|
|
1090
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1091
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ByteDialog, isStandalone: true, selector: "byte-dialog", inputs: { visible: "visible", header: "header", modal: "modal", closable: "closable", draggable: "draggable", resizable: "resizable", dismissableMask: "dismissableMask", closeOnEscape: "closeOnEscape", maximizable: "maximizable", blockScroll: "blockScroll", position: "position", style: "style", styleClass: "styleClass", contentStyle: "contentStyle", breakpoints: "breakpoints" }, outputs: { visibleChange: "visibleChange" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ByteDialogHeaderDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: ByteDialogFooterDirective, descendants: true }], ngImport: i0, template: "<p-dialog\n [(visible)]=\"visible\"\n (visibleChange)=\"onVisibleChange($event)\"\n [header]=\"header\"\n [modal]=\"modal\"\n [closable]=\"closable\"\n [draggable]=\"draggable\"\n [resizable]=\"resizable\"\n [dismissableMask]=\"dismissableMask\"\n [closeOnEscape]=\"closeOnEscape\"\n [maximizable]=\"maximizable\"\n [blockScroll]=\"blockScroll\"\n [position]=\"position\"\n [style]=\"style\"\n [styleClass]=\"styleClass\"\n [contentStyle]=\"contentStyle\"\n [breakpoints]=\"breakpoints\"\n appendTo=\"body\"\n>\n\n @if (headerTemplate) {\n\n <ng-template pTemplate=\"header\">\n\n <ng-container\n [ngTemplateOutlet]=\"headerTemplate.template\"\n />\n\n </ng-template>\n\n }\n\n <ng-content></ng-content>\n\n @if (footerTemplate) {\n\n <ng-template pTemplate=\"footer\">\n\n <ng-container\n [ngTemplateOutlet]=\"footerTemplate.template\"\n />\n\n </ng-template>\n\n }\n\n</p-dialog>", styles: [""], dependencies: [{ kind: "ngmodule", type: DialogModule }, { kind: "component", type: i1$5.Dialog, selector: "p-dialog", inputs: ["hostName", "header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "maskMotionOptions", "motionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1092
|
+
}
|
|
1093
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteDialog, decorators: [{
|
|
1094
|
+
type: Component,
|
|
1095
|
+
args: [{ selector: 'byte-dialog', imports: [
|
|
1096
|
+
DialogModule,
|
|
1097
|
+
NgTemplateOutlet,
|
|
1098
|
+
ByteDialogHeaderDirective,
|
|
1099
|
+
ByteDialogFooterDirective
|
|
1100
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-dialog\n [(visible)]=\"visible\"\n (visibleChange)=\"onVisibleChange($event)\"\n [header]=\"header\"\n [modal]=\"modal\"\n [closable]=\"closable\"\n [draggable]=\"draggable\"\n [resizable]=\"resizable\"\n [dismissableMask]=\"dismissableMask\"\n [closeOnEscape]=\"closeOnEscape\"\n [maximizable]=\"maximizable\"\n [blockScroll]=\"blockScroll\"\n [position]=\"position\"\n [style]=\"style\"\n [styleClass]=\"styleClass\"\n [contentStyle]=\"contentStyle\"\n [breakpoints]=\"breakpoints\"\n appendTo=\"body\"\n>\n\n @if (headerTemplate) {\n\n <ng-template pTemplate=\"header\">\n\n <ng-container\n [ngTemplateOutlet]=\"headerTemplate.template\"\n />\n\n </ng-template>\n\n }\n\n <ng-content></ng-content>\n\n @if (footerTemplate) {\n\n <ng-template pTemplate=\"footer\">\n\n <ng-container\n [ngTemplateOutlet]=\"footerTemplate.template\"\n />\n\n </ng-template>\n\n }\n\n</p-dialog>" }]
|
|
1101
|
+
}], propDecorators: { visible: [{
|
|
1102
|
+
type: Input
|
|
1103
|
+
}], header: [{
|
|
1104
|
+
type: Input
|
|
1105
|
+
}], modal: [{
|
|
1106
|
+
type: Input
|
|
1107
|
+
}], closable: [{
|
|
1108
|
+
type: Input
|
|
1109
|
+
}], draggable: [{
|
|
1110
|
+
type: Input
|
|
1111
|
+
}], resizable: [{
|
|
1112
|
+
type: Input
|
|
1113
|
+
}], dismissableMask: [{
|
|
1114
|
+
type: Input
|
|
1115
|
+
}], closeOnEscape: [{
|
|
1116
|
+
type: Input
|
|
1117
|
+
}], maximizable: [{
|
|
1118
|
+
type: Input
|
|
1119
|
+
}], blockScroll: [{
|
|
1120
|
+
type: Input
|
|
1121
|
+
}], position: [{
|
|
1122
|
+
type: Input
|
|
1123
|
+
}], style: [{
|
|
1124
|
+
type: Input
|
|
1125
|
+
}], styleClass: [{
|
|
1126
|
+
type: Input
|
|
1127
|
+
}], contentStyle: [{
|
|
1128
|
+
type: Input
|
|
1129
|
+
}], breakpoints: [{
|
|
1130
|
+
type: Input
|
|
1131
|
+
}], visibleChange: [{
|
|
1132
|
+
type: Output
|
|
1133
|
+
}], headerTemplate: [{
|
|
1134
|
+
type: ContentChild,
|
|
1135
|
+
args: [ByteDialogHeaderDirective]
|
|
1136
|
+
}], footerTemplate: [{
|
|
1137
|
+
type: ContentChild,
|
|
1138
|
+
args: [ByteDialogFooterDirective]
|
|
1139
|
+
}] } });
|
|
1140
|
+
|
|
1141
|
+
class ByteDialogModule {
|
|
1142
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1143
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.22", ngImport: i0, type: ByteDialogModule, imports: [ByteDialog,
|
|
1144
|
+
ByteDialogHeaderDirective,
|
|
1145
|
+
ByteDialogFooterDirective], exports: [ByteDialog,
|
|
1146
|
+
ByteDialogHeaderDirective,
|
|
1147
|
+
ByteDialogFooterDirective] });
|
|
1148
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteDialogModule, imports: [ByteDialog] });
|
|
1149
|
+
}
|
|
1150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ByteDialogModule, decorators: [{
|
|
1151
|
+
type: NgModule,
|
|
1152
|
+
args: [{
|
|
1153
|
+
imports: [
|
|
1154
|
+
ByteDialog,
|
|
1155
|
+
ByteDialogHeaderDirective,
|
|
1156
|
+
ByteDialogFooterDirective
|
|
1157
|
+
],
|
|
1158
|
+
exports: [
|
|
1159
|
+
ByteDialog,
|
|
1160
|
+
ByteDialogHeaderDirective,
|
|
1161
|
+
ByteDialogFooterDirective
|
|
1162
|
+
]
|
|
1163
|
+
}]
|
|
1164
|
+
}] });
|
|
1165
|
+
|
|
1166
|
+
/*
|
|
1167
|
+
* Public API Surface of shared-ui
|
|
1168
|
+
*/
|
|
1169
|
+
//export * from './lib/shared-ui';
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* Generated bundle index. Do not edit.
|
|
1173
|
+
*/
|
|
1174
|
+
|
|
1175
|
+
export { ByteButton, ByteButtonContentDirective, ByteButtonGroup, ByteButtonModule, ByteDialog, ByteDialogFooterDirective, ByteDialogHeaderDirective, ByteDialogModule, ByteInput, ByteSelect, ByteSelectEmptyDirective, ByteSelectEmptyFilterDirective, ByteSelectFooterDirective, ByteSelectHeaderDirective, ByteSelectItemDirective, ByteSelectModule, ByteSelectSelectedItemDirective, ByteSidebar, ByteSidebarHeaderDirective, ByteSidebarModule, ByteTable, ByteTableBodyDirective, ByteTableCaptionDirective, ByteTableEmptyMessageDirective, ByteTableFooterDirective, ByteTableHeaderDirective, ByteTableModule, ByteTableSummaryDirective, Calendar, provideEmpresaUI };
|
|
1176
|
+
//# sourceMappingURL=4byte-shared-lib.mjs.map
|