@unipin/angular-applet 21.3.2 → 21.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/fesm2022/unipin-angular-applet-accordion.mjs +39 -37
- package/fesm2022/unipin-angular-applet-accordion.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-alert-dialog.mjs +9 -9
- package/fesm2022/unipin-angular-applet-alert-dialog.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-alert.mjs +16 -19
- package/fesm2022/unipin-angular-applet-alert.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-approval.mjs +11 -11
- package/fesm2022/unipin-angular-applet-approval.mjs.map +1 -1
- package/fesm2022/{unipin-angular-applet-audit-audit-modal.component-wPoNvU2r.mjs → unipin-angular-applet-audit-audit-modal.component-Y61VDaze.mjs} +6 -7
- package/fesm2022/unipin-angular-applet-audit-audit-modal.component-Y61VDaze.mjs.map +1 -0
- package/fesm2022/unipin-angular-applet-audit.mjs +14 -14
- package/fesm2022/unipin-angular-applet-audit.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-auth.mjs +23 -26
- package/fesm2022/unipin-angular-applet-auth.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-avatar.mjs +6 -7
- package/fesm2022/unipin-angular-applet-avatar.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-badge.mjs +6 -7
- package/fesm2022/unipin-angular-applet-badge.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-buttons.mjs +13 -15
- package/fesm2022/unipin-angular-applet-buttons.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-calendar.mjs +23 -27
- package/fesm2022/unipin-angular-applet-calendar.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-collapsible.mjs +17 -20
- package/fesm2022/unipin-angular-applet-collapsible.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-common.mjs +25 -30
- package/fesm2022/unipin-angular-applet-common.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-containers.mjs +23 -26
- package/fesm2022/unipin-angular-applet-containers.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-dialog.mjs +64 -70
- package/fesm2022/unipin-angular-applet-dialog.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-forms.mjs +225 -232
- package/fesm2022/unipin-angular-applet-forms.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-froala.mjs +10 -11
- package/fesm2022/unipin-angular-applet-froala.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-grids.mjs +404 -5
- package/fesm2022/unipin-angular-applet-grids.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-infinite-scroll.mjs +5 -6
- package/fesm2022/unipin-angular-applet-infinite-scroll.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-json-viewer.mjs +8 -9
- package/fesm2022/unipin-angular-applet-json-viewer.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-kbd.mjs +5 -6
- package/fesm2022/unipin-angular-applet-kbd.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-loading-dialog.mjs +8 -9
- package/fesm2022/unipin-angular-applet-loading-dialog.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-markdown.mjs +20 -21
- package/fesm2022/unipin-angular-applet-markdown.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-popover.mjs +26 -30
- package/fesm2022/unipin-angular-applet-popover.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-progress-bar.mjs +8 -9
- package/fesm2022/unipin-angular-applet-progress-bar.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-skeleton.mjs +5 -6
- package/fesm2022/unipin-angular-applet-skeleton.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-spinner.mjs +7 -7
- package/fesm2022/unipin-angular-applet-spinner.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-stepper.mjs +17 -19
- package/fesm2022/unipin-angular-applet-stepper.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-swipeable.mjs +26 -30
- package/fesm2022/unipin-angular-applet-swipeable.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-tabs.mjs +22 -25
- package/fesm2022/unipin-angular-applet-tabs.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-tooltip.mjs +5 -6
- package/fesm2022/unipin-angular-applet-tooltip.mjs.map +1 -1
- package/package.json +5 -2
- package/types/unipin-angular-applet-accordion.d.ts +4 -2
- package/types/unipin-angular-applet-forms.d.ts +2 -1
- package/types/unipin-angular-applet-grids.d.ts +101 -14
- package/types/unipin-angular-applet-popover.d.ts +3 -3
- package/fesm2022/unipin-angular-applet-audit-audit-modal.component-wPoNvU2r.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unipin-angular-applet-tabs.mjs","sources":["../../../projects/unipin-angular/tabs/variants/tabs.variant.ts","../../../projects/unipin-angular/tabs/components/tabs.component.ts","../../../projects/unipin-angular/tabs/directives/tabs-content.directive.ts","../../../projects/unipin-angular/tabs/directives/tabs-trigger.directive.ts","../../../projects/unipin-angular/tabs/unipin-angular-applet-tabs.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const tabsVariants = cva(\n `\n flex mb-2 w-max p-1 rounded-lg\n [&>.tabs-trigger]:px-2.5 [&>.tabs-trigger]:py-1.5 [&>.tabs-trigger]:text-sm [&>.tabs-trigger]:transition-colors [&>.tabs-trigger]:cursor-pointer\n `,\n {\n variants: {\n variant: {\n default: `\n bg-gray-100 \n [&>.tabs-trigger]:data-[state=active]:bg-white [&>.tabs-trigger]:data-[state=active]:shadow-lg [&>.tabs-trigger]:data-[state=active]:rounded-lg [&>.tabs-trigger]:hover:opacity-[60%]\n `,\n underline: `\n bg-none \n [&>.tabs-trigger]:border-b-2 [&>.tabs-trigger]:border-transparent [&>.tabs-trigger]:hover:text-primary [&>.tabs-trigger]:text-gray-500 [&>.tabs-trigger]:data-[state=active]:border-primary [&>.tabs-trigger]:data-[state=active]:text-primary\n `,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport type TabsVariants = VariantProps<typeof tabsVariants>;\n","import { Component, computed, effect, input, InputSignal, signal, WritableSignal } from '@angular/core';\nimport type { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { tabsVariants } from '../variants/tabs.variant';\n\n@Component({\n standalone: true,\n selector: 'up-tabs',\n template: `\n <div [class]=\"tabsClass()\">\n <ng-content select=\"[upTabsTrigger]\" />\n </div>\n\n <ng-content select=\"[upTabsContent]\" />\n `,\n})\nexport class UpTabsComponent {\n\n public readonly size: InputSignal<'sm' | 'md' | 'lg'> = input<'sm' | 'md' | 'lg'>('md');\n public readonly variant: InputSignal<'underline' | 'default'> = input<'underline' | 'default'>('default');\n\n public readonly inlineStyle: InputSignal<ClassValue> = input<ClassValue>('', { alias: 'class' });\n public readonly defaultActiveTab: InputSignal<string | null> = input<string | null>(null, { alias: 'default' });\n\n public readonly activeTab: WritableSignal<string | null> = signal<string | null>(null);\n public readonly tabsClass = computed(\n () => {\n return up(\n tabsVariants(\n {\n variant: this.variant()\n }\n ),\n this.inlineStyle()\n );\n }\n );\n\n constructor() {\n effect(\n () => {\n if (\n this.activeTab() === null && \n this.defaultActiveTab()\n ) {\n this.activeTab.set(this.defaultActiveTab());\n }\n }\n );\n }\n\n public setActive(tab: string): void{\n this.activeTab.set(tab);\n }\n}\n","import { computed, Directive, effect, input, InputSignal, signal, WritableSignal } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpTabsComponent } from '../components/tabs.component';\n\n@Directive({\n standalone: true,\n exportAs: 'upTabsContent',\n selector: '[upTabsContent]',\n host: {\n '[hidden]': '!isActive()',\n '[class]': 'tabsContentClass()',\n }\n})\nexport class UpTabsContentDirective {\n\n public readonly value: InputSignal<string> = input.required<string>();\n public readonly inlineStyle: InputSignal<ClassValue> = input<ClassValue>('', { alias: 'class' });\n\n public readonly isActive: WritableSignal<boolean> = signal(false);\n public readonly tabsContentClass = computed(\n () => {\n return up('block', this.inlineStyle());\n }\n );\n\n constructor(\n protected readonly parent: UpTabsComponent\n ) {\n effect(\n () => {\n if (!this.parent) {\n return;\n }\n \n this.isActive.set(\n this.parent.activeTab() === this.value()\n );\n }\n );\n }\n}\n","import { computed, Directive, effect, input, signal } from '@angular/core';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpTabsComponent } from '../components/tabs.component';\n\n@Directive({\n standalone: true,\n exportAs: 'upTabsTrigger',\n selector: '[upTabsTrigger]',\n host: {\n '(click)': 'activate()',\n '[class]': 'tabsTriggerClass()',\n '[attr.data-state]': `isActive()? 'active' : 'inactive'`,\n }\n})\nexport class UpTabsTriggerDirective {\n \n public readonly value = input.required<string>();\n \n public readonly isActive = signal(false);\n public readonly tabsTriggerClass = computed(() => up('tabs-trigger font-medium'));\n\n constructor(\n protected readonly parent: UpTabsComponent\n ) {\n effect(\n () => {\n if (!this.parent) return;\n this.isActive.set(this.parent.activeTab() === this.value());\n }\n );\n }\n\n public activate(): void{\n this.parent?.setActive(this.value());\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.UpTabsComponent"],"mappings":";;;;;AAEO,MAAM,YAAY,GAAG,GAAG,CAC7B;;;GAGC,EACD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE;;;AAGR,QAAA,CAAA;AACD,YAAA,SAAS,EAAE;;;AAGV,QAAA,CAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA,CACF;;MCRY,eAAe,CAAA;AAsB1B,IAAA,WAAA,GAAA;AApBgB,QAAA,IAAA,CAAA,IAAI,GAAoC,KAAK,CAAqB,IAAI,gDAAC;AACvE,QAAA,IAAA,CAAA,OAAO,GAAyC,KAAK,CAA0B,SAAS,mDAAC;QAE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AAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAVlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,YAAY;AACvB,wBAAA,SAAS,EAAE,oBAAoB;AAC/B,wBAAA,mBAAmB,EAAE,CAAA,iCAAA,CAAmC;AACzD;AACF,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"unipin-angular-applet-tabs.mjs","sources":["../../../projects/unipin-angular/tabs/variants/tabs.variant.ts","../../../projects/unipin-angular/tabs/components/tabs.component.ts","../../../projects/unipin-angular/tabs/directives/tabs-content.directive.ts","../../../projects/unipin-angular/tabs/directives/tabs-trigger.directive.ts","../../../projects/unipin-angular/tabs/unipin-angular-applet-tabs.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const tabsVariants = cva(\n `\n flex mb-2 w-max p-1 rounded-lg\n [&>.tabs-trigger]:px-2.5 [&>.tabs-trigger]:py-1.5 [&>.tabs-trigger]:text-sm [&>.tabs-trigger]:transition-colors [&>.tabs-trigger]:cursor-pointer\n `,\n {\n variants: {\n variant: {\n default: `\n bg-gray-100 \n [&>.tabs-trigger]:data-[state=active]:bg-white [&>.tabs-trigger]:data-[state=active]:shadow-lg [&>.tabs-trigger]:data-[state=active]:rounded-lg [&>.tabs-trigger]:hover:opacity-[60%]\n `,\n underline: `\n bg-none \n [&>.tabs-trigger]:border-b-2 [&>.tabs-trigger]:border-transparent [&>.tabs-trigger]:hover:text-primary [&>.tabs-trigger]:text-gray-500 [&>.tabs-trigger]:data-[state=active]:border-primary [&>.tabs-trigger]:data-[state=active]:text-primary\n `,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nexport type TabsVariants = VariantProps<typeof tabsVariants>;\n","import { Component, computed, effect, input, InputSignal, signal, WritableSignal } from '@angular/core';\nimport type { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { tabsVariants } from '../variants/tabs.variant';\n\n\n@Component({\n selector: 'up-tabs',\n template: `\n <div [class]=\"tabsClass()\">\n <ng-content select=\"[upTabsTrigger]\" />\n </div>\n\n <ng-content select=\"[upTabsContent]\" />\n `,\n})\nexport class UpTabsComponent {\n\n public readonly size: InputSignal<'sm' | 'md' | 'lg'> = input<'sm' | 'md' | 'lg'>('md');\n public readonly variant: InputSignal<'underline' | 'default'> = input<'underline' | 'default'>('default');\n\n public readonly inlineStyle: InputSignal<ClassValue> = input<ClassValue>('', { alias: 'class' });\n public readonly defaultActiveTab: InputSignal<string | null> = input<string | null>(null, { alias: 'default' });\n\n public readonly activeTab: WritableSignal<string | null> = signal<string | null>(null);\n public readonly tabsClass = computed(\n () => {\n return up(\n tabsVariants(\n {\n variant: this.variant()\n }\n ),\n this.inlineStyle()\n );\n }\n );\n\n constructor() {\n effect(\n () => {\n if (\n this.activeTab() === null && \n this.defaultActiveTab()\n ) {\n this.activeTab.set(this.defaultActiveTab());\n }\n }\n );\n }\n\n public setActive(tab: string): void{\n this.activeTab.set(tab);\n }\n}\n","import { computed, Directive, effect, input, InputSignal, signal, WritableSignal } from '@angular/core';\nimport { ClassValue } from 'clsx';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpTabsComponent } from '../components/tabs.component';\n\n\n@Directive({\n exportAs: 'upTabsContent',\n selector: '[upTabsContent]',\n host: {\n '[hidden]': '!isActive()',\n '[class]': 'tabsContentClass()',\n }\n})\nexport class UpTabsContentDirective {\n\n public readonly value: InputSignal<string> = input.required<string>();\n public readonly inlineStyle: InputSignal<ClassValue> = input<ClassValue>('', { alias: 'class' });\n\n public readonly isActive: WritableSignal<boolean> = signal(false);\n public readonly tabsContentClass = computed(\n () => {\n return up('block', this.inlineStyle());\n }\n );\n\n constructor(\n protected readonly parent: UpTabsComponent\n ) {\n effect(\n () => {\n if (!this.parent) {\n return;\n }\n \n this.isActive.set(\n this.parent.activeTab() === this.value()\n );\n }\n );\n }\n}\n","import { computed, Directive, effect, input, signal } from '@angular/core';\nimport { up } from '@unipin/angular-applet/common';\nimport { UpTabsComponent } from '../components/tabs.component';\n\n\n@Directive({\n exportAs: 'upTabsTrigger',\n selector: '[upTabsTrigger]',\n host: {\n '(click)': 'activate()',\n '[class]': 'tabsTriggerClass()',\n '[attr.data-state]': `isActive()? 'active' : 'inactive'`,\n }\n})\nexport class UpTabsTriggerDirective {\n \n public readonly value = input.required<string>();\n \n public readonly isActive = signal(false);\n public readonly tabsTriggerClass = computed(() => up('tabs-trigger font-medium'));\n\n constructor(\n protected readonly parent: UpTabsComponent\n ) {\n effect(\n () => {\n if (!this.parent) return;\n this.isActive.set(this.parent.activeTab() === this.value());\n }\n );\n }\n\n public activate(): void{\n this.parent?.setActive(this.value());\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.UpTabsComponent"],"mappings":";;;;;AAEO,MAAM,YAAY,GAAG,GAAG,CAC7B;;;GAGC,EACD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE;;;AAGR,QAAA,CAAA;AACD,YAAA,SAAS,EAAE;;;AAGV,QAAA,CAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA,CACF;;MCRY,eAAe,CAAA;AAsB1B,IAAA,WAAA,GAAA;AApBgB,QAAA,IAAA,CAAA,IAAI,GAAoC,KAAK,CAAqB,IAAI,2EAAC;AACvE,QAAA,IAAA,CAAA,OAAO,GAAyC,KAAK,CAA0B,SAAS,8EAAC;QAEzF,IAAA,CAAA,WAAW,GAA4B,KAAK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UAAA,EAAA,CAAA;kBATlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,YAAY;AACvB,wBAAA,SAAS,EAAE,oBAAoB;AAC/B,wBAAA,mBAAmB,EAAE,CAAA,iCAAA,CAAmC;AACzD;AACF,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -12,13 +12,13 @@ class UpTooltipDirective {
|
|
|
12
12
|
* @type {InputSignal<string>}
|
|
13
13
|
* @default ''
|
|
14
14
|
*/
|
|
15
|
-
this.toolTipText = input.required(...(ngDevMode ? [{ debugName: "toolTipText" }] : []));
|
|
15
|
+
this.toolTipText = input.required(...(ngDevMode ? [{ debugName: "toolTipText" }] : /* istanbul ignore next */ []));
|
|
16
16
|
/**
|
|
17
17
|
* Input variable specifying the position of the tooltip relative to the host element.
|
|
18
18
|
* @type {InputSignal<string>}
|
|
19
19
|
* @default 'top'
|
|
20
20
|
*/
|
|
21
|
-
this.position = input('top', ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
21
|
+
this.position = input('top', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
22
22
|
this._winListener = [];
|
|
23
23
|
this._hostListener = [];
|
|
24
24
|
this._tooltipElement = null;
|
|
@@ -95,13 +95,12 @@ class UpTooltipDirective {
|
|
|
95
95
|
this.renderer.setStyle(tooltipEl, 'top', `${Math.round(top)}px`);
|
|
96
96
|
this.renderer.setStyle(tooltipEl, 'left', `${Math.round(left)}px`);
|
|
97
97
|
}
|
|
98
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
99
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
98
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: UpTooltipDirective, deps: [{ token: DOCUMENT }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
99
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.7", type: UpTooltipDirective, isStandalone: true, selector: "[upTooltip]", inputs: { toolTipText: { classPropertyName: "toolTipText", publicName: "toolTipText", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["upTooltip"], ngImport: i0 }); }
|
|
100
100
|
}
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: UpTooltipDirective, decorators: [{
|
|
102
102
|
type: Directive,
|
|
103
103
|
args: [{
|
|
104
|
-
standalone: true,
|
|
105
104
|
exportAs: 'upTooltip',
|
|
106
105
|
selector: '[upTooltip]',
|
|
107
106
|
}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unipin-angular-applet-tooltip.mjs","sources":["../../../projects/unipin-angular/tooltip/tooltip.directive.ts","../../../projects/unipin-angular/tooltip/unipin-angular-applet-tooltip.ts"],"sourcesContent":["import { Directive, ElementRef, Renderer2, OnInit, OnDestroy, input, Inject } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n@Directive({\n
|
|
1
|
+
{"version":3,"file":"unipin-angular-applet-tooltip.mjs","sources":["../../../projects/unipin-angular/tooltip/tooltip.directive.ts","../../../projects/unipin-angular/tooltip/unipin-angular-applet-tooltip.ts"],"sourcesContent":["import { Directive, ElementRef, Renderer2, OnInit, OnDestroy, input, Inject } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n\n@Directive({\n exportAs: 'upTooltip',\n selector: '[upTooltip]',\n})\nexport class UpTooltipDirective implements OnInit, OnDestroy {\n\n /**\n * Input variable specifying the text displayed in the tooltip helper, which provides a hint to the user about the purpose of the element.\n * @type {InputSignal<string>}\n * @default ''\n */\n public readonly toolTipText = input.required<string>();\n \n /**\n * Input variable specifying the position of the tooltip relative to the host element.\n * @type {InputSignal<string>}\n * @default 'top'\n */\n public readonly position = input<'top' | 'right' | 'bottom' | 'left'>('top');\n \n protected _winListener: Array<() => void> = [];\n protected _hostListener: Array<() => void> = [];\n protected _tooltipElement: HTMLElement | null = null;\n\n constructor(\n @Inject(DOCUMENT) protected readonly doc: Document,\n protected readonly renderer: Renderer2,\n protected readonly el: ElementRef<HTMLElement>,\n ) {}\n\n public ngOnInit(): void{\n this._hostListener.push(\n this.renderer.listen(\n this.el.nativeElement, \n 'mouseenter', \n () => {\n if (this._tooltipElement) {\n this.renderer.removeClass(this._tooltipElement, 'invisible');\n return;\n }\n this._tooltipElement = this.renderer.createElement('span');\n \n this.renderer.setAttribute(\n this._tooltipElement, \n 'class', \n 'fixed z-[10000] text-white max-w-xs text-xs w-max whitespace-normal bg-[#2D3336] rounded-lg px-2 py-1 break-words pointer-events-none'\n );\n\n this.renderer.appendChild(\n this._tooltipElement, \n this.renderer.createText(\n this.toolTipText()\n )\n );\n this.renderer.appendChild(this.doc.body, this._tooltipElement);\n \n this.positionTooltip(); \n this._winListener.push(\n this.renderer.listen('window', 'scroll', () => this.positionTooltip()),\n this.renderer.listen('window', 'resize', () => this.positionTooltip())\n );\n }\n ),\n \n this.renderer.listen(\n this.el.nativeElement, \n 'mouseleave', \n () => {\n this.hideTooltip();\n }\n )\n );\n }\n\n public ngOnDestroy(): void{\n this.hideTooltip();\n\n for (const off of this._hostListener) {\n try { \n off(); \n } catch {}\n }\n this._hostListener.length = 0;\n\n for (const off of this._winListener) {\n try { \n off(); \n } catch {}\n }\n this._winListener.length = 0;\n }\n\n protected hideTooltip(): void{\n if (this._tooltipElement) {\n this.renderer.addClass(this._tooltipElement, 'invisible');\n }\n }\n\n protected positionTooltip(): void{\n if (!this._tooltipElement) {\n return;\n }\n\n const hostRect = this.el.nativeElement.getBoundingClientRect();\n const tooltipEl = this._tooltipElement as HTMLElement;\n const tooltipRect = tooltipEl.getBoundingClientRect();\n\n const gap = 8;\n let top = 0;\n let left = 0;\n\n switch (this.position()) {\n case 'top':\n top = hostRect.top - tooltipRect.height - gap;\n left = hostRect.left + (hostRect.width - tooltipRect.width) / 2;\n break;\n\n case 'left':\n top = hostRect.top + (hostRect.height - tooltipRect.height) / 2;\n left = hostRect.left - tooltipRect.width - gap;\n break;\n\n case 'right':\n top = hostRect.top + (hostRect.height - tooltipRect.height) / 2;\n left = hostRect.right + gap;\n break;\n\n default:\n top = hostRect.bottom + gap;\n left = hostRect.left + (hostRect.width - tooltipRect.width) / 2;\n break;\n }\n\n const margin = 4;\n left = Math.max(\n margin, \n Math.min(\n left, \n this.doc.defaultView?.innerWidth?? 0 - tooltipRect.width - margin\n )\n );\n \n top = Math.max(\n margin, \n Math.min(\n top, \n this.doc.defaultView?.innerHeight?? 0 - tooltipRect.height - margin\n )\n );\n this.renderer.setStyle(tooltipEl, 'top', `${ Math.round(top) }px`);\n this.renderer.setStyle(tooltipEl, 'left', `${ Math.round(left) }px`);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAQa,kBAAkB,CAAA;AAoB7B,IAAA,WAAA,CACuC,GAAa,EAC/B,QAAmB,EACnB,EAA2B,EAAA;QAFT,IAAA,CAAA,GAAG,GAAH,GAAG;QACrB,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,EAAE,GAAF,EAAE;AArBvB;;;;AAIG;AACa,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,QAAQ,iFAAU;AAEtD;;;;AAIG;AACa,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAsC,KAAK,+EAAC;QAElE,IAAA,CAAA,YAAY,GAAsB,EAAE;QACpC,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.5.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/cdk": "21.x.x",
|
|
6
6
|
"@angular/common": "21.x.x",
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
"@ng-icons/flag-icons": "^33.x.x",
|
|
12
12
|
"@ng-icons/material-icons": "33.x.x",
|
|
13
13
|
"@ng-select/ng-select": "21.x.x",
|
|
14
|
+
"ag-grid-angular": "^35.x.x",
|
|
15
|
+
"ag-grid-community": "^35.x.x",
|
|
14
16
|
"angular-froala-wysiwyg": "4.x.x",
|
|
15
17
|
"angular-split": "20.x.x",
|
|
16
18
|
"class-variance-authority": "0.x.x",
|
|
@@ -159,5 +161,6 @@
|
|
|
159
161
|
"types": "./types/unipin-angular-applet-tooltip.d.ts",
|
|
160
162
|
"default": "./fesm2022/unipin-angular-applet-tooltip.mjs"
|
|
161
163
|
}
|
|
162
|
-
}
|
|
164
|
+
},
|
|
165
|
+
"type": "module"
|
|
163
166
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnInit } from '@angular/core';
|
|
2
|
+
import { OnInit, ElementRef } from '@angular/core';
|
|
3
3
|
import { ClassValue } from 'clsx';
|
|
4
4
|
|
|
5
5
|
declare class UpAccordionDirective implements OnInit {
|
|
@@ -49,10 +49,12 @@ declare class UpAccordionTriggerDirective {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
declare class UpAccordionContentDirective {
|
|
52
|
+
protected readonly elementRef: ElementRef;
|
|
52
53
|
protected readonly item: UpAccordionItemDirective;
|
|
53
54
|
readonly inlineClass: _angular_core.InputSignal<ClassValue>;
|
|
55
|
+
protected readonly _contentHeight: _angular_core.Signal<string>;
|
|
54
56
|
protected _computedClass: _angular_core.Signal<string>;
|
|
55
|
-
constructor(item: UpAccordionItemDirective);
|
|
57
|
+
constructor(elementRef: ElementRef, item: UpAccordionItemDirective);
|
|
56
58
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UpAccordionContentDirective, never>;
|
|
57
59
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UpAccordionContentDirective, "[upAccordionContent]", ["upAccordionContent"], { "inlineClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
58
60
|
}
|
|
@@ -572,11 +572,12 @@ declare class UpFormFieldComponent {
|
|
|
572
572
|
readonly hint: _angular_core.InputSignal<string>;
|
|
573
573
|
readonly label: _angular_core.InputSignal<string>;
|
|
574
574
|
readonly inlineClass: _angular_core.InputSignal<ClassValue>;
|
|
575
|
+
readonly hideAsterisk: _angular_core.InputSignalWithTransform<boolean, boolean>;
|
|
575
576
|
readonly control: _angular_core.Signal<UpFieldControl | undefined>;
|
|
576
577
|
protected readonly _computedClass: _angular_core.Signal<string>;
|
|
577
578
|
constructor();
|
|
578
579
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UpFormFieldComponent, never>;
|
|
579
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UpFormFieldComponent, "up-form-field", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "inlineClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, ["control"], ["*"], true, never>;
|
|
580
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UpFormFieldComponent, "up-form-field", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "inlineClass": { "alias": "class"; "required": false; "isSignal": true; }; "hideAsterisk": { "alias": "hideAsterisk"; "required": false; "isSignal": true; }; }, {}, ["control"], ["*"], true, never>;
|
|
580
581
|
}
|
|
581
582
|
|
|
582
583
|
declare class UpImagePickerComponent extends UpFieldControlComponent implements ControlValueAccessor {
|
|
@@ -1,21 +1,41 @@
|
|
|
1
|
+
import * as ag_grid_community from 'ag-grid-community';
|
|
2
|
+
import { ColDef, Theme, GridApi, ColGroupDef, RowModelType, RowClassParams, GridReadyEvent, RowClickedEvent, SelectionChangedEvent, PaginationChangedEvent, DragStoppedEvent } from 'ag-grid-community';
|
|
1
3
|
import { BadgeVariants } from '@unipin/angular-applet/badge';
|
|
4
|
+
import * as _angular_core from '@angular/core';
|
|
5
|
+
import { OnInit } from '@angular/core';
|
|
6
|
+
import { ClassValue } from 'clsx';
|
|
2
7
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
valueGetter: string;
|
|
12
|
-
cellStyle: {
|
|
13
|
-
fontWeight: number;
|
|
14
|
-
textAlign: string;
|
|
15
|
-
justifyContent: string;
|
|
8
|
+
type GridDatasourceRefreshEvent<T> = {
|
|
9
|
+
page: number;
|
|
10
|
+
pageSize: number;
|
|
11
|
+
failCallback: (message?: string) => void;
|
|
12
|
+
successCallback: (data: T[], count?: number) => void;
|
|
13
|
+
sort: undefined | {
|
|
14
|
+
colId: string;
|
|
15
|
+
sort: 'asc' | 'desc';
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
+
type GridSnapshotPageInfo = {
|
|
20
|
+
hasNextPage: boolean;
|
|
21
|
+
endCursor: string | null;
|
|
22
|
+
};
|
|
23
|
+
type GridSnapshotDatasourceRefreshEvent<T> = {
|
|
24
|
+
pageSize: number;
|
|
25
|
+
after: string | null;
|
|
26
|
+
failCallback: (message?: string) => void;
|
|
27
|
+
successCallback: (data: T[], pageInfo: GridSnapshotPageInfo) => void;
|
|
28
|
+
sort: undefined | {
|
|
29
|
+
colId: string;
|
|
30
|
+
sort: 'asc' | 'desc';
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
declare const rowNumberColumn: ColDef;
|
|
35
|
+
|
|
36
|
+
declare const gridDefaultColDef: ColDef;
|
|
37
|
+
declare const gridTheme: Theme;
|
|
38
|
+
|
|
19
39
|
declare function renderFlag(countryCode: string | string[]): string;
|
|
20
40
|
|
|
21
41
|
type RenderGridBadgeOptions = {
|
|
@@ -35,4 +55,71 @@ type RenderStatusBadgeOptions = Omit<RenderGridBadgeOptions, 'isAutoGenerateColo
|
|
|
35
55
|
};
|
|
36
56
|
declare function renderStatusBadge(value: string, { additionalStatus, additionalClass }: RenderStatusBadgeOptions): string;
|
|
37
57
|
|
|
38
|
-
|
|
58
|
+
declare class GridService {
|
|
59
|
+
protected readonly apis: Map<string, GridApi>;
|
|
60
|
+
setApi(id: string, api: GridApi): void;
|
|
61
|
+
getApi(id: string): GridApi | undefined;
|
|
62
|
+
refreshGridCache(id: string, forceRefresh?: boolean): void;
|
|
63
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridService, never>;
|
|
64
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<GridService>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare class UpGridComponent<T = any> implements OnInit {
|
|
68
|
+
protected readonly service: GridService;
|
|
69
|
+
readonly columnDefs: _angular_core.InputSignal<(ColDef<T, any> | ColGroupDef<T>)[]>;
|
|
70
|
+
readonly noRowText: _angular_core.InputSignal<string>;
|
|
71
|
+
readonly rowModelType: _angular_core.InputSignal<RowModelType>;
|
|
72
|
+
readonly rowSelection: _angular_core.InputSignal<"single" | "multiple">;
|
|
73
|
+
readonly getRowClass: _angular_core.InputSignal<((params: RowClassParams<T>) => string) | undefined>;
|
|
74
|
+
readonly id: _angular_core.InputSignal<`grid-${string}`>;
|
|
75
|
+
readonly inlineClass: _angular_core.InputSignal<ClassValue>;
|
|
76
|
+
readonly rowPerPage: _angular_core.ModelSignal<number>;
|
|
77
|
+
readonly pagination: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
78
|
+
readonly gridReady: _angular_core.OutputEmitterRef<GridReadyEvent<T, any>>;
|
|
79
|
+
readonly rowClicked: _angular_core.OutputEmitterRef<RowClickedEvent<T, any>>;
|
|
80
|
+
readonly selectionChanged: _angular_core.OutputEmitterRef<SelectionChangedEvent<T, any>>;
|
|
81
|
+
readonly datasourceRefreshed: _angular_core.OutputEmitterRef<GridDatasourceRefreshEvent<T>>;
|
|
82
|
+
readonly theme: ag_grid_community.Theme;
|
|
83
|
+
readonly defaultColDef: ColDef<any, any>;
|
|
84
|
+
protected readonly _computedClass: _angular_core.Signal<string>;
|
|
85
|
+
protected count?: number;
|
|
86
|
+
constructor(service: GridService);
|
|
87
|
+
ngOnInit(): void;
|
|
88
|
+
changePagination({ newPageSize, api }: PaginationChangedEvent): void;
|
|
89
|
+
dragColumn({ api }: DragStoppedEvent): void;
|
|
90
|
+
setDatasource(ev: GridReadyEvent): void;
|
|
91
|
+
protected setNoRowTemplate(api: GridApi, text: string): void;
|
|
92
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UpGridComponent<any>, never>;
|
|
93
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UpGridComponent<any>, "up-grid", never, { "columnDefs": { "alias": "columnDefs"; "required": true; "isSignal": true; }; "noRowText": { "alias": "noRowText"; "required": false; "isSignal": true; }; "rowModelType": { "alias": "rowModelType"; "required": false; "isSignal": true; }; "rowSelection": { "alias": "rowSelection"; "required": false; "isSignal": true; }; "getRowClass": { "alias": "getRowClass"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "inlineClass": { "alias": "class"; "required": false; "isSignal": true; }; "rowPerPage": { "alias": "rowPerPage"; "required": false; "isSignal": true; }; "pagination": { "alias": "pagination"; "required": false; "isSignal": true; }; }, { "rowPerPage": "rowPerPageChange"; "gridReady": "gridReady"; "rowClicked": "rowClicked"; "selectionChanged": "selectionChanged"; "datasourceRefreshed": "datasourceRefreshed"; }, never, never, true, never>;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
declare class UpSnapshotGridComponent<T = any> implements OnInit {
|
|
97
|
+
protected readonly service: GridService;
|
|
98
|
+
readonly columnDefs: _angular_core.InputSignal<(ColDef<T, any> | ColGroupDef<T>)[]>;
|
|
99
|
+
readonly noRowText: _angular_core.InputSignal<string>;
|
|
100
|
+
readonly rowSelection: _angular_core.InputSignal<"single" | "multiple">;
|
|
101
|
+
readonly getRowClass: _angular_core.InputSignal<((params: RowClassParams<T>) => string) | undefined>;
|
|
102
|
+
readonly id: _angular_core.InputSignal<`grid-${string}`>;
|
|
103
|
+
readonly inlineClass: _angular_core.InputSignal<ClassValue>;
|
|
104
|
+
readonly rowPerPage: _angular_core.ModelSignal<number>;
|
|
105
|
+
readonly pagination: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
106
|
+
readonly gridReady: _angular_core.OutputEmitterRef<GridReadyEvent<T, any>>;
|
|
107
|
+
readonly rowClicked: _angular_core.OutputEmitterRef<RowClickedEvent<T, any>>;
|
|
108
|
+
readonly selectionChanged: _angular_core.OutputEmitterRef<SelectionChangedEvent<T, any>>;
|
|
109
|
+
readonly datasourceRefreshed: _angular_core.OutputEmitterRef<GridSnapshotDatasourceRefreshEvent<T>>;
|
|
110
|
+
readonly theme: ag_grid_community.Theme;
|
|
111
|
+
readonly defaultColDef: ColDef<any, any>;
|
|
112
|
+
protected readonly _computedClass: _angular_core.Signal<string>;
|
|
113
|
+
protected after: string;
|
|
114
|
+
constructor(service: GridService);
|
|
115
|
+
ngOnInit(): void;
|
|
116
|
+
changePagination({ newPageSize, api }: PaginationChangedEvent): void;
|
|
117
|
+
dragColumn({ api }: DragStoppedEvent): void;
|
|
118
|
+
setDatasource(ev: GridReadyEvent): void;
|
|
119
|
+
protected setNoRowTemplate(api: GridApi, text: string): void;
|
|
120
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UpSnapshotGridComponent<any>, never>;
|
|
121
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UpSnapshotGridComponent<any>, "up-snapshot-grid", never, { "columnDefs": { "alias": "columnDefs"; "required": true; "isSignal": true; }; "noRowText": { "alias": "noRowText"; "required": false; "isSignal": true; }; "rowSelection": { "alias": "rowSelection"; "required": false; "isSignal": true; }; "getRowClass": { "alias": "getRowClass"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "inlineClass": { "alias": "class"; "required": false; "isSignal": true; }; "rowPerPage": { "alias": "rowPerPage"; "required": false; "isSignal": true; }; "pagination": { "alias": "pagination"; "required": false; "isSignal": true; }; }, { "rowPerPage": "rowPerPageChange"; "gridReady": "gridReady"; "rowClicked": "rowClicked"; "selectionChanged": "selectionChanged"; "datasourceRefreshed": "datasourceRefreshed"; }, never, never, true, never>;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export { GridService, UpGridComponent, UpSnapshotGridComponent, gridDefaultColDef, gridTheme, renderFlag, renderGridBadge, renderStatusBadge, rowNumberColumn };
|
|
125
|
+
export type { GridDatasourceRefreshEvent, GridSnapshotDatasourceRefreshEvent, GridSnapshotPageInfo };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { UpDialogCloseDirective, UpDialogTriggerDirective, UpDialogContentRefDirective, UpDialog } from '@unipin/angular-applet/dialog';
|
|
1
|
+
import { UpDialogCloseDirective, UpDialogTriggerDirective, UpDialogRef, UpDialogContentRefDirective, UpDialog } from '@unipin/angular-applet/dialog';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
3
|
import { ElementRef } from '@angular/core';
|
|
5
4
|
import { ClassValue } from 'clsx';
|
|
@@ -28,8 +27,9 @@ declare class UpPopoverTriggerDirective extends UpDialogTriggerDirective {
|
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
declare class UpPopoverContentDirective {
|
|
31
|
-
readonly
|
|
30
|
+
readonly dialogRef: UpDialogRef<any>;
|
|
32
31
|
readonly inlineClass: i0.InputSignal<ClassValue>;
|
|
32
|
+
readonly state: i0.Signal<"closed" | "open">;
|
|
33
33
|
protected readonly _computedClass: i0.Signal<string>;
|
|
34
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<UpPopoverContentDirective, never>;
|
|
35
35
|
static ɵdir: i0.ɵɵDirectiveDeclaration<UpPopoverContentDirective, "[upPopoverContent]", ["upPopoverContent"], { "inlineClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unipin-angular-applet-audit-audit-modal.component-wPoNvU2r.mjs","sources":["../../../projects/unipin-angular/audit/components/modal/audit-modal.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, input, output } from '@angular/core';\nimport { DatePipe } from '@angular/common';\nimport { AuditTrail } from '@unipin/graphql-schema';\nimport { UpContentContainerComponent } from '@unipin/angular-applet/containers';\nimport { UpFormFieldComponent, UpInputDirective } from '@unipin/angular-applet/forms';\nimport { UpDialogWrapperComponent, UpDialogContentDirective, UpDialogContentRefDirective } from '@unipin/angular-applet/dialog';\n\n\ntype AuditTrailData = AuditTrail & {\n icon: string;\n changedData?: Array<{ field: string; oldValue: any; newValue: any }>;\n}\n\n\n@Component({\n standalone: true,\n selector: 'up-audit-modal',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n DatePipe,\n UpInputDirective,\n UpFormFieldComponent,\n UpDialogWrapperComponent,\n UpDialogContentDirective,\n UpDialogContentRefDirective,\n UpContentContainerComponent\n ],\n template: `\n <up-dialog-wrapper\n [isOpen]=\"audit() !== null\"\n (dismissed)=\"dismissed.emit()\"\n >\n <div\n upDialogContent\n class=\"max-w-200\"\n *upDialogContentRef\n >\n <up-content-container\n [header]=\"audit()?.user?.name + ' ' + audit()?.action + ' • ' + (audit()?.createdAt | date: 'dd LLL yyyy HH:mm')\"\n (closed)=\"dismissed.emit()\"\n >\n <div class=\"p-4 space-y-6\">\n <up-form-field label=\"Username\">\n <input \n upInput \n readonly\n type=\"text\"\n tabindex=\"-1\"\n [value]=\"audit()?.user?.name\" \n />\n </up-form-field>\n\n <up-form-field label=\"Description\">\n <textarea \n upInput\n readonly\n tabindex=\"-1\"\n class=\"h-25 w-full\"\n [value]=\"audit()?.description\"\n ></textarea>\n </up-form-field>\n\n <div class=\"grid grid-cols-1 lg:grid-cols-2 gap-6\">\n <up-form-field label=\"Source IP\">\n <input \n upInput \n readonly\n type=\"text\"\n tabindex=\"-1\"\n [value]=\"audit()?.sourceIp\" \n />\n </up-form-field>\n\n <up-form-field label=\"Source Platform\">\n <input \n upInput \n readonly\n type=\"text\"\n tabindex=\"-1\"\n [value]=\"audit()?.user?.sourcePlatform\" \n />\n </up-form-field>\n\n <up-form-field label=\"MS Source\">\n <input \n upInput \n readonly\n type=\"text\"\n tabindex=\"-1\"\n [value]=\"audit()?.msSource\" \n />\n </up-form-field>\n\n <up-form-field label=\"Function\">\n <input \n upInput \n readonly\n type=\"text\"\n tabindex=\"-1\"\n [value]=\"audit()?.function\" \n />\n </up-form-field>\n </div>\n\n @if (\n audit() &&\n audit()!.changedData &&\n audit()!.changedData!.length > 0\n ) {\n <div class=\"space-y-2\">\n <label class=\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 select-none\">\n Changed Data\n </label>\n \n <table class=\"w-full my-2 table-fixed border-collapse rounded-md select-none\">\n <thead class=\"border-inherit border-solid border-0\">\n <tr>\n <th class=\"w-[30%] p-2 text-left border border-border bg-[#f2f2f2] text-base border-tl-2\">Field</th>\n <th class=\"w-[35%] p-2 text-left border border-border bg-[#f2f2f2] text-base\">Old Value</th>\n <th class=\"w-[35%] p-2 text-left border border-border bg-[#f2f2f2] text-base border-tr-2\">New Value</th>\n </tr>\n </thead>\n\n <tbody class=\"border-inherit border-solid border-0\">\n @for (data of audit()!.changedData; track data.field; let even = $even) {\n <tr \n [class]=\"even? 'bg-white': 'bg-[#f9f9f9]'\"\n >\n <td class=\"p-2 text-left border border-border capitalize\">\n {{ data.field }}\n </td>\n\n <td class=\"p-2 text-left border border-border capitalize\">\n {{ data.oldValue }}\n </td>\n\n <td class=\"p-2 text-left border border-border capitalize\">\n {{ data.newValue }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n </div>\n </up-content-container>\n </div>\n </up-dialog-wrapper> \n `\n})\nexport class UpAuditModalComponent {\n\n public readonly audit = input.required<AuditTrailData | null>();\n public readonly dismissed = output<void>();\n}\n"],"names":[],"mappings":";;;;;;;MAuJa,qBAAqB,CAAA;AAzIlC,IAAA,WAAA,GAAA;AA2IkB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,gDAAyB;QAC/C,IAAA,CAAA,SAAS,GAAG,MAAM,EAAQ;AAC3C,IAAA;8GAJY,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EA5HtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0HT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAjIC,gBAAgB,EAAA,QAAA,EAAA,WAAA,EAA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