@duyanhdev/mvp-ifs-ui-kit 21.0.0
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/.editorconfig +16 -0
- package/.gitmodules +3 -0
- package/.postcssrc.json +5 -0
- package/.prettierignore +14 -0
- package/.prettierrc.json +29 -0
- package/LICENSE.md +21 -0
- package/README.md +59 -0
- package/angular.json +98 -0
- package/eslint.config.js +89 -0
- package/package.json +59 -0
- package/public/demo/images/flag/flag_placeholder.png +0 -0
- package/public/demo/images/footer-image.gif +0 -0
- package/public/demo/images/galleria/galleria1.jpg +0 -0
- package/public/demo/images/galleria/galleria10.jpg +0 -0
- package/public/demo/images/galleria/galleria10s.jpg +0 -0
- package/public/demo/images/galleria/galleria11.jpg +0 -0
- package/public/demo/images/galleria/galleria11s.jpg +0 -0
- package/public/demo/images/galleria/galleria12.jpg +0 -0
- package/public/demo/images/galleria/galleria12s.jpg +0 -0
- package/public/demo/images/galleria/galleria13.jpg +0 -0
- package/public/demo/images/galleria/galleria13s.jpg +0 -0
- package/public/demo/images/galleria/galleria14.jpg +0 -0
- package/public/demo/images/galleria/galleria14s.jpg +0 -0
- package/public/demo/images/galleria/galleria15.jpg +0 -0
- package/public/demo/images/galleria/galleria15s.jpg +0 -0
- package/public/demo/images/galleria/galleria1s.jpg +0 -0
- package/public/demo/images/galleria/galleria2.jpg +0 -0
- package/public/demo/images/galleria/galleria2s.jpg +0 -0
- package/public/demo/images/galleria/galleria3.jpg +0 -0
- package/public/demo/images/galleria/galleria3s.jpg +0 -0
- package/public/demo/images/galleria/galleria4.jpg +0 -0
- package/public/demo/images/galleria/galleria4s.jpg +0 -0
- package/public/demo/images/galleria/galleria5.jpg +0 -0
- package/public/demo/images/galleria/galleria5s.jpg +0 -0
- package/public/demo/images/galleria/galleria6.jpg +0 -0
- package/public/demo/images/galleria/galleria6s.jpg +0 -0
- package/public/demo/images/galleria/galleria7.jpg +0 -0
- package/public/demo/images/galleria/galleria7s.jpg +0 -0
- package/public/demo/images/galleria/galleria8.jpg +0 -0
- package/public/demo/images/galleria/galleria8s.jpg +0 -0
- package/public/demo/images/galleria/galleria9.jpg +0 -0
- package/public/demo/images/galleria/galleria9s.jpg +0 -0
- package/public/demo/images/product/bamboo-watch.jpg +0 -0
- package/public/demo/images/product/black-watch.jpg +0 -0
- package/public/demo/images/product/blue-band.jpg +0 -0
- package/public/demo/images/product/blue-t-shirt.jpg +0 -0
- package/public/demo/images/product/bracelet.jpg +0 -0
- package/public/demo/images/product/brown-purse.jpg +0 -0
- package/public/demo/images/product/chakra-bracelet.jpg +0 -0
- package/public/demo/images/product/galaxy-earrings.jpg +0 -0
- package/public/demo/images/product/game-controller.jpg +0 -0
- package/public/demo/images/product/gaming-set.jpg +0 -0
- package/public/demo/images/product/gold-phone-case.jpg +0 -0
- package/public/demo/images/product/green-earbuds.jpg +0 -0
- package/public/demo/images/product/green-t-shirt.jpg +0 -0
- package/public/demo/images/product/grey-t-shirt.jpg +0 -0
- package/public/demo/images/product/headphones.jpg +0 -0
- package/public/demo/images/product/light-green-t-shirt.jpg +0 -0
- package/public/demo/images/product/lime-band.jpg +0 -0
- package/public/demo/images/product/mini-speakers.jpg +0 -0
- package/public/demo/images/product/painted-phone-case.jpg +0 -0
- package/public/demo/images/product/pink-band.jpg +0 -0
- package/public/demo/images/product/pink-purse.jpg +0 -0
- package/public/demo/images/product/product-placeholder.svg +10 -0
- package/public/demo/images/product/purple-band.jpg +0 -0
- package/public/demo/images/product/purple-gemstone-necklace.jpg +0 -0
- package/public/demo/images/product/purple-t-shirt.jpg +0 -0
- package/public/demo/images/product/shoes.jpg +0 -0
- package/public/demo/images/product/sneakers.jpg +0 -0
- package/public/demo/images/product/teal-t-shirt.jpg +0 -0
- package/public/demo/images/product/yellow-earbuds.jpg +0 -0
- package/public/demo/images/product/yoga-mat.jpg +0 -0
- package/public/demo/images/product/yoga-set.jpg +0 -0
- package/src/app/layout/component/configurator/app.configurator.html +48 -0
- package/src/app/layout/component/configurator/app.configurator.ts +396 -0
- package/src/app/layout/component/floatingconfigurator/app.floatingconfigurator.ts +31 -0
- package/src/app/layout/component/footer/app.footer.scss +52 -0
- package/src/app/layout/component/footer/app.footer.ts +26 -0
- package/src/app/layout/component/layout/app.layout.ts +50 -0
- package/src/app/layout/component/menu/app.menu.html +7 -0
- package/src/app/layout/component/menu/app.menu.scss +13 -0
- package/src/app/layout/component/menu/app.menu.ts +90 -0
- package/src/app/layout/component/menuitem/app.menuitem.html +56 -0
- package/src/app/layout/component/menuitem/app.menuitem.scss +218 -0
- package/src/app/layout/component/menuitem/app.menuitem.ts +126 -0
- package/src/app/layout/component/sidebar/app.sidebar.html +3 -0
- package/src/app/layout/component/sidebar/app.sidebar.scss +0 -0
- package/src/app/layout/component/sidebar/app.sidebar.ts +106 -0
- package/src/app/layout/component/topbar/app.topbar.html +190 -0
- package/src/app/layout/component/topbar/app.topbar.scss +8 -0
- package/src/app/layout/component/topbar/app.topbar.ts +68 -0
- package/src/app/layout/service/layout.service.ts +117 -0
- package/src/app/pages/auth/access.ts +32 -0
- package/src/app/pages/auth/auth.routes.ts +10 -0
- package/src/app/pages/auth/error.ts +32 -0
- package/src/app/pages/auth/login.ts +71 -0
- package/src/app/pages/crud/crud.ts +387 -0
- package/src/app/pages/dashboard/dashboard.css +778 -0
- package/src/app/pages/dashboard/dashboard.html +191 -0
- package/src/app/pages/dashboard/dashboard.ts +348 -0
- package/src/app/pages/documentation/documentation.ts +73 -0
- package/src/app/pages/empty/empty.ts +11 -0
- package/src/app/pages/landing/components/featureswidget.ts +139 -0
- package/src/app/pages/landing/components/footerwidget.ts +73 -0
- package/src/app/pages/landing/components/herowidget.ts +25 -0
- package/src/app/pages/landing/components/highlightswidget.ts +46 -0
- package/src/app/pages/landing/components/pricingwidget.ts +119 -0
- package/src/app/pages/landing/components/topbarwidget.component.ts +68 -0
- package/src/app/pages/landing/landing.ts +31 -0
- package/src/app/pages/notfound/notfound.ts +68 -0
- package/src/app/pages/pages.routes.ts +17 -0
- package/src/app/pages/profile/profile.html +57 -0
- package/src/app/pages/profile/profile.scss +145 -0
- package/src/app/pages/profile/profile.ts +19 -0
- package/src/app/pages/service/country.service.ts +255 -0
- package/src/app/pages/service/customer.service.ts +9057 -0
- package/src/app/pages/service/icon.service.ts +23 -0
- package/src/app/pages/service/node.service.ts +816 -0
- package/src/app/pages/service/photo.service.ts +103 -0
- package/src/app/pages/service/product.service.ts +1322 -0
- package/src/app/pages/tickets/tickets-create/tickets-create.html +140 -0
- package/src/app/pages/tickets/tickets-create/tickets-create.scss +617 -0
- package/src/app/pages/tickets/tickets-create/tickets-create.ts +104 -0
- package/src/app/pages/tickets/tickets-list/ticket-list.html +150 -0
- package/src/app/pages/tickets/tickets-list/ticket-list.scss +392 -0
- package/src/app/pages/tickets/tickets-list/ticket-list.ts +178 -0
- package/src/app/pages/uikit/buttondemo.ts +254 -0
- package/src/app/pages/uikit/chartdemo.ts +290 -0
- package/src/app/pages/uikit/filedemo.ts +52 -0
- package/src/app/pages/uikit/formlayoutdemo.ts +129 -0
- package/src/app/pages/uikit/inputdemo.ts +339 -0
- package/src/app/pages/uikit/listdemo.ts +217 -0
- package/src/app/pages/uikit/mediademo.ts +1021 -0
- package/src/app/pages/uikit/menudemo.ts +540 -0
- package/src/app/pages/uikit/messagesdemo.ts +101 -0
- package/src/app/pages/uikit/miscdemo.ts +192 -0
- package/src/app/pages/uikit/overlaydemo.ts +235 -0
- package/src/app/pages/uikit/panelsdemo.ts +235 -0
- package/src/app/pages/uikit/tabledemo.ts +568 -0
- package/src/app/pages/uikit/timelinedemo.ts +141 -0
- package/src/app/pages/uikit/treedemo.ts +75 -0
- package/src/app/pages/uikit/uikit.routes.ts +35 -0
- package/src/app.component.ts +22 -0
- package/src/app.config.ts +23 -0
- package/src/app.routes.ts +23 -0
- package/src/assets/demo/code.scss +17 -0
- package/src/assets/demo/demo.scss +2 -0
- package/src/assets/demo/flags/flags.css +984 -0
- package/src/assets/layout/_core.scss +24 -0
- package/src/assets/layout/_footer.scss +8 -0
- package/src/assets/layout/_main.scss +21 -0
- package/src/assets/layout/_menu.scss +159 -0
- package/src/assets/layout/_mixins.scss +15 -0
- package/src/assets/layout/_preloading.scss +47 -0
- package/src/assets/layout/_responsive.scss +111 -0
- package/src/assets/layout/_topbar.scss +201 -0
- package/src/assets/layout/_typography.scss +68 -0
- package/src/assets/layout/_utils.scss +25 -0
- package/src/assets/layout/layout.scss +13 -0
- package/src/assets/layout/variables/_common.scss +21 -0
- package/src/assets/layout/variables/_dark.scss +5 -0
- package/src/assets/layout/variables/_light.scss +5 -0
- package/src/assets/styles.scss +4 -0
- package/src/assets/tailwind.css +32 -0
- package/src/index.html +15 -0
- package/src/main.ts +5 -0
- package/tsconfig.app.json +15 -0
- package/tsconfig.json +33 -0
- package/tsconfig.spec.json +15 -0
- package/vercel.json +9 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import {Component, effect, inject, signal} from '@angular/core';
|
|
2
|
+
import {ChartModule} from 'primeng/chart';
|
|
3
|
+
import {FluidModule} from 'primeng/fluid';
|
|
4
|
+
import {LayoutService} from '@/app/layout/service/layout.service';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-chart-demo',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [ChartModule, FluidModule],
|
|
10
|
+
template: `
|
|
11
|
+
<p-fluid class="grid grid-cols-12 gap-8">
|
|
12
|
+
<div class="col-span-12 xl:col-span-6">
|
|
13
|
+
<div class="card">
|
|
14
|
+
<div class="font-semibold text-xl mb-6">Linear</div>
|
|
15
|
+
<p-chart type="line" [data]="lineData()" [options]="lineOptions()"></p-chart>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="col-span-12 xl:col-span-6">
|
|
19
|
+
<div class="card">
|
|
20
|
+
<div class="font-semibold text-xl mb-6">Bar</div>
|
|
21
|
+
<p-chart type="bar" [data]="barData()" [options]="barOptions()"></p-chart>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="col-span-12 xl:col-span-6">
|
|
25
|
+
<div class="card flex flex-col items-center">
|
|
26
|
+
<div class="font-semibold text-xl mb-6">Pie</div>
|
|
27
|
+
<p-chart type="pie" [data]="pieData()" [options]="pieOptions()"></p-chart>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="col-span-12 xl:col-span-6">
|
|
31
|
+
<div class="card flex flex-col items-center">
|
|
32
|
+
<div class="font-semibold text-xl mb-6">Doughnut</div>
|
|
33
|
+
<p-chart type="doughnut" [data]="pieData()" [options]="pieOptions()"></p-chart>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="col-span-12 xl:col-span-6">
|
|
37
|
+
<div class="card flex flex-col items-center">
|
|
38
|
+
<div class="font-semibold text-xl mb-6">Polar Area</div>
|
|
39
|
+
<p-chart type="polarArea" [data]="polarData()" [options]="polarOptions()"></p-chart>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="col-span-12 xl:col-span-6">
|
|
43
|
+
<div class="card flex flex-col items-center">
|
|
44
|
+
<div class="font-semibold text-xl mb-6">Radar</div>
|
|
45
|
+
<p-chart type="radar" [data]="radarData()" [options]="radarOptions()"></p-chart>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</p-fluid>
|
|
49
|
+
`
|
|
50
|
+
})
|
|
51
|
+
export class ChartDemo {
|
|
52
|
+
layoutService = inject(LayoutService);
|
|
53
|
+
|
|
54
|
+
lineData = signal<any>(null);
|
|
55
|
+
|
|
56
|
+
barData = signal<any>(null);
|
|
57
|
+
|
|
58
|
+
pieData = signal<any>(null);
|
|
59
|
+
|
|
60
|
+
polarData = signal<any>(null);
|
|
61
|
+
|
|
62
|
+
radarData = signal<any>(null);
|
|
63
|
+
|
|
64
|
+
lineOptions = signal<any>(null);
|
|
65
|
+
|
|
66
|
+
barOptions = signal<any>(null);
|
|
67
|
+
|
|
68
|
+
pieOptions = signal<any>(null);
|
|
69
|
+
|
|
70
|
+
polarOptions = signal<any>(null);
|
|
71
|
+
|
|
72
|
+
radarOptions = signal<any>(null);
|
|
73
|
+
|
|
74
|
+
chartEffect = effect(() => {
|
|
75
|
+
this.layoutService.layoutConfig().darkTheme;
|
|
76
|
+
setTimeout(() => this.initCharts(), 150);
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
initCharts() {
|
|
80
|
+
const documentStyle = getComputedStyle(document.documentElement);
|
|
81
|
+
const textColor = documentStyle.getPropertyValue('--text-color');
|
|
82
|
+
const textColorSecondary = documentStyle.getPropertyValue('--text-color-secondary');
|
|
83
|
+
const surfaceBorder = documentStyle.getPropertyValue('--surface-border');
|
|
84
|
+
|
|
85
|
+
this.barData.set({
|
|
86
|
+
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
|
87
|
+
datasets: [
|
|
88
|
+
{
|
|
89
|
+
label: 'My First dataset',
|
|
90
|
+
backgroundColor: documentStyle.getPropertyValue('--p-primary-500'),
|
|
91
|
+
borderColor: documentStyle.getPropertyValue('--p-primary-500'),
|
|
92
|
+
data: [65, 59, 80, 81, 56, 55, 40]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
label: 'My Second dataset',
|
|
96
|
+
backgroundColor: documentStyle.getPropertyValue('--p-primary-200'),
|
|
97
|
+
borderColor: documentStyle.getPropertyValue('--p-primary-200'),
|
|
98
|
+
data: [28, 48, 40, 19, 86, 27, 90]
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
this.barOptions.set({
|
|
104
|
+
maintainAspectRatio: false,
|
|
105
|
+
aspectRatio: 0.8,
|
|
106
|
+
plugins: {
|
|
107
|
+
legend: {
|
|
108
|
+
labels: {
|
|
109
|
+
color: textColor
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
scales: {
|
|
114
|
+
x: {
|
|
115
|
+
ticks: {
|
|
116
|
+
color: textColorSecondary,
|
|
117
|
+
font: {
|
|
118
|
+
weight: 500
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
grid: {
|
|
122
|
+
display: false,
|
|
123
|
+
drawBorder: false
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
y: {
|
|
127
|
+
ticks: {
|
|
128
|
+
color: textColorSecondary
|
|
129
|
+
},
|
|
130
|
+
grid: {
|
|
131
|
+
color: surfaceBorder,
|
|
132
|
+
drawBorder: false
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
this.pieData.set({
|
|
139
|
+
labels: ['A', 'B', 'C'],
|
|
140
|
+
datasets: [
|
|
141
|
+
{
|
|
142
|
+
data: [540, 325, 702],
|
|
143
|
+
backgroundColor: [documentStyle.getPropertyValue('--p-indigo-500'), documentStyle.getPropertyValue('--p-purple-500'), documentStyle.getPropertyValue('--p-teal-500')],
|
|
144
|
+
hoverBackgroundColor: [documentStyle.getPropertyValue('--p-indigo-400'), documentStyle.getPropertyValue('--p-purple-400'), documentStyle.getPropertyValue('--p-teal-400')]
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
this.pieOptions.set({
|
|
150
|
+
plugins: {
|
|
151
|
+
legend: {
|
|
152
|
+
labels: {
|
|
153
|
+
usePointStyle: true,
|
|
154
|
+
color: textColor
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
this.lineData.set({
|
|
161
|
+
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
|
162
|
+
datasets: [
|
|
163
|
+
{
|
|
164
|
+
label: 'First Dataset',
|
|
165
|
+
data: [65, 59, 80, 81, 56, 55, 40],
|
|
166
|
+
fill: false,
|
|
167
|
+
backgroundColor: documentStyle.getPropertyValue('--p-primary-500'),
|
|
168
|
+
borderColor: documentStyle.getPropertyValue('--p-primary-500'),
|
|
169
|
+
tension: 0.4
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
label: 'Second Dataset',
|
|
173
|
+
data: [28, 48, 40, 19, 86, 27, 90],
|
|
174
|
+
fill: false,
|
|
175
|
+
backgroundColor: documentStyle.getPropertyValue('--p-primary-200'),
|
|
176
|
+
borderColor: documentStyle.getPropertyValue('--p-primary-200'),
|
|
177
|
+
tension: 0.4
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
this.lineOptions.set({
|
|
183
|
+
maintainAspectRatio: false,
|
|
184
|
+
aspectRatio: 0.8,
|
|
185
|
+
plugins: {
|
|
186
|
+
legend: {
|
|
187
|
+
labels: {
|
|
188
|
+
color: textColor
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
scales: {
|
|
193
|
+
x: {
|
|
194
|
+
ticks: {
|
|
195
|
+
color: textColorSecondary
|
|
196
|
+
},
|
|
197
|
+
grid: {
|
|
198
|
+
color: surfaceBorder,
|
|
199
|
+
drawBorder: false
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
y: {
|
|
203
|
+
ticks: {
|
|
204
|
+
color: textColorSecondary
|
|
205
|
+
},
|
|
206
|
+
grid: {
|
|
207
|
+
color: surfaceBorder,
|
|
208
|
+
drawBorder: false
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
this.polarData.set({
|
|
215
|
+
datasets: [
|
|
216
|
+
{
|
|
217
|
+
data: [11, 16, 7, 3],
|
|
218
|
+
backgroundColor: [documentStyle.getPropertyValue('--p-indigo-500'), documentStyle.getPropertyValue('--p-purple-500'), documentStyle.getPropertyValue('--p-teal-500'), documentStyle.getPropertyValue('--p-orange-500')],
|
|
219
|
+
label: 'My dataset'
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
labels: ['Indigo', 'Purple', 'Teal', 'Orange']
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
this.polarOptions.set({
|
|
226
|
+
plugins: {
|
|
227
|
+
legend: {
|
|
228
|
+
labels: {
|
|
229
|
+
color: textColor
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
scales: {
|
|
234
|
+
r: {
|
|
235
|
+
grid: {
|
|
236
|
+
color: surfaceBorder
|
|
237
|
+
},
|
|
238
|
+
ticks: {
|
|
239
|
+
display: false,
|
|
240
|
+
color: textColorSecondary
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
this.radarData.set({
|
|
247
|
+
labels: ['Eating', 'Drinking', 'Sleeping', 'Designing', 'Coding', 'Cycling', 'Running'],
|
|
248
|
+
datasets: [
|
|
249
|
+
{
|
|
250
|
+
label: 'My First dataset',
|
|
251
|
+
borderColor: documentStyle.getPropertyValue('--p-indigo-400'),
|
|
252
|
+
pointBackgroundColor: documentStyle.getPropertyValue('--p-indigo-400'),
|
|
253
|
+
pointBorderColor: documentStyle.getPropertyValue('--p-indigo-400'),
|
|
254
|
+
pointHoverBackgroundColor: textColor,
|
|
255
|
+
pointHoverBorderColor: documentStyle.getPropertyValue('--p-indigo-400'),
|
|
256
|
+
data: [65, 59, 90, 81, 56, 55, 40]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
label: 'My Second dataset',
|
|
260
|
+
borderColor: documentStyle.getPropertyValue('--p-purple-400'),
|
|
261
|
+
pointBackgroundColor: documentStyle.getPropertyValue('--p-purple-400'),
|
|
262
|
+
pointBorderColor: documentStyle.getPropertyValue('--p-purple-400'),
|
|
263
|
+
pointHoverBackgroundColor: textColor,
|
|
264
|
+
pointHoverBorderColor: documentStyle.getPropertyValue('--p-purple-400'),
|
|
265
|
+
data: [28, 48, 40, 19, 96, 27, 100]
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
this.radarOptions.set({
|
|
271
|
+
plugins: {
|
|
272
|
+
legend: {
|
|
273
|
+
labels: {
|
|
274
|
+
color: textColor
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
scales: {
|
|
279
|
+
r: {
|
|
280
|
+
pointLabels: {
|
|
281
|
+
color: textColor
|
|
282
|
+
},
|
|
283
|
+
grid: {
|
|
284
|
+
color: surfaceBorder
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component } from '@angular/core';
|
|
3
|
+
import { MessageService } from 'primeng/api';
|
|
4
|
+
import { ButtonModule } from 'primeng/button';
|
|
5
|
+
import { FileUploadModule } from 'primeng/fileupload';
|
|
6
|
+
import { ToastModule } from 'primeng/toast';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'app-file-demo',
|
|
10
|
+
standalone: true,
|
|
11
|
+
imports: [CommonModule, FileUploadModule, ToastModule, ButtonModule],
|
|
12
|
+
template: `<p-toast />
|
|
13
|
+
<div class="grid grid-cols-12 gap-8">
|
|
14
|
+
<div class="col-span-full lg:col-span-6">
|
|
15
|
+
<div class="card">
|
|
16
|
+
<div class="font-semibold text-xl mb-4">Advanced</div>
|
|
17
|
+
<p-fileupload name="demo[]" (onUpload)="onUpload($event)" [multiple]="true" accept="image/*" maxFileSize="1000000" mode="advanced" url="https://www.primefaces.org/cdn/api/upload.php">
|
|
18
|
+
<ng-template #empty>
|
|
19
|
+
<div>Drag and drop files to here to upload.</div>
|
|
20
|
+
</ng-template>
|
|
21
|
+
</p-fileupload>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="col-span-full lg:col-span-6">
|
|
25
|
+
<div class="card">
|
|
26
|
+
<div class="font-semibold text-xl mb-4">Basic</div>
|
|
27
|
+
<div class="flex flex-col gap-4 items-center justify-center">
|
|
28
|
+
<p-fileupload #fu mode="basic" chooseLabel="Choose" chooseIcon="pi pi-upload" name="demo[]" url="https://www.primefaces.org/cdn/api/upload.php" accept="image/*" maxFileSize="1000000" (onUpload)="onUpload($event)" />
|
|
29
|
+
<p-button label="Upload" (onClick)="fu.upload()" severity="secondary" />
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>`,
|
|
34
|
+
providers: [MessageService]
|
|
35
|
+
})
|
|
36
|
+
export class FileDemo {
|
|
37
|
+
uploadedFiles: any[] = [];
|
|
38
|
+
|
|
39
|
+
constructor(private messageService: MessageService) {}
|
|
40
|
+
|
|
41
|
+
onUpload(event: any) {
|
|
42
|
+
for (const file of event.files) {
|
|
43
|
+
this.uploadedFiles.push(file);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
this.messageService.add({ severity: 'info', summary: 'Success', detail: 'File Uploaded' });
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
onBasicUpload() {
|
|
50
|
+
this.messageService.add({ severity: 'info', summary: 'Success', detail: 'File Uploaded with Basic Mode' });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { FluidModule } from 'primeng/fluid';
|
|
3
|
+
import { InputTextModule } from 'primeng/inputtext';
|
|
4
|
+
import { ButtonModule } from 'primeng/button';
|
|
5
|
+
import { SelectModule } from 'primeng/select';
|
|
6
|
+
import { FormsModule } from '@angular/forms';
|
|
7
|
+
import { TextareaModule } from 'primeng/textarea';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'app-formlayout-demo',
|
|
11
|
+
standalone: true,
|
|
12
|
+
imports: [InputTextModule, FluidModule, ButtonModule, SelectModule, FormsModule, TextareaModule],
|
|
13
|
+
template: `<p-fluid>
|
|
14
|
+
<div class="flex flex-col md:flex-row gap-8">
|
|
15
|
+
<div class="md:w-1/2">
|
|
16
|
+
<div class="card flex flex-col gap-4">
|
|
17
|
+
<div class="font-semibold text-xl">Vertical</div>
|
|
18
|
+
<div class="flex flex-col gap-2">
|
|
19
|
+
<label for="name1">Name</label>
|
|
20
|
+
<input pInputText id="name1" type="text" />
|
|
21
|
+
</div>
|
|
22
|
+
<div class="flex flex-col gap-2">
|
|
23
|
+
<label for="email1">Email</label>
|
|
24
|
+
<input pInputText id="email1" type="text" />
|
|
25
|
+
</div>
|
|
26
|
+
<div class="flex flex-col gap-2">
|
|
27
|
+
<label for="age1">Age</label>
|
|
28
|
+
<input pInputText id="age1" type="text" />
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div class="card flex flex-col gap-4">
|
|
33
|
+
<div class="font-semibold text-xl">Vertical Grid</div>
|
|
34
|
+
<div class="flex flex-wrap gap-6">
|
|
35
|
+
<div class="flex flex-col grow basis-0 gap-2">
|
|
36
|
+
<label for="name2">Name</label>
|
|
37
|
+
<input pInputText id="name2" type="text" />
|
|
38
|
+
</div>
|
|
39
|
+
<div class="flex flex-col grow basis-0 gap-2">
|
|
40
|
+
<label for="email2">Email</label>
|
|
41
|
+
<input pInputText id="email2" type="text" />
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="md:w-1/2">
|
|
47
|
+
<div class="card flex flex-col gap-4">
|
|
48
|
+
<div class="font-semibold text-xl">Horizontal</div>
|
|
49
|
+
<div class="grid grid-cols-12 gap-4 grid-cols-12 gap-2">
|
|
50
|
+
<label for="name3" class="flex items-center col-span-12 mb-2 md:col-span-2 md:mb-0">Name</label>
|
|
51
|
+
<div class="col-span-12 md:col-span-10">
|
|
52
|
+
<input pInputText id="name3" type="text" />
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="grid grid-cols-12 gap-4 grid-cols-12 gap-2">
|
|
56
|
+
<label for="email3" class="flex items-center col-span-12 mb-2 md:col-span-2 md:mb-0">Email</label>
|
|
57
|
+
<div class="col-span-12 md:col-span-10">
|
|
58
|
+
<input pInputText id="email3" type="text" />
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div class="card flex flex-col gap-4">
|
|
64
|
+
<div class="font-semibold text-xl">Inline</div>
|
|
65
|
+
<div class="flex flex-wrap items-start gap-6">
|
|
66
|
+
<div class="field">
|
|
67
|
+
<label for="firstname1" class="sr-only">Firstname</label>
|
|
68
|
+
<input pInputText id="firstname1" type="text" placeholder="Firstname" />
|
|
69
|
+
</div>
|
|
70
|
+
<div class="field">
|
|
71
|
+
<label for="lastname1" class="sr-only">Lastname</label>
|
|
72
|
+
<input pInputText id="lastname1" type="text" placeholder="Lastname" />
|
|
73
|
+
</div>
|
|
74
|
+
<p-button label="Submit" [fluid]="false"></p-button>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="card flex flex-col gap-4">
|
|
78
|
+
<div class="font-semibold text-xl">Help Text</div>
|
|
79
|
+
<div class="flex flex-wrap gap-2">
|
|
80
|
+
<label for="username">Username</label>
|
|
81
|
+
<input pInputText id="username" type="text" />
|
|
82
|
+
<small>Enter your username to reset your password.</small>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<div class="flex mt-8">
|
|
89
|
+
<div class="card flex flex-col gap-6 w-full">
|
|
90
|
+
<div class="font-semibold text-xl">Advanced</div>
|
|
91
|
+
<div class="flex flex-col md:flex-row gap-6">
|
|
92
|
+
<div class="flex flex-wrap gap-2 w-full">
|
|
93
|
+
<label for="firstname2">Firstname</label>
|
|
94
|
+
<input pInputText id="firstname2" type="text" />
|
|
95
|
+
</div>
|
|
96
|
+
<div class="flex flex-wrap gap-2 w-full">
|
|
97
|
+
<label for="lastname2">Lastname</label>
|
|
98
|
+
<input pInputText id="lastname2" type="text" />
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<div class="flex flex-wrap">
|
|
103
|
+
<label for="address">Address</label>
|
|
104
|
+
<textarea pTextarea id="address" rows="4"></textarea>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<div class="flex flex-col md:flex-row gap-6">
|
|
108
|
+
<div class="flex flex-wrap gap-2 w-full">
|
|
109
|
+
<label for="state">State</label>
|
|
110
|
+
<p-select id="state" [(ngModel)]="dropdownItem" [options]="dropdownItems" optionLabel="name" placeholder="Select One" class="w-full"></p-select>
|
|
111
|
+
</div>
|
|
112
|
+
<div class="flex flex-wrap gap-2 w-full">
|
|
113
|
+
<label for="zip">Zip</label>
|
|
114
|
+
<input pInputText id="zip" type="text" />
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</p-fluid>`
|
|
120
|
+
})
|
|
121
|
+
export class FormLayoutDemo {
|
|
122
|
+
dropdownItems = [
|
|
123
|
+
{ name: 'Option 1', code: 'Option 1' },
|
|
124
|
+
{ name: 'Option 2', code: 'Option 2' },
|
|
125
|
+
{ name: 'Option 3', code: 'Option 3' }
|
|
126
|
+
];
|
|
127
|
+
|
|
128
|
+
dropdownItem = null;
|
|
129
|
+
}
|