@unipin/angular-applet 21.1.3 → 21.3.1

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 (51) hide show
  1. package/common/assets/styles/theme.css +8 -0
  2. package/fesm2022/unipin-angular-applet-accordion.mjs +12 -12
  3. package/fesm2022/unipin-angular-applet-alert-dialog.mjs +10 -7
  4. package/fesm2022/unipin-angular-applet-alert-dialog.mjs.map +1 -1
  5. package/fesm2022/unipin-angular-applet-alert.mjs +9 -9
  6. package/fesm2022/unipin-angular-applet-approval.mjs +6 -6
  7. package/fesm2022/unipin-angular-applet-audit-audit-modal.component-3a2P0bZr.mjs +280 -0
  8. package/fesm2022/unipin-angular-applet-audit-audit-modal.component-3a2P0bZr.mjs.map +1 -0
  9. package/fesm2022/unipin-angular-applet-audit.mjs +220 -0
  10. package/fesm2022/unipin-angular-applet-audit.mjs.map +1 -0
  11. package/fesm2022/unipin-angular-applet-auth.mjs +21 -21
  12. package/fesm2022/unipin-angular-applet-avatar.mjs +25 -8
  13. package/fesm2022/unipin-angular-applet-avatar.mjs.map +1 -1
  14. package/fesm2022/unipin-angular-applet-badge.mjs +3 -3
  15. package/fesm2022/unipin-angular-applet-buttons.mjs +6 -6
  16. package/fesm2022/unipin-angular-applet-calendar.mjs +26 -12
  17. package/fesm2022/unipin-angular-applet-calendar.mjs.map +1 -1
  18. package/fesm2022/unipin-angular-applet-collapsible.mjs +9 -9
  19. package/fesm2022/unipin-angular-applet-common.mjs +24 -24
  20. package/fesm2022/unipin-angular-applet-containers.mjs +12 -12
  21. package/fesm2022/unipin-angular-applet-dialog.mjs +30 -45
  22. package/fesm2022/unipin-angular-applet-dialog.mjs.map +1 -1
  23. package/fesm2022/unipin-angular-applet-forms.mjs +960 -311
  24. package/fesm2022/unipin-angular-applet-forms.mjs.map +1 -1
  25. package/fesm2022/unipin-angular-applet-froala.mjs +4 -4
  26. package/fesm2022/unipin-angular-applet-froala.mjs.map +1 -1
  27. package/fesm2022/unipin-angular-applet-grids.mjs +17 -1
  28. package/fesm2022/unipin-angular-applet-grids.mjs.map +1 -1
  29. package/fesm2022/unipin-angular-applet-infinite-scroll.mjs +3 -3
  30. package/fesm2022/unipin-angular-applet-json-viewer.mjs +3 -3
  31. package/fesm2022/unipin-angular-applet-kbd.mjs +3 -3
  32. package/fesm2022/unipin-angular-applet-loading-dialog.mjs +6 -6
  33. package/fesm2022/unipin-angular-applet-markdown.mjs +10 -10
  34. package/fesm2022/unipin-angular-applet-markdown.mjs.map +1 -1
  35. package/fesm2022/unipin-angular-applet-popover.mjs +18 -18
  36. package/fesm2022/unipin-angular-applet-popover.mjs.map +1 -1
  37. package/fesm2022/unipin-angular-applet-progress-bar.mjs +3 -3
  38. package/fesm2022/unipin-angular-applet-skeleton.mjs +3 -3
  39. package/fesm2022/unipin-angular-applet-spinner.mjs +3 -3
  40. package/fesm2022/unipin-angular-applet-stepper.mjs +6 -6
  41. package/fesm2022/unipin-angular-applet-swipeable.mjs +12 -12
  42. package/fesm2022/unipin-angular-applet-tabs.mjs +9 -9
  43. package/fesm2022/unipin-angular-applet-tooltip.mjs +3 -3
  44. package/package.json +5 -1
  45. package/types/unipin-angular-applet-audit.d.ts +49 -0
  46. package/types/unipin-angular-applet-avatar.d.ts +3 -2
  47. package/types/unipin-angular-applet-containers.d.ts +1 -1
  48. package/types/unipin-angular-applet-dialog.d.ts +13 -13
  49. package/types/unipin-angular-applet-forms.d.ts +133 -51
  50. package/types/unipin-angular-applet-grids.d.ts +17 -1
  51. package/types/unipin-angular-applet-popover.d.ts +2 -2
@@ -70,3 +70,11 @@
70
70
  --popover: oklch(0.269 0 0);
71
71
  --popover-foreground: oklch(0.985 0 0);
72
72
  }
73
+
74
+ input:-webkit-autofill,
75
+ textarea:-webkit-autofill,
76
+ select:-webkit-autofill {
77
+ -webkit-text-fill-color: inherit;
78
+ transition: background-color 9999s ease-in-out 0s;
79
+ -webkit-box-shadow: 0 0 0px 1000px color-mix(in oklab, var(--primary) 5%, transparent) inset;
80
+ }
@@ -31,10 +31,10 @@ class UpAccordionDirective {
31
31
  this.value.set(defaultVal);
32
32
  }
33
33
  }
34
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
35
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: UpAccordionDirective, isStandalone: true, selector: "[upAccordion]", inputs: { dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { type: "typeChange", valueChange: "valueChange", value: "valueChange", defaultValue: "defaultValueChange" }, host: { properties: { "attr.dir": "dir()", "class": "_computedClass()" } }, exportAs: ["upAccordion"], ngImport: i0 }); }
34
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAccordionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
35
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: UpAccordionDirective, isStandalone: true, selector: "[upAccordion]", inputs: { dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { type: "typeChange", valueChange: "valueChange", value: "valueChange", defaultValue: "defaultValueChange" }, host: { properties: { "attr.dir": "dir()", "class": "_computedClass()" } }, exportAs: ["upAccordion"], ngImport: i0 }); }
36
36
  }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionDirective, decorators: [{
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAccordionDirective, decorators: [{
38
38
  type: Directive,
39
39
  args: [{
40
40
  standalone: true,
@@ -99,10 +99,10 @@ class UpAccordionItemDirective {
99
99
  return;
100
100
  }
101
101
  }
102
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionItemDirective, deps: [{ token: UpAccordionDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
103
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: UpAccordionItemDirective, isStandalone: true, selector: "[upAccordionItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, isOpened: { classPropertyName: "isOpened", publicName: "isOpened", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpened: "isOpenedChange" }, host: { properties: { "class": "_computedClass()", "attr.data-state": "isOpened()? 'open' : 'closed'" } }, exportAs: ["upAccordionItem"], ngImport: i0 }); }
102
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAccordionItemDirective, deps: [{ token: UpAccordionDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
103
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: UpAccordionItemDirective, isStandalone: true, selector: "[upAccordionItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, isOpened: { classPropertyName: "isOpened", publicName: "isOpened", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpened: "isOpenedChange" }, host: { properties: { "class": "_computedClass()", "attr.data-state": "isOpened()? 'open' : 'closed'" } }, exportAs: ["upAccordionItem"], ngImport: i0 }); }
104
104
  }
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionItemDirective, decorators: [{
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAccordionItemDirective, decorators: [{
106
106
  type: Directive,
107
107
  args: [{
108
108
  standalone: true,
@@ -185,10 +185,10 @@ class UpAccordionTriggerDirective {
185
185
  }
186
186
  return Array.from(accordionElement.querySelectorAll('[upAccordionTrigger]'));
187
187
  }
188
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionTriggerDirective, deps: [{ token: UpAccordionItemDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
189
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: UpAccordionTriggerDirective, isStandalone: true, selector: "[upAccordionTrigger]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "toggleState()", "keydown": "onKeyDown($event)" }, properties: { "attr.tabindex": "0", "attr.role": "'button'", "class": "_computedClass()", "attr.aria-expanded": "this.item.isOpened()", "attr.disabled": "this.item.disabled() || null", "attr.data-state": "this.item.isOpened()? 'open' : 'closed'", "attr.aria-disabled": "this.item.disabled() || this.item.wrapper.disabled() || null", "style.writing-mode": "this.item.wrapper.orientation() === 'horizontal'? 'sideways-lr' : ''" } }, ngImport: i0 }); }
188
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAccordionTriggerDirective, deps: [{ token: UpAccordionItemDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
189
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: UpAccordionTriggerDirective, isStandalone: true, selector: "[upAccordionTrigger]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "toggleState()", "keydown": "onKeyDown($event)" }, properties: { "attr.tabindex": "0", "attr.role": "'button'", "class": "_computedClass()", "attr.aria-expanded": "this.item.isOpened()", "attr.disabled": "this.item.disabled() || null", "attr.data-state": "this.item.isOpened()? 'open' : 'closed'", "attr.aria-disabled": "this.item.disabled() || this.item.wrapper.disabled() || null", "style.writing-mode": "this.item.wrapper.orientation() === 'horizontal'? 'sideways-lr' : ''" } }, ngImport: i0 }); }
190
190
  }
191
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionTriggerDirective, decorators: [{
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAccordionTriggerDirective, decorators: [{
192
192
  type: Directive,
193
193
  args: [{
194
194
  standalone: true,
@@ -219,10 +219,10 @@ class UpAccordionContentDirective {
219
219
  return up(`overflow-hidden transition-all`, isDisabled ? 'text-gray-400' : '', isHorizontal ? (isOpened ? 'w-full opacity-100' : 'max-w-0 opacity-0 text-nowrap') : (isOpened ? 'h-auto opacity-100' : 'max-h-0 opacity-0'), this.inlineClass());
220
220
  }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
221
221
  }
222
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionContentDirective, deps: [{ token: UpAccordionItemDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
223
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: UpAccordionContentDirective, isStandalone: true, selector: "[upAccordionContent]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upAccordionContent"], ngImport: i0 }); }
222
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAccordionContentDirective, deps: [{ token: UpAccordionItemDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
223
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: UpAccordionContentDirective, isStandalone: true, selector: "[upAccordionContent]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, exportAs: ["upAccordionContent"], ngImport: i0 }); }
224
224
  }
225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAccordionContentDirective, decorators: [{
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAccordionContentDirective, decorators: [{
226
226
  type: Directive,
227
227
  args: [{
228
228
  standalone: true,
@@ -41,8 +41,8 @@ class UpAlertComponent {
41
41
  }
42
42
  this.dialogRef.close();
43
43
  }
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: `
44
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAlertComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
45
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", 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: `
46
46
  <!-- Header -->
47
47
  <div class="flex flex-col gap-2 text-center sm:text-left">
48
48
  <h2 class="text-lg font-semibold">
@@ -90,6 +90,7 @@ class UpAlertComponent {
90
90
 
91
91
  @case ('select') {
92
92
  <up-select
93
+ appendTo=".cdk-overlay-pane"
93
94
  [items]="field.items"
94
95
  [clearable]="!field.required"
95
96
  [formControlName]="field.name"
@@ -129,7 +130,7 @@ class UpAlertComponent {
129
130
  </div>
130
131
  `, 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)]] }); }
131
132
  }
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
+ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.1.5", 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
134
  type: Component,
134
135
  args: [{
135
136
  standalone: true,
@@ -198,6 +199,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.0.6", ng
198
199
 
199
200
  @case ('select') {
200
201
  <up-select
202
+ appendTo=".cdk-overlay-pane"
201
203
  [items]="field.items"
202
204
  [clearable]="!field.required"
203
205
  [formControlName]="field.name"
@@ -259,16 +261,17 @@ class UpAlertController {
259
261
  context: options,
260
262
  options: {
261
263
  hasBackdrop: true,
264
+ panelClass: 'relative!',
262
265
  disableClose: !canDismiss,
263
266
  closeOnBackdropClick: canDismiss,
264
- closeOnOutsidePointerEvents: canDismiss
267
+ closeOnOutsidePointerEvents: canDismiss,
265
268
  }
266
269
  });
267
270
  }
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' }); }
271
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAlertController, deps: [{ token: i1$1.UpDialogService }], target: i0.ɵɵFactoryTarget.Injectable }); }
272
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAlertController, providedIn: 'root' }); }
270
273
  }
271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpAlertController, decorators: [{
274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAlertController, decorators: [{
272
275
  type: Injectable,
273
276
  args: [{
274
277
  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, 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 closeOnOut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CAAA,EAAA,CAAI,CAC9E;QACH;QAEA,IACE,OAAO,CAAC,OAAO;YACf,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,EACzC;YACA,MAAM,IAAI,KAAK,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 appendTo=\".cdk-overlay-pane\"\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 panelClass: 'relative!',\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":";;;;;;;;MAmHa,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,I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F;IACH;8GAvCW,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;;;;"}
@@ -27,10 +27,10 @@ class UpAlertDirective {
27
27
  }), this.inlineClass());
28
28
  }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
29
29
  }
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 }); }
30
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAlertDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
31
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", 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.6", ngImport: i0, type: UpAlertDirective, decorators: [{
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAlertDirective, decorators: [{
34
34
  type: Directive,
35
35
  args: [{
36
36
  standalone: true,
@@ -49,10 +49,10 @@ class UpAlertTitleDirective {
49
49
  return up('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', this.inlineClass());
50
50
  }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
51
51
  }
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 }); }
52
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAlertTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
53
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", 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.6", ngImport: i0, type: UpAlertTitleDirective, decorators: [{
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAlertTitleDirective, decorators: [{
56
56
  type: Directive,
57
57
  args: [{
58
58
  standalone: true,
@@ -71,10 +71,10 @@ class UpAlertDescriptionDirective {
71
71
  return up('col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed', this.inlineClass());
72
72
  }, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
73
73
  }
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 }); }
74
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAlertDescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
75
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", 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.6", ngImport: i0, type: UpAlertDescriptionDirective, decorators: [{
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAlertDescriptionDirective, decorators: [{
78
78
  type: Directive,
79
79
  args: [{
80
80
  standalone: true,
@@ -55,10 +55,10 @@ class ApprovalService {
55
55
  `
56
56
  });
57
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' }); }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ApprovalService, deps: [{ token: i1.GqlParser }], target: i0.ɵɵFactoryTarget.Injectable }); }
59
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ApprovalService, providedIn: 'root' }); }
60
60
  }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ApprovalService, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ApprovalService, decorators: [{
62
62
  type: Injectable,
63
63
  args: [{
64
64
  providedIn: 'root'
@@ -104,10 +104,10 @@ class UpApprovalFormComponent {
104
104
  getColors(status) {
105
105
  return this.STATUS_COLOR_MAP[status] ?? this.STATUS_COLOR_MAP.DEFAULT;
106
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 }); }
107
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpApprovalFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
108
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", 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
109
  }
110
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpApprovalFormComponent, decorators: [{
110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpApprovalFormComponent, decorators: [{
111
111
  type: Component,
112
112
  args: [{ standalone: true, selector: 'up-approval-form', changeDetection: ChangeDetectionStrategy.OnPush, host: {
113
113
  class: 'block space-y-4'
@@ -0,0 +1,280 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, output, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { DatePipe } from '@angular/common';
4
+ import { UpContentContainerComponent } from '@unipin/angular-applet/containers';
5
+ import { UpInputDirective, UpFormFieldComponent } from '@unipin/angular-applet/forms';
6
+ import { UpDialogWrapperComponent, UpDialogContentDirective, UpDialogContentRefDirective } from '@unipin/angular-applet/dialog';
7
+
8
+ class UpAuditModalComponent {
9
+ constructor() {
10
+ this.audit = input.required(...(ngDevMode ? [{ debugName: "audit" }] : []));
11
+ this.dismissed = output();
12
+ }
13
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAuditModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
14
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: UpAuditModalComponent, isStandalone: true, selector: "up-audit-modal", inputs: { audit: { classPropertyName: "audit", publicName: "audit", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { dismissed: "dismissed" }, ngImport: i0, template: `
15
+ <up-dialog-wrapper
16
+ [isOpen]="audit() !== null"
17
+ (dismissed)="dismissed.emit()"
18
+ >
19
+ <div
20
+ upDialogContent
21
+ class="max-w-200"
22
+ *upDialogContentRef
23
+ >
24
+ <up-content-container
25
+ [header]="audit()?.user?.name + ' ' + audit()?.action + ' • ' + (audit()?.createdAt | date: 'dd LLL yyyy HH:mm')"
26
+ (closed)="dismissed.emit()"
27
+ >
28
+ <div class="p-4 space-y-6">
29
+ <up-form-field label="Username">
30
+ <input
31
+ upInput
32
+ readonly
33
+ type="text"
34
+ tabindex="-1"
35
+ [value]="audit()?.user?.name"
36
+ />
37
+ </up-form-field>
38
+
39
+ <up-form-field label="Description">
40
+ <textarea
41
+ upInput
42
+ readonly
43
+ tabindex="-1"
44
+ class="h-25 w-full"
45
+ [value]="audit()?.description"
46
+ ></textarea>
47
+ </up-form-field>
48
+
49
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
50
+ <up-form-field label="Source IP">
51
+ <input
52
+ upInput
53
+ readonly
54
+ type="text"
55
+ tabindex="-1"
56
+ [value]="audit()?.sourceIp"
57
+ />
58
+ </up-form-field>
59
+
60
+ <up-form-field label="Source Platform">
61
+ <input
62
+ upInput
63
+ readonly
64
+ type="text"
65
+ tabindex="-1"
66
+ [value]="audit()?.user?.sourcePlatform"
67
+ />
68
+ </up-form-field>
69
+
70
+ <up-form-field label="MS Source">
71
+ <input
72
+ upInput
73
+ readonly
74
+ type="text"
75
+ tabindex="-1"
76
+ [value]="audit()?.msSource"
77
+ />
78
+ </up-form-field>
79
+
80
+ <up-form-field label="Function">
81
+ <input
82
+ upInput
83
+ readonly
84
+ type="text"
85
+ tabindex="-1"
86
+ [value]="audit()?.function"
87
+ />
88
+ </up-form-field>
89
+ </div>
90
+
91
+ @if (
92
+ audit() &&
93
+ audit()!.changedData &&
94
+ audit()!.changedData!.length > 0
95
+ ) {
96
+ <div class="space-y-2">
97
+ <label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 select-none">
98
+ Changed Data
99
+ </label>
100
+
101
+ <table class="w-full my-2 table-fixed border-collapse rounded-md select-none">
102
+ <thead class="border-inherit border-solid border-0">
103
+ <tr>
104
+ <th class="w-[30%] p-2 text-left border border-border bg-[#f2f2f2] text-base border-tl-2">Field</th>
105
+ <th class="w-[35%] p-2 text-left border border-border bg-[#f2f2f2] text-base">Old Value</th>
106
+ <th class="w-[35%] p-2 text-left border border-border bg-[#f2f2f2] text-base border-tr-2">New Value</th>
107
+ </tr>
108
+ </thead>
109
+
110
+ <tbody class="border-inherit border-solid border-0">
111
+ @for (data of audit()!.changedData; track data.field; let even = $even) {
112
+ <tr
113
+ [class]="even? 'bg-white': 'bg-[#f9f9f9]'"
114
+ >
115
+ <td class="p-2 text-left border border-border capitalize">
116
+ {{ data.field }}
117
+ </td>
118
+
119
+ <td class="p-2 text-left border border-border capitalize">
120
+ {{ data.oldValue }}
121
+ </td>
122
+
123
+ <td class="p-2 text-left border border-border capitalize">
124
+ {{ data.newValue }}
125
+ </td>
126
+ </tr>
127
+ }
128
+ </tbody>
129
+ </table>
130
+ </div>
131
+ }
132
+ </div>
133
+ </up-content-container>
134
+ </div>
135
+ </up-dialog-wrapper>
136
+ `, isInline: true, dependencies: [{ kind: "directive", type: UpInputDirective, selector: "[upInput]", inputs: ["class"], exportAs: ["upInput"] }, { kind: "component", type: UpFormFieldComponent, selector: "up-form-field", inputs: ["name", "hint", "label", "class"] }, { kind: "component", type: UpDialogWrapperComponent, selector: "up-dialog-wrapper", inputs: ["isOpen"], outputs: ["dismissed"], exportAs: ["upDialogWrapper"] }, { kind: "directive", type: UpDialogContentDirective, selector: "[upDialogContent]", inputs: ["class"], exportAs: ["upDialogContent"] }, { kind: "directive", type: UpDialogContentRefDirective, selector: "[upDialogContentRef]", inputs: ["context"], exportAs: ["upDialogContentRef"] }, { kind: "component", type: UpContentContainerComponent, selector: "up-content-container", inputs: ["header", "disabled", "hideCloseButton"], outputs: ["closed"] }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
137
+ }
138
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpAuditModalComponent, decorators: [{
139
+ type: Component,
140
+ args: [{
141
+ standalone: true,
142
+ selector: 'up-audit-modal',
143
+ changeDetection: ChangeDetectionStrategy.OnPush,
144
+ imports: [
145
+ DatePipe,
146
+ UpInputDirective,
147
+ UpFormFieldComponent,
148
+ UpDialogWrapperComponent,
149
+ UpDialogContentDirective,
150
+ UpDialogContentRefDirective,
151
+ UpContentContainerComponent
152
+ ],
153
+ template: `
154
+ <up-dialog-wrapper
155
+ [isOpen]="audit() !== null"
156
+ (dismissed)="dismissed.emit()"
157
+ >
158
+ <div
159
+ upDialogContent
160
+ class="max-w-200"
161
+ *upDialogContentRef
162
+ >
163
+ <up-content-container
164
+ [header]="audit()?.user?.name + ' ' + audit()?.action + ' • ' + (audit()?.createdAt | date: 'dd LLL yyyy HH:mm')"
165
+ (closed)="dismissed.emit()"
166
+ >
167
+ <div class="p-4 space-y-6">
168
+ <up-form-field label="Username">
169
+ <input
170
+ upInput
171
+ readonly
172
+ type="text"
173
+ tabindex="-1"
174
+ [value]="audit()?.user?.name"
175
+ />
176
+ </up-form-field>
177
+
178
+ <up-form-field label="Description">
179
+ <textarea
180
+ upInput
181
+ readonly
182
+ tabindex="-1"
183
+ class="h-25 w-full"
184
+ [value]="audit()?.description"
185
+ ></textarea>
186
+ </up-form-field>
187
+
188
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
189
+ <up-form-field label="Source IP">
190
+ <input
191
+ upInput
192
+ readonly
193
+ type="text"
194
+ tabindex="-1"
195
+ [value]="audit()?.sourceIp"
196
+ />
197
+ </up-form-field>
198
+
199
+ <up-form-field label="Source Platform">
200
+ <input
201
+ upInput
202
+ readonly
203
+ type="text"
204
+ tabindex="-1"
205
+ [value]="audit()?.user?.sourcePlatform"
206
+ />
207
+ </up-form-field>
208
+
209
+ <up-form-field label="MS Source">
210
+ <input
211
+ upInput
212
+ readonly
213
+ type="text"
214
+ tabindex="-1"
215
+ [value]="audit()?.msSource"
216
+ />
217
+ </up-form-field>
218
+
219
+ <up-form-field label="Function">
220
+ <input
221
+ upInput
222
+ readonly
223
+ type="text"
224
+ tabindex="-1"
225
+ [value]="audit()?.function"
226
+ />
227
+ </up-form-field>
228
+ </div>
229
+
230
+ @if (
231
+ audit() &&
232
+ audit()!.changedData &&
233
+ audit()!.changedData!.length > 0
234
+ ) {
235
+ <div class="space-y-2">
236
+ <label class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 select-none">
237
+ Changed Data
238
+ </label>
239
+
240
+ <table class="w-full my-2 table-fixed border-collapse rounded-md select-none">
241
+ <thead class="border-inherit border-solid border-0">
242
+ <tr>
243
+ <th class="w-[30%] p-2 text-left border border-border bg-[#f2f2f2] text-base border-tl-2">Field</th>
244
+ <th class="w-[35%] p-2 text-left border border-border bg-[#f2f2f2] text-base">Old Value</th>
245
+ <th class="w-[35%] p-2 text-left border border-border bg-[#f2f2f2] text-base border-tr-2">New Value</th>
246
+ </tr>
247
+ </thead>
248
+
249
+ <tbody class="border-inherit border-solid border-0">
250
+ @for (data of audit()!.changedData; track data.field; let even = $even) {
251
+ <tr
252
+ [class]="even? 'bg-white': 'bg-[#f9f9f9]'"
253
+ >
254
+ <td class="p-2 text-left border border-border capitalize">
255
+ {{ data.field }}
256
+ </td>
257
+
258
+ <td class="p-2 text-left border border-border capitalize">
259
+ {{ data.oldValue }}
260
+ </td>
261
+
262
+ <td class="p-2 text-left border border-border capitalize">
263
+ {{ data.newValue }}
264
+ </td>
265
+ </tr>
266
+ }
267
+ </tbody>
268
+ </table>
269
+ </div>
270
+ }
271
+ </div>
272
+ </up-content-container>
273
+ </div>
274
+ </up-dialog-wrapper>
275
+ `
276
+ }]
277
+ }], propDecorators: { audit: [{ type: i0.Input, args: [{ isSignal: true, alias: "audit", required: true }] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }] } });
278
+
279
+ export { UpAuditModalComponent };
280
+ //# sourceMappingURL=unipin-angular-applet-audit-audit-modal.component-3a2P0bZr.mjs.map