@igo2/common 21.0.0-next.2 → 21.0.0-next.21

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 (94) hide show
  1. package/fesm2022/igo2-common-action.mjs +46 -61
  2. package/fesm2022/igo2-common-action.mjs.map +1 -1
  3. package/fesm2022/igo2-common-backdrop.mjs +11 -19
  4. package/fesm2022/igo2-common-backdrop.mjs.map +1 -1
  5. package/fesm2022/igo2-common-badge.mjs +7 -7
  6. package/fesm2022/igo2-common-badge.mjs.map +1 -1
  7. package/fesm2022/igo2-common-clickout.mjs +7 -7
  8. package/fesm2022/igo2-common-clone.mjs +7 -7
  9. package/fesm2022/igo2-common-collapsible.mjs +15 -23
  10. package/fesm2022/igo2-common-collapsible.mjs.map +1 -1
  11. package/fesm2022/igo2-common-color.mjs +8 -8
  12. package/fesm2022/igo2-common-color.mjs.map +1 -1
  13. package/fesm2022/igo2-common-confirm-dialog.mjs +12 -11
  14. package/fesm2022/igo2-common-confirm-dialog.mjs.map +1 -1
  15. package/fesm2022/igo2-common-context-menu.mjs +15 -13
  16. package/fesm2022/igo2-common-context-menu.mjs.map +1 -1
  17. package/fesm2022/igo2-common-custom-html.mjs +10 -10
  18. package/fesm2022/igo2-common-datepicker.mjs +23 -17
  19. package/fesm2022/igo2-common-datepicker.mjs.map +1 -1
  20. package/fesm2022/igo2-common-dom.mjs +10 -8
  21. package/fesm2022/igo2-common-dom.mjs.map +1 -1
  22. package/fesm2022/igo2-common-drag-drop.mjs +69 -37
  23. package/fesm2022/igo2-common-drag-drop.mjs.map +1 -1
  24. package/fesm2022/igo2-common-dynamic-component.mjs +23 -17
  25. package/fesm2022/igo2-common-dynamic-component.mjs.map +1 -1
  26. package/fesm2022/igo2-common-entity.mjs +161 -128
  27. package/fesm2022/igo2-common-entity.mjs.map +1 -1
  28. package/fesm2022/igo2-common-flexible.mjs +25 -77
  29. package/fesm2022/igo2-common-flexible.mjs.map +1 -1
  30. package/fesm2022/igo2-common-form.mjs +417 -116
  31. package/fesm2022/igo2-common-form.mjs.map +1 -1
  32. package/fesm2022/igo2-common-home-button.mjs +7 -7
  33. package/fesm2022/igo2-common-icon.mjs +7 -7
  34. package/fesm2022/igo2-common-icon.mjs.map +1 -1
  35. package/fesm2022/igo2-common-image.mjs +10 -10
  36. package/fesm2022/igo2-common-image.mjs.map +1 -1
  37. package/fesm2022/igo2-common-interactive-tour.mjs +53 -30
  38. package/fesm2022/igo2-common-interactive-tour.mjs.map +1 -1
  39. package/fesm2022/igo2-common-json-dialog.mjs +11 -11
  40. package/fesm2022/igo2-common-json-dialog.mjs.map +1 -1
  41. package/fesm2022/igo2-common-keyvalue.mjs +10 -8
  42. package/fesm2022/igo2-common-keyvalue.mjs.map +1 -1
  43. package/fesm2022/igo2-common-list.mjs +21 -16
  44. package/fesm2022/igo2-common-list.mjs.map +1 -1
  45. package/fesm2022/igo2-common-panel.mjs +8 -8
  46. package/fesm2022/igo2-common-panel.mjs.map +1 -1
  47. package/fesm2022/igo2-common-resizable-bar.mjs +8 -10
  48. package/fesm2022/igo2-common-resizable-bar.mjs.map +1 -1
  49. package/fesm2022/igo2-common-select-value-dialog.mjs +23 -13
  50. package/fesm2022/igo2-common-select-value-dialog.mjs.map +1 -1
  51. package/fesm2022/igo2-common-sidenav.mjs +7 -7
  52. package/fesm2022/igo2-common-sidenav.mjs.map +1 -1
  53. package/fesm2022/igo2-common-spinner.mjs +11 -11
  54. package/fesm2022/igo2-common-spinner.mjs.map +1 -1
  55. package/fesm2022/igo2-common-stop-propagation.mjs +10 -10
  56. package/fesm2022/igo2-common-table.mjs +59 -66
  57. package/fesm2022/igo2-common-table.mjs.map +1 -1
  58. package/fesm2022/igo2-common-timepicker.mjs +11 -12
  59. package/fesm2022/igo2-common-timepicker.mjs.map +1 -1
  60. package/fesm2022/igo2-common-tool.mjs +32 -29
  61. package/fesm2022/igo2-common-tool.mjs.map +1 -1
  62. package/fesm2022/igo2-common-widget.mjs +17 -17
  63. package/fesm2022/igo2-common-widget.mjs.map +1 -1
  64. package/fesm2022/igo2-common-workspace.mjs +28 -32
  65. package/fesm2022/igo2-common-workspace.mjs.map +1 -1
  66. package/package.json +3 -3
  67. package/style/style.css +1 -1
  68. package/types/igo2-common-action.d.ts +2 -5
  69. package/types/igo2-common-backdrop.d.ts +2 -4
  70. package/types/igo2-common-badge.d.ts +4 -4
  71. package/types/igo2-common-collapsible.d.ts +2 -4
  72. package/types/igo2-common-confirm-dialog.d.ts +1 -1
  73. package/types/igo2-common-context-menu.d.ts +2 -2
  74. package/types/igo2-common-datepicker.d.ts +9 -9
  75. package/types/igo2-common-drag-drop.d.ts +14 -12
  76. package/types/igo2-common-dynamic-component.d.ts +3 -3
  77. package/types/igo2-common-entity.d.ts +63 -59
  78. package/types/igo2-common-flexible.d.ts +14 -28
  79. package/types/igo2-common-form.d.ts +213 -74
  80. package/types/igo2-common-icon.d.ts +1 -1
  81. package/types/igo2-common-interactive-tour.d.ts +6 -6
  82. package/types/igo2-common-json-dialog.d.ts +4 -4
  83. package/types/igo2-common-keyvalue.d.ts +4 -1
  84. package/types/igo2-common-list.d.ts +7 -7
  85. package/types/igo2-common-panel.d.ts +1 -1
  86. package/types/igo2-common-resizable-bar.d.ts +4 -5
  87. package/types/igo2-common-select-value-dialog.d.ts +2 -2
  88. package/types/igo2-common-sidenav.d.ts +2 -2
  89. package/types/igo2-common-spinner.d.ts +1 -1
  90. package/types/igo2-common-table.d.ts +16 -17
  91. package/types/igo2-common-timepicker.d.ts +3 -3
  92. package/types/igo2-common-tool.d.ts +7 -8
  93. package/types/igo2-common-widget.d.ts +7 -7
  94. package/types/igo2-common-workspace.d.ts +12 -12
@@ -11,11 +11,11 @@ import { combineLatest } from 'rxjs';
11
11
  import { startWith } from 'rxjs/operators';
12
12
 
13
13
  class TimepickerComponent {
14
- value = input(undefined, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
14
+ value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
15
15
  hourInputLabel = input('Hour', ...(ngDevMode ? [{ debugName: "hourInputLabel" }] : /* istanbul ignore next */ []));
16
16
  minuteInputLabel = input('Minute', ...(ngDevMode ? [{ debugName: "minuteInputLabel" }] : /* istanbul ignore next */ []));
17
- minHour = input(undefined, ...(ngDevMode ? [{ debugName: "minHour" }] : /* istanbul ignore next */ []));
18
- maxHour = input(undefined, ...(ngDevMode ? [{ debugName: "maxHour" }] : /* istanbul ignore next */ []));
17
+ minHour = input(...(ngDevMode ? [undefined, { debugName: "minHour" }] : /* istanbul ignore next */ []));
18
+ maxHour = input(...(ngDevMode ? [undefined, { debugName: "maxHour" }] : /* istanbul ignore next */ []));
19
19
  set disabled(value) {
20
20
  this._disabled = value;
21
21
  this.setDisabledState();
@@ -52,14 +52,13 @@ class TimepickerComponent {
52
52
  const date = resolveDate(this.value() ?? new Date());
53
53
  const hours = date.getHours();
54
54
  const minutes = date.getMinutes();
55
- this.hourFormControl = new FormControl({
56
- value: hours,
57
- disabled: this.disabled || isTimeFrame(this.value())
55
+ this.hourFormControl = new FormControl(hours, {
56
+ nonNullable: true
58
57
  });
59
- this.minuteFormControl = new FormControl({
60
- value: minutes,
61
- disabled: this.disabled || isTimeFrame(this.value())
58
+ this.minuteFormControl = new FormControl(minutes, {
59
+ nonNullable: true
62
60
  });
61
+ this.setDisabledState();
63
62
  combineLatest([
64
63
  this.hourFormControl.valueChanges.pipe(startWith(hours)),
65
64
  this.minuteFormControl.valueChanges.pipe(startWith(minutes))
@@ -82,10 +81,10 @@ class TimepickerComponent {
82
81
  ? control.disable({ emitEvent: false })
83
82
  : control.enable({ emitEvent: false });
84
83
  }
85
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: TimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
86
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: TimepickerComponent, isStandalone: true, selector: "igo-timepicker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, hourInputLabel: { classPropertyName: "hourInputLabel", publicName: "hourInputLabel", isSignal: true, isRequired: false, transformFunction: null }, minuteInputLabel: { classPropertyName: "minuteInputLabel", publicName: "minuteInputLabel", isSignal: true, isRequired: false, transformFunction: null }, minHour: { classPropertyName: "minHour", publicName: "minHour", isSignal: true, isRequired: false, transformFunction: null }, maxHour: { classPropertyName: "maxHour", publicName: "maxHour", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<mat-form-field class=\"hour-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ hourInputLabel() }}</mat-label>\n <mat-select name=\"hour\" [formControl]=\"hourFormControl\">\n @for (hour of hours; track hour) {\n <mat-option [value]=\"hour\">\n {{ hour }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n<mat-form-field class=\"minute-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ minuteInputLabel() }}</mat-label>\n <mat-select name=\"minute\" [formControl]=\"minuteFormControl\">\n @for (minute of minutes; track minute) {\n <mat-option [value]=\"minute\">\n {{ minute }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n", styles: [":host{display:flex;gap:8px;align-items:center}:host .hour-input,:host .minute-input{width:84px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] });
84
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: TimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
85
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: TimepickerComponent, isStandalone: true, selector: "igo-timepicker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, hourInputLabel: { classPropertyName: "hourInputLabel", publicName: "hourInputLabel", isSignal: true, isRequired: false, transformFunction: null }, minuteInputLabel: { classPropertyName: "minuteInputLabel", publicName: "minuteInputLabel", isSignal: true, isRequired: false, transformFunction: null }, minHour: { classPropertyName: "minHour", publicName: "minHour", isSignal: true, isRequired: false, transformFunction: null }, maxHour: { classPropertyName: "maxHour", publicName: "maxHour", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<mat-form-field class=\"hour-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ hourInputLabel() }}</mat-label>\n <mat-select name=\"hour\" [formControl]=\"hourFormControl\">\n @for (hour of hours; track hour) {\n <mat-option [value]=\"hour\">\n {{ hour }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n<mat-form-field class=\"minute-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ minuteInputLabel() }}</mat-label>\n <mat-select name=\"minute\" [formControl]=\"minuteFormControl\">\n @for (minute of minutes; track minute) {\n <mat-option [value]=\"minute\">\n {{ minute }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n", styles: [":host{display:flex;gap:8px;align-items:center}:host .hour-input,:host .minute-input{width:84px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] });
87
86
  }
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: TimepickerComponent, decorators: [{
87
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: TimepickerComponent, decorators: [{
89
88
  type: Component,
90
89
  args: [{ selector: 'igo-timepicker', imports: [
91
90
  FormsModule,
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-common-timepicker.mjs","sources":["../../../packages/common/timepicker/src/timepicker.component.ts","../../../packages/common/timepicker/src/timepicker.component.html","../../../packages/common/timepicker/src/igo2-common-timepicker.ts"],"sourcesContent":["import { Component, Input, OnInit, input, output } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { TimeFrame, isTimeFrame, resolveDate } from '@igo2/utils';\n\nimport { combineLatest } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\n\n@Component({\n selector: 'igo-timepicker',\n templateUrl: './timepicker.component.html',\n styleUrls: ['./timepicker.component.scss'],\n imports: [\n FormsModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n MatSelectModule\n ]\n})\nexport class TimepickerComponent implements OnInit {\n readonly value = input<Date | TimeFrame>(undefined);\n readonly hourInputLabel = input<string>('Hour');\n readonly minuteInputLabel = input<string>('Minute');\n\n readonly minHour = input<number | undefined>(undefined);\n readonly maxHour = input<number | undefined>(undefined);\n\n @Input()\n set disabled(value: boolean) {\n this._disabled = value;\n this.setDisabledState();\n }\n get disabled(): boolean {\n return this._disabled;\n }\n private _disabled = false;\n\n /** interval in minutes*/\n readonly interval = input<number>(1);\n readonly valueChange = output<{\n hour: number;\n minute: number;\n }>();\n\n hourFormControl: FormControl<number>;\n minuteFormControl: FormControl<number>;\n\n get hours(): number[] {\n const step = this.interval() >= 60 ? this.interval() / 60 : 1;\n const fullHours = Array.from(\n { length: Math.ceil(24 / step) },\n (_, i) => i * step\n );\n\n return fullHours.filter((hour) => {\n const minHour = this.minHour();\n if (minHour !== undefined && hour < minHour) return false;\n const maxHour = this.maxHour();\n if (maxHour !== undefined && hour > maxHour) return false;\n return true;\n });\n }\n\n get minutes(): number[] {\n const minuteStep = this.interval() < 60 ? this.interval() : 0;\n return minuteStep > 0\n ? Array.from(\n { length: Math.ceil(60 / minuteStep) },\n (_, i) => i * minuteStep\n )\n : [0];\n }\n\n ngOnInit(): void {\n const date = resolveDate(this.value() ?? new Date());\n const hours = date.getHours();\n const minutes = date.getMinutes();\n this.hourFormControl = new FormControl({\n value: hours,\n disabled: this.disabled || isTimeFrame(this.value())\n });\n this.minuteFormControl = new FormControl({\n value: minutes,\n disabled: this.disabled || isTimeFrame(this.value())\n });\n\n combineLatest([\n this.hourFormControl.valueChanges.pipe(startWith(hours)),\n this.minuteFormControl.valueChanges.pipe(startWith(minutes))\n ]).subscribe(([hour, minute]) => this.valueChange.emit({ hour, minute }));\n }\n\n reset(value: Date | TimeFrame): void {\n const date = resolveDate(value);\n this.hourFormControl.setValue(date.getHours(), { emitEvent: false });\n this.minuteFormControl.setValue(date.getMinutes(), { emitEvent: false });\n }\n\n private setDisabledState(): void {\n if (!this.hourFormControl || !this.minuteFormControl) return;\n const disabled = this.disabled || isTimeFrame(this.value());\n this.toggleDisabled(this.hourFormControl, disabled);\n this.toggleDisabled(this.minuteFormControl, disabled);\n }\n\n private toggleDisabled(control: FormControl, disabled: boolean): void {\n disabled\n ? control.disable({ emitEvent: false })\n : control.enable({ emitEvent: false });\n }\n}\n","<mat-form-field class=\"hour-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ hourInputLabel() }}</mat-label>\n <mat-select name=\"hour\" [formControl]=\"hourFormControl\">\n @for (hour of hours; track hour) {\n <mat-option [value]=\"hour\">\n {{ hour }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n<mat-form-field class=\"minute-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ minuteInputLabel() }}</mat-label>\n <mat-select name=\"minute\" [formControl]=\"minuteFormControl\">\n @for (minute of minutes; track minute) {\n <mat-option [value]=\"minute\">\n {{ minute }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAqBa,mBAAmB,CAAA;AACrB,IAAA,KAAK,GAAG,KAAK,CAAmB,SAAS,4EAAC;AAC1C,IAAA,cAAc,GAAG,KAAK,CAAS,MAAM,qFAAC;AACtC,IAAA,gBAAgB,GAAG,KAAK,CAAS,QAAQ,uFAAC;AAE1C,IAAA,OAAO,GAAG,KAAK,CAAqB,SAAS,8EAAC;AAC9C,IAAA,OAAO,GAAG,KAAK,CAAqB,SAAS,8EAAC;IAEvD,IACI,QAAQ,CAAC,KAAc,EAAA;AACzB,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;QACtB,IAAI,CAAC,gBAAgB,EAAE;IACzB;AACA,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS;IACvB;IACQ,SAAS,GAAG,KAAK;;AAGhB,IAAA,QAAQ,GAAG,KAAK,CAAS,CAAC,+EAAC;IAC3B,WAAW,GAAG,MAAM,EAGzB;AAEJ,IAAA,eAAe;AACf,IAAA,iBAAiB;AAEjB,IAAA,IAAI,KAAK,GAAA;QACP,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,CAAC;AAC7D,QAAA,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAC1B,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,EAChC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CACnB;AAED,QAAA,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,KAAI;AAC/B,YAAA,MAAM,OA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BAAA,EAAA,IAAA,EAAA,YAAA,EAAA,0BAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,IAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAGN,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAX/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,OAAA,EAGjB;wBACP,WAAW;wBACX,kBAAkB;wBAClB,mBAAmB;wBACnB;AACD,qBAAA,EAAA,QAAA,EAAA,8rBAAA,EAAA,MAAA,EAAA,CAAA,mGAAA,CAAA,EAAA;;sBAUA;;;AE7BH;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-common-timepicker.mjs","sources":["../../../packages/common/timepicker/src/timepicker.component.ts","../../../packages/common/timepicker/src/timepicker.component.html","../../../packages/common/timepicker/src/igo2-common-timepicker.ts"],"sourcesContent":["import { Component, Input, OnInit, input, output } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { TimeFrame, isTimeFrame, resolveDate } from '@igo2/utils';\n\nimport { combineLatest } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\n\n@Component({\n selector: 'igo-timepicker',\n templateUrl: './timepicker.component.html',\n styleUrls: ['./timepicker.component.scss'],\n imports: [\n FormsModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n MatSelectModule\n ]\n})\nexport class TimepickerComponent implements OnInit {\n readonly value = input<Date | TimeFrame>();\n readonly hourInputLabel = input<string>('Hour');\n readonly minuteInputLabel = input<string>('Minute');\n\n readonly minHour = input<number>();\n readonly maxHour = input<number>();\n\n @Input()\n set disabled(value: boolean) {\n this._disabled = value;\n this.setDisabledState();\n }\n get disabled(): boolean {\n return this._disabled;\n }\n private _disabled = false;\n\n /** interval in minutes*/\n readonly interval = input<number>(1);\n readonly valueChange = output<{\n hour: number;\n minute: number;\n }>();\n\n hourFormControl!: FormControl<number>;\n minuteFormControl!: FormControl<number>;\n\n get hours(): number[] {\n const step = this.interval() >= 60 ? this.interval() / 60 : 1;\n const fullHours = Array.from(\n { length: Math.ceil(24 / step) },\n (_, i) => i * step\n );\n\n return fullHours.filter((hour) => {\n const minHour = this.minHour();\n if (minHour !== undefined && hour < minHour) return false;\n const maxHour = this.maxHour();\n if (maxHour !== undefined && hour > maxHour) return false;\n return true;\n });\n }\n\n get minutes(): number[] {\n const minuteStep = this.interval() < 60 ? this.interval() : 0;\n return minuteStep > 0\n ? Array.from(\n { length: Math.ceil(60 / minuteStep) },\n (_, i) => i * minuteStep\n )\n : [0];\n }\n\n ngOnInit(): void {\n const date = resolveDate(this.value() ?? new Date())!;\n const hours = date.getHours();\n const minutes = date.getMinutes();\n this.hourFormControl = new FormControl(hours, {\n nonNullable: true\n });\n this.minuteFormControl = new FormControl(minutes, {\n nonNullable: true\n });\n this.setDisabledState();\n\n combineLatest([\n this.hourFormControl.valueChanges.pipe(startWith(hours)),\n this.minuteFormControl.valueChanges.pipe(startWith(minutes))\n ]).subscribe(([hour, minute]) => this.valueChange.emit({ hour, minute }));\n }\n\n reset(value: Date | TimeFrame): void {\n const date = resolveDate(value)!;\n this.hourFormControl.setValue(date.getHours(), { emitEvent: false });\n this.minuteFormControl.setValue(date.getMinutes(), { emitEvent: false });\n }\n\n private setDisabledState(): void {\n if (!this.hourFormControl || !this.minuteFormControl) return;\n const disabled = this.disabled || isTimeFrame(this.value() as any);\n this.toggleDisabled(this.hourFormControl, disabled);\n this.toggleDisabled(this.minuteFormControl, disabled);\n }\n\n private toggleDisabled(control: FormControl, disabled: boolean): void {\n disabled\n ? control.disable({ emitEvent: false })\n : control.enable({ emitEvent: false });\n }\n}\n","<mat-form-field class=\"hour-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ hourInputLabel() }}</mat-label>\n <mat-select name=\"hour\" [formControl]=\"hourFormControl\">\n @for (hour of hours; track hour) {\n <mat-option [value]=\"hour\">\n {{ hour }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n<mat-form-field class=\"minute-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ minuteInputLabel() }}</mat-label>\n <mat-select name=\"minute\" [formControl]=\"minuteFormControl\">\n @for (minute of minutes; track minute) {\n <mat-option [value]=\"minute\">\n {{ minute }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAqBa,mBAAmB,CAAA;IACrB,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAoB;AACjC,IAAA,cAAc,GAAG,KAAK,CAAS,MAAM,qFAAC;AACtC,IAAA,gBAAgB,GAAG,KAAK,CAAS,QAAQ,uFAAC;IAE1C,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACzB,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IAElC,IACI,QAAQ,CAAC,KAAc,EAAA;AACzB,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;QACtB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BAUA;;;AE7BH;;AAEG;;;;"}
@@ -12,7 +12,6 @@ import { trigger, state, style, transition, animate } from '@angular/animations'
12
12
  * Service where all available tools and their component are registered.
13
13
  */
14
14
  class Toolbox {
15
- options;
16
15
  /**
17
16
  * Observable of the active tool
18
17
  */
@@ -41,15 +40,14 @@ class Toolbox {
41
40
  return this.store.entities$;
42
41
  }
43
42
  constructor(options = {}) {
44
- this.options = options;
45
- this.setToolbar(options.toolbar);
43
+ this.setToolbar(options.toolbar || []);
46
44
  this.initStore();
47
45
  }
48
46
  /**
49
47
  * Destroy the toolbox
50
48
  */
51
49
  destroy() {
52
- this.activeTool$$.unsubscribe();
50
+ this.activeTool$$?.unsubscribe();
53
51
  this.store.destroy();
54
52
  }
55
53
  /**
@@ -161,7 +159,7 @@ class Toolbox {
161
159
  getKey: (entity) => entity.name
162
160
  });
163
161
  this.activeTool$$ = this.store.stateView
164
- .firstBy$((record) => record.state.active === true)
162
+ .firstBy$((record) => record?.state?.active === true)
165
163
  .subscribe((record) => {
166
164
  if (record === undefined) {
167
165
  this.setActiveTool(undefined);
@@ -228,10 +226,10 @@ class ToolService {
228
226
  getTools() {
229
227
  return Object.values(ToolService.tools);
230
228
  }
231
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ToolService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
232
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ToolService, providedIn: 'root' });
229
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ToolService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
230
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ToolService, providedIn: 'root' });
233
231
  }
234
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ToolService, decorators: [{
232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ToolService, decorators: [{
235
233
  type: Injectable,
236
234
  args: [{
237
235
  providedIn: 'root'
@@ -300,7 +298,7 @@ class ToolboxComponent {
300
298
  /**
301
299
  * Toolbox
302
300
  */
303
- toolbox = input(undefined, ...(ngDevMode ? [{ debugName: "toolbox" }] : /* istanbul ignore next */ []));
301
+ toolbox = input.required(...(ngDevMode ? [{ debugName: "toolbox" }] : /* istanbul ignore next */ []));
304
302
  /**
305
303
  * Whether the toolbox should animate the first tool entering
306
304
  */
@@ -326,16 +324,17 @@ class ToolboxComponent {
326
324
  * @internal
327
325
  */
328
326
  ngOnInit() {
329
- this.toolbar$$ = this.toolbox().toolbar$.subscribe((toolbar) => this.onToolbarChange(toolbar));
330
- this.activeTool$$ = this.toolbox().activeTool$.subscribe((tool) => this.onActiveToolChange(tool));
327
+ const toolbox = this.toolbox();
328
+ this.toolbar$$ = toolbox.toolbar$.subscribe((toolbar) => this.onToolbarChange(toolbar));
329
+ this.activeTool$$ = toolbox.activeTool$.subscribe((tool) => this.onActiveToolChange(tool));
331
330
  }
332
331
  /**
333
332
  * Unsubscribe to the active tool and destroy the action store
334
333
  * @internal
335
334
  */
336
335
  ngOnDestroy() {
337
- this.toolbar$$.unsubscribe();
338
- this.activeTool$$.unsubscribe();
336
+ this.toolbar$$?.unsubscribe();
337
+ this.activeTool$$?.unsubscribe();
339
338
  this.actionStore.destroy();
340
339
  }
341
340
  /**
@@ -403,7 +402,11 @@ class ToolboxComponent {
403
402
  */
404
403
  setToolbar(toolbar) {
405
404
  const actions = toolbar.reduce((acc, toolName) => {
406
- const tool = this.toolbox().getTool(toolName);
405
+ const toolbox = this.toolbox();
406
+ if (!toolbox) {
407
+ return acc;
408
+ }
409
+ const tool = toolbox.getTool(toolName);
407
410
  if (tool === undefined) {
408
411
  return acc;
409
412
  }
@@ -412,12 +415,12 @@ class ToolboxComponent {
412
415
  title: tool.title,
413
416
  icon: tool.icon,
414
417
  tooltip: tool.tooltip,
415
- args: [tool, this.toolbox()],
418
+ args: [tool, toolbox],
416
419
  handler: (_tool, _toolbox) => {
417
420
  _toolbox.activateTool(_tool.name);
418
421
  },
419
422
  ngClass: (_tool) => {
420
- return this.toolbox().activeTool$.pipe(map((activeTool) => {
423
+ return toolbox.activeTool$.pipe(map((activeTool) => {
421
424
  let toolActivated = false;
422
425
  if (activeTool !== undefined && _tool.name === activeTool.name) {
423
426
  toolActivated = true;
@@ -461,13 +464,13 @@ class ToolboxComponent {
461
464
  this.animating$$.unsubscribe();
462
465
  }
463
466
  }
464
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ToolboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
465
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: ToolboxComponent, isStandalone: true, selector: "igo-toolbox", inputs: { toolbox: { classPropertyName: "toolbox", publicName: "toolbox", isSignal: true, isRequired: false, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.color-grey": "this.classColorGrey", "class.color-primary": "this.classColorPrimary" } }, ngImport: i0, template: "@if ((toolbar$ | async).length > 0) {\n <igo-actionbar\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n [withTitle]=\"toolbarWithTitle$ | async\"\n [withTooltip]=\"(toolbarWithTitle$ | async) === false\"\n [scrollActive]=\"toolbarWithTitle$ | async\"\n [horizontal]=\"false\"\n />\n}\n\n@if (activeTool$ | async; as tool) {\n <div\n class=\"igo-tool-container\"\n [class]=\"{\n 'igo-tool-container-with-toolbar': !actionStore.empty,\n 'igo-tool-container-with-animation': animate()\n }\"\n [@toolSlideInOut]=\"animation$ | async\"\n (@toolSlideInOut.start)=\"onAnimationStart()\"\n (@toolSlideInOut.done)=\"onAnimationComplete()\"\n >\n <igo-dynamic-outlet\n [component]=\"tool.component\"\n [inputs]=\"getToolInputs(tool)\"\n />\n </div>\n}\n", styles: [":host{display:block;position:relative;overflow:hidden;width:100%;height:100%}:host .igo-tool-container{position:absolute;inset:0;margin-bottom:0}:host .igo-tool-container-with-animation{transform:translate3d(100%,0,0)}:host .igo-tool-container-with-toolbar{left:50px}:host igo-actionbar{height:100%}:host igo-actionbar.with-title{width:100%;overflow:auto}:host igo-actionbar:not(.with-title){width:48px;overflow:hidden;-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd}@media only screen and (orientation:portrait)and (max-width:599px),only screen and (orientation:landscape)and (max-width:959px){:host igo-actionbar:not(.with-title){overflow:auto}}:host igo-dynamic-outlet{overflow:auto}:host.color-primary igo-actionbar:not(.with-title){color:var(--mat-sys-on-primary);background-color:var(--mat-sys-on-primary-container)}:host.color-primary igo-actionbar:not(.with-title) ::ng-deep button{color:var(--mat-sys-on-primary)}:host.color-primary igo-actionbar:not(.with-title) #lowChevron,:host.color-primary igo-actionbar:not(.with-title) #topChevron{background-color:var(--mat-sys-primary-container);color:#fff}:host ::ng-deep .color-grey>igo-actionbar:not(.with-title){box-shadow:unset;background-color:#737475}:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) #lowChevron,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) #topChevron{background-color:#737475;color:#fff}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar{color:#fff}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar:hover,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar:hover{color:#000}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.tool-activated,:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.children-tool-activated,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.tool-activated,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.children-tool-activated{color:var(--mat-sys-on-primary);background-color:var(--mat-sys-on-primary-container);color:#000}:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list>#lowChevron:hover,:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list>#topChevron:hover{background-color:var(--mat-sys-secondary-container);color:#000}:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list mat-list-item{color:var(--mat-sys-on-primary-container)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item:hover{color:var(--mat-sys-on-primary-container);background-color:var(--mat-sys-primary-container)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item:hover button{color:var(--mat-sys-on-primary-container)!important}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.tool-activated,:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.children-tool-activated{color:var(--mat-sys-on-background);background-color:var(--mat-sys-on-primary)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.tool-activated button,:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.children-tool-activated button{color:var(--mat-sys-on-background)!important;cursor:default}\n"], dependencies: [{ kind: "component", type: ActionbarComponent, selector: "igo-actionbar", inputs: ["store", "mode", "withToggleButton", "horizontal", "color", "iconColor", "withTitle", "withTooltip", "scrollActive", "withIcon", "icon", "xPosition", "yPosition", "overlayClass"] }, { kind: "component", type: DynamicOutletComponent, selector: "igo-dynamic-outlet", inputs: ["component", "inputs", "subscribers"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], animations: [toolSlideInOut()], changeDetection: i0.ChangeDetectionStrategy.OnPush });
467
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ToolboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
468
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: ToolboxComponent, isStandalone: true, selector: "igo-toolbox", inputs: { toolbox: { classPropertyName: "toolbox", publicName: "toolbox", isSignal: true, isRequired: true, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.color-grey": "this.classColorGrey", "class.color-primary": "this.classColorPrimary" } }, ngImport: i0, template: "@let toolbar = toolbar$ | async;\n@if (toolbar !== null && toolbar.length > 0) {\n <igo-actionbar\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n [withTitle]=\"(toolbarWithTitle$ | async)!\"\n [withTooltip]=\"(toolbarWithTitle$ | async) === false\"\n [scrollActive]=\"(toolbarWithTitle$ | async)!\"\n [horizontal]=\"false\"\n />\n}\n\n@if (activeTool$ | async; as tool) {\n <div\n class=\"igo-tool-container\"\n [class]=\"{\n 'igo-tool-container-with-toolbar': !actionStore.empty,\n 'igo-tool-container-with-animation': animate()\n }\"\n [@toolSlideInOut]=\"animation$ | async\"\n (@toolSlideInOut.start)=\"onAnimationStart()\"\n (@toolSlideInOut.done)=\"onAnimationComplete()\"\n >\n <igo-dynamic-outlet\n [component]=\"tool.component\"\n [inputs]=\"getToolInputs(tool)\"\n />\n </div>\n}\n", styles: [":host{display:block;position:relative;overflow:hidden;width:100%;height:100%}:host .igo-tool-container{position:absolute;inset:0;margin-bottom:0}:host .igo-tool-container-with-animation{transform:translate3d(100%,0,0)}:host .igo-tool-container-with-toolbar{left:50px}:host igo-actionbar{height:100%}:host igo-actionbar.with-title{width:100%;overflow:auto}:host igo-actionbar:not(.with-title){width:48px;overflow:hidden;-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd}@media only screen and (orientation:portrait)and (max-width:599px),only screen and (orientation:landscape)and (max-width:959px){:host igo-actionbar:not(.with-title){overflow:auto}}:host igo-dynamic-outlet{overflow:auto}:host.color-primary igo-actionbar:not(.with-title){color:var(--mat-sys-on-primary);background-color:var(--mat-sys-on-primary-container)}:host.color-primary igo-actionbar:not(.with-title) ::ng-deep button{color:var(--mat-sys-on-primary)}:host.color-primary igo-actionbar:not(.with-title) #lowChevron,:host.color-primary igo-actionbar:not(.with-title) #topChevron{background-color:var(--mat-sys-primary-container);color:#fff}:host ::ng-deep .color-grey>igo-actionbar:not(.with-title){box-shadow:unset;background-color:#737475}:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) #lowChevron,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) #topChevron{background-color:#737475;color:#fff}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar{color:#fff}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar:hover,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar:hover{color:#000}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.tool-activated,:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.children-tool-activated,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.tool-activated,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.children-tool-activated{color:var(--mat-sys-on-primary);background-color:var(--mat-sys-on-primary-container);color:#000}:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list>#lowChevron:hover,:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list>#topChevron:hover{background-color:var(--mat-sys-secondary-container);color:#000}:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list mat-list-item{color:var(--mat-sys-on-primary-container)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item:hover{color:var(--mat-sys-on-primary-container);background-color:var(--mat-sys-primary-container)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item:hover button{color:var(--mat-sys-on-primary-container)!important}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.tool-activated,:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.children-tool-activated{color:var(--mat-sys-on-background);background-color:var(--mat-sys-on-primary)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.tool-activated button,:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.children-tool-activated button{color:var(--mat-sys-on-background)!important;cursor:default}\n"], dependencies: [{ kind: "component", type: ActionbarComponent, selector: "igo-actionbar", inputs: ["store", "mode", "withToggleButton", "horizontal", "color", "iconColor", "withTitle", "withTooltip", "scrollActive", "withIcon", "icon", "xPosition", "yPosition", "overlayClass"] }, { kind: "component", type: DynamicOutletComponent, selector: "igo-dynamic-outlet", inputs: ["component", "inputs", "subscribers"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], animations: [toolSlideInOut()], changeDetection: i0.ChangeDetectionStrategy.OnPush });
466
469
  }
467
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ToolboxComponent, decorators: [{
470
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ToolboxComponent, decorators: [{
468
471
  type: Component,
469
- args: [{ selector: 'igo-toolbox', animations: [toolSlideInOut()], changeDetection: ChangeDetectionStrategy.OnPush, imports: [ActionbarComponent, DynamicOutletComponent, AsyncPipe], template: "@if ((toolbar$ | async).length > 0) {\n <igo-actionbar\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n [withTitle]=\"toolbarWithTitle$ | async\"\n [withTooltip]=\"(toolbarWithTitle$ | async) === false\"\n [scrollActive]=\"toolbarWithTitle$ | async\"\n [horizontal]=\"false\"\n />\n}\n\n@if (activeTool$ | async; as tool) {\n <div\n class=\"igo-tool-container\"\n [class]=\"{\n 'igo-tool-container-with-toolbar': !actionStore.empty,\n 'igo-tool-container-with-animation': animate()\n }\"\n [@toolSlideInOut]=\"animation$ | async\"\n (@toolSlideInOut.start)=\"onAnimationStart()\"\n (@toolSlideInOut.done)=\"onAnimationComplete()\"\n >\n <igo-dynamic-outlet\n [component]=\"tool.component\"\n [inputs]=\"getToolInputs(tool)\"\n />\n </div>\n}\n", styles: [":host{display:block;position:relative;overflow:hidden;width:100%;height:100%}:host .igo-tool-container{position:absolute;inset:0;margin-bottom:0}:host .igo-tool-container-with-animation{transform:translate3d(100%,0,0)}:host .igo-tool-container-with-toolbar{left:50px}:host igo-actionbar{height:100%}:host igo-actionbar.with-title{width:100%;overflow:auto}:host igo-actionbar:not(.with-title){width:48px;overflow:hidden;-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd}@media only screen and (orientation:portrait)and (max-width:599px),only screen and (orientation:landscape)and (max-width:959px){:host igo-actionbar:not(.with-title){overflow:auto}}:host igo-dynamic-outlet{overflow:auto}:host.color-primary igo-actionbar:not(.with-title){color:var(--mat-sys-on-primary);background-color:var(--mat-sys-on-primary-container)}:host.color-primary igo-actionbar:not(.with-title) ::ng-deep button{color:var(--mat-sys-on-primary)}:host.color-primary igo-actionbar:not(.with-title) #lowChevron,:host.color-primary igo-actionbar:not(.with-title) #topChevron{background-color:var(--mat-sys-primary-container);color:#fff}:host ::ng-deep .color-grey>igo-actionbar:not(.with-title){box-shadow:unset;background-color:#737475}:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) #lowChevron,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) #topChevron{background-color:#737475;color:#fff}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar{color:#fff}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar:hover,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar:hover{color:#000}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.tool-activated,:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.children-tool-activated,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.tool-activated,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.children-tool-activated{color:var(--mat-sys-on-primary);background-color:var(--mat-sys-on-primary-container);color:#000}:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list>#lowChevron:hover,:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list>#topChevron:hover{background-color:var(--mat-sys-secondary-container);color:#000}:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list mat-list-item{color:var(--mat-sys-on-primary-container)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item:hover{color:var(--mat-sys-on-primary-container);background-color:var(--mat-sys-primary-container)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item:hover button{color:var(--mat-sys-on-primary-container)!important}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.tool-activated,:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.children-tool-activated{color:var(--mat-sys-on-background);background-color:var(--mat-sys-on-primary)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.tool-activated button,:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.children-tool-activated button{color:var(--mat-sys-on-background)!important;cursor:default}\n"] }]
470
- }], propDecorators: { toolbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "toolbox", required: false }] }], animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], classColorGrey: [{
472
+ args: [{ selector: 'igo-toolbox', animations: [toolSlideInOut()], changeDetection: ChangeDetectionStrategy.OnPush, imports: [ActionbarComponent, DynamicOutletComponent, AsyncPipe], template: "@let toolbar = toolbar$ | async;\n@if (toolbar !== null && toolbar.length > 0) {\n <igo-actionbar\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n [withTitle]=\"(toolbarWithTitle$ | async)!\"\n [withTooltip]=\"(toolbarWithTitle$ | async) === false\"\n [scrollActive]=\"(toolbarWithTitle$ | async)!\"\n [horizontal]=\"false\"\n />\n}\n\n@if (activeTool$ | async; as tool) {\n <div\n class=\"igo-tool-container\"\n [class]=\"{\n 'igo-tool-container-with-toolbar': !actionStore.empty,\n 'igo-tool-container-with-animation': animate()\n }\"\n [@toolSlideInOut]=\"animation$ | async\"\n (@toolSlideInOut.start)=\"onAnimationStart()\"\n (@toolSlideInOut.done)=\"onAnimationComplete()\"\n >\n <igo-dynamic-outlet\n [component]=\"tool.component\"\n [inputs]=\"getToolInputs(tool)\"\n />\n </div>\n}\n", styles: [":host{display:block;position:relative;overflow:hidden;width:100%;height:100%}:host .igo-tool-container{position:absolute;inset:0;margin-bottom:0}:host .igo-tool-container-with-animation{transform:translate3d(100%,0,0)}:host .igo-tool-container-with-toolbar{left:50px}:host igo-actionbar{height:100%}:host igo-actionbar.with-title{width:100%;overflow:auto}:host igo-actionbar:not(.with-title){width:48px;overflow:hidden;-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd}@media only screen and (orientation:portrait)and (max-width:599px),only screen and (orientation:landscape)and (max-width:959px){:host igo-actionbar:not(.with-title){overflow:auto}}:host igo-dynamic-outlet{overflow:auto}:host.color-primary igo-actionbar:not(.with-title){color:var(--mat-sys-on-primary);background-color:var(--mat-sys-on-primary-container)}:host.color-primary igo-actionbar:not(.with-title) ::ng-deep button{color:var(--mat-sys-on-primary)}:host.color-primary igo-actionbar:not(.with-title) #lowChevron,:host.color-primary igo-actionbar:not(.with-title) #topChevron{background-color:var(--mat-sys-primary-container);color:#fff}:host ::ng-deep .color-grey>igo-actionbar:not(.with-title){box-shadow:unset;background-color:#737475}:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) #lowChevron,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) #topChevron{background-color:#737475;color:#fff}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar{color:#fff}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar:hover,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar:hover{color:#000}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.tool-activated,:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.children-tool-activated,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.tool-activated,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.children-tool-activated{color:var(--mat-sys-on-primary);background-color:var(--mat-sys-on-primary-container);color:#000}:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list>#lowChevron:hover,:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list>#topChevron:hover{background-color:var(--mat-sys-secondary-container);color:#000}:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list mat-list-item{color:var(--mat-sys-on-primary-container)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item:hover{color:var(--mat-sys-on-primary-container);background-color:var(--mat-sys-primary-container)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item:hover button{color:var(--mat-sys-on-primary-container)!important}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.tool-activated,:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.children-tool-activated{color:var(--mat-sys-on-background);background-color:var(--mat-sys-on-primary)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.tool-activated button,:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.children-tool-activated button{color:var(--mat-sys-on-background)!important;cursor:default}\n"] }]
473
+ }], propDecorators: { toolbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "toolbox", required: true }] }], animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], classColorGrey: [{
471
474
  type: HostBinding,
472
475
  args: ['class.color-grey']
473
476
  }], classColorPrimary: [{
@@ -479,11 +482,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
479
482
  * @deprecated import the ToolboxComponent directly
480
483
  */
481
484
  class IgoToolboxModule {
482
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoToolboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
483
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: IgoToolboxModule, imports: [ToolboxComponent], exports: [ToolboxComponent] });
484
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoToolboxModule, imports: [ToolboxComponent] });
485
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoToolboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
486
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.19", ngImport: i0, type: IgoToolboxModule, imports: [ToolboxComponent], exports: [ToolboxComponent] });
487
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoToolboxModule, imports: [ToolboxComponent] });
485
488
  }
486
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoToolboxModule, decorators: [{
489
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoToolboxModule, decorators: [{
487
490
  type: NgModule,
488
491
  args: [{
489
492
  imports: [ToolboxComponent],
@@ -504,11 +507,11 @@ class IgoToolModule {
504
507
  providers: [ToolService]
505
508
  };
506
509
  }
507
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoToolModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
508
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: IgoToolModule, exports: [IgoToolboxModule] });
509
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoToolModule, imports: [IgoToolboxModule] });
510
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoToolModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
511
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.19", ngImport: i0, type: IgoToolModule, exports: [IgoToolboxModule] });
512
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoToolModule, imports: [IgoToolboxModule] });
510
513
  }
511
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoToolModule, decorators: [{
514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoToolModule, decorators: [{
512
515
  type: NgModule,
513
516
  args: [{
514
517
  exports: [IgoToolboxModule]
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-common-tool.mjs","sources":["../../../packages/common/tool/src/shared/toolbox.ts","../../../packages/common/tool/src/shared/tool.service.ts","../../../packages/common/tool/src/shared/tool-component.ts","../../../packages/common/tool/src/toolbox/toolbox.animation.ts","../../../packages/common/tool/src/toolbox/toolbox.component.ts","../../../packages/common/tool/src/toolbox/toolbox.component.html","../../../packages/common/tool/src/toolbox/toolbox.module.ts","../../../packages/common/tool/src/tool.module.ts","../../../packages/common/tool/src/igo2-common-tool.ts"],"sourcesContent":["import { EntityRecord, EntityStore } from '@igo2/common/entity';\n\nimport { BehaviorSubject, Subscription } from 'rxjs';\n\nimport { Tool, ToolboxOptions } from './tool.interface';\n\n/**\n * Service where all available tools and their component are registered.\n */\nexport class Toolbox {\n /**\n * Observable of the active tool\n */\n activeTool$ = new BehaviorSubject<Tool>(undefined);\n\n /**\n * Ordered list of tool names to display in a toolbar\n */\n toolbar$ = new BehaviorSubject<string[]>([]);\n\n /**\n * Observable of the active tool\n */\n private activeTool$$: Subscription;\n\n /**\n * Active tool history. Useful for activating the previous tool.\n */\n private activeToolHistory: string[] = [];\n private previousToolName: string;\n private currentToolName: string;\n\n /**\n * Tool store\n */\n private store = new EntityStore<Tool>([], {\n getKey: (tool: Tool) => tool.name\n });\n\n get tools$(): BehaviorSubject<Tool[]> {\n return this.store.entities$;\n }\n\n constructor(private options: ToolboxOptions = {}) {\n this.setToolbar(options.toolbar);\n this.initStore();\n }\n\n /**\n * Destroy the toolbox\n */\n destroy() {\n this.activeTool$$.unsubscribe();\n this.store.destroy();\n }\n\n /**\n * Return a tool\n * @param name Tool name\n * @returns tool Tool\n */\n getTool(name: string): Tool {\n return this.store.get(name);\n }\n\n /**\n * Return all tools\n * @returns Array of tools\n */\n getTools(): Tool[] {\n return this.store.all();\n }\n\n /**\n * Set tool configurations\n * @param tools Tools\n */\n setTools(tools: Tool[]) {\n this.store.load(tools);\n }\n\n /**\n * Get toolbar\n * @returns Toolbar value\n */\n getToolbar(): string[] {\n return this.toolbar$.getValue();\n }\n\n /**\n * Set toolbar\n * @param toolbar A list of tool names\n */\n setToolbar(toolbar: string[]) {\n this.toolbar$.next(toolbar || []);\n }\n\n /**\n * Activate a tool (and deactivate other tools)\n * @param name Tool name\n * @param options Tool options\n */\n activateTool(name: string, options: Record<string, any> = {}) {\n const tool = this.getTool(name);\n if (tool === undefined) {\n return;\n }\n\n this.store.state.update(tool, { active: true, options }, true);\n }\n\n /**\n * Activate the previous tool, if any\n */\n activatePreviousTool() {\n if (this.activeToolHistory.length <= 1) {\n this.deactivateTool();\n return;\n }\n const [previous] = this.activeToolHistory.splice(-2, 2);\n this.activateTool(previous);\n }\n\n getCurrentPreviousToolName(): [string, string] {\n return [this.previousToolName, this.currentToolName];\n }\n\n /**\n * Activate the tool below, if any\n */\n /* activateBelowTool() {\n const arrayTools = this.getToolbar();\n const index = arrayTools.findIndex(t => t === this.activeTool$.getValue().name);\n if (arrayTools[index + 1] !== undefined) {\n this.deactivateTool();\n const below = arrayTools[index + 1];\n this.activateTool(below);\n } else {\n this.deactivateTool();\n const below = arrayTools[0];\n this.activateTool(below);\n }\n } */\n\n /**\n * Activate the tool above, if any\n */\n /* activateAboveTool() {\n const arrayTools = this.getToolbar();\n const index = arrayTools.findIndex(t => t === this.activeTool$.getValue().name);\n if (arrayTools[index - 1] !== undefined) {\n this.deactivateTool();\n const above = arrayTools[index - 1];\n this.activateTool(above);\n } else {\n this.deactivateTool();\n const above = arrayTools[arrayTools.length - 1];\n this.activateTool(above);\n }\n } */\n\n /**\n * Deactivate the active tool\n */\n deactivateTool() {\n this.clearActiveToolHistory();\n this.store.state.updateAll({ active: false });\n }\n\n /**\n * Initialize the tool store and start observing the active tool\n */\n private initStore() {\n this.store = new EntityStore<Tool>([], {\n getKey: (entity: Tool) => entity.name\n });\n\n this.activeTool$$ = this.store.stateView\n .firstBy$((record: EntityRecord<Tool>) => record.state.active === true)\n .subscribe((record: EntityRecord<Tool>) => {\n if (record === undefined) {\n this.setActiveTool(undefined);\n return;\n }\n\n const tool = record.entity;\n const options = Object.assign(\n {},\n tool.options || {},\n record.state.options || {}\n );\n this.setActiveTool(Object.assign({}, tool, { options }));\n });\n }\n\n /**\n * Set the active tool and update the tool history\n * @param tool Tool\n */\n private setActiveTool(tool: Tool | undefined) {\n this.activeTool$.next(tool);\n if (tool === undefined) {\n this.clearActiveToolHistory();\n } else {\n this.activeToolHistory = this.activeToolHistory\n .filter((name: string) => name !== tool.name)\n .concat([tool.name]);\n\n this.previousToolName = this.currentToolName;\n this.currentToolName =\n this.activeToolHistory[this.activeToolHistory.length - 1];\n }\n }\n\n /**\n * Clear the tool history\n */\n private clearActiveToolHistory() {\n this.activeToolHistory = [];\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { Tool } from './tool.interface';\nimport { Toolbox } from './toolbox';\n\n/**\n * Service where runtime tool configurations are registered\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ToolService {\n static tools: Record<string, Tool> = {};\n\n /**\n * Toolbox that holds main tools\n */\n public toolbox: Toolbox = new Toolbox();\n\n static register(tool: Tool) {\n ToolService.tools[tool.name] = tool;\n }\n\n constructor() {\n this.toolbox.setTools(this.getTools());\n }\n\n /**\n * Return a tool\n * @param name Tool name\n * @returns tool Tool\n */\n getTool(name: string): Tool {\n return ToolService.tools[name];\n }\n\n /**\n * Return all tools\n * @returns tTols\n */\n getTools(): Tool[] {\n return Object.values(ToolService.tools);\n }\n}\n","import { Tool } from './tool.interface';\nimport { ToolService } from './tool.service';\n\nexport function ToolComponent(tool: Partial<Tool>): (cls: any) => any {\n return (compType: any) => {\n ToolService.register(\n Object.assign({}, tool, {\n component: compType\n } as Tool)\n );\n };\n}\n","import {\n AnimationTriggerMetadata,\n animate,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\n\nexport function toolSlideInOut(\n speed = '300ms',\n type = 'ease-in-out'\n): AnimationTriggerMetadata {\n return trigger('toolSlideInOut', [\n state(\n 'enter',\n style({\n transform: 'translate3d(0, 0, 0)'\n })\n ),\n transition('void => enter', animate(speed + ' ' + type))\n ]);\n}\n","import { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n OnDestroy,\n OnInit,\n input\n} from '@angular/core';\n\nimport { Action, ActionStore, ActionbarComponent } from '@igo2/common/action';\nimport { DynamicOutletComponent } from '@igo2/common/dynamic-component';\n\nimport { BehaviorSubject, Observable, Subscription } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { Tool } from '../shared/tool.interface';\nimport { Toolbox } from '../shared/toolbox';\nimport { ToolboxColor } from '../shared/toolbox.enums';\nimport { toolSlideInOut } from './toolbox.animation';\n\n@Component({\n selector: 'igo-toolbox',\n templateUrl: 'toolbox.component.html',\n styleUrls: ['toolbox.component.scss'],\n animations: [toolSlideInOut()],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ActionbarComponent, DynamicOutletComponent, AsyncPipe]\n})\nexport class ToolboxComponent implements OnInit, OnDestroy {\n /**\n * Observable of the active tool\n */\n activeTool$ = new BehaviorSubject<Tool>(undefined);\n\n get isActive(): boolean {\n return !!this.activeTool$.value;\n }\n\n /**\n * Store of actions that toggle tools\n */\n actionStore: ActionStore = new ActionStore([]);\n\n /**\n * Observable of he anmation state\n */\n animation$ = new BehaviorSubject<string>('none');\n\n /**\n * Observable of the toolbar\n */\n toolbar$ = new BehaviorSubject<string[]>([]);\n\n /**\n * Whether the Toolbar should display actions' titles\n */\n toolbarWithTitle$: Observable<boolean> = this.activeTool$.pipe(\n map((tool: Tool | undefined) => tool === undefined)\n );\n\n /**\n * Subscription to the active tool\n */\n private activeTool$$: Subscription;\n\n /**\n * Subscription to the toolbar\n */\n private toolbar$$: Subscription;\n\n /**\n * Observable of the ongoing animation. This is useful when\n * multiple animations are triggered at once i.e. when the user clicks\n * too fast on different actions\n */\n private animating$ = new BehaviorSubject<boolean>(false);\n\n /**\n * Subscription to the ongoing animation\n */\n private animating$$: Subscription;\n\n /**\n * Toolbox\n */\n readonly toolbox = input<Toolbox>(undefined);\n\n /**\n * Whether the toolbox should animate the first tool entering\n */\n readonly animate = input(false);\n\n /**\n * Color of Toolbox\n */\n readonly color = input<ToolboxColor>('white');\n\n /**\n * @ignore\n */\n @HostBinding('class.color-grey')\n get classColorGrey() {\n return this.color() === 'grey';\n }\n\n /**\n * @ignore\n */\n @HostBinding('class.color-primary')\n get classColorPrimary() {\n return this.color() === 'primary';\n }\n\n /**\n * Initialize the toolbar and subscribe to the active tool\n * @internal\n */\n ngOnInit() {\n this.toolbar$$ = this.toolbox().toolbar$.subscribe((toolbar: string[]) =>\n this.onToolbarChange(toolbar)\n );\n this.activeTool$$ = this.toolbox().activeTool$.subscribe((tool: Tool) =>\n this.onActiveToolChange(tool)\n );\n }\n\n /**\n * Unsubscribe to the active tool and destroy the action store\n * @internal\n */\n ngOnDestroy() {\n this.toolbar$$.unsubscribe();\n this.activeTool$$.unsubscribe();\n this.actionStore.destroy();\n }\n\n /**\n * Track the starting animation\n * @internal\n */\n onAnimationStart() {\n this.animating$.next(true);\n }\n\n /**\n * Untrack the completed animation\n * @internal\n */\n onAnimationComplete() {\n this.animating$.next(false);\n }\n\n /**\n * Return a tool's inputs\n * @param tool Tool\n * @returns Tool inputs\n * @internal\n */\n getToolInputs(tool: Tool): Record<string, any> {\n return tool.options || {};\n }\n\n /**\n * Initialize an action store\n * @param toolbar Toolbar\n */\n private onToolbarChange(toolbar: string[]) {\n this.setToolbar(toolbar);\n }\n\n /**\n * Activate a tool and trigger an animation or not\n * @param tool Tool to activate\n */\n private onActiveToolChange(tool: Tool) {\n if (!this.animate()) {\n this.setActiveTool(tool);\n return;\n }\n this.onAnimate(() => this.setActiveTool(tool));\n }\n\n /**\n * Set the active tool\n * @param tool Tool to activate\n */\n private setActiveTool(tool: Tool | undefined) {\n if (tool === undefined) {\n this.actionStore.state.updateAll({ active: false });\n } else {\n const action = this.actionStore.get(tool.name);\n if (action !== undefined) {\n this.actionStore.state.update(action, { active: true }, true);\n }\n }\n\n this.activeTool$.next(tool);\n if (this.animate()) {\n this.animation$.next('enter');\n }\n }\n\n /**\n * Initialize the toolbar\n */\n private setToolbar(toolbar: string[]) {\n const actions = toolbar.reduce((acc: Action[], toolName: string) => {\n const tool = this.toolbox().getTool(toolName);\n if (tool === undefined) {\n return acc;\n }\n\n acc.push({\n id: tool.name,\n title: tool.title,\n icon: tool.icon,\n tooltip: tool.tooltip,\n args: [tool, this.toolbox()],\n handler: (_tool: Tool, _toolbox: Toolbox) => {\n _toolbox.activateTool(_tool.name);\n },\n ngClass: (_tool: Tool) => {\n return this.toolbox().activeTool$.pipe(\n map((activeTool: Tool) => {\n let toolActivated = false;\n if (activeTool !== undefined && _tool.name === activeTool.name) {\n toolActivated = true;\n }\n\n let childrenToolActivated = false;\n if (\n activeTool !== undefined &&\n _tool.name === activeTool.parent\n ) {\n childrenToolActivated = true;\n }\n\n return {\n 'tool-activated': toolActivated,\n 'children-tool-activated': childrenToolActivated\n };\n })\n );\n }\n });\n return acc;\n }, []);\n this.actionStore.load(actions);\n this.toolbar$.next(toolbar);\n }\n\n /**\n * Observe the ongoing animation and ignore any incoming animation\n * while one is still ongoing.\n * @param callback Callback to execute when the animation completes\n */\n private onAnimate(callback: () => void) {\n this.unAnimate();\n this.animating$$ = this.animating$.subscribe((animation: boolean) => {\n if (!animation) {\n callback.call(this);\n this.unAnimate();\n }\n });\n }\n\n /**\n * Stop observing an animation when it's complete\n */\n private unAnimate() {\n if (this.animating$$) {\n this.animating$$.unsubscribe();\n }\n }\n}\n","@if ((toolbar$ | async).length > 0) {\n <igo-actionbar\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n [withTitle]=\"toolbarWithTitle$ | async\"\n [withTooltip]=\"(toolbarWithTitle$ | async) === false\"\n [scrollActive]=\"toolbarWithTitle$ | async\"\n [horizontal]=\"false\"\n />\n}\n\n@if (activeTool$ | async; as tool) {\n <div\n class=\"igo-tool-container\"\n [class]=\"{\n 'igo-tool-container-with-toolbar': !actionStore.empty,\n 'igo-tool-container-with-animation': animate()\n }\"\n [@toolSlideInOut]=\"animation$ | async\"\n (@toolSlideInOut.start)=\"onAnimationStart()\"\n (@toolSlideInOut.done)=\"onAnimationComplete()\"\n >\n <igo-dynamic-outlet\n [component]=\"tool.component\"\n [inputs]=\"getToolInputs(tool)\"\n />\n </div>\n}\n","import { NgModule } from '@angular/core';\n\nimport { ToolboxComponent } from './toolbox.component';\n\n/**\n * @deprecated import the ToolboxComponent directly\n */\n@NgModule({\n imports: [ToolboxComponent],\n exports: [ToolboxComponent]\n})\nexport class IgoToolboxModule {}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { ToolService } from './shared/tool.service';\nimport { IgoToolboxModule } from './toolbox/toolbox.module';\n\n/**\n * @deprecated import the ToolboxComponent directly\n */\n@NgModule({\n exports: [IgoToolboxModule]\n})\nexport class IgoToolModule {\n /**\n * @deprecated it has no effect\n */\n static forRoot(): ModuleWithProviders<IgoToolModule> {\n return {\n ngModule: IgoToolModule,\n providers: [ToolService]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;AAMA;;AAEG;MACU,OAAO,CAAA;AAkCE,IAAA,OAAA;AAjCpB;;AAEG;AACH,IAAA,WAAW,GAAG,IAAI,eAAe,CAAO,SAAS,CAAC;AAElD;;AAEG;AACH,IAAA,QAAQ,GAAG,IAAI,eAA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,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,gBAAgB,CAAC;oBAC3B,OAAO,EAAE,CAAC,gBAAgB;AAC3B,iBAAA;;;ACLD;;AAEG;MAIU,aAAa,CAAA;AACxB;;AAEG;AACH,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,aAAa;YACvB,SAAS,EAAE,CAAC,WAAW;SACxB;IACH;wGATW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAFd,gBAAgB,CAAA,EAAA,CAAA;AAEf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAFd,gBAAgB,CAAA,EAAA,CAAA;;4FAEf,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,gBAAgB;AAC3B,iBAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-common-tool.mjs","sources":["../../../packages/common/tool/src/shared/toolbox.ts","../../../packages/common/tool/src/shared/tool.service.ts","../../../packages/common/tool/src/shared/tool-component.ts","../../../packages/common/tool/src/toolbox/toolbox.animation.ts","../../../packages/common/tool/src/toolbox/toolbox.component.ts","../../../packages/common/tool/src/toolbox/toolbox.component.html","../../../packages/common/tool/src/toolbox/toolbox.module.ts","../../../packages/common/tool/src/tool.module.ts","../../../packages/common/tool/src/igo2-common-tool.ts"],"sourcesContent":["import { EntityStore } from '@igo2/common/entity';\n\nimport { BehaviorSubject, Subscription } from 'rxjs';\n\nimport { Tool, ToolboxOptions } from './tool.interface';\n\n/**\n * Service where all available tools and their component are registered.\n */\nexport class Toolbox {\n /**\n * Observable of the active tool\n */\n activeTool$ = new BehaviorSubject<Tool | undefined>(undefined);\n\n /**\n * Ordered list of tool names to display in a toolbar\n */\n toolbar$ = new BehaviorSubject<string[]>([]);\n\n /**\n * Observable of the active tool\n */\n private activeTool$$!: Subscription;\n\n /**\n * Active tool history. Useful for activating the previous tool.\n */\n private activeToolHistory: string[] = [];\n private previousToolName!: string;\n private currentToolName!: string;\n\n /**\n * Tool store\n */\n private store = new EntityStore<Tool>([], {\n getKey: (tool: Tool) => tool.name\n });\n\n get tools$(): BehaviorSubject<Tool[]> {\n return this.store.entities$;\n }\n\n constructor(options: ToolboxOptions = {}) {\n this.setToolbar(options.toolbar || []);\n this.initStore();\n }\n\n /**\n * Destroy the toolbox\n */\n destroy() {\n this.activeTool$$?.unsubscribe();\n this.store.destroy();\n }\n\n /**\n * Return a tool\n * @param name Tool name\n * @returns tool Tool\n */\n getTool(name: string): Tool | undefined {\n return this.store.get(name);\n }\n\n /**\n * Return all tools\n * @returns Array of tools\n */\n getTools(): Tool[] {\n return this.store.all();\n }\n\n /**\n * Set tool configurations\n * @param tools Tools\n */\n setTools(tools: Tool[]) {\n this.store.load(tools);\n }\n\n /**\n * Get toolbar\n * @returns Toolbar value\n */\n getToolbar(): string[] {\n return this.toolbar$.getValue();\n }\n\n /**\n * Set toolbar\n * @param toolbar A list of tool names\n */\n setToolbar(toolbar: string[]) {\n this.toolbar$.next(toolbar || []);\n }\n\n /**\n * Activate a tool (and deactivate other tools)\n * @param name Tool name\n * @param options Tool options\n */\n activateTool(name: string, options: Record<string, any> = {}) {\n const tool = this.getTool(name);\n if (tool === undefined) {\n return;\n }\n\n this.store.state.update(tool, { active: true, options }, true);\n }\n\n /**\n * Activate the previous tool, if any\n */\n activatePreviousTool() {\n if (this.activeToolHistory.length <= 1) {\n this.deactivateTool();\n return;\n }\n const [previous] = this.activeToolHistory.splice(-2, 2);\n this.activateTool(previous);\n }\n\n getCurrentPreviousToolName(): [string, string] {\n return [this.previousToolName, this.currentToolName];\n }\n\n /**\n * Activate the tool below, if any\n */\n /* activateBelowTool() {\n const arrayTools = this.getToolbar();\n const index = arrayTools.findIndex(t => t === this.activeTool$.getValue().name);\n if (arrayTools[index + 1] !== undefined) {\n this.deactivateTool();\n const below = arrayTools[index + 1];\n this.activateTool(below);\n } else {\n this.deactivateTool();\n const below = arrayTools[0];\n this.activateTool(below);\n }\n } */\n\n /**\n * Activate the tool above, if any\n */\n /* activateAboveTool() {\n const arrayTools = this.getToolbar();\n const index = arrayTools.findIndex(t => t === this.activeTool$.getValue().name);\n if (arrayTools[index - 1] !== undefined) {\n this.deactivateTool();\n const above = arrayTools[index - 1];\n this.activateTool(above);\n } else {\n this.deactivateTool();\n const above = arrayTools[arrayTools.length - 1];\n this.activateTool(above);\n }\n } */\n\n /**\n * Deactivate the active tool\n */\n deactivateTool() {\n this.clearActiveToolHistory();\n this.store.state.updateAll({ active: false });\n }\n\n /**\n * Initialize the tool store and start observing the active tool\n */\n private initStore() {\n this.store = new EntityStore<Tool>([], {\n getKey: (entity: Tool) => entity.name\n });\n\n this.activeTool$$ = this.store.stateView\n .firstBy$((record) => record?.state?.active === true)\n .subscribe((record) => {\n if (record === undefined) {\n this.setActiveTool(undefined);\n return;\n }\n\n const tool = record.entity;\n const options = Object.assign(\n {},\n tool.options || {},\n record.state.options || {}\n );\n this.setActiveTool(Object.assign({}, tool, { options }));\n });\n }\n\n /**\n * Set the active tool and update the tool history\n * @param tool Tool\n */\n private setActiveTool(tool: Tool | undefined) {\n this.activeTool$.next(tool);\n if (tool === undefined) {\n this.clearActiveToolHistory();\n } else {\n this.activeToolHistory = this.activeToolHistory\n .filter((name: string) => name !== tool.name)\n .concat([tool.name]);\n\n this.previousToolName = this.currentToolName;\n this.currentToolName =\n this.activeToolHistory[this.activeToolHistory.length - 1];\n }\n }\n\n /**\n * Clear the tool history\n */\n private clearActiveToolHistory() {\n this.activeToolHistory = [];\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { Tool } from './tool.interface';\nimport { Toolbox } from './toolbox';\n\n/**\n * Service where runtime tool configurations are registered\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ToolService {\n static tools: Record<string, Tool> = {};\n\n /**\n * Toolbox that holds main tools\n */\n public toolbox: Toolbox = new Toolbox();\n\n static register(tool: Tool) {\n ToolService.tools[tool.name] = tool;\n }\n\n constructor() {\n this.toolbox.setTools(this.getTools());\n }\n\n /**\n * Return a tool\n * @param name Tool name\n * @returns tool Tool\n */\n getTool(name: string): Tool {\n return ToolService.tools[name];\n }\n\n /**\n * Return all tools\n * @returns tTols\n */\n getTools(): Tool[] {\n return Object.values(ToolService.tools);\n }\n}\n","import { Tool } from './tool.interface';\nimport { ToolService } from './tool.service';\n\nexport function ToolComponent(tool: Partial<Tool>): (cls: any) => any {\n return (compType: any) => {\n ToolService.register(\n Object.assign({}, tool, {\n component: compType\n } as Tool)\n );\n };\n}\n","import {\n AnimationTriggerMetadata,\n animate,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\n\nexport function toolSlideInOut(\n speed = '300ms',\n type = 'ease-in-out'\n): AnimationTriggerMetadata {\n return trigger('toolSlideInOut', [\n state(\n 'enter',\n style({\n transform: 'translate3d(0, 0, 0)'\n })\n ),\n transition('void => enter', animate(speed + ' ' + type))\n ]);\n}\n","import { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n OnDestroy,\n OnInit,\n input\n} from '@angular/core';\n\nimport { Action, ActionStore, ActionbarComponent } from '@igo2/common/action';\nimport { DynamicOutletComponent } from '@igo2/common/dynamic-component';\n\nimport { BehaviorSubject, Observable, Subscription } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { Tool } from '../shared/tool.interface';\nimport { Toolbox } from '../shared/toolbox';\nimport { ToolboxColor } from '../shared/toolbox.enums';\nimport { toolSlideInOut } from './toolbox.animation';\n\n@Component({\n selector: 'igo-toolbox',\n templateUrl: 'toolbox.component.html',\n styleUrls: ['toolbox.component.scss'],\n animations: [toolSlideInOut()],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ActionbarComponent, DynamicOutletComponent, AsyncPipe]\n})\nexport class ToolboxComponent implements OnInit, OnDestroy {\n /**\n * Observable of the active tool\n */\n activeTool$ = new BehaviorSubject<Tool | undefined>(undefined);\n\n get isActive(): boolean {\n return !!this.activeTool$.value;\n }\n\n /**\n * Store of actions that toggle tools\n */\n actionStore: ActionStore = new ActionStore([]);\n\n /**\n * Observable of he anmation state\n */\n animation$ = new BehaviorSubject<string>('none');\n\n /**\n * Observable of the toolbar\n */\n toolbar$ = new BehaviorSubject<string[]>([]);\n\n /**\n * Whether the Toolbar should display actions' titles\n */\n toolbarWithTitle$: Observable<boolean> = this.activeTool$.pipe(\n map((tool: Tool | undefined) => tool === undefined)\n );\n\n /**\n * Subscription to the active tool\n */\n private activeTool$$?: Subscription;\n\n /**\n * Subscription to the toolbar\n */\n private toolbar$$?: Subscription;\n\n /**\n * Observable of the ongoing animation. This is useful when\n * multiple animations are triggered at once i.e. when the user clicks\n * too fast on different actions\n */\n private animating$ = new BehaviorSubject<boolean>(false);\n\n /**\n * Subscription to the ongoing animation\n */\n private animating$$?: Subscription;\n\n /**\n * Toolbox\n */\n readonly toolbox = input.required<Toolbox>();\n\n /**\n * Whether the toolbox should animate the first tool entering\n */\n readonly animate = input(false);\n\n /**\n * Color of Toolbox\n */\n readonly color = input<ToolboxColor>('white');\n\n /**\n * @ignore\n */\n @HostBinding('class.color-grey')\n get classColorGrey() {\n return this.color() === 'grey';\n }\n\n /**\n * @ignore\n */\n @HostBinding('class.color-primary')\n get classColorPrimary() {\n return this.color() === 'primary';\n }\n\n /**\n * Initialize the toolbar and subscribe to the active tool\n * @internal\n */\n ngOnInit() {\n const toolbox = this.toolbox();\n this.toolbar$$ = toolbox.toolbar$.subscribe((toolbar) =>\n this.onToolbarChange(toolbar)\n );\n this.activeTool$$ = toolbox.activeTool$.subscribe((tool) =>\n this.onActiveToolChange(tool)\n );\n }\n\n /**\n * Unsubscribe to the active tool and destroy the action store\n * @internal\n */\n ngOnDestroy() {\n this.toolbar$$?.unsubscribe();\n this.activeTool$$?.unsubscribe();\n this.actionStore.destroy();\n }\n\n /**\n * Track the starting animation\n * @internal\n */\n onAnimationStart() {\n this.animating$.next(true);\n }\n\n /**\n * Untrack the completed animation\n * @internal\n */\n onAnimationComplete() {\n this.animating$.next(false);\n }\n\n /**\n * Return a tool's inputs\n * @param tool Tool\n * @returns Tool inputs\n * @internal\n */\n getToolInputs(tool: Tool): Record<string, any> {\n return tool.options || {};\n }\n\n /**\n * Initialize an action store\n * @param toolbar Toolbar\n */\n private onToolbarChange(toolbar: string[]) {\n this.setToolbar(toolbar);\n }\n\n /**\n * Activate a tool and trigger an animation or not\n * @param tool Tool to activate\n */\n private onActiveToolChange(tool: Tool | undefined) {\n if (!this.animate()) {\n this.setActiveTool(tool);\n return;\n }\n this.onAnimate(() => this.setActiveTool(tool));\n }\n\n /**\n * Set the active tool\n * @param tool Tool to activate\n */\n private setActiveTool(tool: Tool | undefined) {\n if (tool === undefined) {\n this.actionStore.state.updateAll({ active: false });\n } else {\n const action = this.actionStore.get(tool.name);\n if (action !== undefined) {\n this.actionStore.state.update(action, { active: true }, true);\n }\n }\n\n this.activeTool$.next(tool);\n if (this.animate()) {\n this.animation$.next('enter');\n }\n }\n\n /**\n * Initialize the toolbar\n */\n private setToolbar(toolbar: string[]) {\n const actions = toolbar.reduce((acc: Action[], toolName: string) => {\n const toolbox = this.toolbox();\n if (!toolbox) {\n return acc;\n }\n const tool = toolbox.getTool(toolName);\n if (tool === undefined) {\n return acc;\n }\n\n acc.push({\n id: tool.name,\n title: tool.title,\n icon: tool.icon,\n tooltip: tool.tooltip,\n args: [tool, toolbox],\n handler: (_tool: Tool, _toolbox: Toolbox) => {\n _toolbox.activateTool(_tool.name);\n },\n ngClass: (_tool: Tool) => {\n return toolbox.activeTool$.pipe(\n map((activeTool: Tool | undefined) => {\n let toolActivated = false;\n if (activeTool !== undefined && _tool.name === activeTool.name) {\n toolActivated = true;\n }\n\n let childrenToolActivated = false;\n if (\n activeTool !== undefined &&\n _tool.name === activeTool.parent\n ) {\n childrenToolActivated = true;\n }\n\n return {\n 'tool-activated': toolActivated,\n 'children-tool-activated': childrenToolActivated\n };\n })\n );\n }\n });\n return acc;\n }, []);\n this.actionStore.load(actions);\n this.toolbar$.next(toolbar);\n }\n\n /**\n * Observe the ongoing animation and ignore any incoming animation\n * while one is still ongoing.\n * @param callback Callback to execute when the animation completes\n */\n private onAnimate(callback: () => void) {\n this.unAnimate();\n this.animating$$ = this.animating$.subscribe((animation: boolean) => {\n if (!animation) {\n callback.call(this);\n this.unAnimate();\n }\n });\n }\n\n /**\n * Stop observing an animation when it's complete\n */\n private unAnimate() {\n if (this.animating$$) {\n this.animating$$.unsubscribe();\n }\n }\n}\n","@let toolbar = toolbar$ | async;\n@if (toolbar !== null && toolbar.length > 0) {\n <igo-actionbar\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n [withTitle]=\"(toolbarWithTitle$ | async)!\"\n [withTooltip]=\"(toolbarWithTitle$ | async) === false\"\n [scrollActive]=\"(toolbarWithTitle$ | async)!\"\n [horizontal]=\"false\"\n />\n}\n\n@if (activeTool$ | async; as tool) {\n <div\n class=\"igo-tool-container\"\n [class]=\"{\n 'igo-tool-container-with-toolbar': !actionStore.empty,\n 'igo-tool-container-with-animation': animate()\n }\"\n [@toolSlideInOut]=\"animation$ | async\"\n (@toolSlideInOut.start)=\"onAnimationStart()\"\n (@toolSlideInOut.done)=\"onAnimationComplete()\"\n >\n <igo-dynamic-outlet\n [component]=\"tool.component\"\n [inputs]=\"getToolInputs(tool)\"\n />\n </div>\n}\n","import { NgModule } from '@angular/core';\n\nimport { ToolboxComponent } from './toolbox.component';\n\n/**\n * @deprecated import the ToolboxComponent directly\n */\n@NgModule({\n imports: [ToolboxComponent],\n exports: [ToolboxComponent]\n})\nexport class IgoToolboxModule {}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { ToolService } from './shared/tool.service';\nimport { IgoToolboxModule } from './toolbox/toolbox.module';\n\n/**\n * @deprecated import the ToolboxComponent directly\n */\n@NgModule({\n exports: [IgoToolboxModule]\n})\nexport class IgoToolModule {\n /**\n * @deprecated it has no effect\n */\n static forRoot(): ModuleWithProviders<IgoToolModule> {\n return {\n ngModule: IgoToolModule,\n providers: [ToolService]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;AAMA;;AAEG;MACU,OAAO,CAAA;AAClB;;AAEG;AACH,IAAA,WAAW,GAAG,IAAI,eAAe,CAAmB,SAAS,CAAC;AAE9D;;AAEG;AACH,IAAA,QAAQ,GAAG,IAAI,eAAe,CAAW,EAAE,CAAC;AAE5C;;AAEG;AACK,IAAA,YAAY;AAEpB;;AAEG;IACK,iBAAiB,GAAa,EAAE;AAChC,IAAA,gBAAgB;AAChB,IAAA,eAAe;AAEvB;;AAEG;AACK,IAAA,KAAK,GAAG,IAAI,WAAW,CAAO,EAAE,EAAE;QACxC,MAAM,EAAE,CAAC,IAAU,KAAK,IAAI,CAAC;AAC9B,KAAA,CAAC;AAEF,IAAA,IAAI,MAAM,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS;IAC7B;AAEA,IAAA,WAAA,CAAY,UAA0B,EAAE,EAAA;QACtC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;QACtC,IAAI,CAAC,SAAS,EAAE;IAClB;AAEA;;AAEG;IACH,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,YAAY,EAAE,WAAW,EAAE;AAChC,QAAA,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE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AAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAFd,gBAAgB,CAAA,EAAA,CAAA;;4FAEf,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,gBAAgB;AAC3B,iBAAA;;;ACVD;;AAEG;;;;"}
@@ -10,10 +10,10 @@ class WidgetService {
10
10
  create(widgetCls) {
11
11
  return this.dynamicComponentService.create(widgetCls);
12
12
  }
13
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: WidgetService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
14
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: WidgetService, providedIn: 'root' });
13
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: WidgetService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
14
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: WidgetService, providedIn: 'root' });
15
15
  }
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: WidgetService, decorators: [{
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: WidgetService, decorators: [{
17
17
  type: Injectable,
18
18
  args: [{
19
19
  providedIn: 'root'
@@ -37,11 +37,11 @@ class WidgetOutletComponent {
37
37
  /**
38
38
  * Widget
39
39
  */
40
- widget = model(undefined, ...(ngDevMode ? [{ debugName: "widget" }] : /* istanbul ignore next */ []));
40
+ widget = model(...(ngDevMode ? [undefined, { debugName: "widget" }] : /* istanbul ignore next */ []));
41
41
  /**
42
42
  * Widget inputs
43
43
  */
44
- inputs = input(undefined, ...(ngDevMode ? [{ debugName: "inputs" }] : /* istanbul ignore next */ []));
44
+ inputs = input.required(...(ngDevMode ? [{ debugName: "inputs" }] : /* istanbul ignore next */ []));
45
45
  /**
46
46
  * Widget subscribers
47
47
  */
@@ -111,23 +111,23 @@ class WidgetOutletComponent {
111
111
  }
112
112
  this.widget.set(undefined);
113
113
  }
114
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: WidgetOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
115
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: WidgetOutletComponent, isStandalone: true, selector: "igo-widget-outlet", inputs: { widget: { classPropertyName: "widget", publicName: "widget", isSignal: true, isRequired: false, transformFunction: null }, inputs: { classPropertyName: "inputs", publicName: "inputs", isSignal: true, isRequired: false, transformFunction: null }, subscribers: { classPropertyName: "subscribers", publicName: "subscribers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { widget: "widgetChange", complete: "complete", cancel: "cancel" }, ngImport: i0, template: "@if (widget()) {\n <igo-dynamic-outlet\n [component]=\"widget()\"\n [inputs]=\"inputs()\"\n [subscribers]=\"getEffectiveSubscribers()\"\n />\n}\n", styles: [":host igo-dynamic-outlet{height:100%}\n"], dependencies: [{ kind: "component", type: DynamicOutletComponent, selector: "igo-dynamic-outlet", inputs: ["component", "inputs", "subscribers"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
114
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: WidgetOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
115
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: WidgetOutletComponent, isStandalone: true, selector: "igo-widget-outlet", inputs: { widget: { classPropertyName: "widget", publicName: "widget", isSignal: true, isRequired: false, transformFunction: null }, inputs: { classPropertyName: "inputs", publicName: "inputs", isSignal: true, isRequired: true, transformFunction: null }, subscribers: { classPropertyName: "subscribers", publicName: "subscribers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { widget: "widgetChange", complete: "complete", cancel: "cancel" }, ngImport: i0, template: "@if (widget()) {\n <igo-dynamic-outlet\n [component]=\"widget()\"\n [inputs]=\"inputs()\"\n [subscribers]=\"getEffectiveSubscribers()\"\n />\n}\n", styles: [":host igo-dynamic-outlet{height:100%}\n"], dependencies: [{ kind: "component", type: DynamicOutletComponent, selector: "igo-dynamic-outlet", inputs: ["component", "inputs", "subscribers"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
116
116
  }
117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: WidgetOutletComponent, decorators: [{
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: WidgetOutletComponent, decorators: [{
118
118
  type: Component,
119
119
  args: [{ selector: 'igo-widget-outlet', changeDetection: ChangeDetectionStrategy.OnPush, imports: [DynamicOutletComponent], template: "@if (widget()) {\n <igo-dynamic-outlet\n [component]=\"widget()\"\n [inputs]=\"inputs()\"\n [subscribers]=\"getEffectiveSubscribers()\"\n />\n}\n", styles: [":host igo-dynamic-outlet{height:100%}\n"] }]
120
- }], propDecorators: { widget: [{ type: i0.Input, args: [{ isSignal: true, alias: "widget", required: false }] }, { type: i0.Output, args: ["widgetChange"] }], inputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputs", required: false }] }], subscribers: [{ type: i0.Input, args: [{ isSignal: true, alias: "subscribers", required: false }] }], complete: [{ type: i0.Output, args: ["complete"] }], cancel: [{ type: i0.Output, args: ["cancel"] }] } });
120
+ }], propDecorators: { widget: [{ type: i0.Input, args: [{ isSignal: true, alias: "widget", required: false }] }, { type: i0.Output, args: ["widgetChange"] }], inputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputs", required: true }] }], subscribers: [{ type: i0.Input, args: [{ isSignal: true, alias: "subscribers", required: false }] }], complete: [{ type: i0.Output, args: ["complete"] }], cancel: [{ type: i0.Output, args: ["cancel"] }] } });
121
121
 
122
122
  /**
123
123
  * @deprecated import the WidgetOutletComponent directly
124
124
  */
125
125
  class IgoWidgetOutletModule {
126
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoWidgetOutletModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
127
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: IgoWidgetOutletModule, imports: [WidgetOutletComponent], exports: [WidgetOutletComponent] });
128
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoWidgetOutletModule, imports: [WidgetOutletComponent] });
126
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoWidgetOutletModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
127
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.19", ngImport: i0, type: IgoWidgetOutletModule, imports: [WidgetOutletComponent], exports: [WidgetOutletComponent] });
128
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoWidgetOutletModule, imports: [WidgetOutletComponent] });
129
129
  }
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoWidgetOutletModule, decorators: [{
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoWidgetOutletModule, decorators: [{
131
131
  type: NgModule,
132
132
  args: [{
133
133
  imports: [WidgetOutletComponent],
@@ -139,11 +139,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
139
139
  * @deprecated import the WidgetOutletComponent directly
140
140
  */
141
141
  class IgoWidgetModule {
142
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoWidgetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
143
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: IgoWidgetModule, imports: [IgoWidgetOutletModule], exports: [IgoWidgetOutletModule] });
144
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoWidgetModule, providers: [WidgetService], imports: [IgoWidgetOutletModule, IgoWidgetOutletModule] });
142
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoWidgetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
143
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.19", ngImport: i0, type: IgoWidgetModule, imports: [IgoWidgetOutletModule], exports: [IgoWidgetOutletModule] });
144
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoWidgetModule, providers: [WidgetService], imports: [IgoWidgetOutletModule, IgoWidgetOutletModule] });
145
145
  }
146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: IgoWidgetModule, decorators: [{
146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: IgoWidgetModule, decorators: [{
147
147
  type: NgModule,
148
148
  args: [{
149
149
  imports: [IgoWidgetOutletModule],