@igo2/common 20.1.1 → 21.0.0-next.2
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/fesm2022/igo2-common-action.mjs +32 -32
- package/fesm2022/igo2-common-action.mjs.map +1 -1
- package/fesm2022/igo2-common-backdrop.mjs +8 -9
- package/fesm2022/igo2-common-backdrop.mjs.map +1 -1
- package/fesm2022/igo2-common-badge.mjs +7 -8
- package/fesm2022/igo2-common-badge.mjs.map +1 -1
- package/fesm2022/igo2-common-clickout.mjs +11 -11
- package/fesm2022/igo2-common-clickout.mjs.map +1 -1
- package/fesm2022/igo2-common-clone.mjs +8 -9
- package/fesm2022/igo2-common-clone.mjs.map +1 -1
- package/fesm2022/igo2-common-collapsible.mjs +13 -14
- package/fesm2022/igo2-common-collapsible.mjs.map +1 -1
- package/fesm2022/igo2-common-color.mjs +9 -9
- package/fesm2022/igo2-common-color.mjs.map +1 -1
- package/fesm2022/igo2-common-confirm-dialog.mjs +10 -10
- package/fesm2022/igo2-common-context-menu.mjs +20 -26
- package/fesm2022/igo2-common-context-menu.mjs.map +1 -1
- package/fesm2022/igo2-common-custom-html.mjs +11 -12
- package/fesm2022/igo2-common-custom-html.mjs.map +1 -1
- package/fesm2022/igo2-common-datepicker.mjs +13 -13
- package/fesm2022/igo2-common-datepicker.mjs.map +1 -1
- package/fesm2022/igo2-common-dom.mjs +7 -7
- package/fesm2022/igo2-common-drag-drop.mjs +24 -28
- package/fesm2022/igo2-common-drag-drop.mjs.map +1 -1
- package/fesm2022/igo2-common-dynamic-component.mjs +19 -19
- package/fesm2022/igo2-common-dynamic-component.mjs.map +1 -1
- package/fesm2022/igo2-common-entity.mjs +61 -61
- package/fesm2022/igo2-common-entity.mjs.map +1 -1
- package/fesm2022/igo2-common-flexible.mjs +9 -9
- package/fesm2022/igo2-common-flexible.mjs.map +1 -1
- package/fesm2022/igo2-common-form.mjs +75 -75
- package/fesm2022/igo2-common-form.mjs.map +1 -1
- package/fesm2022/igo2-common-home-button.mjs +7 -7
- package/fesm2022/igo2-common-icon.mjs +8 -8
- package/fesm2022/igo2-common-icon.mjs.map +1 -1
- package/fesm2022/igo2-common-image.mjs +14 -16
- package/fesm2022/igo2-common-image.mjs.map +1 -1
- package/fesm2022/igo2-common-interactive-tour.mjs +16 -16
- package/fesm2022/igo2-common-interactive-tour.mjs.map +1 -1
- package/fesm2022/igo2-common-json-dialog.mjs +10 -10
- package/fesm2022/igo2-common-keyvalue.mjs +8 -9
- package/fesm2022/igo2-common-keyvalue.mjs.map +1 -1
- package/fesm2022/igo2-common-list.mjs +17 -25
- package/fesm2022/igo2-common-list.mjs.map +1 -1
- package/fesm2022/igo2-common-panel.mjs +12 -13
- package/fesm2022/igo2-common-panel.mjs.map +1 -1
- package/fesm2022/igo2-common-resizable-bar.mjs +9 -13
- package/fesm2022/igo2-common-resizable-bar.mjs.map +1 -1
- package/fesm2022/igo2-common-select-value-dialog.mjs +10 -10
- package/fesm2022/igo2-common-select-value-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-sidenav.mjs +14 -19
- package/fesm2022/igo2-common-sidenav.mjs.map +1 -1
- package/fesm2022/igo2-common-spinner.mjs +13 -14
- package/fesm2022/igo2-common-spinner.mjs.map +1 -1
- package/fesm2022/igo2-common-stop-propagation.mjs +12 -14
- package/fesm2022/igo2-common-stop-propagation.mjs.map +1 -1
- package/fesm2022/igo2-common-table.mjs +12 -12
- package/fesm2022/igo2-common-table.mjs.map +1 -1
- package/fesm2022/igo2-common-timepicker.mjs +9 -9
- package/fesm2022/igo2-common-timepicker.mjs.map +1 -1
- package/fesm2022/igo2-common-tool.mjs +19 -19
- package/fesm2022/igo2-common-tool.mjs.map +1 -1
- package/fesm2022/igo2-common-widget.mjs +17 -17
- package/fesm2022/igo2-common-widget.mjs.map +1 -1
- package/fesm2022/igo2-common-workspace.mjs +21 -21
- package/fesm2022/igo2-common-workspace.mjs.map +1 -1
- package/package.json +60 -59
- package/{clickout/index.d.ts → types/igo2-common-clickout.d.ts} +1 -1
- package/{drag-drop/index.d.ts → types/igo2-common-drag-drop.d.ts} +1 -1
- package/{entity/index.d.ts → types/igo2-common-entity.d.ts} +1 -1
- package/{table/index.d.ts → types/igo2-common-table.d.ts} +2 -2
- /package/{action/index.d.ts → types/igo2-common-action.d.ts} +0 -0
- /package/{backdrop/index.d.ts → types/igo2-common-backdrop.d.ts} +0 -0
- /package/{badge/index.d.ts → types/igo2-common-badge.d.ts} +0 -0
- /package/{clone/index.d.ts → types/igo2-common-clone.d.ts} +0 -0
- /package/{collapsible/index.d.ts → types/igo2-common-collapsible.d.ts} +0 -0
- /package/{color/index.d.ts → types/igo2-common-color.d.ts} +0 -0
- /package/{confirm-dialog/index.d.ts → types/igo2-common-confirm-dialog.d.ts} +0 -0
- /package/{context-menu/index.d.ts → types/igo2-common-context-menu.d.ts} +0 -0
- /package/{custom-html/index.d.ts → types/igo2-common-custom-html.d.ts} +0 -0
- /package/{datepicker/index.d.ts → types/igo2-common-datepicker.d.ts} +0 -0
- /package/{dom/index.d.ts → types/igo2-common-dom.d.ts} +0 -0
- /package/{dynamic-component/index.d.ts → types/igo2-common-dynamic-component.d.ts} +0 -0
- /package/{environment/index.d.ts → types/igo2-common-environment.d.ts} +0 -0
- /package/{flexible/index.d.ts → types/igo2-common-flexible.d.ts} +0 -0
- /package/{form/index.d.ts → types/igo2-common-form.d.ts} +0 -0
- /package/{home-button/index.d.ts → types/igo2-common-home-button.d.ts} +0 -0
- /package/{icon/index.d.ts → types/igo2-common-icon.d.ts} +0 -0
- /package/{image/index.d.ts → types/igo2-common-image.d.ts} +0 -0
- /package/{interactive-tour/index.d.ts → types/igo2-common-interactive-tour.d.ts} +0 -0
- /package/{json-dialog/index.d.ts → types/igo2-common-json-dialog.d.ts} +0 -0
- /package/{keyvalue/index.d.ts → types/igo2-common-keyvalue.d.ts} +0 -0
- /package/{list/index.d.ts → types/igo2-common-list.d.ts} +0 -0
- /package/{panel/index.d.ts → types/igo2-common-panel.d.ts} +0 -0
- /package/{resizable-bar/index.d.ts → types/igo2-common-resizable-bar.d.ts} +0 -0
- /package/{select-value-dialog/index.d.ts → types/igo2-common-select-value-dialog.d.ts} +0 -0
- /package/{sidenav/index.d.ts → types/igo2-common-sidenav.d.ts} +0 -0
- /package/{spinner/index.d.ts → types/igo2-common-spinner.d.ts} +0 -0
- /package/{stop-propagation/index.d.ts → types/igo2-common-stop-propagation.d.ts} +0 -0
- /package/{timepicker/index.d.ts → types/igo2-common-timepicker.d.ts} +0 -0
- /package/{tool/index.d.ts → types/igo2-common-tool.d.ts} +0 -0
- /package/{widget/index.d.ts → types/igo2-common-widget.d.ts} +0 -0
- /package/{workspace/index.d.ts → types/igo2-common-workspace.d.ts} +0 -0
- /package/{index.d.ts → types/igo2-common.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-common-clickout.mjs","sources":["../../../packages/common/clickout/src/clickout.directive.ts","../../../packages/common/clickout/src/clickout.module.ts","../../../packages/common/clickout/src/igo2-common-clickout.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n HostListener,\n inject,\n output\n} from '@angular/core';\n\n@Directive({\n selector: '[igoClickout]'
|
|
1
|
+
{"version":3,"file":"igo2-common-clickout.mjs","sources":["../../../packages/common/clickout/src/clickout.directive.ts","../../../packages/common/clickout/src/clickout.module.ts","../../../packages/common/clickout/src/igo2-common-clickout.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n HostListener,\n inject,\n output\n} from '@angular/core';\n\n@Directive({\n selector: '[igoClickout]'\n})\nexport class ClickoutDirective {\n private el = inject(ElementRef);\n\n readonly clickout = output<MouseEvent>();\n\n @HostListener('document:click', ['$event'])\n handleMouseClick(event: MouseEvent) {\n const target = event.target;\n if (!target) {\n return;\n }\n\n if (!this.el.nativeElement.contains(target)) {\n this.clickout.emit(event);\n }\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { ClickoutDirective } from './clickout.directive';\n\n/**\n * @deprecated import the ClickoutDirective directly\n */\n@NgModule({\n imports: [ClickoutDirective],\n exports: [ClickoutDirective]\n})\nexport class IgoClickoutModule {\n static forRoot(): ModuleWithProviders<IgoClickoutModule> {\n return {\n ngModule: IgoClickoutModule,\n providers: []\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;MAWa,iBAAiB,CAAA;AACpB,IAAA,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;IAEtB,QAAQ,GAAG,MAAM,EAAc;AAGxC,IAAA,gBAAgB,CAAC,KAAiB,EAAA;AAChC,QAAA,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM;QAC3B,IAAI,CAAC,MAAM,EAAE;YACX;QACF;AAEA,QAAA,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AAC3C,YAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;QAC3B;IACF;wGAfW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,gBAAA,EAAA,0BAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE;AACX,iBAAA;;sBAME,YAAY;uBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;;ACZ5C;;AAEG;MAKU,iBAAiB,CAAA;AAC5B,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,iBAAiB;AAC3B,YAAA,SAAS,EAAE;SACZ;IACH;wGANW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAAjB,iBAAiB,EAAA,OAAA,EAAA,CAHlB,iBAAiB,CAAA,EAAA,OAAA,EAAA,CACjB,iBAAiB,CAAA,EAAA,CAAA;yGAEhB,iBAAiB,EAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,iBAAiB,CAAC;oBAC5B,OAAO,EAAE,CAAC,iBAAiB;AAC5B,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -13,14 +13,13 @@ class ClonePipe {
|
|
|
13
13
|
return Object.assign(Object.create(value), value);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
17
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ClonePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
17
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: ClonePipe, isStandalone: true, name: "clone" });
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ClonePipe, decorators: [{
|
|
20
20
|
type: Pipe,
|
|
21
21
|
args: [{
|
|
22
|
-
name: 'clone'
|
|
23
|
-
standalone: true
|
|
22
|
+
name: 'clone'
|
|
24
23
|
}]
|
|
25
24
|
}] });
|
|
26
25
|
|
|
@@ -34,11 +33,11 @@ class IgoCloneModule {
|
|
|
34
33
|
providers: []
|
|
35
34
|
};
|
|
36
35
|
}
|
|
37
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
38
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
39
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
36
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoCloneModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
37
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: IgoCloneModule, imports: [ClonePipe], exports: [ClonePipe] });
|
|
38
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoCloneModule });
|
|
40
39
|
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoCloneModule, decorators: [{
|
|
42
41
|
type: NgModule,
|
|
43
42
|
args: [{
|
|
44
43
|
imports: [ClonePipe],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-common-clone.mjs","sources":["../../../packages/common/clone/src/clone.pipe.ts","../../../packages/common/clone/src/clone.module.ts","../../../packages/common/clone/src/igo2-common-clone.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'clone'
|
|
1
|
+
{"version":3,"file":"igo2-common-clone.mjs","sources":["../../../packages/common/clone/src/clone.pipe.ts","../../../packages/common/clone/src/clone.module.ts","../../../packages/common/clone/src/igo2-common-clone.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'clone'\n})\nexport class ClonePipe implements PipeTransform {\n transform(value: any): any {\n if (value === undefined) {\n return value;\n }\n\n if (value instanceof Array) {\n return value.map((obj) => Object.assign(Object.create(obj), obj));\n } else {\n return Object.assign(Object.create(value), value);\n }\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { ClonePipe } from './clone.pipe';\n\n/**\n * @deprecated import the ClonePipe directly\n */\n@NgModule({\n imports: [ClonePipe],\n exports: [ClonePipe]\n})\nexport class IgoCloneModule {\n static forRoot(): ModuleWithProviders<IgoCloneModule> {\n return {\n ngModule: IgoCloneModule,\n providers: []\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;MAKa,SAAS,CAAA;AACpB,IAAA,SAAS,CAAC,KAAU,EAAA;AAClB,QAAA,IAAI,KAAK,KAAK,SAAS,EAAE;AACvB,YAAA,OAAO,KAAK;QACd;AAEA,QAAA,IAAI,KAAK,YAAY,KAAK,EAAE;YAC1B,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;QACnE;aAAO;AACL,YAAA,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;QACnD;IACF;wGAXW,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;sGAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA;;4FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBAHrB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE;AACP,iBAAA;;;ACAD;;AAEG;MAKU,cAAc,CAAA;AACzB,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,cAAc;AACxB,YAAA,SAAS,EAAE;SACZ;IACH;wGANW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAAd,cAAc,EAAA,OAAA,EAAA,CAHf,SAAS,CAAA,EAAA,OAAA,EAAA,CACT,SAAS,CAAA,EAAA,CAAA;yGAER,cAAc,EAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,SAAS,CAAC;oBACpB,OAAO,EAAE,CAAC,SAAS;AACpB,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -36,14 +36,13 @@ class CollapseDirective {
|
|
|
36
36
|
this.renderer.removeClass(this.target, 'igo-collapsed');
|
|
37
37
|
this.renderer.removeClass(this.el.nativeElement, 'collapsed');
|
|
38
38
|
}
|
|
39
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
40
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
39
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CollapseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
40
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.10", type: CollapseDirective, isStandalone: true, selector: "[igoCollapse]", inputs: { target: "target", collapsed: "collapsed" }, outputs: { toggle: "toggle" }, host: { listeners: { "click": "click()" } }, ngImport: i0 });
|
|
41
41
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CollapseDirective, decorators: [{
|
|
43
43
|
type: Directive,
|
|
44
44
|
args: [{
|
|
45
|
-
selector: '[igoCollapse]'
|
|
46
|
-
standalone: true
|
|
45
|
+
selector: '[igoCollapse]'
|
|
47
46
|
}]
|
|
48
47
|
}], propDecorators: { target: [{
|
|
49
48
|
type: Input
|
|
@@ -55,13 +54,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
55
54
|
}] } });
|
|
56
55
|
|
|
57
56
|
class CollapsibleComponent {
|
|
58
|
-
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
59
|
-
collapsed = model(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
|
|
57
|
+
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
58
|
+
collapsed = model(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
|
|
60
59
|
toggle = output();
|
|
61
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
62
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
60
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CollapsibleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
61
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.10", type: CollapsibleComponent, isStandalone: true, selector: "igo-collapsible", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange", toggle: "toggle" }, ngImport: i0, template: "<mat-list-item>\n <mat-icon\n class=\"igo-chevron\"\n matListItemIcon\n igoCollapse\n [target]=\"content\"\n [collapsed]=\"collapsed()\"\n (toggle)=\"collapsed.set($event)\"\n >\n expand_less\n </mat-icon>\n <span matListItemTitle>{{ title() }}</span>\n</mat-list-item>\n\n<div #content>\n <ng-content />\n</div>\n", styles: [":host ::ng-deep .mat-mdc-list .mat-mdc-list-item.mat-mdc-list-item-avatar{height:auto;width:auto;padding:0}mat-list-item{overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i1.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i1.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: CollapseDirective, selector: "[igoCollapse]", inputs: ["target", "collapsed"], outputs: ["toggle"] }] });
|
|
63
62
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CollapsibleComponent, decorators: [{
|
|
65
64
|
type: Component,
|
|
66
65
|
args: [{ selector: 'igo-collapsible', imports: [MatListModule, MatIconModule, CollapseDirective], template: "<mat-list-item>\n <mat-icon\n class=\"igo-chevron\"\n matListItemIcon\n igoCollapse\n [target]=\"content\"\n [collapsed]=\"collapsed()\"\n (toggle)=\"collapsed.set($event)\"\n >\n expand_less\n </mat-icon>\n <span matListItemTitle>{{ title() }}</span>\n</mat-list-item>\n\n<div #content>\n <ng-content />\n</div>\n", styles: [":host ::ng-deep .mat-mdc-list .mat-mdc-list-item.mat-mdc-list-item-avatar{height:auto;width:auto;padding:0}mat-list-item{overflow:hidden}\n"] }]
|
|
67
66
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], toggle: [{ type: i0.Output, args: ["toggle"] }] } });
|
|
@@ -76,11 +75,11 @@ class IgoCollapsibleModule {
|
|
|
76
75
|
providers: []
|
|
77
76
|
};
|
|
78
77
|
}
|
|
79
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
80
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
81
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoCollapsibleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
79
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: IgoCollapsibleModule, imports: [CollapsibleComponent, CollapseDirective], exports: [CollapsibleComponent, CollapseDirective] });
|
|
80
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoCollapsibleModule, imports: [CollapsibleComponent] });
|
|
82
81
|
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoCollapsibleModule, decorators: [{
|
|
84
83
|
type: NgModule,
|
|
85
84
|
args: [{
|
|
86
85
|
imports: [CollapsibleComponent, CollapseDirective],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-common-collapsible.mjs","sources":["../../../packages/common/collapsible/src/collapse.directive.ts","../../../packages/common/collapsible/src/collapsible.component.ts","../../../packages/common/collapsible/src/collapsible.component.html","../../../packages/common/collapsible/src/collapsible.module.ts","../../../packages/common/collapsible/src/public_api.ts","../../../packages/common/collapsible/src/igo2-common-collapsible.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n HostListener,\n Input,\n Renderer2,\n inject,\n output\n} from '@angular/core';\n\n@Directive({\n selector: '[igoCollapse]'
|
|
1
|
+
{"version":3,"file":"igo2-common-collapsible.mjs","sources":["../../../packages/common/collapsible/src/collapse.directive.ts","../../../packages/common/collapsible/src/collapsible.component.ts","../../../packages/common/collapsible/src/collapsible.component.html","../../../packages/common/collapsible/src/collapsible.module.ts","../../../packages/common/collapsible/src/public_api.ts","../../../packages/common/collapsible/src/igo2-common-collapsible.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n HostListener,\n Input,\n Renderer2,\n inject,\n output\n} from '@angular/core';\n\n@Directive({\n selector: '[igoCollapse]'\n})\nexport class CollapseDirective {\n private renderer = inject(Renderer2);\n private el = inject(ElementRef);\n\n @Input()\n get target() {\n return this._target;\n }\n set target(value: Element) {\n this._target = value;\n }\n private _target: Element;\n\n @Input()\n get collapsed(): boolean {\n return this._collapsed;\n }\n set collapsed(collapsed: boolean) {\n collapsed ? this.collapseTarget() : this.expandTarget();\n this._collapsed = collapsed;\n this.toggle.emit(collapsed);\n }\n private _collapsed = false;\n\n readonly toggle = output<boolean>();\n\n @HostListener('click')\n click() {\n this.collapsed = !this.collapsed;\n }\n\n private collapseTarget() {\n this.renderer.addClass(this.target, 'igo-collapsed');\n this.renderer.addClass(this.el.nativeElement, 'collapsed');\n }\n\n private expandTarget() {\n this.renderer.removeClass(this.target, 'igo-collapsed');\n this.renderer.removeClass(this.el.nativeElement, 'collapsed');\n }\n}\n","import { Component, input, model, output } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatListModule } from '@angular/material/list';\n\nimport { CollapseDirective } from './collapse.directive';\n\n@Component({\n selector: 'igo-collapsible',\n templateUrl: './collapsible.component.html',\n styleUrls: ['./collapsible.component.scss'],\n imports: [MatListModule, MatIconModule, CollapseDirective]\n})\nexport class CollapsibleComponent {\n readonly title = input('');\n readonly collapsed = model(false);\n\n readonly toggle = output<boolean>();\n}\n","<mat-list-item>\n <mat-icon\n class=\"igo-chevron\"\n matListItemIcon\n igoCollapse\n [target]=\"content\"\n [collapsed]=\"collapsed()\"\n (toggle)=\"collapsed.set($event)\"\n >\n expand_less\n </mat-icon>\n <span matListItemTitle>{{ title() }}</span>\n</mat-list-item>\n\n<div #content>\n <ng-content />\n</div>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { CollapseDirective } from './collapse.directive';\nimport { CollapsibleComponent } from './collapsible.component';\n\n/**\n * @deprecated import the components/directives directly or COLLAPSIBLE_DIRECTIVES for the set\n */\n@NgModule({\n imports: [CollapsibleComponent, CollapseDirective],\n exports: [CollapsibleComponent, CollapseDirective]\n})\nexport class IgoCollapsibleModule {\n static forRoot(): ModuleWithProviders<IgoCollapsibleModule> {\n return {\n ngModule: IgoCollapsibleModule,\n providers: []\n };\n }\n}\n","import { CollapseDirective } from './collapse.directive';\nimport { CollapsibleComponent } from './collapsible.component';\n\nexport * from './collapsible.component';\nexport * from './collapsible.module';\nexport * from './collapse.directive';\n\nexport const COLLAPSIBLE_DIRECTIVES = [\n CollapsibleComponent,\n CollapseDirective\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAaa,iBAAiB,CAAA;AACpB,IAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAC5B,IAAA,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;AAE/B,IAAA,IACI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO;IACrB;IACA,IAAI,MAAM,CAAC,KAAc,EAAA;AACvB,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;IACtB;AACQ,IAAA,OAAO;AAEf,IAAA,IACI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,UAAU;IACxB;IACA,IAAI,SAAS,CAAC,SAAk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value;
|
|
29
|
-
outputFormat = input('rgba', ...(ngDevMode ? [{ debugName: "outputFormat" }] : []));
|
|
29
|
+
outputFormat = input('rgba', ...(ngDevMode ? [{ debugName: "outputFormat" }] : /* istanbul ignore next */ []));
|
|
30
30
|
/**
|
|
31
31
|
* The emitted value represent the current chosen color in the picker
|
|
32
32
|
* The value is emitted by default in RGBA, or based on the input 'outputFormat' value.
|
|
@@ -71,16 +71,16 @@ class ColorPickerFormFieldComponent {
|
|
|
71
71
|
}
|
|
72
72
|
return color;
|
|
73
73
|
}
|
|
74
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
75
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
74
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ColorPickerFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
75
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.10", type: ColorPickerFormFieldComponent, isStandalone: true, selector: "igo-color-picker-form-field", inputs: { outputFormat: { classPropertyName: "outputFormat", publicName: "outputFormat", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { colorChange: "colorChange" }, providers: [
|
|
76
76
|
{
|
|
77
77
|
provide: NG_VALUE_ACCESSOR,
|
|
78
78
|
useExisting: forwardRef(() => ColorPickerFormFieldComponent),
|
|
79
79
|
multi: true
|
|
80
80
|
}
|
|
81
|
-
], ngImport: i0, template: "<mat-form-field\n class=\"fill-field\"\n floatLabel=\"always\"\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n subscriptSizing=\"dynamic\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"isOpen = !isOpen\"\n>\n <mat-label>{{ colorPicker }}</mat-label>\n <input\n type=\"text\"\n matInput\n [readonly]=\"true\"\n [style.background]=\"colorPicker\"\n />\n</mat-form-field>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n (backdropClick)=\"isOpen = false\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n>\n <div class=\"picker\">\n <color-chrome (onChange)=\"handleChange($event)\" [color]=\"colorPicker\" />\n <div class=\"buttons\">\n <button matButton=\"filled\" color=\"primary\" (click)=\"handleClick($event)\">\n {{ 'igo.common.confirmDialog.applyBtn' | translate }}\n </button>\n </div>\n </div>\n</ng-template>\n", styles: [".picker{left:100%;position:absolute;top:100%;background-color:#fff;border-radius:8px;overflow:hidden;box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.picker ::ng-deep .chrome-picker{box-shadow:none}.picker .buttons{padding:4px 12px 8px;display:flex;justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "ngmodule", type: ColorChromeModule }, { kind: "component", type: i3.ChromeComponent, selector: "color-chrome", inputs: ["disableAlpha"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
|
|
81
|
+
], ngImport: i0, template: "<mat-form-field\n class=\"fill-field\"\n floatLabel=\"always\"\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n subscriptSizing=\"dynamic\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"isOpen = !isOpen\"\n>\n <mat-label>{{ colorPicker }}</mat-label>\n <input\n type=\"text\"\n matInput\n [readonly]=\"true\"\n [style.background]=\"colorPicker\"\n />\n</mat-form-field>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n (backdropClick)=\"isOpen = false\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n>\n <div class=\"picker\">\n <color-chrome (onChange)=\"handleChange($event)\" [color]=\"colorPicker\" />\n <div class=\"buttons\">\n <button matButton=\"filled\" color=\"primary\" (click)=\"handleClick($event)\">\n {{ 'igo.common.confirmDialog.applyBtn' | translate }}\n </button>\n </div>\n </div>\n</ng-template>\n", styles: [".picker{left:100%;position:absolute;top:100%;background-color:#fff;border-radius:8px;overflow:hidden;box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.picker ::ng-deep .chrome-picker{box-shadow:none}.picker .buttons{padding:4px 12px 8px;display:flex;justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "ngmodule", type: ColorChromeModule }, { kind: "component", type: i3.ChromeComponent, selector: "color-chrome", inputs: ["disableAlpha"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
|
|
82
82
|
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ColorPickerFormFieldComponent, decorators: [{
|
|
84
84
|
type: Component,
|
|
85
85
|
args: [{ selector: 'igo-color-picker-form-field', providers: [
|
|
86
86
|
{
|
|
@@ -103,11 +103,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
103
103
|
* @deprecated import the ColorPickerFormFieldComponent directly
|
|
104
104
|
*/
|
|
105
105
|
class ColorPickerFormFieldModule {
|
|
106
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
107
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
108
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
106
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ColorPickerFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
107
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: ColorPickerFormFieldModule, imports: [ColorPickerFormFieldComponent], exports: [ColorPickerFormFieldComponent] });
|
|
108
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ColorPickerFormFieldModule, imports: [ColorPickerFormFieldComponent] });
|
|
109
109
|
}
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ColorPickerFormFieldModule, decorators: [{
|
|
111
111
|
type: NgModule,
|
|
112
112
|
args: [{
|
|
113
113
|
imports: [ColorPickerFormFieldComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-common-color.mjs","sources":["../../../packages/common/color/src/color-picker-form-field/color-picker-form-field.component.ts","../../../packages/common/color/src/color-picker-form-field/color-picker-form-field.component.html","../../../packages/common/color/src/color-picker-form-field/color-picker-form-field.module.ts","../../../packages/common/color/src/igo2-common-color.ts"],"sourcesContent":["import { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';\nimport { Component, forwardRef, input, output } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { IgoLanguageModule } from '@igo2/core/language';\n\nimport { ColorEvent } from 'ngx-color';\nimport { ColorChromeModule } from 'ngx-color/chrome';\nimport tinycolor, { ColorInput } from 'tinycolor2';\n\ntype ColorFormat = 'hex' | 'rgba' | 'hsla';\n\n@Component({\n selector: 'igo-color-picker-form-field',\n templateUrl: './color-picker-form-field.component.html',\n styleUrls: ['./color-picker-form-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ColorPickerFormFieldComponent),\n multi: true\n }\n ],\n imports: [\n MatFormFieldModule,\n CdkOverlayOrigin,\n MatInputModule,\n CdkConnectedOverlay,\n ColorChromeModule,\n MatButtonModule,\n IgoLanguageModule\n ]\n})\nexport class ColorPickerFormFieldComponent implements ControlValueAccessor {\n isOpen = false;\n\n set value(value: string) {\n this._value = this.formatColor(value ?? '#000');\n this.colorPicker = this._value;\n\n this.onChange(this.value);\n this.onTouch(this.value);\n }\n get value(): string {\n return this._value;\n }\n private _value: string;\n\n readonly outputFormat = input<ColorFormat>('rgba');\n\n /**\n * The emitted value represent the current chosen color in the picker\n * The value is emitted by default in RGBA, or based on the input 'outputFormat' value.\n */\n readonly colorChange = output<string>();\n\n colorPicker: string;\n\n onChange: any = () => void 1;\n onTouch: any = () => void 1;\n\n writeValue(value: string) {\n this.value = value;\n }\n\n registerOnChange(fn: any) {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any) {\n this.onTouch = fn;\n }\n\n handleClick(event: MouseEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isOpen = false;\n this.value = this.colorPicker;\n }\n\n handleChange($event: ColorEvent) {\n this.colorPicker = this.formatColor($event.color.rgb, 'rgba');\n this.colorChange.emit(this.formatColor(this.colorPicker));\n }\n\n private formatColor(\n color: ColorInput,\n format: ColorFormat = this.outputFormat()\n ): string {\n switch (format) {\n case 'hex':\n color = tinycolor(color).toHexString();\n break;\n case 'rgba':\n color = tinycolor(color).toRgbString();\n break;\n case 'hsla':\n color = tinycolor(color).toHsvString();\n break;\n default:\n color = tinycolor(color).toRgbString();\n break;\n }\n return color;\n }\n}\n","<mat-form-field\n class=\"fill-field\"\n floatLabel=\"always\"\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n subscriptSizing=\"dynamic\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"isOpen = !isOpen\"\n>\n <mat-label>{{ colorPicker }}</mat-label>\n <input\n type=\"text\"\n matInput\n [readonly]=\"true\"\n [style.background]=\"colorPicker\"\n />\n</mat-form-field>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n (backdropClick)=\"isOpen = false\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n>\n <div class=\"picker\">\n <color-chrome (onChange)=\"handleChange($event)\" [color]=\"colorPicker\" />\n <div class=\"buttons\">\n <button matButton=\"filled\" color=\"primary\" (click)=\"handleClick($event)\">\n {{ 'igo.common.confirmDialog.applyBtn' | translate }}\n </button>\n </div>\n </div>\n</ng-template>\n","import { NgModule } from '@angular/core';\n\nimport { ColorPickerFormFieldComponent } from './color-picker-form-field.component';\n\n/**\n * @deprecated import the ColorPickerFormFieldComponent directly\n */\n@NgModule({\n imports: [ColorPickerFormFieldComponent],\n exports: [ColorPickerFormFieldComponent]\n})\nexport class ColorPickerFormFieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAoCa,6BAA6B,CAAA;IACxC,MAAM,GAAG,KAAK;IAEd,IAAI,KAAK,CAAC,KAAa,EAAA;QACrB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,MAAM,CAAC;AAC/C,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM;AAE9B,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;AACzB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;IAC1B;AACA,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,MAAM;IACpB;AACQ,IAAA,MAAM;AAEL,IAAA,YAAY,GAAG,KAAK,CAAc,MAAM,
|
|
1
|
+
{"version":3,"file":"igo2-common-color.mjs","sources":["../../../packages/common/color/src/color-picker-form-field/color-picker-form-field.component.ts","../../../packages/common/color/src/color-picker-form-field/color-picker-form-field.component.html","../../../packages/common/color/src/color-picker-form-field/color-picker-form-field.module.ts","../../../packages/common/color/src/igo2-common-color.ts"],"sourcesContent":["import { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';\nimport { Component, forwardRef, input, output } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { IgoLanguageModule } from '@igo2/core/language';\n\nimport { ColorEvent } from 'ngx-color';\nimport { ColorChromeModule } from 'ngx-color/chrome';\nimport tinycolor, { ColorInput } from 'tinycolor2';\n\ntype ColorFormat = 'hex' | 'rgba' | 'hsla';\n\n@Component({\n selector: 'igo-color-picker-form-field',\n templateUrl: './color-picker-form-field.component.html',\n styleUrls: ['./color-picker-form-field.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ColorPickerFormFieldComponent),\n multi: true\n }\n ],\n imports: [\n MatFormFieldModule,\n CdkOverlayOrigin,\n MatInputModule,\n CdkConnectedOverlay,\n ColorChromeModule,\n MatButtonModule,\n IgoLanguageModule\n ]\n})\nexport class ColorPickerFormFieldComponent implements ControlValueAccessor {\n isOpen = false;\n\n set value(value: string) {\n this._value = this.formatColor(value ?? '#000');\n this.colorPicker = this._value;\n\n this.onChange(this.value);\n this.onTouch(this.value);\n }\n get value(): string {\n return this._value;\n }\n private _value: string;\n\n readonly outputFormat = input<ColorFormat>('rgba');\n\n /**\n * The emitted value represent the current chosen color in the picker\n * The value is emitted by default in RGBA, or based on the input 'outputFormat' value.\n */\n readonly colorChange = output<string>();\n\n colorPicker: string;\n\n onChange: any = () => void 1;\n onTouch: any = () => void 1;\n\n writeValue(value: string) {\n this.value = value;\n }\n\n registerOnChange(fn: any) {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any) {\n this.onTouch = fn;\n }\n\n handleClick(event: MouseEvent) {\n event.preventDefault();\n event.stopPropagation();\n this.isOpen = false;\n this.value = this.colorPicker;\n }\n\n handleChange($event: ColorEvent) {\n this.colorPicker = this.formatColor($event.color.rgb, 'rgba');\n this.colorChange.emit(this.formatColor(this.colorPicker));\n }\n\n private formatColor(\n color: ColorInput,\n format: ColorFormat = this.outputFormat()\n ): string {\n switch (format) {\n case 'hex':\n color = tinycolor(color).toHexString();\n break;\n case 'rgba':\n color = tinycolor(color).toRgbString();\n break;\n case 'hsla':\n color = tinycolor(color).toHsvString();\n break;\n default:\n color = tinycolor(color).toRgbString();\n break;\n }\n return color;\n }\n}\n","<mat-form-field\n class=\"fill-field\"\n floatLabel=\"always\"\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n subscriptSizing=\"dynamic\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"isOpen = !isOpen\"\n>\n <mat-label>{{ colorPicker }}</mat-label>\n <input\n type=\"text\"\n matInput\n [readonly]=\"true\"\n [style.background]=\"colorPicker\"\n />\n</mat-form-field>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n (backdropClick)=\"isOpen = false\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n>\n <div class=\"picker\">\n <color-chrome (onChange)=\"handleChange($event)\" [color]=\"colorPicker\" />\n <div class=\"buttons\">\n <button matButton=\"filled\" color=\"primary\" (click)=\"handleClick($event)\">\n {{ 'igo.common.confirmDialog.applyBtn' | translate }}\n </button>\n </div>\n </div>\n</ng-template>\n","import { NgModule } from '@angular/core';\n\nimport { ColorPickerFormFieldComponent } from './color-picker-form-field.component';\n\n/**\n * @deprecated import the ColorPickerFormFieldComponent directly\n */\n@NgModule({\n imports: [ColorPickerFormFieldComponent],\n exports: [ColorPickerFormFieldComponent]\n})\nexport class ColorPickerFormFieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAoCa,6BAA6B,CAAA;IACxC,MAAM,GAAG,KAAK;IAEd,IAAI,KAAK,CAAC,KAAa,EAAA;QACrB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,MAAM,CAAC;AAC/C,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM;AAE9B,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;AACzB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;IAC1B;AACA,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,MAAM;IACpB;AACQ,IAAA,MAAM;AAEL,IAAA,YAAY,GAAG,KAAK,CAAc,MAAM,mFAAC;AAElD;;;AAGG;IACM,WAAW,GAAG,MAAM,EAAU;AAEvC,IAAA,WAAW;AAEX,IAAA,QAAQ,GAAQ,MAAM,KAAK,CAAC;AAC5B,IAAA,OAAO,GAAQ,MAAM,KAAK,CAAC;AAE3B,IAAA,UAAU,CAAC,KAAa,EAAA;AACtB,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK;IACpB;AAEA,IAAA,gBAAgB,CAAC,EAAO,E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6B,EAAA,UAAA,EAAA,CAAA;kBArBzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,6BAA6B,EAAA,SAAA,EAG5B;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,mCAAmC,CAAC;AAC5D,4BAAA,KAAK,EAAE;AACR;qBACF,EAAA,OAAA,EACQ;wBACP,kBAAkB;wBAClB,gBAAgB;wBAChB,cAAc;wBACd,mBAAmB;wBACnB,iBAAiB;wBACjB,eAAe;wBACf;AACD,qBAAA,EAAA,QAAA,EAAA,whCAAA,EAAA,MAAA,EAAA,CAAA,8SAAA,CAAA,EAAA;;;AE9BH;;AAEG;MAKU,0BAA0B,CAAA;wGAA1B,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAA1B,0BAA0B,EAAA,OAAA,EAAA,CAH3B,6BAA6B,CAAA,EAAA,OAAA,EAAA,CAC7B,6BAA6B,CAAA,EAAA,CAAA;AAE5B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,YAH3B,6BAA6B,CAAA,EAAA,CAAA;;4FAG5B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAJtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,6BAA6B,CAAC;oBACxC,OAAO,EAAE,CAAC,6BAA6B;AACxC,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -12,10 +12,10 @@ class ConfirmDialogComponent {
|
|
|
12
12
|
titleKey = 'igo.common.confirmDialog.title';
|
|
13
13
|
proccessKey = 'igo.common.confirmDialog.confirmBtn';
|
|
14
14
|
cancelKey = 'igo.common.confirmDialog.cancelBtn';
|
|
15
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
16
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
15
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ConfirmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.10", type: ConfirmDialogComponent, isStandalone: true, selector: "igo-confirm-dialog", ngImport: i0, template: "<h2 mat-dialog-title>\n {{ titleKey | translate }}\n</h2>\n<div mat-dialog-content>\n {{ confirmMessage | translate }}\n</div>\n<div mat-dialog-actions>\n <button matButton=\"elevated\" color=\"primary\" (click)=\"dialogRef.close(true)\">\n {{ proccessKey | translate }}\n </button>\n <button matButton=\"filled\" (click)=\"dialogRef.close(false)\">\n {{ cancelKey | translate }}\n </button>\n</div>\n", styles: ["h2{margin:5px 0 10px}div[mat-dialog-content]{max-width:200px}div[mat-dialog-actions]{margin:10px 0 0}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
|
|
17
17
|
}
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
|
|
19
19
|
type: Component,
|
|
20
20
|
args: [{ selector: 'igo-confirm-dialog', imports: [
|
|
21
21
|
MatDialogTitle,
|
|
@@ -45,10 +45,10 @@ class ConfirmDialogService {
|
|
|
45
45
|
}
|
|
46
46
|
return dialogRef.afterClosed();
|
|
47
47
|
}
|
|
48
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
49
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ConfirmDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
49
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ConfirmDialogService, providedIn: 'root' });
|
|
50
50
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ConfirmDialogService, decorators: [{
|
|
52
52
|
type: Injectable,
|
|
53
53
|
args: [{ providedIn: 'root' }]
|
|
54
54
|
}] });
|
|
@@ -63,11 +63,11 @@ class IgoConfirmDialogModule {
|
|
|
63
63
|
providers: []
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
67
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
68
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
66
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoConfirmDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
67
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: IgoConfirmDialogModule, imports: [ConfirmDialogComponent], exports: [ConfirmDialogComponent] });
|
|
68
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoConfirmDialogModule, providers: [ConfirmDialogService], imports: [ConfirmDialogComponent] });
|
|
69
69
|
}
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoConfirmDialogModule, decorators: [{
|
|
71
71
|
type: NgModule,
|
|
72
72
|
args: [{
|
|
73
73
|
imports: [ConfirmDialogComponent],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Overlay } from '@angular/cdk/overlay';
|
|
2
2
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, ViewContainerRef, ElementRef, input, output,
|
|
4
|
+
import { inject, ViewContainerRef, ElementRef, input, output, Directive, HostListener, NgModule } from '@angular/core';
|
|
5
5
|
import { fromEvent } from 'rxjs';
|
|
6
6
|
import { filter, take } from 'rxjs/operators';
|
|
7
7
|
|
|
@@ -11,9 +11,7 @@ class ContextMenuDirective {
|
|
|
11
11
|
elementRef = inject(ElementRef);
|
|
12
12
|
overlayRef;
|
|
13
13
|
sub;
|
|
14
|
-
menuContext = input(undefined, ...(ngDevMode ?
|
|
15
|
-
alias: 'igoContextMenu'
|
|
16
|
-
}]));
|
|
14
|
+
menuContext = input(undefined, { ...(ngDevMode ? { debugName: "menuContext" } : /* istanbul ignore next */ {}), alias: 'igoContextMenu' });
|
|
17
15
|
menuPosition = output();
|
|
18
16
|
onContextMenu(e) {
|
|
19
17
|
let x;
|
|
@@ -82,22 +80,19 @@ class ContextMenuDirective {
|
|
|
82
80
|
this.sub.unsubscribe();
|
|
83
81
|
}
|
|
84
82
|
}
|
|
85
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
86
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
83
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ContextMenuDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
84
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.10", type: ContextMenuDirective, isStandalone: true, selector: "[igoContextMenu]", inputs: { menuContext: { classPropertyName: "menuContext", publicName: "igoContextMenu", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuPosition: "menuPosition" }, host: { listeners: { "longpress": "onContextMenu($any($event))", "contextmenu": "onContextMenu($event)" } }, ngImport: i0 });
|
|
87
85
|
}
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ContextMenuDirective, decorators: [{
|
|
89
87
|
type: Directive,
|
|
90
88
|
args: [{
|
|
91
89
|
selector: '[igoContextMenu]',
|
|
92
|
-
|
|
90
|
+
host: {
|
|
91
|
+
'(longpress)': 'onContextMenu($any($event))',
|
|
92
|
+
'(contextmenu)': 'onContextMenu($event)'
|
|
93
|
+
}
|
|
93
94
|
}]
|
|
94
|
-
}], propDecorators: { menuContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "igoContextMenu", required: false }] }], menuPosition: [{ type: i0.Output, args: ["menuPosition"] }]
|
|
95
|
-
type: HostListener,
|
|
96
|
-
args: ['longpress', ['$event']]
|
|
97
|
-
}, {
|
|
98
|
-
type: HostListener,
|
|
99
|
-
args: ['contextmenu', ['$event']]
|
|
100
|
-
}] } });
|
|
95
|
+
}], propDecorators: { menuContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "igoContextMenu", required: false }] }], menuPosition: [{ type: i0.Output, args: ["menuPosition"] }] } });
|
|
101
96
|
|
|
102
97
|
/**
|
|
103
98
|
* IgoLongPress trigger longpress event after a define duration.
|
|
@@ -107,8 +102,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
107
102
|
*/
|
|
108
103
|
class LongPressDirective {
|
|
109
104
|
touchTimeout;
|
|
110
|
-
touchDuration = input(400, ...(ngDevMode ? [{ debugName: "touchDuration" }] : []));
|
|
111
|
-
onlyIOS = input(true, ...(ngDevMode ? [{ debugName: "onlyIOS" }] : []));
|
|
105
|
+
touchDuration = input(400, ...(ngDevMode ? [{ debugName: "touchDuration" }] : /* istanbul ignore next */ []));
|
|
106
|
+
onlyIOS = input(true, ...(ngDevMode ? [{ debugName: "onlyIOS" }] : /* istanbul ignore next */ []));
|
|
112
107
|
longpress = output();
|
|
113
108
|
touchstart(e) {
|
|
114
109
|
if (e.touches.length > 1) {
|
|
@@ -125,14 +120,13 @@ class LongPressDirective {
|
|
|
125
120
|
touchEnd() {
|
|
126
121
|
clearTimeout(this.touchTimeout);
|
|
127
122
|
}
|
|
128
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
129
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: LongPressDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
124
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.10", type: LongPressDirective, isStandalone: true, selector: "[igoLongPress]", inputs: { touchDuration: { classPropertyName: "touchDuration", publicName: "touchDuration", isSignal: true, isRequired: false, transformFunction: null }, onlyIOS: { classPropertyName: "onlyIOS", publicName: "onlyIOS", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { longpress: "longpress" }, host: { listeners: { "touchstart": "touchstart($event)", "touchmove": "touchend()", "touchcancel": "touchend()", "touchend": "touchend()" } }, ngImport: i0 });
|
|
130
125
|
}
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: LongPressDirective, decorators: [{
|
|
132
127
|
type: Directive,
|
|
133
128
|
args: [{
|
|
134
|
-
selector: '[igoLongPress]'
|
|
135
|
-
standalone: true
|
|
129
|
+
selector: '[igoLongPress]'
|
|
136
130
|
}]
|
|
137
131
|
}], propDecorators: { touchDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "touchDuration", required: false }] }], onlyIOS: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlyIOS", required: false }] }], longpress: [{ type: i0.Output, args: ["longpress"] }], touchstart: [{
|
|
138
132
|
type: HostListener,
|
|
@@ -158,11 +152,11 @@ class IgoContextMenuModule {
|
|
|
158
152
|
providers: []
|
|
159
153
|
};
|
|
160
154
|
}
|
|
161
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
162
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
163
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
155
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
156
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: IgoContextMenuModule, imports: [ContextMenuDirective, LongPressDirective], exports: [ContextMenuDirective, LongPressDirective] });
|
|
157
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoContextMenuModule });
|
|
164
158
|
}
|
|
165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoContextMenuModule, decorators: [{
|
|
166
160
|
type: NgModule,
|
|
167
161
|
args: [{
|
|
168
162
|
imports: [ContextMenuDirective, LongPressDirective],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-common-context-menu.mjs","sources":["../../../packages/common/context-menu/src/context-menu.directive.ts","../../../packages/common/context-menu/src/long-press.directive.ts","../../../packages/common/context-menu/src/context-menu.module.ts","../../../packages/common/context-menu/src/public_api.ts","../../../packages/common/context-menu/src/igo2-common-context-menu.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n Directive,\n ElementRef,\n HostListener,\n ViewContainerRef,\n inject,\n input,\n output\n} from '@angular/core';\nimport type { TemplateRef } from '@angular/core';\n\nimport { Subscription, fromEvent } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\n\n@Directive({\n selector: '[igoContextMenu]',\n standalone: true\n})\nexport class ContextMenuDirective {\n overlay = inject(Overlay);\n viewContainerRef = inject(ViewContainerRef);\n private elementRef = inject(ElementRef);\n\n private overlayRef: OverlayRef | null;\n private sub: Subscription;\n\n readonly menuContext = input<TemplateRef<any>>(undefined, {\n alias: 'igoContextMenu'\n });\n readonly menuPosition = output<{\n x: number;\n y: number;\n }>();\n\n @HostListener('longpress', ['$event'])\n @HostListener('contextmenu', ['$event'])\n public onContextMenu(e: MouseEvent | TouchEvent): void {\n let x;\n let y;\n if (e instanceof MouseEvent) {\n x = e.x;\n y = e.y;\n } else if (e instanceof TouchEvent) {\n x = e.touches[0].pageX;\n y = e.touches[0].pageY;\n }\n if (!x || !y) {\n return;\n }\n\n this.close();\n e.preventDefault();\n this.menuPosition.emit({ x, y });\n this.overlayRef = null;\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo({ x, y })\n .withPositions([\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top'\n }\n ]);\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.close()\n });\n this.overlayRef.attach(\n new TemplatePortal(this.menuContext(), this.viewContainerRef, {\n $implicit: undefined\n })\n );\n\n this.sub = fromEvent<MouseEvent>(document, 'click')\n .pipe(\n filter((event) => {\n const clickTarget = event.target as HTMLElement;\n this.close();\n return (\n !!this.overlayRef &&\n !this.overlayRef.overlayElement.contains(clickTarget)\n );\n }),\n take(1)\n )\n .subscribe(() => this.close());\n\n this.sub = fromEvent<MouseEvent>(document, 'contextmenu')\n .pipe(\n filter((event) => {\n const clickTarget = event.target as HTMLElement;\n if (\n clickTarget &&\n !this.elementRef.nativeElement.contains(clickTarget) &&\n !this.overlayRef.overlayElement.contains(clickTarget)\n ) {\n return true;\n } else {\n event.preventDefault();\n }\n }),\n take(1)\n )\n .subscribe(() => this.close());\n }\n\n close() {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n if (this.sub) {\n this.sub.unsubscribe();\n }\n }\n}\n","import { Directive, HostListener, input, output } from '@angular/core';\n\n/**\n * IgoLongPress trigger longpress event after a define duration.\n * This directive exist to patch the unavailable contextmenu event on iOS.\n * @param touchDuration touch duration in ms, default value is 400ms\n * @param iOSOnly define if longpress is triggered only for iOS, default value = true\n */\n@Directive({\n selector: '[igoLongPress]',\n standalone: true\n})\nexport class LongPressDirective {\n private touchTimeout: any;\n readonly touchDuration = input(400);\n readonly onlyIOS = input(true);\n readonly longpress = output<TouchEvent>();\n\n @HostListener('touchstart', ['$event'])\n public touchstart(e: TouchEvent) {\n if (e.touches.length > 1) {\n this.touchEnd();\n return;\n }\n this.touchTimeout = setTimeout(() => {\n this.longpress.emit(e);\n }, this.touchDuration());\n }\n @HostListener('touchmove')\n @HostListener('touchcancel')\n @HostListener('touchend')\n public touchend() {\n this.touchEnd();\n }\n\n private touchEnd() {\n clearTimeout(this.touchTimeout);\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { ContextMenuDirective } from './context-menu.directive';\nimport { LongPressDirective } from './long-press.directive';\n\n/**\n * @deprecated import the components/directives directly or CONTEXT_MENU_DIRECTIVES for the set\n */\n@NgModule({\n imports: [ContextMenuDirective, LongPressDirective],\n exports: [ContextMenuDirective, LongPressDirective]\n})\nexport class IgoContextMenuModule {\n static forRoot(): ModuleWithProviders<IgoContextMenuModule> {\n return {\n ngModule: IgoContextMenuModule,\n providers: []\n };\n }\n}\n","import { ContextMenuDirective } from './context-menu.directive';\nimport { LongPressDirective } from './long-press.directive';\n\nexport * from './context-menu.module';\nexport * from './context-menu.directive';\nexport * from './long-press.directive';\n\nexport const CONTEXT_MENU_DIRECTIVES = [\n ContextMenuDirective,\n LongPressDirective\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAoBa,oBAAoB,CAAA;AAC/B,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACnC,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAE/B,IAAA,UAAU;AACV,IAAA,GAAG;IAEF,WAAW,GAAG,KAAK,CAAmB,SAAS,+CACtD,KAAK,EAAE,gBAAgB,EAAA,CAAA,GAAA,CADiC;AACxD,YAAA,KAAK,EAAE;AACR,SAAA,CAAA,CAAA,CAAC;IACO,YAAY,GAAG,MAAM,EAG1B;AAIG,IAAA,aAAa,CAAC,CAA0B,EAAA;AAC7C,QAAA,IAAI,CAAC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AAA,QAAQ,EAAE,oBAAoB;AAC9B,YAAA,SAAS,EAAE;SACZ;IACH;wGANW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAHrB,oBAAoB,EAAE,kBAAkB,CAAA,EAAA,OAAA,EAAA,CACxC,oBAAoB,EAAE,kBAAkB,CAAA,EAAA,CAAA;yGAEvC,oBAAoB,EAAA,CAAA;;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;AACnD,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB;AACnD,iBAAA;;;ACJM,MAAM,uBAAuB,GAAG;IACrC,oBAAoB;IACpB;;;ACTF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"igo2-common-context-menu.mjs","sources":["../../../packages/common/context-menu/src/context-menu.directive.ts","../../../packages/common/context-menu/src/long-press.directive.ts","../../../packages/common/context-menu/src/context-menu.module.ts","../../../packages/common/context-menu/src/public_api.ts","../../../packages/common/context-menu/src/igo2-common-context-menu.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n Directive,\n ElementRef,\n ViewContainerRef,\n inject,\n input,\n output\n} from '@angular/core';\nimport type { TemplateRef } from '@angular/core';\n\nimport { Subscription, fromEvent } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\n\n@Directive({\n selector: '[igoContextMenu]',\n host: {\n '(longpress)': 'onContextMenu($any($event))',\n '(contextmenu)': 'onContextMenu($event)'\n }\n})\nexport class ContextMenuDirective {\n overlay = inject(Overlay);\n viewContainerRef = inject(ViewContainerRef);\n private elementRef = inject(ElementRef);\n\n private overlayRef: OverlayRef | null;\n private sub: Subscription;\n\n readonly menuContext = input<TemplateRef<any>>(undefined, {\n alias: 'igoContextMenu'\n });\n readonly menuPosition = output<{\n x: number;\n y: number;\n }>();\n\n onContextMenu(e: MouseEvent | TouchEvent): void {\n let x;\n let y;\n if (e instanceof MouseEvent) {\n x = e.x;\n y = e.y;\n } else if (e instanceof TouchEvent) {\n x = e.touches[0].pageX;\n y = e.touches[0].pageY;\n }\n if (!x || !y) {\n return;\n }\n\n this.close();\n e.preventDefault();\n this.menuPosition.emit({ x, y });\n this.overlayRef = null;\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo({ x, y })\n .withPositions([\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top'\n }\n ]);\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.close()\n });\n this.overlayRef.attach(\n new TemplatePortal(this.menuContext(), this.viewContainerRef, {\n $implicit: undefined\n })\n );\n\n this.sub = fromEvent<MouseEvent>(document, 'click')\n .pipe(\n filter((event) => {\n const clickTarget = event.target as HTMLElement;\n this.close();\n return (\n !!this.overlayRef &&\n !this.overlayRef.overlayElement.contains(clickTarget)\n );\n }),\n take(1)\n )\n .subscribe(() => this.close());\n\n this.sub = fromEvent<MouseEvent>(document, 'contextmenu')\n .pipe(\n filter((event) => {\n const clickTarget = event.target as HTMLElement;\n if (\n clickTarget &&\n !this.elementRef.nativeElement.contains(clickTarget) &&\n !this.overlayRef.overlayElement.contains(clickTarget)\n ) {\n return true;\n } else {\n event.preventDefault();\n }\n }),\n take(1)\n )\n .subscribe(() => this.close());\n }\n\n close() {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n if (this.sub) {\n this.sub.unsubscribe();\n }\n }\n}\n","import { Directive, HostListener, input, output } from '@angular/core';\n\n/**\n * IgoLongPress trigger longpress event after a define duration.\n * This directive exist to patch the unavailable contextmenu event on iOS.\n * @param touchDuration touch duration in ms, default value is 400ms\n * @param iOSOnly define if longpress is triggered only for iOS, default value = true\n */\n@Directive({\n selector: '[igoLongPress]'\n})\nexport class LongPressDirective {\n private touchTimeout: any;\n readonly touchDuration = input(400);\n readonly onlyIOS = input(true);\n readonly longpress = output<TouchEvent>();\n\n @HostListener('touchstart', ['$event'])\n public touchstart(e: TouchEvent) {\n if (e.touches.length > 1) {\n this.touchEnd();\n return;\n }\n this.touchTimeout = setTimeout(() => {\n this.longpress.emit(e);\n }, this.touchDuration());\n }\n @HostListener('touchmove')\n @HostListener('touchcancel')\n @HostListener('touchend')\n public touchend() {\n this.touchEnd();\n }\n\n private touchEnd() {\n clearTimeout(this.touchTimeout);\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { ContextMenuDirective } from './context-menu.directive';\nimport { LongPressDirective } from './long-press.directive';\n\n/**\n * @deprecated import the components/directives directly or CONTEXT_MENU_DIRECTIVES for the set\n */\n@NgModule({\n imports: [ContextMenuDirective, LongPressDirective],\n exports: [ContextMenuDirective, LongPressDirective]\n})\nexport class IgoContextMenuModule {\n static forRoot(): ModuleWithProviders<IgoContextMenuModule> {\n return {\n ngModule: IgoContextMenuModule,\n providers: []\n };\n }\n}\n","import { ContextMenuDirective } from './context-menu.directive';\nimport { LongPressDirective } from './long-press.directive';\n\nexport * from './context-menu.module';\nexport * from './context-menu.directive';\nexport * from './long-press.directive';\n\nexport const CONTEXT_MENU_DIRECTIVES = [\n ContextMenuDirective,\n LongPressDirective\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAsBa,oBAAoB,CAAA;AAC/B,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAA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AC;;sBAUrC,YAAY;uBAAC,WAAW;;sBACxB,YAAY;uBAAC,aAAa;;sBAC1B,YAAY;uBAAC,UAAU;;;ACxB1B;;AAEG;MAKU,oBAAoB,CAAA;AAC/B,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,oBAAoB;AAC9B,YAAA,SAAS,EAAE;SACZ;IACH;wGANW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAHrB,oBAAoB,EAAE,kBAAkB,CAAA,EAAA,OAAA,EAAA,CACxC,oBAAoB,EAAE,kBAAkB,CAAA,EAAA,CAAA;yGAEvC,oBAAoB,EAAA,CAAA;;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;AACnD,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB;AACnD,iBAAA;;;ACJM,MAAM,uBAAuB,GAAG;IACrC,oBAAoB;IACpB;;;ACTF;;AAEG;;;;"}
|
|
@@ -7,14 +7,13 @@ class SanitizeHtmlPipe {
|
|
|
7
7
|
transform(v) {
|
|
8
8
|
return this._sanitizer.bypassSecurityTrustHtml(v);
|
|
9
9
|
}
|
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SanitizeHtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
11
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: SanitizeHtmlPipe, isStandalone: true, name: "sanitizeHtml" });
|
|
12
12
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SanitizeHtmlPipe, decorators: [{
|
|
14
14
|
type: Pipe,
|
|
15
15
|
args: [{
|
|
16
|
-
name: 'sanitizeHtml'
|
|
17
|
-
standalone: true
|
|
16
|
+
name: 'sanitizeHtml'
|
|
18
17
|
}]
|
|
19
18
|
}] });
|
|
20
19
|
|
|
@@ -26,10 +25,10 @@ class CustomHtmlComponent {
|
|
|
26
25
|
this._html = value;
|
|
27
26
|
}
|
|
28
27
|
_html = '';
|
|
29
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
30
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CustomHtmlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.10", type: CustomHtmlComponent, isStandalone: true, selector: "igo-custom-html", inputs: { html: "html" }, ngImport: i0, template: "<div class=\"custom-html\" [innerHTML]=\"html | sanitizeHtml\"></div>\n", styles: [":host .custom-html{padding:16px}\n"], dependencies: [{ kind: "pipe", type: SanitizeHtmlPipe, name: "sanitizeHtml" }] });
|
|
31
30
|
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CustomHtmlComponent, decorators: [{
|
|
33
32
|
type: Component,
|
|
34
33
|
args: [{ selector: 'igo-custom-html', imports: [SanitizeHtmlPipe], template: "<div class=\"custom-html\" [innerHTML]=\"html | sanitizeHtml\"></div>\n", styles: [":host .custom-html{padding:16px}\n"] }]
|
|
35
34
|
}], propDecorators: { html: [{
|
|
@@ -45,11 +44,11 @@ class IgoCustomHtmlModule {
|
|
|
45
44
|
ngModule: IgoCustomHtmlModule
|
|
46
45
|
};
|
|
47
46
|
}
|
|
48
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
49
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
50
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
47
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoCustomHtmlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
48
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: IgoCustomHtmlModule, imports: [SanitizeHtmlPipe, CustomHtmlComponent], exports: [SanitizeHtmlPipe, CustomHtmlComponent] });
|
|
49
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoCustomHtmlModule });
|
|
51
50
|
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoCustomHtmlModule, decorators: [{
|
|
53
52
|
type: NgModule,
|
|
54
53
|
args: [{
|
|
55
54
|
imports: [SanitizeHtmlPipe, CustomHtmlComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-common-custom-html.mjs","sources":["../../../packages/common/custom-html/src/custom-html.pipe.ts","../../../packages/common/custom-html/src/custom-html.component.ts","../../../packages/common/custom-html/src/custom-html.component.html","../../../packages/common/custom-html/src/custom-html.module.ts","../../../packages/common/custom-html/src/public_api.ts","../../../packages/common/custom-html/src/igo2-common-custom-html.ts"],"sourcesContent":["import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Pipe({\n name: 'sanitizeHtml'
|
|
1
|
+
{"version":3,"file":"igo2-common-custom-html.mjs","sources":["../../../packages/common/custom-html/src/custom-html.pipe.ts","../../../packages/common/custom-html/src/custom-html.component.ts","../../../packages/common/custom-html/src/custom-html.component.html","../../../packages/common/custom-html/src/custom-html.module.ts","../../../packages/common/custom-html/src/public_api.ts","../../../packages/common/custom-html/src/igo2-common-custom-html.ts"],"sourcesContent":["import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Pipe({\n name: 'sanitizeHtml'\n})\nexport class SanitizeHtmlPipe implements PipeTransform {\n private _sanitizer = inject(DomSanitizer);\n\n transform(v: string): SafeHtml {\n return this._sanitizer.bypassSecurityTrustHtml(v);\n }\n}\n","import { Component, Input } from '@angular/core';\n\nimport { SanitizeHtmlPipe } from './custom-html.pipe';\n\n@Component({\n selector: 'igo-custom-html',\n templateUrl: './custom-html.component.html',\n styleUrls: ['./custom-html.component.scss'],\n imports: [SanitizeHtmlPipe]\n})\nexport class CustomHtmlComponent {\n @Input()\n get html(): string {\n return this._html;\n }\n set html(value: string) {\n this._html = value;\n }\n private _html = '';\n}\n","<div class=\"custom-html\" [innerHTML]=\"html | sanitizeHtml\"></div>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { CustomHtmlComponent } from './custom-html.component';\nimport { SanitizeHtmlPipe } from './custom-html.pipe';\n\n/**\n * @deprecated import the components/directives directly or CUSTOM_HTML_DIRECTIVES for the set\n */\n@NgModule({\n imports: [SanitizeHtmlPipe, CustomHtmlComponent],\n exports: [SanitizeHtmlPipe, CustomHtmlComponent]\n})\nexport class IgoCustomHtmlModule {\n static forRoot(): ModuleWithProviders<IgoCustomHtmlModule> {\n return {\n ngModule: IgoCustomHtmlModule\n };\n }\n}\n","import { CustomHtmlComponent } from './custom-html.component';\nimport { SanitizeHtmlPipe } from './custom-html.pipe';\n\nexport * from './custom-html.module';\nexport * from './custom-html.component';\nexport * from './custom-html.pipe';\n\nexport const CUSTOM_HTML_DIRECTIVES = [\n SanitizeHtmlPipe,\n CustomHtmlComponent\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MAMa,gBAAgB,CAAA;AACnB,IAAA,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC;AAEzC,IAAA,SAAS,CAAC,CAAS,EAAA;QACjB,OAAO,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC;IACnD;wGALW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;sGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE;AACP,iBAAA;;;MCKY,mBAAmB,CAAA;AAC9B,IAAA,IACI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,KAAK;IACnB;IACA,IAAI,IAAI,CAAC,KAAa,EAAA;AACpB,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK;IACpB;IACQ,KAAK,GAAG,EAAE;wGARP,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAnB,mBAAmB,EAAA,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