@apexara/ng-components 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +1867 -0
  2. package/fesm2022/apexara-ng-components-button.mjs +66 -0
  3. package/fesm2022/apexara-ng-components-button.mjs.map +1 -0
  4. package/fesm2022/apexara-ng-components-carousel.mjs +161 -0
  5. package/fesm2022/apexara-ng-components-carousel.mjs.map +1 -0
  6. package/fesm2022/apexara-ng-components-checkbox.mjs +64 -0
  7. package/fesm2022/apexara-ng-components-checkbox.mjs.map +1 -0
  8. package/fesm2022/apexara-ng-components-chip.mjs +26 -0
  9. package/fesm2022/apexara-ng-components-chip.mjs.map +1 -0
  10. package/fesm2022/apexara-ng-components-datepicker.mjs +2175 -0
  11. package/fesm2022/apexara-ng-components-datepicker.mjs.map +1 -0
  12. package/fesm2022/apexara-ng-components-dialog.mjs +65 -0
  13. package/fesm2022/apexara-ng-components-dialog.mjs.map +1 -0
  14. package/fesm2022/apexara-ng-components-drawer.mjs +69 -0
  15. package/fesm2022/apexara-ng-components-drawer.mjs.map +1 -0
  16. package/fesm2022/apexara-ng-components-expander.mjs +41 -0
  17. package/fesm2022/apexara-ng-components-expander.mjs.map +1 -0
  18. package/fesm2022/apexara-ng-components-image.mjs +201 -0
  19. package/fesm2022/apexara-ng-components-image.mjs.map +1 -0
  20. package/fesm2022/apexara-ng-components-input.mjs +129 -0
  21. package/fesm2022/apexara-ng-components-input.mjs.map +1 -0
  22. package/fesm2022/apexara-ng-components-listbox.mjs +308 -0
  23. package/fesm2022/apexara-ng-components-listbox.mjs.map +1 -0
  24. package/fesm2022/apexara-ng-components-radiobutton.mjs +40 -0
  25. package/fesm2022/apexara-ng-components-radiobutton.mjs.map +1 -0
  26. package/fesm2022/apexara-ng-components-select.mjs +620 -0
  27. package/fesm2022/apexara-ng-components-select.mjs.map +1 -0
  28. package/fesm2022/apexara-ng-components-services.mjs +290 -0
  29. package/fesm2022/apexara-ng-components-services.mjs.map +1 -0
  30. package/fesm2022/apexara-ng-components-snackbar.mjs +279 -0
  31. package/fesm2022/apexara-ng-components-snackbar.mjs.map +1 -0
  32. package/fesm2022/apexara-ng-components-table.mjs +686 -0
  33. package/fesm2022/apexara-ng-components-table.mjs.map +1 -0
  34. package/fesm2022/apexara-ng-components-textarea.mjs +82 -0
  35. package/fesm2022/apexara-ng-components-textarea.mjs.map +1 -0
  36. package/fesm2022/apexara-ng-components-tooltip.mjs +319 -0
  37. package/fesm2022/apexara-ng-components-tooltip.mjs.map +1 -0
  38. package/fesm2022/apexara-ng-components.mjs +8 -0
  39. package/fesm2022/apexara-ng-components.mjs.map +1 -0
  40. package/package.json +146 -0
  41. package/types/apexara-ng-components-button.d.ts +27 -0
  42. package/types/apexara-ng-components-carousel.d.ts +31 -0
  43. package/types/apexara-ng-components-checkbox.d.ts +29 -0
  44. package/types/apexara-ng-components-chip.d.ts +11 -0
  45. package/types/apexara-ng-components-datepicker.d.ts +172 -0
  46. package/types/apexara-ng-components-dialog.d.ts +24 -0
  47. package/types/apexara-ng-components-drawer.d.ts +22 -0
  48. package/types/apexara-ng-components-expander.d.ts +10 -0
  49. package/types/apexara-ng-components-image.d.ts +46 -0
  50. package/types/apexara-ng-components-input.d.ts +51 -0
  51. package/types/apexara-ng-components-listbox.d.ts +70 -0
  52. package/types/apexara-ng-components-radiobutton.d.ts +30 -0
  53. package/types/apexara-ng-components-select.d.ts +111 -0
  54. package/types/apexara-ng-components-services.d.ts +96 -0
  55. package/types/apexara-ng-components-snackbar.d.ts +73 -0
  56. package/types/apexara-ng-components-table.d.ts +157 -0
  57. package/types/apexara-ng-components-textarea.d.ts +34 -0
  58. package/types/apexara-ng-components-tooltip.d.ts +54 -0
  59. package/types/apexara-ng-components.d.ts +3 -0
@@ -0,0 +1,69 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, ContentChild, Output, Component } from '@angular/core';
3
+ import { NgTemplateOutlet } from '@angular/common';
4
+ import { trigger, state, style, transition, animate } from '@angular/animations';
5
+ import * as i1 from '@apexara/ng-components/services';
6
+
7
+ const OpenCloseAnimation = trigger('openCloseAnimation', [
8
+ state('true', style({
9
+ transform: 'translateX(0%)',
10
+ })),
11
+ state('false', style({
12
+ transform: 'translateX(100%)',
13
+ })),
14
+ transition('false <=> true', animate('0.25s cubic-bezier(0.4, 0, 0.1, 1)')),
15
+ ]);
16
+ class IpiDrawerComponent {
17
+ constructor(scrollBlockService, changeDetector) {
18
+ this.scrollBlockService = scrollBlockService;
19
+ this.changeDetector = changeDetector;
20
+ this.isOpen = false;
21
+ this.closeChange = new EventEmitter();
22
+ this.scrollBlockService.activate();
23
+ }
24
+ ngOnDestroy() {
25
+ this.scrollBlockService.deactivate();
26
+ }
27
+ ngAfterViewInit() {
28
+ this.isOpen = true;
29
+ this.changeDetector.detectChanges();
30
+ }
31
+ close() {
32
+ if (!this.closeChange) {
33
+ return;
34
+ }
35
+ this.isOpen = false;
36
+ setTimeout(() => {
37
+ this.closeChange.emit();
38
+ }, 250);
39
+ }
40
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: IpiDrawerComponent, deps: [{ token: i1.ScrollBlockService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
41
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.2", type: IpiDrawerComponent, isStandalone: true, selector: "ipi-drawer", outputs: { closeChange: "closeChange" }, queries: [{ propertyName: "title", first: true, predicate: ["title"], descendants: true }, { propertyName: "description", first: true, predicate: ["description"], descendants: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true }, { propertyName: "actions", first: true, predicate: ["actions"], descendants: true }], ngImport: i0, template: "<div class=\"backdrop\"></div>\n\n<div class=\"wrapper\">\n <div class=\"container\" [@openCloseAnimation]=\"isOpen\">\n <div class=\"header\">\n @if (title) {\n <span class=\"title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </span>\n }\n \n @if (description) {\n <span class=\"description\">\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\n </span>\n }\n </div>\n\n @if (content) {\n <div class=\"content\">\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </div>\n }\n\n @if (actions) {\n <div class=\"actions\">\n <ng-container [ngTemplateOutlet]=\"actions\"></ng-container>\n </div>\n }\n </div>\n</div>\n", styles: [".backdrop{width:100%;height:100%;position:fixed;top:0;left:0;background-color:var(--ipi-drawer-backdrop-background, #0B1222);opacity:.5;z-index:96}.wrapper{width:100%;height:100vh;display:flex;justify-content:right;position:fixed;top:0;left:0;z-index:97}.container{max-width:100%;width:var(--ipi-drawer-width, 410px);height:100%;display:flex;flex-direction:column;row-gap:32px;padding:44px 24px;background-color:var(--ipi-drawer-background, #FFFFFF);box-shadow:var(--ipi-drawer-box-shadow, 0px 4px 8px 0px #D6D6D635);box-sizing:border-box}.header{display:flex;flex-direction:column;row-gap:12px}.title{color:var(--ipi-drawer-title-color, #0B1222);font-size:24px;font-weight:600}.description{color:var(--ipi-drawer-description-color, #5D6068)}.content{width:100%;height:100%;overflow-y:auto}.actions{width:100%;height:fit-content}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [OpenCloseAnimation] }); }
42
+ }
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: IpiDrawerComponent, decorators: [{
44
+ type: Component,
45
+ args: [{ selector: 'ipi-drawer', animations: [OpenCloseAnimation], imports: [
46
+ NgTemplateOutlet,
47
+ ], template: "<div class=\"backdrop\"></div>\n\n<div class=\"wrapper\">\n <div class=\"container\" [@openCloseAnimation]=\"isOpen\">\n <div class=\"header\">\n @if (title) {\n <span class=\"title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </span>\n }\n \n @if (description) {\n <span class=\"description\">\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\n </span>\n }\n </div>\n\n @if (content) {\n <div class=\"content\">\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </div>\n }\n\n @if (actions) {\n <div class=\"actions\">\n <ng-container [ngTemplateOutlet]=\"actions\"></ng-container>\n </div>\n }\n </div>\n</div>\n", styles: [".backdrop{width:100%;height:100%;position:fixed;top:0;left:0;background-color:var(--ipi-drawer-backdrop-background, #0B1222);opacity:.5;z-index:96}.wrapper{width:100%;height:100vh;display:flex;justify-content:right;position:fixed;top:0;left:0;z-index:97}.container{max-width:100%;width:var(--ipi-drawer-width, 410px);height:100%;display:flex;flex-direction:column;row-gap:32px;padding:44px 24px;background-color:var(--ipi-drawer-background, #FFFFFF);box-shadow:var(--ipi-drawer-box-shadow, 0px 4px 8px 0px #D6D6D635);box-sizing:border-box}.header{display:flex;flex-direction:column;row-gap:12px}.title{color:var(--ipi-drawer-title-color, #0B1222);font-size:24px;font-weight:600}.description{color:var(--ipi-drawer-description-color, #5D6068)}.content{width:100%;height:100%;overflow-y:auto}.actions{width:100%;height:fit-content}\n"] }]
48
+ }], ctorParameters: () => [{ type: i1.ScrollBlockService }, { type: i0.ChangeDetectorRef }], propDecorators: { closeChange: [{
49
+ type: Output
50
+ }], title: [{
51
+ type: ContentChild,
52
+ args: ['title']
53
+ }], description: [{
54
+ type: ContentChild,
55
+ args: ['description']
56
+ }], content: [{
57
+ type: ContentChild,
58
+ args: ['content']
59
+ }], actions: [{
60
+ type: ContentChild,
61
+ args: ['actions']
62
+ }] } });
63
+
64
+ /**
65
+ * Generated bundle index. Do not edit.
66
+ */
67
+
68
+ export { IpiDrawerComponent };
69
+ //# sourceMappingURL=apexara-ng-components-drawer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apexara-ng-components-drawer.mjs","sources":["../../../../projects/apexara/ng-components/drawer/src/drawer.component.ts","../../../../projects/apexara/ng-components/drawer/src/drawer.component.html","../../../../projects/apexara/ng-components/drawer/apexara-ng-components-drawer.ts"],"sourcesContent":["import { Component, OnDestroy, ContentChild, TemplateRef, EventEmitter, Output, AfterViewInit, ChangeDetectorRef } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { animate, state, style, transition, trigger } from '@angular/animations';\n\nimport { ScrollBlockService } from '@apexara/ng-components/services';\n\nconst OpenCloseAnimation = trigger('openCloseAnimation', [\n state('true', style({\n transform: 'translateX(0%)',\n }),\n ),\n state('false', style({\n transform: 'translateX(100%)',\n }),\n ),\n transition('false <=> true', animate('0.25s cubic-bezier(0.4, 0, 0.1, 1)')),\n]);\n\n@Component({\n selector: 'ipi-drawer',\n templateUrl: './drawer.component.html',\n styleUrls: ['./drawer.component.css'],\n animations: [OpenCloseAnimation],\n imports: [\n NgTemplateOutlet,\n ],\n})\n\nexport class IpiDrawerComponent implements AfterViewInit, OnDestroy {\n\n constructor(\n private scrollBlockService: ScrollBlockService,\n private changeDetector: ChangeDetectorRef) {\n\n this.scrollBlockService.activate();\n }\n\n public isOpen = false;\n\n @Output() closeChange = new EventEmitter<void>();\n\n @ContentChild('title') title?: TemplateRef<any>;\n @ContentChild('description') description?: TemplateRef<any>;\n @ContentChild('content') content?: TemplateRef<any>;\n @ContentChild('actions') actions?: TemplateRef<any>;\n\n public ngOnDestroy(): void {\n this.scrollBlockService.deactivate();\n }\n\n public ngAfterViewInit(): void {\n this.isOpen = true;\n\n this.changeDetector.detectChanges();\n }\n\n public close(): void {\n if (!this.closeChange) {\n return;\n }\n\n this.isOpen = false;\n\n setTimeout(() => {\n this.closeChange.emit();\n }, 250);\n }\n\n}\n","<div class=\"backdrop\"></div>\n\n<div class=\"wrapper\">\n <div class=\"container\" [@openCloseAnimation]=\"isOpen\">\n <div class=\"header\">\n @if (title) {\n <span class=\"title\">\n <ng-container [ngTemplateOutlet]=\"title\"></ng-container>\n </span>\n }\n \n @if (description) {\n <span class=\"description\">\n <ng-container [ngTemplateOutlet]=\"description\"></ng-container>\n </span>\n }\n </div>\n\n @if (content) {\n <div class=\"content\">\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </div>\n }\n\n @if (actions) {\n <div class=\"actions\">\n <ng-container [ngTemplateOutlet]=\"actions\"></ng-container>\n </div>\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAMA,MAAM,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,EAAE;AACvD,IAAA,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC;AAChB,QAAA,SAAS,EAAE,gBAAgB;AAC5B,KAAA,CAAC,CACH;AACD,IAAA,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC;AACjB,QAAA,SAAS,EAAE,kBAAkB;AAC9B,KAAA,CAAC,CACH;AACD,IAAA,UAAU,CAAC,gBAAgB,EAAE,OAAO,CAAC,oCAAoC,CAAC,CAAC;AAC5E,CAAA,CAAC;MAYW,kBAAkB,CAAA;IAE7B,WAAA,CACU,kBAAsC,EACtC,cAAiC,EAAA;QADjC,IAAA,CAAA,kBAAkB,GAAlB,kBAAkB;QAClB,IAAA,CAAA,cAAc,GAAd,cAAc;QAKjB,IAAA,CAAA,MAAM,GAAG,KAAK;AAEX,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAQ;AAL9C,QAAA,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IACpC;IAWO,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAAE;IACtC;IAEO,eAAe,GAAA;AACpB,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI;AAElB,QAAA,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE;IACrC;IAEO,KAAK,GAAA;AACV,QAAA,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB;QACF;AAEA,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK;QAEnB,UAAU,C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
4
+ import { trigger, state, style, transition, animate } from '@angular/animations';
5
+
6
+ const OpenCloseAnimation = trigger('openCloseAnimation', [
7
+ state('true', style({
8
+ height: '{{ height }}',
9
+ paddingBottom: '20px',
10
+ }), { params: { height: '*' } }),
11
+ state('false', style({
12
+ height: '0px',
13
+ paddingBottom: '0px',
14
+ })),
15
+ transition('false <=> true', animate('0.25s cubic-bezier(0.4, 0, 0.1, 1)')),
16
+ ]);
17
+ class IpiExpanderComponent {
18
+ constructor() {
19
+ this.isOpen = false;
20
+ this.maxHeight = null;
21
+ }
22
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: IpiExpanderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: IpiExpanderComponent, isStandalone: true, selector: "ipi-expander", inputs: { isOpen: "isOpen", maxHeight: "maxHeight" }, ngImport: i0, template: "<div [ngClass]=\"{ container: true, open: isOpen, 'fit-content': !maxHeight }\">\n <div class=\"header\" role=\"button\" tabindex=\"0\" (click)=\"isOpen = !isOpen\">\n <span class=\"title\">\n <ng-content select=\"[title]\"></ng-content>\n </span>\n\n <span class=\"chevron\"></span>\n </div>\n\n <div class=\"content\" [@openCloseAnimation]=\"{ value: isOpen, params: { height: maxHeight ? maxHeight + 'px' : '*' }}\">\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</div>\n", styles: [":host{display:block;touch-action:manipulation}.container{display:flex;flex-direction:column;background-color:var(--ipi-expander-background-color, #FFFFFF);border-radius:8px;border:var(--ipi-expander-border, 0px);box-shadow:var(--ipi-expander-box-shadow, 0px 4px 8px 0px rgba(214, 214, 214, .35))}.header{display:flex;align-items:center;justify-content:space-between;column-gap:30px;cursor:pointer;padding:20px 30px}.header:focus{outline:var(--ipi-expander-outline-color, none)}.header .title{width:100%;font-size:16px;font-weight:500;color:var(--ipi-expander-title-color, #0B1222)}.header .chevron{width:8px;height:8px;flex-shrink:0;position:relative;bottom:3px;transform-origin:center;transform:rotate(-135deg);transition:all .25s cubic-bezier(.4,0,.1,1);border-top:2px solid var(--ipi-expander-chevron-color, #5D6068);border-left:2px solid var(--ipi-expander-chevron-color, #5D6068);border-top-left-radius:3px;border-top-right-radius:1px;border-bottom-left-radius:1px}.container.open .header .chevron{bottom:-3px;transform:rotate(45deg);border-top:2px solid var(--ipi-expander-chevron-open-color, #F96138);border-left:2px solid var(--ipi-expander-chevron-open-color, #F96138)}.content{overflow:hidden;font-size:15px;color:var(--ipi-expander-content-color, #5D6068);padding-left:30px;padding-right:30px}.container.open .content{overflow:auto}.container.fit-content .content::-webkit-scrollbar{display:none}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [OpenCloseAnimation] }); }
24
+ }
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: IpiExpanderComponent, decorators: [{
26
+ type: Component,
27
+ args: [{ selector: 'ipi-expander', animations: [OpenCloseAnimation], imports: [
28
+ NgClass,
29
+ ], template: "<div [ngClass]=\"{ container: true, open: isOpen, 'fit-content': !maxHeight }\">\n <div class=\"header\" role=\"button\" tabindex=\"0\" (click)=\"isOpen = !isOpen\">\n <span class=\"title\">\n <ng-content select=\"[title]\"></ng-content>\n </span>\n\n <span class=\"chevron\"></span>\n </div>\n\n <div class=\"content\" [@openCloseAnimation]=\"{ value: isOpen, params: { height: maxHeight ? maxHeight + 'px' : '*' }}\">\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</div>\n", styles: [":host{display:block;touch-action:manipulation}.container{display:flex;flex-direction:column;background-color:var(--ipi-expander-background-color, #FFFFFF);border-radius:8px;border:var(--ipi-expander-border, 0px);box-shadow:var(--ipi-expander-box-shadow, 0px 4px 8px 0px rgba(214, 214, 214, .35))}.header{display:flex;align-items:center;justify-content:space-between;column-gap:30px;cursor:pointer;padding:20px 30px}.header:focus{outline:var(--ipi-expander-outline-color, none)}.header .title{width:100%;font-size:16px;font-weight:500;color:var(--ipi-expander-title-color, #0B1222)}.header .chevron{width:8px;height:8px;flex-shrink:0;position:relative;bottom:3px;transform-origin:center;transform:rotate(-135deg);transition:all .25s cubic-bezier(.4,0,.1,1);border-top:2px solid var(--ipi-expander-chevron-color, #5D6068);border-left:2px solid var(--ipi-expander-chevron-color, #5D6068);border-top-left-radius:3px;border-top-right-radius:1px;border-bottom-left-radius:1px}.container.open .header .chevron{bottom:-3px;transform:rotate(45deg);border-top:2px solid var(--ipi-expander-chevron-open-color, #F96138);border-left:2px solid var(--ipi-expander-chevron-open-color, #F96138)}.content{overflow:hidden;font-size:15px;color:var(--ipi-expander-content-color, #5D6068);padding-left:30px;padding-right:30px}.container.open .content{overflow:auto}.container.fit-content .content::-webkit-scrollbar{display:none}\n"] }]
30
+ }], propDecorators: { isOpen: [{
31
+ type: Input
32
+ }], maxHeight: [{
33
+ type: Input
34
+ }] } });
35
+
36
+ /**
37
+ * Generated bundle index. Do not edit.
38
+ */
39
+
40
+ export { IpiExpanderComponent };
41
+ //# sourceMappingURL=apexara-ng-components-expander.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apexara-ng-components-expander.mjs","sources":["../../../../projects/apexara/ng-components/expander/src/expander.component.ts","../../../../projects/apexara/ng-components/expander/src/expander.component.html","../../../../projects/apexara/ng-components/expander/apexara-ng-components-expander.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\nimport { NgClass } from '@angular/common';\nimport { animate, state, style, transition, trigger } from '@angular/animations';\n\nconst OpenCloseAnimation = trigger('openCloseAnimation', [\n state('true', style({\n height: '{{ height }}',\n paddingBottom: '20px',\n }),\n { params: { height: '*' }},\n ),\n state('false', style({\n height: '0px',\n paddingBottom: '0px',\n }),\n ),\n transition('false <=> true', animate('0.25s cubic-bezier(0.4, 0, 0.1, 1)')),\n]);\n\n@Component({\n selector: 'ipi-expander',\n templateUrl: './expander.component.html',\n styleUrls: ['./expander.component.css'],\n animations: [OpenCloseAnimation],\n imports: [\n NgClass,\n ],\n})\n\nexport class IpiExpanderComponent {\n\n @Input() isOpen = false;\n @Input() maxHeight: number | null = null;\n\n}\n","<div [ngClass]=\"{ container: true, open: isOpen, 'fit-content': !maxHeight }\">\n <div class=\"header\" role=\"button\" tabindex=\"0\" (click)=\"isOpen = !isOpen\">\n <span class=\"title\">\n <ng-content select=\"[title]\"></ng-content>\n </span>\n\n <span class=\"chevron\"></span>\n </div>\n\n <div class=\"content\" [@openCloseAnimation]=\"{ value: isOpen, params: { height: maxHeight ? maxHeight + 'px' : '*' }}\">\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAIA,MAAM,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,EAAE;AACvD,IAAA,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC;AAChB,QAAA,MAAM,EAAE,cAAc;AACtB,QAAA,aAAa,EAAE,MAAM;KACtB,CAAC,EACF,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,EAAC,CAC3B;AACD,IAAA,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC;AACjB,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,aAAa,EAAE,KAAK;AACrB,KAAA,CAAC,CACH;AACD,IAAA,UAAU,CAAC,gBAAgB,EAAE,OAAO,CAAC,oCAAoC,CAAC,CAAC;AAC5E,CAAA,CAAC;MAYW,oBAAoB,CAAA;AAVjC,IAAA,WAAA,GAAA;QAYW,IAAA,CAAA,MAAM,GAAG,KAAK;QACd,IAAA,CAAA,SAAS,GAAkB,IAAI;AAEzC,IAAA;8GALY,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,8HC7BjC,4hBAaA,EAAA,MAAA,EAAA,CAAA,m4CAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDYI,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAFG,CAAC,kBAAkB,CAAC,EAAA,CAAA,CAAA;;2FAMrB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAVhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAAA,UAAA,EAGZ,CAAC,kBAAkB,CAAC,EAAA,OAAA,EACvB;wBACP,OAAO;AACR,qBAAA,EAAA,QAAA,EAAA,4hBAAA,EAAA,MAAA,EAAA,CAAA,m4CAAA,CAAA,EAAA;;sBAKA;;sBACA;;;AEhCH;;AAEG;;;;"}
@@ -0,0 +1,201 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Inject, Injectable, Input, Component } from '@angular/core';
3
+ import { DOCUMENT } from '@angular/common';
4
+ import { of } from 'rxjs';
5
+ import { catchError, map, tap, finalize, share } from 'rxjs/operators';
6
+ import * as i1 from '@angular/common/http';
7
+
8
+ class IpiImgService {
9
+ constructor(http, document) {
10
+ this.http = http;
11
+ this.document = document;
12
+ this.svgs = new Map();
13
+ this.svgsLoading = new Map();
14
+ this.defaultSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m 4 1 c -1.644531 0 -3 1.355469 -3 3 v 1 h 1 v -1 c 0 -1.109375 0.890625 -2 2 -2 h 1 v -1 z m 2 0 v 1 h 4 v -1 z m 5 0 v 1 h 1 c 1.109375 0 2 0.890625 2 2 v 1 h 1 v -1 c 0 -1.644531 -1.355469 -3 -3 -3 z m -5 4 c -0.550781 0 -1 0.449219 -1 1 s 0.449219 1 1 1 s 1 -0.449219 1 -1 s -0.449219 -1 -1 -1 z m -5 1 v 4 h 1 v -4 z m 13 0 v 4 h 1 v -4 z m -4.5 2 l -2 2 l -1.5 -1 l -2 2 v 0.5 c 0 0.5 0.5 0.5 0.5 0.5 h 7 s 0.472656 -0.035156 0.5 -0.5 v -1 z m -8.5 3 v 1 c 0 1.644531 1.355469 3 3 3 h 1 v -1 h -1 c -1.109375 0 -2 -0.890625 -2 -2 v -1 z m 13 0 v 1 c 0 1.109375 -0.890625 2 -2 2 h -1 v 1 h 1 c 1.644531 0 3 -1.355469 3 -3 v -1 z m -8 3 v 1 h 4 v -1 z m 0 0" fill="#2e3434" fill-opacity="0.34902"/></svg>';
15
+ }
16
+ loadImg(url) {
17
+ if (!url.endsWith('.svg')) {
18
+ return url;
19
+ }
20
+ if (this.svgs.has(url)) {
21
+ return of(this.svgs.get(url));
22
+ }
23
+ if (this.svgsLoading.has(url)) {
24
+ return this.svgsLoading.get(url);
25
+ }
26
+ const observable = this.getSvg(url)
27
+ .pipe(catchError(() => { return of(this.defaultSvg); }), map(content => this.createSVG(content)), tap(element => this.svgs.set(url, element)), finalize(() => this.svgsLoading.delete(url)), share());
28
+ this.svgsLoading.set(url, observable);
29
+ return observable;
30
+ }
31
+ getSvg(url) {
32
+ return this.http.get(url, { responseType: 'text' });
33
+ }
34
+ createSVG(content) {
35
+ const div = this.document.createElement('DIV');
36
+ div.innerHTML = content;
37
+ return div.querySelector('svg');
38
+ }
39
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: IpiImgService, deps: [{ token: i1.HttpClient }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
40
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: IpiImgService, providedIn: 'root' }); }
41
+ }
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: IpiImgService, decorators: [{
43
+ type: Injectable,
44
+ args: [{
45
+ providedIn: 'root'
46
+ }]
47
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: Document, decorators: [{
48
+ type: Inject,
49
+ args: [DOCUMENT]
50
+ }] }] });
51
+
52
+ class ImageHelper {
53
+ constructor() {
54
+ this.loaded = false;
55
+ }
56
+ }
57
+ class IpiImageComponent {
58
+ constructor(element, renderer, imgService, document, changeDetectorRef) {
59
+ this.element = element;
60
+ this.renderer = renderer;
61
+ this.imgService = imgService;
62
+ this.document = document;
63
+ this.changeDetectorRef = changeDetectorRef;
64
+ this.helper = new ImageHelper();
65
+ this.changeDetectorRef.detach();
66
+ }
67
+ ngOnInit() {
68
+ this.init();
69
+ }
70
+ ngOnDestroy() {
71
+ this.destroy();
72
+ }
73
+ ngOnChanges(changeRecord) {
74
+ if (!this.helper.loaded) {
75
+ return;
76
+ }
77
+ if (changeRecord['src']) {
78
+ this.destroy();
79
+ this.init();
80
+ }
81
+ if (changeRecord['ariaLabel']) {
82
+ this.setAriaLabel(changeRecord['ariaLabel'].currentValue);
83
+ }
84
+ }
85
+ init() {
86
+ if (!this.src || !this.ariaLabel) {
87
+ return;
88
+ }
89
+ const img = this.imgService.loadImg(this.src);
90
+ if (typeof img === 'string') {
91
+ this.initImage(img);
92
+ return;
93
+ }
94
+ this.helper.imgSub = img.subscribe(img => { this.initSvg(img); });
95
+ }
96
+ destroy() {
97
+ if (this.helper.imgSub) {
98
+ this.helper.imgSub.unsubscribe();
99
+ }
100
+ this.helper = new ImageHelper();
101
+ }
102
+ initImage(url) {
103
+ const img = this.document.createElement('img');
104
+ img.onerror = () => { this.onImgError(elem, img); };
105
+ const elem = this.element.nativeElement;
106
+ elem.innerHTML = '';
107
+ this.setStyling(img);
108
+ img.src = url;
109
+ this.renderer.appendChild(elem, img);
110
+ this.setAriaLabel(this.ariaLabel);
111
+ this.helper.loaded = true;
112
+ this.copyNgContentAttribute(elem, img);
113
+ }
114
+ initSvg(svg) {
115
+ if (this.helper.loaded || !svg) {
116
+ return;
117
+ }
118
+ const clonedSvg = svg.cloneNode(true);
119
+ this.setStyling(clonedSvg);
120
+ const elem = this.element.nativeElement;
121
+ elem.innerHTML = '';
122
+ this.renderer.appendChild(elem, clonedSvg);
123
+ this.helper.loaded = true;
124
+ if (!(this.ariaLabel === undefined && elem.firstChild.hasAttribute('aria-label')) && this.ariaLabel) {
125
+ this.setAriaLabel(this.ariaLabel);
126
+ }
127
+ this.copyNgContentAttribute(elem, clonedSvg);
128
+ }
129
+ setAriaLabel(label) {
130
+ const img = this.element.nativeElement.firstChild;
131
+ if (img) {
132
+ if (label === '') {
133
+ this.renderer.setAttribute(img, 'aria-hidden', 'true');
134
+ this.renderer.removeAttribute(img, 'aria-label');
135
+ }
136
+ else {
137
+ this.renderer.removeAttribute(img, 'aria-hidden');
138
+ this.renderer.setAttribute(img, 'aria-label', label);
139
+ }
140
+ }
141
+ }
142
+ setStyling(element) {
143
+ this.element.nativeElement.style.display = 'flex';
144
+ this.element.nativeElement.style.justifyContent = 'center';
145
+ this.element.nativeElement.style.alignItems = 'center';
146
+ element.style.width = 'inherit';
147
+ element.style.maxWidth = 'inherit';
148
+ element.style.height = 'inherit';
149
+ element.style.maxHeight = 'inherit';
150
+ }
151
+ onImgError(element, img) {
152
+ this.renderer.removeChild(element, img);
153
+ let svg = document.createRange().createContextualFragment(this.imgService.defaultSvg);
154
+ this.renderer.appendChild(element, svg);
155
+ setTimeout(() => {
156
+ this.renderer.setAttribute(element.firstChild, 'aria-label', 'A broken or missing image');
157
+ });
158
+ }
159
+ copyNgContentAttribute(hostElem, icon) {
160
+ const attributes = hostElem.attributes;
161
+ for (let i = 0; i < attributes.length; i += 1) {
162
+ const attribute = attributes.item(i);
163
+ if (attribute && attribute.name.startsWith('_ngcontent')) {
164
+ this.setNgContentAttribute(icon, attribute.name);
165
+ break;
166
+ }
167
+ }
168
+ }
169
+ setNgContentAttribute(parent, attributeName) {
170
+ this.renderer.setAttribute(parent, attributeName, '');
171
+ for (let i = 0; i < parent.childNodes.length; i += 1) {
172
+ const child = parent.childNodes[i];
173
+ if (child instanceof Element) {
174
+ this.setNgContentAttribute(child, attributeName);
175
+ }
176
+ }
177
+ }
178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: IpiImageComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: IpiImgService }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
179
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: IpiImageComponent, isStandalone: true, selector: "ipi-img", inputs: { src: "src", ariaLabel: "ariaLabel" }, usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
180
+ }
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: IpiImageComponent, decorators: [{
182
+ type: Component,
183
+ args: [{
184
+ selector: 'ipi-img',
185
+ template: '<ng-content></ng-content>',
186
+ }]
187
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: IpiImgService }, { type: Document, decorators: [{
188
+ type: Inject,
189
+ args: [DOCUMENT]
190
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { src: [{
191
+ type: Input
192
+ }], ariaLabel: [{
193
+ type: Input
194
+ }] } });
195
+
196
+ /**
197
+ * Generated bundle index. Do not edit.
198
+ */
199
+
200
+ export { IpiImageComponent, IpiImgService };
201
+ //# sourceMappingURL=apexara-ng-components-image.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apexara-ng-components-image.mjs","sources":["../../../../projects/apexara/ng-components/image/src/ipi-img.service.ts","../../../../projects/apexara/ng-components/image/src/ipi-img.component.ts","../../../../projects/apexara/ng-components/image/apexara-ng-components-image.ts"],"sourcesContent":["import { Inject, Injectable } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nimport { HttpClient } from '@angular/common/http';\n\nimport { Observable, of } from 'rxjs';\nimport { tap, finalize, share, map, catchError } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\n\nexport class IpiImgService {\n\n constructor(private http: HttpClient, @Inject(DOCUMENT) private document: Document) { }\n\n private svgs = new Map<string, SVGElement>();\n private svgsLoading = new Map<string, Observable<SVGElement>>();\n\n public defaultSvg = '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"m 4 1 c -1.644531 0 -3 1.355469 -3 3 v 1 h 1 v -1 c 0 -1.109375 0.890625 -2 2 -2 h 1 v -1 z m 2 0 v 1 h 4 v -1 z m 5 0 v 1 h 1 c 1.109375 0 2 0.890625 2 2 v 1 h 1 v -1 c 0 -1.644531 -1.355469 -3 -3 -3 z m -5 4 c -0.550781 0 -1 0.449219 -1 1 s 0.449219 1 1 1 s 1 -0.449219 1 -1 s -0.449219 -1 -1 -1 z m -5 1 v 4 h 1 v -4 z m 13 0 v 4 h 1 v -4 z m -4.5 2 l -2 2 l -1.5 -1 l -2 2 v 0.5 c 0 0.5 0.5 0.5 0.5 0.5 h 7 s 0.472656 -0.035156 0.5 -0.5 v -1 z m -8.5 3 v 1 c 0 1.644531 1.355469 3 3 3 h 1 v -1 h -1 c -1.109375 0 -2 -0.890625 -2 -2 v -1 z m 13 0 v 1 c 0 1.109375 -0.890625 2 -2 2 h -1 v 1 h 1 c 1.644531 0 3 -1.355469 3 -3 v -1 z m -8 3 v 1 h 4 v -1 z m 0 0\" fill=\"#2e3434\" fill-opacity=\"0.34902\"/></svg>'; \n\n public loadImg(url: string): Observable<SVGElement> | string {\n if (!url.endsWith('.svg')) {\n return url;\n }\n\n if (this.svgs.has(url)) {\n return of(this.svgs.get(url) as SVGElement);\n }\n\n if (this.svgsLoading.has(url)) {\n return this.svgsLoading.get(url) as Observable<SVGElement>;\n }\n\n const observable = this.getSvg(url)\n .pipe(\n catchError(() => { return of(this.defaultSvg); }),\n map(content => this.createSVG(content)),\n tap(element => this.svgs.set(url, element as SVGElement)),\n finalize(() => this.svgsLoading.delete(url)),\n share()\n );\n\n this.svgsLoading.set(url, observable);\n\n return observable;\n }\n\n private getSvg(url: string): Observable<string> {\n return this.http.get(url, { responseType: 'text' });\n }\n\n private createSVG(content: string): SVGElement {\n const div = this.document.createElement('DIV');\n\n div.innerHTML = content;\n\n return div.querySelector('svg') as SVGElement;\n }\n\n}\n","import { ChangeDetectorRef, Component, ElementRef, Inject, Input, Renderer2, SimpleChanges } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\nimport { Subscription } from 'rxjs';\n\nimport { IpiImgService } from './ipi-img.service';\n\nclass ImageHelper {\n loaded = false;\n imgSub?: Subscription;\n}\n\n@Component({\n selector: 'ipi-img',\n template: '<ng-content></ng-content>',\n})\n\nexport class IpiImageComponent {\n\n constructor(\n private element: ElementRef,\n private renderer: Renderer2,\n private imgService: IpiImgService,\n @Inject(DOCUMENT) private document: Document,\n private changeDetectorRef: ChangeDetectorRef) {\n this.changeDetectorRef.detach();\n }\n\n @Input() src!: string;\n @Input() ariaLabel!: string;\n\n private helper = new ImageHelper();\n\n public ngOnInit(): void {\n this.init();\n }\n\n public ngOnDestroy(): void {\n this.destroy();\n }\n\n public ngOnChanges(changeRecord: SimpleChanges): void {\n if (!this.helper.loaded) {\n return;\n }\n\n if (changeRecord['src']) {\n this.destroy();\n\n this.init();\n }\n\n if (changeRecord['ariaLabel']) {\n this.setAriaLabel(changeRecord['ariaLabel'].currentValue);\n }\n }\n\n private init(): void {\n if (!this.src || !this.ariaLabel) {\n return;\n }\n\n const img = this.imgService.loadImg(this.src);\n\n if (typeof img === 'string') {\n this.initImage(img);\n\n return;\n }\n\n this.helper.imgSub = img.subscribe(img => { this.initSvg(img); });\n }\n\n private destroy(): void {\n if (this.helper.imgSub) {\n this.helper.imgSub.unsubscribe();\n }\n\n this.helper = new ImageHelper();\n }\n\n private initImage(url: string): void {\n const img = this.document.createElement('img');\n img.onerror = () => { this.onImgError(elem, img); };\n \n const elem = this.element.nativeElement;\n elem.innerHTML = '';\n\n this.setStyling(img);\n\n img.src = url;\n\n this.renderer.appendChild(elem, img);\n this.setAriaLabel(this.ariaLabel);\n \n this.helper.loaded = true;\n this.copyNgContentAttribute(elem, img);\n }\n\n private initSvg(svg: SVGElement): void {\n if (this.helper.loaded || !svg) {\n return;\n }\n\n const clonedSvg = svg.cloneNode(true) as SVGElement;\n\n this.setStyling(clonedSvg);\n\n const elem = this.element.nativeElement;\n elem.innerHTML = '';\n\n this.renderer.appendChild(elem, clonedSvg);\n this.helper.loaded = true;\n\n if (!(this.ariaLabel === undefined && elem.firstChild.hasAttribute('aria-label')) && this.ariaLabel) {\n this.setAriaLabel(this.ariaLabel);\n }\n\n this.copyNgContentAttribute(elem, clonedSvg);\n }\n\n private setAriaLabel(label: string): void {\n const img = this.element.nativeElement.firstChild;\n\n if (img) {\n if (label === '') {\n this.renderer.setAttribute(img, 'aria-hidden', 'true');\n this.renderer.removeAttribute(img, 'aria-label');\n } else {\n this.renderer.removeAttribute(img, 'aria-hidden');\n this.renderer.setAttribute(img, 'aria-label', label);\n }\n }\n }\n\n private setStyling(element: SVGElement | HTMLImageElement) {\n this.element.nativeElement.style.display = 'flex';\n this.element.nativeElement.style.justifyContent = 'center';\n this.element.nativeElement.style.alignItems = 'center';\n\n element.style.width = 'inherit';\n element.style.maxWidth = 'inherit';\n\n element.style.height = 'inherit';\n element.style.maxHeight = 'inherit';\n }\n\n private onImgError(element: any, img: HTMLImageElement): void {\n this.renderer.removeChild(element, img);\n\n let svg = document.createRange().createContextualFragment(this.imgService.defaultSvg);\n\n this.renderer.appendChild(element, svg);\n\n setTimeout(() => {\n this.renderer.setAttribute(element.firstChild, 'aria-label', 'A broken or missing image');\n });\n }\n\n private copyNgContentAttribute(hostElem: any, icon: SVGElement | HTMLImageElement) {\n const attributes = hostElem.attributes as NamedNodeMap;\n\n for (let i = 0; i < attributes.length; i += 1) {\n const attribute = attributes.item(i);\n \n if (attribute && attribute.name.startsWith('_ngcontent')) {\n this.setNgContentAttribute(icon, attribute.name);\n break;\n }\n }\n }\n\n private setNgContentAttribute(parent: Node, attributeName: string) {\n this.renderer.setAttribute(parent, attributeName, '');\n\n for (let i = 0; i < parent.childNodes.length; i += 1) {\n const child = parent.childNodes[i];\n\n if (child instanceof Element) {\n this.setNgContentAttribute(child, attributeName);\n }\n }\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAYa,aAAa,CAAA;IAExB,WAAA,CAAoB,IAAgB,EAA4B,QAAkB,EAAA;QAA9D,IAAA,CAAA,IAAI,GAAJ,IAAI;QAAwC,IAAA,CAAA,QAAQ,GAAR,QAAQ;AAEhE,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,GAAG,EAAsB;AACpC,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,GAAG,EAAkC;QAExD,IAAA,CAAA,UAAU,GAAG,2wBAA2wB;IALzsB;AAO/E,IAAA,OAAO,CAAC,GAAW,EAAA;QACxB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AACzB,YAAA,OAAO,GAAG;QACZ;QAEA,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YACtB,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAe,CAAC;QAC7C;QAEA,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YAC7B,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAA2B;QAC5D;AAEA,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG;AAC/B,aAAA,IAAI,CACH,UAAU,CAAC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BAA2B;AACtC,iBAAA;;0BAQI,MAAM;2BAAC,QAAQ;;sBAKjB;;sBACA;;;AC7BH;;AAEG;;;;"}
@@ -0,0 +1,129 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, HostListener, Output, Input, Component } from '@angular/core';
3
+ import { NgClass, NgTemplateOutlet } from '@angular/common';
4
+ import { RouterLink } from '@angular/router';
5
+ import * as i1 from '@angular/forms';
6
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
7
+ import { IpiImageComponent } from '@apexara/ng-components/image';
8
+ import { TooltipPosition, IpiTooltipDirective } from '@apexara/ng-components/tooltip';
9
+
10
+ class IpiInputComponent {
11
+ constructor(changeDetectorRef) {
12
+ this.changeDetectorRef = changeDetectorRef;
13
+ this.inputChange = new EventEmitter();
14
+ this.suffixImgChange = new EventEmitter();
15
+ this.helperTextChange = new EventEmitter();
16
+ this.controlInvalid = false;
17
+ this.tooltipPosition = TooltipPosition;
18
+ this.control = null;
19
+ this.changeDetectorRef.detach();
20
+ }
21
+ ngOnInit() {
22
+ this.setControl();
23
+ this.changeDetectorRef.detectChanges();
24
+ }
25
+ ngOnDestroy() {
26
+ if (this.controlSubscription) {
27
+ this.controlSubscription.unsubscribe();
28
+ }
29
+ }
30
+ onInput(event) {
31
+ const input = event.target;
32
+ const sanitizedValue = input.value.replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|[\uD83C-\uDBFF\uDC00-\uDFFF])/g, '');
33
+ input.value = sanitizedValue;
34
+ this.inputChange.emit(sanitizedValue);
35
+ this.changeDetectorRef.detectChanges();
36
+ }
37
+ onSuffixImage() {
38
+ this.suffixImgChange.emit();
39
+ this.changeDetectorRef.detectChanges();
40
+ }
41
+ onHelperText() {
42
+ this.helperTextChange.emit();
43
+ this.changeDetectorRef.detectChanges();
44
+ }
45
+ onFocusOut() {
46
+ this.initChange();
47
+ }
48
+ setControl() {
49
+ if (!this.options) {
50
+ return;
51
+ }
52
+ if (!this.options.placeholder) {
53
+ this.options.placeholder = this.options.label;
54
+ }
55
+ if (!this.options.formGroup || !this.options.formControlName) {
56
+ return;
57
+ }
58
+ this.control = this.options.formGroup.controls[this.options.formControlName];
59
+ this.checkIfControlDisabled(this.control);
60
+ this.control.markAsTouched();
61
+ this.controlSubscription = this.control.statusChanges.subscribe(() => {
62
+ this.initChange();
63
+ });
64
+ }
65
+ initChange() {
66
+ if (!this.control) {
67
+ return;
68
+ }
69
+ this.checkIfControlInvalid(this.control);
70
+ this.getLabel();
71
+ this.changeDetectorRef.detectChanges();
72
+ }
73
+ checkIfControlInvalid(control) {
74
+ this.controlInvalid = control.touched && control.invalid;
75
+ }
76
+ checkIfControlDisabled(control) {
77
+ if (control.disabled || this.options.disabled) {
78
+ control.disable();
79
+ this.options.disabled = true;
80
+ }
81
+ }
82
+ getLabel() {
83
+ this.label = '';
84
+ const options = this.options;
85
+ const formGroup = options.formGroup;
86
+ const formControlName = options.formControlName;
87
+ if (formGroup && formControlName && options.errors && this.controlInvalid) {
88
+ for (const error in options.errors) {
89
+ if (formGroup.controls[formControlName].hasError(error)) {
90
+ this.label = options.errors[error];
91
+ return;
92
+ }
93
+ }
94
+ }
95
+ }
96
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: IpiInputComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
97
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.2", type: IpiInputComponent, isStandalone: true, selector: "ipi-input", inputs: { options: "options" }, outputs: { inputChange: "inputChange", suffixImgChange: "suffixImgChange", helperTextChange: "helperTextChange" }, host: { listeners: { "focusout": "onFocusOut()" } }, ngImport: i0, template: "@if (options) {\n @if (options.label !== '') {\n <div class=\"header\">\n <div class=\"label-wrapper\">\n <label>{{ options.label }}</label>\n\n @if (options.tooltip) {\n <svg class=\"tooltip-icon\" [ipiTooltip]=\"options.tooltip\" [tooltipPosition]=\"tooltipPosition.Above\" width=\"16\" height=\"16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <path d=\"M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M7.5 7.5H8V11h.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M8.25 5.25a.25.25 0 1 1-.5 0 .25.25 0 0 1 .5 0z\" fill=\"#fff\"/>\n </g>\n </svg>\n }\n </div>\n\n @if (options.helperText) {\n <div class=\"header-helper\" (click)=\"onHelperText()\" [routerLink]=\"options.helperRoute\">{{ options.helperText }}</div>\n }\n </div>\n }\n\n @if (!options.formGroup) {\n <div class=\"input-field\" [ngClass]=\"{ 'disabled': options.disabled }\">\n <ng-container [ngTemplateOutlet]=\"prefix\" [ngTemplateOutletContext]=\"{ prefixImg: options.prefixImg }\"></ng-container>\n\n <input [disabled]=\"options.disabled\" class=\"input\" autocomplete=\"off\" [type]=\"options.type ? options.type : 'text'\" [placeholder]=\"options.placeholder\" (input)=\"onInput($event)\"/>\n\n <ng-container [ngTemplateOutlet]=\"suffix\" [ngTemplateOutletContext]=\"{ suffixImg: options.suffixImg }\"></ng-container>\n </div>\n } @else {\n <div class=\"input-field\" [formGroup]=\"options.formGroup\" [ngClass]=\"{ 'error': controlInvalid, 'disabled': options.disabled }\">\n <ng-container [ngTemplateOutlet]=\"prefix\" [ngTemplateOutletContext]=\"{ prefixImg: options.prefixImg }\"></ng-container>\n\n @if (options.formControlName) {\n <input class=\"input\" autocomplete=\"off\" [type]=\"options.type ? options.type : 'text'\" [placeholder]=\"options.placeholder\" [formControlName]=\"options.formControlName\"/>\n }\n\n <ng-container [ngTemplateOutlet]=\"suffix\" [ngTemplateOutletContext]=\"{ suffixImg: options.suffixImg }\"></ng-container>\n </div>\n\n <div class=\"footer\" [ngClass]=\"{ 'error': controlInvalid }\">\n {{ label }}\n </div>\n }\n}\n\n<ng-template #prefix let-prefixImg=\"prefixImg\">\n @if (prefixImg) {\n <ipi-img class=\"icon left\" [src]=\"'assets/img/' + prefixImg\" [ariaLabel]=\"'Input prefix icon'\"></ipi-img>\n }\n</ng-template>\n\n<ng-template #suffix let-suffixImg=\"suffixImg\">\n @if (suffixImg) {\n <ipi-img class=\"icon right\" [src]=\"'assets/img/' + suffixImg\" (click)=\"onSuffixImage()\" [ariaLabel]=\"'Input suffix icon'\"></ipi-img>\n }\n</ng-template>\n", styles: [":host{display:flex;flex-direction:column;touch-action:manipulation}.header{width:100%;min-height:20px;display:flex;align-items:center;justify-content:space-between;column-gap:4px;color:var(--ipi-input-header-color, #0B1222);text-wrap:nowrap;margin-bottom:2px}.header-helper{font-size:12px;text-align:right;color:var(--ipi-input-helper-text-color, #5D6068);cursor:pointer}.header-helper:after{content:\"\";display:block;width:0;height:2px;background:var(--ipi-input-helper-text-color, #5D6068);transition:width .3s}.header-helper:hover:after{width:100%}input::placeholder{color:var(--ipi-input-placeholder-color, #C6C6C6)}.footer{height:14px;font-size:12px;margin-top:2px}.footer.error{color:var(--ipi-input-error-color, #F96138)}label{font-size:14px;font-weight:600;text-wrap:wrap;margin-right:4px}.label-wrapper{display:flex;align-items:center}.input-field{height:44px;display:flex;align-items:center;justify-content:space-around;border:solid var(--ipi-input-border-color, #E9E9E9);border-width:var(--ipi-input-border-width, 1px);border-radius:4px;transition:border 1s;padding:0 6px}.input-field.disabled{opacity:.7}.input{width:100%;height:20px;min-width:108px;font-weight:400;font-size:14px;color:var(--ipi-input-value-color, #0B1222);background-color:transparent;line-height:20px;border:none;outline:none}input[disabled],.input-field.disabled{cursor:not-allowed}input[type=password]{font-weight:700;letter-spacing:3px}input[type=password]::placeholder{font-weight:400;letter-spacing:normal}.icon{width:16px;height:16px}.icon.left{margin-right:6px;padding:6px}.icon.right{cursor:pointer;margin-left:6px;padding:6px}.tooltip-icon{overflow:visible}.tooltip-icon path{fill:var(--ipi-input-tooltip-icon-fill, transparent);stroke:var(--ipi-input-tooltip-icon-stroke, #C6C6C6)}ipi-img.left path{fill:var(--ipi-input-icon-left-fill, #C6C6C6);stroke:var(--ipi-input-icon-left-stroke, transparent)}ipi-img.right path{fill:var(--ipi-input-icon-right-fill, #C6C6C6);stroke:var(--ipi-input-icon-right-stroke, transparent)}.error{border-color:var(--ipi-input-border-error-color, #F96138);border-width:var(--ipi-input-border-error-width, 1px)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:var(--ipi-input-text-color, #0B1222);box-shadow:inset 0 0 20px 20px #23232300}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: IpiImageComponent, selector: "ipi-img", inputs: ["src", "ariaLabel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: IpiTooltipDirective, selector: "[ipiTooltip]", inputs: ["ipiTooltip", "tooltipPosition"] }] }); }
98
+ }
99
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: IpiInputComponent, decorators: [{
100
+ type: Component,
101
+ args: [{ selector: 'ipi-input', imports: [
102
+ NgClass,
103
+ NgTemplateOutlet,
104
+ RouterLink,
105
+ FormsModule,
106
+ IpiImageComponent,
107
+ ReactiveFormsModule,
108
+ IpiTooltipDirective,
109
+ IpiTooltipDirective
110
+ ], template: "@if (options) {\n @if (options.label !== '') {\n <div class=\"header\">\n <div class=\"label-wrapper\">\n <label>{{ options.label }}</label>\n\n @if (options.tooltip) {\n <svg class=\"tooltip-icon\" [ipiTooltip]=\"options.tooltip\" [tooltipPosition]=\"tooltipPosition.Above\" width=\"16\" height=\"16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <path d=\"M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M7.5 7.5H8V11h.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M8.25 5.25a.25.25 0 1 1-.5 0 .25.25 0 0 1 .5 0z\" fill=\"#fff\"/>\n </g>\n </svg>\n }\n </div>\n\n @if (options.helperText) {\n <div class=\"header-helper\" (click)=\"onHelperText()\" [routerLink]=\"options.helperRoute\">{{ options.helperText }}</div>\n }\n </div>\n }\n\n @if (!options.formGroup) {\n <div class=\"input-field\" [ngClass]=\"{ 'disabled': options.disabled }\">\n <ng-container [ngTemplateOutlet]=\"prefix\" [ngTemplateOutletContext]=\"{ prefixImg: options.prefixImg }\"></ng-container>\n\n <input [disabled]=\"options.disabled\" class=\"input\" autocomplete=\"off\" [type]=\"options.type ? options.type : 'text'\" [placeholder]=\"options.placeholder\" (input)=\"onInput($event)\"/>\n\n <ng-container [ngTemplateOutlet]=\"suffix\" [ngTemplateOutletContext]=\"{ suffixImg: options.suffixImg }\"></ng-container>\n </div>\n } @else {\n <div class=\"input-field\" [formGroup]=\"options.formGroup\" [ngClass]=\"{ 'error': controlInvalid, 'disabled': options.disabled }\">\n <ng-container [ngTemplateOutlet]=\"prefix\" [ngTemplateOutletContext]=\"{ prefixImg: options.prefixImg }\"></ng-container>\n\n @if (options.formControlName) {\n <input class=\"input\" autocomplete=\"off\" [type]=\"options.type ? options.type : 'text'\" [placeholder]=\"options.placeholder\" [formControlName]=\"options.formControlName\"/>\n }\n\n <ng-container [ngTemplateOutlet]=\"suffix\" [ngTemplateOutletContext]=\"{ suffixImg: options.suffixImg }\"></ng-container>\n </div>\n\n <div class=\"footer\" [ngClass]=\"{ 'error': controlInvalid }\">\n {{ label }}\n </div>\n }\n}\n\n<ng-template #prefix let-prefixImg=\"prefixImg\">\n @if (prefixImg) {\n <ipi-img class=\"icon left\" [src]=\"'assets/img/' + prefixImg\" [ariaLabel]=\"'Input prefix icon'\"></ipi-img>\n }\n</ng-template>\n\n<ng-template #suffix let-suffixImg=\"suffixImg\">\n @if (suffixImg) {\n <ipi-img class=\"icon right\" [src]=\"'assets/img/' + suffixImg\" (click)=\"onSuffixImage()\" [ariaLabel]=\"'Input suffix icon'\"></ipi-img>\n }\n</ng-template>\n", styles: [":host{display:flex;flex-direction:column;touch-action:manipulation}.header{width:100%;min-height:20px;display:flex;align-items:center;justify-content:space-between;column-gap:4px;color:var(--ipi-input-header-color, #0B1222);text-wrap:nowrap;margin-bottom:2px}.header-helper{font-size:12px;text-align:right;color:var(--ipi-input-helper-text-color, #5D6068);cursor:pointer}.header-helper:after{content:\"\";display:block;width:0;height:2px;background:var(--ipi-input-helper-text-color, #5D6068);transition:width .3s}.header-helper:hover:after{width:100%}input::placeholder{color:var(--ipi-input-placeholder-color, #C6C6C6)}.footer{height:14px;font-size:12px;margin-top:2px}.footer.error{color:var(--ipi-input-error-color, #F96138)}label{font-size:14px;font-weight:600;text-wrap:wrap;margin-right:4px}.label-wrapper{display:flex;align-items:center}.input-field{height:44px;display:flex;align-items:center;justify-content:space-around;border:solid var(--ipi-input-border-color, #E9E9E9);border-width:var(--ipi-input-border-width, 1px);border-radius:4px;transition:border 1s;padding:0 6px}.input-field.disabled{opacity:.7}.input{width:100%;height:20px;min-width:108px;font-weight:400;font-size:14px;color:var(--ipi-input-value-color, #0B1222);background-color:transparent;line-height:20px;border:none;outline:none}input[disabled],.input-field.disabled{cursor:not-allowed}input[type=password]{font-weight:700;letter-spacing:3px}input[type=password]::placeholder{font-weight:400;letter-spacing:normal}.icon{width:16px;height:16px}.icon.left{margin-right:6px;padding:6px}.icon.right{cursor:pointer;margin-left:6px;padding:6px}.tooltip-icon{overflow:visible}.tooltip-icon path{fill:var(--ipi-input-tooltip-icon-fill, transparent);stroke:var(--ipi-input-tooltip-icon-stroke, #C6C6C6)}ipi-img.left path{fill:var(--ipi-input-icon-left-fill, #C6C6C6);stroke:var(--ipi-input-icon-left-stroke, transparent)}ipi-img.right path{fill:var(--ipi-input-icon-right-fill, #C6C6C6);stroke:var(--ipi-input-icon-right-stroke, transparent)}.error{border-color:var(--ipi-input-border-error-color, #F96138);border-width:var(--ipi-input-border-error-width, 1px)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:var(--ipi-input-text-color, #0B1222);box-shadow:inset 0 0 20px 20px #23232300}\n"] }]
111
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { options: [{
112
+ type: Input
113
+ }], inputChange: [{
114
+ type: Output
115
+ }], suffixImgChange: [{
116
+ type: Output
117
+ }], helperTextChange: [{
118
+ type: Output
119
+ }], onFocusOut: [{
120
+ type: HostListener,
121
+ args: ['focusout']
122
+ }] } });
123
+
124
+ /**
125
+ * Generated bundle index. Do not edit.
126
+ */
127
+
128
+ export { IpiInputComponent };
129
+ //# sourceMappingURL=apexara-ng-components-input.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apexara-ng-components-input.mjs","sources":["../../../../projects/apexara/ng-components/input/src/input.component.ts","../../../../projects/apexara/ng-components/input/src/input.component.html","../../../../projects/apexara/ng-components/input/apexara-ng-components-input.ts"],"sourcesContent":["import { Component, ChangeDetectorRef, Input, Output, EventEmitter, HostListener } from '@angular/core';\nimport { NgClass, NgTemplateOutlet } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { AbstractControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { Subscription } from 'rxjs';\n\nimport { IpiImageComponent } from '@apexara/ng-components/image';\n\nimport { IpiTooltipDirective, TooltipPosition } from '@apexara/ng-components/tooltip';\n\nexport interface IpiInputOptions {\n label: string;\n type?: string;\n tooltip?: string;\n disabled?: boolean;\n placeholder?: string;\n helperText?: string;\n helperRoute?: string;\n prefixImg?: string;\n suffixImg?: string;\n formGroup?: FormGroup;\n formControlName?: string;\n errors?: IpiControlErrors;\n}\n\nexport interface IpiControlErrors {\n [x: string]: string;\n}\n\n@Component({\n selector: 'ipi-input',\n templateUrl: './input.component.html',\n styleUrls: ['./input.component.css'],\n imports: [\n NgClass,\n NgTemplateOutlet,\n RouterLink,\n FormsModule,\n IpiImageComponent,\n ReactiveFormsModule,\n IpiTooltipDirective,\n IpiTooltipDirective\n ]\n})\n\nexport class IpiInputComponent {\n\n constructor(private changeDetectorRef: ChangeDetectorRef) { \n this.changeDetectorRef.detach();\n }\n\n @Input() options!: IpiInputOptions;\n\n @Output() inputChange = new EventEmitter<string>();\n @Output() suffixImgChange = new EventEmitter<void>();\n @Output() helperTextChange = new EventEmitter<void>();\n\n public label!: string;\n public controlInvalid = false;\n public tooltipPosition = TooltipPosition;\n\n private controlSubscription!: Subscription;\n private control: AbstractControl | null = null;\n\n public ngOnInit(): void {\n this.setControl();\n\n this.changeDetectorRef.detectChanges();\n }\n\n public ngOnDestroy(): void {\n if (this.controlSubscription) {\n this.controlSubscription.unsubscribe();\n }\n }\n\n public onInput(event: Event): void {\n const input = event.target as HTMLInputElement;\n \n const sanitizedValue = input.value.replace(/([\\u2700-\\u27BF]|[\\uE000-\\uF8FF]|[\\uD83C-\\uDBFF\\uDC00-\\uDFFF])/g, '');\n \n input.value = sanitizedValue;\n \n this.inputChange.emit(sanitizedValue);\n \n this.changeDetectorRef.detectChanges();\n }\n\n public onSuffixImage(): void {\n this.suffixImgChange.emit();\n\n this.changeDetectorRef.detectChanges();\n }\n\n public onHelperText(): void {\n this.helperTextChange.emit();\n\n this.changeDetectorRef.detectChanges();\n }\n\n @HostListener('focusout')\n onFocusOut(): void {\n this.initChange();\n }\n\n private setControl(): void {\n if (!this.options) {\n return;\n }\n\n if (!this.options.placeholder) {\n this.options.placeholder = this.options.label;\n }\n \n if (!this.options.formGroup || !this.options.formControlName) {\n return;\n }\n\n this.control = this.options.formGroup.controls[this.options.formControlName];\n\n this.checkIfControlDisabled(this.control);\n\n this.control.markAsTouched();\n\n this.controlSubscription = this.control.statusChanges.subscribe(() => {\n this.initChange();\n });\n }\n\n private initChange(): void {\n if (!this.control) {\n return;\n }\n\n this.checkIfControlInvalid(this.control);\n\n this.getLabel();\n\n this.changeDetectorRef.detectChanges();\n }\n\n private checkIfControlInvalid(control: AbstractControl): void {\n this.controlInvalid = control.touched && control.invalid;\n }\n\n private checkIfControlDisabled(control: AbstractControl): void {\n if (control.disabled || this.options.disabled) {\n control.disable();\n \n this.options.disabled = true;\n }\n }\n\n private getLabel(): void {\n this.label = '';\n\n const options = this.options!;\n const formGroup = options.formGroup;\n const formControlName = options.formControlName;\n\n if (formGroup && formControlName && options.errors && this.controlInvalid) {\n for (const error in options.errors) {\n if (formGroup.controls[formControlName].hasError(error)) {\n this.label = options.errors[error];\n\n return;\n }\n }\n\n }\n }\n\n}\n","@if (options) {\n @if (options.label !== '') {\n <div class=\"header\">\n <div class=\"label-wrapper\">\n <label>{{ options.label }}</label>\n\n @if (options.tooltip) {\n <svg class=\"tooltip-icon\" [ipiTooltip]=\"options.tooltip\" [tooltipPosition]=\"tooltipPosition.Above\" width=\"16\" height=\"16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <path d=\"M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M7.5 7.5H8V11h.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M8.25 5.25a.25.25 0 1 1-.5 0 .25.25 0 0 1 .5 0z\" fill=\"#fff\"/>\n </g>\n </svg>\n }\n </div>\n\n @if (options.helperText) {\n <div class=\"header-helper\" (click)=\"onHelperText()\" [routerLink]=\"options.helperRoute\">{{ options.helperText }}</div>\n }\n </div>\n }\n\n @if (!options.formGroup) {\n <div class=\"input-field\" [ngClass]=\"{ 'disabled': options.disabled }\">\n <ng-container [ngTemplateOutlet]=\"prefix\" [ngTemplateOutletContext]=\"{ prefixImg: options.prefixImg }\"></ng-container>\n\n <input [disabled]=\"options.disabled\" class=\"input\" autocomplete=\"off\" [type]=\"options.type ? options.type : 'text'\" [placeholder]=\"options.placeholder\" (input)=\"onInput($event)\"/>\n\n <ng-container [ngTemplateOutlet]=\"suffix\" [ngTemplateOutletContext]=\"{ suffixImg: options.suffixImg }\"></ng-container>\n </div>\n } @else {\n <div class=\"input-field\" [formGroup]=\"options.formGroup\" [ngClass]=\"{ 'error': controlInvalid, 'disabled': options.disabled }\">\n <ng-container [ngTemplateOutlet]=\"prefix\" [ngTemplateOutletContext]=\"{ prefixImg: options.prefixImg }\"></ng-container>\n\n @if (options.formControlName) {\n <input class=\"input\" autocomplete=\"off\" [type]=\"options.type ? options.type : 'text'\" [placeholder]=\"options.placeholder\" [formControlName]=\"options.formControlName\"/>\n }\n\n <ng-container [ngTemplateOutlet]=\"suffix\" [ngTemplateOutletContext]=\"{ suffixImg: options.suffixImg }\"></ng-container>\n </div>\n\n <div class=\"footer\" [ngClass]=\"{ 'error': controlInvalid }\">\n {{ label }}\n </div>\n }\n}\n\n<ng-template #prefix let-prefixImg=\"prefixImg\">\n @if (prefixImg) {\n <ipi-img class=\"icon left\" [src]=\"'assets/img/' + prefixImg\" [ariaLabel]=\"'Input prefix icon'\"></ipi-img>\n }\n</ng-template>\n\n<ng-template #suffix let-suffixImg=\"suffixImg\">\n @if (suffixImg) {\n <ipi-img class=\"icon right\" [src]=\"'assets/img/' + suffixImg\" (click)=\"onSuffixImage()\" [ariaLabel]=\"'Input suffix icon'\"></ipi-img>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MA8Ca,iBAAiB,CAAA;AAE5B,IAAA,WAAA,CAAoB,iBAAoC,EAAA;QAApC,IAAA,CAAA,iBAAiB,GAAjB,iBAAiB;AAM3B,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAU;AACxC,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,YAAY,EAAQ;AAC1C,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,YAAY,EAAQ;QAG9C,IAAA,CAAA,cAAc,GAAG,KAAK;QACtB,IAAA,CAAA,eAAe,GAAG,eAAe;QAGhC,IAAA,CAAA,OAAO,GAA2B,IAAI;AAd5C,QAAA,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE;IACjC;IAeO,QAAQ,GAAA;QACb,IAAI,CAAC,UAAU,EAAE;AAEjB,QAAA,IAAI,CAAC,iBAAiB,CAAC,aAAa,EAAE;IACxC;IAEO,WAAW,GAAA;AAChB,QAAA,IAAI,IAAI,CAAC,mBAAmB,EAAE;AAC5B,YAAA,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE;QACxC;IACF;AAEO,IAAA,OAAO,CAAC,KAAY,EAAA;AACzB,QAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B;AAE9C,QAAA,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,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