@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
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
applicationConfig,
|
|
3
|
-
moduleMetadata,
|
|
4
|
-
type Meta,
|
|
5
|
-
type StoryObj
|
|
6
|
-
} from '@storybook/angular';
|
|
7
|
-
|
|
8
|
-
import { ByteSidebar } from './byte-sidebar';
|
|
9
|
-
import { ByteSidebarModule } from './byte-sidebar.module';
|
|
10
|
-
|
|
11
|
-
import { provideEmpresaUI } from './../../providers/provide-empresa-ui';
|
|
12
|
-
import { ByteButton } from '../byte-button/byte-button';
|
|
13
|
-
|
|
14
|
-
const meta: Meta<ByteSidebar> = {
|
|
15
|
-
title: 'Components/ByteSidebar',
|
|
16
|
-
component: ByteSidebar,
|
|
17
|
-
|
|
18
|
-
decorators: [
|
|
19
|
-
moduleMetadata({
|
|
20
|
-
imports: [
|
|
21
|
-
ByteButton,
|
|
22
|
-
ByteSidebarModule
|
|
23
|
-
]
|
|
24
|
-
}),
|
|
25
|
-
|
|
26
|
-
(story, context) =>
|
|
27
|
-
applicationConfig({
|
|
28
|
-
providers: [
|
|
29
|
-
provideEmpresaUI({
|
|
30
|
-
theme: context.globals['theme']
|
|
31
|
-
})
|
|
32
|
-
]
|
|
33
|
-
})(story, context)
|
|
34
|
-
],
|
|
35
|
-
|
|
36
|
-
tags: ['autodocs'],
|
|
37
|
-
|
|
38
|
-
parameters: {
|
|
39
|
-
docs: {
|
|
40
|
-
description: {
|
|
41
|
-
component:
|
|
42
|
-
'Panel lateral desplegable (overlay), basado en PrimeNG y compatible con un template personalizado de header.'
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export default meta;
|
|
49
|
-
|
|
50
|
-
type Story = StoryObj<ByteSidebar>;
|
|
51
|
-
|
|
52
|
-
export const Normal: Story = {
|
|
53
|
-
render: (args) => ({
|
|
54
|
-
props: {
|
|
55
|
-
...args,
|
|
56
|
-
visible: false
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
template: `
|
|
60
|
-
<byte-button (click)="visible = true" label="Abrir sidebar"></byte-button>
|
|
61
|
-
|
|
62
|
-
<byte-sidebar
|
|
63
|
-
[(visible)]="visible"
|
|
64
|
-
[position]="position"
|
|
65
|
-
>
|
|
66
|
-
<h3>Contenido del sidebar</h3>
|
|
67
|
-
<p>Aquí va lo que necesites mostrar dentro del panel.</p>
|
|
68
|
-
</byte-sidebar>
|
|
69
|
-
`
|
|
70
|
-
}),
|
|
71
|
-
|
|
72
|
-
args: {
|
|
73
|
-
position: 'left'
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export const Right: Story = {
|
|
78
|
-
render: (args) => ({
|
|
79
|
-
props: {
|
|
80
|
-
...args,
|
|
81
|
-
visible: false
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
template: `
|
|
85
|
-
<byte-button (click)="visible = true" label="Abrir desde la derecha"></byte-button>
|
|
86
|
-
|
|
87
|
-
<byte-sidebar
|
|
88
|
-
[(visible)]="visible"
|
|
89
|
-
[position]="position"
|
|
90
|
-
>
|
|
91
|
-
<h3>Panel derecho</h3>
|
|
92
|
-
<p>Ideal para filtros o detalles contextuales.</p>
|
|
93
|
-
</byte-sidebar>
|
|
94
|
-
`
|
|
95
|
-
}),
|
|
96
|
-
|
|
97
|
-
args: {
|
|
98
|
-
position: 'right'
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export const TopBottom: Story = {
|
|
103
|
-
render: (args) => ({
|
|
104
|
-
props: {
|
|
105
|
-
...args,
|
|
106
|
-
visibleTop: false,
|
|
107
|
-
visibleBottom: false
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
template: `
|
|
111
|
-
<div style="display:flex; gap:10px">
|
|
112
|
-
<byte-button (click)="visibleTop = true" label="Abrir arriba"></byte-button>
|
|
113
|
-
<byte-button (click)="visibleBottom = true" label="Abrir abajo"></byte-button>
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
<byte-sidebar
|
|
117
|
-
[(visible)]="visibleTop"
|
|
118
|
-
position="top"
|
|
119
|
-
>
|
|
120
|
-
<p>Sidebar desde arriba.</p>
|
|
121
|
-
</byte-sidebar>
|
|
122
|
-
|
|
123
|
-
<byte-sidebar
|
|
124
|
-
[(visible)]="visibleBottom"
|
|
125
|
-
position="bottom"
|
|
126
|
-
>
|
|
127
|
-
<p>Sidebar desde abajo.</p>
|
|
128
|
-
</byte-sidebar>
|
|
129
|
-
`
|
|
130
|
-
}),
|
|
131
|
-
|
|
132
|
-
args: {}
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
export const NonModal: Story = {
|
|
136
|
-
render: (args) => ({
|
|
137
|
-
props: {
|
|
138
|
-
...args,
|
|
139
|
-
visible: false
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
template: `
|
|
143
|
-
<byte-button (click)="visible = true" label="Abrir sidebar no modal"></byte-button>
|
|
144
|
-
|
|
145
|
-
<byte-sidebar
|
|
146
|
-
[(visible)]="visible"
|
|
147
|
-
[position]="position"
|
|
148
|
-
[modal]="modal"
|
|
149
|
-
>
|
|
150
|
-
<h3>Sidebar no modal</h3>
|
|
151
|
-
<p>No bloquea la interacción con el resto de la página.</p>
|
|
152
|
-
</byte-sidebar>
|
|
153
|
-
`
|
|
154
|
-
}),
|
|
155
|
-
|
|
156
|
-
args: {
|
|
157
|
-
position: 'left',
|
|
158
|
-
modal: false
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export const CustomHeader: Story = {
|
|
163
|
-
render: (args) => ({
|
|
164
|
-
props: {
|
|
165
|
-
...args,
|
|
166
|
-
visible: false
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
template: `
|
|
170
|
-
<byte-button (click)="visible = true" label="Abrir sidebar"></byte-button>
|
|
171
|
-
|
|
172
|
-
<byte-sidebar
|
|
173
|
-
[(visible)]="visible"
|
|
174
|
-
[position]="position"
|
|
175
|
-
>
|
|
176
|
-
<ng-template byteSidebarHeader>
|
|
177
|
-
<div style="display: flex; align-items: center; gap: 8px;">
|
|
178
|
-
<strong>⚙️ Configuración</strong>
|
|
179
|
-
</div>
|
|
180
|
-
</ng-template>
|
|
181
|
-
|
|
182
|
-
<p>Contenido con encabezado personalizado.</p>
|
|
183
|
-
</byte-sidebar>
|
|
184
|
-
`
|
|
185
|
-
}),
|
|
186
|
-
|
|
187
|
-
args: {
|
|
188
|
-
position: 'right'
|
|
189
|
-
}
|
|
190
|
-
};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectionStrategy,
|
|
3
|
-
ChangeDetectorRef,
|
|
4
|
-
Component,
|
|
5
|
-
ContentChild,
|
|
6
|
-
EventEmitter,
|
|
7
|
-
Input,
|
|
8
|
-
Output
|
|
9
|
-
} from '@angular/core';
|
|
10
|
-
|
|
11
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
12
|
-
|
|
13
|
-
import { DrawerModule } from 'primeng/drawer';
|
|
14
|
-
|
|
15
|
-
import { ByteSidebarHeaderDirective } from './byte-sidebar.directive';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
@Component({
|
|
19
|
-
selector: 'byte-sidebar',
|
|
20
|
-
|
|
21
|
-
imports: [
|
|
22
|
-
DrawerModule,
|
|
23
|
-
|
|
24
|
-
NgTemplateOutlet,
|
|
25
|
-
|
|
26
|
-
ByteSidebarHeaderDirective
|
|
27
|
-
],
|
|
28
|
-
|
|
29
|
-
templateUrl: './byte-sidebar.html',
|
|
30
|
-
|
|
31
|
-
styleUrl: './byte-sidebar.css',
|
|
32
|
-
|
|
33
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
34
|
-
})
|
|
35
|
-
export class ByteSidebar {
|
|
36
|
-
|
|
37
|
-
constructor(private cdRef: ChangeDetectorRef) {}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
// =====================================================
|
|
41
|
-
// INPUTS
|
|
42
|
-
// =====================================================
|
|
43
|
-
|
|
44
|
-
@Input()
|
|
45
|
-
visible = false;
|
|
46
|
-
|
|
47
|
-
@Input()
|
|
48
|
-
position: 'left' | 'right' | 'top' | 'bottom' | 'full' = 'left';
|
|
49
|
-
|
|
50
|
-
@Input()
|
|
51
|
-
modal = true;
|
|
52
|
-
|
|
53
|
-
@Input()
|
|
54
|
-
dismissible = true;
|
|
55
|
-
|
|
56
|
-
@Input()
|
|
57
|
-
closeOnEscape = true;
|
|
58
|
-
|
|
59
|
-
@Input()
|
|
60
|
-
showCloseIcon = true;
|
|
61
|
-
|
|
62
|
-
@Input()
|
|
63
|
-
blockScroll = false;
|
|
64
|
-
|
|
65
|
-
@Input()
|
|
66
|
-
style: { [klass: string]: any } | null = null;
|
|
67
|
-
|
|
68
|
-
@Input()
|
|
69
|
-
styleClass = '';
|
|
70
|
-
|
|
71
|
-
@Input()
|
|
72
|
-
autoZIndex = true;
|
|
73
|
-
|
|
74
|
-
@Input()
|
|
75
|
-
baseZIndex = 0;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
// =====================================================
|
|
79
|
-
// OUTPUTS
|
|
80
|
-
// =====================================================
|
|
81
|
-
|
|
82
|
-
@Output()
|
|
83
|
-
visibleChange = new EventEmitter<boolean>();
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
// =====================================================
|
|
87
|
-
// CUSTOM TEMPLATES
|
|
88
|
-
// =====================================================
|
|
89
|
-
|
|
90
|
-
@ContentChild(ByteSidebarHeaderDirective)
|
|
91
|
-
headerTemplate?: ByteSidebarHeaderDirective;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
// =====================================================
|
|
95
|
-
// CHANGE
|
|
96
|
-
// =====================================================
|
|
97
|
-
|
|
98
|
-
onVisibleChange(value: boolean): void {
|
|
99
|
-
|
|
100
|
-
this.visible = value;
|
|
101
|
-
|
|
102
|
-
this.visibleChange.emit(value);
|
|
103
|
-
|
|
104
|
-
this.cdRef.markForCheck();
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
}
|
|
File without changes
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Directive, TemplateRef } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Directive({
|
|
4
|
-
selector: 'ng-template[byteTableCaption]',
|
|
5
|
-
standalone: true
|
|
6
|
-
})
|
|
7
|
-
export class ByteTableCaptionDirective {
|
|
8
|
-
constructor(public template: TemplateRef<any>) {}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@Directive({
|
|
12
|
-
selector: 'ng-template[byteTableHeader]',
|
|
13
|
-
standalone: true
|
|
14
|
-
})
|
|
15
|
-
export class ByteTableHeaderDirective {
|
|
16
|
-
constructor(public template: TemplateRef<any>) {}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@Directive({
|
|
20
|
-
selector: 'ng-template[byteTableBody]',
|
|
21
|
-
standalone: true
|
|
22
|
-
})
|
|
23
|
-
export class ByteTableBodyDirective {
|
|
24
|
-
constructor(public template: TemplateRef<any>) {}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@Directive({
|
|
28
|
-
selector: 'ng-template[byteTableFooter]',
|
|
29
|
-
standalone: true
|
|
30
|
-
})
|
|
31
|
-
export class ByteTableFooterDirective {
|
|
32
|
-
constructor(public template: TemplateRef<any>) {}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@Directive({
|
|
36
|
-
selector: 'ng-template[byteTableEmptyMessage]',
|
|
37
|
-
standalone: true
|
|
38
|
-
})
|
|
39
|
-
export class ByteTableEmptyMessageDirective {
|
|
40
|
-
constructor(public template: TemplateRef<any>) {}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@Directive({
|
|
44
|
-
selector: 'ng-template[byteTableSummary]',
|
|
45
|
-
standalone: true
|
|
46
|
-
})
|
|
47
|
-
export class ByteTableSummaryDirective {
|
|
48
|
-
constructor(public template: TemplateRef<any>) {}
|
|
49
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
<p-table
|
|
2
|
-
[value]="value"
|
|
3
|
-
[columns]="columns"
|
|
4
|
-
[paginator]="paginator"
|
|
5
|
-
[rows]="rows"
|
|
6
|
-
[rowsPerPageOptions]="rowsPerPageOptions"
|
|
7
|
-
[loading]="loading"
|
|
8
|
-
[sortField]="sortField"
|
|
9
|
-
[sortOrder]="sortOrder"
|
|
10
|
-
[selectionMode]="selectionMode"
|
|
11
|
-
[(selection)]="selection"
|
|
12
|
-
(selectionChange)="onSelectionChange($event)"
|
|
13
|
-
[dataKey]="dataKey"
|
|
14
|
-
[scrollable]="scrollable"
|
|
15
|
-
[tableStyle]="tableStyle"
|
|
16
|
-
>
|
|
17
|
-
|
|
18
|
-
@if (captionTemplate) {
|
|
19
|
-
|
|
20
|
-
<ng-template pTemplate="caption">
|
|
21
|
-
|
|
22
|
-
<ng-container [ngTemplateOutlet]="captionTemplate.template" />
|
|
23
|
-
|
|
24
|
-
</ng-template>
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@if (headerTemplate) {
|
|
29
|
-
|
|
30
|
-
<ng-template
|
|
31
|
-
pTemplate="header"
|
|
32
|
-
let-columns
|
|
33
|
-
>
|
|
34
|
-
|
|
35
|
-
<ng-container
|
|
36
|
-
[ngTemplateOutlet]="headerTemplate.template"
|
|
37
|
-
[ngTemplateOutletContext]="{ $implicit: columns }"
|
|
38
|
-
/>
|
|
39
|
-
|
|
40
|
-
</ng-template>
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@if (bodyTemplate) {
|
|
45
|
-
|
|
46
|
-
<ng-template
|
|
47
|
-
pTemplate="body"
|
|
48
|
-
let-rowData
|
|
49
|
-
let-columns="columns"
|
|
50
|
-
let-rowIndex="rowIndex"
|
|
51
|
-
>
|
|
52
|
-
|
|
53
|
-
<ng-container
|
|
54
|
-
[ngTemplateOutlet]="bodyTemplate.template"
|
|
55
|
-
[ngTemplateOutletContext]="{
|
|
56
|
-
$implicit: rowData,
|
|
57
|
-
columns: columns,
|
|
58
|
-
rowIndex: rowIndex
|
|
59
|
-
}"
|
|
60
|
-
/>
|
|
61
|
-
|
|
62
|
-
</ng-template>
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@if (footerTemplate) {
|
|
67
|
-
|
|
68
|
-
<ng-template
|
|
69
|
-
pTemplate="footer"
|
|
70
|
-
let-columns
|
|
71
|
-
>
|
|
72
|
-
|
|
73
|
-
<ng-container
|
|
74
|
-
[ngTemplateOutlet]="footerTemplate.template"
|
|
75
|
-
[ngTemplateOutletContext]="{ $implicit: columns }"
|
|
76
|
-
/>
|
|
77
|
-
|
|
78
|
-
</ng-template>
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@if (emptyMessageTemplate) {
|
|
83
|
-
|
|
84
|
-
<ng-template pTemplate="emptymessage">
|
|
85
|
-
|
|
86
|
-
<ng-container [ngTemplateOutlet]="emptyMessageTemplate.template" />
|
|
87
|
-
|
|
88
|
-
</ng-template>
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@if (summaryTemplate) {
|
|
93
|
-
|
|
94
|
-
<ng-template pTemplate="summary">
|
|
95
|
-
|
|
96
|
-
<ng-container [ngTemplateOutlet]="summaryTemplate.template" />
|
|
97
|
-
|
|
98
|
-
</ng-template>
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
</p-table>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
import { ByteTable } from './byte-table';
|
|
4
|
-
import {
|
|
5
|
-
ByteTableCaptionDirective,
|
|
6
|
-
ByteTableHeaderDirective,
|
|
7
|
-
ByteTableBodyDirective,
|
|
8
|
-
ByteTableFooterDirective,
|
|
9
|
-
ByteTableEmptyMessageDirective,
|
|
10
|
-
ByteTableSummaryDirective
|
|
11
|
-
} from './byte-table.directive';
|
|
12
|
-
|
|
13
|
-
@NgModule({
|
|
14
|
-
imports: [
|
|
15
|
-
ByteTable,
|
|
16
|
-
ByteTableCaptionDirective,
|
|
17
|
-
ByteTableHeaderDirective,
|
|
18
|
-
ByteTableBodyDirective,
|
|
19
|
-
ByteTableFooterDirective,
|
|
20
|
-
ByteTableEmptyMessageDirective,
|
|
21
|
-
ByteTableSummaryDirective
|
|
22
|
-
],
|
|
23
|
-
exports: [
|
|
24
|
-
ByteTable,
|
|
25
|
-
ByteTableCaptionDirective,
|
|
26
|
-
ByteTableHeaderDirective,
|
|
27
|
-
ByteTableBodyDirective,
|
|
28
|
-
ByteTableFooterDirective,
|
|
29
|
-
ByteTableEmptyMessageDirective,
|
|
30
|
-
ByteTableSummaryDirective
|
|
31
|
-
]
|
|
32
|
-
})
|
|
33
|
-
export class ByteTableModule {}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ByteTable } from './byte-table';
|
|
4
|
-
|
|
5
|
-
describe('ByteTable', () => {
|
|
6
|
-
let component: ByteTable;
|
|
7
|
-
let fixture: ComponentFixture<ByteTable>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [ByteTable],
|
|
12
|
-
}).compileComponents();
|
|
13
|
-
|
|
14
|
-
fixture = TestBed.createComponent(ByteTable);
|
|
15
|
-
component = fixture.componentInstance;
|
|
16
|
-
await fixture.whenStable();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('should create', () => {
|
|
20
|
-
expect(component).toBeTruthy();
|
|
21
|
-
});
|
|
22
|
-
});
|