@unipin/angular-applet 21.1.0 → 21.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +334 -37
  2. package/fesm2022/unipin-angular-applet-accordion.mjs +23 -23
  3. package/fesm2022/unipin-angular-applet-accordion.mjs.map +1 -1
  4. package/fesm2022/unipin-angular-applet-alert-dialog.mjs +93 -79
  5. package/fesm2022/unipin-angular-applet-alert-dialog.mjs.map +1 -1
  6. package/fesm2022/unipin-angular-applet-alert.mjs +13 -13
  7. package/fesm2022/unipin-angular-applet-alert.mjs.map +1 -1
  8. package/fesm2022/unipin-angular-applet-approval.mjs +129 -0
  9. package/fesm2022/unipin-angular-applet-approval.mjs.map +1 -0
  10. package/fesm2022/unipin-angular-applet-auth.mjs +44 -25
  11. package/fesm2022/unipin-angular-applet-auth.mjs.map +1 -1
  12. package/fesm2022/unipin-angular-applet-avatar.mjs +4 -4
  13. package/fesm2022/unipin-angular-applet-avatar.mjs.map +1 -1
  14. package/fesm2022/unipin-angular-applet-badge.mjs +5 -5
  15. package/fesm2022/unipin-angular-applet-badge.mjs.map +1 -1
  16. package/fesm2022/unipin-angular-applet-buttons.mjs +10 -10
  17. package/fesm2022/unipin-angular-applet-buttons.mjs.map +1 -1
  18. package/fesm2022/unipin-angular-applet-calendar.mjs +25 -25
  19. package/fesm2022/unipin-angular-applet-calendar.mjs.map +1 -1
  20. package/fesm2022/unipin-angular-applet-collapsible.mjs +14 -14
  21. package/fesm2022/unipin-angular-applet-collapsible.mjs.map +1 -1
  22. package/fesm2022/unipin-angular-applet-common.mjs +60 -23
  23. package/fesm2022/unipin-angular-applet-common.mjs.map +1 -1
  24. package/fesm2022/unipin-angular-applet-containers.mjs +20 -20
  25. package/fesm2022/unipin-angular-applet-containers.mjs.map +1 -1
  26. package/fesm2022/unipin-angular-applet-dialog.mjs +74 -56
  27. package/fesm2022/unipin-angular-applet-dialog.mjs.map +1 -1
  28. package/fesm2022/unipin-angular-applet-forms.mjs +571 -256
  29. package/fesm2022/unipin-angular-applet-forms.mjs.map +1 -1
  30. package/fesm2022/unipin-angular-applet-froala.mjs +8 -8
  31. package/fesm2022/unipin-angular-applet-froala.mjs.map +1 -1
  32. package/fesm2022/unipin-angular-applet-infinite-scroll.mjs +5 -5
  33. package/fesm2022/unipin-angular-applet-infinite-scroll.mjs.map +1 -1
  34. package/fesm2022/unipin-angular-applet-json-viewer.mjs +7 -7
  35. package/fesm2022/unipin-angular-applet-json-viewer.mjs.map +1 -1
  36. package/fesm2022/unipin-angular-applet-kbd.mjs +4 -4
  37. package/fesm2022/unipin-angular-applet-kbd.mjs.map +1 -1
  38. package/fesm2022/unipin-angular-applet-loading-dialog.mjs +8 -8
  39. package/fesm2022/unipin-angular-applet-loading-dialog.mjs.map +1 -1
  40. package/fesm2022/unipin-angular-applet-markdown.mjs +17 -17
  41. package/fesm2022/unipin-angular-applet-markdown.mjs.map +1 -1
  42. package/fesm2022/unipin-angular-applet-popover.mjs +18 -18
  43. package/fesm2022/unipin-angular-applet-popover.mjs.map +1 -1
  44. package/fesm2022/unipin-angular-applet-progress-bar.mjs +7 -7
  45. package/fesm2022/unipin-angular-applet-progress-bar.mjs.map +1 -1
  46. package/fesm2022/unipin-angular-applet-skeleton.mjs +4 -4
  47. package/fesm2022/unipin-angular-applet-skeleton.mjs.map +1 -1
  48. package/fesm2022/unipin-angular-applet-spinner.mjs +5 -5
  49. package/fesm2022/unipin-angular-applet-spinner.mjs.map +1 -1
  50. package/fesm2022/unipin-angular-applet-stepper.mjs +288 -0
  51. package/fesm2022/unipin-angular-applet-stepper.mjs.map +1 -0
  52. package/fesm2022/unipin-angular-applet-swipeable.mjs +24 -24
  53. package/fesm2022/unipin-angular-applet-swipeable.mjs.map +1 -1
  54. package/fesm2022/unipin-angular-applet-tabs.mjs +19 -19
  55. package/fesm2022/unipin-angular-applet-tabs.mjs.map +1 -1
  56. package/fesm2022/unipin-angular-applet-tooltip.mjs +5 -5
  57. package/fesm2022/unipin-angular-applet-tooltip.mjs.map +1 -1
  58. package/package.json +9 -1
  59. package/types/unipin-angular-applet-alert-dialog.d.ts +12 -1
  60. package/types/unipin-angular-applet-approval.d.ts +55 -0
  61. package/types/unipin-angular-applet-common.d.ts +12 -2
  62. package/types/unipin-angular-applet-dialog.d.ts +6 -4
  63. package/types/unipin-angular-applet-forms.d.ts +118 -39
  64. package/types/unipin-angular-applet-stepper.d.ts +43 -0
@@ -5,14 +5,13 @@ import { Validators, ReactiveFormsModule } from '@angular/forms';
5
5
  import { UpButtonDirective } from '@unipin/angular-applet/buttons';
6
6
  import * as i1$1 from '@unipin/angular-applet/dialog';
7
7
  import { UpDialogRef, injectDialogContext } from '@unipin/angular-applet/dialog';
8
- import { UpCheckboxDirective, UpPasswordComponent, UpInputDirective, UpFormFieldComponent } from '@unipin/angular-applet/forms';
9
8
 
10
9
  class UpAlertComponent {
11
10
  constructor(fb) {
12
11
  this.fb = fb;
13
12
  this.dialogRef = inject(UpDialogRef);
14
13
  this.opts = injectDialogContext();
15
- this.state = computed(() => this.dialogRef?.state() ?? 'closed', { ...(ngDevMode ? { debugName: "state" } : {}) });
14
+ this.state = computed(() => this.dialogRef?.state() ?? 'closed', ...(ngDevMode ? [{ debugName: "state" }] : []));
16
15
  const fields = this.opts.fields;
17
16
  if (fields) {
18
17
  this.form = this.fb.group({});
@@ -42,8 +41,8 @@ class UpAlertComponent {
42
41
  }
43
42
  this.dialogRef.close();
44
43
  }
45
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAlertComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
46
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.1", type: UpAlertComponent, isStandalone: true, selector: "up-alert-dialog", host: { properties: { "attr.data-state": "state()" }, classAttribute: "\n bg-background shadow-lg rounded-lg relative z-50 grid gap-4 outline-none overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%] data-[state=closed]:duration-200 data-[state=open]:duration-200 w-[90vw] max-w-125 mx-auto p-5\n " }, ngImport: i0, template: `
44
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAlertComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
45
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: UpAlertComponent, isStandalone: true, selector: "up-alert-dialog", host: { properties: { "attr.data-state": "state()" }, classAttribute: "\n bg-background shadow-lg rounded-lg relative z-50 grid gap-4 outline-none overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%] data-[state=closed]:duration-200 data-[state=open]:duration-200 w-[90vw] max-w-125 mx-auto p-5\n " }, ngImport: i0, template: `
47
46
  <!-- Header -->
48
47
  <div class="flex flex-col gap-2 text-center sm:text-left">
49
48
  <h2 class="text-lg font-semibold">
@@ -61,15 +60,18 @@ class UpAlertComponent {
61
60
  fields &&
62
61
  fields.length > 0
63
62
  ) {
64
- <form [formGroup]="form!" class="flex flex-col gap-6 mb-4 mt-5">
65
- @for (field of fields; track $index) {
66
- <up-form-field
67
- [name]="field.name"
68
- [label]="field.label"
69
- >
70
- @switch (field.type) {
71
- @case ('checkbox') {
72
- @defer {
63
+ @defer (on immediate) {
64
+ <form
65
+ class="flex flex-col gap-6 mb-4 mt-5"
66
+ [formGroup]="form!"
67
+ >
68
+ @for (field of fields; track $index) {
69
+ <up-form-field
70
+ [name]="field.name"
71
+ [label]="field.label"
72
+ >
73
+ @switch (field.type) {
74
+ @case ('checkbox') {
73
75
  <input
74
76
  upCheckbox
75
77
  type="checkbox"
@@ -77,22 +79,26 @@ class UpAlertComponent {
77
79
  [required]="field.required?? false"
78
80
  />
79
81
  }
80
- }
81
-
82
- @case ('password') {
83
- @defer {
82
+
83
+ @case ('password') {
84
84
  <up-password
85
85
  [formControlName]="field.name"
86
86
  [placeholder]="field.placeholder"
87
87
  [required]="field.required?? false"
88
88
  />
89
89
  }
90
- }
91
-
92
- <!-- TODO: Select type -->
93
-
94
- @default {
95
- @defer {
90
+
91
+ @case ('select') {
92
+ <up-select
93
+ [items]="field.items"
94
+ [clearable]="!field.required"
95
+ [formControlName]="field.name"
96
+ [required]="field.required?? false"
97
+ [placeholder]="field.placeholder?? ''"
98
+ />
99
+ }
100
+
101
+ @default {
96
102
  <input
97
103
  upInput
98
104
  [type]="field.type"
@@ -100,12 +106,12 @@ class UpAlertComponent {
100
106
  [placeholder]="field.placeholder"
101
107
  [required]="field.required?? false"
102
108
  />
103
- }
104
- }
105
- }
106
- </up-form-field>
107
- }
108
- </form>
109
+ }
110
+ }
111
+ </up-form-field>
112
+ }
113
+ </form>
114
+ }
109
115
  }
110
116
 
111
117
  <!-- Footer -->
@@ -121,29 +127,30 @@ class UpAlertComponent {
121
127
  </button>
122
128
  }
123
129
  </div>
124
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: UpButtonDirective, selector: "[upButton]", inputs: ["size", "variant", "class"], exportAs: ["upButton"] }, { kind: "component", type: UpFormFieldComponent, selector: "up-form-field", inputs: ["name", "hint", "label", "class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i1.CheckboxControlValueAccessor, i1.NgControlStatus, i1.CheckboxRequiredValidator, i1.FormControlName, UpCheckboxDirective], () => [i1.NgControlStatus, i1.RequiredValidator, i1.FormControlName, UpPasswordComponent], () => [i1.DefaultValueAccessor, i1.NgControlStatus, i1.RequiredValidator, i1.FormControlName, UpInputDirective]] }); }
130
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: UpButtonDirective, selector: "[upButton]", inputs: ["size", "variant", "class"], exportAs: ["upButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i1.ɵNgNoValidate, i1.DefaultValueAccessor, i1.CheckboxControlValueAccessor, i1.NgControlStatus, i1.NgControlStatusGroup, i1.RequiredValidator, i1.CheckboxRequiredValidator, i1.FormGroupDirective, i1.FormControlName, import('@unipin/angular-applet/forms').then(m => m.UpInputDirective), import('@unipin/angular-applet/forms').then(m => m.UpCheckboxDirective), import('@unipin/angular-applet/forms').then(m => m.UpSelectComponent), import('@unipin/angular-applet/forms').then(m => m.UpPasswordComponent), import('@unipin/angular-applet/forms').then(m => m.UpFormFieldComponent)]] }); }
125
131
  }
126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAlertComponent, decorators: [{
127
- type: Component,
128
- args: [{
129
- standalone: true,
130
- selector: 'up-alert-dialog',
131
- changeDetection: ChangeDetectionStrategy.OnPush,
132
- host: {
133
- '[attr.data-state]': 'state()',
134
- 'class': `
132
+ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.0.6", ngImport: i0, type: UpAlertComponent, resolveDeferredDeps: () => [import('@unipin/angular-applet/forms').then(m => m.UpInputDirective), import('@unipin/angular-applet/forms').then(m => m.UpCheckboxDirective), import('@unipin/angular-applet/forms').then(m => m.UpSelectComponent), import('@unipin/angular-applet/forms').then(m => m.UpPasswordComponent), import('@unipin/angular-applet/forms').then(m => m.UpFormFieldComponent)], resolveMetadata: (UpInputDirective, UpCheckboxDirective, UpSelectComponent, UpPasswordComponent, UpFormFieldComponent) => ({ decorators: [{
133
+ type: Component,
134
+ args: [{
135
+ standalone: true,
136
+ selector: 'up-alert-dialog',
137
+ changeDetection: ChangeDetectionStrategy.OnPush,
138
+ host: {
139
+ '[attr.data-state]': 'state()',
140
+ 'class': `
135
141
  bg-background shadow-lg rounded-lg relative z-50 grid gap-4 outline-none overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%] data-[state=closed]:duration-200 data-[state=open]:duration-200 w-[90vw] max-w-125 mx-auto p-5
136
142
  `,
137
- },
138
- imports: [
139
- ReactiveFormsModule,
140
- UpInputDirective,
141
- UpButtonDirective,
142
- UpCheckboxDirective,
143
- UpPasswordComponent,
144
- UpFormFieldComponent,
145
- ],
146
- template: `
143
+ },
144
+ imports: [
145
+ ReactiveFormsModule,
146
+ UpInputDirective,
147
+ UpButtonDirective,
148
+ UpCheckboxDirective,
149
+ UpSelectComponent,
150
+ UpPasswordComponent,
151
+ UpFormFieldComponent,
152
+ ],
153
+ template: `
147
154
  <!-- Header -->
148
155
  <div class="flex flex-col gap-2 text-center sm:text-left">
149
156
  <h2 class="text-lg font-semibold">
@@ -161,15 +168,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImpor
161
168
  fields &&
162
169
  fields.length > 0
163
170
  ) {
164
- <form [formGroup]="form!" class="flex flex-col gap-6 mb-4 mt-5">
165
- @for (field of fields; track $index) {
166
- <up-form-field
167
- [name]="field.name"
168
- [label]="field.label"
169
- >
170
- @switch (field.type) {
171
- @case ('checkbox') {
172
- @defer {
171
+ @defer (on immediate) {
172
+ <form
173
+ class="flex flex-col gap-6 mb-4 mt-5"
174
+ [formGroup]="form!"
175
+ >
176
+ @for (field of fields; track $index) {
177
+ <up-form-field
178
+ [name]="field.name"
179
+ [label]="field.label"
180
+ >
181
+ @switch (field.type) {
182
+ @case ('checkbox') {
173
183
  <input
174
184
  upCheckbox
175
185
  type="checkbox"
@@ -177,22 +187,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImpor
177
187
  [required]="field.required?? false"
178
188
  />
179
189
  }
180
- }
181
-
182
- @case ('password') {
183
- @defer {
190
+
191
+ @case ('password') {
184
192
  <up-password
185
193
  [formControlName]="field.name"
186
194
  [placeholder]="field.placeholder"
187
195
  [required]="field.required?? false"
188
196
  />
189
197
  }
190
- }
191
-
192
- <!-- TODO: Select type -->
193
-
194
- @default {
195
- @defer {
198
+
199
+ @case ('select') {
200
+ <up-select
201
+ [items]="field.items"
202
+ [clearable]="!field.required"
203
+ [formControlName]="field.name"
204
+ [required]="field.required?? false"
205
+ [placeholder]="field.placeholder?? ''"
206
+ />
207
+ }
208
+
209
+ @default {
196
210
  <input
197
211
  upInput
198
212
  [type]="field.type"
@@ -200,12 +214,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImpor
200
214
  [placeholder]="field.placeholder"
201
215
  [required]="field.required?? false"
202
216
  />
203
- }
204
- }
205
- }
206
- </up-form-field>
207
- }
208
- </form>
217
+ }
218
+ }
219
+ </up-form-field>
220
+ }
221
+ </form>
222
+ }
209
223
  }
210
224
 
211
225
  <!-- Footer -->
@@ -222,8 +236,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImpor
222
236
  }
223
237
  </div>
224
238
  `
225
- }]
226
- }], ctorParameters: () => [{ type: i1.FormBuilder }] });
239
+ }]
240
+ }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: null }) });
227
241
 
228
242
  class UpAlertController {
229
243
  constructor(dialog) {
@@ -251,10 +265,10 @@ class UpAlertController {
251
265
  }
252
266
  });
253
267
  }
254
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAlertController, deps: [{ token: i1$1.UpDialogService }], target: i0.ɵɵFactoryTarget.Injectable }); }
255
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAlertController, providedIn: 'root' }); }
268
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAlertController, deps: [{ token: i1$1.UpDialogService }], target: i0.ɵɵFactoryTarget.Injectable }); }
269
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAlertController, providedIn: 'root' }); }
256
270
  }
257
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAlertController, decorators: [{
271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAlertController, decorators: [{
258
272
  type: Injectable,
259
273
  args: [{
260
274
  providedIn: 'root'
@@ -1 +1 @@
1
- {"version":3,"file":"unipin-angular-applet-alert-dialog.mjs","sources":["../../../projects/unipin-angular/alert-dialog/components/alert-dialog.component.ts","../../../projects/unipin-angular/alert-dialog/services/alert-controller.service.ts","../../../projects/unipin-angular/alert-dialog/unipin-angular-applet-alert-dialog.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { UpButtonDirective } from '@unipin/angular-applet/buttons';\nimport { injectDialogContext, UpDialogRef } from '@unipin/angular-applet/dialog';\nimport { UpInputDirective, UpCheckboxDirective, UpFormFieldComponent, UpPasswordComponent } from '@unipin/angular-applet/forms';\nimport { AlertOptions } from '../types/alert-options.type';\n\n@Component({\n standalone: true,\n selector: 'up-alert-dialog',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-state]': 'state()',\n 'class': `\n bg-background shadow-lg rounded-lg relative z-50 grid gap-4 outline-none overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%] data-[state=closed]:duration-200 data-[state=open]:duration-200 w-[90vw] max-w-125 mx-auto p-5\n `,\n },\n imports: [\n ReactiveFormsModule,\n UpInputDirective,\n UpButtonDirective, \n UpCheckboxDirective,\n UpPasswordComponent,\n UpFormFieldComponent,\n ],\n template: `\n <!-- Header -->\n <div class=\"flex flex-col gap-2 text-center sm:text-left\">\n <h2 class=\"text-lg font-semibold\">\n {{ opts.title }}\n </h2>\n \n <p class=\"text-muted-foreground text-sm wrap-break-word\">\n {{ opts.description }}\n </p>\n </div>\n\n <!-- Fields -->\n @let fields = opts.fields;\n @if (\n fields && \n fields.length > 0\n ) {\n <form [formGroup]=\"form!\" class=\"flex flex-col gap-6 mb-4 mt-5\">\n @for (field of fields; track $index) {\n <up-form-field\n [name]=\"field.name\"\n [label]=\"field.label\"\n >\n @switch (field.type) { \n @case ('checkbox') {\n @defer {\n <input \n upCheckbox \n type=\"checkbox\"\n [formControlName]=\"field.name\" \n [required]=\"field.required?? false\"\n />\n }\n }\n\n @case ('password') {\n @defer {\n <up-password \n [formControlName]=\"field.name\" \n [placeholder]=\"field.placeholder\"\n [required]=\"field.required?? false\"\n />\n }\n }\n\n <!-- TODO: Select type -->\n\n @default {\n @defer {\n <input\n upInput\n [type]=\"field.type\"\n [formControlName]=\"field.name\"\n [placeholder]=\"field.placeholder\"\n [required]=\"field.required?? false\"\n />\n }\n } \n }\n </up-form-field>\n }\n </form>\n }\n\n <!-- Footer -->\n <div class=\"flex w-full flex-col-reverse gap-2 sm:flex-row sm:justify-end\">\n @for (btn of opts.buttons; track $index) {\n <button\n upButton\n [variant]=\"typeof btn === 'string'? undefined : btn.variant\"\n [class]=\"(typeof btn === 'string'? '' : btn.additionalClass) + ' flex-1'\"\n (click)=\"clickBtn($index)\"\n >\n {{ typeof btn === 'string'? btn : btn.text }}\n </button>\n }\n </div>\n `\n})\nexport class UpAlertComponent {\n\n public readonly dialogRef = inject(UpDialogRef);\n public readonly opts = injectDialogContext<AlertOptions>();\n\n public readonly state = computed(() => this.dialogRef?.state()?? 'closed');\n\n public form?: FormGroup;\n\n constructor(\n protected fb: FormBuilder\n ) {\n const fields = this.opts.fields;\n \n if (fields) {\n this.form = this.fb.group({ });\n \n fields.forEach(\n (field) => {\n const defaultValue = field.type === 'checkbox'? false : null;\n \n this.form!.addControl(\n field.name,\n this.fb.control(\n field.value?? defaultValue, \n field.required? Validators.required : []\n )\n );\n } \n );\n }\n }\n\n public clickBtn(index: number): void {\n const btn = this.opts.buttons[index];\n \n if (\n btn && \n typeof btn !== 'string' && \n btn.handler\n ) {\n let value: undefined | Record<string, any> = undefined;\n \n if (this.form) {\n value = { ...this.form.getRawValue() };\n \n this.opts.fields?.forEach(\n (field) => {\n if (\n field.type === 'number' && \n value![field.name] && \n !isNaN(value![field.name])\n ) {\n value![field.name] = Number(value![field.name]);\n }\n }\n );\n }\n btn.handler(value);\n }\n this.dialogRef.close();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { UpDialogRef, UpDialogService } from '@unipin/angular-applet/dialog';\nimport { AlertOptions } from '../types/alert-options.type';\nimport { UpAlertComponent } from '../components/alert-dialog.component';\n\n@Injectable({ \n providedIn: 'root' \n})\nexport class UpAlertController {\n\n protected readonly MAX_FIELDS = 3;\n protected readonly MAX_BUTTONS = 2;\n\n constructor(protected dialog: UpDialogService) {}\n\n public show(options: AlertOptions, canDismiss: boolean = false): UpDialogRef{\n if (\n options.fields && \n options.fields.length > this.MAX_FIELDS\n ) {\n throw new Error(\n `AlertService: \"fields\" exceeded the maximum allowed (${ this.MAX_FIELDS }).`\n );\n }\n\n if (\n options.buttons && \n options.buttons.length > this.MAX_BUTTONS\n ) {\n throw new Error(\n `AlertService: \"buttons\" exceeded the maximum allowed (${ this.MAX_BUTTONS }).`\n );\n }\n\n return this.dialog.open(\n {\n content: UpAlertComponent,\n context: options,\n options: {\n hasBackdrop: true,\n disableClose: !canDismiss,\n closeOnBackdropClick: canDismiss,\n closeOnOutsidePointerEvents: canDismiss\n }\n }\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;MAyGa,gBAAgB,CAAA;AAS3B,IAAA,WAAA,CACY,EAAe,EAAA;QAAf,IAAA,CAAA,EAAE,GAAF,EAAE;AARE,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC;QAC/B,IAAA,CAAA,IAAI,GAAG,mBAAmB,EAAgB;AAE1C,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,IAAG,QAAQ,mDAAC;AAOxE,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM;QAE/B,IAAI,MAAM,EAAE;YACV,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAG,CAAC;AAE9B,YAAA,MAAM,CAAC,OAAO,CACZ,CAAC,KAAK,KAAI;AACR,gBAAA,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,KAAK,UAAU,GAAE,KAAK,GAAG,IAAI;AAE5D,gBAAA,IAAI,CAAC,IAAK,CAAC,UAAU,CACnB,KAAK,CAAC,IAAI,EACV,IAAI,CAAC,EAAE,CAAC,OAAO,CACb,KAAK,CAAC,KAAK,IAAG,YAAY,E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CACb,CAAA,sDAAA,EAA0D,IAAI,CAAC,WAAY,CAAA,EAAA,CAAI,CAChF;QACH;AAEA,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CACrB;AACE,YAAA,OAAO,EAAE,gBAAgB;AACzB,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,OAAO,EAAE;AACP,gBAAA,WAAW,EAAE,IAAI;gBACjB,YAAY,EAAE,CAAC,UAAU;AACzB,gBAAA,oBAAoB,EAAE,UAAU;AAChC,gBAAA,2BAA2B,EAAE;AAC9B;AACF,SAAA,CACF;IACH;8GAtCW,iBAAiB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,eAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFhB,MAAM,EAAA,CAAA,CAAA;;2FAEP,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"unipin-angular-applet-alert-dialog.mjs","sources":["../../../projects/unipin-angular/alert-dialog/components/alert-dialog.component.ts","../../../projects/unipin-angular/alert-dialog/services/alert-controller.service.ts","../../../projects/unipin-angular/alert-dialog/unipin-angular-applet-alert-dialog.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { UpButtonDirective } from '@unipin/angular-applet/buttons';\nimport { injectDialogContext, UpDialogRef } from '@unipin/angular-applet/dialog';\nimport { UpInputDirective, UpCheckboxDirective, UpFormFieldComponent, UpPasswordComponent, UpSelectComponent } from '@unipin/angular-applet/forms';\nimport { AlertOptions } from '../types/alert-options.type';\n\n\n@Component({\n standalone: true,\n selector: 'up-alert-dialog',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-state]': 'state()',\n 'class': `\n bg-background shadow-lg rounded-lg relative z-50 grid gap-4 outline-none overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-top-[2%] data-[state=open]:slide-in-from-top-[2%] data-[state=closed]:duration-200 data-[state=open]:duration-200 w-[90vw] max-w-125 mx-auto p-5\n `,\n },\n imports: [\n ReactiveFormsModule,\n UpInputDirective,\n UpButtonDirective,\n UpCheckboxDirective,\n UpSelectComponent,\n UpPasswordComponent,\n UpFormFieldComponent,\n ],\n template: `\n <!-- Header -->\n <div class=\"flex flex-col gap-2 text-center sm:text-left\">\n <h2 class=\"text-lg font-semibold\">\n {{ opts.title }}\n </h2>\n \n <p class=\"text-muted-foreground text-sm wrap-break-word\">\n {{ opts.description }}\n </p>\n </div>\n\n <!-- Fields -->\n @let fields = opts.fields;\n @if (\n fields && \n fields.length > 0\n ) {\n @defer (on immediate) {\n <form \n class=\"flex flex-col gap-6 mb-4 mt-5\"\n [formGroup]=\"form!\"\n >\n @for (field of fields; track $index) {\n <up-form-field\n [name]=\"field.name\"\n [label]=\"field.label\"\n >\n @switch (field.type) { \n @case ('checkbox') {\n <input \n upCheckbox \n type=\"checkbox\"\n [formControlName]=\"field.name\" \n [required]=\"field.required?? false\"\n />\n }\n \n @case ('password') {\n <up-password \n [formControlName]=\"field.name\" \n [placeholder]=\"field.placeholder\"\n [required]=\"field.required?? false\"\n />\n }\n \n @case ('select') {\n <up-select \n [items]=\"field.items\"\n [clearable]=\"!field.required\"\n [formControlName]=\"field.name\"\n [required]=\"field.required?? false\"\n [placeholder]=\"field.placeholder?? ''\"\n />\n }\n \n @default {\n <input\n upInput\n [type]=\"field.type\"\n [formControlName]=\"field.name\"\n [placeholder]=\"field.placeholder\"\n [required]=\"field.required?? false\"\n />\n } \n }\n </up-form-field>\n }\n </form>\n }\n }\n\n <!-- Footer -->\n <div class=\"flex w-full flex-col-reverse gap-2 sm:flex-row sm:justify-end\">\n @for (btn of opts.buttons; track $index) {\n <button\n upButton\n [variant]=\"typeof btn === 'string'? undefined : btn.variant\"\n [class]=\"(typeof btn === 'string'? '' : btn.additionalClass) + ' flex-1'\"\n (click)=\"clickBtn($index)\"\n >\n {{ typeof btn === 'string'? btn : btn.text }}\n </button>\n }\n </div>\n `\n})\nexport class UpAlertComponent {\n\n public readonly dialogRef = inject(UpDialogRef);\n public readonly opts = injectDialogContext<AlertOptions>();\n\n public readonly state = computed(() => this.dialogRef?.state()?? 'closed');\n\n public form?: FormGroup;\n\n constructor(\n protected fb: FormBuilder\n ) {\n const fields = this.opts.fields;\n \n if (fields) {\n this.form = this.fb.group({ });\n \n fields.forEach(\n (field) => {\n const defaultValue = field.type === 'checkbox'? false : null;\n \n this.form!.addControl(\n field.name,\n this.fb.control(\n field.value?? defaultValue, \n field.required? Validators.required : []\n )\n );\n } \n );\n }\n }\n\n public clickBtn(index: number): void {\n const btn = this.opts.buttons[index];\n \n if (\n btn && \n typeof btn !== 'string' && \n btn.handler\n ) {\n let value: undefined | Record<string, any> = undefined;\n \n if (this.form) {\n value = { ...this.form.getRawValue() };\n \n this.opts.fields?.forEach(\n (field) => {\n if (\n field.type === 'number' && \n value![field.name] && \n !isNaN(value![field.name])\n ) {\n value![field.name] = Number(value![field.name]);\n }\n }\n );\n }\n btn.handler(value);\n }\n this.dialogRef.close();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { UpDialogRef, UpDialogService } from '@unipin/angular-applet/dialog';\nimport { AlertOptions } from '../types/alert-options.type';\nimport { UpAlertComponent } from '../components/alert-dialog.component';\n\n@Injectable({ \n providedIn: 'root' \n})\nexport class UpAlertController {\n\n protected readonly MAX_FIELDS = 3;\n protected readonly MAX_BUTTONS = 2;\n\n constructor(protected dialog: UpDialogService) {}\n\n public show(options: AlertOptions, canDismiss: boolean = false): UpDialogRef{\n if (\n options.fields && \n options.fields.length > this.MAX_FIELDS\n ) {\n throw new Error(\n `AlertService: \"fields\" exceeded the maximum allowed (${ this.MAX_FIELDS }).`\n );\n }\n\n if (\n options.buttons && \n options.buttons.length > this.MAX_BUTTONS\n ) {\n throw new Error(\n `AlertService: \"buttons\" exceeded the maximum allowed (${ this.MAX_BUTTONS }).`\n );\n }\n\n return this.dialog.open(\n {\n content: UpAlertComponent,\n context: options,\n options: {\n hasBackdrop: true,\n disableClose: !canDismiss,\n closeOnBackdropClick: canDismiss,\n closeOnOutsidePointerEvents: canDismiss\n }\n }\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;MAkHa,gBAAgB,CAAA;AAS3B,IAAA,WAAA,CACY,EAAe,EAAA;QAAf,IAAA,CAAA,EAAE,GAAF,EAAE;AARE,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC;QAC/B,IAAA,CAAA,IAAI,GAAG,mBAAmB,EAAgB;AAE1C,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,IAAG,QAAQ,iDAAC;AAOxE,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM;QAE/B,IAAI,MAAM,EAAE;YACV,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAG,CAAC;AAE9B,YAAA,MAAM,CAAC,OAAO,CACZ,CAAC,KAAK,KAAI;AACR,gBAAA,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,KAAK,UAAU,GAAE,KAAK,GAAG,IAAI;AA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AAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFhB,MAAM,EAAA,CAAA,CAAA;;2FAEP,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACPD;;AAEG;;;;"}
@@ -19,18 +19,18 @@ const alertVariants = cva('[&_ng-icon]:text-[16px] relative w-full rounded-lg bo
19
19
 
20
20
  class UpAlertDirective {
21
21
  constructor() {
22
- this.variant = input('default', { ...(ngDevMode ? { debugName: "variant" } : {}) });
22
+ this.variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : []));
23
23
  this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
24
24
  this._computedClass = computed(() => {
25
25
  return up('select-none outline-none', alertVariants({
26
26
  variant: this.variant(),
27
27
  }), this.inlineClass());
28
- }, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
28
+ }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
29
29
  }
30
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAlertDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
31
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", type: UpAlertDirective, isStandalone: true, selector: "[upAlert]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upAlert"], ngImport: i0 }); }
30
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAlertDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
31
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: UpAlertDirective, isStandalone: true, selector: "[upAlert]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upAlert"], ngImport: i0 }); }
32
32
  }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAlertDirective, decorators: [{
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAlertDirective, decorators: [{
34
34
  type: Directive,
35
35
  args: [{
36
36
  standalone: true,
@@ -47,12 +47,12 @@ class UpAlertTitleDirective {
47
47
  this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
48
48
  this._computedClass = computed(() => {
49
49
  return up('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', this.inlineClass());
50
- }, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
50
+ }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
51
51
  }
52
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAlertTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
53
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", type: UpAlertTitleDirective, isStandalone: true, selector: "[upAlertTitle]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upAlertTitle"], ngImport: i0 }); }
52
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAlertTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
53
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: UpAlertTitleDirective, isStandalone: true, selector: "[upAlertTitle]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upAlertTitle"], ngImport: i0 }); }
54
54
  }
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAlertTitleDirective, decorators: [{
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAlertTitleDirective, decorators: [{
56
56
  type: Directive,
57
57
  args: [{
58
58
  standalone: true,
@@ -69,12 +69,12 @@ class UpAlertDescriptionDirective {
69
69
  this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
70
70
  this._computedClass = computed(() => {
71
71
  return up('col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed', this.inlineClass());
72
- }, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
72
+ }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
73
73
  }
74
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAlertDescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
75
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", type: UpAlertDescriptionDirective, isStandalone: true, selector: "[upAlertDescription]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upAlertDescription"], ngImport: i0 }); }
74
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAlertDescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
75
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: UpAlertDescriptionDirective, isStandalone: true, selector: "[upAlertDescription]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upAlertDescription"], ngImport: i0 }); }
76
76
  }
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpAlertDescriptionDirective, decorators: [{
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAlertDescriptionDirective, decorators: [{
78
78
  type: Directive,
79
79
  args: [{
80
80
  standalone: true,
@@ -1 +1 @@
1
- {"version":3,"file":"unipin-angular-applet-alert.mjs","sources":["../../../projects/unipin-angular/alert/types/alert-variant.type.ts","../../../projects/unipin-angular/alert/directives/alert.directive.ts","../../../projects/unipin-angular/alert/directives/alert-title.directive.ts","../../../projects/unipin-angular/alert/directives/alert-description.directive.ts","../../../projects/unipin-angular/alert/unipin-angular-applet-alert.ts"],"sourcesContent":["import { cva, VariantProps } from 'class-variance-authority';\n\nexport const alertVariants = cva(\n '[&_ng-icon]:text-[16px] relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>ng-icon]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>ng-icon]:gap-x-3 gap-y-0.5 items-start [&>ng-icon]:size-4 [&>ng-icon]:translate-y-0.5 [&>ng-icon]:text-current',\n {\n variants: {\n variant: {\n default: 'dark:text-white',\n success: 'text-green-600',\n warning: 'text-yellow-600',\n destructive: 'text-destructive',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport type AlertVariants = VariantProps<typeof alertVariants>;\n","import { computed, Directive, input } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { alertVariants, AlertVariants } from '../types/alert-variant.type';\n\n@Directive({\n standalone: true,\n exportAs: 'upAlert',\n selector: '[upAlert]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpAlertDirective {\n\n public readonly variant = input<AlertVariants['variant']>('default');\n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(\n () => {\n return up(\n 'select-none outline-none',\n alertVariants(\n {\n variant: this.variant(),\n }\n ),\n this.inlineClass(),\n );\n }\n );\n}\n","import { computed, Directive, input } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\n\n@Directive({\n standalone: true,\n exportAs: 'upAlertTitle',\n selector: '[upAlertTitle]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpAlertTitleDirective {\n\n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n \n protected readonly _computedClass = computed(\n () => {\n return up(\n 'col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight',\n this.inlineClass(),\n );\n }\n );\n}\n","import { computed, Directive, input } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\n\n@Directive({\n standalone: true,\n exportAs: 'upAlertDescription',\n selector: '[upAlertDescription]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpAlertDescriptionDirective {\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(\n () => {\n return up(\n 'col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed',\n this.inlineClass(),\n );\n }\n );\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAEO,MAAM,aAAa,GAAG,GAAG,CAC9B,+QAA+Q,EAC/Q;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,iBAAiB;AAC1B,Y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../../../projects/unipin-angular/alert/types/alert-variant.type.ts","../../../projects/unipin-angular/alert/directives/alert.directive.ts","../../../projects/unipin-angular/alert/directives/alert-title.directive.ts","../../../projects/unipin-angular/alert/directives/alert-description.directive.ts","../../../projects/unipin-angular/alert/unipin-angular-applet-alert.ts"],"sourcesContent":["import { cva, VariantProps } from 'class-variance-authority';\n\nexport const alertVariants = cva(\n '[&_ng-icon]:text-[16px] relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>ng-icon]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>ng-icon]:gap-x-3 gap-y-0.5 items-start [&>ng-icon]:size-4 [&>ng-icon]:translate-y-0.5 [&>ng-icon]:text-current',\n {\n variants: {\n variant: {\n default: 'dark:text-white',\n success: 'text-green-600',\n warning: 'text-yellow-600',\n destructive: 'text-destructive',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport type AlertVariants = VariantProps<typeof alertVariants>;\n","import { computed, Directive, input } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { alertVariants, AlertVariants } from '../types/alert-variant.type';\n\n@Directive({\n standalone: true,\n exportAs: 'upAlert',\n selector: '[upAlert]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpAlertDirective {\n\n public readonly variant = input<AlertVariants['variant']>('default');\n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(\n () => {\n return up(\n 'select-none outline-none',\n alertVariants(\n {\n variant: this.variant(),\n }\n ),\n this.inlineClass(),\n );\n }\n );\n}\n","import { computed, Directive, input } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\n\n@Directive({\n standalone: true,\n exportAs: 'upAlertTitle',\n selector: '[upAlertTitle]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpAlertTitleDirective {\n\n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n \n protected readonly _computedClass = computed(\n () => {\n return up(\n 'col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight',\n this.inlineClass(),\n );\n }\n );\n}\n","import { computed, Directive, input } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\n\n@Directive({\n standalone: true,\n exportAs: 'upAlertDescription',\n selector: '[upAlertDescription]',\n host: {\n '[class]': '_computedClass()',\n }\n})\nexport class UpAlertDescriptionDirective {\n \n public readonly inlineClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(\n () => {\n return up(\n 'col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed',\n this.inlineClass(),\n );\n }\n );\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAEO,MAAM,aAAa,GAAG,GAAG,CAC9B,+QAA+Q,EAC/Q;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,iBAAiB;AAC1B,YAAA,OAAO,EAAE,gBAAgB;AACzB,YAAA,OAAO,EAAE,iBAAiB;AAC1B,YAAA,WAAW,EAAE,kBAAkB;AAChC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA;;MCHU,gBAAgB,CAAA;AAR7B,IAAA,WAAA,GAAA;AAUkB,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAA2B,SAAS,mDAAC;QACpD,IAAA,CAAA,WAAW,GAAG,KAAK,CAAa,EAAE,wDAAI,KAAK,EAAE,OAAO,EAAA,CAAG;AAEpD,QAAA,IAAA,CAAA,cAAc,GAAG,QAAQ,CAC1C,MAAK;AACH,YAAA,OAAO,EAAE,CACP,0BAA0B,EAC1B,aAAa,CACX;AACE,gBAAA,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;AACxB,aAAA,CACF,EACD,IAAI,CAAC,WAAW,EAAE,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EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBARvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,kBAAkB;AAC9B;AACF,iBAAA;;;ACXD;;AAEG;;;;"}
@@ -0,0 +1,129 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, input, model, signal, effect, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import * as i1 from '@unipin/angular-gql';
4
+ import { DatePipe, JsonPipe } from '@angular/common';
5
+ import { UpInputDirective } from '@unipin/angular-applet/forms';
6
+ import { UpBadgeDirective } from '@unipin/angular-applet/badge';
7
+ import { UpCapitalizaPipe } from '@unipin/angular-applet/common';
8
+ import { UpSkeletonDirective } from '@unipin/angular-applet/skeleton';
9
+
10
+ class ApprovalService {
11
+ constructor(gql) {
12
+ this.gql = gql;
13
+ }
14
+ query(input, extraAttr = '', cacheStrategy) {
15
+ return this.gql.query({
16
+ operationName: 'QueryApproval',
17
+ cacheStrategy,
18
+ variables: {
19
+ input
20
+ },
21
+ query: `
22
+ query QueryApproval($input: ApprovalCriteria) {
23
+ approvalMsApprovals(input: $input) {
24
+ data {
25
+ guid
26
+ createdAt
27
+ entity
28
+ remark
29
+ sourcePlatform
30
+ status
31
+ type
32
+ createdByUser {
33
+ guid
34
+ name
35
+ }
36
+ approvalGroup {
37
+ guid
38
+ }
39
+ ${extraAttr}
40
+ }
41
+ ${input.page === 0 ? 'totalRecord' : ''}
42
+ }
43
+ }
44
+ `
45
+ });
46
+ }
47
+ request(variables) {
48
+ return this.gql.mutate({
49
+ variables,
50
+ operationName: variables.isApprove ? 'ApproveApproval' : 'DeclineApproval',
51
+ mutation: `
52
+ mutation ${variables.isApprove ? 'ApproveApproval' : 'DeclineApproval'} ($approvalGroupGuid: String, $guids: [String], $isApprove: Boolean, $reason: String) {
53
+ approvalMsApproveOrDeclineRequest(approvalGroupGuid: $approvalGroupGuid, guids: $guids, isApprove: $isApprove, reason: $reason)
54
+ }
55
+ `
56
+ });
57
+ }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ApprovalService, deps: [{ token: i1.GqlParser }], target: i0.ɵɵFactoryTarget.Injectable }); }
59
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ApprovalService, providedIn: 'root' }); }
60
+ }
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ApprovalService, decorators: [{
62
+ type: Injectable,
63
+ args: [{
64
+ providedIn: 'root'
65
+ }]
66
+ }], ctorParameters: () => [{ type: i1.GqlParser }] });
67
+
68
+ class UpApprovalFormComponent {
69
+ constructor() {
70
+ this.approvalData = input.required(...(ngDevMode ? [{ debugName: "approvalData" }] : []));
71
+ this.isLoading = model(true, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
72
+ this.borderColors = signal({}, ...(ngDevMode ? [{ debugName: "borderColors" }] : []));
73
+ this.backgroundColors = signal({}, ...(ngDevMode ? [{ debugName: "backgroundColors" }] : []));
74
+ this.STATUS_COLOR_MAP = {
75
+ PENDING: {
76
+ bg: 'bg-yellow-500',
77
+ border: 'border-yellow-500'
78
+ },
79
+ APPROVED: {
80
+ bg: 'bg-green-700',
81
+ border: 'border-green-700'
82
+ },
83
+ DECLINED: {
84
+ bg: 'bg-destructive',
85
+ border: 'border-destructive'
86
+ },
87
+ DEFAULT: {
88
+ bg: 'bg-primary',
89
+ border: 'border-primary'
90
+ },
91
+ };
92
+ effect(() => {
93
+ const bg = {};
94
+ const border = {};
95
+ this.approvalData().forEach((item, index) => {
96
+ const colors = this.getColors(item.status);
97
+ bg[index] = colors.bg;
98
+ border[index] = colors.border;
99
+ });
100
+ this.backgroundColors.set(bg);
101
+ this.borderColors.set(border);
102
+ });
103
+ }
104
+ getColors(status) {
105
+ return this.STATUS_COLOR_MAP[status] ?? this.STATUS_COLOR_MAP.DEFAULT;
106
+ }
107
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpApprovalFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
108
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: UpApprovalFormComponent, isStandalone: true, selector: "up-approval-form", inputs: { approvalData: { classPropertyName: "approvalData", publicName: "approvalData", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isLoading: "isLoadingChange" }, host: { classAttribute: "block space-y-4" }, ngImport: i0, template: "@if (isLoading()) {\n @for (i of [1,2,3,4,5]; track $index) {\n <div class=\"border border-border rounded-md px-2 select-none\">\n <div class=\"px-2 py-4 border-b border-border flex justify-between items-center gap-4\">\n <div class=\"grow flex items-center gap-2\">\n <div \n upSkeleton\n class=\"h-6 w-4/5 max-w-50\"\n ></div>\n </div>\n\n <div class=\"shrink-0 text-sm\">\n <div \n upSkeleton\n class=\"h-6 w-screen max-w-30\"\n ></div>\n </div>\n </div>\n\n <div class=\"px-2 py-4 space-y-4\">\n <div class=\"grid grid-cols-1 lg:grid-cols-2 gap-4\">\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n Entity\n </label>\n\n <div \n upSkeleton\n class=\"h-9 w-full\"\n ></div>\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n User\n </label>\n\n <div \n upSkeleton\n class=\"h-9 w-full\"\n ></div>\n </div>\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n Remark\n </label>\n\n <div \n upSkeleton\n class=\"h-9 w-full\"\n ></div>\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n Data\n </label>\n\n <div \n upSkeleton\n class=\"h-20 w-full\"\n ></div>\n </div>\n </div>\n </div>\n }\n}\n@else {\n @for (d of approvalData(); track $index) {\n <div \n class=\"border rounded-md px-2 select-none\"\n [class]=\"borderColors()[$index]\"\n >\n <div \n class=\"px-2 py-4 border-b flex justify-between items-center gap-4\"\n [class]=\"borderColors()[$index]\"\n >\n <div class=\"grow flex items-center gap-2\">\n <div \n upBadge \n class=\"text-white shrink-0\" \n [class]=\"backgroundColors()[$index]\"\n >\n {{ (d.status?? 'Unknown') | upCapitalize }}\n </div>\n </div>\n\n @if (d.createdAt) {\n <div class=\"shrink-0 text-sm text-muted-foreground\">\n {{ d.createdAt | date: 'dd LLL yyyy HH:mm' }}\n </div>\n }\n </div>\n\n <div class=\"px-2 py-4 space-y-6\">\n <div class=\"grid grid-cols-1 lg:grid-cols-2 gap-4\">\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n Entity\n </label>\n\n <input \n upInput \n readonly \n [value]=\"d.entity\"\n />\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n User\n </label>\n\n <input \n upInput \n readonly \n [value]=\"d.createdByUser?.name?? '-'\"\n />\n </div>\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n Remark\n </label>\n\n <input \n upInput \n readonly \n [value]=\"d.remark\"\n />\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n Data\n </label>\n\n <textarea \n upInput \n readonly\n class=\"min-h-50 resize-none\"\n [value]=\"d.data | json\"\n >\n </textarea>\n </div>\n </div>\n </div>\n }\n}\n", dependencies: [{ kind: "directive", type: UpInputDirective, selector: "[upInput]", inputs: ["class"], exportAs: ["upInput"] }, { kind: "directive", type: UpBadgeDirective, selector: "[upBadge]", inputs: ["variant", "class"], exportAs: ["upBadge"] }, { kind: "directive", type: UpSkeletonDirective, selector: "[upSkeleton]", inputs: ["class"], exportAs: ["upSkeleton"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: JsonPipe, name: "json" }, { kind: "pipe", type: UpCapitalizaPipe, name: "upCapitalize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
109
+ }
110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpApprovalFormComponent, decorators: [{
111
+ type: Component,
112
+ args: [{ standalone: true, selector: 'up-approval-form', changeDetection: ChangeDetectionStrategy.OnPush, host: {
113
+ class: 'block space-y-4'
114
+ }, imports: [
115
+ DatePipe,
116
+ JsonPipe,
117
+ UpCapitalizaPipe,
118
+ UpInputDirective,
119
+ UpBadgeDirective,
120
+ UpSkeletonDirective
121
+ ], template: "@if (isLoading()) {\n @for (i of [1,2,3,4,5]; track $index) {\n <div class=\"border border-border rounded-md px-2 select-none\">\n <div class=\"px-2 py-4 border-b border-border flex justify-between items-center gap-4\">\n <div class=\"grow flex items-center gap-2\">\n <div \n upSkeleton\n class=\"h-6 w-4/5 max-w-50\"\n ></div>\n </div>\n\n <div class=\"shrink-0 text-sm\">\n <div \n upSkeleton\n class=\"h-6 w-screen max-w-30\"\n ></div>\n </div>\n </div>\n\n <div class=\"px-2 py-4 space-y-4\">\n <div class=\"grid grid-cols-1 lg:grid-cols-2 gap-4\">\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n Entity\n </label>\n\n <div \n upSkeleton\n class=\"h-9 w-full\"\n ></div>\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n User\n </label>\n\n <div \n upSkeleton\n class=\"h-9 w-full\"\n ></div>\n </div>\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n Remark\n </label>\n\n <div \n upSkeleton\n class=\"h-9 w-full\"\n ></div>\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n Data\n </label>\n\n <div \n upSkeleton\n class=\"h-20 w-full\"\n ></div>\n </div>\n </div>\n </div>\n }\n}\n@else {\n @for (d of approvalData(); track $index) {\n <div \n class=\"border rounded-md px-2 select-none\"\n [class]=\"borderColors()[$index]\"\n >\n <div \n class=\"px-2 py-4 border-b flex justify-between items-center gap-4\"\n [class]=\"borderColors()[$index]\"\n >\n <div class=\"grow flex items-center gap-2\">\n <div \n upBadge \n class=\"text-white shrink-0\" \n [class]=\"backgroundColors()[$index]\"\n >\n {{ (d.status?? 'Unknown') | upCapitalize }}\n </div>\n </div>\n\n @if (d.createdAt) {\n <div class=\"shrink-0 text-sm text-muted-foreground\">\n {{ d.createdAt | date: 'dd LLL yyyy HH:mm' }}\n </div>\n }\n </div>\n\n <div class=\"px-2 py-4 space-y-6\">\n <div class=\"grid grid-cols-1 lg:grid-cols-2 gap-4\">\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n Entity\n </label>\n\n <input \n upInput \n readonly \n [value]=\"d.entity\"\n />\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n User\n </label>\n\n <input \n upInput \n readonly \n [value]=\"d.createdByUser?.name?? '-'\"\n />\n </div>\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n Remark\n </label>\n\n <input \n upInput \n readonly \n [value]=\"d.remark\"\n />\n </div>\n\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium leading-none\">\n Data\n </label>\n\n <textarea \n upInput \n readonly\n class=\"min-h-50 resize-none\"\n [value]=\"d.data | json\"\n >\n </textarea>\n </div>\n </div>\n </div>\n }\n}\n" }]
122
+ }], ctorParameters: () => [], propDecorators: { approvalData: [{ type: i0.Input, args: [{ isSignal: true, alias: "approvalData", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }, { type: i0.Output, args: ["isLoadingChange"] }] } });
123
+
124
+ /**
125
+ * Generated bundle index. Do not edit.
126
+ */
127
+
128
+ export { ApprovalService, UpApprovalFormComponent };
129
+ //# sourceMappingURL=unipin-angular-applet-approval.mjs.map