@unipin/angular-applet 21.1.0 → 21.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +334 -37
- package/fesm2022/unipin-angular-applet-accordion.mjs +23 -23
- package/fesm2022/unipin-angular-applet-accordion.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-alert-dialog.mjs +93 -79
- package/fesm2022/unipin-angular-applet-alert-dialog.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-alert.mjs +13 -13
- package/fesm2022/unipin-angular-applet-alert.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-approval.mjs +129 -0
- package/fesm2022/unipin-angular-applet-approval.mjs.map +1 -0
- package/fesm2022/unipin-angular-applet-auth.mjs +44 -25
- package/fesm2022/unipin-angular-applet-auth.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-avatar.mjs +4 -4
- package/fesm2022/unipin-angular-applet-avatar.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-badge.mjs +5 -5
- package/fesm2022/unipin-angular-applet-badge.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-buttons.mjs +10 -10
- package/fesm2022/unipin-angular-applet-buttons.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-calendar.mjs +25 -25
- package/fesm2022/unipin-angular-applet-calendar.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-collapsible.mjs +14 -14
- package/fesm2022/unipin-angular-applet-collapsible.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-common.mjs +60 -23
- package/fesm2022/unipin-angular-applet-common.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-containers.mjs +20 -20
- package/fesm2022/unipin-angular-applet-containers.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-dialog.mjs +74 -56
- package/fesm2022/unipin-angular-applet-dialog.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-forms.mjs +571 -256
- package/fesm2022/unipin-angular-applet-forms.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-froala.mjs +8 -8
- package/fesm2022/unipin-angular-applet-froala.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-infinite-scroll.mjs +5 -5
- package/fesm2022/unipin-angular-applet-infinite-scroll.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-json-viewer.mjs +7 -7
- package/fesm2022/unipin-angular-applet-json-viewer.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-kbd.mjs +4 -4
- package/fesm2022/unipin-angular-applet-kbd.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-loading-dialog.mjs +8 -8
- package/fesm2022/unipin-angular-applet-loading-dialog.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-markdown.mjs +17 -17
- package/fesm2022/unipin-angular-applet-markdown.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-popover.mjs +18 -18
- package/fesm2022/unipin-angular-applet-popover.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-progress-bar.mjs +7 -7
- package/fesm2022/unipin-angular-applet-progress-bar.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-skeleton.mjs +4 -4
- package/fesm2022/unipin-angular-applet-skeleton.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-spinner.mjs +5 -5
- package/fesm2022/unipin-angular-applet-spinner.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-stepper.mjs +288 -0
- package/fesm2022/unipin-angular-applet-stepper.mjs.map +1 -0
- package/fesm2022/unipin-angular-applet-swipeable.mjs +24 -24
- package/fesm2022/unipin-angular-applet-swipeable.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-tabs.mjs +19 -19
- package/fesm2022/unipin-angular-applet-tabs.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-tooltip.mjs +5 -5
- package/fesm2022/unipin-angular-applet-tooltip.mjs.map +1 -1
- package/package.json +9 -1
- package/types/unipin-angular-applet-alert-dialog.d.ts +12 -1
- package/types/unipin-angular-applet-approval.d.ts +55 -0
- package/types/unipin-angular-applet-common.d.ts +12 -2
- package/types/unipin-angular-applet-dialog.d.ts +6 -4
- package/types/unipin-angular-applet-forms.d.ts +118 -39
- package/types/unipin-angular-applet-stepper.d.ts +43 -0
|
@@ -26,16 +26,16 @@ const tabsVariants = cva(`
|
|
|
26
26
|
|
|
27
27
|
class UpTabsComponent {
|
|
28
28
|
constructor() {
|
|
29
|
-
this.size = input('md',
|
|
30
|
-
this.variant = input('default',
|
|
29
|
+
this.size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
30
|
+
this.variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
31
31
|
this.inlineStyle = input('', { ...(ngDevMode ? { debugName: "inlineStyle" } : {}), alias: 'class' });
|
|
32
32
|
this.defaultActiveTab = input(null, { ...(ngDevMode ? { debugName: "defaultActiveTab" } : {}), alias: 'default' });
|
|
33
|
-
this.activeTab = signal(null,
|
|
33
|
+
this.activeTab = signal(null, ...(ngDevMode ? [{ debugName: "activeTab" }] : []));
|
|
34
34
|
this.tabsClass = computed(() => {
|
|
35
35
|
return up(tabsVariants({
|
|
36
36
|
variant: this.variant()
|
|
37
37
|
}), this.inlineStyle());
|
|
38
|
-
},
|
|
38
|
+
}, ...(ngDevMode ? [{ debugName: "tabsClass" }] : []));
|
|
39
39
|
effect(() => {
|
|
40
40
|
if (this.activeTab() === null &&
|
|
41
41
|
this.defaultActiveTab()) {
|
|
@@ -46,8 +46,8 @@ class UpTabsComponent {
|
|
|
46
46
|
setActive(tab) {
|
|
47
47
|
this.activeTab.set(tab);
|
|
48
48
|
}
|
|
49
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
50
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.
|
|
49
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: UpTabsComponent, isStandalone: true, selector: "up-tabs", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, inlineStyle: { classPropertyName: "inlineStyle", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, defaultActiveTab: { classPropertyName: "defaultActiveTab", publicName: "default", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
51
51
|
<div [class]="tabsClass()">
|
|
52
52
|
<ng-content select="[upTabsTrigger]" />
|
|
53
53
|
</div>
|
|
@@ -55,7 +55,7 @@ class UpTabsComponent {
|
|
|
55
55
|
<ng-content select="[upTabsContent]" />
|
|
56
56
|
`, isInline: true }); }
|
|
57
57
|
}
|
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpTabsComponent, decorators: [{
|
|
59
59
|
type: Component,
|
|
60
60
|
args: [{
|
|
61
61
|
standalone: true,
|
|
@@ -73,12 +73,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImpor
|
|
|
73
73
|
class UpTabsContentDirective {
|
|
74
74
|
constructor(parent) {
|
|
75
75
|
this.parent = parent;
|
|
76
|
-
this.value = input.required(
|
|
76
|
+
this.value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
77
77
|
this.inlineStyle = input('', { ...(ngDevMode ? { debugName: "inlineStyle" } : {}), alias: 'class' });
|
|
78
|
-
this.isActive = signal(false,
|
|
78
|
+
this.isActive = signal(false, ...(ngDevMode ? [{ debugName: "isActive" }] : []));
|
|
79
79
|
this.tabsContentClass = computed(() => {
|
|
80
80
|
return up('block', this.inlineStyle());
|
|
81
|
-
},
|
|
81
|
+
}, ...(ngDevMode ? [{ debugName: "tabsContentClass" }] : []));
|
|
82
82
|
effect(() => {
|
|
83
83
|
if (!this.parent) {
|
|
84
84
|
return;
|
|
@@ -86,10 +86,10 @@ class UpTabsContentDirective {
|
|
|
86
86
|
this.isActive.set(this.parent.activeTab() === this.value());
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
90
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.
|
|
89
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpTabsContentDirective, deps: [{ token: UpTabsComponent }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
90
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: UpTabsContentDirective, isStandalone: true, selector: "[upTabsContent]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, inlineStyle: { classPropertyName: "inlineStyle", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "hidden": "!isActive()", "class": "tabsContentClass()" } }, exportAs: ["upTabsContent"], ngImport: i0 }); }
|
|
91
91
|
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpTabsContentDirective, decorators: [{
|
|
93
93
|
type: Directive,
|
|
94
94
|
args: [{
|
|
95
95
|
standalone: true,
|
|
@@ -105,9 +105,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImpor
|
|
|
105
105
|
class UpTabsTriggerDirective {
|
|
106
106
|
constructor(parent) {
|
|
107
107
|
this.parent = parent;
|
|
108
|
-
this.value = input.required(
|
|
109
|
-
this.isActive = signal(false,
|
|
110
|
-
this.tabsTriggerClass = computed(() => up('tabs-trigger'),
|
|
108
|
+
this.value = input.required(...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
109
|
+
this.isActive = signal(false, ...(ngDevMode ? [{ debugName: "isActive" }] : []));
|
|
110
|
+
this.tabsTriggerClass = computed(() => up('tabs-trigger font-medium'), ...(ngDevMode ? [{ debugName: "tabsTriggerClass" }] : []));
|
|
111
111
|
effect(() => {
|
|
112
112
|
if (!this.parent)
|
|
113
113
|
return;
|
|
@@ -117,10 +117,10 @@ class UpTabsTriggerDirective {
|
|
|
117
117
|
activate() {
|
|
118
118
|
this.parent?.setActive(this.value());
|
|
119
119
|
}
|
|
120
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
121
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.
|
|
120
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpTabsTriggerDirective, deps: [{ token: UpTabsComponent }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
121
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: UpTabsTriggerDirective, isStandalone: true, selector: "[upTabsTrigger]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "activate()" }, properties: { "class": "tabsTriggerClass()", "attr.data-state": "isActive()? 'active' : 'inactive'" } }, exportAs: ["upTabsTrigger"], ngImport: i0 }); }
|
|
122
122
|
}
|
|
123
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpTabsTriggerDirective, decorators: [{
|
|
124
124
|
type: Directive,
|
|
125
125
|
args: [{
|
|
126
126
|
standalone: true,
|
|
@@ -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'));\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,kDAAC;AACvE,QAAA,IAAA,CAAA,OAAO,GAAyC,KAAK,CAA0B,SAAS,qDAAC;QAEzF,IAAA,CAAA,WAAW,GAA4B,KAAK,CAAa,EAAE,wDAAI,KAAK,EAAE,OAAO,EAAA,CAAG;QAChF,IAAA,CAAA,gBAAgB,GAA+B,KAAK,CAAgB,IAAI,6DAAI,KAAK,EAAE,SAAS,EAAA,CAAG;AAE/F,QAAA,IAAA,CAAA,SAAS,GAAkC,MAAM,CAAgB,IAAI,uDAAC;AACtE,QAAA,IAAA,CAAA,SAAS,GAAG,QAAQ,CAClC,MAAK;YACH,OAAO,EAAE,CACP,YAAY,CACV;AACE,gBAAA,OAAO,EAAE,IAAI,CAAC,OAAO;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AE,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@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;QAEzF,IAAA,CAAA,WAAW,GAA4B,KAAK,CAAa,EAAE,wDAAI,KAAK,EAAE,OAAO,EAAA,CAAG;QAChF,IAAA,CAAA,gBAAgB,GAA+B,KAAK,CAAgB,IAAI,6DAAI,KAAK,EAAE,SAAS,EAAA,CAAG;AAE/F,QAAA,IAAA,CAAA,SAAS,GAAkC,MAAM,CAAgB,IAAI,qDAAC;AACtE,QAAA,IAAA,CAAA,SAAS,GAAG,QAAQ,CAClC,MAAK;YACH,OAAO,EAAE,CACP,YAAY,CACV;AACE,gBAAA,OAAO,EAAE,IAAI,CAAC,OAAO;AACtB,aAAA,CAC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AAA,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(
|
|
15
|
+
this.toolTipText = input.required(...(ngDevMode ? [{ debugName: "toolTipText" }] : []));
|
|
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',
|
|
21
|
+
this.position = input('top', ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
22
22
|
this._winListener = [];
|
|
23
23
|
this._hostListener = [];
|
|
24
24
|
this._tooltipElement = null;
|
|
@@ -95,10 +95,10 @@ 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.0.
|
|
99
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.
|
|
98
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", 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.0.6", 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.0.
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: UpTooltipDirective, decorators: [{
|
|
102
102
|
type: Directive,
|
|
103
103
|
args: [{
|
|
104
104
|
standalone: true,
|
|
@@ -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 standalone: true,\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,
|
|
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 standalone: true,\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,sDAAU;AAEtD;;;;AAIG;AACa,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAsC,KAAK,oDAAC;QAElE,IAAA,CAAA,YAAY,GAAsB,EAAE;QACpC,IAAA,CAAA,aAAa,GAAsB,EAAE;QACrC,IAAA,CAAA,eAAe,GAAuB,IAAI;IAMjD;IAEI,QAAQ,GAAA;QACb,IAAI,CAAC,aAAa,CAAC,IAAI,CACrB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAClB,IAAI,CAAC,EAAE,CAAC,aAAa,EACrB,YAAY,EACZ,MAAK;AACH,YAAA,IAAI,IAAI,CAAC,eAAe,EAAE;gBACxB,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC;gBAC5D;YACF;YACA,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC;AAE1D,YAAA,IAAI,CAAC,QAAQ,CAAC,YAAY,CACx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A,EAAA,MAAA,EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,QAAQ,EAAE,aAAa;AACxB,iBAAA;;0BAsBI,MAAM;2BAAC,QAAQ;;;AC7BpB;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unipin/angular-applet",
|
|
3
|
-
"version": "21.1.
|
|
3
|
+
"version": "21.1.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/cdk": "21.x.x",
|
|
6
6
|
"@angular/common": "21.x.x",
|
|
@@ -46,6 +46,10 @@
|
|
|
46
46
|
"types": "./types/unipin-angular-applet-alert-dialog.d.ts",
|
|
47
47
|
"default": "./fesm2022/unipin-angular-applet-alert-dialog.mjs"
|
|
48
48
|
},
|
|
49
|
+
"./approval": {
|
|
50
|
+
"types": "./types/unipin-angular-applet-approval.d.ts",
|
|
51
|
+
"default": "./fesm2022/unipin-angular-applet-approval.mjs"
|
|
52
|
+
},
|
|
49
53
|
"./auth": {
|
|
50
54
|
"types": "./types/unipin-angular-applet-auth.d.ts",
|
|
51
55
|
"default": "./fesm2022/unipin-angular-applet-auth.mjs"
|
|
@@ -134,6 +138,10 @@
|
|
|
134
138
|
"types": "./types/unipin-angular-applet-spinner.d.ts",
|
|
135
139
|
"default": "./fesm2022/unipin-angular-applet-spinner.mjs"
|
|
136
140
|
},
|
|
141
|
+
"./stepper": {
|
|
142
|
+
"types": "./types/unipin-angular-applet-stepper.d.ts",
|
|
143
|
+
"default": "./fesm2022/unipin-angular-applet-stepper.mjs"
|
|
144
|
+
},
|
|
137
145
|
"./swipeable": {
|
|
138
146
|
"types": "./types/unipin-angular-applet-swipeable.d.ts",
|
|
139
147
|
"default": "./fesm2022/unipin-angular-applet-swipeable.mjs"
|
|
@@ -15,12 +15,23 @@ type AlertButton = {
|
|
|
15
15
|
handler?: (form?: Record<string, any>) => void;
|
|
16
16
|
};
|
|
17
17
|
type AlertFormField = {
|
|
18
|
+
type: 'text' | 'number' | 'checkbox' | 'password';
|
|
19
|
+
name: string;
|
|
20
|
+
label: string;
|
|
21
|
+
value?: unknown;
|
|
22
|
+
required?: boolean;
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
} | {
|
|
25
|
+
type: 'select';
|
|
18
26
|
name: string;
|
|
19
27
|
label: string;
|
|
20
|
-
type: 'text' | 'number' | 'checkbox' | 'password';
|
|
21
28
|
value?: unknown;
|
|
22
29
|
required?: boolean;
|
|
23
30
|
placeholder?: string;
|
|
31
|
+
items: {
|
|
32
|
+
label: string;
|
|
33
|
+
value: string;
|
|
34
|
+
}[];
|
|
24
35
|
};
|
|
25
36
|
|
|
26
37
|
declare class UpAlertController {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { GqlParser, CacheStrategy, QueryResult, MutationResult } from '@unipin/angular-gql';
|
|
3
|
+
import { ApprovalCriteria, PageableResponse, MutationApprovalMsApproveOrDeclineRequestArgs, Approval } from '@unipin/graphql-schema';
|
|
4
|
+
import * as _angular_core from '@angular/core';
|
|
5
|
+
|
|
6
|
+
declare class ApprovalService {
|
|
7
|
+
protected readonly gql: GqlParser;
|
|
8
|
+
constructor(gql: GqlParser);
|
|
9
|
+
query(input: ApprovalCriteria, extraAttr?: string, cacheStrategy?: CacheStrategy): Observable<QueryResult<{
|
|
10
|
+
approvalMsApprovals: PageableResponse;
|
|
11
|
+
}>>;
|
|
12
|
+
request(variables: MutationApprovalMsApproveOrDeclineRequestArgs): Observable<MutationResult<{
|
|
13
|
+
approvalMsApproveOrDeclineRequest: string;
|
|
14
|
+
}>>;
|
|
15
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ApprovalService, never>;
|
|
16
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ApprovalService>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare class UpApprovalFormComponent {
|
|
20
|
+
readonly approvalData: _angular_core.InputSignal<Approval[]>;
|
|
21
|
+
readonly isLoading: _angular_core.ModelSignal<boolean>;
|
|
22
|
+
readonly borderColors: _angular_core.WritableSignal<{
|
|
23
|
+
[key: number]: string;
|
|
24
|
+
}>;
|
|
25
|
+
readonly backgroundColors: _angular_core.WritableSignal<{
|
|
26
|
+
[key: number]: string;
|
|
27
|
+
}>;
|
|
28
|
+
protected readonly STATUS_COLOR_MAP: {
|
|
29
|
+
PENDING: {
|
|
30
|
+
bg: string;
|
|
31
|
+
border: string;
|
|
32
|
+
};
|
|
33
|
+
APPROVED: {
|
|
34
|
+
bg: string;
|
|
35
|
+
border: string;
|
|
36
|
+
};
|
|
37
|
+
DECLINED: {
|
|
38
|
+
bg: string;
|
|
39
|
+
border: string;
|
|
40
|
+
};
|
|
41
|
+
DEFAULT: {
|
|
42
|
+
bg: string;
|
|
43
|
+
border: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
constructor();
|
|
47
|
+
protected getColors(status?: string | null): {
|
|
48
|
+
bg: string;
|
|
49
|
+
border: string;
|
|
50
|
+
};
|
|
51
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UpApprovalFormComponent, never>;
|
|
52
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UpApprovalFormComponent, "up-approval-form", never, { "approvalData": { "alias": "approvalData"; "required": true; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; }, { "isLoading": "isLoadingChange"; }, never, never, true, never>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { ApprovalService, UpApprovalFormComponent };
|
|
@@ -4,7 +4,7 @@ import { PipeTransform, OnInit, ElementRef } from '@angular/core';
|
|
|
4
4
|
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
import { GqlParser, QueryResult } from '@unipin/angular-gql';
|
|
7
|
-
import { CountryQueryCriteria, CountryResult, CurrencyQueryCriteria, CurrencyResult } from '@unipin/graphql-schema';
|
|
7
|
+
import { CountryQueryCriteria, CountryResult, CurrencyQueryCriteria, CurrencyResult, RateGroupCodeCriteria, RateGroupCodeRs } from '@unipin/graphql-schema';
|
|
8
8
|
|
|
9
9
|
declare function up(...inputs: ClassValue[]): string;
|
|
10
10
|
|
|
@@ -77,6 +77,16 @@ declare class CurrencyService {
|
|
|
77
77
|
static ɵprov: i0.ɵɵInjectableDeclaration<CurrencyService>;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
declare class RateGroupCodeService {
|
|
81
|
+
protected readonly gql: GqlParser;
|
|
82
|
+
constructor(gql: GqlParser);
|
|
83
|
+
query(input?: RateGroupCodeCriteria): Observable<QueryResult<{
|
|
84
|
+
productMsSearchRateGroupCodes: RateGroupCodeRs;
|
|
85
|
+
}>>;
|
|
86
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RateGroupCodeService, never>;
|
|
87
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RateGroupCodeService>;
|
|
88
|
+
}
|
|
89
|
+
|
|
80
90
|
declare class UpFileDragNDropDirective implements OnInit {
|
|
81
91
|
protected readonly el: ElementRef;
|
|
82
92
|
readonly draggedClass: i0.InputSignal<ClassValue>;
|
|
@@ -91,4 +101,4 @@ declare class UpFileDragNDropDirective implements OnInit {
|
|
|
91
101
|
static ɵdir: i0.ɵɵDirectiveDeclaration<UpFileDragNDropDirective, "[upFileDragNDrop]", ["upFileDragNDrop"], { "draggedClass": { "alias": "draggedClass"; "required": false; "isSignal": true; }; }, { "fileDropped": "fileDropped"; }, never, never, true, never>;
|
|
92
102
|
}
|
|
93
103
|
|
|
94
|
-
export { CountryService, CurrencyService, UpCapitalizaPipe, UpFileDragNDropDirective, UpInitialPipe, UpLinkifyPipe, UpPricePipe, compressImage, formatCapitalize, formatInitial, formatLinkify, formatPrice, generateContrastColor, up };
|
|
104
|
+
export { CountryService, CurrencyService, RateGroupCodeService, UpCapitalizaPipe, UpFileDragNDropDirective, UpInitialPipe, UpLinkifyPipe, UpPricePipe, compressImage, formatCapitalize, formatInitial, formatLinkify, formatPrice, generateContrastColor, up };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { StaticProvider, ElementRef, InjectOptions, ValueProvider, Signal, WritableSignal, Injector, RendererFactory2, TemplateRef, ViewContainerRef, EffectRef, OnDestroy, OutputRefSubscription } from '@angular/core';
|
|
2
|
+
import { StaticProvider, ElementRef, InjectOptions, ValueProvider, Signal, WritableSignal, Injector, RendererFactory2, TemplateRef, ViewContainerRef, EffectRef, AfterViewInit, OnDestroy, OutputRefSubscription } from '@angular/core';
|
|
3
3
|
import * as _angular_cdk_dialog from '@angular/cdk/dialog';
|
|
4
4
|
import { AutoFocusTarget, DialogRef, Dialog } from '@angular/cdk/dialog';
|
|
5
5
|
import * as _angular_cdk_overlay from '@angular/cdk/overlay';
|
|
@@ -95,7 +95,6 @@ declare class UpDialog {
|
|
|
95
95
|
readonly disableClose: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
96
96
|
readonly closeDelay: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
97
97
|
readonly closeOnOutsidePointerEvents: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
98
|
-
readonly closeOnBackdropClick: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
99
98
|
readonly closed: _angular_core.OutputEmitterRef<any>;
|
|
100
99
|
readonly stateChanged: _angular_core.OutputEmitterRef<"open" | "closed">;
|
|
101
100
|
readonly state: WritableSignal<boolean>;
|
|
@@ -119,7 +118,7 @@ declare class UpDialog {
|
|
|
119
118
|
setContext<T extends object>(context: T): void;
|
|
120
119
|
open<DialogContext>(): void;
|
|
121
120
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UpDialog, never>;
|
|
122
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UpDialog, "up-dialog", ["upDialog"], { "attachTo": { "alias": "attachTo"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; "scrollStrategy": { "alias": "scrollStrategy"; "required": false; "isSignal": true; }; "attachPositions": { "alias": "attachPositions"; "required": false; "isSignal": true; }; "positionStrategy": { "alias": "positionStrategy"; "required": false; "isSignal": true; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; "isSignal": true; }; "disableClose": { "alias": "disableClose"; "required": false; "isSignal": true; }; "closeDelay": { "alias": "closeDelay"; "required": false; "isSignal": true; }; "closeOnOutsidePointerEvents": { "alias": "closeOnOutsidePointerEvents"; "required": false; "isSignal": true; };
|
|
121
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UpDialog, "up-dialog", ["upDialog"], { "attachTo": { "alias": "attachTo"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; "scrollStrategy": { "alias": "scrollStrategy"; "required": false; "isSignal": true; }; "attachPositions": { "alias": "attachPositions"; "required": false; "isSignal": true; }; "positionStrategy": { "alias": "positionStrategy"; "required": false; "isSignal": true; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; "isSignal": true; }; "disableClose": { "alias": "disableClose"; "required": false; "isSignal": true; }; "closeDelay": { "alias": "closeDelay"; "required": false; "isSignal": true; }; "closeOnOutsidePointerEvents": { "alias": "closeOnOutsidePointerEvents"; "required": false; "isSignal": true; }; }, { "closed": "closed"; "stateChanged": "stateChanged"; }, never, ["*"], true, never>;
|
|
123
122
|
}
|
|
124
123
|
|
|
125
124
|
declare class UpDialogCloseDirective {
|
|
@@ -131,11 +130,14 @@ declare class UpDialogCloseDirective {
|
|
|
131
130
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UpDialogCloseDirective, "button[upDialogClose]", never, { "inlineClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
132
131
|
}
|
|
133
132
|
|
|
134
|
-
declare class UpDialogContentDirective {
|
|
133
|
+
declare class UpDialogContentDirective implements AfterViewInit, OnDestroy {
|
|
135
134
|
readonly dialogRef: UpDialogRef<any>;
|
|
136
135
|
readonly inlineClass: _angular_core.InputSignal<ClassValue>;
|
|
137
136
|
readonly state: _angular_core.Signal<"open" | "closed">;
|
|
138
137
|
protected readonly _computedClass: _angular_core.Signal<string>;
|
|
138
|
+
protected _mutationObserver: MutationObserver;
|
|
139
|
+
ngAfterViewInit(): void;
|
|
140
|
+
ngOnDestroy(): void;
|
|
139
141
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UpDialogContentDirective, never>;
|
|
140
142
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UpDialogContentDirective, "[upDialogContent]", ["upDialogContent"], { "inlineClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
141
143
|
}
|