DigitalData.UserManager/DigitalData.UserManager.NgWebUI/ClientApp/.angular/cache/17.3.0/babel-webpack/bc469262ac45118183d8d04b6cca6812cee48940cd4bb100b6d5cf9abcbed2e9.json

1 line
902 KiB
JSON

{"ast":null,"code":"import * as i0 from '@angular/core';\nimport { Injectable, TemplateRef, Component, ContentChild, Input, EventEmitter, Directive, ContentChildren, Output, InjectionToken, ChangeDetectionStrategy, ViewEncapsulation, Inject, Injector, ChangeDetectorRef, inject, Pipe, NgModule, Attribute, ViewChild, ComponentFactoryResolver, ElementRef, PLATFORM_ID, Optional as Optional$1 } from '@angular/core';\nimport * as i4 from '@angular/common';\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\nimport { RandomIdGenerator, EntityId, hermesMap, hermesFilter, hermesTake, hermesSwitchMap, ReadModelRootId, AggregateId, Reactive, Archive, HermesSubject, hermesTakeUntil, Command, DomainEvent, CommandDispatcher, CoreContainer, DomainEventBus, EventRepository, AggregateArchive, singleFromObservable, HermesReplaySubject, hermesDistinctUntilChanged, AggregateEvent, DomainEventPublisher, ReadModelObject, DomainInitializer, FeatureModule, Entity, RandomStringGenerator, HermesId, InMemoryStore, InMemoryAggregateStore, AggregateRepository, ReadModelEntity, ReadModelEntityId, ReadModelRoot, InMemoryReadModelStore, ReadModelRootRepository, Optional, AggregateRoot, KeyMap, AggregateFactory, hermesFromEvent, fromRxJsObservable, hermesEmpty, hermesTimer, toRxJsObservable, createContainer, DomainObject, EventDrivenRepository, CreateAggregateCommand, COMMAND_LOGGER_ENABLED, EVENT_LOGGER_ENABLED, runHermes, initHermesApi } from '@generic-ui/hermes';\nimport * as i1 from '@angular/platform-browser';\nimport * as i1$1 from '@generic-ui/fabric';\nimport { FabricModule, Theme, Placement, FabricPlacement, FabricBadgeModule, FabricButtonModule, FabricButtonGroupModule, FabricCheckboxModule, FabricChipModule, FabricDrawerModule, FabricDropdownModule, FabricRadioButtonModule, FabricRadioGroupModule, FabricProgressBarModule, FabricProgressSpinnerModule, FabricSelectModule, FabricSpinnerModule, FabricTabModule, FabricTooltipModule, FabricToggleButtonModule, FabricInputModule, FabricDialogModule, FabricInlineDialogModule, FabricModalThemeService, FabricDatePickerModule } from '@generic-ui/fabric';\nimport { __decorate } from 'tslib';\nimport * as i1$2 from '@angular/forms';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { debounceTime, throttleTime, flatMap } from 'rxjs/operators';\nimport { Observable, combineLatest, zip } from 'rxjs';\nconst _c0 = [\"gui-row-detail\", \"\"];\nconst _c1 = [\"gui-paging-navigator\", \"\", \"paging\", \"\"];\nconst _c2 = [\"gui-paging-select\", \"\", \"paging\", \"\"];\nconst _c3 = [\"gui-paging-stats\", \"\", \"paging\", \"\"];\nfunction PagingStatsComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"span\", 2)(2, \"span\");\n i0.ɵɵtext(3);\n i0.ɵɵelementEnd();\n i0.ɵɵtext(4, \" - \");\n i0.ɵɵelementStart(5, \"span\");\n i0.ɵɵtext(6);\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(7, \"span\");\n i0.ɵɵtext(8);\n i0.ɵɵpipe(9, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(10, \"span\", 3);\n i0.ɵɵtext(11);\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(ctx_r0.firstItemIndex);\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(ctx_r0.lastItemIndex);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(9, 4, \"pagingOf\"), \" \");\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate1(\" \", ctx_r0.sourceSize, \" \");\n }\n}\nfunction PagingStatsComponent_ng_template_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 4);\n i0.ɵɵtext(1);\n i0.ɵɵpipe(2, \"guiTranslate\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(2, 1, \"pagingNoItems\"), \" \");\n }\n}\nconst _c4 = [\"gui-paging-alternative-navigator\", \"\", \"paging\", \"\", \"sourceSize\", \"\"];\nconst _c5 = [\"*\"];\nconst _c6 = [\"gui-paging-alternative-pages\", \"\", \"paging\", \"\"];\nfunction AlternativePagingPagesComponent_ng_container_0_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\")(1, \"div\", 3)(2, \"div\", 4);\n i0.ɵɵlistener(\"click\", function AlternativePagingPagesComponent_ng_container_0_div_1_Template_div_click_2_listener() {\n const page_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.goToPage(page_r2));\n });\n i0.ɵɵtext(3);\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n const page_r2 = ctx.$implicit;\n const ctx_r2 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"gui-paging-active-page\", ctx_r2.activePage(page_r2))(\"gui-paging-visible-page\", ctx_r2.calculateVisiblePages(page_r2));\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", page_r2, \" \");\n }\n}\nfunction AlternativePagingPagesComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, AlternativePagingPagesComponent_ng_container_0_div_1_Template, 4, 5, \"div\", 2);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r2.pages);\n }\n}\nfunction AlternativePagingPagesComponent_ng_template_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 5);\n i0.ɵɵtext(1);\n i0.ɵɵpipe(2, \"guiTranslate\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(2, 1, \"pagingNoItems\"), \" \");\n }\n}\nconst _c7 = [\"gui-paging\", \"\", \"position\", \"\"];\nfunction PagingComponent_ng_container_0_ng_container_1_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"div\", 4);\n i0.ɵɵlistener(\"pageSizeChanged\", function PagingComponent_ng_container_0_ng_container_1_ng_container_1_Template_div_pageSizeChanged_1_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.changePageSize($event));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelement(2, \"div\", 5);\n i0.ɵɵelementStart(3, \"div\", 6);\n i0.ɵɵlistener(\"nextPageChanged\", function PagingComponent_ng_container_0_ng_container_1_ng_container_1_Template_div_nextPageChanged_3_listener() {\n i0.ɵɵrestoreView(_r1);\n const localState_r3 = i0.ɵɵnextContext(2).$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.nextPage(localState_r3.sourceSize));\n })(\"prevPageChanged\", function PagingComponent_ng_container_0_ng_container_1_ng_container_1_Template_div_prevPageChanged_3_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.prevPage());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const localState_r3 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"paging\", localState_r3.paging);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"paging\", localState_r3.paging);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"paging\", localState_r3.paging)(\"sourceSize\", localState_r3.sourceSize);\n }\n}\nfunction PagingComponent_ng_container_0_ng_container_1_ng_template_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelement(0, \"div\", 5);\n i0.ɵɵelementStart(1, \"div\", 6);\n i0.ɵɵlistener(\"nextPageChanged\", function PagingComponent_ng_container_0_ng_container_1_ng_template_2_Template_div_nextPageChanged_1_listener() {\n i0.ɵɵrestoreView(_r4);\n const localState_r3 = i0.ɵɵnextContext(2).$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.nextPage(localState_r3.sourceSize));\n })(\"prevPageChanged\", function PagingComponent_ng_container_0_ng_container_1_ng_template_2_Template_div_prevPageChanged_1_listener() {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.prevPage());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const localState_r3 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵproperty(\"paging\", localState_r3.paging);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"paging\", localState_r3.paging)(\"sourceSize\", localState_r3.sourceSize);\n }\n}\nfunction PagingComponent_ng_container_0_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, PagingComponent_ng_container_0_ng_container_1_ng_container_1_Template, 4, 4, \"ng-container\", 3)(2, PagingComponent_ng_container_0_ng_container_1_ng_template_2_Template, 2, 3, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const minimalTemplate_r5 = i0.ɵɵreference(3);\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx_r1.minimal)(\"ngIfElse\", minimalTemplate_r5);\n }\n}\nfunction PagingComponent_ng_container_0_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"div\", 4);\n i0.ɵɵlistener(\"pageSizeChanged\", function PagingComponent_ng_container_0_ng_container_2_Template_div_pageSizeChanged_1_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.changePageSize($event));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"div\", 7);\n i0.ɵɵlistener(\"nextPageChanged\", function PagingComponent_ng_container_0_ng_container_2_Template_div_nextPageChanged_2_listener() {\n i0.ɵɵrestoreView(_r6);\n const localState_r3 = i0.ɵɵnextContext().$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.nextPage(localState_r3.sourceSize));\n })(\"prevPageChanged\", function PagingComponent_ng_container_0_ng_container_2_Template_div_prevPageChanged_2_listener() {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.prevPage());\n });\n i0.ɵɵelement(3, \"div\", 8);\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const localState_r3 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"paging\", localState_r3.paging);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"paging\", localState_r3.paging)(\"sourceSize\", localState_r3.sourceSize);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"paging\", localState_r3.paging)(\"sourceSize\", localState_r3.sourceSize);\n }\n}\nfunction PagingComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, PagingComponent_ng_container_0_ng_container_1_Template, 4, 2, \"ng-container\", 2)(2, PagingComponent_ng_container_0_ng_container_2_Template, 4, 5, \"ng-container\", 2);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const localState_r3 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r3.isPagingVisible && !localState_r3.alternativeDisplay);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r3.isPagingVisible && localState_r3.alternativeDisplay);\n }\n}\nconst _c8 = [\"value\", \"\"];\nfunction BarViewComponent_gui_percentage_view_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"gui-percentage-view\", 3);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"value\", ctx_r0.value);\n }\n}\nfunction TextViewComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelement(1, \"span\", 2);\n i0.ɵɵpipe(2, \"guiSafe\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"innerHTML\", i0.ɵɵpipeBind2(2, 1, ctx_r0.value.value, \"html\"), i0.ɵɵsanitizeHtml);\n }\n}\nfunction TextViewComponent_ng_template_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\");\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r0.value.value, \" \");\n }\n}\nconst _c9 = [\"text\"];\nconst _c10 = [\"number\"];\nconst _c11 = [\"chip\"];\nconst _c12 = [\"link\"];\nconst _c13 = [\"image\"];\nconst _c14 = [\"checkbox\"];\nconst _c15 = [\"bold\"];\nconst _c16 = [\"italic\"];\nconst _c17 = [\"custom\"];\nconst _c18 = [\"function\"];\nconst _c19 = [\"html\"];\nconst _c20 = [\"date\"];\nconst _c21 = [\"bar\"];\nconst _c22 = [\"percentageBar\"];\nconst _c23 = [\"percentage\"];\nfunction ViewTemplatesComponent_ng_template_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"gui-view-text\", 15);\n }\n if (rf & 2) {\n const element_r1 = ctx.element;\n i0.ɵɵproperty(\"value\", element_r1);\n }\n}\nfunction ViewTemplatesComponent_ng_template_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 16);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const element_r2 = ctx.element;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", element_r2.value, \" \");\n }\n}\nfunction ViewTemplatesComponent_ng_template_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"gui-chip\");\n i0.ɵɵelement(1, \"gui-view-text\", 15);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const element_r3 = ctx.element;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"value\", element_r3);\n }\n}\nfunction ViewTemplatesComponent_ng_template_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"a\", 17);\n i0.ɵɵelement(1, \"gui-view-text\", 15);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const element_r4 = ctx.element;\n i0.ɵɵpropertyInterpolate(\"href\", element_r4.value, i0.ɵɵsanitizeUrl);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"value\", element_r4);\n }\n}\nfunction ViewTemplatesComponent_ng_template_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"img\", 18);\n }\n if (rf & 2) {\n const element_r5 = ctx.element;\n i0.ɵɵpropertyInterpolate(\"src\", element_r5.value, i0.ɵɵsanitizeUrl);\n }\n}\nfunction ViewTemplatesComponent_ng_template_10_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 19);\n i0.ɵɵelement(1, \"gui-checkbox\", 20);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const element_r6 = ctx.element;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"checked\", !!element_r6.value)(\"disabled\", true);\n }\n}\nfunction ViewTemplatesComponent_ng_template_12_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"gui-view-text\", 21);\n }\n if (rf & 2) {\n const element_r7 = ctx.element;\n i0.ɵɵproperty(\"value\", element_r7);\n }\n}\nfunction ViewTemplatesComponent_ng_template_14_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"gui-view-text\", 22);\n }\n if (rf & 2) {\n const element_r8 = ctx.element;\n i0.ɵɵproperty(\"value\", element_r8);\n }\n}\nfunction ViewTemplatesComponent_ng_template_16_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtext(0);\n }\n if (rf & 2) {\n const element_r9 = ctx.element;\n i0.ɵɵtextInterpolate1(\" \", element_r9.value, \" \");\n }\n}\nfunction ViewTemplatesComponent_ng_template_18_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"gui-function-view\", 23);\n }\n if (rf & 2) {\n const element_r10 = ctx.element;\n i0.ɵɵproperty(\"element\", element_r10);\n }\n}\nfunction ViewTemplatesComponent_ng_template_20_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"gui-html-view\", 23);\n }\n if (rf & 2) {\n const element_r11 = ctx.element;\n i0.ɵɵproperty(\"element\", element_r11);\n }\n}\nfunction ViewTemplatesComponent_ng_template_22_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 24);\n i0.ɵɵtext(1);\n i0.ɵɵpipe(2, \"date\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const element_r12 = ctx.element;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, element_r12.value, \"dd/MM/yyyy\"));\n }\n}\nfunction ViewTemplatesComponent_ng_template_24_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"gui-bar-view\", 25);\n }\n if (rf & 2) {\n const element_r13 = ctx.element;\n i0.ɵɵproperty(\"value\", element_r13.value)(\"showPercentage\", false);\n }\n}\nfunction ViewTemplatesComponent_ng_template_26_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"gui-bar-view\", 25);\n }\n if (rf & 2) {\n const element_r14 = ctx.element;\n i0.ɵɵproperty(\"value\", element_r14.value)(\"showPercentage\", true);\n }\n}\nfunction ViewTemplatesComponent_ng_template_28_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"gui-percentage-view\", 15);\n }\n if (rf & 2) {\n const element_r15 = ctx.element;\n i0.ɵɵproperty(\"value\", element_r15.value);\n }\n}\nconst _c24 = [\"input\"];\nconst _c25 = [\"datepicker\"];\nconst _c26 = [\"string\"];\nconst _c27 = [\"boolean\"];\nconst _c28 = [\"empty\"];\nfunction EditTemplatesComponent_ng_template_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"gui-string-edit\", 5);\n }\n if (rf & 2) {\n const valueChanges_r1 = ctx.valueChanges;\n const value_r2 = ctx.value;\n const status_r3 = ctx.status;\n const focus_r4 = ctx.focus;\n i0.ɵɵproperty(\"valueChanges\", valueChanges_r1)(\"value\", value_r2)(\"status\", status_r3)(\"focus\", focus_r4);\n }\n}\nfunction EditTemplatesComponent_ng_template_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"gui-number-edit\", 5);\n }\n if (rf & 2) {\n const valueChanges_r5 = ctx.valueChanges;\n const value_r6 = ctx.value;\n const status_r7 = ctx.status;\n const focus_r8 = ctx.focus;\n i0.ɵɵproperty(\"valueChanges\", valueChanges_r5)(\"value\", value_r6)(\"status\", status_r7)(\"focus\", focus_r8);\n }\n}\nfunction EditTemplatesComponent_ng_template_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"gui-boolean-edit\", 5);\n }\n if (rf & 2) {\n const valueChanges_r9 = ctx.valueChanges;\n const value_r10 = ctx.value;\n const status_r11 = ctx.status;\n const focus_r12 = ctx.focus;\n i0.ɵɵproperty(\"valueChanges\", valueChanges_r9)(\"value\", value_r10)(\"status\", status_r11)(\"focus\", focus_r12);\n }\n}\nfunction EditTemplatesComponent_ng_template_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"gui-date-edit\", 6);\n }\n if (rf & 2) {\n const valueChanges_r13 = ctx.valueChanges;\n const value_r14 = ctx.value;\n const status_r15 = ctx.status;\n const focus_r16 = ctx.focus;\n const parent_r17 = ctx.parent;\n i0.ɵɵproperty(\"valueChanges\", valueChanges_r13)(\"value\", value_r14)(\"status\", status_r15)(\"focus\", focus_r16)(\"parent\", parent_r17);\n }\n}\nfunction EditTemplatesComponent_ng_template_8_Template(rf, ctx) {}\nconst _c29 = [\"gui-structure-summaries-panel\", \"\", \"enabled\", \"\"];\nfunction StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 4);\n }\n}\nfunction StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 7)(1, \"span\", 8);\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"span\", 9);\n i0.ɵɵtext(5);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const column_r1 = i0.ɵɵnextContext(2).$implicit;\n const localState_r2 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"gui-tooltip\", localState_r2.summariesTranslations.countTooltip);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 3, \"summariesCount\"));\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(localState_r2.summaries.get(column_r1.getFieldId().getId()).count);\n }\n}\nfunction StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 7)(1, \"span\", 8);\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"span\", 9);\n i0.ɵɵtext(5);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const column_r1 = i0.ɵɵnextContext(2).$implicit;\n const localState_r2 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"gui-tooltip\", localState_r2.summariesTranslations.distinctTooltip);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 3, \"summariesDist\"));\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(localState_r2.summaries.get(column_r1.getFieldId().getId()).distinct);\n }\n}\nfunction StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 7)(1, \"span\");\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"span\", 9);\n i0.ɵɵtext(5);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const column_r1 = i0.ɵɵnextContext(2).$implicit;\n const localState_r2 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(3, 2, \"summariesSum\"), \" \");\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(localState_r2.summaries.get(column_r1.getFieldId().getId()).sum);\n }\n}\nfunction StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 7)(1, \"span\", 8);\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"span\", 9);\n i0.ɵɵtext(5);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const column_r1 = i0.ɵɵnextContext(2).$implicit;\n const localState_r2 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"gui-tooltip\", localState_r2.summariesTranslations.averageTooltip);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 3, \"summariesAvg\"));\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(localState_r2.summaries.get(column_r1.getFieldId().getId()).average);\n }\n}\nfunction StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 7)(1, \"span\", 8);\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"span\", 9);\n i0.ɵɵtext(5);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const column_r1 = i0.ɵɵnextContext(2).$implicit;\n const localState_r2 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"gui-tooltip\", localState_r2.summariesTranslations.minTooltip);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(3, 3, \"summariesMin\"), \" \");\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(localState_r2.summaries.get(column_r1.getFieldId().getId()).min);\n }\n}\nfunction StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 7)(1, \"span\", 8);\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"span\", 9);\n i0.ɵɵtext(5);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const column_r1 = i0.ɵɵnextContext(2).$implicit;\n const localState_r2 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"gui-tooltip\", localState_r2.summariesTranslations.maxTooltip);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(3, 3, \"summariesMax\"), \" \");\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(localState_r2.summaries.get(column_r1.getFieldId().getId()).max);\n }\n}\nfunction StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 7)(1, \"span\", 8);\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"span\", 9);\n i0.ɵɵtext(5);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const column_r1 = i0.ɵɵnextContext(2).$implicit;\n const localState_r2 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"gui-tooltip\", localState_r2.summariesTranslations.medTooltip);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 3, \"summariesMed\"));\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(localState_r2.summaries.get(column_r1.getFieldId().getId()).median);\n }\n}\nfunction StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 7)(1, \"span\");\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"span\", 9);\n i0.ɵɵtext(5);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const column_r1 = i0.ɵɵnextContext(2).$implicit;\n const localState_r2 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, \"summariesTruthy\"));\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(localState_r2.summaries.get(column_r1.getFieldId().getId()).truthy);\n }\n}\nfunction StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_9_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 7)(1, \"span\");\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"span\", 9);\n i0.ɵɵtext(5);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const column_r1 = i0.ɵɵnextContext(2).$implicit;\n const localState_r2 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, \"summariesFalsy\"));\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(localState_r2.summaries.get(column_r1.getFieldId().getId()).falsy);\n }\n}\nfunction StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_1_Template, 6, 5, \"div\", 6)(2, StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_2_Template, 6, 5, \"div\", 6)(3, StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_3_Template, 6, 4, \"div\", 6)(4, StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_4_Template, 6, 5, \"div\", 6)(5, StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_5_Template, 6, 5, \"div\", 6)(6, StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_6_Template, 6, 5, \"div\", 6)(7, StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_7_Template, 6, 5, \"div\", 6)(8, StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_8_Template, 6, 4, \"div\", 6)(9, StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_div_9_Template, 6, 4, \"div\", 6);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const column_r1 = i0.ɵɵnextContext().$implicit;\n const localState_r2 = i0.ɵɵnextContext(2).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.isSummariesTypePresent(localState_r2.summaries.get(column_r1.getFieldId().getId()).count));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.isSummariesTypePresent(localState_r2.summaries.get(column_r1.getFieldId().getId()).distinct));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.isSummariesTypePresent(localState_r2.summaries.get(column_r1.getFieldId().getId()).sum));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.isSummariesTypePresent(localState_r2.summaries.get(column_r1.getFieldId().getId()).average));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.isSummariesTypePresent(localState_r2.summaries.get(column_r1.getFieldId().getId()).min));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.isSummariesTypePresent(localState_r2.summaries.get(column_r1.getFieldId().getId()).max));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.isSummariesTypePresent(localState_r2.summaries.get(column_r1.getFieldId().getId()).median));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.isSummariesTypePresent(localState_r2.summaries.get(column_r1.getFieldId().getId()).truthy));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.isSummariesTypePresent(localState_r2.summaries.get(column_r1.getFieldId().getId()).falsy));\n }\n}\nfunction StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 5);\n i0.ɵɵtemplate(1, StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_ng_container_1_Template, 10, 9, \"ng-container\", 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const column_r1 = ctx.$implicit;\n const localState_r2 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵstyleProp(\"width\", column_r1.width, \"px\");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r2.summaries && !!localState_r2.summaries.get(column_r1.getFieldId().getId()));\n }\n}\nfunction StructureSummariesPanelComponent_ng_container_0_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_1_Template, 1, 0, \"div\", 2);\n i0.ɵɵpipe(2, \"guiPush\");\n i0.ɵɵtemplate(3, StructureSummariesPanelComponent_ng_container_0_ng_container_1_div_3_Template, 2, 3, \"div\", 3);\n i0.ɵɵpipe(4, \"guiPush\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(2, 2, ctx_r2.checkboxSelection$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(4, 4, ctx_r2.headerColumns$));\n }\n}\nfunction StructureSummariesPanelComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureSummariesPanelComponent_ng_container_0_ng_container_1_Template, 5, 6, \"ng-container\", 1);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const localState_r2 = ctx.$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.enabled && localState_r2.summaries && !localState_r2.sourceEmpty);\n }\n}\nconst _c30 = [\"gui-info-dialog\", \"\"];\nconst _c31 = [\"gui-structure-column-manager\", \"\"];\nfunction StructureColumnManagerComponent_ol_0_li_1_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction StructureColumnManagerComponent_ol_0_li_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"li\", 3);\n i0.ɵɵlistener(\"click\", function StructureColumnManagerComponent_ol_0_li_1_Template_li_click_0_listener() {\n const column_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.toggleColumn(column_r2));\n });\n i0.ɵɵelementStart(1, \"gui-checkbox\", 4);\n i0.ɵɵtemplate(2, StructureColumnManagerComponent_ol_0_li_1_ng_container_2_Template, 1, 0, \"ng-container\", 5);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const column_r2 = ctx.$implicit;\n const localState_r4 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"checked\", column_r2.isEnabled())(\"disabled\", localState_r4.enabledColumnsCount === 1 && column_r2.isEnabled());\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", column_r2.viewTemplate)(\"ngTemplateOutletContext\", column_r2.context);\n }\n}\nfunction StructureColumnManagerComponent_ol_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ol\", 1);\n i0.ɵɵtemplate(1, StructureColumnManagerComponent_ol_0_li_1_Template, 3, 4, \"li\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const localState_r4 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", localState_r4.columns);\n }\n}\nconst _c32 = [\"gui-structure-dialog-column-manager\", \"\"];\nconst _c33 = [\"gui-structure-schema-manager\", \"\"];\nfunction StructureSchemaMangerComponent_li_17_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"li\", 7);\n i0.ɵɵlistener(\"click\", function StructureSchemaMangerComponent_li_17_Template_li_click_0_listener() {\n const verticalGrid_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.toggleVerticalGrid(verticalGrid_r2));\n });\n i0.ɵɵelementStart(1, \"gui-checkbox\", 8);\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"guiTranslate\");\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const verticalGrid_r2 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"checked\", verticalGrid_r2);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(3, 2, \"themeManagerModalVerticalGrid\"), \" \");\n }\n}\nfunction StructureSchemaMangerComponent_li_18_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"li\", 7);\n i0.ɵɵlistener(\"click\", function StructureSchemaMangerComponent_li_18_Template_li_click_0_listener() {\n const horizontalGrid_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.toggleHorizontalGrid(horizontalGrid_r5));\n });\n i0.ɵɵelementStart(1, \"gui-checkbox\", 8);\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"guiTranslate\");\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const horizontalGrid_r5 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"checked\", horizontalGrid_r5);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(3, 2, \"themeManagerModalHorizontalGrid\"), \" \");\n }\n}\nconst _c34 = [\"gui-schema-manager-dialog\", \"\"];\nconst _c35 = [\"gui-structure-column-manager-icon\", \"\"];\nconst _c36 = [\"gui-structure-schema-manager-icon\", \"\"];\nconst _c37 = [\"gui-active-search\", \"\"];\nfunction ActiveSearchComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"div\");\n i0.ɵɵtext(2, \" Active search by: \");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"div\")(4, \"gui-chip\");\n i0.ɵɵtext(5);\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(6, \"div\")(7, \"button\", 1);\n i0.ɵɵlistener(\"click\", function ActiveSearchComponent_ng_container_0_Template_button_click_7_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.clearSearch());\n });\n i0.ɵɵtext(8, \" Clear search \");\n i0.ɵɵelementEnd()();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const phrase_r3 = ctx.$implicit;\n i0.ɵɵadvance(5);\n i0.ɵɵtextInterpolate(phrase_r3);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"outline\", true)(\"primary\", true);\n }\n}\nconst _c38 = [\"gui-active-filter-list\", \"\"];\nfunction ActiveFilterListComponent_ng_container_0_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵtext(1);\n i0.ɵɵelementStart(2, \"span\", 3);\n i0.ɵɵlistener(\"click\", function ActiveFilterListComponent_ng_container_0_div_1_Template_span_click_2_listener() {\n const filter_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.removeFilter(filter_r2));\n });\n i0.ɵɵtext(3, \"X\");\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const filter_r2 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", filter_r2.getText(), \" \");\n }\n}\nfunction ActiveFilterListComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, ActiveFilterListComponent_ng_container_0_div_1_Template, 4, 1, \"div\", 2);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const activeFilters_r4 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", activeFilters_r4);\n }\n}\nconst _c39 = [\"gui-structure-info-icon\", \"\"];\nconst _c40 = [\"gui-structure-info-panel\", \"\"];\nfunction StructureInfoPanelComponent_ng_container_0_div_1_div_1_ng_container_1_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtext(1);\n i0.ɵɵpipe(2, \"guiTranslate\");\n i0.ɵɵelementStart(3, \"b\");\n i0.ɵɵtext(4);\n i0.ɵɵpipe(5, \"numberFormatter\");\n i0.ɵɵelementEnd();\n i0.ɵɵtext(6);\n i0.ɵɵpipe(7, \"guiTranslate\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const totalItemsSize_r1 = i0.ɵɵnextContext(3).$implicit;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(2, 3, \"infoPanelShowing\"), \" \");\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 5, totalItemsSize_r1));\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(7, 7, \"infoPanelItems\"), \" \");\n }\n}\nfunction StructureInfoPanelComponent_ng_container_0_div_1_div_1_ng_container_1_span_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 5);\n i0.ɵɵtext(1);\n i0.ɵɵpipe(2, \"guiTranslate\");\n i0.ɵɵelementStart(3, \"b\");\n i0.ɵɵtext(4);\n i0.ɵɵpipe(5, \"numberFormatter\");\n i0.ɵɵelementEnd();\n i0.ɵɵtext(6);\n i0.ɵɵpipe(7, \"guiTranslate\");\n i0.ɵɵelementStart(8, \"b\");\n i0.ɵɵtext(9);\n i0.ɵɵpipe(10, \"numberFormatter\");\n i0.ɵɵelementEnd();\n i0.ɵɵtext(11);\n i0.ɵɵpipe(12, \"guiTranslate\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const totalItemsSize_r1 = i0.ɵɵnextContext(3).$implicit;\n const localState_r2 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(2, 5, \"infoPanelShowing\"), \" \");\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 7, localState_r2.preparedItemsSize));\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(7, 9, \"infoPanelOutOf\"), \" \");\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 11, totalItemsSize_r1));\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(12, 13, \"infoPanelItems\"), \" \");\n }\n}\nfunction StructureInfoPanelComponent_ng_container_0_div_1_div_1_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureInfoPanelComponent_ng_container_0_div_1_div_1_ng_container_1_ng_container_1_Template, 8, 9, \"ng-container\", 3)(2, StructureInfoPanelComponent_ng_container_0_div_1_div_1_ng_container_1_span_2_Template, 13, 15, \"span\", 4);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const totalItemsSize_r1 = i0.ɵɵnextContext(2).$implicit;\n const localState_r2 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r2.preparedItemsSize === totalItemsSize_r1);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r2.preparedItemsSize !== totalItemsSize_r1);\n }\n}\nfunction StructureInfoPanelComponent_ng_container_0_div_1_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵtemplate(1, StructureInfoPanelComponent_ng_container_0_div_1_div_1_ng_container_1_Template, 3, 2, \"ng-container\", 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const totalItemsSize_r1 = i0.ɵɵnextContext().$implicit;\n const localState_r2 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r2.preparedItemsSize !== undefined && totalItemsSize_r1 !== undefined);\n }\n}\nfunction StructureInfoPanelComponent_ng_container_0_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵtemplate(1, StructureInfoPanelComponent_ng_container_0_div_1_div_1_Template, 2, 1, \"div\", 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const localState_r2 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r2.infoPanelConfig.isSourceSizeEnabled());\n }\n}\nfunction StructureInfoPanelComponent_ng_container_0_div_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 6);\n i0.ɵɵlistener(\"click\", function StructureInfoPanelComponent_ng_container_0_div_4_Template_div_click_0_listener() {\n i0.ɵɵrestoreView(_r3);\n const ctx_r3 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r3.openSchemaManager());\n });\n i0.ɵɵelement(1, \"div\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const localState_r2 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"gui-tooltip\", localState_r2.translations.infoPanelThemeMangerTooltipText);\n }\n}\nfunction StructureInfoPanelComponent_ng_container_0_div_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 6);\n i0.ɵɵlistener(\"click\", function StructureInfoPanelComponent_ng_container_0_div_5_Template_div_click_0_listener() {\n i0.ɵɵrestoreView(_r5);\n const ctx_r3 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r3.openColumnManager());\n });\n i0.ɵɵelement(1, \"div\", 8);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const localState_r2 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"gui-tooltip\", localState_r2.translations.infoPanelColumnManagerTooltipText);\n }\n}\nfunction StructureInfoPanelComponent_ng_container_0_div_6_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 6);\n i0.ɵɵlistener(\"click\", function StructureInfoPanelComponent_ng_container_0_div_6_Template_div_click_0_listener() {\n i0.ɵɵrestoreView(_r6);\n const ctx_r3 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r3.openInfo());\n });\n i0.ɵɵelement(1, \"div\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const localState_r2 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"gui-tooltip\", localState_r2.translations.infoPanelInfoTooltipText);\n }\n}\nfunction StructureInfoPanelComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureInfoPanelComponent_ng_container_0_div_1_Template, 2, 1, \"div\", 0);\n i0.ɵɵelementStart(2, \"div\")(3, \"div\", 1);\n i0.ɵɵtemplate(4, StructureInfoPanelComponent_ng_container_0_div_4_Template, 2, 1, \"div\", 2)(5, StructureInfoPanelComponent_ng_container_0_div_5_Template, 2, 1, \"div\", 2)(6, StructureInfoPanelComponent_ng_container_0_div_6_Template, 2, 1, \"div\", 2);\n i0.ɵɵelementEnd()();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const localState_r2 = ctx.$implicit;\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"guiLet\", ctx_r3.totalItemsSize$);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", localState_r2.infoPanelConfig.isSchemaManagerEnabled());\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r2.infoPanelConfig.isColumnsManagerEnabled());\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r2.infoPanelConfig.isInfoDialogEnabled());\n }\n}\nconst _c41 = [\"gui-search-icon\", \"\"];\nconst _c42 = [\"formRef\"];\nconst _c43 = [\"gui-search-bar\", \"\"];\nfunction SearchComponent_ng_container_0_span_6_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"span\", 6);\n i0.ɵɵlistener(\"click\", function SearchComponent_ng_container_0_span_6_Template_span_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.clear());\n });\n i0.ɵɵelementEnd();\n }\n}\nfunction SearchComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"form\", 2, 0);\n i0.ɵɵelement(3, \"div\", 3)(4, \"input\", 4);\n i0.ɵɵpipe(5, \"guiPush\");\n i0.ɵɵtemplate(6, SearchComponent_ng_container_0_span_6_Template, 1, 0, \"span\", 5);\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"formGroup\", ctx_r1.searchForm);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"placeholder\", i0.ɵɵpipeBind1(5, 3, ctx_r1.placeholder$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx_r1.searchForm.controls[\"searchPhrase\"].value);\n }\n}\nconst _c44 = [\"gui-structure-top-panel\", \"\"];\nconst _c45 = [\"gui-empty-source\", \"\", \"items\", \"\"];\nfunction EmptySourceComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtext(1);\n i0.ɵɵpipe(2, \"guiTranslate\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(2, 1, \"sourceEmpty\"), \"\\n\");\n }\n}\nconst _c46 = [\"gui-structure-menu-column-manager\", \"\"];\nconst _c47 = [\"gui-unique-value-list\", \"\", \"fieldId\", \"\"];\nfunction UniqueValueListComponent_ng_container_0_div_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\")(1, \"gui-checkbox\", 6);\n i0.ɵɵlistener(\"changed\", function UniqueValueListComponent_ng_container_0_div_4_Template_gui_checkbox_changed_1_listener() {\n const value_r4 = i0.ɵɵrestoreView(_r3).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.toggleSelect(value_r4));\n });\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const value_r4 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"checked\", value_r4.isEnabled());\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", value_r4.getValue(), \" \");\n }\n}\nfunction UniqueValueListComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"gui-checkbox\", 1);\n i0.ɵɵlistener(\"changed\", function UniqueValueListComponent_ng_container_0_Template_gui_checkbox_changed_1_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.toggleAllSelect());\n });\n i0.ɵɵtext(2, \" Select all \");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"div\", 2);\n i0.ɵɵtemplate(4, UniqueValueListComponent_ng_container_0_div_4_Template, 3, 2, \"div\", 3);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(5, \"div\", 4)(6, \"button\", 5);\n i0.ɵɵlistener(\"click\", function UniqueValueListComponent_ng_container_0_Template_button_click_6_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.clearFilters());\n });\n i0.ɵɵtext(7, \" Clear \");\n i0.ɵɵelementEnd()();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const state_r5 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"checked\", state_r5.selectAllChecked)(\"indeterminate\", state_r5.selectAllIndeterminate);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngForOf\", state_r5.uniqueValues);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"outline\", true)(\"primary\", true);\n }\n}\nconst _c48 = [\"gui-structure-arrow-icon\", \"\"];\nconst _c49 = [\"gui-structure-column-config-sort\", \"\", \"column\", \"\", \"dropdownTextTranslation\", \"\"];\nfunction StructureColumnConfigSortComponent_gui_dropdown_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"gui-dropdown\", 1)(1, \"gui-dropdown-item\", 2);\n i0.ɵɵlistener(\"click\", function StructureColumnConfigSortComponent_gui_dropdown_0_Template_gui_dropdown_item_click_1_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.setSortOrder(ctx_r1.status.ASC));\n });\n i0.ɵɵelementStart(2, \"div\", 3);\n i0.ɵɵtext(3);\n i0.ɵɵpipe(4, \"guiTranslate\");\n i0.ɵɵelement(5, \"div\", 4);\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(6, \"gui-dropdown-item\", 2);\n i0.ɵɵlistener(\"click\", function StructureColumnConfigSortComponent_gui_dropdown_0_Template_gui_dropdown_item_click_6_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.setSortOrder(ctx_r1.status.DESC));\n });\n i0.ɵɵelementStart(7, \"div\", 3);\n i0.ɵɵtext(8);\n i0.ɵɵpipe(9, \"guiTranslate\");\n i0.ɵɵelement(10, \"div\", 5);\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(11, \"gui-dropdown-item\", 2);\n i0.ɵɵlistener(\"click\", function StructureColumnConfigSortComponent_gui_dropdown_0_Template_gui_dropdown_item_click_11_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.setSortOrder(ctx_r1.status.NONE));\n });\n i0.ɵɵtext(12);\n i0.ɵɵpipe(13, \"guiTranslate\");\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"dropdownText\", ctx_r1.dropdownTextTranslation)(\"placement\", ctx_r1.placement)(\"showOnHover\", true)(\"width\", 225);\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"gui-header-item-active\", ctx_r1.isAscSort());\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(4, 16, \"headerMenuMainTabColumnSortAscending\"), \" \");\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"sort\", true);\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"gui-header-item-active\", ctx_r1.isDescSort());\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(9, 18, \"headerMenuMainTabColumnSortDescending\"), \" \");\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"position\", ctx_r1.StructureArrowPosition.DOWN)(\"sort\", true);\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"gui-header-item-active\", ctx_r1.isNoneSort());\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(13, 20, \"headerMenuMainTabColumnSortNone\"), \" \");\n }\n}\nconst _c50 = [\"gui-structure-column-config-column-hide\", \"\"];\nconst _c51 = [\"gui-structure-column-config-column-move\", \"\", \"column\", \"\"];\nconst _c52 = [\"headerSortMenu\"];\nconst _c53 = [\"gui-column-config\", \"\"];\nfunction StructureColumnConfigComponent_ng_container_0_div_1_ng_container_2_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 10);\n }\n if (rf & 2) {\n const localState_r2 = i0.ɵɵnextContext(3).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"column\", ctx_r2.column)(\"dropdownTextTranslation\", localState_r2.translations.headerMenuMainTabColumnSort);\n }\n}\nfunction StructureColumnConfigComponent_ng_container_0_div_1_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"gui-tab-item\", 5);\n i0.ɵɵtemplate(2, StructureColumnConfigComponent_ng_container_0_div_1_ng_container_2_div_2_Template, 1, 2, \"div\", 6);\n i0.ɵɵelementStart(3, \"div\", 7);\n i0.ɵɵlistener(\"columnHidden\", function StructureColumnConfigComponent_ng_container_0_div_1_ng_container_2_Template_div_columnHidden_3_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r2 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r2.hideColumn());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"div\", 8);\n i0.ɵɵlistener(\"click\", function StructureColumnConfigComponent_ng_container_0_div_1_ng_container_2_Template_div_click_4_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r2 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r2.highlightColumn());\n });\n i0.ɵɵtext(5);\n i0.ɵɵpipe(6, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(7, \"div\", 9);\n i0.ɵɵlistener(\"movedLeft\", function StructureColumnConfigComponent_ng_container_0_div_1_ng_container_2_Template_div_movedLeft_7_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r2 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r2.moveLeft());\n })(\"movedRight\", function StructureColumnConfigComponent_ng_container_0_div_1_ng_container_2_Template_div_movedRight_7_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r2 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r2.moveRight());\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const localState_r2 = i0.ɵɵnextContext(2).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"tab\", localState_r2.translations.headerMenuMainTab);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.column.isSortEnabled());\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"column\", ctx_r2.column);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(6, 5, \"headerMenuMainTabHighlightColumn\"), \" \");\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"column\", ctx_r2.column);\n }\n}\nfunction StructureColumnConfigComponent_ng_container_0_div_1_ng_container_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"gui-tab-item\", 11);\n i0.ɵɵelement(2, \"div\", 12);\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const localState_r2 = i0.ɵɵnextContext(2).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"tab\", localState_r2.translations.headerMenuFilterTab);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"fieldId\", ctx_r2.column.getFieldId());\n }\n}\nfunction StructureColumnConfigComponent_ng_container_0_div_1_ng_container_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"gui-tab-item\", 11);\n i0.ɵɵelement(2, \"div\", 13);\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const localState_r2 = i0.ɵɵnextContext(2).$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"tab\", localState_r2.translations.headerMenuColumnsTab);\n }\n}\nfunction StructureColumnConfigComponent_ng_container_0_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 2)(1, \"gui-tab\", 3);\n i0.ɵɵtemplate(2, StructureColumnConfigComponent_ng_container_0_div_1_ng_container_2_Template, 8, 7, \"ng-container\", 4)(3, StructureColumnConfigComponent_ng_container_0_div_1_ng_container_3_Template, 3, 2, \"ng-container\", 4)(4, StructureColumnConfigComponent_ng_container_0_div_1_ng_container_4_Template, 3, 1, \"ng-container\", 4);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const localState_r2 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"active\", localState_r2.config.getActiveMenu())(\"menu\", localState_r2.config.getMenus());\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r2.config.isMainEnabled());\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r2.config.isFilteringEnabled());\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r2.config.isColumnManagerEnabled());\n }\n}\nfunction StructureColumnConfigComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureColumnConfigComponent_ng_container_0_div_1_Template, 5, 5, \"div\", 1);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const localState_r2 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r2.isEnabled);\n }\n}\nconst _c54 = [\"gui-select-custom-modal\", \"\"];\nfunction SelectCustomModalComponent_ul_0_li_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"li\", 2);\n i0.ɵɵlistener(\"click\", function SelectCustomModalComponent_ul_0_li_1_Template_li_click_0_listener() {\n const sel_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.selectCustom(sel_r2.getCustomSelectId()));\n });\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const sel_r2 = ctx.$implicit;\n i0.ɵɵattribute(\"id\", sel_r2.key);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", sel_r2.text, \" \");\n }\n}\nfunction SelectCustomModalComponent_ul_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ul\");\n i0.ɵɵtemplate(1, SelectCustomModalComponent_ul_0_li_1_Template, 2, 2, \"li\", 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const selection_r4 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", selection_r4.getSelections());\n }\n}\nconst _c55 = [\"gui-select-all\", \"\"];\nfunction SelectAllComponent_ng_container_0_gui_checkbox_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"gui-checkbox\", 2);\n i0.ɵɵlistener(\"changed\", function SelectAllComponent_ng_container_0_gui_checkbox_1_Template_gui_checkbox_changed_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const localState_r2 = i0.ɵɵnextContext().$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.toggleSelectAll(localState_r2.isAllIndeterminate, localState_r2.isAllChecked));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const localState_r2 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵproperty(\"checked\", localState_r2.isAllChecked)(\"gui-tooltip\", \"Select\")(\"indeterminate\", localState_r2.isAllIndeterminate);\n }\n}\nfunction SelectAllComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, SelectAllComponent_ng_container_0_gui_checkbox_1_Template, 1, 3, \"gui-checkbox\", 1);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const localState_r2 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r2.modeMulti);\n }\n}\nconst _c56 = [\"gui-structure-menu-icon\", \"\"];\nconst _c57 = [\"headerDialogContainer\"];\nconst _c58 = [\"gui-structure-column-config-trigger\", \"\"];\nfunction StructureColumnConfigTriggerComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 2, 0);\n i0.ɵɵlistener(\"click\", function StructureColumnConfigTriggerComponent_div_0_Template_div_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.openConfigDialog());\n });\n i0.ɵɵelement(2, \"div\", 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngClass\", \"gui-header-menu-icon\");\n }\n}\nconst _c59 = [\"selectCustomContainer\"];\nconst _c60 = [\"gui-structure-header-columns\", \"\", \"columns\", \"\"];\nconst _c61 = a0 => ({\n \"gui-header-sortable\": a0\n});\nfunction StructureHeaderColumnsComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 2);\n i0.ɵɵelement(1, \"div\", 3);\n i0.ɵɵelementEnd();\n }\n}\nfunction StructureHeaderColumnsComponent_div_1_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction StructureHeaderColumnsComponent_div_1_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 10);\n }\n if (rf & 2) {\n const column_r2 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵproperty(\"position\", column_r2.getSortStatus())(\"sort\", true);\n }\n}\nfunction StructureHeaderColumnsComponent_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 4);\n i0.ɵɵlistener(\"click\", function StructureHeaderColumnsComponent_div_1_Template_div_click_0_listener() {\n const column_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.toggleSort(column_r2));\n });\n i0.ɵɵelementStart(1, \"div\", 5);\n i0.ɵɵtemplate(2, StructureHeaderColumnsComponent_div_1_ng_container_2_Template, 1, 0, \"ng-container\", 6)(3, StructureHeaderColumnsComponent_div_1_div_3_Template, 1, 2, \"div\", 7);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"div\", 8);\n i0.ɵɵelement(5, \"div\", 9);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const column_r2 = ctx.$implicit;\n i0.ɵɵstyleMap(column_r2.getStyles());\n i0.ɵɵclassMap(column_r2.getCssClasses());\n i0.ɵɵstyleProp(\"width\", column_r2.width, \"px\");\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction1(11, _c61, column_r2.isSortEnabled()));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngTemplateOutlet\", column_r2.viewTemplate)(\"ngTemplateOutletContext\", column_r2.context);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !column_r2.isNoSort());\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"column\", column_r2);\n }\n}\nconst _c62 = [\"gui-structure-header-groups\", \"\", \"groups\", \"\", \"checkboxSelection\", \"\"];\nfunction StructureHeaderGroupsComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 2);\n i0.ɵɵelement(1, \"div\", 3);\n i0.ɵɵelementEnd();\n }\n}\nfunction StructureHeaderGroupsComponent_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 4)(1, \"div\", 5);\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const group_r1 = ctx.$implicit;\n i0.ɵɵstyleProp(\"width\", group_r1.width, \"px\");\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", group_r1.header, \" \");\n }\n}\nconst _c63 = [\"gui-structure-header-filters\", \"\", \"columns\", \"\"];\nconst _c64 = () => [\"has value\", \"is the same as\", \"starts with\", \"ends with\"];\nfunction StructureHeaderFiltersComponent_ng_container_0_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 2)(1, \"button\", 3);\n i0.ɵɵlistener(\"click\", function StructureHeaderFiltersComponent_ng_container_0_div_1_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.turnOnFilterMode());\n });\n i0.ɵɵtext(2, \"Add Filter\");\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const cell_r3 = ctx.$implicit;\n i0.ɵɵstyleProp(\"width\", cell_r3.width, \"px\");\n }\n}\nfunction StructureHeaderFiltersComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureHeaderFiltersComponent_ng_container_0_div_1_Template, 3, 2, \"div\", 1);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.columns);\n }\n}\nfunction StructureHeaderFiltersComponent_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelement(1, \"gui-select\", 4);\n i0.ɵɵelementStart(2, \"form\", 5);\n i0.ɵɵelement(3, \"input\", 6);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"button\", 7);\n i0.ɵɵlistener(\"click\", function StructureHeaderFiltersComponent_ng_container_1_Template_button_click_4_listener() {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.clearFilters());\n });\n i0.ɵɵtext(5, \"Clear All\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(6, \"button\", 7);\n i0.ɵɵlistener(\"click\", function StructureHeaderFiltersComponent_ng_container_1_Template_button_click_6_listener() {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.turnOffFilterMode());\n });\n i0.ɵɵtext(7, \"Close\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"options\", i0.ɵɵpureFunction0(4, _c64))(\"selected\", \"has value\");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"formGroup\", ctx_r1.filterForm);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"formControlName\", ctx_r1.filterFieldName);\n }\n}\nconst _c65 = [\"gui-structure-header\", \"\"];\nfunction StructureHeaderComponent_ng_container_0_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 3);\n }\n if (rf & 2) {\n const localState_r1 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵproperty(\"checkboxSelection\", localState_r1.showSelection)(\"groups\", localState_r1.groups);\n }\n}\nfunction StructureHeaderComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureHeaderComponent_ng_container_0_div_1_Template, 1, 2, \"div\", 2);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const localState_r1 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r1.showGroups);\n }\n}\nfunction StructureHeaderComponent_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 4);\n }\n if (rf & 2) {\n const localState_r2 = ctx.$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"columns\", localState_r2.headerColumns)(\"guiStyle\", ctx_r2.width$)(\"showSelection\", localState_r2.showSelection);\n }\n}\nfunction StructureHeaderComponent_ng_container_2_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 6);\n }\n if (rf & 2) {\n const localState_r4 = i0.ɵɵnextContext().$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"columns\", localState_r4.headerColumns)(\"guiStyle\", ctx_r2.filterHeaderHeight$);\n }\n}\nfunction StructureHeaderComponent_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureHeaderComponent_ng_container_2_div_1_Template, 1, 2, \"div\", 5);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const localState_r4 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", localState_r4.filterRowEnabled);\n }\n}\nconst _c66 = [\"cellContainer\"];\nconst _c67 = [\"gui-structure-cell-edit-boolean\", \"\", \"entity\", \"\", \"cell\", \"\"];\nfunction StructureCellEditBooleanComponent_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nconst _c68 = [\"gui-structure-cell\", \"\", \"entity\", \"\", \"cell\", \"\"];\nconst _c69 = (a0, a1, a2, a3) => ({\n \"gui-cell-view\": true,\n \"gui-align-left\": a0,\n \"gui-align-center\": a1,\n \"gui-align-right\": a2,\n \"gui-column-highlighted\": a3\n});\nconst _c70 = (a0, a1, a2, a3) => ({\n element: a0,\n index: a1,\n value: a2,\n item: a3\n});\nfunction StructureCellComponent_ng_container_0_span_1_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction StructureCellComponent_ng_container_0_span_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"span\", 3);\n i0.ɵɵlistener(\"click\", function StructureCellComponent_ng_container_0_span_1_Template_span_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.enterEditMode());\n });\n i0.ɵɵtemplate(1, StructureCellComponent_ng_container_0_span_1_ng_container_1_Template, 1, 0, \"ng-container\", 4);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction4(3, _c69, ctx_r1.cell.isAlignLeft(), ctx_r1.cell.isAlignCenter(), ctx_r1.cell.isAlignRight(), ctx_r1.isHighlighted));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r1.cell.template)(\"ngTemplateOutletContext\", i0.ɵɵpureFunction4(8, _c70, ctx_r1.cell.getValue(ctx_r1.entity, ctx_r1.searchPhrase), ctx_r1.entity.getPosition(), ctx_r1.cell.getValue(ctx_r1.entity, ctx_r1.searchPhrase).value, ctx_r1.entity.getSourceItem()));\n }\n}\nfunction StructureCellComponent_ng_container_0_span_2_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction StructureCellComponent_ng_container_0_span_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 5);\n i0.ɵɵtemplate(1, StructureCellComponent_ng_container_0_span_2_ng_container_1_Template, 1, 0, \"ng-container\", 4);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r1.cell.editTemplate)(\"ngTemplateOutletContext\", ctx_r1.editContext);\n }\n}\nfunction StructureCellComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureCellComponent_ng_container_0_span_1_Template, 2, 13, \"span\", 1)(2, StructureCellComponent_ng_container_0_span_2_Template, 2, 2, \"span\", 2);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx_r1.inEditMode);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.inEditMode);\n }\n}\nfunction StructureCellComponent_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelement(1, \"div\", 6);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"cell\", ctx_r1.cell)(\"entity\", ctx_r1.entity);\n }\n}\nconst _c71 = [\"gui-structure-row\", \"\"];\nfunction StructureRowComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 3)(1, \"gui-checkbox\", 4);\n i0.ɵɵlistener(\"changed\", function StructureRowComponent_div_0_Template_gui_checkbox_changed_1_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.selectCheckbox());\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"checked\", ctx_r1.selectedItem);\n }\n}\nfunction StructureRowComponent_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 5)(1, \"gui-radio-button\", 4);\n i0.ɵɵlistener(\"changed\", function StructureRowComponent_div_1_Template_gui_radio_button_changed_1_listener() {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.selectRadio());\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"checked\", ctx_r1.selectedItem);\n }\n}\nfunction StructureRowComponent_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 6);\n }\n if (rf & 2) {\n const column_r4 = ctx.$implicit;\n const i_r5 = ctx.index;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵstyleProp(\"width\", column_r4.width, \"px\");\n i0.ɵɵproperty(\"cellEditorManager\", ctx_r1.cellEditing)(\"cell\", column_r4)(\"columnIndex\", i_r5)(\"editMode\", ctx_r1.editMode)(\"entity\", ctx_r1.entity)(\"rowIndex\", ctx_r1.index)(\"searchPhrase\", ctx_r1.searchPhrase);\n }\n}\nconst _c72 = [\"gui-structure-content\", \"\"];\nconst _c73 = (a0, a1) => ({\n \"even\": a0,\n \"odd\": a1\n});\nconst _c74 = a0 => ({\n \"transform\": a0\n});\nfunction StructureContentComponent_div_0_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 3);\n i0.ɵɵlistener(\"click\", function StructureContentComponent_div_0_div_1_Template_div_click_0_listener() {\n const entity_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const localState_r3 = i0.ɵɵnextContext().$implicit;\n const ctx_r3 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r3.toggleSelectedRow(entity_r2, localState_r3.selectionEnabled, localState_r3.checkboxSelection, localState_r3.radioSelection));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const entity_r2 = ctx.$implicit;\n const index_r5 = ctx.index;\n const localState_r3 = i0.ɵɵnextContext().$implicit;\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵstyleProp(\"height\", localState_r3.rowHeight, \"px\");\n i0.ɵɵproperty(\"cellEditing\", localState_r3.cellEditing)(\"checkboxSelection\", localState_r3.checkboxSelection)(\"columns\", ctx_r3.columns)(\"editMode\", localState_r3.editMode)(\"entity\", entity_r2)(\"id\", entity_r2.getUiId())(\"index\", entity_r2.getPosition())(\"ngClass\", i0.ɵɵpureFunction2(15, _c73, entity_r2.isEven(), entity_r2.isOdd()))(\"ngStyle\", i0.ɵɵpureFunction1(18, _c74, ctx_r3.translateY(index_r5, localState_r3.rowHeight)))(\"radioSelection\", localState_r3.radioSelection)(\"rowClass\", localState_r3.schemaRowClass)(\"rowStyle\", localState_r3.schemaRowStyle)(\"searchPhrase\", localState_r3.searchPhrase);\n }\n}\nfunction StructureContentComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 1);\n i0.ɵɵtemplate(1, StructureContentComponent_div_0_div_1_Template, 1, 20, \"div\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r3.source)(\"ngForTrackBy\", ctx_r3.trackByFn);\n }\n}\nconst _c75 = [\"sourceCollection\"];\nconst _c76 = [\"gui-structure-container\", \"\"];\nconst _c77 = [\"gui-structure-title-panel\", \"\"];\nconst _c78 = [\"gui-structure-footer-panel\", \"\"];\nconst _c79 = [\"gui-structure-blueprint\", \"\"];\nfunction StructureBlueprintComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 8);\n }\n}\nfunction StructureBlueprintComponent_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 9);\n }\n}\nfunction StructureBlueprintComponent_ng_container_2_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 11);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"position\", 0);\n }\n}\nfunction StructureBlueprintComponent_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureBlueprintComponent_ng_container_2_div_1_Template, 1, 1, \"div\", 10);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const pagingModel_r1 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isPagingTopEnabled(pagingModel_r1));\n }\n}\nfunction StructureBlueprintComponent_ng_container_5_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 13);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"ngClass\", ctx_r1.headerTopClasses);\n }\n}\nfunction StructureBlueprintComponent_ng_container_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureBlueprintComponent_ng_container_5_div_1_Template, 1, 1, \"div\", 12);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const topHeaderEnabled_r3 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isColumnHeaderTopEnabled(topHeaderEnabled_r3));\n }\n}\nfunction StructureBlueprintComponent_ng_container_9_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 13);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"ngClass\", ctx_r1.headerBottomClasses);\n }\n}\nfunction StructureBlueprintComponent_ng_container_9_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureBlueprintComponent_ng_container_9_div_1_Template, 1, 1, \"div\", 12);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const bottomHeaderEnabled_r4 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isColumnHeaderBottomEnabled(bottomHeaderEnabled_r4));\n }\n}\nfunction StructureBlueprintComponent_ng_container_12_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 15);\n }\n}\nfunction StructureBlueprintComponent_ng_container_12_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureBlueprintComponent_ng_container_12_div_1_Template, 1, 0, \"div\", 14);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const footerPanelEnabled_r5 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", footerPanelEnabled_r5);\n }\n}\nfunction StructureBlueprintComponent_ng_container_13_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 11);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"position\", 1);\n }\n}\nfunction StructureBlueprintComponent_ng_container_13_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, StructureBlueprintComponent_ng_container_13_div_1_Template, 1, 1, \"div\", 10);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const pagingModel_r6 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isPagingBottomEnabled(pagingModel_r6));\n }\n}\nfunction StructureBlueprintComponent_div_14_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 16);\n }\n}\nconst _c80 = (a0, a1) => ({\n \"gui-loader-visible\": a0,\n \"gui-loader-hidden\": a1\n});\nfunction StructureComponent_gui_spinner_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"gui-spinner\", 3);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"diameter\", 120)(\"primary\", true);\n }\n}\nconst _c81 = [\"structure\"];\nconst _c82 = [\"gui-filter-icon\", \"\"];\nconst _c83 = [\"gui-filter-type-selector\", \"\", \"filterTypes\", \"\"];\nconst _c84 = [\"gui-filter-value\", \"\"];\nconst _c85 = [\"gui-field-selector\", \"\", \"fields\", \"\"];\nconst _c86 = [\"gui-filter-menu-active-filters\", \"\", \"activeFilters\", \"\"];\nconst _c87 = [\"gui-filter-menu\", \"\"];\nfunction FilterMenuComponent_div_8_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 9);\n i0.ɵɵlistener(\"valueChanged\", function FilterMenuComponent_div_8_Template_div_valueChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onValueChanged($event));\n });\n i0.ɵɵelementEnd();\n }\n}\nconst _c88 = [\"gui-filter-menu-trigger\", \"\"];\nfunction FilterMenuTriggerComponent_ng_container_1_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 4);\n }\n}\nfunction FilterMenuTriggerComponent_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, FilterMenuTriggerComponent_ng_container_1_div_1_Template, 1, 0, \"div\", 3);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const activeFiltersExist_r1 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", activeFiltersExist_r1);\n }\n}\nconst _c89 = [\"gui-column-selector\", \"\", \"columns\", \"\"];\nconst _c90 = [\"gui-structure-quick-filters\", \"\"];\nconst _c91 = [\"gui-structure-cell-edit\", \"\", \"entity\", \"\", \"cell\", \"\"];\nfunction StructureCellEditComponent_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nconst _c92 = [\"header\", \"\"];\nconst enTranslation = {\n sourceEmpty: 'There are no items to show.',\n pagingItemsPerPage: 'Items per page:',\n pagingOf: 'of',\n pagingNextPage: 'Next',\n pagingPrevPage: 'Prev',\n pagingNoItems: 'There is no items.',\n infoPanelShowing: 'Showing',\n infoPanelItems: 'items',\n infoPanelOutOf: 'out of',\n infoPanelThemeMangerTooltipText: 'Theme manager',\n infoPanelColumnManagerTooltipText: 'Column manager',\n infoPanelInfoTooltipText: 'info',\n themeManagerModalTitle: 'Theme manager',\n themeManagerModalTheme: 'Theme:',\n themeManagerModalRowColoring: 'Row coloring:',\n themeManagerModalVerticalGrid: 'Vertical grid',\n themeManagerModalHorizontalGrid: 'HorizontalGrid',\n columnManagerModalTitle: 'Manage columns',\n headerMenuMainTab: 'Menu',\n headerMenuMainTabColumnSort: 'Column sort',\n headerMenuMainTabHideColumn: 'Hide column',\n headerMenuMainTabHighlightColumn: 'Highlight',\n headerMenuMainTabMoveLeft: 'Move left',\n headerMenuMainTabMoveRight: 'Move right',\n headerMenuMainTabColumnSortAscending: 'Ascending',\n headerMenuMainTabColumnSortDescending: 'Descending',\n headerMenuMainTabColumnSortNone: 'None',\n headerMenuFilterTab: 'Filter',\n headerMenuColumnsTab: 'Columns',\n summariesCount: 'Count',\n summariesDist: 'Dist',\n summariesSum: 'Sum',\n summariesAvg: 'Avg',\n summariesMin: 'Min',\n summariesMax: 'Max',\n summariesMed: 'Med',\n summariesTruthy: 'Truthy',\n summariesFalsy: 'Falsy',\n summariesDistinctValuesTooltip: 'Distinct values',\n summariesAverageTooltip: 'Average',\n summariesMinTooltip: 'Min',\n summariesMaxTooltip: 'Max',\n summariesMedTooltip: 'Median',\n summariesCountTooltip: 'Number of items in the grid'\n};\nconst defaultTranslation = enTranslation;\nvar GuiDataType = /*#__PURE__*/function (GuiDataType) {\n GuiDataType[GuiDataType[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n GuiDataType[GuiDataType[\"NUMBER\"] = 1] = \"NUMBER\";\n GuiDataType[GuiDataType[\"STRING\"] = 2] = \"STRING\";\n GuiDataType[GuiDataType[\"BOOLEAN\"] = 3] = \"BOOLEAN\";\n GuiDataType[GuiDataType[\"DATE\"] = 4] = \"DATE\";\n GuiDataType[GuiDataType[\"CUSTOM\"] = 5] = \"CUSTOM\";\n return GuiDataType;\n}(GuiDataType || {});\nvar GuiCellView = /*#__PURE__*/function (GuiCellView) {\n GuiCellView[GuiCellView[\"TEXT\"] = 0] = \"TEXT\";\n GuiCellView[GuiCellView[\"CHIP\"] = 1] = \"CHIP\";\n GuiCellView[GuiCellView[\"LINK\"] = 2] = \"LINK\";\n GuiCellView[GuiCellView[\"IMAGE\"] = 3] = \"IMAGE\";\n GuiCellView[GuiCellView[\"BOLD\"] = 4] = \"BOLD\";\n GuiCellView[GuiCellView[\"ITALIC\"] = 5] = \"ITALIC\";\n GuiCellView[GuiCellView[\"CHECKBOX\"] = 6] = \"CHECKBOX\";\n GuiCellView[GuiCellView[\"CUSTOM\"] = 7] = \"CUSTOM\";\n GuiCellView[GuiCellView[\"BAR\"] = 8] = \"BAR\";\n GuiCellView[GuiCellView[\"PERCENTAGE_BAR\"] = 9] = \"PERCENTAGE_BAR\";\n GuiCellView[GuiCellView[\"PERCENTAGE\"] = 10] = \"PERCENTAGE\";\n return GuiCellView;\n}(GuiCellView || {});\nvar GuiNumberCellView = /*#__PURE__*/function (GuiNumberCellView) {\n GuiNumberCellView[GuiNumberCellView[\"TEXT\"] = 0] = \"TEXT\";\n GuiNumberCellView[GuiNumberCellView[\"BOLD\"] = 1] = \"BOLD\";\n GuiNumberCellView[GuiNumberCellView[\"ITALIC\"] = 2] = \"ITALIC\";\n GuiNumberCellView[GuiNumberCellView[\"CHIP\"] = 3] = \"CHIP\";\n return GuiNumberCellView;\n}(GuiNumberCellView || {});\nvar GuiStringCellView = /*#__PURE__*/function (GuiStringCellView) {\n GuiStringCellView[GuiStringCellView[\"TEXT\"] = 0] = \"TEXT\";\n GuiStringCellView[GuiStringCellView[\"BOLD\"] = 1] = \"BOLD\";\n GuiStringCellView[GuiStringCellView[\"ITALIC\"] = 2] = \"ITALIC\";\n GuiStringCellView[GuiStringCellView[\"CHIP\"] = 3] = \"CHIP\";\n return GuiStringCellView;\n}(GuiStringCellView || {});\nvar GuiBooleanCellView = /*#__PURE__*/function (GuiBooleanCellView) {\n GuiBooleanCellView[GuiBooleanCellView[\"TEXT\"] = 0] = \"TEXT\";\n GuiBooleanCellView[GuiBooleanCellView[\"BOLD\"] = 1] = \"BOLD\";\n GuiBooleanCellView[GuiBooleanCellView[\"ITALIC\"] = 2] = \"ITALIC\";\n GuiBooleanCellView[GuiBooleanCellView[\"CHIP\"] = 3] = \"CHIP\";\n GuiBooleanCellView[GuiBooleanCellView[\"CHECKBOX\"] = 4] = \"CHECKBOX\";\n return GuiBooleanCellView;\n}(GuiBooleanCellView || {});\nvar GuiDateCellView = /*#__PURE__*/function (GuiDateCellView) {\n GuiDateCellView[GuiDateCellView[\"TEXT\"] = 0] = \"TEXT\";\n GuiDateCellView[GuiDateCellView[\"BOLD\"] = 1] = \"BOLD\";\n GuiDateCellView[GuiDateCellView[\"ITALIC\"] = 2] = \"ITALIC\";\n GuiDateCellView[GuiDateCellView[\"CHIP\"] = 3] = \"CHIP\";\n return GuiDateCellView;\n}(GuiDateCellView || {});\nvar GuiTheme = /*#__PURE__*/function (GuiTheme) {\n GuiTheme[GuiTheme[\"FABRIC\"] = 0] = \"FABRIC\";\n GuiTheme[GuiTheme[\"MATERIAL\"] = 1] = \"MATERIAL\";\n GuiTheme[GuiTheme[\"LIGHT\"] = 2] = \"LIGHT\";\n GuiTheme[GuiTheme[\"DARK\"] = 3] = \"DARK\";\n GuiTheme[GuiTheme[\"GENERIC\"] = 4] = \"GENERIC\";\n return GuiTheme;\n}(GuiTheme || {});\nvar GuiRowColoring = /*#__PURE__*/function (GuiRowColoring) {\n GuiRowColoring[GuiRowColoring[\"NONE\"] = 0] = \"NONE\";\n GuiRowColoring[GuiRowColoring[\"EVEN\"] = 1] = \"EVEN\";\n GuiRowColoring[GuiRowColoring[\"ODD\"] = 2] = \"ODD\";\n return GuiRowColoring;\n}(GuiRowColoring || {});\nvar GuiSortingOrder = /*#__PURE__*/function (GuiSortingOrder) {\n GuiSortingOrder[GuiSortingOrder[\"NONE\"] = 0] = \"NONE\";\n GuiSortingOrder[GuiSortingOrder[\"ASC\"] = 1] = \"ASC\";\n GuiSortingOrder[GuiSortingOrder[\"DESC\"] = 2] = \"DESC\";\n return GuiSortingOrder;\n}(GuiSortingOrder || {});\nvar GuiPagingDisplay = /*#__PURE__*/function (GuiPagingDisplay) {\n GuiPagingDisplay[GuiPagingDisplay[\"BASIC\"] = 0] = \"BASIC\";\n GuiPagingDisplay[GuiPagingDisplay[\"ADVANCED\"] = 1] = \"ADVANCED\";\n return GuiPagingDisplay;\n}(GuiPagingDisplay || {});\nvar GuiColumnAlign = /*#__PURE__*/function (GuiColumnAlign) {\n GuiColumnAlign[GuiColumnAlign[\"RIGHT\"] = 0] = \"RIGHT\";\n GuiColumnAlign[GuiColumnAlign[\"CENTER\"] = 1] = \"CENTER\";\n GuiColumnAlign[GuiColumnAlign[\"LEFT\"] = 2] = \"LEFT\";\n return GuiColumnAlign;\n}(GuiColumnAlign || {});\nvar GuiRowSelectionType = /*#__PURE__*/function (GuiRowSelectionType) {\n GuiRowSelectionType[GuiRowSelectionType[\"ROW\"] = 0] = \"ROW\";\n GuiRowSelectionType[GuiRowSelectionType[\"CHECKBOX\"] = 1] = \"CHECKBOX\";\n GuiRowSelectionType[GuiRowSelectionType[\"RADIO\"] = 2] = \"RADIO\";\n return GuiRowSelectionType;\n}(GuiRowSelectionType || {});\nvar GuiRowSelectionMode = /*#__PURE__*/function (GuiRowSelectionMode) {\n GuiRowSelectionMode[GuiRowSelectionMode[\"SINGLE\"] = 0] = \"SINGLE\";\n GuiRowSelectionMode[GuiRowSelectionMode[\"MULTIPLE\"] = 1] = \"MULTIPLE\";\n return GuiRowSelectionMode;\n}(GuiRowSelectionMode || {});\nvar GuiRowCustomSelectionType = /*#__PURE__*/function (GuiRowCustomSelectionType) {\n GuiRowCustomSelectionType[\"SELECT_ALL\"] = \"SELECT_ALL\";\n GuiRowCustomSelectionType[\"UNSELECT_ALL\"] = \"UNSELECT_ALL\";\n GuiRowCustomSelectionType[\"INVERT\"] = \"INVERT\";\n return GuiRowCustomSelectionType;\n}(GuiRowCustomSelectionType || {});\nconst GuiDefaultTranslation = defaultTranslation;\nvar DataType = /*#__PURE__*/function (DataType) {\n DataType[DataType[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n DataType[DataType[\"NUMBER\"] = 1] = \"NUMBER\";\n DataType[DataType[\"STRING\"] = 2] = \"STRING\";\n DataType[DataType[\"BOOLEAN\"] = 3] = \"BOOLEAN\";\n DataType[DataType[\"DATE\"] = 4] = \"DATE\";\n DataType[DataType[\"CUSTOM\"] = 5] = \"CUSTOM\";\n return DataType;\n}(DataType || {});\nclass GuiGridColumnTypeConverter {\n convertType(type) {\n if (typeof type === 'string') {\n return this.convertTypeString(type);\n } else {\n return this.convertTypeEnum(type);\n }\n }\n convertTypeEnum(enumType) {\n switch (enumType) {\n case GuiDataType.STRING:\n return DataType.STRING;\n case GuiDataType.NUMBER:\n return DataType.NUMBER;\n case GuiDataType.BOOLEAN:\n return DataType.BOOLEAN;\n case GuiDataType.DATE:\n return DataType.DATE;\n case GuiDataType.UNKNOWN:\n return DataType.UNKNOWN;\n case GuiDataType.CUSTOM:\n return DataType.CUSTOM;\n default:\n return DataType.STRING;\n }\n }\n convertTypeString(type) {\n const loweredType = type.toLocaleLowerCase();\n switch (loweredType) {\n case 'string':\n return DataType.STRING;\n case 'number':\n return DataType.NUMBER;\n case 'boolean':\n return DataType.BOOLEAN;\n case 'date':\n return DataType.DATE;\n case 'unknown':\n return DataType.UNKNOWN;\n case 'custom':\n return DataType.CUSTOM;\n default:\n return DataType.STRING;\n }\n }\n}\nvar SummariesType = /*#__PURE__*/function (SummariesType) {\n SummariesType[SummariesType[\"COUNT\"] = 1024] = \"COUNT\";\n SummariesType[SummariesType[\"DISTINCT\"] = 1] = \"DISTINCT\";\n SummariesType[SummariesType[\"SUM\"] = 2] = \"SUM\";\n SummariesType[SummariesType[\"AVERAGE\"] = 4] = \"AVERAGE\";\n SummariesType[SummariesType[\"MIN\"] = 8] = \"MIN\";\n SummariesType[SummariesType[\"MAX\"] = 16] = \"MAX\";\n SummariesType[SummariesType[\"MEDIAN\"] = 32] = \"MEDIAN\";\n SummariesType[SummariesType[\"TRUTHY\"] = 64] = \"TRUTHY\";\n SummariesType[SummariesType[\"FALSY\"] = 128] = \"FALSY\";\n SummariesType[SummariesType[\"EARLIEST\"] = 256] = \"EARLIEST\";\n SummariesType[SummariesType[\"LATEST\"] = 512] = \"LATEST\";\n return SummariesType;\n}(SummariesType || {});\n// count\n// count distinct\n// percentile\n// std.dev\n// std.dev Pop\n// variance\n// variance pop\n\nclass GuiGridColumnSummariesConverter {\n convert(summariesConfig) {\n const columnSummariesConfig = {};\n if (summariesConfig.enabled !== undefined && summariesConfig.enabled !== null) {\n columnSummariesConfig.enabled = summariesConfig.enabled;\n }\n if (summariesConfig.summariesTypes !== undefined && summariesConfig.summariesTypes !== null) {\n columnSummariesConfig.summariesTypes = this.convertSummariesTypes(summariesConfig.summariesTypes);\n }\n return columnSummariesConfig;\n }\n convertSummariesTypes(configSummariesTypes) {\n const summariesTypes = [];\n configSummariesTypes.forEach(type => {\n const summariesType = this.convertSummariesType(type);\n if (summariesType !== undefined && summariesType !== null) {\n summariesTypes.push(summariesType);\n }\n });\n return summariesTypes;\n }\n convertSummariesType(type) {\n const loweredSummariesType = type.toLocaleLowerCase();\n switch (loweredSummariesType) {\n case 'count':\n return SummariesType.COUNT;\n case 'distinct':\n return SummariesType.DISTINCT;\n case 'sum':\n return SummariesType.SUM;\n case 'average':\n return SummariesType.AVERAGE;\n case 'min':\n return SummariesType.MIN;\n case 'max':\n return SummariesType.MAX;\n case 'median':\n return SummariesType.MEDIAN;\n case 'truthy':\n return SummariesType.TRUTHY;\n case 'falsy':\n return SummariesType.FALSY;\n case 'earliest':\n return SummariesType.EARLIEST;\n case 'latest':\n return SummariesType.LATEST;\n default:\n return null;\n }\n }\n}\nvar CellView = /*#__PURE__*/function (CellView) {\n CellView[CellView[\"TEXT\"] = 0] = \"TEXT\";\n CellView[CellView[\"NUMBER\"] = 1] = \"NUMBER\";\n CellView[CellView[\"CHIP\"] = 2] = \"CHIP\";\n CellView[CellView[\"LINK\"] = 3] = \"LINK\";\n CellView[CellView[\"IMAGE\"] = 4] = \"IMAGE\";\n CellView[CellView[\"BOLD\"] = 5] = \"BOLD\";\n CellView[CellView[\"ITALIC\"] = 6] = \"ITALIC\";\n CellView[CellView[\"CHECKBOX\"] = 7] = \"CHECKBOX\";\n CellView[CellView[\"CUSTOM\"] = 8] = \"CUSTOM\";\n CellView[CellView[\"FUNCTION\"] = 9] = \"FUNCTION\";\n CellView[CellView[\"DATE\"] = 10] = \"DATE\";\n CellView[CellView[\"BAR\"] = 11] = \"BAR\";\n CellView[CellView[\"PERCENTAGE_BAR\"] = 12] = \"PERCENTAGE_BAR\";\n CellView[CellView[\"PERCENTAGE\"] = 13] = \"PERCENTAGE\";\n CellView[CellView[\"NG_TEMPLATE\"] = 14] = \"NG_TEMPLATE\";\n CellView[CellView[\"HTML\"] = 15] = \"HTML\";\n return CellView;\n}(CellView || {});\nclass GuiGridColumnViewConverter {\n convert(view) {\n if (typeof view === 'string') {\n return this.convertString(view);\n } else if (typeof view === 'function') {\n return view;\n } else {\n return this.convertEnum(view);\n }\n }\n convertString(view) {\n const loweredView = view.toLocaleLowerCase();\n switch (loweredView) {\n case 'text':\n return CellView.TEXT;\n case 'chip':\n return CellView.CHIP;\n case 'link':\n return CellView.LINK;\n case 'image':\n return CellView.IMAGE;\n case 'bold':\n return CellView.BOLD;\n case 'italic':\n return CellView.ITALIC;\n case 'checkbox':\n return CellView.CHECKBOX;\n case 'custom':\n return CellView.CUSTOM;\n case 'bar':\n return CellView.BAR;\n case 'percentage_bar':\n return CellView.PERCENTAGE_BAR;\n case 'percentage':\n return CellView.PERCENTAGE;\n default:\n return CellView.TEXT;\n }\n }\n convertEnum(view) {\n switch (view) {\n case GuiCellView.TEXT:\n return CellView.TEXT;\n case GuiCellView.CHIP:\n return CellView.CHIP;\n case GuiCellView.LINK:\n return CellView.LINK;\n case GuiCellView.IMAGE:\n return CellView.IMAGE;\n case GuiCellView.BOLD:\n return CellView.BOLD;\n case GuiCellView.ITALIC:\n return CellView.ITALIC;\n case GuiCellView.CHECKBOX:\n return CellView.CHECKBOX;\n case GuiCellView.CUSTOM:\n return CellView.CUSTOM;\n case GuiCellView.BAR:\n return CellView.BAR;\n case GuiCellView.PERCENTAGE_BAR:\n return CellView.PERCENTAGE_BAR;\n case GuiCellView.PERCENTAGE:\n return CellView.PERCENTAGE;\n default:\n return CellView.TEXT;\n }\n }\n}\nclass GuiGridColumnSortingConverter {\n convert(sortingConfig) {\n if (typeof sortingConfig === 'boolean') {\n return {\n enabled: sortingConfig\n };\n } else {\n return sortingConfig;\n }\n }\n}\nclass GuiGridColumnCellEditingConverter {\n convert(config) {\n if (typeof config === 'boolean') {\n return {\n enabled: config\n };\n }\n return config;\n }\n}\nvar ColumnAlign = /*#__PURE__*/function (ColumnAlign) {\n ColumnAlign[ColumnAlign[\"RIGHT\"] = 0] = \"RIGHT\";\n ColumnAlign[ColumnAlign[\"CENTER\"] = 1] = \"CENTER\";\n ColumnAlign[ColumnAlign[\"LEFT\"] = 2] = \"LEFT\";\n return ColumnAlign;\n}(ColumnAlign || {});\nclass GuiGridColumnAlignConverter {\n convert(align) {\n if (typeof align === 'string') {\n return this.convertTypeString(align);\n } else {\n return this.convertTypeEnum(align);\n }\n }\n convertTypeEnum(align) {\n switch (align) {\n case GuiColumnAlign.RIGHT:\n return ColumnAlign.RIGHT;\n case GuiColumnAlign.CENTER:\n return ColumnAlign.CENTER;\n case GuiColumnAlign.LEFT:\n return ColumnAlign.LEFT;\n default:\n return ColumnAlign.LEFT;\n }\n }\n convertTypeString(align) {\n const loweredType = align.toLocaleLowerCase();\n switch (loweredType) {\n case 'right':\n return ColumnAlign.RIGHT;\n case 'center':\n return ColumnAlign.CENTER;\n case 'left':\n return ColumnAlign.LEFT;\n default:\n return ColumnAlign.LEFT;\n }\n }\n}\nclass GuiGridColumnConverter {\n columnTypeConverter = new GuiGridColumnTypeConverter();\n columnSummariesConverter = new GuiGridColumnSummariesConverter();\n columnViewConverter = new GuiGridColumnViewConverter();\n columnSortingConverter = new GuiGridColumnSortingConverter();\n columnCellEditingConverter = new GuiGridColumnCellEditingConverter();\n columnAlignConverter = new GuiGridColumnAlignConverter();\n convert(configs) {\n return configs.map(config => {\n if (config.columns !== undefined) {\n const columns = config.columns.map(c => this.convertColumn(c));\n return {\n header: config.header,\n columns: columns\n };\n } else {\n return this.convertColumn(config);\n }\n });\n }\n convertColumn(guiColumn) {\n const columnConfig = {};\n if (guiColumn.name !== undefined && guiColumn.name !== null) {\n columnConfig.name = guiColumn.name;\n } else if (guiColumn.field !== undefined && guiColumn.field !== null) {\n if (typeof guiColumn.field === 'string') {\n columnConfig.name = guiColumn.field;\n }\n }\n if (guiColumn.type !== undefined && guiColumn.type !== null) {\n columnConfig.type = this.columnTypeConverter.convertType(guiColumn.type);\n }\n if (guiColumn.header !== undefined && guiColumn.header !== null) {\n columnConfig.header = guiColumn.header;\n }\n if (guiColumn.enabled !== undefined && guiColumn.enabled !== null) {\n columnConfig.enabled = guiColumn.enabled;\n }\n if (guiColumn.field !== undefined && guiColumn.field !== null) {\n columnConfig.field = guiColumn.field;\n }\n if (guiColumn.width !== undefined && guiColumn.width !== null) {\n columnConfig.width = guiColumn.width;\n }\n if (guiColumn.align !== undefined && guiColumn.align !== null) {\n columnConfig.align = this.columnAlignConverter.convert(guiColumn.align);\n }\n if (guiColumn.view !== undefined && guiColumn.view !== null) {\n columnConfig.view = this.columnViewConverter.convert(guiColumn.view);\n }\n if (guiColumn.summaries !== undefined && guiColumn.summaries !== null) {\n columnConfig.summaries = this.columnSummariesConverter.convert(guiColumn.summaries);\n }\n if (guiColumn.sorting !== undefined && guiColumn.sorting !== null) {\n columnConfig.sorting = this.columnSortingConverter.convert(guiColumn.sorting);\n }\n if (guiColumn.cellEditing !== undefined && guiColumn.cellEditing !== null) {\n columnConfig.cellEditing = this.columnCellEditingConverter.convert(guiColumn.cellEditing);\n }\n if (guiColumn.formatter !== undefined && guiColumn.formatter !== null) {\n columnConfig.formatter = guiColumn.formatter;\n }\n if (guiColumn.matcher !== undefined && guiColumn.matcher !== null) {\n columnConfig.matcher = guiColumn.matcher;\n }\n if (guiColumn.cssClasses !== undefined && guiColumn.cssClasses !== null) {\n columnConfig.cssClasses = guiColumn.cssClasses;\n }\n if (guiColumn.styles !== undefined && guiColumn.styles !== null) {\n columnConfig.styles = guiColumn.styles;\n }\n if (guiColumn.templateRef !== undefined && guiColumn.templateRef !== null) {\n columnConfig.templateRef = guiColumn.templateRef;\n columnConfig.view = CellView.NG_TEMPLATE;\n }\n return columnConfig;\n }\n}\nvar SchemaTheme = /*#__PURE__*/function (SchemaTheme) {\n SchemaTheme[SchemaTheme[\"FABRIC\"] = 0] = \"FABRIC\";\n SchemaTheme[SchemaTheme[\"MATERIAL\"] = 1] = \"MATERIAL\";\n SchemaTheme[SchemaTheme[\"LIGHT\"] = 2] = \"LIGHT\";\n SchemaTheme[SchemaTheme[\"DARK\"] = 3] = \"DARK\";\n SchemaTheme[SchemaTheme[\"GENERIC\"] = 4] = \"GENERIC\";\n return SchemaTheme;\n}(SchemaTheme || {});\nclass GuiGridThemeConverter {\n convert(theme) {\n if (typeof theme === 'string') {\n return this.convertString(theme);\n } else {\n return this.convertEnum(theme);\n }\n }\n convertToGuiTheme(theme) {\n switch (theme) {\n case SchemaTheme.MATERIAL:\n return GuiTheme.MATERIAL;\n case SchemaTheme.FABRIC:\n return GuiTheme.FABRIC;\n case SchemaTheme.LIGHT:\n return GuiTheme.LIGHT;\n case SchemaTheme.DARK:\n return GuiTheme.DARK;\n case SchemaTheme.GENERIC:\n return GuiTheme.GENERIC;\n default:\n return GuiTheme.GENERIC;\n }\n }\n convertString(theme) {\n const loweredTheme = theme.toLocaleLowerCase();\n switch (loweredTheme) {\n case 'material':\n return SchemaTheme.MATERIAL;\n case 'fabric':\n return SchemaTheme.FABRIC;\n case 'light':\n return SchemaTheme.LIGHT;\n case 'dark':\n return SchemaTheme.DARK;\n case 'generic':\n return SchemaTheme.GENERIC;\n default:\n return SchemaTheme.FABRIC;\n }\n }\n convertEnum(theme) {\n switch (theme) {\n case GuiTheme.MATERIAL:\n return SchemaTheme.MATERIAL;\n case GuiTheme.FABRIC:\n return SchemaTheme.FABRIC;\n case GuiTheme.LIGHT:\n return SchemaTheme.LIGHT;\n case GuiTheme.DARK:\n return SchemaTheme.DARK;\n case GuiTheme.GENERIC:\n return SchemaTheme.GENERIC;\n default:\n return SchemaTheme.FABRIC;\n }\n }\n}\nvar RowColoring = /*#__PURE__*/function (RowColoring) {\n RowColoring[RowColoring[\"NONE\"] = 0] = \"NONE\";\n RowColoring[RowColoring[\"EVEN\"] = 1] = \"EVEN\";\n RowColoring[RowColoring[\"ODD\"] = 2] = \"ODD\";\n return RowColoring;\n}(RowColoring || {});\nclass GuiGridRowColoringConverter {\n convert(rowColoring) {\n if (typeof rowColoring === 'string') {\n return this.convertString(rowColoring);\n } else {\n return this.convertEnum(rowColoring);\n }\n }\n convertToGuiRowColoring(value) {\n switch (value) {\n case RowColoring.NONE:\n return GuiRowColoring.NONE;\n case RowColoring.EVEN:\n return GuiRowColoring.EVEN;\n case RowColoring.ODD:\n return GuiRowColoring.ODD;\n default:\n return GuiRowColoring.EVEN;\n }\n }\n convertString(rowColoring) {\n const loweredRowColoring = rowColoring.toLocaleLowerCase();\n switch (loweredRowColoring) {\n case 'none':\n return RowColoring.NONE;\n case 'even':\n return RowColoring.EVEN;\n case 'odd':\n return RowColoring.ODD;\n default:\n return RowColoring.EVEN;\n }\n }\n convertEnum(rowColoring) {\n switch (rowColoring) {\n case GuiRowColoring.NONE:\n return RowColoring.NONE;\n case GuiRowColoring.EVEN:\n return RowColoring.EVEN;\n case GuiRowColoring.ODD:\n return RowColoring.ODD;\n default:\n return RowColoring.EVEN;\n }\n }\n}\nlet GuiGridColumnMenuConverter = /*#__PURE__*/(() => {\n class GuiGridColumnMenuConverter {\n convert(config) {\n return config;\n }\n static ɵfac = function GuiGridColumnMenuConverter_Factory(t) {\n return new (t || GuiGridColumnMenuConverter)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: GuiGridColumnMenuConverter,\n factory: GuiGridColumnMenuConverter.ɵfac\n });\n }\n return GuiGridColumnMenuConverter;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar PagingDisplayMode = /*#__PURE__*/function (PagingDisplayMode) {\n PagingDisplayMode[PagingDisplayMode[\"BASIC\"] = 0] = \"BASIC\";\n PagingDisplayMode[PagingDisplayMode[\"ADVANCED\"] = 1] = \"ADVANCED\";\n return PagingDisplayMode;\n}(PagingDisplayMode || {});\nclass GuiGridPagingConverter {\n convert(guiPaging) {\n const pagingConfig = {};\n if (guiPaging.enabled !== undefined && guiPaging.enabled !== null) {\n pagingConfig.enabled = guiPaging.enabled;\n }\n if (guiPaging.page !== undefined && guiPaging.page !== null) {\n pagingConfig.page = guiPaging.page;\n }\n if (guiPaging.pageSize !== undefined && guiPaging.pageSize !== null) {\n pagingConfig.pageSize = guiPaging.pageSize;\n }\n if (guiPaging.pageSizes !== undefined && guiPaging.pageSizes !== null) {\n pagingConfig.pageSizes = guiPaging.pageSizes;\n }\n if (guiPaging.pagerTop !== undefined && guiPaging.pagerTop !== null) {\n pagingConfig.pagerTop = guiPaging.pagerTop;\n }\n if (guiPaging.pagerBottom !== undefined && guiPaging.pagerBottom !== null) {\n pagingConfig.pagerBottom = guiPaging.pagerBottom;\n }\n if (guiPaging.display !== undefined && guiPaging.display !== null) {\n pagingConfig.displayMode = this.convertDisplay(guiPaging.display);\n }\n return pagingConfig;\n }\n convertDisplay(pagingDisplay) {\n if (typeof pagingDisplay === 'string') {\n return this.convertString(pagingDisplay);\n } else {\n return this.convertEnum(pagingDisplay);\n }\n }\n convertString(pagingDisplay) {\n const loweredPaging = pagingDisplay.toLocaleLowerCase();\n switch (loweredPaging) {\n case 'basic':\n return PagingDisplayMode.BASIC;\n case 'advanced':\n return PagingDisplayMode.ADVANCED;\n default:\n return PagingDisplayMode.BASIC;\n }\n }\n convertEnum(pagingDisplay) {\n switch (pagingDisplay) {\n case GuiPagingDisplay.BASIC:\n return PagingDisplayMode.BASIC;\n case GuiPagingDisplay.ADVANCED:\n return PagingDisplayMode.ADVANCED;\n default:\n return PagingDisplayMode.BASIC;\n }\n }\n}\nclass GenericBuilder {\n build() {\n return this.buildObject();\n }\n}\nvar RowSelectionType = /*#__PURE__*/function (RowSelectionType) {\n RowSelectionType[\"ROW\"] = \"ROW\";\n RowSelectionType[\"CHECKBOX\"] = \"CHECKBOX\";\n RowSelectionType[\"RADIO\"] = \"RADIO\";\n return RowSelectionType;\n}(RowSelectionType || {});\nvar RowSelectionMode = /*#__PURE__*/function (RowSelectionMode) {\n RowSelectionMode[\"SINGLE\"] = \"SINGLE\";\n RowSelectionMode[\"MULTIPLE\"] = \"MULTIPLE\";\n return RowSelectionMode;\n}(RowSelectionMode || {});\nlet RowSelection = /*#__PURE__*/(() => {\n class RowSelection {\n enabled;\n selectedRowIndexes;\n selectedRowIds;\n type;\n mode;\n matcher;\n customConfig;\n constructor(config) {\n if (config.enabled !== undefined) {\n this.enabled = config.enabled;\n }\n if (config?.selectedRowIndexes) {\n this.selectedRowIndexes = config.selectedRowIndexes;\n }\n if (config?.selectedRowIds) {\n this.selectedRowIds = config.selectedRowIds;\n }\n if (config?.mode) {\n this.mode = config.mode;\n }\n if (config?.type) {\n this.type = config.type;\n }\n if (config?.matcher) {\n this.matcher = config.matcher;\n }\n if (config?.config) {\n this.customConfig = config.config;\n }\n }\n isModeDefined() {\n return this.mode !== undefined;\n }\n isTypeDefined() {\n return this.type !== undefined;\n }\n isSelectedRowIndexesDefined() {\n return this.selectedRowIndexes !== undefined;\n }\n isSelectedRowIdsDefined() {\n return this.selectedRowIds !== undefined;\n }\n isEnabledDefined() {\n return this.enabled !== undefined;\n }\n isMatcherDefined() {\n return this.matcher !== undefined;\n }\n isEnabled() {\n return this.enabled;\n }\n isCustomSelectConfig() {\n return this.customConfig !== undefined;\n }\n getSelectedRowIndexes() {\n return this.selectedRowIndexes;\n }\n getSelectedRowIds() {\n return this.selectedRowIds;\n }\n getMode() {\n return this.mode;\n }\n getType() {\n return this.type;\n }\n getMatcher() {\n return this.matcher;\n }\n getCustomSelectConfig() {\n return this.customConfig;\n }\n // eslint-disable-next-line @typescript-eslint/member-ordering\n static Builder = class RowSelectionBuilder extends GenericBuilder {\n enabled;\n selectedRowIndexes;\n selectedRowIds;\n type;\n mode;\n config;\n matcher;\n constructor() {\n super();\n }\n buildObject() {\n return new RowSelection({\n enabled: this.enabled,\n selectedRowIndexes: this.selectedRowIndexes,\n selectedRowIds: this.selectedRowIds,\n type: this.type,\n mode: this.mode,\n matcher: this.matcher,\n config: this.config\n });\n }\n withEnabled(enabled) {\n this.enabled = enabled;\n return this;\n }\n withSelectedRowIndexes(indexes) {\n this.selectedRowIndexes = indexes;\n return this;\n }\n withSelectedRowIds(ids) {\n this.selectedRowIds = ids;\n return this;\n }\n withType(type) {\n this.type = type;\n return this;\n }\n withMode(mode) {\n this.mode = mode;\n return this;\n }\n withMatcher(matcher) {\n this.matcher = matcher;\n return this;\n }\n witCustomSelection(config) {\n this.config = config;\n return this;\n }\n };\n }\n return RowSelection;\n})();\nclass FormationCustomSelectionConfig {\n enabled;\n selections;\n}\nclass GuiGridRowSelectionConverter {\n convert(selection) {\n const builder = new RowSelection.Builder();\n if (typeof selection === 'boolean') {\n return builder.withEnabled(selection).build();\n } else {\n if (selection.enabled !== undefined) {\n builder.withEnabled(selection.enabled);\n }\n if (selection.selectedRowIndexes !== undefined) {\n builder.withSelectedRowIndexes(selection.selectedRowIndexes);\n }\n if (selection.selectedRowIds !== undefined) {\n builder.withSelectedRowIds(selection.selectedRowIds);\n }\n if (selection.mode !== undefined) {\n const mode = this.convertMode(selection.mode);\n builder.withMode(mode);\n }\n if (selection.type !== undefined) {\n const type = this.convertType(selection.type);\n builder.withType(type);\n }\n if (selection.matcher !== undefined) {\n const matcher = this.convertMatcher(selection.matcher);\n builder.withMatcher(matcher);\n }\n if (selection.custom !== undefined) {\n const customSelection = this.convertCustomSelection(selection.custom);\n builder.witCustomSelection(customSelection);\n }\n return builder.build();\n }\n }\n convertMode(mode) {\n if (typeof mode === 'string') {\n switch (mode.toLowerCase()) {\n case 'single':\n return RowSelectionMode.SINGLE;\n case 'multiple':\n return RowSelectionMode.MULTIPLE;\n default:\n return RowSelectionMode.SINGLE;\n }\n } else {\n switch (mode) {\n case GuiRowSelectionMode.SINGLE:\n return RowSelectionMode.SINGLE;\n case GuiRowSelectionMode.MULTIPLE:\n return RowSelectionMode.MULTIPLE;\n default:\n return RowSelectionMode.SINGLE;\n }\n }\n }\n convertType(type) {\n if (typeof type === 'string') {\n switch (type.toLowerCase()) {\n case 'row':\n return RowSelectionType.ROW;\n case 'checkbox':\n return RowSelectionType.CHECKBOX;\n case 'radio':\n return RowSelectionType.RADIO;\n default:\n return RowSelectionType.ROW;\n }\n } else {\n switch (type) {\n case GuiRowSelectionType.ROW:\n return RowSelectionType.ROW;\n case GuiRowSelectionType.CHECKBOX:\n return RowSelectionType.CHECKBOX;\n case GuiRowSelectionType.RADIO:\n return RowSelectionType.RADIO;\n default:\n return RowSelectionType.ROW;\n }\n }\n }\n convertMatcher(matcher) {\n if (typeof matcher === 'string') {\n return item => item[matcher];\n } else {\n return matcher;\n }\n }\n convertCustomSelection(config) {\n let formationConfig = new FormationCustomSelectionConfig();\n if (config?.enabled) {\n formationConfig.enabled = config.enabled;\n }\n if (config?.selections && Array.isArray(config?.selections)) {\n formationConfig.selections = config.selections.map(customSelection => {\n if (typeof customSelection === 'string') {\n return customSelection;\n } else {\n return customSelection;\n }\n });\n }\n return formationConfig;\n }\n}\nlet GuiGridColumnComponent = /*#__PURE__*/(() => {\n class GuiGridColumnComponent {\n templateRef;\n name;\n field;\n type;\n view;\n header;\n width;\n enabled;\n align;\n summaries;\n sorting;\n cellEditing;\n formatter;\n matcher;\n cssClasses;\n styles;\n static ɵfac = function GuiGridColumnComponent_Factory(t) {\n return new (t || GuiGridColumnComponent)();\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: GuiGridColumnComponent,\n selectors: [[\"gui-grid-column\"]],\n contentQueries: function GuiGridColumnComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, TemplateRef, 7);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templateRef = _t.first);\n }\n },\n inputs: {\n name: \"name\",\n field: \"field\",\n type: \"type\",\n view: \"view\",\n header: \"header\",\n width: \"width\",\n enabled: \"enabled\",\n align: \"align\",\n summaries: \"summaries\",\n sorting: \"sorting\",\n cellEditing: \"cellEditing\",\n formatter: \"formatter\",\n matcher: \"matcher\",\n cssClasses: \"cssClasses\",\n styles: \"styles\"\n },\n decls: 0,\n vars: 0,\n template: function GuiGridColumnComponent_Template(rf, ctx) {},\n encapsulation: 2\n });\n }\n return GuiGridColumnComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass GuiGridCellEditConverter {\n convert(config) {\n if (typeof config === 'boolean') {\n return {\n enabled: config\n };\n }\n return config;\n }\n}\nfunction checkInput(prop) {\n return {\n isChanged: () => {\n return hasChanged(prop);\n },\n ifChanged: callback => {\n if (hasChanged(prop)) {\n callback();\n }\n }\n };\n}\nfunction ifChanged(prop, callback) {\n if (hasChanged(prop)) {\n callback(prop.currentValue);\n }\n}\nfunction hasChanged(prop) {\n return prop !== undefined && prop.currentValue !== undefined;\n}\nlet GuiGridGateway = /*#__PURE__*/(() => {\n class GuiGridGateway {\n guiGridColumnComponent;\n /**\n * INPUTS\n */\n columnHeaderTop;\n columnHeaderBottom;\n maxHeight;\n width;\n rowHeight;\n autoResizeWidth;\n source = [];\n columns = [];\n paging;\n verticalGrid;\n horizontalGrid;\n theme;\n rowColoring;\n rowSelection;\n rowStyle;\n rowClass;\n loading;\n virtualScroll;\n sorting;\n searching;\n titlePanel;\n footerPanel;\n /**\n * @experimental\n */\n filtering;\n /**\n * @experimental\n */\n quickFilters;\n /**\n * @experimental\n */\n editMode;\n /**\n * @experimental\n */\n cellEditing;\n infoPanel;\n /**\n * @experimental\n */\n summaries;\n columnMenu;\n rowDetail;\n localization;\n /**\n * OUTPUTS\n */\n pageChanged = new EventEmitter();\n pageSizeChanged = new EventEmitter();\n itemsSelected = new EventEmitter();\n selectedRows = new EventEmitter();\n columnsChanged = new EventEmitter();\n containerWidthChanged = new EventEmitter();\n sourceEdited = new EventEmitter();\n cellEditEntered = new EventEmitter();\n cellEditCanceled = new EventEmitter();\n cellEditSubmitted = new EventEmitter();\n searchPhraseChanged = new EventEmitter();\n themeChanged = new EventEmitter();\n horizontalGridChanged = new EventEmitter();\n verticalGridChanged = new EventEmitter();\n rowColoringChanged = new EventEmitter();\n /** @internal */\n columnsConfig;\n themeConfig; // SchemaTheme;\n rowColoringConfig; // RowColoring;\n columnMenuConfig;\n rowSelectionConfig;\n cellEditingConfig;\n gridColumnConverter = new GuiGridColumnConverter();\n gridThemeConverter = new GuiGridThemeConverter();\n gridRowColoringConverter = new GuiGridRowColoringConverter();\n gridColumnMenuConverter = new GuiGridColumnMenuConverter();\n gridPagingConverter = new GuiGridPagingConverter();\n gridRowSelectionConverter = new GuiGridRowSelectionConverter();\n guiGridCellEditConverter = new GuiGridCellEditConverter();\n constructor() {}\n ngOnChanges(changes) {\n ifChanged(changes.columns, () => {\n this.columnsConfig = this.gridColumnConverter.convert(this.columns);\n });\n ifChanged(changes.theme, () => {\n this.themeConfig = this.gridThemeConverter.convert(this.theme);\n });\n ifChanged(changes.rowColoring, () => {\n this.rowColoringConfig = this.gridRowColoringConverter.convert(this.rowColoring);\n });\n ifChanged(changes.columnMenu, () => {\n this.columnMenuConfig = this.gridColumnMenuConverter.convert(this.columnMenu);\n });\n ifChanged(changes.rowSelection, () => {\n this.rowSelectionConfig = this.gridRowSelectionConverter.convert(this.rowSelection);\n });\n ifChanged(changes.cellEditing, () => {\n this.cellEditingConfig = this.guiGridCellEditConverter.convert(this.cellEditing);\n });\n // TODO\n ifChanged(changes.paging, () => {\n if (typeof this.paging !== 'boolean') {\n this.paging = this.gridPagingConverter.convert(this.paging);\n }\n });\n }\n ngAfterContentInit() {\n if (this.guiGridColumnComponent && this.guiGridColumnComponent.toArray().length > 0) {\n this.columnsConfig = this.gridColumnConverter.convert(this.guiGridColumnComponent.toArray());\n }\n }\n onPageChange(page) {\n this.pageChanged.emit(page);\n }\n onPageSizeChange(pageSize) {\n this.pageSizeChanged.emit(pageSize);\n }\n onItemSelect(item) {\n this.itemsSelected.emit(item);\n }\n onRowsSelect(rows) {\n const guiRows = rows.map(row => {\n return {\n index: row.getIndex(),\n source: row.getItem(),\n itemId: row.getItemId()\n };\n });\n this.selectedRows.emit(guiRows);\n }\n onColumnsChange() {\n this.columnsChanged.emit();\n }\n onContainerWidthChange(containerWidth) {\n this.containerWidthChanged.emit(containerWidth);\n }\n onSourceEdit(value) {\n this.sourceEdited.emit(value);\n }\n onCellEditEnter() {\n this.cellEditEntered.emit();\n }\n onCellEditSubmit() {\n this.cellEditSubmitted.emit();\n }\n onCellEditCancel() {\n this.cellEditCanceled.emit();\n }\n onSearchPhrase(value) {\n this.searchPhraseChanged.emit(value);\n }\n onTheme(value) {\n this.themeChanged.emit(this.gridThemeConverter.convertToGuiTheme(value));\n }\n onHorizontalGrid(value) {\n this.horizontalGridChanged.emit(value);\n }\n onVerticalGrid(value) {\n this.verticalGridChanged.emit(value);\n }\n onRowColoring(value) {\n this.rowColoringChanged.emit(this.gridRowColoringConverter.convertToGuiRowColoring(value));\n }\n static ɵfac = function GuiGridGateway_Factory(t) {\n return new (t || GuiGridGateway)();\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: GuiGridGateway,\n contentQueries: function GuiGridGateway_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, GuiGridColumnComponent, 4);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.guiGridColumnComponent = _t);\n }\n },\n inputs: {\n columnHeaderTop: \"columnHeaderTop\",\n columnHeaderBottom: \"columnHeaderBottom\",\n maxHeight: \"maxHeight\",\n width: \"width\",\n rowHeight: \"rowHeight\",\n autoResizeWidth: \"autoResizeWidth\",\n source: \"source\",\n columns: \"columns\",\n paging: \"paging\",\n verticalGrid: \"verticalGrid\",\n horizontalGrid: \"horizontalGrid\",\n theme: \"theme\",\n rowColoring: \"rowColoring\",\n rowSelection: \"rowSelection\",\n rowStyle: \"rowStyle\",\n rowClass: \"rowClass\",\n loading: \"loading\",\n virtualScroll: \"virtualScroll\",\n sorting: \"sorting\",\n searching: \"searching\",\n titlePanel: \"titlePanel\",\n footerPanel: \"footerPanel\",\n filtering: \"filtering\",\n quickFilters: \"quickFilters\",\n editMode: \"editMode\",\n cellEditing: \"cellEditing\",\n infoPanel: \"infoPanel\",\n summaries: \"summaries\",\n columnMenu: \"columnMenu\",\n rowDetail: \"rowDetail\",\n localization: \"localization\"\n },\n outputs: {\n pageChanged: \"pageChanged\",\n pageSizeChanged: \"pageSizeChanged\",\n itemsSelected: \"itemsSelected\",\n selectedRows: \"selectedRows\",\n columnsChanged: \"columnsChanged\",\n containerWidthChanged: \"containerWidthChanged\",\n sourceEdited: \"sourceEdited\",\n cellEditEntered: \"cellEditEntered\",\n cellEditCanceled: \"cellEditCanceled\",\n cellEditSubmitted: \"cellEditSubmitted\",\n searchPhraseChanged: \"searchPhraseChanged\",\n themeChanged: \"themeChanged\",\n horizontalGridChanged: \"horizontalGridChanged\",\n verticalGridChanged: \"verticalGridChanged\",\n rowColoringChanged: \"rowColoringChanged\"\n },\n features: [i0.ɵɵNgOnChangesFeature]\n });\n }\n return GuiGridGateway;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst structureParentComponent = new InjectionToken('StructureParentComponent');\nclass SelectedRow {\n index;\n itemId;\n item;\n constructor(item, index, itemId) {\n this.item = item;\n this.index = index;\n this.itemId = itemId;\n }\n getItem() {\n return this.item;\n }\n getIndex() {\n return this.index;\n }\n getItemId() {\n return this.itemId;\n }\n}\nclass GuiGridApiProvider {\n structureId;\n compositionId;\n schemaId;\n formationCommandInvoker;\n formationWarehouse;\n compositionCommandInvoker;\n compositionWarehouse;\n filterIntegration;\n sourceCommandInvoker;\n searchCommandInvoker;\n gridThemeCommandInvoker;\n structureCommandInvoker;\n summariesCommandInvoker;\n sortingCommandInvoker;\n pagingCommandInvoker;\n constructor(structureId, compositionId, schemaId, formationCommandDispatcher, formationWarehouse, compositionCommandInvoker, compositionWarehouse, filterIntegration, sourceCommandInvoker, searchCommandInvoker, gridThemeCommandInvoker, structureCommandInvoker, summariesCommandInvoker, sortingCommandInvoker, pagingCommandInvoker) {\n this.structureId = structureId;\n this.compositionId = compositionId;\n this.schemaId = schemaId;\n this.formationCommandInvoker = formationCommandDispatcher;\n this.formationWarehouse = formationWarehouse;\n this.compositionCommandInvoker = compositionCommandInvoker;\n this.compositionWarehouse = compositionWarehouse;\n this.filterIntegration = filterIntegration;\n this.sourceCommandInvoker = sourceCommandInvoker;\n this.searchCommandInvoker = searchCommandInvoker;\n this.gridThemeCommandInvoker = gridThemeCommandInvoker;\n this.structureCommandInvoker = structureCommandInvoker;\n this.summariesCommandInvoker = summariesCommandInvoker;\n this.sortingCommandInvoker = sortingCommandInvoker;\n this.pagingCommandInvoker = pagingCommandInvoker;\n }\n provide() {\n const structureId = this.structureId,\n compositionId = this.compositionId,\n schemaId = this.schemaId,\n fcd = this.formationCommandInvoker,\n fw = this.formationWarehouse,\n compositionCommandInvoker = this.compositionCommandInvoker,\n compositionWarehouse = this.compositionWarehouse,\n filterIntegration = this.filterIntegration,\n scd = this.sourceCommandInvoker,\n searchCommandInvoker = this.searchCommandInvoker,\n gridThemeCommandInvoker = this.gridThemeCommandInvoker,\n structureCommandInvoker = this.structureCommandInvoker,\n summariesCommandInvoker = this.summariesCommandInvoker,\n sortingCommandInvoker = this.sortingCommandInvoker,\n pagingCommandInvoker = this.pagingCommandInvoker;\n return {\n setSource(source) {\n scd.setOrigin(source, structureId);\n },\n showLoading() {\n scd.setLoading(true, structureId);\n },\n hideLoading() {\n scd.setLoading(false, structureId);\n },\n deleteRow(row) {\n scd.deleteRow(new SelectedRow(row.source, row.index, row.itemId), structureId);\n },\n deleteRows(rows) {\n const selectedRows = rows.map(row => new SelectedRow(row.source, row.index, row.itemId));\n scd.deleteRows(selectedRows, structureId);\n },\n deleteSelectedRows() {\n // this.sourceCommandDispatcher.\n },\n getSelectedRows() {\n const rows = fw.findSelectedRows(structureId).getValueOrNullOrThrowError();\n return rows.map(r => {\n return {\n source: r.getItem(),\n index: r.getIndex(),\n itemId: r.getItemId()\n };\n });\n },\n selectAll() {\n fcd.selectAll(structureId);\n },\n unselectAll() {\n fcd.unselectAll(structureId);\n },\n /**\n * Columns\n */\n getColumns() {\n let columns = [];\n compositionWarehouse.onTemplateColumns(compositionId).subscribe(v => {\n columns = v;\n });\n return columns;\n },\n /**\n * Filtering\n */\n getFilters() {\n const filters = filterIntegration.findFilters(compositionId, structureId);\n const filterCollection = {};\n Object.keys(filters).forEach(key => {\n filterCollection[key] = filters[key].map(filter => {\n return {\n columnName: filter.columnName,\n filterId: filter.filterId,\n filterType: filter.type,\n value: filter.value\n };\n });\n });\n return filterCollection;\n },\n getFiltersForColumn(columnName) {\n return [];\n },\n getFilterTypes() {\n return [];\n },\n getFilterTypesForColumn(columnName) {\n return filterIntegration.findFilterTypes(columnName, compositionId, structureId);\n },\n removeAll() {},\n removeFilter(filterId) {},\n removeFiltersFromColumn(columnName) {},\n filter(columnName, filterType, value) {\n filterIntegration.filter(columnName, filterType, value, compositionId, structureId);\n },\n /**\n * Paging\n */\n enablePaging() {\n pagingCommandInvoker.enable(structureId);\n },\n disablePaging() {\n pagingCommandInvoker.disable(structureId);\n },\n nextPage() {\n pagingCommandInvoker.nextPage(structureId);\n },\n prevPage() {\n pagingCommandInvoker.prevPage(structureId);\n },\n changePageSize(pageSize) {\n pagingCommandInvoker.changePageSize(pageSize, structureId);\n },\n setPagingConfig(config) {\n pagingCommandInvoker.setPaging(config, structureId);\n },\n /**\n * Searching\n */\n setSearchingConfig(config) {\n searchCommandInvoker.setSearchingConfig(config, structureId);\n },\n search(phrase) {\n searchCommandInvoker.search(phrase, structureId);\n },\n clearSearchPhrase() {\n searchCommandInvoker.search('', structureId);\n },\n /**\n * View port\n */\n scrollToTop() {\n structureCommandInvoker.scrollToTop(structureId);\n },\n scrollToBottom() {\n structureCommandInvoker.scrollToBottom(structureId);\n },\n scrollToRowByIndex(index) {\n structureCommandInvoker.scrollToIndex(index, structureId);\n },\n /**\n * Visual - Schema\n */\n setTheme(theme) {\n gridThemeCommandInvoker.setTheme(theme, schemaId, structureId);\n },\n setVerticalGrid(enabled) {\n gridThemeCommandInvoker.setVerticalGrid(enabled, schemaId);\n },\n setHorizontalGrid(enabled) {\n gridThemeCommandInvoker.setHorizontalGrid(enabled, schemaId);\n },\n setRowColoring(rowColoring) {\n gridThemeCommandInvoker.setRowColoring(rowColoring, schemaId);\n },\n /**\n * Virtual scroll\n */\n enableVirtualScroll() {\n structureCommandInvoker.enableVirtualScroll(structureId);\n },\n disableVirtualScroll() {\n structureCommandInvoker.disableVirtualScroll(structureId);\n },\n /**\n * Summaries\n */\n enableSummaries() {\n summariesCommandInvoker.setSummariesEnabled(true, structureId);\n },\n disableSummaries() {\n summariesCommandInvoker.setSummariesEnabled(false, structureId);\n },\n /**\n * Sorting\n */\n setSortConfig(config) {\n sortingCommandInvoker.setSortingConfig(config, structureId);\n }\n };\n }\n}\nclass GuiGridThemeCommandInvoker {\n schemaCommandInvoker;\n gridThemeConverter;\n gridRowColoringConverter;\n constructor(schemaCommandInvoker, gridThemeConverter, gridRowColoringConverter) {\n this.schemaCommandInvoker = schemaCommandInvoker;\n this.gridThemeConverter = gridThemeConverter;\n this.gridRowColoringConverter = gridRowColoringConverter;\n }\n setTheme(theme, schemaId, structureId) {\n const schemaTheme = this.gridThemeConverter.convert(theme);\n this.schemaCommandInvoker.setTheme(schemaTheme, schemaId, structureId);\n }\n setRowColoring(rowColoring, schemaId) {\n const schemaRowColoring = this.gridRowColoringConverter.convert(rowColoring);\n this.schemaCommandInvoker.setRowColoring(schemaRowColoring, schemaId);\n }\n setVerticalGrid(verticalGrid, schemaId) {\n this.schemaCommandInvoker.setVerticalGrid(verticalGrid, schemaId);\n }\n setHorizontalGrid(horizontalGrid, schemaId) {\n this.schemaCommandInvoker.setHorizontalGrid(horizontalGrid, schemaId);\n }\n}\nclass Modifier {\n hostElement;\n constructor(hostElement) {\n this.hostElement = hostElement;\n }\n getElement(htmlElement) {\n return this.createModifier(htmlElement);\n }\n getHost() {\n if (!this.hostElement) {\n throw new Error('Missing host element in DomRenderer constructor.');\n }\n return this.createModifier(this.hostElement);\n }\n}\nlet ClassModifier = /*#__PURE__*/(() => {\n class ClassModifier extends Modifier {\n htmlElement;\n constructor(htmlElement) {\n super(htmlElement);\n this.htmlElement = htmlElement;\n }\n createModifier(htmlElement) {\n return new ClassModifier.ClassModifier(htmlElement);\n }\n // eslint-disable-next-line\n static ClassModifier = class {\n htmlElement;\n constructor(htmlElement) {\n this.htmlElement = htmlElement;\n }\n add(...classes) {\n this.addClassToDomElement(this.htmlElement, classes);\n }\n remove(...classes) {\n this.removeClassFromDomElement(this.htmlElement, classes);\n }\n clear() {\n this.htmlElement.removeAttribute('class');\n }\n addClassToDomElement(htmlElement, classes) {\n for (let i = 0; i < classes.length; i++) {\n htmlElement.classList.add(classes[i]);\n }\n }\n removeClassFromDomElement(htmlElement, classes) {\n for (let i = 0; i < classes.length; i++) {\n htmlElement.classList.remove(classes[i]);\n }\n }\n };\n }\n return ClassModifier;\n})();\nlet AttributeModifier = /*#__PURE__*/(() => {\n class AttributeModifier extends Modifier {\n htmlElement;\n static AttributeModifier = class {\n htmlElement;\n constructor(htmlElement) {\n this.htmlElement = htmlElement;\n }\n setAttribute(name, value) {\n this.htmlElement.setAttribute(name, value);\n }\n removeAttribute(name) {\n this.htmlElement.removeAttribute(name);\n }\n };\n constructor(htmlElement) {\n super(htmlElement);\n this.htmlElement = htmlElement;\n }\n createModifier(htmlElement) {\n return new AttributeModifier.AttributeModifier(htmlElement);\n }\n }\n return AttributeModifier;\n})();\nclass StructurePagingDefinitionBuilder extends GenericBuilder {\n enabled;\n constructor(enabled) {\n super();\n this.enabled = enabled;\n }\n withEnabled(enabled) {\n this.enabled = enabled;\n return this;\n }\n buildObject() {\n return new PagingDefinition(this.enabled);\n }\n}\nlet StructurePagingDefinitionDefaultBuilder = /*#__PURE__*/(() => {\n class StructurePagingDefinitionDefaultBuilder extends StructurePagingDefinitionBuilder {\n static defaultEnabled = true;\n constructor() {\n super(StructurePagingDefinitionDefaultBuilder.defaultEnabled);\n }\n }\n return StructurePagingDefinitionDefaultBuilder;\n})();\nlet PagingDefinition = /*#__PURE__*/(() => {\n class PagingDefinition {\n static Builder = StructurePagingDefinitionBuilder;\n static DefaultBuilder = StructurePagingDefinitionDefaultBuilder;\n enabled;\n constructor(enabled) {\n this.enabled = enabled;\n }\n isEnabled() {\n return this.enabled;\n }\n }\n return PagingDefinition;\n})();\nclass StructureDefinitionBuilder extends GenericBuilder {\n headerEnabled;\n bottomPaging;\n topPaging;\n border = true;\n constructor(headerEnabled, bottomPaging, topPaging) {\n super();\n this.headerEnabled = headerEnabled;\n this.bottomPaging = bottomPaging;\n this.topPaging = topPaging;\n }\n withHeader(enabled) {\n this.headerEnabled = enabled;\n return this;\n }\n withBottomPaging(paging) {\n this.bottomPaging = paging;\n return this;\n }\n withTopPaging(paging) {\n this.topPaging = paging;\n return this;\n }\n withBorder(enabled) {\n this.border = enabled;\n return this;\n }\n buildObject() {\n return new StructureDefinition(this.headerEnabled, this.bottomPaging, this.topPaging, this.border);\n }\n}\nclass StructureDefinitionDefaultBuilder extends StructureDefinitionBuilder {\n static defaultHeaderEnabled = true;\n static defaultBottomPaging = new PagingDefinition.DefaultBuilder().build();\n static defaultTopPaging = new PagingDefinition.DefaultBuilder().build();\n constructor() {\n super(StructureDefinitionDefaultBuilder.defaultHeaderEnabled, StructureDefinitionDefaultBuilder.defaultBottomPaging, StructureDefinitionDefaultBuilder.defaultTopPaging);\n }\n}\nlet StructureDefinition = /*#__PURE__*/(() => {\n class StructureDefinition {\n static Builder = StructureDefinitionBuilder;\n static DefaultBuilder = StructureDefinitionDefaultBuilder;\n headerEnabled;\n bottomPaging;\n topPaging;\n border;\n constructor(headerEnabled, bottomPaging, topPaging, border) {\n this.headerEnabled = headerEnabled;\n this.bottomPaging = bottomPaging;\n this.topPaging = topPaging;\n this.border = border;\n }\n isHeaderEnabled() {\n return this.headerEnabled;\n }\n isBorderEnabled() {\n return this.border;\n }\n getBottomPaging() {\n return this.bottomPaging;\n }\n getTopPaging() {\n return this.topPaging;\n }\n }\n return StructureDefinition;\n})();\n/** @internal */\nconst guiGridStructureDefinition = new StructureDefinition.DefaultBuilder().build();\nlet GuiGridRegister = /*#__PURE__*/(() => {\n class GuiGridRegister {\n gridMap = new Map();\n // structureId: StructureId\n register(gridId, component, structureId) {\n this.gridMap.set(gridId, {\n component,\n structureId\n });\n }\n unregister(gridId) {\n this.gridMap.delete(gridId);\n }\n getValues(gridId) {\n return this.gridMap.get(gridId);\n }\n static ɵfac = function GuiGridRegister_Factory(t) {\n return new (t || GuiGridRegister)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: GuiGridRegister,\n factory: GuiGridRegister.ɵfac\n });\n }\n return GuiGridRegister;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass StructureIdGenerator {\n // private increment = 0;\n generateId() {\n return RandomIdGenerator.generate();\n }\n}\nclass FormationPublisher {\n constructor() {}\n}\nclass FormationWarehouse {\n constructor() {}\n}\nclass CompositionPublisher {\n constructor() {}\n}\nclass CompositionWarehouse {\n constructor() {}\n}\nclass FilterWarehouse {\n constructor() {}\n}\nclass FieldId extends EntityId {\n id;\n constructor(id) {\n super(id);\n this.id = id;\n }\n getId() {\n return this.id;\n }\n equals(fieldId) {\n return fieldId.toString() === this.id;\n }\n toString() {\n return this.id;\n }\n}\nclass FilterPublisher {\n constructor() {}\n}\nlet FilterIntegration = /*#__PURE__*/(() => {\n class FilterIntegration {\n compositionWarehouse;\n filterCommandInvoker;\n filterWarehouse;\n constructor(compositionWarehouse, filterCommandInvoker, filterWarehouse) {\n this.compositionWarehouse = compositionWarehouse;\n this.filterCommandInvoker = filterCommandInvoker;\n this.filterWarehouse = filterWarehouse;\n }\n static services = [CompositionWarehouse, FilterPublisher, FilterWarehouse];\n findFilterTypes(columnName, compositionId, structureId) {\n let filterTypes = [];\n this.compositionWarehouse.onTemplateColumns(compositionId).pipe(hermesMap(cols => {\n return cols.find(col => {\n return col.getName() === columnName;\n });\n }), hermesFilter(col => {\n return col !== undefined;\n }), hermesTake(1), hermesSwitchMap(col => {\n return this.filterWarehouse.onFilterTypesForFieldId(new FieldId(col.columnFieldId.getId()), structureId);\n })).subscribe(types => {\n filterTypes = types.map(type => type.getName());\n });\n return filterTypes;\n }\n findFilters(compositionId, structureId) {\n const filters = this.filterWarehouse.findFilters(structureId).getValueOrNullOrThrowError();\n const columnNames = this.compositionWarehouse.findColumnNames(compositionId);\n const obj = {};\n for (let i = 0; i < columnNames.length; i += 1) {\n obj[columnNames[i]] = filters.filter(filter => {\n return filter.getFieldName() === columnNames[i];\n }).map(filter => {\n return {\n columnName: filter.getFieldName(),\n filterId: filter.getFilterId().toString(),\n type: filter.getFilterTypeName(),\n value: filter.getValue()\n };\n });\n }\n return obj;\n }\n filter(columnName, filterType, value, compositionId, structureId) {\n this.compositionWarehouse.onTemplateColumns(compositionId).pipe(hermesMap(cols => {\n return cols.find(col => {\n return col.getName() === columnName;\n });\n }), hermesFilter(col => {\n return col !== undefined;\n }), hermesTake(1), hermesSwitchMap(col => {\n return this.filterWarehouse.onceFilterTypeId(new FieldId(col.columnFieldId.getId()), filterType, structureId).pipe(hermesMap(filterTypeId => {\n return {\n fieldId: new FieldId(col.columnFieldId.getId()),\n filterTypeId: filterTypeId\n };\n }));\n })).subscribe(params => {\n const {\n fieldId,\n filterTypeId\n } = params;\n filterTypeId.ifPresent(ftId => {\n this.filterCommandInvoker.add(fieldId, ftId, value, structureId);\n });\n });\n }\n }\n return FilterIntegration;\n})();\nclass SourcePublisher {\n constructor() {}\n}\nclass SearchPublisher {\n constructor() {}\n}\nclass SchemaPublisher {\n constructor() {}\n}\nclass StructurePublisher {\n constructor() {}\n}\nclass SummariesPublisher {\n constructor() {}\n}\nclass SortingPublisher {\n constructor() {}\n}\nclass PagingPublisher {\n constructor() {}\n}\nclass StructureReadModelRootId extends ReadModelRootId {\n constructor(id) {\n super(id);\n }\n toAggregateId() {\n return new StructureId(this.toString());\n }\n}\nclass StructureId extends AggregateId {\n constructor(id) {\n super(id);\n }\n toReadModelRootId() {\n return new StructureReadModelRootId(this.getId());\n }\n}\nclass CompositionReadModelRootId extends ReadModelRootId {\n constructor(id) {\n super(id);\n }\n toAggregateId() {\n return new CompositionId(this.toString());\n }\n}\nclass CompositionId extends AggregateId {\n constructor(id) {\n super(id);\n }\n toReadModelRootId() {\n return new CompositionReadModelRootId(this.getId());\n }\n}\nvar SchemaRowColoring = /*#__PURE__*/function (SchemaRowColoring) {\n SchemaRowColoring[SchemaRowColoring[\"NONE\"] = 0] = \"NONE\";\n SchemaRowColoring[SchemaRowColoring[\"EVEN\"] = 1] = \"EVEN\";\n SchemaRowColoring[SchemaRowColoring[\"ODD\"] = 2] = \"ODD\";\n return SchemaRowColoring;\n}(SchemaRowColoring || {});\nclass SchemaWarehouse {}\nlet SchemaCssClassManager = /*#__PURE__*/(() => {\n class SchemaCssClassManager extends Reactive {\n schemaReadModelRepository;\n static VERTICAL_GRID_CLASS_NAME = 'gui-vertical-grid';\n static HORIZONTAL_GRID_CLASS_NAME = 'gui-horizontal-grid';\n static THEME_FABRIC_CLASS_NAME = 'gui-fabric';\n static THEME_MATERIAL_CLASS_NAME = 'gui-material';\n static THEME_LIGHT_CLASS_NAME = 'gui-light';\n static THEME_DARK_CLASS_NAME = 'gui-dark';\n static THEME_GENERIC_CLASS_NAME = 'gui-generic';\n static ROW_COLORING_ODD = 'gui-rows-odd';\n static ROW_COLORING_EVEN = 'gui-rows-even';\n classModifier;\n cssClass = null;\n cssHostRef;\n constructor(schemaReadModelRepository) {\n super();\n this.schemaReadModelRepository = schemaReadModelRepository;\n this.classModifier = new ClassModifier();\n }\n init(elementRef, schemaReadModelRootId) {\n this.cssHostRef = elementRef;\n this.schemaReadModelRepository.onCssClasses(schemaReadModelRootId).pipe(this.hermesTakeUntil()).subscribe(classes => {\n const diff = this.updateState(classes);\n this.renderCssClasses(diff);\n });\n }\n updateState(css) {\n if (!this.cssClass) {\n this.cssClass = css;\n return this.cssClass;\n } else {\n const diff = {};\n Object.keys(this.cssClass).forEach(key => {\n if (css[key] !== this.cssClass[key]) {\n diff[key] = css[key];\n }\n });\n this.cssClass = css;\n return diff;\n }\n }\n renderCssClasses(diff) {\n if (diff.hasOwnProperty('verticalGrid')) {\n this.toggleCssClass(diff.verticalGrid, SchemaCssClassManager.VERTICAL_GRID_CLASS_NAME);\n }\n if (diff.hasOwnProperty('horizontalGrid')) {\n this.toggleCssClass(diff.horizontalGrid, SchemaCssClassManager.HORIZONTAL_GRID_CLASS_NAME);\n }\n if (diff.hasOwnProperty('theme')) {\n this.removeThemeCssClasses();\n this.addClass(this.resolveThemeClassName(diff.theme));\n }\n if (diff.hasOwnProperty('rowColoring')) {\n this.removeRowColoringClasses();\n this.addClass(this.resolveRowColoringClassName(diff.rowColoring));\n }\n }\n toggleCssClass(toggle, cssClassName) {\n if (toggle) {\n this.addClass(cssClassName);\n } else {\n this.removeClass(cssClassName);\n }\n }\n removeThemeCssClasses() {\n Object.keys(SchemaTheme).map(key => SchemaTheme[key]).map(theme => this.resolveThemeClassName(theme)).filter(className => !!className).forEach(className => {\n this.removeClass(className);\n });\n }\n resolveThemeClassName(theme) {\n switch (theme) {\n case SchemaTheme.FABRIC:\n case SchemaTheme[SchemaTheme.FABRIC]:\n return SchemaCssClassManager.THEME_FABRIC_CLASS_NAME;\n case SchemaTheme.MATERIAL:\n case SchemaTheme[SchemaTheme.MATERIAL]:\n return SchemaCssClassManager.THEME_MATERIAL_CLASS_NAME;\n case SchemaTheme.LIGHT:\n case SchemaTheme[SchemaTheme.LIGHT]:\n return SchemaCssClassManager.THEME_LIGHT_CLASS_NAME;\n case SchemaTheme.DARK:\n case SchemaTheme[SchemaTheme.DARK]:\n return SchemaCssClassManager.THEME_DARK_CLASS_NAME;\n case SchemaTheme.GENERIC:\n case SchemaTheme[SchemaTheme.GENERIC]:\n return SchemaCssClassManager.THEME_GENERIC_CLASS_NAME;\n default:\n return SchemaCssClassManager.THEME_FABRIC_CLASS_NAME;\n }\n }\n resolveRowColoringClassName(coloring) {\n switch (coloring) {\n case SchemaRowColoring.ODD:\n case SchemaRowColoring[SchemaRowColoring.ODD]:\n return SchemaCssClassManager.ROW_COLORING_ODD;\n case SchemaRowColoring.EVEN:\n case SchemaRowColoring[SchemaRowColoring.EVEN]:\n return SchemaCssClassManager.ROW_COLORING_EVEN;\n default:\n return null;\n }\n }\n removeRowColoringClasses() {\n Object.keys(SchemaRowColoring).map(key => SchemaRowColoring[key]).map(coloring => this.resolveRowColoringClassName(coloring)).filter(className => !!className).forEach(className => {\n this.removeClass(className);\n });\n }\n addClass(cssClassName) {\n if (cssClassName) {\n this.classModifier.getElement(this.cssHostRef.nativeElement).add(cssClassName);\n }\n }\n removeClass(cssClassName) {\n if (cssClassName) {\n this.classModifier.getElement(this.cssHostRef.nativeElement).remove(cssClassName);\n }\n }\n static ɵfac = function SchemaCssClassManager_Factory(t) {\n return new (t || SchemaCssClassManager)(i0.ɵɵinject(SchemaWarehouse));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: SchemaCssClassManager,\n factory: SchemaCssClassManager.ɵfac\n });\n }\n return SchemaCssClassManager;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureCellEditStore = /*#__PURE__*/(() => {\n class StructureCellEditStore extends Archive {\n constructor() {\n super();\n }\n static ɵfac = function StructureCellEditStore_Factory(t) {\n return new (t || StructureCellEditStore)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureCellEditStore,\n factory: StructureCellEditStore.ɵfac\n });\n }\n return StructureCellEditStore;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureEditModeArchive = /*#__PURE__*/(() => {\n class StructureEditModeArchive extends Archive {\n constructor() {\n super();\n }\n static ɵfac = function StructureEditModeArchive_Factory(t) {\n return new (t || StructureEditModeArchive)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureEditModeArchive,\n factory: StructureEditModeArchive.ɵfac\n });\n }\n return StructureEditModeArchive;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass StructureInfoPanelConfig {\n enabled = false;\n infoDialog = true;\n columnsManager = true;\n schemaManager = true;\n sourceSize = true;\n constructor(enabled, infoDialog, columnsManager, schemaManager, sourceSize) {\n if (this.isNotUndefinedOrNull(enabled)) {\n this.enabled = enabled;\n }\n if (this.isNotUndefinedOrNull(infoDialog)) {\n this.infoDialog = infoDialog;\n }\n if (this.isNotUndefinedOrNull(columnsManager)) {\n this.columnsManager = columnsManager;\n }\n if (this.isNotUndefinedOrNull(sourceSize)) {\n this.sourceSize = sourceSize;\n }\n if (this.isNotUndefinedOrNull(schemaManager)) {\n this.schemaManager = schemaManager;\n }\n }\n isEnabled() {\n return this.enabled;\n }\n isInfoDialogEnabled() {\n return this.infoDialog;\n }\n isColumnsManagerEnabled() {\n return this.columnsManager;\n }\n isSourceSizeEnabled() {\n return this.sourceSize;\n }\n isSchemaManagerEnabled() {\n return this.schemaManager;\n }\n isNotUndefinedOrNull(config) {\n return config !== undefined && config !== null;\n }\n}\nclass StructureInfoPanelArchive extends Archive {\n constructor() {\n super(new StructureInfoPanelConfig());\n }\n}\nconst structureComponentToken = new InjectionToken('StructureComponentToken');\nlet GuiComponent = /*#__PURE__*/(() => {\n class GuiComponent {\n innerElementRef;\n innerClassModifier;\n constructor(innerElementRef) {\n this.innerElementRef = innerElementRef;\n this.initClassModifier();\n this.addHostClass();\n }\n addClassToHost(className) {\n this.innerClassModifier.getHost().add(className);\n }\n removeClassFromHost(className) {\n this.innerClassModifier.getHost().remove(className);\n }\n hasChanged(prop) {\n return prop !== undefined && prop.currentValue !== undefined;\n }\n ifChanged(prop, callback) {\n if (this.hasChanged(prop)) {\n callback();\n }\n }\n initClassModifier() {\n this.innerClassModifier = new ClassModifier(this.innerElementRef.nativeElement);\n }\n addHostClass() {\n this.innerClassModifier.getHost().add(this.getSelectorName());\n }\n static ɵfac = function GuiComponent_Factory(t) {\n return new (t || GuiComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: GuiComponent\n });\n }\n return GuiComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SmartComponent = /*#__PURE__*/(() => {\n class SmartComponent extends GuiComponent {\n detector;\n viewInDom = false;\n unsubscribe$ = new HermesSubject();\n constructor(detector, elementRef) {\n super(elementRef);\n this.detector = detector;\n }\n ngAfterViewInit() {\n this.viewInDom = true;\n }\n ngOnDestroy() {\n this.unsubscribe();\n }\n reRender() {\n if (this.isViewInDom()) {\n this.detector.detectChanges();\n }\n }\n isViewInDom() {\n return this.viewInDom;\n }\n /**\n * @deprecated instead use useReactiveContext\n */\n subscribe(stream$, callback) {\n stream$.pipe(this.takeUntil()).subscribe(streamValues => {\n callback(streamValues);\n this.reRender();\n });\n }\n /**\n * @deprecated instead use useReactiveContext\n */\n subscribeWithoutRender(stream$, callback) {\n stream$.pipe(this.takeUntil()).subscribe(streamValues => {\n callback(streamValues);\n });\n }\n // for gate\n subscribeAndEmit(stream$, emitter, mapper = value => value) {\n stream$.pipe(this.takeUntil()).subscribe(value => {\n emitter.emit(mapper(value));\n });\n }\n unsubscribe() {\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n takeUntil() {\n return hermesTakeUntil(this.unsubscribe$);\n }\n static ɵfac = function SmartComponent_Factory(t) {\n return new (t || SmartComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: SmartComponent,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n return SmartComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar StructureCellEditState = /*#__PURE__*/function (StructureCellEditState) {\n StructureCellEditState[StructureCellEditState[\"ENTER\"] = 0] = \"ENTER\";\n StructureCellEditState[StructureCellEditState[\"SUBMIT\"] = 1] = \"SUBMIT\";\n StructureCellEditState[StructureCellEditState[\"CANCEL\"] = 2] = \"CANCEL\";\n return StructureCellEditState;\n}(StructureCellEditState || {});\nclass StructureCommand extends Command {}\nclass InitFieldsCommand extends StructureCommand {\n fieldConfigs;\n constructor(structureId, fieldConfigs) {\n super(structureId, 'InitFieldsCommand');\n this.fieldConfigs = fieldConfigs;\n }\n getFieldConfigs() {\n return this.fieldConfigs;\n }\n}\nclass StructureDomainEvent extends DomainEvent {}\nclass FieldsInitedEvent extends StructureDomainEvent {\n fieldConfigs;\n fields;\n constructor(aggregateId, fieldConfigs,\n // TODO merge\n fields) {\n super(aggregateId, {\n fieldConfigs,\n fields\n }, 'FieldsInitedEvent');\n this.fieldConfigs = fieldConfigs;\n this.fields = fields;\n }\n getFields() {\n return this.fields;\n }\n}\nclass ColumnFieldId {\n id;\n constructor(id) {\n this.id = id;\n }\n getId() {\n return this.id;\n }\n}\nclass ColumnParams {\n column;\n field;\n constructor(column, field) {\n this.column = column;\n this.field = field;\n }\n getColumn() {\n return this.column;\n }\n getField() {\n return this.field;\n }\n}\nclass StructureColumnInputHandler {\n structureId;\n compositionId;\n columnFieldFactory;\n columnAutoConfigurator;\n compositionCommandInvoker;\n commandDispatcher = CoreContainer.resolve(CommandDispatcher);\n domainEventBus = CoreContainer.resolve(DomainEventBus);\n columns;\n constructor(structureId, compositionId, columnFieldFactory, columnAutoConfigurator, compositionCommandInvoker) {\n this.structureId = structureId;\n this.compositionId = compositionId;\n this.columnFieldFactory = columnFieldFactory;\n this.columnAutoConfigurator = columnAutoConfigurator;\n this.compositionCommandInvoker = compositionCommandInvoker;\n }\n handle(changes) {\n let config = [];\n if (changes.columns !== undefined && changes.columns.currentValue !== undefined) {\n config = changes.columns.currentValue;\n this.columns = config;\n } else {\n if (this.columns === undefined && changes.source !== undefined && changes.source !== null) {\n config = this.columnAutoConfigurator.configure(changes.source.currentValue);\n this.columns = config;\n } else {\n return;\n }\n }\n this.compositionCommandInvoker.setGroups(config, this.compositionId);\n // prepare model\n const {\n columns,\n groups\n } = this.getConfigs(config);\n const fieldConfigs = this.getFieldConfigs(columns);\n // const fieldConfigs = columns as Array<FieldConfig>;\n const initCommand = new InitFieldsCommand(this.structureId, fieldConfigs);\n this.domainEventBus.ofEvents([FieldsInitedEvent]).pipe(hermesFilter(event => event.getAggregateId().toString() === this.structureId.toString()), hermesTake(1)).subscribe(event => {\n const fields = event.getFields(),\n columnFieldIds = this.convertColumnFieldIds(fields),\n params = this.convertColumns(columns, fields, columnFieldIds);\n this.compositionCommandInvoker.setColumns(params, this.compositionId);\n // this.compositionCommandInvoker.setGroups(this.compositionId);\n });\n this.commandDispatcher.dispatch(initCommand);\n }\n getConfigs(configs) {\n let columnConfigs = [];\n const groupConfigs = [];\n for (let i = 0; i < configs.length; i += 1) {\n const config = configs[i];\n if (config.columns !== undefined) {\n groupConfigs.push(config);\n columnConfigs = columnConfigs.concat(config.columns);\n } else {\n columnConfigs.push(config);\n }\n }\n return {\n columns: columnConfigs,\n groups: groupConfigs\n };\n }\n getFieldConfigs(columns) {\n return columns.map(c => {\n return {\n field: c.field,\n type: c.type,\n matcher: c.matcher,\n summaries: c.summaries,\n sorting: c.sorting\n };\n });\n }\n convertColumnFieldIds(fields) {\n if (!fields) {\n return [];\n }\n return fields.map(field => new ColumnFieldId(field.getId().getId()));\n }\n convertColumns(columns, fields, columnFieldIds) {\n if (!columns) {\n return [];\n }\n return columns.map((column, index) => {\n const columnFieldId = columnFieldIds[index],\n field = fields[index];\n const columnField = this.columnFieldFactory.create(columnFieldId, field.getAccessorMethod(), field.getDataType(), field.getSearchAccessorMethod());\n return new ColumnParams(column, columnField);\n });\n }\n}\nclass ColumnAutoConfigurator {}\nclass SchemaId extends AggregateId {\n constructor(id) {\n super(id);\n }\n toReadModelRootId() {\n return new SchemaReadModelRootId(this.getId());\n }\n}\nclass SchemaReadModelRootId extends ReadModelRootId {\n constructor(id) {\n super(id);\n }\n toAggregateId() {\n return new SchemaId(this.getId());\n }\n}\nclass PagingEventRepository extends EventRepository {}\nclass EditedItemModel {\n after;\n before;\n constructor(after, before) {\n this.after = after;\n this.before = before;\n }\n}\nclass StructureSourceItemEditedEvent extends StructureDomainEvent {\n beforeItem;\n afterItem;\n constructor(aggregateId, beforeItem, afterItem) {\n super(aggregateId, {\n beforeItem,\n afterItem\n }, 'StructureSourceItemEditedEvent');\n this.beforeItem = beforeItem;\n this.afterItem = afterItem;\n }\n getBeforeItem() {\n return this.beforeItem;\n }\n getAfterItem() {\n return this.afterItem;\n }\n}\nclass SourceEventService {\n domainEventBus = CoreContainer.resolve(DomainEventBus);\n onSourceEdited(structureId) {\n return this.domainEventBus.ofEvents([StructureSourceItemEditedEvent]).pipe(hermesFilter(event => event.getAggregateId().toString() === structureId.toString()), hermesMap(event => {\n const afterItem = event.getAfterItem().getSourceItem(),\n beforeItem = event.getBeforeItem().getSourceItem();\n return new EditedItemModel(afterItem, beforeItem);\n }));\n }\n}\nclass CompositionEventRepository extends EventRepository {}\nclass SourceWarehouse {\n constructor() {}\n}\nclass SelectedRowChangedEvent extends StructureDomainEvent {\n selectedRows;\n allSelected;\n allUnselected;\n constructor(structureId, selectedRows, allSelected, allUnselected) {\n super(structureId, {\n selectedRows,\n allSelected,\n allUnselected\n }, 'SelectedRowChangedEvent');\n this.selectedRows = selectedRows;\n this.allSelected = allSelected;\n this.allUnselected = allUnselected;\n }\n getSelectedRows() {\n return this.selectedRows;\n }\n isAllSelected() {\n return this.allSelected;\n }\n isAllUnselected() {\n return this.allUnselected;\n }\n}\nlet FormationEventRepository = /*#__PURE__*/(() => {\n class FormationEventRepository extends EventRepository {\n sourceWarehouse;\n domainEventBusTOREMOVE;\n map = new Map();\n subject$ = new HermesSubject();\n constructor(sourceWarehouse, domainEventBusTOREMOVE) {\n super();\n this.sourceWarehouse = sourceWarehouse;\n this.domainEventBusTOREMOVE = domainEventBusTOREMOVE;\n this.domainEventBusTOREMOVE.ofEvents([SelectedRowChangedEvent]).pipe(hermesSwitchMap(event => {\n const selectedRows = event.getSelectedRows();\n const structureId = event.getAggregateId();\n return this.sourceWarehouse.onPreparedItems(structureId).pipe(hermesTake(1), hermesMap(items => {\n const selectedItems = [],\n length = items.length,\n itemsMap = new Map();\n for (let i = 0; i < length; i += 1) {\n itemsMap.set(items[i].getId().toString(), items[i]);\n }\n for (let j = 0; j < selectedRows.length; j += 1) {\n const item = itemsMap.get(selectedRows[j]);\n selectedItems.push(new SelectedRow(item.getSourceItem(), j, item.getId()));\n }\n return {\n id: structureId,\n items: selectedItems\n };\n }));\n })).subscribe(e => {\n this.map.set(e.id.toString(), e.items);\n this.subject$.next(this.map);\n });\n }\n static services = [SourceWarehouse, DomainEventBus];\n onItemSelected(structureId) {\n return this.subject$.toObservable().pipe(hermesFilter(map => {\n return map.has(structureId.toString());\n }), hermesMap(map => {\n return map.get(structureId.toString());\n }));\n }\n }\n return FormationEventRepository;\n})();\nclass CellEditorManager {\n enabled = false;\n rowEdit = () => true;\n cellEdit = () => true;\n constructor(config) {\n if (config.enabled !== undefined) {\n this.enabled = config.enabled;\n }\n if (config.rowEdit !== undefined) {\n this.rowEdit = config.rowEdit;\n }\n if (config.cellEdit !== undefined) {\n this.cellEdit = config.cellEdit;\n }\n }\n isEnabled(value, item, index) {\n return this.enabled && this.rowEdit(value, item, index) && this.cellEdit(value, item, index);\n }\n}\nclass StructureCellEditArchive extends AggregateArchive {\n static default = new CellEditorManager({\n enabled: false\n });\n constructor() {\n super(StructureCellEditArchive.default);\n }\n static ɵfac = function StructureCellEditArchive_Factory(t) {\n return new (t || StructureCellEditArchive)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureCellEditArchive,\n factory: StructureCellEditArchive.ɵfac\n });\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass StructureInfoPanelConfigConverter {\n convert(config) {\n let infoDialog, columnsManager, sourceSize, schemaManager;\n if (config.infoDialog !== undefined) {\n infoDialog = config.infoDialog;\n }\n if (config.columnsManager !== undefined) {\n columnsManager = config.columnsManager;\n }\n if (config.schemaManager !== undefined) {\n schemaManager = config.schemaManager;\n }\n if (config.sourceSize !== undefined) {\n sourceSize = config.sourceSize;\n }\n return new StructureInfoPanelConfig(config.enabled, infoDialog, columnsManager, schemaManager, sourceSize);\n }\n}\nlet StructureInfoPanelConfigService = /*#__PURE__*/(() => {\n class StructureInfoPanelConfigService {\n structureInfoPanelConfigConverter;\n structureInfoPanelArchive;\n constructor(structureInfoPanelConfigConverter, structureInfoPanelArchive) {\n this.structureInfoPanelConfigConverter = structureInfoPanelConfigConverter;\n this.structureInfoPanelArchive = structureInfoPanelArchive;\n }\n static services = [StructureInfoPanelConfigConverter, StructureInfoPanelArchive];\n set(config) {\n const infoPanelConfig = this.structureInfoPanelConfigConverter.convert(config);\n this.structureInfoPanelArchive.next(infoPanelConfig);\n }\n static ɵfac = function StructureInfoPanelConfigService_Factory(t) {\n return new (t || StructureInfoPanelConfigService)(i0.ɵɵinject(StructureInfoPanelConfigConverter), i0.ɵɵinject(StructureInfoPanelArchive));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureInfoPanelConfigService,\n factory: StructureInfoPanelConfigService.ɵfac\n });\n }\n return StructureInfoPanelConfigService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass ColumnField {\n fieldId;\n accessor;\n searchAccessor;\n dataType;\n constructor(fieldId, accessor, dataType, searchAccessor) {\n this.fieldId = fieldId;\n this.accessor = accessor;\n this.dataType = dataType;\n this.searchAccessor = searchAccessor;\n }\n getId() {\n return this.fieldId;\n }\n getValue(entity) {\n return this.accessor(entity);\n }\n getAccessor() {\n return this.accessor;\n }\n getSearchAccessor() {\n return this.searchAccessor;\n }\n getDataType() {\n return this.dataType;\n }\n}\nclass ColumnFieldFactory {\n create(columnFieldId, accessor, dataType, searchAccessor) {\n return new ColumnField(columnFieldId, accessor, dataType, searchAccessor);\n }\n}\nclass SearchEventRepository extends EventRepository {\n constructor() {\n super();\n }\n}\nlet StructureHeaderBottomEnabledArchive = /*#__PURE__*/(() => {\n class StructureHeaderBottomEnabledArchive extends Archive {\n constructor() {\n super(false);\n }\n static ɵfac = function StructureHeaderBottomEnabledArchive_Factory(t) {\n return new (t || StructureHeaderBottomEnabledArchive)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureHeaderBottomEnabledArchive,\n factory: StructureHeaderBottomEnabledArchive.ɵfac\n });\n }\n return StructureHeaderBottomEnabledArchive;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass SchemaEventRepository extends EventRepository {\n constructor() {\n super();\n }\n}\nclass TranslationFacade {}\nlet StructureInitialValuesReadyArchive = /*#__PURE__*/(() => {\n class StructureInitialValuesReadyArchive extends AggregateArchive {\n static default = false;\n constructor() {\n super(StructureInitialValuesReadyArchive.default);\n }\n on(aggregateId) {\n return super.on(aggregateId).pipe(hermesFilter(v => v));\n }\n once(aggregateId) {\n return singleFromObservable(this.on(aggregateId));\n }\n }\n return StructureInitialValuesReadyArchive;\n})();\n/** @internal */\nlet StructureGateway = /*#__PURE__*/(() => {\n class StructureGateway extends SmartComponent {\n changeDetectorRef;\n columnAutoConfigurator;\n structureId;\n compositionId;\n schemaId;\n structureCommandInvoker;\n structurePagingCommandDispatcher;\n pagingEventRepository;\n sortingCommandInvoker;\n searchCommandInvoker;\n sourceCommandService;\n sourceEventService;\n schemaCommandInvoker;\n compositionCommandDispatcher;\n compositionEventRepository;\n formationEventService;\n structureEditModeArchive;\n structureCellEditArchive;\n structureInfoPanelConfigService;\n structureCellEditStore;\n columnFieldFactory;\n formationCommandDispatcher;\n searchEventRepository;\n structureHeaderBottomEnabledArchive;\n schemaEventRepository;\n translationService;\n structureInitialValuesReadyArchive;\n /** *********************\n * INPUTS\n ***********************/\n maxHeight;\n width;\n rowHeight;\n autoResizeWidth;\n // DOESNT WORK WITH GATE\n source = [];\n // DOESNT WORK WITH GATE\n columns;\n // @Input()\n // filtering: boolean | FilterConfig;\n // @Input()\n // quickFilters: boolean | QuickFiltersConfig;\n editMode;\n cellEditing;\n theme;\n /** *********************\n * OUTPUTS\n ***********************/\n themeChanged = new EventEmitter();\n columnsChanged = new EventEmitter();\n containerWidthChanged = new EventEmitter();\n sourceEdited = new EventEmitter();\n cellEditEntered = new EventEmitter();\n cellEditCanceled = new EventEmitter();\n cellEditSubmitted = new EventEmitter();\n structureColumnInputHandler;\n changeAfterInit = false;\n constructor(changeDetectorRef, elementRef, columnAutoConfigurator, structureId, compositionId, schemaId, structureCommandInvoker, structurePagingCommandDispatcher, pagingEventRepository, sortingCommandInvoker, searchCommandInvoker, sourceCommandService, sourceEventService, schemaCommandInvoker, compositionCommandDispatcher, compositionEventRepository, formationEventService, structureEditModeArchive, structureCellEditArchive, structureInfoPanelConfigService, structureCellEditStore, columnFieldFactory, formationCommandDispatcher, searchEventRepository, structureHeaderBottomEnabledArchive, schemaEventRepository, translationService, structureInitialValuesReadyArchive) {\n super(changeDetectorRef, elementRef);\n this.changeDetectorRef = changeDetectorRef;\n this.columnAutoConfigurator = columnAutoConfigurator;\n this.structureId = structureId;\n this.compositionId = compositionId;\n this.schemaId = schemaId;\n this.structureCommandInvoker = structureCommandInvoker;\n this.structurePagingCommandDispatcher = structurePagingCommandDispatcher;\n this.pagingEventRepository = pagingEventRepository;\n this.sortingCommandInvoker = sortingCommandInvoker;\n this.searchCommandInvoker = searchCommandInvoker;\n this.sourceCommandService = sourceCommandService;\n this.sourceEventService = sourceEventService;\n this.schemaCommandInvoker = schemaCommandInvoker;\n this.compositionCommandDispatcher = compositionCommandDispatcher;\n this.compositionEventRepository = compositionEventRepository;\n this.formationEventService = formationEventService;\n this.structureEditModeArchive = structureEditModeArchive;\n this.structureCellEditArchive = structureCellEditArchive;\n this.structureInfoPanelConfigService = structureInfoPanelConfigService;\n this.structureCellEditStore = structureCellEditStore;\n this.columnFieldFactory = columnFieldFactory;\n this.formationCommandDispatcher = formationCommandDispatcher;\n this.searchEventRepository = searchEventRepository;\n this.structureHeaderBottomEnabledArchive = structureHeaderBottomEnabledArchive;\n this.schemaEventRepository = schemaEventRepository;\n this.translationService = translationService;\n this.structureInitialValuesReadyArchive = structureInitialValuesReadyArchive;\n this.structureColumnInputHandler = new StructureColumnInputHandler(structureId, compositionId, columnFieldFactory, columnAutoConfigurator, compositionCommandDispatcher);\n this.translationService.setDefaultTranslation();\n }\n ngOnChanges(changes) {\n ifChanged(changes.editMode, () => {\n this.structureEditModeArchive.next(this.editMode);\n });\n ifChanged(changes.cellEditing, () => {\n let editingConfig;\n if (typeof this.cellEditing === 'boolean') {\n editingConfig = {\n enabled: this.cellEditing\n };\n } else {\n editingConfig = this.cellEditing;\n }\n this.structureCommandInvoker.setCellEdit(editingConfig, this.structureId);\n });\n ifChanged(changes.width, width => {\n this.compositionCommandDispatcher.setWidth(width, this.compositionId);\n });\n ifChanged(changes.theme, () => {\n this.schemaCommandInvoker.setTheme(this.theme, this.schemaId, this.structureId);\n });\n ifChanged(changes.rowHeight, () => {\n this.structureCommandInvoker.setRowHeight(this.rowHeight, this.structureId);\n });\n ifChanged(changes.autoResizeWidth, () => {\n this.compositionCommandDispatcher.setResizeWidth(this.autoResizeWidth, this.compositionId);\n });\n /**\n * Columns\n */\n this.structureColumnInputHandler.handle(changes);\n ifChanged(changes.maxHeight, () => {\n this.structureCommandInvoker.setContainerHeight(this.maxHeight, this.structureId);\n });\n /**\n * Setting source should be last step\n */\n ifChanged(changes.source, () => {\n this.sourceCommandService.setOrigin(this.source, this.structureId);\n });\n }\n ngOnInit() {\n this.compositionEventRepository.onColumnsChanged(this.compositionId.toReadModelRootId()).pipe(this.takeUntil()).subscribe(() => {\n this.columnsChanged.emit();\n });\n this.compositionEventRepository.onContainerWidthChanged(this.compositionId.toReadModelRootId()).pipe(this.takeUntil()).subscribe(containerWidth => {\n this.containerWidthChanged.emit(containerWidth);\n });\n this.sourceEventService.onSourceEdited(this.structureId).subscribe(values => {\n this.sourceEdited.emit(values);\n });\n this.structureCellEditStore.on().pipe(this.takeUntil()).subscribe(state => {\n switch (state) {\n case StructureCellEditState.ENTER:\n this.cellEditEntered.emit();\n break;\n case StructureCellEditState.SUBMIT:\n this.cellEditSubmitted.emit();\n break;\n case StructureCellEditState.CANCEL:\n this.cellEditCanceled.emit();\n break;\n default:\n break;\n }\n });\n this.subscribeAndEmit(this.schemaEventRepository.onThemeChanged(this.schemaId), this.themeChanged);\n this.componentInitialized();\n }\n componentInitialized() {\n this.changeAfterInit = true;\n }\n static ɵfac = function StructureGateway_Factory(t) {\n return new (t || StructureGateway)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(ColumnAutoConfigurator), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(CompositionId), i0.ɵɵdirectiveInject(SchemaReadModelRootId), i0.ɵɵdirectiveInject(StructurePublisher), i0.ɵɵdirectiveInject(PagingPublisher), i0.ɵɵdirectiveInject(PagingEventRepository), i0.ɵɵdirectiveInject(SortingPublisher), i0.ɵɵdirectiveInject(SearchPublisher), i0.ɵɵdirectiveInject(SourcePublisher), i0.ɵɵdirectiveInject(SourceEventService), i0.ɵɵdirectiveInject(SchemaPublisher), i0.ɵɵdirectiveInject(CompositionPublisher), i0.ɵɵdirectiveInject(CompositionEventRepository), i0.ɵɵdirectiveInject(FormationEventRepository), i0.ɵɵdirectiveInject(StructureEditModeArchive), i0.ɵɵdirectiveInject(StructureCellEditArchive), i0.ɵɵdirectiveInject(StructureInfoPanelConfigService), i0.ɵɵdirectiveInject(StructureCellEditStore), i0.ɵɵdirectiveInject(ColumnFieldFactory), i0.ɵɵdirectiveInject(FormationPublisher), i0.ɵɵdirectiveInject(SearchEventRepository), i0.ɵɵdirectiveInject(StructureHeaderBottomEnabledArchive), i0.ɵɵdirectiveInject(SchemaEventRepository), i0.ɵɵdirectiveInject(TranslationFacade), i0.ɵɵdirectiveInject(StructureInitialValuesReadyArchive));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureGateway,\n inputs: {\n maxHeight: \"maxHeight\",\n width: \"width\",\n rowHeight: \"rowHeight\",\n autoResizeWidth: \"autoResizeWidth\",\n source: \"source\",\n columns: \"columns\",\n editMode: \"editMode\",\n cellEditing: \"cellEditing\",\n theme: \"theme\"\n },\n outputs: {\n themeChanged: \"themeChanged\",\n columnsChanged: \"columnsChanged\",\n containerWidthChanged: \"containerWidthChanged\",\n sourceEdited: \"sourceEdited\",\n cellEditEntered: \"cellEditEntered\",\n cellEditCanceled: \"cellEditCanceled\",\n cellEditSubmitted: \"cellEditSubmitted\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructureGateway;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass StructureColumnMenuConfig {\n enabled;\n sort;\n filter;\n columnsManager;\n mainMenu = 'Menu';\n filterMenu = 'Filter';\n columnsMenu = 'Columns';\n constructor(enabled = false, sort = true, filter = false, columnsManager = false) {\n this.enabled = enabled;\n this.sort = sort;\n this.filter = filter;\n this.columnsManager = columnsManager;\n }\n static default() {\n return new StructureColumnMenuConfig();\n }\n static fromConfig(config) {\n return new StructureColumnMenuConfig(config.enabled, config.sort, config.filter, config.columnsManager);\n }\n isEnabled() {\n return this.enabled && (this.sort || this.filter || this.columnsManager);\n }\n isMainEnabled() {\n return this.sort;\n }\n isSortingEnabled() {\n return this.sort;\n }\n isFilteringEnabled() {\n return this.filter;\n }\n isColumnManagerEnabled() {\n return this.columnsManager;\n }\n getMenus() {\n const menus = [];\n if (this.isMainEnabled()) {\n menus.push(this.getMainMenu());\n }\n if (this.isFilteringEnabled()) {\n menus.push(this.getFilterMenu());\n }\n if (this.isColumnManagerEnabled()) {\n menus.push(this.getColumnMenu());\n }\n return menus;\n }\n getActiveMenu() {\n return this.getMenus()[0];\n }\n getMainMenu() {\n return this.mainMenu;\n }\n getFilterMenu() {\n return this.filterMenu;\n }\n getColumnMenu() {\n return this.columnsMenu;\n }\n setMainMenu(mainMenu) {\n this.mainMenu = mainMenu;\n }\n setFilterMenu(filterMenu) {\n this.filterMenu = filterMenu;\n }\n setColumnsMenu(columnsMenu) {\n this.columnsMenu = columnsMenu;\n }\n}\nlet StructureColumnMenuConfigArchive = /*#__PURE__*/(() => {\n class StructureColumnMenuConfigArchive extends Archive {\n constructor() {\n super(StructureColumnMenuConfig.default());\n }\n nextConfig(config) {\n const menuConfig = StructureColumnMenuConfig.fromConfig(config);\n this.next(menuConfig);\n }\n static ɵfac = function StructureColumnMenuConfigArchive_Factory(t) {\n return new (t || StructureColumnMenuConfigArchive)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureColumnMenuConfigArchive,\n factory: StructureColumnMenuConfigArchive.ɵfac\n });\n }\n return StructureColumnMenuConfigArchive;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureCellEditCloseAllService = /*#__PURE__*/(() => {\n class StructureCellEditCloseAllService {\n closeAll$ = new HermesSubject();\n closeAll() {\n this.closeAll$.next();\n }\n onCloseAll() {\n return this.closeAll$.toObservable();\n }\n static ɵfac = function StructureCellEditCloseAllService_Factory(t) {\n return new (t || StructureCellEditCloseAllService)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureCellEditCloseAllService,\n factory: StructureCellEditCloseAllService.ɵfac\n });\n }\n return StructureCellEditCloseAllService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureHeaderTopEnabledArchive = /*#__PURE__*/(() => {\n class StructureHeaderTopEnabledArchive extends Archive {\n constructor() {\n super(true);\n }\n static ɵfac = function StructureHeaderTopEnabledArchive_Factory(t) {\n return new (t || StructureHeaderTopEnabledArchive)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureHeaderTopEnabledArchive,\n factory: StructureHeaderTopEnabledArchive.ɵfac\n });\n }\n return StructureHeaderTopEnabledArchive;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureRowDetailConfigArchive = /*#__PURE__*/(() => {\n class StructureRowDetailConfigArchive extends Archive {\n constructor() {\n super({\n enabled: false,\n template: item => 'Detail View'\n });\n }\n static ɵfac = function StructureRowDetailConfigArchive_Factory(t) {\n return new (t || StructureRowDetailConfigArchive)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureRowDetailConfigArchive,\n factory: StructureRowDetailConfigArchive.ɵfac\n });\n }\n return StructureRowDetailConfigArchive;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst structureRowDetailViewItem = new InjectionToken('structureRowDetailViewItem');\nconst structureRowDetailViewTemplate = new InjectionToken('structureRowDetailViewTemplate');\nlet DynamicallyCreatedComponent = /*#__PURE__*/(() => {\n class DynamicallyCreatedComponent extends GuiComponent {\n subClassConstructor;\n constructor(elRef) {\n super(elRef);\n this.subClassConstructor = this.constructor;\n if (this.hasInputs()) {\n this.throwError('it cannot have properties annotated with @Inputs().');\n }\n }\n hasInputs() {\n return !this.isEmpty(this.constructor.ɵcmp.inputs);\n }\n throwError(reason) {\n throw new Error(`Component \"${this.subClassConstructor.name}\" is a DynamicallyCreatedComponent, ${reason}.`);\n }\n isEmpty(obj) {\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) return false;\n }\n return true;\n }\n static ɵfac = function DynamicallyCreatedComponent_Factory(t) {\n return new (t || DynamicallyCreatedComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: DynamicallyCreatedComponent,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n return DynamicallyCreatedComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureRowDetailViewComponent = /*#__PURE__*/(() => {\n class StructureRowDetailViewComponent extends DynamicallyCreatedComponent {\n item;\n template;\n sanitizer;\n selectedRowValue;\n safeHTML;\n constructor(elRef, item, template, sanitizer) {\n super(elRef);\n this.item = item;\n this.template = template;\n this.sanitizer = sanitizer;\n this.safeHTML = this.sanitizer.bypassSecurityTrustHtml(this.template(this.item.getItem(), this.item.getIndex()));\n this.selectedRowValue = this.item.getItem();\n }\n getSelectorName() {\n return 'gui-row-detail';\n }\n static ɵfac = function StructureRowDetailViewComponent_Factory(t) {\n return new (t || StructureRowDetailViewComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(structureRowDetailViewItem), i0.ɵɵdirectiveInject(structureRowDetailViewTemplate), i0.ɵɵdirectiveInject(i1.DomSanitizer));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureRowDetailViewComponent,\n selectors: [[\"div\", \"gui-row-detail\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c0,\n decls: 1,\n vars: 1,\n consts: [[3, \"innerHTML\"]],\n template: function StructureRowDetailViewComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"innerHTML\", ctx.safeHTML, i0.ɵɵsanitizeHtml);\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureRowDetailViewComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureRowDetailService = /*#__PURE__*/(() => {\n class StructureRowDetailService extends Reactive {\n injector;\n structureId;\n structureDetailViewConfigArchive;\n formationEventService;\n drawerService;\n enabled = false;\n config;\n elementRef;\n constructor(injector, structureId, structureDetailViewConfigArchive, formationEventService, drawerService) {\n super();\n this.injector = injector;\n this.structureId = structureId;\n this.structureDetailViewConfigArchive = structureDetailViewConfigArchive;\n this.formationEventService = formationEventService;\n this.drawerService = drawerService;\n }\n init(ref) {\n this.elementRef = ref;\n this.structureDetailViewConfigArchive.on().pipe(this.hermesTakeUntil()).subscribe(config => {\n this.config = config;\n if (config.enabled === true) {\n this.turnOn();\n } else if (config.enabled === false) {\n this.turnOff();\n }\n });\n this.formationEventService.onItemSelected(this.structureId).pipe(this.hermesTakeUntil()).subscribe(items => {\n if (!this.enabled) {\n return;\n }\n this.drawerService.close();\n if (items.length === 0) {\n return;\n }\n const item = items[0];\n const injector = Injector.create({\n parent: this.injector,\n providers: [{\n provide: structureRowDetailViewItem,\n useValue: item\n }, {\n provide: structureRowDetailViewTemplate,\n useValue: this.config.template\n }]\n });\n this.drawerService.open({\n appendToElement: this.elementRef,\n component: StructureRowDetailViewComponent,\n injector: injector\n });\n });\n }\n turnOn() {\n this.enabled = true;\n }\n turnOff() {\n this.enabled = false;\n }\n static ɵfac = function StructureRowDetailService_Factory(t) {\n return new (t || StructureRowDetailService)(i0.ɵɵinject(i0.Injector), i0.ɵɵinject(StructureId), i0.ɵɵinject(StructureRowDetailConfigArchive), i0.ɵɵinject(FormationEventRepository), i0.ɵɵinject(i1$1.FabricDrawerService));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureRowDetailService,\n factory: StructureRowDetailService.ɵfac\n });\n }\n return StructureRowDetailService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar PagingPosition = /*#__PURE__*/function (PagingPosition) {\n PagingPosition[PagingPosition[\"TOP\"] = 0] = \"TOP\";\n PagingPosition[PagingPosition[\"BOTTOM\"] = 1] = \"BOTTOM\";\n return PagingPosition;\n}(PagingPosition || {});\nvar CssClass = /*#__PURE__*/function (CssClass) {\n CssClass[\"SELECTED\"] = \"selected\";\n CssClass[\"PAGING_TOP_CLASS_NAME\"] = \"gui-paging-top\";\n CssClass[\"PAGING_BOTTOM_CLASS_NAME\"] = \"gui-paging-bottom\";\n return CssClass;\n}(CssClass || {});\nlet GuiState = /*#__PURE__*/(() => {\n class GuiState {\n state = {};\n state$ = new HermesReplaySubject();\n destroy$ = new HermesReplaySubject();\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n setValue(state) {\n this.state = Object.assign({}, this.state, state);\n this.state$.next(this.state);\n }\n getValue(key) {\n if (key !== undefined) {\n return this.state[key];\n } else {\n return this.state;\n }\n }\n select(key) {\n let preparedState$ = this.state$;\n if (key !== undefined) {\n preparedState$ = this.state$.pipe(hermesMap(state => {\n return state[key];\n }));\n }\n return preparedState$.pipe(hermesDistinctUntilChanged());\n }\n connect(arg, value$) {\n if (typeof arg === 'string') {\n value$.pipe(hermesTakeUntil(this.destroy$)).subscribe(value => {\n this.setPartialState(arg, value);\n });\n } else {\n arg.pipe(hermesTakeUntil(this.destroy$)).subscribe(state => {\n this.setValue(state);\n });\n }\n }\n setPartialState(key, value) {\n const newState = {};\n newState[key] = value;\n this.state = Object.assign({}, this.state, newState);\n this.state$.next(this.state);\n }\n static ɵfac = function GuiState_Factory(t) {\n return new (t || GuiState)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: GuiState,\n factory: GuiState.ɵfac\n });\n }\n return GuiState;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass StreamCloser {\n unsubscribe$ = new HermesSubject();\n constructor() {}\n takeUntil() {\n return hermesTakeUntil(this.unsubscribe$);\n }\n unsubscribe() {\n if (this.unsubscribe$.isCompleted) {\n return;\n }\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n}\nlet Gate = /*#__PURE__*/(() => {\n class Gate {\n streamCloser = new StreamCloser();\n hermesUnsubscribe$ = new HermesSubject();\n constructor() {}\n ngOnDestroy() {\n this.streamCloser.unsubscribe();\n this.hermesUnsubscribe();\n }\n isDefined(propertyName, changes) {\n return changes[propertyName] !== undefined && changes[propertyName].currentValue !== undefined;\n }\n subscribeAndEmit(stream$, emitter) {\n stream$.pipe(this.hermesTakeUntil()).subscribe(value => {\n emitter.emit(value);\n });\n }\n unsubscribe() {\n this.streamCloser.unsubscribe();\n }\n hermesUnsubscribe() {\n this.hermesUnsubscribe$.next();\n this.hermesUnsubscribe$.complete();\n }\n hermesTakeUntil() {\n return hermesTakeUntil(this.hermesUnsubscribe$);\n }\n takeUntil() {\n return this.streamCloser.takeUntil();\n }\n static ɵfac = function Gate_Factory(t) {\n return new (t || Gate)();\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: Gate\n });\n }\n return Gate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StaticComponent = /*#__PURE__*/(() => {\n class StaticComponent extends GuiComponent {\n changeDetectorRef;\n constructor(elementRef, changeDetectorRef) {\n super(elementRef);\n this.changeDetectorRef = changeDetectorRef;\n }\n ngOnInit() {\n this.changeDetectorRef.detach();\n }\n static ɵfac = function StaticComponent_Factory(t) {\n return new (t || StaticComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StaticComponent,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n return StaticComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet IconComponent = /*#__PURE__*/(() => {\n class IconComponent extends StaticComponent {\n constructor(elementRef, changeDetectorRef) {\n super(elementRef, changeDetectorRef);\n this.addClassToHost('gui-icon');\n }\n static ɵfac = function IconComponent_Factory(t) {\n return new (t || IconComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: IconComponent,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n return IconComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * https://netbasal.com/create-a-typed-version-of-simplechanges-in-angular-451f86593003\n */\nlet PureComponent = /*#__PURE__*/(() => {\n class PureComponent extends GuiComponent {\n subClassConstructor;\n subClassNgOnInit;\n constructor(elementRef) {\n super(elementRef);\n this.subClassConstructor = this.constructor;\n this.subClassNgOnInit = this.ngOnInit;\n if (!this.hasConstructorOnlyElementRefInjected(arguments)) {\n this.throwError('it should not inject services');\n }\n if (this.subClassNgOnInit) {\n this.throwError('it should not use ngOnInit');\n }\n }\n hasConstructorOnlyElementRefInjected(args) {\n if (arguments.length > 1) {\n return false;\n }\n if (arguments.length === 1) {\n return this.isElementRef(arguments[0]);\n }\n return false;\n }\n isElementRef(elRef) {\n return elRef.nativeElement !== null;\n }\n throwError(reason) {\n throw new Error(`Component \"${this.subClassConstructor.name}\" is a PureComponent, ${reason}.`);\n }\n static ɵfac = function PureComponent_Factory(t) {\n return new (t || PureComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: PureComponent,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n return PureComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction useReactiveContext(stream$, cd) {\n const unsub$ = new HermesSubject();\n let changeDetector;\n if (cd) {\n changeDetector = cd;\n } else {\n changeDetector = inject(ChangeDetectorRef);\n }\n let innerStream$;\n if (stream$) {\n innerStream$ = stream$.pipe(hermesTakeUntil(unsub$));\n }\n changeDetector.onDestroy(() => {\n unsub$.next();\n unsub$.complete();\n });\n const context = {\n connect: stream$ => {\n innerStream$ = stream$.pipe(hermesTakeUntil(unsub$));\n return context;\n },\n subscribe(next, error, complete) {\n return innerStream$.subscribe(next, error, complete);\n },\n subscribeAndRender(next, error, complete) {\n return innerStream$.subscribe(v => {\n next(v);\n changeDetector.detectChanges();\n }, error, complete);\n },\n unsubscribe() {\n unsub$.next();\n unsub$.complete();\n }\n };\n return context;\n}\nclass CssClassModifier {\n classModifier = new ClassModifier();\n select(htmlElement) {\n this.classModifier.getElement(htmlElement).add(CssClass.SELECTED);\n }\n unselect(htmlElement) {\n this.classModifier.getElement(htmlElement).remove(CssClass.SELECTED);\n }\n add(htmlElement, clazzName) {\n this.classModifier.getElement(htmlElement).add(clazzName);\n }\n remove(htmlElement, clazzName) {\n this.classModifier.getElement(htmlElement).remove(clazzName);\n }\n toggle(htmlElement) {}\n}\nclass PagingWarehouse {\n constructor() {}\n}\nlet PagingDisplayModeArchive = /*#__PURE__*/(() => {\n class PagingDisplayModeArchive extends Archive {\n constructor() {\n super(PagingDisplayMode.BASIC);\n }\n static ɵfac = function PagingDisplayModeArchive_Factory(t) {\n return new (t || PagingDisplayModeArchive)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: PagingDisplayModeArchive,\n factory: PagingDisplayModeArchive.ɵfac\n });\n }\n return PagingDisplayModeArchive;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass GuiSubscriber {\n destroy$ = new HermesReplaySubject(1);\n subscription;\n subscribe(obs$, next) {\n if (this.subscription !== undefined) {\n this.subscription.unsubscribe();\n }\n this.subscription = obs$.pipe(hermesDistinctUntilChanged(), hermesTakeUntil(this.destroy$)).subscribe(v => next(v), error => this.onError(error), () => this.onComplete());\n }\n destroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n onError(_error) {}\n onComplete() {}\n}\nclass GuiLetViewChanger {\n cd;\n vcr;\n template;\n constructor(cd, vcr, template) {\n this.cd = cd;\n this.vcr = vcr;\n this.template = template;\n }\n onNext(v) {\n this.vcr.clear();\n this.vcr.createEmbeddedView(this.template, {\n $implicit: v\n });\n this.cd.detectChanges();\n }\n}\nlet GuiLetDirective = /*#__PURE__*/(() => {\n class GuiLetDirective {\n subscriber;\n cd;\n vcr;\n template;\n guiLet;\n guiLetViewChanger;\n constructor(subscriber, cd, vcr, template) {\n this.subscriber = subscriber;\n this.cd = cd;\n this.vcr = vcr;\n this.template = template;\n this.guiLetViewChanger = new GuiLetViewChanger(this.cd, this.vcr, this.template);\n }\n ngOnChanges(changes) {\n if (changes['guiLet'] !== undefined) {\n this.subscriber.subscribe(this.guiLet, v => {\n this.guiLetViewChanger.onNext(v);\n });\n }\n }\n ngOnDestroy() {\n this.subscriber.destroy();\n }\n static ɵfac = function GuiLetDirective_Factory(t) {\n return new (t || GuiLetDirective)(i0.ɵɵdirectiveInject(GuiSubscriber), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: GuiLetDirective,\n selectors: [[\"\", \"guiLet\", \"\"]],\n inputs: {\n guiLet: \"guiLet\"\n },\n features: [i0.ɵɵProvidersFeature([GuiSubscriber]), i0.ɵɵNgOnChangesFeature]\n });\n }\n return GuiLetDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TranslationPipe = /*#__PURE__*/(() => {\n class TranslationPipe {\n changeDetectorRef;\n translationService;\n actualTranslationValue = '';\n subscription;\n constructor(changeDetectorRef, translationService) {\n this.changeDetectorRef = changeDetectorRef;\n this.translationService = translationService;\n }\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n transform(key) {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n this.subscription = this.translationService.onTranslation().subscribe(translation => {\n const value = translation[key];\n if (!value) {\n this.actualTranslationValue = key;\n }\n this.actualTranslationValue = value;\n this.changeDetectorRef.markForCheck();\n });\n return this.actualTranslationValue;\n }\n static ɵfac = function TranslationPipe_Factory(t) {\n return new (t || TranslationPipe)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef, 16), i0.ɵɵdirectiveInject(TranslationFacade, 16));\n };\n static ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"guiTranslate\",\n type: TranslationPipe,\n pure: false\n });\n }\n return TranslationPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet PagingNavigatorComponent = /*#__PURE__*/(() => {\n class PagingNavigatorComponent extends PureComponent {\n paging;\n sourceSize;\n nextPageChanged = new EventEmitter();\n prevPageChanged = new EventEmitter();\n prevDisabled = false;\n nextDisabled = false;\n constructor(elementRef) {\n super(elementRef);\n }\n ngOnChanges() {\n this.calculatePrev();\n this.calculateNext();\n }\n prevPage() {\n this.prevPageChanged.emit();\n }\n nextPage() {\n this.nextPageChanged.emit();\n }\n getSelectorName() {\n return 'gui-paging-navigator';\n }\n calculatePrev() {\n if (!this.paging) {\n return;\n }\n this.prevDisabled = this.paging.isPrevPageDisabled();\n }\n calculateNext() {\n if (!this.paging && !this.sourceSize) {\n return;\n }\n this.nextDisabled = this.paging.isNextPageDisabled();\n }\n static ɵfac = function PagingNavigatorComponent_Factory(t) {\n return new (t || PagingNavigatorComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: PagingNavigatorComponent,\n selectors: [[\"div\", \"gui-paging-navigator\", \"\", \"paging\", \"\"]],\n inputs: {\n paging: \"paging\",\n sourceSize: \"sourceSize\"\n },\n outputs: {\n nextPageChanged: \"nextPageChanged\",\n prevPageChanged: \"prevPageChanged\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c1,\n decls: 7,\n vars: 8,\n consts: [[\"gui-button\", \"\", 1, \"gui-paging-navigator-prev\", \"gui-mr-5\", 3, \"click\", \"disabled\"], [\"gui-button\", \"\", 1, \"gui-paging-navigator-next\", \"gui-mr-0\", 3, \"click\", \"disabled\"]],\n template: function PagingNavigatorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"gui-button-group\")(1, \"button\", 0);\n i0.ɵɵlistener(\"click\", function PagingNavigatorComponent_Template_button_click_1_listener() {\n return ctx.prevPage();\n });\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"button\", 1);\n i0.ɵɵlistener(\"click\", function PagingNavigatorComponent_Template_button_click_4_listener() {\n return ctx.nextPage();\n });\n i0.ɵɵtext(5);\n i0.ɵɵpipe(6, \"guiTranslate\");\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"disabled\", ctx.prevDisabled);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(3, 4, \"pagingPrevPage\"), \" \");\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"disabled\", ctx.nextDisabled);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(6, 6, \"pagingNextPage\"), \" \");\n }\n },\n dependencies: [i1$1.FabricButtonComponent, i1$1.FabricButtonGroupComponent, TranslationPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return PagingNavigatorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet PagingSelectComponent = /*#__PURE__*/(() => {\n class PagingSelectComponent extends PureComponent {\n paging;\n pageSizeChanged = new EventEmitter();\n selectPageSizes;\n selectPageSize;\n constructor(elementRef) {\n super(elementRef);\n }\n ngOnChanges(changes) {\n ifChanged(changes.paging, () => {\n if (this.paging) {\n this.selectPageSizes = this.getSelectPageSizes();\n this.selectPageSize = this.getSelectPageSize(this.paging.getPageSize());\n }\n });\n }\n changePageSize(pageSize) {\n this.pageSizeChanged.emit(+pageSize.value);\n }\n getSelectorName() {\n return 'gui-paging-select';\n }\n getSelectPageSizes() {\n const selectPageSizes = [],\n pageSizes = this.paging.getPageSizes();\n pageSizes.forEach(pageSize => {\n const selectOption = this.getSelectPageSize(pageSize);\n selectPageSizes.push(selectOption);\n });\n return selectPageSizes;\n }\n getSelectPageSize(pageSize) {\n return {\n name: pageSize.toString(),\n value: pageSize.toString()\n };\n }\n static ɵfac = function PagingSelectComponent_Factory(t) {\n return new (t || PagingSelectComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: PagingSelectComponent,\n selectors: [[\"div\", \"gui-paging-select\", \"\", \"paging\", \"\"]],\n inputs: {\n paging: \"paging\"\n },\n outputs: {\n pageSizeChanged: \"pageSizeChanged\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c2,\n decls: 4,\n vars: 6,\n consts: [[1, \"gui-inline-block\", \"gui-mr-5\"], [3, \"optionChanged\", \"options\", \"selected\", \"width\"]],\n template: function PagingSelectComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 0);\n i0.ɵɵtext(1);\n i0.ɵɵpipe(2, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"gui-select\", 1);\n i0.ɵɵlistener(\"optionChanged\", function PagingSelectComponent_Template_gui_select_optionChanged_3_listener($event) {\n return ctx.changePageSize($event);\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(2, 4, \"pagingItemsPerPage\"), \"\\n\");\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"options\", ctx.selectPageSizes)(\"selected\", ctx.selectPageSize)(\"width\", 25);\n }\n },\n dependencies: [i1$1.FabricSelectComponent, TranslationPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return PagingSelectComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet PagingStatsComponent = /*#__PURE__*/(() => {\n class PagingStatsComponent extends PureComponent {\n paging;\n sourceSize;\n firstItemIndex;\n lastItemIndex;\n constructor(elementRef) {\n super(elementRef);\n this.addClassToHost('gui-mx-6');\n }\n ngOnChanges() {\n this.calculate();\n }\n calculate() {\n if (this.paging) {\n this.firstItemIndex = this.paging.getStart();\n this.lastItemIndex = this.paging.getEnd();\n this.sourceSize = this.paging.getSourceSize();\n }\n }\n isSourceNotEmpty() {\n return this.sourceSize > 0;\n }\n getSelectorName() {\n return 'gui-paging-stats';\n }\n static ɵfac = function PagingStatsComponent_Factory(t) {\n return new (t || PagingStatsComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: PagingStatsComponent,\n selectors: [[\"div\", \"gui-paging-stats\", \"\", \"paging\", \"\"]],\n inputs: {\n paging: \"paging\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c3,\n decls: 3,\n vars: 2,\n consts: [[\"noSource\", \"\"], [4, \"ngIf\", \"ngIfElse\"], [1, \"gui-paging-source-stats\"], [1, \"gui-paging-source-size\"], [1, \"gui-paging-source-stats\", \"gui-paging-no-items\"]],\n template: function PagingStatsComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, PagingStatsComponent_ng_container_0_Template, 12, 6, \"ng-container\", 1)(1, PagingStatsComponent_ng_template_1_Template, 3, 3, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const noSource_r2 = i0.ɵɵreference(2);\n i0.ɵɵproperty(\"ngIf\", ctx.isSourceNotEmpty())(\"ngIfElse\", noSource_r2);\n }\n },\n dependencies: [i4.NgIf, TranslationPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return PagingStatsComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AlternativePagingNavigatorComponent = /*#__PURE__*/(() => {\n class AlternativePagingNavigatorComponent extends PureComponent {\n structureId;\n pagingCommandInvoker;\n paging;\n sourceSize;\n nextPageChanged = new EventEmitter();\n prevPageChanged = new EventEmitter();\n prevDisabled = false;\n nextDisabled = false;\n constructor(elRef, structureId, pagingCommandInvoker) {\n super(elRef);\n this.structureId = structureId;\n this.pagingCommandInvoker = pagingCommandInvoker;\n }\n ngOnChanges() {\n this.calculatePrev();\n this.calculateNext();\n }\n prevPage() {\n this.prevPageChanged.emit();\n }\n nextPage() {\n this.nextPageChanged.emit();\n }\n firstPage() {\n this.pagingCommandInvoker.goToPage(1, this.paging.getPage(), this.structureId);\n }\n lastPage() {\n const numberOfPages = Math.ceil(this.sourceSize / this.paging.getPageSize());\n this.pagingCommandInvoker.goToPage(numberOfPages, this.paging.getPage(), this.structureId);\n }\n getSelectorName() {\n return 'gui-paging-alternative-navigator';\n }\n calculatePrev() {\n if (!this.paging) {\n return;\n }\n this.prevDisabled = this.paging.isPrevPageDisabled();\n }\n calculateNext() {\n if (!this.paging && !this.sourceSize) {\n return;\n }\n this.nextDisabled = this.paging.isNextPageDisabled();\n }\n static ɵfac = function AlternativePagingNavigatorComponent_Factory(t) {\n return new (t || AlternativePagingNavigatorComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(PagingPublisher));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: AlternativePagingNavigatorComponent,\n selectors: [[\"div\", \"gui-paging-alternative-navigator\", \"\", \"paging\", \"\", \"sourceSize\", \"\"]],\n inputs: {\n paging: \"paging\",\n sourceSize: \"sourceSize\"\n },\n outputs: {\n nextPageChanged: \"nextPageChanged\",\n prevPageChanged: \"prevPageChanged\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c4,\n ngContentSelectors: _c5,\n decls: 17,\n vars: 4,\n consts: [[\"gui-button\", \"\", 3, \"click\", \"disabled\"], [\"height\", \"10.661\", \"viewBox\", \"0 0 11.081 10.661\", \"width\", \"11.081\", \"xmlns\", \"http://www.w3.org/2000/svg\"], [\"transform\", \"translate(-522.98 669.601) rotate(180)\"], [\"d\", \"M.75.75,5.02,5.02.75,9.29\", \"fill\", \"none\", \"stroke-linecap\", \"round\", \"stroke-linejoin\", \"round\", \"stroke-width\", \"1.5\", \"transform\", \"translate(-533.75 659.25)\"], [\"d\", \"M.75.75,5.02,5.02.75,9.29\", \"fill\", \"none\", \"stroke-linecap\", \"round\", \"stroke-linejoin\", \"round\", \"stroke-width\", \"1.5\", \"transform\", \"translate(-528.75 659.25)\"], [\"gui-button\", \"\", 1, \"gui-paging-navigator-prev\", 3, \"click\", \"disabled\"], [\"height\", \"10.661\", \"viewBox\", \"0 0 6.081 10.661\", \"width\", \"6.081\", \"xmlns\", \"http://www.w3.org/2000/svg\"], [\"d\", \"M.75.75,5.02,5.02.75,9.29\", \"fill\", \"none\", \"stroke-linecap\", \"round\", \"stroke-linejoin\", \"round\", \"stroke-width\", \"1.5\", \"transform\", \"translate(5.77 10.351) rotate(180)\"], [\"gui-button\", \"\", 1, \"gui-paging-navigator-next\", 3, \"click\", \"disabled\"], [\"d\", \"M.75.75,5.02,5.02.75,9.29\", \"fill\", \"none\", \"stroke-linecap\", \"round\", \"stroke-linejoin\", \"round\", \"stroke-width\", \"1.5\", \"transform\", \"translate(0.311 0.311)\"], [\"transform\", \"translate(534.061 -658.939)\"]],\n template: function AlternativePagingNavigatorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"button\", 0);\n i0.ɵɵlistener(\"click\", function AlternativePagingNavigatorComponent_Template_button_click_0_listener() {\n return ctx.firstPage();\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"svg\", 1)(2, \"g\", 2);\n i0.ɵɵelement(3, \"path\", 3)(4, \"path\", 4);\n i0.ɵɵelementEnd()()();\n i0.ɵɵnamespaceHTML();\n i0.ɵɵelementStart(5, \"button\", 5);\n i0.ɵɵlistener(\"click\", function AlternativePagingNavigatorComponent_Template_button_click_5_listener() {\n return ctx.prevPage();\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(6, \"svg\", 6);\n i0.ɵɵelement(7, \"path\", 7);\n i0.ɵɵelementEnd()();\n i0.ɵɵprojection(8);\n i0.ɵɵnamespaceHTML();\n i0.ɵɵelementStart(9, \"button\", 8);\n i0.ɵɵlistener(\"click\", function AlternativePagingNavigatorComponent_Template_button_click_9_listener() {\n return ctx.nextPage();\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(10, \"svg\", 6);\n i0.ɵɵelement(11, \"path\", 9);\n i0.ɵɵelementEnd()();\n i0.ɵɵnamespaceHTML();\n i0.ɵɵelementStart(12, \"button\", 0);\n i0.ɵɵlistener(\"click\", function AlternativePagingNavigatorComponent_Template_button_click_12_listener() {\n return ctx.lastPage();\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(13, \"svg\", 1)(14, \"g\", 10);\n i0.ɵɵelement(15, \"path\", 3)(16, \"path\", 4);\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"disabled\", ctx.prevDisabled);\n i0.ɵɵadvance(5);\n i0.ɵɵproperty(\"disabled\", ctx.prevDisabled);\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"disabled\", ctx.nextDisabled);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"disabled\", ctx.nextDisabled);\n }\n },\n dependencies: [i1$1.FabricButtonComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return AlternativePagingNavigatorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AlternativePagingPagesComponent = /*#__PURE__*/(() => {\n class AlternativePagingPagesComponent extends PureComponent {\n structureId;\n pagingCommandService;\n paging;\n sourceSize = 0;\n currentPage;\n pages;\n numberOfVisiblePages = 3;\n constructor(elRef, structureId, pagingCommandService) {\n super(elRef);\n this.structureId = structureId;\n this.pagingCommandService = pagingCommandService;\n }\n ngOnChanges(changes) {\n this.calculate();\n }\n calculate() {\n if (this.paging && this.sourceSize) {\n const numberOfPages = Math.ceil(this.sourceSize / this.paging.getPageSize());\n this.currentPage = this.paging.getPage();\n this.pages = [];\n if (this.pages.length <= numberOfPages) {\n for (let i = 1; i <= numberOfPages; i++) {\n this.pages.push(i);\n }\n }\n }\n }\n isSourceNotEmpty() {\n return this.sourceSize > 0;\n }\n goToPage(pageNumber) {\n const currentPage = this.paging.getPage();\n this.pagingCommandService.goToPage(pageNumber, currentPage, this.structureId);\n }\n calculateVisiblePages(page) {\n return this.paging.calculateVisiblePages(this.currentPage, this.numberOfVisiblePages, page);\n }\n activePage(page) {\n return this.currentPage === page;\n }\n getSelectorName() {\n return 'gui-paging-alternative-pages';\n }\n static ɵfac = function AlternativePagingPagesComponent_Factory(t) {\n return new (t || AlternativePagingPagesComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(PagingPublisher));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: AlternativePagingPagesComponent,\n selectors: [[\"div\", \"gui-paging-alternative-pages\", \"\", \"paging\", \"\"]],\n inputs: {\n paging: \"paging\",\n sourceSize: \"sourceSize\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c6,\n decls: 3,\n vars: 2,\n consts: [[\"noSource\", \"\"], [4, \"ngIf\", \"ngIfElse\"], [4, \"ngFor\", \"ngForOf\"], [1, \"relative\"], [1, \"gui-paging-page\", \"gui-select-none\", \"gui-cursor-pointer\", \"gui-py-0\", \"gui-px-6\", \"gui-font-base\", 3, \"click\"], [1, \"gui-paging-source-stats\", \"gui-paging-no-items\"]],\n template: function AlternativePagingPagesComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, AlternativePagingPagesComponent_ng_container_0_Template, 2, 1, \"ng-container\", 1)(1, AlternativePagingPagesComponent_ng_template_1_Template, 3, 3, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const noSource_r4 = i0.ɵɵreference(2);\n i0.ɵɵproperty(\"ngIf\", ctx.isSourceNotEmpty())(\"ngIfElse\", noSource_r4);\n }\n },\n dependencies: [i4.NgForOf, i4.NgIf, TranslationPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return AlternativePagingPagesComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet PagingComponent = /*#__PURE__*/(() => {\n class PagingComponent extends GuiComponent {\n elRef;\n cssClassModifier;\n structureId;\n pagingWarehouse;\n pagingCommandInvoker;\n sourceWarehouse;\n pagingDisplayModeArchive;\n position;\n minimal;\n state = inject(GuiState);\n state$ = this.state.select();\n constructor(elRef, cssClassModifier, structureId, pagingWarehouse, pagingCommandInvoker, sourceWarehouse, pagingDisplayModeArchive) {\n super(elRef);\n this.elRef = elRef;\n this.cssClassModifier = cssClassModifier;\n this.structureId = structureId;\n this.pagingWarehouse = pagingWarehouse;\n this.pagingCommandInvoker = pagingCommandInvoker;\n this.sourceWarehouse = sourceWarehouse;\n this.pagingDisplayModeArchive = pagingDisplayModeArchive;\n this.addClassToHost('gui-flex');\n this.addClassToHost('gui-justify-end');\n this.addClassToHost('gui-items-center');\n this.addClassToHost('gui-p-4');\n this.state.setValue({\n alternativeDisplay: false,\n isPagingVisible: false\n });\n this.state.connect('sourceSize', this.sourceWarehouse.onOriginSize(this.structureId));\n this.state.connect('alternativeDisplay', this.selectIsAdvancedPagingEnabled());\n this.state.connect('paging', this.pagingWarehouse.onPaging(this.structureId));\n this.state.connect('isPagingVisible', this.selectIsPagingVisible());\n }\n ngOnChanges(changes) {\n if (changes.position) {\n if (this.position === PagingPosition.BOTTOM) {\n this.cssClassModifier.remove(this.elRef.nativeElement, CssClass.PAGING_TOP_CLASS_NAME);\n this.cssClassModifier.add(this.elRef.nativeElement, CssClass.PAGING_BOTTOM_CLASS_NAME);\n } else {\n this.cssClassModifier.remove(this.elRef.nativeElement, CssClass.PAGING_BOTTOM_CLASS_NAME);\n this.cssClassModifier.add(this.elRef.nativeElement, CssClass.PAGING_TOP_CLASS_NAME);\n }\n }\n }\n changePageSize(pageSize) {\n this.pagingCommandInvoker.changePageSize(pageSize, this.structureId);\n }\n nextPage(sourceSize) {\n if (!sourceSize) {\n return;\n }\n this.pagingCommandInvoker.nextPage(this.structureId);\n }\n prevPage() {\n this.pagingCommandInvoker.prevPage(this.structureId);\n }\n getSelectorName() {\n return 'gui-paging';\n }\n selectIsPagingVisible() {\n return this.pagingWarehouse.onPaging(this.structureId).pipe(hermesMap(paging => {\n return this.mapIsPagingVisible(paging);\n }));\n }\n mapIsPagingVisible(paging) {\n return paging && paging.isEnabled() && (this.position === PagingPosition.TOP && paging.isPagerTop() || this.position === PagingPosition.BOTTOM && paging.isPagerBottom());\n }\n selectIsAdvancedPagingEnabled() {\n return this.pagingDisplayModeArchive.on().pipe(hermesMap(mode => {\n return mode === PagingDisplayMode.ADVANCED;\n }));\n }\n static ɵfac = function PagingComponent_Factory(t) {\n return new (t || PagingComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(CssClassModifier), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(PagingWarehouse), i0.ɵɵdirectiveInject(PagingPublisher), i0.ɵɵdirectiveInject(SourceWarehouse), i0.ɵɵdirectiveInject(PagingDisplayModeArchive));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: PagingComponent,\n selectors: [[\"div\", \"gui-paging\", \"\", \"position\", \"\"]],\n inputs: {\n position: \"position\",\n minimal: \"minimal\"\n },\n features: [i0.ɵɵProvidersFeature([GuiState]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c7,\n decls: 1,\n vars: 1,\n consts: [[\"minimalTemplate\", \"\"], [4, \"guiLet\"], [4, \"ngIf\"], [4, \"ngIf\", \"ngIfElse\"], [\"gui-paging-select\", \"\", 3, \"pageSizeChanged\", \"paging\"], [\"gui-paging-stats\", \"\", 3, \"paging\"], [\"gui-paging-navigator\", \"\", 3, \"nextPageChanged\", \"prevPageChanged\", \"paging\", \"sourceSize\"], [\"gui-paging-alternative-navigator\", \"\", 1, \"gui-flex\", \"gui-p-0\", 3, \"nextPageChanged\", \"prevPageChanged\", \"paging\", \"sourceSize\"], [\"gui-paging-alternative-pages\", \"\", 1, \"gui-flex\", \"gui-justify-center\", 3, \"paging\", \"sourceSize\"]],\n template: function PagingComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, PagingComponent_ng_container_0_Template, 3, 2, \"ng-container\", 1);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiLet\", ctx.state$);\n }\n },\n dependencies: [i4.NgIf, GuiLetDirective, PagingNavigatorComponent, PagingSelectComponent, PagingStatsComponent, AlternativePagingNavigatorComponent, AlternativePagingPagesComponent],\n styles: [\".gui-paging-alternative-navigator .gui-button{-ms-flex-line-pack:center;align-content:center;background:transparent;display:-ms-flexbox;display:flex;font-size:14px;line-height:21px;margin:0 2px;padding:0}.gui-paging-alternative-navigator .gui-button svg{-ms-flex-item-align:center;align-self:center;height:12px;margin:-1px 2px 0;width:auto}.gui-paging-alternative-navigator .gui-button svg path{stroke:#ccc;transition:stroke .3s ease-in-out}.gui-paging-alternative-navigator .gui-button:hover{background:transparent}.gui-paging-alternative-navigator .gui-button:hover svg path{stroke:#333}.gui-paging-alternative-navigator .gui-button:disabled svg{opacity:.4}.gui-paging-alternative-navigator .gui-material .gui-button{padding:2px 16px}.gui-paging-alternative-pages{line-height:21px}.gui-paging-alternative-pages .gui-paging-page{display:none}.gui-paging-alternative-pages .gui-paging-visible-page .gui-paging-page{display:block;font-family:Arial,serif}.gui-paging-alternative-pages .gui-paging-visible-page.gui-paging-active-page{color:#333}.gui-paging-alternative-pages .gui-paging-visible-page.gui-paging-active-page .gui-paging-page{font-weight:700}.gui-paging-bottom{border-top:1px solid;border-top-color:inherit}.gui-paging-top{border-bottom:1px solid;border-bottom-color:inherit}\\n\", \".gui-generic .gui-paging,.gui-generic .gui-paging *{border-color:#2224261a;font-size:14px}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return PagingComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass Logger {}\nclass PageChangedEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'PageChangedEvent');\n }\n}\nclass StructureAggregateEvent extends AggregateEvent {}\nclass PageChangedAggregateEvent extends StructureAggregateEvent {\n constructor(structureId) {\n super(structureId, 'PageChangedAggregateEvent');\n }\n toDomainEvent() {\n return new PageChangedEvent(this.getAggregateId());\n }\n}\nclass PagesizeChangedEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'PagesizeChangedEvent');\n }\n}\nclass PagesizeChangedAggregateEvent extends StructureAggregateEvent {\n constructor(structureId) {\n super(structureId, 'PagesizeChangedAggregateEvent');\n }\n toDomainEvent() {\n return new PagesizeChangedEvent(this.getAggregateId());\n }\n}\nclass PagingManager {\n enabled;\n page;\n pageSize;\n pageSizes;\n pagerTop;\n pagerBottom;\n sourceSize;\n // TODO\n events = [];\n logger;\n constructor(enabled, page, pageSize, pageSizes, pagerTop, pagerBottom, sourceSize, logger) {\n this.enabled = enabled;\n this.page = page;\n this.pageSize = pageSize;\n this.pageSizes = pageSizes;\n this.pagerTop = pagerTop;\n this.pagerBottom = pagerBottom;\n this.sourceSize = sourceSize;\n this.logger = logger;\n }\n // TODO Remove\n static default(logger) {\n return new PagingManager(false, 1, 25, [10, 25, 50, 100], false, true, 0, logger);\n }\n // TODO Remove\n static fromConfig(paging, logger) {\n const defaultPagingDefinition = PagingManager.default(logger),\n enabled = paging.enabled || defaultPagingDefinition.isEnabled(),\n page = paging.page || defaultPagingDefinition.getPage(),\n pageSize = paging.pageSize || defaultPagingDefinition.getPageSize(),\n pageSizes = paging.pageSizes || defaultPagingDefinition.getPageSizes(),\n pagerTop = paging.pagerTop || defaultPagingDefinition.isPagerTop(),\n pagerBottom = paging.pagerBottom || defaultPagingDefinition.isPagerBottom();\n return new PagingManager(enabled, page, pageSize, pageSizes, pagerTop, pagerBottom, 0, logger);\n }\n isEnabled() {\n return this.enabled;\n }\n isDisabled() {\n return !this.enabled;\n }\n getPage() {\n return this.page;\n }\n getPageSize() {\n return this.pageSize;\n }\n getPageSizes() {\n return this.pageSizes;\n }\n isPagerTop() {\n if (this.isDisabled()) {\n return false;\n }\n return this.pagerTop;\n }\n isPagerBottom() {\n if (this.isDisabled()) {\n return false;\n }\n return this.pagerBottom;\n }\n getSourceSize() {\n return this.sourceSize;\n }\n change(pagingConfig) {\n if (pagingConfig.enabled !== undefined) {\n this.enabled = pagingConfig.enabled;\n }\n if (pagingConfig.page !== undefined) {\n this.page = pagingConfig.page;\n if (pagingConfig.enabled === undefined) {\n this.enabled = true;\n }\n }\n if (pagingConfig.pageSize !== undefined) {\n this.pageSize = pagingConfig.pageSize;\n if (pagingConfig.enabled === undefined) {\n this.enabled = true;\n }\n }\n if (pagingConfig.pageSizes !== undefined) {\n this.pageSizes = pagingConfig.pageSizes;\n if (pagingConfig.enabled === undefined) {\n this.enabled = true;\n }\n }\n if (pagingConfig.pagerTop !== undefined) {\n this.pagerTop = pagingConfig.pagerTop;\n if (pagingConfig.enabled === undefined) {\n this.enabled = true;\n }\n }\n if (pagingConfig.pagerBottom !== undefined) {\n this.pagerBottom = pagingConfig.pagerBottom;\n if (pagingConfig.enabled === undefined) {\n this.enabled = true;\n }\n }\n if (this.enabled === true && pagingConfig.pagerTop === false && pagingConfig.pagerBottom === false) {\n this.pagerBottom = true;\n this.logger.warn('Pagers cannot be turn off when paging is enabled.');\n }\n }\n setSourceSize(size) {\n this.sourceSize = size;\n }\n nextPage() {\n let nextPage = this.page;\n if (!this.isNextPageDisabled()) {\n nextPage += 1;\n }\n this.page = nextPage;\n }\n prevPage() {\n let prevPage = this.page;\n if (!this.isPrevPageDisabled()) {\n prevPage -= 1;\n }\n this.page = prevPage;\n }\n changePageSize(pageSize) {\n if (this.pageSizes.find(ps => ps === pageSize)) {\n this.setPage(1);\n this.setPageSize(pageSize);\n }\n return this.events;\n }\n isNextPageDisabled() {\n if (this.sourceSize === 0) {\n return true;\n }\n return this.page === Math.ceil(this.sourceSize / this.pageSize);\n }\n isPrevPageDisabled() {\n return this.page === 1;\n }\n calculateStart() {\n const firstItem = 1 + (this.page - 1) * this.pageSize;\n if (this.sourceSize < firstItem) {\n return 0;\n }\n return firstItem;\n }\n calculateEnd() {\n const lastItem = this.page * this.pageSize;\n if (this.sourceSize < lastItem) {\n return this.sourceSize;\n }\n return lastItem;\n }\n sample(source) {\n if (this.isDisabled()) {\n return source;\n }\n let start = this.calculateStart();\n if (start !== 0) {\n start -= 1;\n }\n return source.slice(start, this.calculateEnd());\n }\n clearEvents() {\n this.events.length = 0;\n }\n setPage(page) {\n this.page = page;\n this.events.push(new PageChangedAggregateEvent(new StructureId('TODO need to be changed')));\n }\n setPageSize(pageSize) {\n this.pageSize = pageSize;\n this.events.push(new PagesizeChangedAggregateEvent(new StructureId('TODO need to be changed')));\n }\n}\nlet PagingManagerFactory = /*#__PURE__*/(() => {\n class PagingManagerFactory {\n logger;\n constructor(logger) {\n this.logger = logger;\n }\n static services = [Logger];\n createDefault() {\n return PagingManager.default(this.logger);\n }\n createFromConfig(config) {\n return PagingManager.fromConfig(config, this.logger);\n }\n }\n return PagingManagerFactory;\n})();\nclass SetPagingCommand extends StructureCommand {\n config;\n constructor(structureId, config) {\n super(structureId, 'SetPagingCommand');\n this.config = config;\n }\n getPagingConfig() {\n return this.config;\n }\n}\nclass ChangePagesizeCommand extends StructureCommand {\n pageSize;\n constructor(structureId, pageSize) {\n super(structureId, 'ChangePagesizeCommand');\n this.pageSize = pageSize;\n }\n getPageSize() {\n return this.pageSize;\n }\n}\nclass NextPageCommand extends StructureCommand {\n constructor(structureId) {\n super(structureId, 'NextPageCommand');\n }\n}\nclass PrevPageCommand extends StructureCommand {\n constructor(structureId) {\n super(structureId, 'PrevPageCommand');\n }\n}\nlet PagingDispatcher = /*#__PURE__*/(() => {\n class PagingDispatcher {\n commandDispatcher;\n constructor(commandDispatcher) {\n this.commandDispatcher = commandDispatcher;\n }\n static services = [CommandDispatcher];\n setPaging(paging, structureId) {\n this.commandDispatcher.dispatch(new SetPagingCommand(structureId, paging));\n }\n changePageSize(pageSize, structureId) {\n this.commandDispatcher.dispatch(new ChangePagesizeCommand(structureId, pageSize));\n }\n nextPage(structureId) {\n this.commandDispatcher.dispatch(new NextPageCommand(structureId));\n }\n prevPage(structureId) {\n this.commandDispatcher.dispatch(new PrevPageCommand(structureId));\n }\n }\n return PagingDispatcher;\n})();\nclass PagingSetEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'PagingSetEvent');\n }\n}\nclass SetPagingCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SetPagingCommand;\n }\n handle(structureAggregate, command) {\n const pagingConfig = command.getPagingConfig();\n structureAggregate.changePaging(pagingConfig);\n }\n publish(aggregate, command) {\n this.domainEventPublisher.publish(new PagingSetEvent(command.getAggregateId()));\n }\n}\nclass NextPageEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'NextPageEvent');\n }\n}\nclass NextPageCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return NextPageCommand;\n }\n handle(aggregate, command) {\n // missing implementation\n aggregate.nextPage();\n }\n publish(aggregate, command) {\n this.domainEventPublisher.publish(new NextPageEvent(command.getAggregateId()));\n }\n}\nclass PrevPageEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'PrevPageEvent');\n }\n}\nclass PrevPageCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return PrevPageCommand;\n }\n handle(structure, command) {\n structure.prevPage();\n }\n publish(aggregate, command) {\n this.domainEventPublisher.publish(new PrevPageEvent(command.getAggregateId()));\n }\n}\nclass ChangePagesizeCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return ChangePagesizeCommand;\n }\n handle(structureAggregate, command) {\n const pageSize = command.getPageSize();\n structureAggregate.changePageSize(pageSize);\n }\n publish(aggregate, command) {\n const aggregateEvents = aggregate.getEvents();\n aggregateEvents.forEach(event => {\n event.aggregateId = aggregate.getId();\n });\n this.publishAggregateEvents(aggregateEvents, command);\n aggregate.clearEvents();\n }\n publishAggregateEvents(events, command) {\n for (const event of events) {\n this.publishAggregateEvent(event, command);\n }\n }\n publishAggregateEvent(event, command) {\n switch (event.getType()) {\n case 'PageChangedAggregateEvent':\n const pageChangedEvent = new PageChangedEvent(command.getAggregateId());\n this.domainEventPublisher.publish(pageChangedEvent);\n break;\n case 'PagesizeChangedAggregateEvent':\n const pagesizeChangedEvent = new PagesizeChangedEvent(command.getAggregateId());\n this.domainEventPublisher.publish(pagesizeChangedEvent);\n break;\n case 'StructurePreparedEntitiesSetAggregateEvent':\n this.domainEventPublisher.publish(event.toDomainEvent());\n break;\n default:\n break;\n }\n }\n}\nconst structureKey = 'StructureAggregate';\nclass PagingDomainModule {\n defineAggregate() {\n return null;\n }\n registerKey() {\n return structureKey;\n }\n registerProviders(container) {\n container.provide(PagingDispatcher);\n container.provide(PagingManagerFactory);\n }\n registerCommandHandlers() {\n return [SetPagingCommandHandler, NextPageCommandHandler, PrevPageCommandHandler, ChangePagesizeCommandHandler];\n }\n registerDomainEventHandler() {\n return [];\n }\n registerMultiDomainEventHandler() {\n return [];\n }\n}\nlet PagingModel = /*#__PURE__*/(() => {\n let PagingModel = class PagingModel {\n enabled;\n page;\n pageSize;\n pageSizes;\n pagerTop;\n pagerBottom;\n isNextDisabled;\n isPrevDisabled;\n start;\n end;\n sourceSize;\n constructor(enabled, page, pageSize, pageSizes, pagerTop, pagerBottom, isNextDisabled, isPrevDisabled, start, end, sourceSize) {\n this.enabled = enabled;\n this.page = page;\n this.pageSize = pageSize;\n this.pageSizes = pageSizes;\n this.pagerTop = pagerTop;\n this.pagerBottom = pagerBottom;\n this.isNextDisabled = isNextDisabled;\n this.isPrevDisabled = isPrevDisabled;\n this.start = start;\n this.end = end;\n this.sourceSize = sourceSize;\n }\n isEnabled() {\n return this.enabled;\n }\n getPage() {\n return this.page;\n }\n getPageSize() {\n return this.pageSize;\n }\n getPageSizes() {\n return this.pageSizes;\n }\n isPagerTop() {\n return this.pagerTop;\n }\n isPagerBottom() {\n return this.pagerBottom;\n }\n isNextPageDisabled() {\n return this.isNextDisabled;\n }\n isPrevPageDisabled() {\n return this.isPrevDisabled;\n }\n getStart() {\n return this.start;\n }\n getEnd() {\n return this.end;\n }\n getSourceSize() {\n return this.sourceSize;\n }\n calculateVisiblePages(currentPage, numberOfVisiblePages, page) {\n return currentPage - numberOfVisiblePages < page && page < currentPage + numberOfVisiblePages;\n }\n sample(source) {\n let start = this.getStart();\n if (start !== 0) {\n start -= 1;\n }\n return source.slice(start, this.getEnd());\n }\n // TODO\n compare(target) {\n return JSON.stringify(this) === JSON.stringify(target);\n }\n };\n PagingModel = __decorate([ReadModelObject], PagingModel);\n return PagingModel;\n})();\nclass PagingConverter {\n convert(aggregate) {\n return new PagingModel(aggregate.isEnabled(), aggregate.getPage(), aggregate.getPageSize(), aggregate.getPageSizes(), aggregate.isPagerTop(), aggregate.isPagerBottom(), aggregate.isNextPageDisabled(), aggregate.isPrevPageDisabled(), aggregate.calculateStart(), aggregate.calculateEnd(), aggregate.getSourceSize());\n }\n}\nclass StructureReadModelRepository extends Reactive {\n domainEventBus = CoreContainer.resolve(DomainEventBus);\n constructor() {\n super();\n this.domainEventBus.ofEvents(this.forEvents()).pipe(this.hermesTakeUntil()).subscribe(event => {\n try {\n this.subs(event);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(e);\n }\n });\n }\n}\nlet PagingRepository = /*#__PURE__*/(() => {\n class PagingRepository {\n structureRepository;\n constructor(structureRepository) {\n this.structureRepository = structureRepository;\n }\n static services = [StructureReadModelRepository];\n on(structureId) {\n return this.structureRepository.on(structureId).pipe(hermesFilter(structure => structure.getId().toString() === structureId.toString()), hermesMap(structure => structure.getPaging()));\n }\n }\n return PagingRepository;\n})();\nlet PagingDomainWarehouse = /*#__PURE__*/(() => {\n class PagingDomainWarehouse extends PagingWarehouse {\n pagingRepository;\n constructor(pagingRepository) {\n super();\n this.pagingRepository = pagingRepository;\n }\n static services = [PagingRepository];\n onPaging(structureId) {\n return this.pagingRepository.on(structureId);\n }\n oncePaging(structureId) {\n return singleFromObservable(this.pagingRepository.on(structureId));\n }\n }\n return PagingDomainWarehouse;\n})();\nlet PagingDomainPublisher = /*#__PURE__*/(() => {\n class PagingDomainPublisher extends PagingPublisher {\n pagingDispatcher;\n constructor(pagingDispatcher) {\n super();\n this.pagingDispatcher = pagingDispatcher;\n }\n static services = [PagingDispatcher];\n enable(structureId) {\n this.pagingDispatcher.setPaging({\n enabled: true\n }, structureId);\n }\n disable(structureId) {\n this.pagingDispatcher.setPaging({\n enabled: false\n }, structureId);\n }\n setPaging(paging, structureId) {\n this.pagingDispatcher.setPaging(paging, structureId);\n }\n changePageSize(pageSize, structureId) {\n this.pagingDispatcher.changePageSize(pageSize, structureId);\n }\n nextPage(structureId) {\n this.pagingDispatcher.nextPage(structureId);\n }\n prevPage(structureId) {\n this.pagingDispatcher.prevPage(structureId);\n }\n goToPage(pageNumber, currentPage, structureId) {\n if (currentPage < pageNumber) {\n while (currentPage !== pageNumber) {\n this.nextPage(structureId);\n currentPage += 1;\n }\n } else {\n while (currentPage !== pageNumber) {\n this.prevPage(structureId);\n currentPage -= 1;\n }\n }\n }\n changePagerTop(enabled, structureId) {\n this.pagingDispatcher.setPaging({\n pagerTop: enabled\n }, structureId);\n }\n changePagerBottom(enabled, structureId) {\n this.pagingDispatcher.setPaging({\n pagerBottom: enabled\n }, structureId);\n }\n }\n return PagingDomainPublisher;\n})();\nlet PagingDomainEventRepository = /*#__PURE__*/(() => {\n class PagingDomainEventRepository extends PagingEventRepository {\n pagingWarehouse;\n eventBusToRemove = CoreContainer.resolve(DomainEventBus);\n constructor(pagingWarehouse) {\n super();\n this.pagingWarehouse = pagingWarehouse;\n }\n static services = [PagingWarehouse];\n onPageChange(structureId) {\n return this.eventBusToRemove.ofEvents([PrevPageEvent, NextPageEvent, PageChangedEvent]).pipe(hermesFilter(event => event.getAggregateId().toString() === structureId.toAggregateId().toString()), hermesSwitchMap(event => {\n return this.pagingWarehouse.oncePaging(structureId.toAggregateId()).pipe(hermesMap(paging => paging.getPage()));\n }));\n }\n onPageSizeChange(structureId) {\n return this.eventBusToRemove.ofEvents([PagesizeChangedEvent]).pipe(hermesFilter(event => event.getAggregateId().toString() === structureId.toAggregateId().toString()), hermesSwitchMap(event => {\n return this.pagingWarehouse.oncePaging(structureId.toAggregateId()).pipe(hermesMap(paging => paging.getPageSize()));\n }));\n }\n }\n return PagingDomainEventRepository;\n})();\nclass PagingApiModule {\n registerProviders(container) {\n container.provide(PagingPublisher, PagingDomainPublisher);\n container.provide(PagingWarehouse, PagingDomainWarehouse);\n container.provide(PagingEventRepository, PagingDomainEventRepository);\n container.provide(PagingRepository);\n container.provide(PagingConverter);\n }\n}\nfunction initializePaging() {\n new DomainInitializer(new PagingApiModule(), new PagingDomainModule()).init();\n}\nclass Dictionary {\n translation = new Map();\n resolver = (key, value) => value;\n changeTranslation(change) {\n for (const key of Object.keys(change)) {\n this.translation.set(key, change[key]);\n }\n }\n getTranslation() {\n return Array.from(this.translation).reduce((obj, [key, value]) => Object.assign(obj, {\n [key]: this.resolver(key, value)\n }), {});\n }\n setResolver(resolver) {\n this.resolver = resolver;\n }\n}\nclass TranslationDomainFacade extends TranslationFacade {\n defaultTranslation = enTranslation;\n dictionary = new Dictionary();\n dictionary$ = new HermesReplaySubject(1);\n constructor() {\n super();\n }\n getTranslation() {\n return this.dictionary.getTranslation();\n }\n onTranslation() {\n return this.dictionary$.toObservable();\n }\n setDefaultTranslation() {\n this.changeTranslationAndPropagate(this.defaultTranslation);\n }\n changeTranslation(change) {\n this.changeTranslationAndPropagate(change);\n }\n setResolver(resolver) {\n this.setResolverAndPropagate(resolver);\n }\n changeTranslationAndPropagate(change) {\n this.dictionary.changeTranslation(change);\n this.dictionary$.next(this.dictionary.getTranslation());\n }\n setResolverAndPropagate(resolver) {\n this.dictionary.setResolver(resolver);\n this.dictionary$.next(this.dictionary.getTranslation());\n }\n}\nlet TranslationFeatureModule = /*#__PURE__*/(() => {\n class TranslationFeatureModule extends FeatureModule {\n static forComponent() {\n return [{\n provide: TranslationFacade,\n useClass: TranslationDomainFacade\n }];\n }\n static ɵfac = /* @__PURE__ */(() => {\n let ɵTranslationFeatureModule_BaseFactory;\n return function TranslationFeatureModule_Factory(t) {\n return (ɵTranslationFeatureModule_BaseFactory || (ɵTranslationFeatureModule_BaseFactory = i0.ɵɵgetInheritedFactory(TranslationFeatureModule)))(t || TranslationFeatureModule);\n };\n })();\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TranslationFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule]\n });\n }\n return TranslationFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass GuiPushSubscriber {\n cd;\n value;\n actualObs$;\n baseValues$ = new HermesSubject();\n destroy$ = new HermesReplaySubject(1);\n constructor(cd) {\n this.cd = cd;\n this.baseValues$.pipe(hermesFilter(obs$ => obs$ !== this.actualObs$), hermesSwitchMap(value$ => {\n this.actualObs$ = value$;\n return value$;\n }), hermesDistinctUntilChanged(), hermesTakeUntil(this.destroy$)).subscribe(v => {\n this.value = v;\n this.scheduleCD();\n });\n }\n destroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n subscribe(value) {\n this.baseValues$.next(value);\n return this.value;\n }\n scheduleCD() {\n setTimeout(() => {\n this.cd.detectChanges();\n });\n }\n}\nlet GuiPushPipe = /*#__PURE__*/(() => {\n class GuiPushPipe {\n cd = inject(ChangeDetectorRef);\n subscriber = new GuiPushSubscriber(this.cd);\n transform(value) {\n return this.subscriber.subscribe(value);\n }\n ngOnDestroy() {\n this.subscriber.destroy();\n }\n static ɵfac = function GuiPushPipe_Factory(t) {\n return new (t || GuiPushPipe)();\n };\n static ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"guiPush\",\n type: GuiPushPipe,\n pure: false\n });\n }\n return GuiPushPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet GuiIfDirective = /*#__PURE__*/(() => {\n class GuiIfDirective {\n subscriber;\n vcr;\n template;\n guiIf;\n constructor(subscriber, vcr, template) {\n this.subscriber = subscriber;\n this.vcr = vcr;\n this.template = template;\n }\n ngOnChanges(changes) {\n if (changes['guiIf'] !== undefined) {\n this.subscriber.subscribe(this.guiIf, v => {\n if (v) {\n this.vcr.createEmbeddedView(this.template);\n } else {\n this.vcr.clear();\n }\n });\n }\n }\n ngOnDestroy() {\n this.subscriber.destroy();\n }\n static ɵfac = function GuiIfDirective_Factory(t) {\n return new (t || GuiIfDirective)(i0.ɵɵdirectiveInject(GuiSubscriber), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: GuiIfDirective,\n selectors: [[\"\", \"guiIf\", \"\"]],\n inputs: {\n guiIf: \"guiIf\"\n },\n features: [i0.ɵɵProvidersFeature([GuiSubscriber]), i0.ɵɵNgOnChangesFeature]\n });\n }\n return GuiIfDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet GuiForDirective = /*#__PURE__*/(() => {\n class GuiForDirective {\n subscriber;\n vcr;\n template;\n guiForOf;\n constructor(subscriber, vcr, template) {\n this.subscriber = subscriber;\n this.vcr = vcr;\n this.template = template;\n }\n ngOnChanges(changes) {\n if (changes['guiForOf'] !== undefined) {\n this.guiForOf.subscribe(values => {\n this.vcr.clear();\n for (const value of values) {\n this.vcr.createEmbeddedView(this.template, {\n $implicit: value\n });\n }\n });\n this.subscriber.subscribe(this.guiForOf, values => {\n this.vcr.clear();\n for (const value of values) {\n this.vcr.createEmbeddedView(this.template, {\n $implicit: value\n });\n }\n });\n }\n }\n ngOnDestroy() {\n this.subscriber.destroy();\n }\n static ɵfac = function GuiForDirective_Factory(t) {\n return new (t || GuiForDirective)(i0.ɵɵdirectiveInject(GuiSubscriber), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: GuiForDirective,\n selectors: [[\"\", \"guiFor\", \"\"]],\n inputs: {\n guiForOf: \"guiForOf\"\n },\n features: [i0.ɵɵProvidersFeature([GuiSubscriber]), i0.ɵɵNgOnChangesFeature]\n });\n }\n return GuiForDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet GuiStyleDirective = /*#__PURE__*/(() => {\n class GuiStyleDirective {\n subscriber;\n elementRef;\n static STYLE = 'style';\n guiStyle;\n constructor(subscriber, elementRef) {\n this.subscriber = subscriber;\n this.elementRef = elementRef;\n }\n ngOnChanges(changes) {\n if (changes['guiStyle'] !== undefined) {\n this.subscriber.subscribe(this.guiStyle, styles => {\n Object.keys(styles).forEach(key => {\n this.setStyleByName(key, styles[key]);\n });\n });\n }\n }\n ngOnDestroy() {\n this.subscriber.destroy();\n }\n setStyleByName(name, value) {\n this.set(name, value);\n }\n set(name, value) {\n this.elementRef.nativeElement[GuiStyleDirective.STYLE][name] = value;\n }\n static ɵfac = function GuiStyleDirective_Factory(t) {\n return new (t || GuiStyleDirective)(i0.ɵɵdirectiveInject(GuiSubscriber), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: GuiStyleDirective,\n selectors: [[\"\", \"guiStyle\", \"\"]],\n inputs: {\n guiStyle: \"guiStyle\"\n },\n features: [i0.ɵɵProvidersFeature([GuiSubscriber]), i0.ɵɵNgOnChangesFeature]\n });\n }\n return GuiStyleDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass GuiClassManager {\n nativeElement;\n classes = new Set();\n constructor(nativeElement) {\n this.nativeElement = nativeElement;\n }\n update(newClasses) {\n const actualClasses = Array.from(this.classes);\n const classesToAdd = [];\n const classesToRemove = [];\n for (const clazz of newClasses) {\n if (!actualClasses.some(actualClass => actualClass === clazz)) {\n classesToAdd.push(clazz);\n }\n }\n for (const actualClass of actualClasses) {\n if (!newClasses.some(newClass => actualClass === newClass)) {\n classesToRemove.push(actualClass);\n }\n }\n this.remove(...classesToRemove);\n this.add(...classesToAdd);\n this.classes = new Set(newClasses);\n }\n add(...classes) {\n this.addClassToDomElement(this.nativeElement, classes);\n }\n remove(...classes) {\n this.removeClassFromDomElement(this.nativeElement, classes);\n }\n addClassToDomElement(htmlElement, classes) {\n for (let i = 0; i < classes.length; i++) {\n htmlElement.classList.add(classes[i]);\n }\n }\n removeClassFromDomElement(htmlElement, classes) {\n for (let i = 0; i < classes.length; i++) {\n htmlElement.classList.remove(classes[i]);\n }\n }\n}\nlet GuiClassDirective = /*#__PURE__*/(() => {\n class GuiClassDirective {\n subscriber;\n elementRef;\n guiClass;\n classManager;\n constructor(subscriber, elementRef) {\n this.subscriber = subscriber;\n this.elementRef = elementRef;\n this.classManager = new GuiClassManager(this.elementRef.nativeElement);\n }\n ngOnChanges(changes) {\n if (changes['guiClass'] !== undefined) {\n this.subscriber.subscribe(this.guiClass, newClasses => {\n this.classManager.update(newClasses);\n });\n }\n }\n ngOnDestroy() {\n this.subscriber.destroy();\n }\n static ɵfac = function GuiClassDirective_Factory(t) {\n return new (t || GuiClassDirective)(i0.ɵɵdirectiveInject(GuiSubscriber), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: GuiClassDirective,\n selectors: [[\"\", \"guiClass\", \"\"]],\n inputs: {\n guiClass: \"guiClass\"\n },\n features: [i0.ɵɵProvidersFeature([GuiSubscriber]), i0.ɵɵNgOnChangesFeature]\n });\n }\n return GuiClassDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet GuiTemplateModule = /*#__PURE__*/(() => {\n class GuiTemplateModule {\n static ɵfac = function GuiTemplateModule_Factory(t) {\n return new (t || GuiTemplateModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: GuiTemplateModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule]\n });\n }\n return GuiTemplateModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\ninitializePaging();\nfunction providePagingCommandInvoker() {\n return CoreContainer.resolve(PagingPublisher);\n}\nfunction providePagingWarehouse() {\n return CoreContainer.resolve(PagingWarehouse);\n}\nfunction providePagingEventRepository() {\n return CoreContainer.resolve(PagingEventRepository);\n}\nlet PagingFeatureModule = /*#__PURE__*/(() => {\n class PagingFeatureModule extends FeatureModule {\n static forComponent() {\n return [PagingDisplayModeArchive];\n }\n static ɵfac = /* @__PURE__ */(() => {\n let ɵPagingFeatureModule_BaseFactory;\n return function PagingFeatureModule_Factory(t) {\n return (ɵPagingFeatureModule_BaseFactory || (ɵPagingFeatureModule_BaseFactory = i0.ɵɵgetInheritedFactory(PagingFeatureModule)))(t || PagingFeatureModule);\n };\n })();\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: PagingFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: PagingPublisher,\n useFactory: providePagingCommandInvoker\n }, {\n provide: PagingWarehouse,\n useFactory: providePagingWarehouse\n }, {\n provide: PagingEventRepository,\n useFactory: providePagingEventRepository\n }],\n imports: [CommonModule, FabricModule, TranslationFeatureModule, GuiTemplateModule]\n });\n }\n return PagingFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureTitlePanelConfigArchive = /*#__PURE__*/(() => {\n class StructureTitlePanelConfigArchive extends Archive {\n static titlePanelConfig = {\n enabled: false,\n template: 'Title Panel'\n };\n constructor() {\n super({\n ...StructureTitlePanelConfigArchive.titlePanelConfig\n });\n }\n }\n return StructureTitlePanelConfigArchive;\n})();\nlet StructureFooterPanelConfigArchive = /*#__PURE__*/(() => {\n class StructureFooterPanelConfigArchive extends Archive {\n static footerPanelConfig = {\n enabled: false,\n template: 'Footer Panel'\n };\n constructor() {\n super({\n ...StructureFooterPanelConfigArchive.footerPanelConfig\n });\n }\n }\n return StructureFooterPanelConfigArchive;\n})();\nconst filterContainerToken = 'Filter container token';\nvar StyleName = /*#__PURE__*/function (StyleName) {\n StyleName[\"WIDTH\"] = \"width\";\n StyleName[\"HEIGHT\"] = \"height\";\n StyleName[\"PADDING_TOP\"] = \"padding-top\";\n return StyleName;\n}(StyleName || {});\nconst STYLE = 'style';\nlet StyleModifier = /*#__PURE__*/(() => {\n class StyleModifier extends Modifier {\n constructor(htmlElement) {\n super(htmlElement);\n }\n createModifier(htmlElement) {\n return new StyleModifier.StyleModifier(htmlElement);\n }\n // eslint-disable-next-line\n static StyleModifier = class {\n htmlElement;\n constructor(htmlElement) {\n this.htmlElement = htmlElement;\n }\n setStyleByName(name, value) {\n this.set(name, value);\n }\n setWidth(value) {\n this.set(StyleName.WIDTH, this.toPx(value));\n }\n setHeight(value) {\n this.set(StyleName.HEIGHT, this.toPx(value));\n }\n setPaddingTop(value) {\n this.set(StyleName.PADDING_TOP, this.toPx(value));\n }\n remove(styleName) {\n this.htmlElement[STYLE][styleName] = '';\n }\n removeStyleByName(name) {\n this.htmlElement[STYLE][name] = '';\n }\n clear() {\n this.htmlElement.removeAttribute(STYLE);\n }\n set(name, value) {\n this.htmlElement[STYLE][name] = value;\n }\n toPx(value) {\n return value > 0 ? `${value}px` : `${value}`;\n }\n };\n }\n return StyleModifier;\n})();\nclass FieldPublisher {\n constructor() {}\n}\nlet StructureWarehouse = /*#__PURE__*/(() => {\n class StructureWarehouse {\n structureRepository;\n structureCellEditArchive;\n constructor(structureRepository, structureCellEditArchive) {\n this.structureRepository = structureRepository;\n this.structureCellEditArchive = structureCellEditArchive;\n }\n static services = [StructureReadModelRepository, StructureCellEditArchive];\n on(structureId) {\n return this.structureRepository.on(structureId);\n }\n onEditManager(structureId) {\n return this.structureCellEditArchive.on(structureId);\n }\n }\n return StructureWarehouse;\n})();\nclass SearchWarehouse {\n constructor() {}\n}\nconst prefix = 'Structure -';\nconst STRUCTURE_CSS_CLASS_NAME = new InjectionToken(`${prefix} - css className`);\nclass SummariesWarehouse {\n constructor() {}\n}\nclass SummariesTranslations {\n distinctTooltip;\n averageTooltip;\n minTooltip;\n maxTooltip;\n medTooltip;\n countTooltip;\n constructor(distinctTooltip, averageTooltip, minTooltip, maxTooltip, medTooltip, countTooltip) {\n this.distinctTooltip = distinctTooltip;\n this.averageTooltip = averageTooltip;\n this.minTooltip = minTooltip;\n this.maxTooltip = maxTooltip;\n this.medTooltip = medTooltip;\n this.countTooltip = countTooltip;\n }\n}\nvar SortOrder = /*#__PURE__*/function (SortOrder) {\n SortOrder[SortOrder[\"ASC\"] = 0] = \"ASC\";\n SortOrder[SortOrder[\"DESC\"] = 1] = \"DESC\";\n SortOrder[SortOrder[\"NONE\"] = 2] = \"NONE\";\n return SortOrder;\n}(SortOrder || {});\n// Basically header template\nclass CellTemplateWithContext {\n header;\n dataType;\n context;\n width;\n fieldId;\n columnDefinitionId;\n sortStatus;\n enabled;\n cssClasses;\n styles;\n sortable;\n align;\n constructor(\n // public viewTemplate: TemplateRef<any> | null = null,\n // \t\tpublic editTemplate: TemplateRef<any> | null = null,\n // public editContext: any,\n header, dataType, context, width, fieldId, columnDefinitionId, sortStatus, enabled, cssClasses, styles, sortable, align) {\n this.header = header;\n this.dataType = dataType;\n this.context = context;\n this.width = width;\n this.fieldId = fieldId;\n this.columnDefinitionId = columnDefinitionId;\n this.sortStatus = sortStatus;\n this.enabled = enabled;\n this.cssClasses = cssClasses;\n this.styles = styles;\n this.sortable = sortable;\n this.align = align;\n }\n getHeader() {\n return this.header;\n }\n getDataType() {\n return this.dataType;\n }\n getColumnDefinitionId() {\n return this.columnDefinitionId;\n }\n getFieldId() {\n return this.fieldId;\n }\n getSortStatus() {\n return this.sortStatus;\n }\n getCssClasses() {\n return this.cssClasses;\n }\n getStyles() {\n return this.styles;\n }\n isSortEnabled() {\n return this.sortable;\n }\n isAscSort() {\n return this.sortStatus === SortOrder.ASC;\n }\n isDescSort() {\n return this.sortStatus === SortOrder.DESC;\n }\n isNoSort() {\n return this.sortStatus === SortOrder.NONE;\n }\n isEnabled() {\n return this.enabled;\n }\n isAlignLeft() {\n return this.align === ColumnAlign.LEFT;\n }\n isAlignCenter() {\n return this.align === ColumnAlign.CENTER;\n }\n isAlignRight() {\n return this.align === ColumnAlign.RIGHT;\n }\n getAlign() {\n return this.align;\n }\n}\nclass CompositionTemplateModel extends CellTemplateWithContext {\n viewTemplate;\n editTemplate;\n constructor(viewTemplate = null, editTemplate = null, context) {\n super(context.getHeader(), context.getDataType(), context.context, context.width, context.getFieldId(), context.getColumnDefinitionId(), context.getSortStatus(), context.isEnabled(), context.getCssClasses(), context.getStyles(), context.isSortEnabled(), context.getAlign());\n this.viewTemplate = viewTemplate;\n this.editTemplate = editTemplate;\n }\n}\nvar CellValueType = /*#__PURE__*/function (CellValueType) {\n CellValueType[CellValueType[\"TEXT\"] = 0] = \"TEXT\";\n CellValueType[CellValueType[\"HTML\"] = 1] = \"HTML\";\n return CellValueType;\n}(CellValueType || {});\nclass CellValue {\n value;\n type;\n constructor(value, type) {\n this.value = value;\n this.type = type;\n }\n static text(value) {\n return new CellValue(value, CellValueType.TEXT);\n }\n static HTML(value) {\n return new CellValue(value, CellValueType.HTML);\n }\n}\nclass CellTemplateWithAccessor {\n columnConfig;\n columnDefinitionId;\n name;\n editable;\n templateFun;\n formatterFun;\n accessor;\n searchAccessor;\n width;\n columnFieldId;\n align;\n cellEditingEnabled;\n type;\n view;\n constructor(columnConfig, columnDefinitionId, name,\n // public template: TemplateRef<any> | null = null,\n // public editTemplate: TemplateRef<any> | null = null,\n editable, templateFun, formatterFun, accessor, searchAccessor, width, columnFieldId, align, cellEditingEnabled, type,\n // REFACTOR\n view) {\n this.columnConfig = columnConfig;\n this.columnDefinitionId = columnDefinitionId;\n this.name = name;\n this.editable = editable;\n this.templateFun = templateFun;\n this.formatterFun = formatterFun;\n this.accessor = accessor;\n this.searchAccessor = searchAccessor;\n this.width = width;\n this.columnFieldId = columnFieldId;\n this.align = align;\n this.cellEditingEnabled = cellEditingEnabled;\n this.type = type;\n this.view = view;\n }\n getDataType() {\n return this.type;\n }\n getCellView() {\n return this.view.getCellView();\n }\n getColumnConfig() {\n return this.columnConfig;\n }\n isCellEditingEnabled() {\n return this.cellEditingEnabled;\n }\n isBooleanDataType() {\n return this.type === DataType.BOOLEAN;\n }\n isAlignLeft() {\n return this.align === ColumnAlign.LEFT;\n }\n isAlignCenter() {\n return this.align === ColumnAlign.CENTER;\n }\n isAlignRight() {\n return this.align === ColumnAlign.RIGHT;\n }\n getAlign() {\n return this.align;\n }\n getType() {\n return this.type;\n }\n getView() {\n return this.view;\n }\n getName() {\n return this.name;\n }\n // REFACTOR #1581\n getValue(entity, searchPhrase) {\n const cellValue = this.findValue(entity, searchPhrase);\n cellValue.value = this.templateFun(cellValue.value, entity.getSourceItem());\n if (this.formatterFun) {\n cellValue.value = this.formatterFun(cellValue.value, entity.getSourceItem());\n }\n return cellValue;\n }\n getClasses() {\n return 'gui-cell-highlighted';\n }\n findValue(entity, searchPhrase) {\n const value = this.accessor(entity);\n if (this.type !== DataType.STRING) {\n return CellValue.text(value);\n }\n if (this.view && this.view.getCellView() === CellView.FUNCTION) {\n return CellValue.text(value);\n }\n if (searchPhrase) {\n let txt = '' + this.searchAccessor(entity);\n const lowerCasedText = txt.toLocaleLowerCase(),\n loweredSearchPhrase = searchPhrase.toLocaleLowerCase();\n const positions = [];\n let index = 0;\n while (index < loweredSearchPhrase.length) {\n const found = lowerCasedText.indexOf(loweredSearchPhrase, index);\n if (found >= 0) {\n positions.push(found);\n index = found + searchPhrase.length;\n } else {\n index = loweredSearchPhrase.length;\n }\n }\n const arr = txt.split('');\n positions.forEach(pos => {\n for (let i = 0; i < searchPhrase.length; i += 1) {\n let ph;\n if (i === 0) {\n ph = `<span class=\"gui-text-highlight\">${arr[pos + i]}`;\n } else {\n ph = arr[pos + i];\n }\n if (i === searchPhrase.length - 1) {\n ph += '</span>';\n }\n arr[pos + i] = ph;\n }\n });\n txt = arr.join('');\n return CellValue.HTML(txt);\n } else {\n return CellValue.text(value);\n }\n }\n}\nclass CompositionAccessorModel extends CellTemplateWithAccessor {\n template;\n editTemplate;\n constructor(template = null, editTemplate = null, context) {\n super(context.getColumnConfig(), context.columnDefinitionId, context.getName(), context.editable, context.templateFun, context.formatterFun, context.accessor, context.searchAccessor, context.width, context.columnFieldId, context.getAlign(), context.isCellEditingEnabled(), context.getType(), context.getView());\n this.template = template;\n this.editTemplate = editTemplate;\n }\n}\nconst CompositionAggregateEvents = {\n CompositionResizeWidthSetAggregateEvent: 'CompositionResizeWidthSetAggregateEvent',\n ColumnsSetAggregateEvent: 'ColumnsSetAggregateEvent',\n CompositionContainerWidthSetAggregateEvent: 'CompositionContainerWidthSetAggregateEvent',\n CompositionWidthSetAggregateEvent: 'CompositionWidthSetAggregateEvent',\n CompositionColumnSetEnabledAggregateEvent: 'CompositionColumnSetEnabledAggregateEvent',\n CompositionColumnMovedLeftAggregateEvent: 'CompositionColumnMovedLeftAggregateEvent',\n CompositionColumnMovedRightAggregateEvent: 'CompositionColumnMovedRightAggregateEvent',\n GroupsSetAggregateEvent: 'GroupsSetAggregateEvent'\n};\nclass CompositionDomainEvent extends DomainEvent {}\nclass CompositionResizeWidthSetEvent extends CompositionDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'CompositionResizeWidthSetEvent');\n }\n}\nclass CompositionColumnsSetEvent extends CompositionDomainEvent {\n constructor(compositionId) {\n super(compositionId, null, 'CompositionColumnsSetEvent');\n }\n}\nclass CompositionContainerWidthSetEvent extends CompositionDomainEvent {\n constructor(compositionId, payload) {\n super(compositionId, payload, 'CompositionContainerWidthSetEvent');\n }\n}\nclass CompositionWidthSetEvent extends CompositionDomainEvent {\n constructor(compositionId) {\n super(compositionId, null, 'CompositionWidthSetEvent');\n }\n}\nclass CompositionColumnSetEnabledEvent extends CompositionDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'CompositionColumnSetEnabledEvent');\n }\n}\nclass CompositionColumnMovedLeftEvent extends CompositionDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'CompositionColumnMovedLeftEvent');\n }\n}\nclass CompositionColumnMovedRightEvent extends CompositionDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'CompositionColumnMovedRightEvent');\n }\n}\nclass CompositionGroupsSetEvent extends CompositionDomainEvent {\n constructor(compositionId) {\n super(compositionId, null, 'CompositionGroupsSetEvent');\n }\n}\nclass CompositionEventConverter {\n convert(arg) {\n if (Array.isArray(arg)) {\n return this.convertEvents(arg);\n } else {\n return this.convertEvent(arg);\n }\n }\n convertEvents(aggregateEvents) {\n return aggregateEvents.map(event => {\n return this.convertEvent(event);\n });\n }\n convertEvent(aggregateEvent) {\n switch (aggregateEvent.getType()) {\n case CompositionAggregateEvents.CompositionResizeWidthSetAggregateEvent:\n return new CompositionResizeWidthSetEvent(aggregateEvent.getAggregateId());\n case CompositionAggregateEvents.ColumnsSetAggregateEvent:\n return new CompositionColumnsSetEvent(aggregateEvent.getAggregateId());\n case CompositionAggregateEvents.CompositionContainerWidthSetAggregateEvent:\n const payload = aggregateEvent.containerWidth;\n return new CompositionContainerWidthSetEvent(aggregateEvent.getAggregateId(), payload);\n case CompositionAggregateEvents.CompositionWidthSetAggregateEvent:\n return new CompositionWidthSetEvent(aggregateEvent.getAggregateId());\n case CompositionAggregateEvents.CompositionColumnSetEnabledAggregateEvent:\n return new CompositionColumnSetEnabledEvent(aggregateEvent.getAggregateId());\n case CompositionAggregateEvents.CompositionColumnMovedLeftAggregateEvent:\n return new CompositionColumnMovedLeftEvent(aggregateEvent.getAggregateId());\n case CompositionAggregateEvents.CompositionColumnMovedRightAggregateEvent:\n return new CompositionColumnMovedRightEvent(aggregateEvent.getAggregateId());\n case CompositionAggregateEvents.GroupsSetAggregateEvent:\n return new CompositionGroupsSetEvent(aggregateEvent.getAggregateId());\n default:\n return new CompositionResizeWidthSetEvent(aggregateEvent.getAggregateId());\n }\n }\n}\nclass CompositionCommand extends Command {}\nclass SetColumnsCommand extends CompositionCommand {\n compositionId;\n columns;\n constructor(compositionId, columns) {\n super(compositionId, 'SetColumnsCommand');\n this.compositionId = compositionId;\n this.columns = columns;\n }\n getParams() {\n return this.columns;\n }\n}\nlet SetColumnsCommandHandler = /*#__PURE__*/(() => {\n class SetColumnsCommandHandler {\n compositionEventConverter;\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n constructor(compositionEventConverter) {\n this.compositionEventConverter = compositionEventConverter;\n }\n static services = [CompositionEventConverter];\n forCommand() {\n return SetColumnsCommand;\n }\n handle(aggregate, command) {\n const setColumnsParams = command.getParams();\n aggregate.setColumns(setColumnsParams);\n }\n publish(aggregate, command) {\n this.publishEvents(aggregate, command);\n }\n publishEvents(composition, command) {\n const events = composition.getEvents();\n const domainEvents = this.compositionEventConverter.convert(events);\n this.domainEventPublisher.publish(domainEvents);\n }\n }\n return SetColumnsCommandHandler;\n})();\nclass SetCompositionWidthCommand extends CompositionCommand {\n structureId;\n width;\n constructor(structureId, width) {\n super(structureId, 'SetCompositionWidthCommand');\n this.structureId = structureId;\n this.width = width;\n }\n getWidth() {\n return this.width;\n }\n}\nclass SetCompositionWidthCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SetCompositionWidthCommand;\n }\n handle(composition, command) {\n const width = command.getWidth();\n composition.setWidth(width);\n }\n publish(aggregate, command) {\n this.domainEventPublisher.publish(new CompositionWidthSetEvent(command.getAggregateId()));\n }\n}\nclass SetCompositionResizeWidthCommand extends CompositionCommand {\n structureId;\n enabled;\n constructor(structureId, enabled) {\n super(structureId, 'SetCompositionResizeWidthCommand');\n this.structureId = structureId;\n this.enabled = enabled;\n }\n getEnabled() {\n return this.enabled;\n }\n}\nclass SetCompositionResizeWidthCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SetCompositionResizeWidthCommand;\n }\n handle(composition, command) {\n const enabled = command.getEnabled();\n composition.setResizeWidth(enabled);\n }\n publish(aggregate, command) {\n this.domainEventPublisher.publish(new CompositionResizeWidthSetEvent(command.getAggregateId()));\n }\n}\nclass SetCompositionContainerWidthCommand extends CompositionCommand {\n structureId;\n width;\n constructor(structureId, width) {\n super(structureId, 'SetCompositionContainerWidthCommand');\n this.structureId = structureId;\n this.width = width;\n }\n getWidth() {\n return this.width;\n }\n}\nlet SetCompositionContainerWidthCommandHandler = /*#__PURE__*/(() => {\n class SetCompositionContainerWidthCommandHandler {\n compositionEventConverter;\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n constructor(compositionEventConverter) {\n this.compositionEventConverter = compositionEventConverter;\n }\n static services = [CompositionEventConverter];\n forCommand() {\n return SetCompositionContainerWidthCommand;\n }\n handle(composition, command) {\n const width = command.getWidth();\n composition.setContainerWidth(width);\n }\n publish(aggregate, command) {\n this.publishAggregateEvents(aggregate.getEvents());\n }\n publishAggregateEvents(aggregateEvents) {\n const domainEvents = this.compositionEventConverter.convert(aggregateEvents);\n this.domainEventPublisher.publish(domainEvents);\n }\n }\n return SetCompositionContainerWidthCommandHandler;\n})();\nclass CompositionSetColumnEnabledCommand extends CompositionCommand {\n compositionId;\n columnId;\n enabled;\n constructor(compositionId, columnId, enabled) {\n super(compositionId, 'CompositionSetColumnEnabledCommand');\n this.compositionId = compositionId;\n this.columnId = columnId;\n this.enabled = enabled;\n }\n getColumnId() {\n return this.columnId;\n }\n isEnabled() {\n return this.enabled;\n }\n}\nlet CompositionSetColumnEnabledCommandHandler = /*#__PURE__*/(() => {\n class CompositionSetColumnEnabledCommandHandler {\n compositionEventConverter;\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n constructor(compositionEventConverter) {\n this.compositionEventConverter = compositionEventConverter;\n }\n static services = [CompositionEventConverter];\n forCommand() {\n return CompositionSetColumnEnabledCommand;\n }\n handle(aggregate, command) {\n const columnId = command.getColumnId(),\n enabled = command.isEnabled();\n aggregate.enableColumn(columnId, enabled);\n }\n publish(aggregate, command) {\n this.publishEvents(aggregate, command);\n }\n publishEvents(composition, command) {\n const events = composition.getEvents();\n const domainEvents = this.compositionEventConverter.convert(events);\n if (domainEvents && domainEvents.length > 0) {\n this.domainEventPublisher.publish(domainEvents);\n }\n }\n }\n return CompositionSetColumnEnabledCommandHandler;\n})();\nclass CompositionChangeSortStatusCommand extends CompositionCommand {\n compositionId;\n sortParams;\n constructor(compositionId, sortParams) {\n super(compositionId, 'CompositionChangeSortStatusCommand');\n this.compositionId = compositionId;\n this.sortParams = sortParams;\n }\n getCompositionId() {\n return this.compositionId;\n }\n getSortParams() {\n return this.sortParams;\n }\n}\nclass CompositionChangeSortStatusEvent extends CompositionDomainEvent {\n activeColumns;\n constructor(aggregateId, activeColumns) {\n super(aggregateId, activeColumns, 'CompositionChangeSortStatusEvent');\n this.activeColumns = activeColumns;\n }\n getCompositionId() {\n return this.getAggregateId();\n }\n getActiveColumns() {\n return this.activeColumns;\n }\n}\nclass CompositionChangeSortStatusCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return CompositionChangeSortStatusCommand;\n }\n handle(composition, command) {\n const sortParams = command.getSortParams();\n composition.changeSort(sortParams);\n }\n publish(composition, command) {\n const compositionId = command.getAggregateId(),\n columns = composition.getActiveColumns();\n this.domainEventPublisher.publish(new CompositionChangeSortStatusEvent(compositionId, columns));\n }\n}\nclass CompositionMoveLeftColumnCommand extends CompositionCommand {\n compositionId;\n columnId;\n constructor(compositionId, columnId) {\n super(compositionId, 'CompositionMoveLeftColumnCommand');\n this.compositionId = compositionId;\n this.columnId = columnId;\n }\n getColumnId() {\n return this.columnId;\n }\n}\nlet CompositionMoveLeftColumnCommandHandler = /*#__PURE__*/(() => {\n class CompositionMoveLeftColumnCommandHandler {\n compositionEventConverter;\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n constructor(compositionEventConverter) {\n this.compositionEventConverter = compositionEventConverter;\n }\n static services = [CompositionEventConverter];\n forCommand() {\n return CompositionMoveLeftColumnCommand;\n }\n handle(aggregate, command) {\n const columnId = command.getColumnId();\n aggregate.moveLeft(columnId);\n }\n publish(aggregate, command) {\n this.publishEvents(aggregate, command);\n }\n publishEvents(composition, command) {\n const events = composition.getEvents();\n const domainEvents = this.compositionEventConverter.convert(events);\n if (domainEvents && domainEvents.length > 0) {\n this.domainEventPublisher.publish(domainEvents);\n }\n }\n }\n return CompositionMoveLeftColumnCommandHandler;\n})();\nclass CompositionMoveRightColumnCommand extends CompositionCommand {\n columnId;\n constructor(compositionId, columnId) {\n super(compositionId, 'CompositionMoveRightColumnCommand');\n this.columnId = columnId;\n }\n getColumnId() {\n return this.columnId;\n }\n}\nlet CompositionMoveRightColumnCommandHandler = /*#__PURE__*/(() => {\n class CompositionMoveRightColumnCommandHandler {\n compositionEventConverter;\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n constructor(compositionEventConverter) {\n this.compositionEventConverter = compositionEventConverter;\n }\n static services = [CompositionEventConverter];\n forCommand() {\n return CompositionMoveRightColumnCommand;\n }\n handle(aggregate, command) {\n const columnId = command.getColumnId();\n aggregate.moveRight(columnId);\n }\n publish(aggregate, command) {\n this.publishEvents(aggregate, command);\n }\n publishEvents(composition, command) {\n const events = composition.getEvents();\n const domainEvents = this.compositionEventConverter.convert(events);\n if (domainEvents && domainEvents.length > 0) {\n this.domainEventPublisher.publish(domainEvents);\n }\n }\n }\n return CompositionMoveRightColumnCommandHandler;\n})();\nclass SortToggledEvent extends StructureDomainEvent {\n compositionId;\n directions;\n constructor(aggregateId, compositionId, directions) {\n super(aggregateId, {\n compositionId,\n directions\n }, 'SortToggledEvent');\n this.compositionId = compositionId;\n this.directions = directions;\n }\n getCompositionId() {\n return this.compositionId;\n }\n getDirections() {\n return this.directions;\n }\n}\nclass CreateCompositionCommand extends CompositionCommand {\n compositionId;\n constructor(compositionId) {\n super(compositionId, 'CreateCompositionCommand');\n this.compositionId = compositionId;\n }\n}\nclass SetGroupsCommand extends CompositionCommand {\n compositionId;\n configs;\n constructor(compositionId, configs) {\n super(compositionId, 'SetGroupsCommand');\n this.compositionId = compositionId;\n this.configs = configs;\n }\n getConfigs() {\n return this.configs;\n }\n}\nclass CompositionDispatcher {\n commandDispatcher = CoreContainer.resolve(CommandDispatcher);\n create(compositionId) {\n this.commandDispatcher.dispatch(new CreateCompositionCommand(compositionId));\n }\n setColumns(compositionId, params) {\n this.commandDispatcher.dispatch(new SetColumnsCommand(compositionId, params));\n }\n setGroups(compositionId, params) {\n this.commandDispatcher.dispatch(new SetGroupsCommand(compositionId, params));\n }\n setWidth(compositionId, width) {\n this.commandDispatcher.dispatch(new SetCompositionWidthCommand(compositionId, width));\n }\n setContainerWidth(compositionId, width) {\n this.commandDispatcher.dispatch(new SetCompositionContainerWidthCommand(compositionId, width));\n }\n setResizeWidth(compositionId, enabled) {\n this.commandDispatcher.dispatch(new SetCompositionResizeWidthCommand(compositionId, enabled));\n }\n changeSort(compositionId, params) {\n this.commandDispatcher.dispatch(new CompositionChangeSortStatusCommand(compositionId, params));\n }\n setColumnEnabled(compositionId, columnId, enabled) {\n this.commandDispatcher.dispatch(new CompositionSetColumnEnabledCommand(compositionId, columnId, enabled));\n }\n moveLeft(compositionId, columnId) {\n this.commandDispatcher.dispatch(new CompositionMoveLeftColumnCommand(compositionId, columnId));\n }\n moveRight(compositionId, columnId) {\n this.commandDispatcher.dispatch(new CompositionMoveRightColumnCommand(compositionId, columnId));\n }\n}\nclass ChangeSortParams {\n fieldId;\n direction;\n constructor(fieldId, direction) {\n this.fieldId = fieldId;\n this.direction = direction;\n }\n}\nclass SortOrderSetEvent extends StructureDomainEvent {\n compositionId;\n directions;\n constructor(aggregateId, compositionId, directions) {\n super(aggregateId, {\n compositionId,\n directions\n }, 'SortOrderSetEvent');\n this.compositionId = compositionId;\n this.directions = directions;\n }\n getCompositionId() {\n return this.compositionId;\n }\n getDirections() {\n return this.directions;\n }\n}\nlet CompositionChangeSortStatusEventHandler = /*#__PURE__*/(() => {\n class CompositionChangeSortStatusEventHandler {\n compositionDispatcher;\n constructor(compositionDispatcher) {\n this.compositionDispatcher = compositionDispatcher;\n }\n static services = [CompositionDispatcher];\n forEvents() {\n return [SortToggledEvent, SortOrderSetEvent];\n }\n handle(event) {\n if (event.ofMessageType('SortToggledEvent')) {\n const compositionId = event.getCompositionId(),\n dirs = event.getDirections();\n const params = dirs.map(dir => {\n const columnFieldId = new ColumnFieldId(dir.fieldId.getId());\n return new ChangeSortParams(columnFieldId, dir.direction);\n });\n this.compositionDispatcher.changeSort(compositionId, params);\n }\n if (event.ofMessageType('SortOrderSetEvent')) {\n const compositionId = event.getCompositionId(),\n dirs = event.getDirections();\n const params = dirs.map(dir => {\n const columnFieldId = new ColumnFieldId(dir.fieldId.getId());\n return new ChangeSortParams(columnFieldId, dir.direction);\n });\n this.compositionDispatcher.changeSort(compositionId, params);\n }\n }\n }\n return CompositionChangeSortStatusEventHandler;\n})();\nclass ViewEntity {\n view;\n templateFunction = (cellValue, item) => cellValue;\n constructor(cellView) {\n if (typeof cellView === 'function') {\n this.view = CellView.FUNCTION;\n this.templateFunction = cellView;\n } else {\n this.view = cellView;\n }\n }\n static fromDataType(dataType) {\n if (dataType === DataType.DATE) {\n return new ViewEntity(CellView.DATE);\n } else {\n return new ViewEntity(CellView.TEXT);\n }\n }\n getCellView() {\n return this.view;\n }\n getTemplateFunction() {\n return this.templateFunction;\n }\n}\nclass AbstractColumnEntity extends Entity {\n columnField;\n header;\n width;\n columnConfig;\n view;\n align;\n presentation;\n constructor(columnId, columnField, columnConfig, presentation, header, align, view, width) {\n super(columnId);\n this.columnField = columnField;\n this.columnConfig = columnConfig;\n this.presentation = presentation;\n this.view = ViewEntity.fromDataType(columnField.getDataType());\n if (header) {\n this.header = header;\n }\n if (view) {\n this.view = view;\n }\n if (width) {\n this.width = width;\n }\n this.setInitialAlign(columnField, align);\n }\n getPresentation() {\n return this.presentation;\n }\n getColumnConfig() {\n return this.columnConfig;\n }\n getField() {\n return this.columnField;\n }\n getHeader() {\n return this.header;\n }\n getDataType() {\n return this.columnField.getDataType();\n }\n getCellView() {\n return this.view.getCellView();\n }\n getTemplateFunction() {\n return this.view.getTemplateFunction();\n }\n getFormatterFunction() {\n return this.columnConfig.formatter;\n }\n setView(view) {\n this.view = view;\n }\n setHeader(header) {\n this.header = header;\n }\n getView() {\n return this.view;\n }\n getAlign() {\n return this.align;\n }\n setWidth(width) {\n this.width = width;\n }\n getWidth() {\n return this.width;\n }\n isSortingEnabled() {\n const config = this.columnConfig;\n if (config.sorting !== undefined && config.sorting !== null) {\n if (config.sorting.enabled === undefined || config.sorting.enabled === null) {\n return true;\n }\n return config.sorting.enabled;\n }\n return true;\n }\n isCellEditingEnabled() {\n const config = this.columnConfig;\n if (config.cellEditing !== undefined && config.cellEditing !== null) {\n if (config.cellEditing.enabled === undefined || config.cellEditing.enabled === null) {\n return true;\n }\n return config.cellEditing.enabled;\n }\n return true;\n }\n setInitialAlign(columnField, align) {\n if (align !== undefined && align !== null) {\n this.align = align;\n } else if (columnField.getDataType() === DataType.NUMBER) {\n this.align = ColumnAlign.RIGHT;\n } else {\n this.align = ColumnAlign.LEFT;\n }\n }\n}\nclass ColumnEntity extends AbstractColumnEntity {\n sortable;\n sortStatus = SortOrder.NONE;\n enabled = true;\n constructor(columnId, columnField, columnConfig, enabled, presentation, header, align, view, width) {\n super(columnId, columnField, columnConfig, presentation, header, align, view, width);\n this.enabled = enabled;\n if (view === undefined) {\n this.view = new ViewEntity(this.presentation.getDefaultView());\n }\n if (align === undefined) {\n this.align = this.presentation.getDefaultAlign(this.view);\n }\n }\n isEnabled() {\n return this.enabled;\n }\n setEnabled(enabled) {\n this.enabled = enabled;\n }\n getSortStatus() {\n return this.sortStatus;\n }\n setSortStatus(status) {\n this.sortStatus = status;\n }\n}\nclass ColumnId extends EntityId {\n constructor(id) {\n super(id);\n }\n toString() {\n return this.getId();\n }\n}\nclass ColumnPresentation {}\nlet NumberColumnPresentation = /*#__PURE__*/(() => {\n class NumberColumnPresentation extends ColumnPresentation {\n static instance = null;\n constructor() {\n super();\n }\n static getInstance() {\n if (!NumberColumnPresentation.instance) {\n NumberColumnPresentation.instance = new NumberColumnPresentation();\n }\n return NumberColumnPresentation.instance;\n }\n getPossibleViews() {\n return [CellView.TEXT, CellView.BAR, CellView.PERCENTAGE_BAR, CellView.PERCENTAGE];\n }\n getDefaultView() {\n return CellView.NUMBER;\n }\n getDefaultAlign(view) {\n return ColumnAlign.RIGHT;\n }\n }\n return NumberColumnPresentation;\n})();\nlet BooleanColumnPresentation = /*#__PURE__*/(() => {\n class BooleanColumnPresentation extends ColumnPresentation {\n static instance = null;\n constructor() {\n super();\n }\n static getInstance() {\n if (!BooleanColumnPresentation.instance) {\n BooleanColumnPresentation.instance = new BooleanColumnPresentation();\n }\n return BooleanColumnPresentation.instance;\n }\n getPossibleViews() {\n return [CellView.TEXT, CellView.ITALIC, CellView.CHIP, CellView.BOLD, CellView.CHECKBOX];\n }\n getDefaultView() {\n return CellView.TEXT;\n }\n getDefaultAlign(view) {\n if (view.getCellView() === CellView.CHECKBOX) {\n return ColumnAlign.CENTER;\n } else {\n return ColumnAlign.LEFT;\n }\n }\n }\n return BooleanColumnPresentation;\n})();\nlet DateColumnPresentation = /*#__PURE__*/(() => {\n class DateColumnPresentation extends ColumnPresentation {\n static getInstance() {\n if (!DateColumnPresentation.instance) {\n DateColumnPresentation.instance = new DateColumnPresentation();\n }\n return DateColumnPresentation.instance;\n }\n static instance = null;\n constructor() {\n super();\n }\n getPossibleViews() {\n return [CellView.DATE, CellView.TEXT, CellView.ITALIC, CellView.BOLD, CellView.CHIP];\n }\n getDefaultView() {\n return CellView.DATE;\n }\n getDefaultAlign() {\n return ColumnAlign.LEFT;\n }\n }\n return DateColumnPresentation;\n})();\nlet StringColumnPresentation = /*#__PURE__*/(() => {\n class StringColumnPresentation extends ColumnPresentation {\n static instance = null;\n constructor() {\n super();\n }\n static getInstance() {\n if (!StringColumnPresentation.instance) {\n StringColumnPresentation.instance = new StringColumnPresentation();\n }\n return StringColumnPresentation.instance;\n }\n getPossibleViews() {\n return [CellView.TEXT, CellView.ITALIC, CellView.BOLD, CellView.IMAGE, CellView.LINK, CellView.CHIP];\n }\n getDefaultView() {\n return CellView.TEXT;\n }\n getDefaultAlign() {\n return ColumnAlign.LEFT;\n }\n }\n return StringColumnPresentation;\n})();\nlet UnknownColumnPresentation = /*#__PURE__*/(() => {\n class UnknownColumnPresentation extends ColumnPresentation {\n static instance = null;\n constructor() {\n super();\n }\n static getInstance() {\n if (!UnknownColumnPresentation.instance) {\n UnknownColumnPresentation.instance = new UnknownColumnPresentation();\n }\n return UnknownColumnPresentation.instance;\n }\n getPossibleViews() {\n return [CellView.TEXT];\n }\n getDefaultView() {\n return CellView.TEXT;\n }\n getDefaultAlign() {\n return ColumnAlign.LEFT;\n }\n }\n return UnknownColumnPresentation;\n})();\nclass ColumnPresentationConverter {\n convert(dataType) {\n if (dataType === DataType.NUMBER) {\n return NumberColumnPresentation.getInstance();\n } else if (dataType === DataType.BOOLEAN) {\n return BooleanColumnPresentation.getInstance();\n } else if (dataType === DataType.DATE) {\n return DateColumnPresentation.getInstance();\n } else if (dataType === DataType.STRING) {\n return StringColumnPresentation.getInstance();\n } else {\n return UnknownColumnPresentation.getInstance();\n }\n }\n}\nlet ColumnEntityFactory = /*#__PURE__*/(() => {\n class ColumnEntityFactory {\n columnPresentationConverter;\n constructor(columnPresentationConverter) {\n this.columnPresentationConverter = columnPresentationConverter;\n }\n static services = [ColumnPresentationConverter];\n create(source) {\n if (Array.isArray(source)) {\n return this.createColumns(source);\n } else {\n return this.createColumn(source);\n }\n }\n createColumn(params) {\n const columnConfig = params.getColumn(),\n field = params.getField(),\n dataType = field.getDataType(),\n width = this.convertWidth(columnConfig.width) || undefined;\n let view, enabled;\n if (columnConfig.view !== undefined) {\n view = new ViewEntity(columnConfig.view);\n }\n if (columnConfig.enabled !== undefined) {\n enabled = columnConfig.enabled;\n } else {\n enabled = true;\n }\n const presentation = this.getPresentation(dataType);\n const columnEntity = new ColumnEntity(new ColumnId(RandomStringGenerator.generate()), field, columnConfig, enabled, presentation, undefined, columnConfig.align, view, width);\n if (columnConfig.header !== undefined) {\n columnEntity.setHeader(columnConfig.header);\n }\n return columnEntity;\n }\n createColumns(columns) {\n const columnEntities = [];\n columns.forEach(column => {\n columnEntities.push(this.createColumn(column));\n });\n return columnEntities;\n }\n convertWidth(width) {\n return +width;\n }\n getPresentation(dataType) {\n return this.columnPresentationConverter.convert(dataType);\n }\n }\n return ColumnEntityFactory;\n})();\nclass Group {\n id;\n header;\n width;\n constructor(id, header, width) {\n this.id = id;\n this.header = header;\n this.width = width;\n }\n}\nclass GroupId extends HermesId {\n constructor(id) {\n super(id);\n }\n toString() {\n return this.getId();\n }\n}\nclass CompositionGroupFactory {\n create(config) {\n return new Group(new GroupId(RandomStringGenerator.generate()), config.header, config.width);\n }\n}\nlet SetGroupsCommandHandler = /*#__PURE__*/(() => {\n class SetGroupsCommandHandler {\n compositionEventConverter;\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n constructor(compositionEventConverter) {\n this.compositionEventConverter = compositionEventConverter;\n }\n static services = [CompositionEventConverter];\n forCommand() {\n return SetGroupsCommand;\n }\n handle(aggregate, command) {\n const groupConfigs = command.getConfigs();\n aggregate.setGroups(groupConfigs);\n }\n publish(aggregate, command) {\n this.publishEvents(aggregate, command);\n }\n publishEvents(composition, command) {\n const events = composition.getEvents();\n const domainEvents = this.compositionEventConverter.convert(events);\n this.domainEventPublisher.publish(domainEvents);\n }\n }\n return SetGroupsCommandHandler;\n})();\nclass ColumnHighlightManager {\n enabled = true;\n highlightedColumns = new Set(); // should be set of ColumnId\n isHighlighted(columnId) {\n return this.highlightedColumns.has(columnId.toString());\n }\n toggle(columnId) {\n if (this.highlightedColumns.has(columnId.toString())) {\n this.highlightedColumns.delete(columnId.toString());\n } else {\n this.highlightedColumns.add(columnId.toString());\n }\n }\n remove(columnId) {\n this.highlightedColumns.delete(columnId.toString());\n }\n}\nclass ColumnHighlightArchive extends AggregateArchive {\n constructor() {\n super(new ColumnHighlightManager());\n }\n toggle(key, value) {\n this.find(key).ifPresent(manager => {\n manager.toggle(value);\n this.next(key, manager);\n });\n }\n equals(a, b) {\n return false;\n }\n createDefaultValue(defaultValue) {\n return new ColumnHighlightManager();\n }\n}\nclass InMemoryCompositionStore extends InMemoryStore {}\nlet InMemoryCompositionAggregateStore = /*#__PURE__*/(() => {\n class InMemoryCompositionAggregateStore extends InMemoryAggregateStore {\n constructor(inMemoryCompositionStore) {\n super(inMemoryCompositionStore);\n }\n static services = [InMemoryCompositionStore];\n }\n return InMemoryCompositionAggregateStore;\n})();\nclass CompositionAggregateRepository extends AggregateRepository {}\nlet InMemoryCompositionAggregateRepository = /*#__PURE__*/(() => {\n class InMemoryCompositionAggregateRepository extends CompositionAggregateRepository {\n inMemoryCompositionAggregateStore;\n constructor(inMemoryCompositionAggregateStore) {\n super();\n this.inMemoryCompositionAggregateStore = inMemoryCompositionAggregateStore;\n }\n static services = [InMemoryCompositionAggregateStore];\n findById(aggregateId) {\n return this.inMemoryCompositionAggregateStore.findById(aggregateId);\n }\n save(aggregate) {\n this.inMemoryCompositionAggregateStore.save(aggregate);\n }\n }\n return InMemoryCompositionAggregateRepository;\n})();\nclass CellContext {\n element;\n constructor(element) {\n this.element = element;\n }\n}\nclass ColumnDefinition extends ReadModelEntity {\n columnConfig;\n name;\n type;\n view;\n align;\n cssClasses;\n styles;\n // cellTemplate: TemplateRef<any> | null = null;\n //\n // headerTemplate: TemplateRef<any> | null = null;\n //\n // editTemplate: TemplateRef<any> | null = null;\n width;\n templateFunction;\n formatterFunction;\n columnDefinitionId;\n field;\n header;\n sortStatus;\n sortable = true;\n enabled;\n cellEditingEnabled;\n constructor(field, columnDefinitionId,\n // REFACTOR Id first argument\n columnConfig, name, enabled, type,\n // REFACTOR\n view,\n // REFACTOR\n align,\n // REFACTOR\n header, cellEditingEnabled, cssClasses, styles, sort = SortOrder.NONE, sortable = true) {\n super(columnDefinitionId);\n this.columnConfig = columnConfig;\n this.name = name;\n this.type = type;\n this.view = view;\n this.align = align;\n this.cssClasses = cssClasses;\n this.styles = styles;\n this.field = field;\n this.columnDefinitionId = columnDefinitionId;\n this.enabled = enabled;\n this.header = header;\n this.cellEditingEnabled = cellEditingEnabled;\n this.sortStatus = sort;\n this.sortable = sortable;\n }\n getName() {\n return this.name;\n }\n isEnabled() {\n return this.enabled;\n }\n setHeader(header) {\n this.header = header;\n }\n setField(field) {\n this.field = field;\n }\n setTemplateFunction(templateFun) {\n this.templateFunction = templateFun;\n }\n setFormatterFunction(formatter) {\n this.formatterFunction = formatter;\n }\n toHeaderCellTemplateWithContext(index) {\n const header = this.header || '';\n let headerCellContext;\n if (typeof header === 'string') {\n headerCellContext = new CellContext(CellValue.text(header));\n } else if (typeof header === 'function') {\n headerCellContext = new CellContext(CellValue.text(header(index)));\n }\n const fieldId = new FieldId(this.field.getId().getId());\n return new CellTemplateWithContext(header, this.type, headerCellContext, this.width, fieldId, this.columnDefinitionId, this.sortStatus, this.enabled, this.cssClasses, this.styles, this.sortable, this.align);\n }\n toContentCellTemplateWithAccessor() {\n const accessor = entity => {\n return this.field.getAccessor()(entity);\n },\n searchAccessor = entity => {\n return this.field.getSearchAccessor()(entity);\n };\n return new CellTemplateWithAccessor(this.columnConfig, this.columnDefinitionId, this.name,\n // null,\n // null,\n true, this.templateFunction, this.formatterFunction, accessor, searchAccessor, this.width, this.field.getId(), this.align, this.cellEditingEnabled, this.type, this.view);\n }\n}\nclass ColumnDefinitionId extends ReadModelEntityId {\n constructor(id) {\n super(id);\n }\n}\nclass ColumnDefinitionFactory {\n create(column) {\n if (column instanceof ColumnEntity) {\n return this.createFromColumnEntity(column);\n } else {\n return this.createFromActiveColumnEntity(column);\n }\n }\n createColumns(columns) {\n return columns.map(column => this.create(column));\n }\n createFromColumnEntity(column) {\n const columnDef = new ColumnDefinition(column.getField(), new ColumnDefinitionId(column.getId().toString()), column.getColumnConfig(), column.getColumnConfig().name, column.isEnabled(), column.getDataType(), column.getView(), column.getAlign(), column.getHeader(), column.isCellEditingEnabled(), column.getColumnConfig().cssClasses, column.getColumnConfig().styles, column.getSortStatus(), column.isSortingEnabled());\n columnDef.setTemplateFunction(column.getTemplateFunction());\n columnDef.setFormatterFunction(column.getFormatterFunction());\n columnDef.width = +column.getWidth();\n return columnDef;\n }\n createFromActiveColumnEntity(activeColumn) {\n const columnDef = new ColumnDefinition(activeColumn.getField(), new ColumnDefinitionId(activeColumn.getId().toString()), activeColumn.getColumnConfig(), activeColumn.getColumnConfig().name, true,\n // remove,\n activeColumn.getDataType(), activeColumn.getView(), activeColumn.getAlign(), activeColumn.getHeader(), activeColumn.isCellEditingEnabled(), activeColumn.getColumnConfig().cssClasses, activeColumn.getColumnConfig().styles, activeColumn.getSortStatus(), activeColumn.isSortingEnabled());\n columnDef.setTemplateFunction(activeColumn.getTemplateFunction());\n columnDef.setFormatterFunction(activeColumn.getFormatterFunction());\n columnDef.width = +activeColumn.getWidth();\n return columnDef;\n }\n}\nclass CompositionReadModeRoot extends ReadModelRoot {\n ready;\n allColumns;\n activeColumns;\n width;\n resizeWidth;\n constructor(uid, ready, allColumns, activeColumns, width, resizeWidth) {\n super(uid);\n this.ready = ready;\n this.allColumns = allColumns;\n this.activeColumns = activeColumns;\n this.width = width;\n this.resizeWidth = resizeWidth;\n }\n getActiveColumns() {\n return this.activeColumns;\n }\n getAllColumns() {\n return this.allColumns;\n }\n getActiveHeaderColumns() {\n return this.getActiveColumns().map((column, index) => column.toHeaderCellTemplateWithContext(index));\n }\n getHeaderColumns() {\n return this.getAllColumns().map((column, index) => column.toHeaderCellTemplateWithContext(index));\n }\n getTemplateColumns() {\n return this.getActiveColumns().map(column => column.toContentCellTemplateWithAccessor());\n }\n getWidth() {\n return this.width;\n }\n getContainerWidth() {\n return +this.width - 2;\n }\n isReady() {\n return this.ready;\n }\n isResizeWidthEnabled() {\n return this.resizeWidth;\n }\n equals(composition) {\n return this.width === composition.width && this.resizeWidth === composition.resizeWidth && this.equalsByColumns(composition.allColumns);\n }\n equalsByColumns(columns) {\n return this.allColumns.length === columns.length;\n }\n}\nlet CompositionReadModelRootConverter = /*#__PURE__*/(() => {\n class CompositionReadModelRootConverter {\n columnDefinitionFactory;\n constructor(columnDefinitionFactory) {\n this.columnDefinitionFactory = columnDefinitionFactory;\n }\n static services = [ColumnDefinitionFactory];\n convert(aggregate) {\n const ready = aggregate.isReady(),\n allColumns = aggregate.getColumns(),\n activeColumns = aggregate.getActiveColumns(),\n allColumnDefs = this.convertToColumnDef(allColumns),\n activeColumnDefs = this.convertActiveColumnsToColumnDef(activeColumns),\n width = aggregate.getWidth(),\n resizeWidth = aggregate.isResizeEnabled(),\n aggregateId = aggregate.getId();\n return new CompositionReadModeRoot(aggregateId.toReadModelRootId(), ready, allColumnDefs, activeColumnDefs, width, resizeWidth);\n }\n convertToColumnDef(columns) {\n const columnDefs = [];\n columns.forEach(column => {\n const columnDef = this.columnDefinitionFactory.create(column);\n columnDefs.push(columnDef);\n });\n return columnDefs;\n }\n convertActiveColumnsToColumnDef(activeColumns) {\n const columnDefs = [];\n activeColumns.forEach(column => {\n const columnDef = this.columnDefinitionFactory.create(column);\n columnDefs.push(columnDef);\n });\n return columnDefs;\n }\n }\n return CompositionReadModelRootConverter;\n})();\nlet InMemoryCompositionReadStore = /*#__PURE__*/(() => {\n class InMemoryCompositionReadStore extends InMemoryReadModelStore {\n inMemoryCompositionStore;\n compositionConverter;\n constructor(inMemoryCompositionStore, compositionConverter) {\n super(inMemoryCompositionStore);\n this.inMemoryCompositionStore = inMemoryCompositionStore;\n this.compositionConverter = compositionConverter;\n }\n static services = [InMemoryCompositionStore, CompositionReadModelRootConverter];\n toReadModel(aggregate) {\n return this.compositionConverter.convert(aggregate);\n }\n }\n return InMemoryCompositionReadStore;\n})();\nclass CompositionReadModelRootRepository extends ReadModelRootRepository {\n constructor() {\n super();\n }\n}\nclass CompositionCreatedEvent extends CompositionDomainEvent {\n constructor(compositionId) {\n super(compositionId, null, 'CompositionCreatedEvent');\n }\n}\nlet InMemoryCompositionRepository = /*#__PURE__*/(() => {\n class InMemoryCompositionRepository extends CompositionReadModelRootRepository {\n inMemoryCompositionReadStore;\n compositionIdToComposition = new Map();\n composition$ = new HermesReplaySubject(1);\n constructor(inMemoryCompositionReadStore) {\n super();\n this.inMemoryCompositionReadStore = inMemoryCompositionReadStore;\n }\n static services = [InMemoryCompositionReadStore];\n on(compositionId) {\n return this.composition$.toObservable().pipe(hermesFilter(compositionIdToComposition => {\n const key = compositionId.getId();\n return compositionIdToComposition.has(key);\n }), hermesMap(compositionIdToComposition => compositionIdToComposition.get(compositionId.getId())));\n }\n find(compositionId) {\n const key = compositionId.getId();\n return Optional.of(this.compositionIdToComposition.get(key));\n }\n forEvents() {\n return [CompositionCreatedEvent, CompositionResizeWidthSetEvent, CompositionColumnsSetEvent, CompositionContainerWidthSetEvent, CompositionWidthSetEvent, CompositionColumnSetEnabledEvent, CompositionColumnMovedLeftEvent, CompositionColumnMovedRightEvent, CompositionChangeSortStatusEvent];\n }\n subscribe(event) {\n const aggregateId = event.getAggregateId();\n const optComposition = this.inMemoryCompositionReadStore.getById(aggregateId);\n optComposition.ifPresent(composition => {\n const key = composition.getId().toString();\n this.compositionIdToComposition.set(key, composition);\n this.composition$.next(this.compositionIdToComposition);\n });\n }\n }\n return InMemoryCompositionRepository;\n})();\nclass CreateCompositionCommandHandler {\n forCommand() {\n return CreateCompositionCommand;\n }\n}\nclass CompositionContainerWidthCalculator {\n MIN_COLUMN_WIDTH;\n constructor(MIN_COLUMN_WIDTH) {\n this.MIN_COLUMN_WIDTH = MIN_COLUMN_WIDTH;\n }\n calculateMinWidth(columnWidths) {\n const {\n staticColumns,\n fluidColumns\n } = this.segregateColumns(columnWidths);\n // TODO reduce\n let sum = 0;\n staticColumns.forEach(c => {\n sum += c.getWidth();\n });\n sum += fluidColumns.length * this.MIN_COLUMN_WIDTH;\n return sum;\n }\n segregateColumns(columns) {\n const staticColumns = columns.filter(columnWidth => columnWidth.isTypeNumber() && columnWidth.getWidth() > this.MIN_COLUMN_WIDTH),\n fluidColumns = columns.filter(columnWidth => {\n return columnWidth.isTypeAuto() || columnWidth.isTypePercentage() || columnWidth.isTypeNumber() && columnWidth.getWidth() <= this.MIN_COLUMN_WIDTH;\n });\n return {\n staticColumns: staticColumns,\n fluidColumns: fluidColumns\n };\n }\n}\nclass CompositionAggregateEvent extends AggregateEvent {}\nclass CompositionWidthSetAggregateEvent extends CompositionAggregateEvent {\n constructor(aggregateId) {\n super(aggregateId, 'CompositionWidthSetAggregateEvent');\n }\n toDomainEvent() {\n return new CompositionWidthSetEvent(this.getAggregateId());\n }\n}\nclass CompositionContainerWidthSetAggregateEvent extends CompositionAggregateEvent {\n containerWidth;\n constructor(compositionId, containerWidth) {\n super(compositionId, 'CompositionContainerWidthSetAggregateEvent');\n this.containerWidth = containerWidth;\n }\n toDomainEvent() {\n return new CompositionContainerWidthSetEvent(this.getAggregateId(), this.containerWidth);\n }\n}\nclass CompositionResizeWidthSetAggregateEvent extends CompositionAggregateEvent {\n constructor(compositionId) {\n super(compositionId, 'CompositionResizeWidthSetAggregateEvent');\n }\n toDomainEvent() {\n return new CompositionResizeWidthSetEvent(this.getAggregateId());\n }\n}\nclass CompositionColumnSetEnabledAggregateEvent extends CompositionAggregateEvent {\n activeColumns;\n constructor(aggregateId, activeColumns) {\n super(aggregateId, 'CompositionColumnSetEnabledAggregateEvent');\n this.activeColumns = activeColumns;\n }\n toDomainEvent() {\n return new CompositionColumnSetEnabledEvent(this.getAggregateId());\n }\n getActiveColumns() {\n return this.activeColumns;\n }\n}\nvar ColumnWidthType = /*#__PURE__*/function (ColumnWidthType) {\n ColumnWidthType[ColumnWidthType[\"PERCENTAGE\"] = 0] = \"PERCENTAGE\";\n ColumnWidthType[ColumnWidthType[\"NUMBER\"] = 1] = \"NUMBER\";\n ColumnWidthType[ColumnWidthType[\"AUTO\"] = 2] = \"AUTO\";\n return ColumnWidthType;\n}(ColumnWidthType || {});\nclass ColumnWidth {\n template;\n baseWidth;\n width;\n constructor(width) {\n this.baseWidth = width;\n this.setWidthAndType(width);\n }\n getWidth() {\n return this.width;\n }\n getColumnType() {\n return this.template;\n }\n isTypePercentage() {\n return this.template === ColumnWidthType.PERCENTAGE;\n }\n isTypeAuto() {\n return this.template === ColumnWidthType.AUTO;\n }\n isTypeNumber() {\n return this.template === ColumnWidthType.NUMBER;\n }\n setWidth(width) {\n this.width = width;\n }\n setWidthAndType(width) {\n if (width === undefined || width === null || width === 'auto') {\n this.template = ColumnWidthType.AUTO;\n this.setWidth(null);\n } else if (this.isPercentage(width)) {\n this.template = ColumnWidthType.PERCENTAGE;\n this.setWidth(this.percentageToNumber('' + width));\n } else if (this.isStringNumber(width)) {\n this.template = ColumnWidthType.NUMBER;\n this.setWidth(+width);\n } else {\n this.template = ColumnWidthType.NUMBER;\n this.setWidth(+width);\n }\n }\n clone() {\n return new ColumnWidth(this.baseWidth);\n }\n isPercentage(width) {\n return typeof width === 'string' && width[width.length - 1] === '%';\n }\n /**\n * Width needs to be in format '89%'\n * @param width\n */\n percentageToNumber(width) {\n return +width.slice(0, -1);\n }\n isStringNumber(width) {\n const widthAsNumber = +width;\n return Number.isNaN(widthAsNumber);\n }\n}\nclass CompositionWidthCalculator {\n source;\n width;\n MIN_COLUMN_WIDTH;\n columns;\n constructor(source, width, MIN_COLUMN_WIDTH) {\n this.source = source;\n this.width = width;\n this.MIN_COLUMN_WIDTH = MIN_COLUMN_WIDTH;\n this.columns = this.source.map(c => c.clone());\n }\n calculate() {\n let width = this.width,\n columns = Array.from(this.columns);\n // adjust min value\n this.adjustMinimalWidth(columns);\n // remove number columns\n const newColumns = [];\n columns.forEach((column, index) => {\n if (column.isTypeNumber()) {\n width -= column.getWidth();\n } else {\n newColumns.push(column);\n }\n });\n columns = newColumns;\n // split even auto columns\n if (columns.length !== 0) {\n const evenWidth = width / columns.length;\n columns.forEach((column, index) => {\n column.setWidth(evenWidth);\n });\n }\n // adjust number columns\n // let numberColumns = this.columns.filter((columnWidth: ColumnWidth) => columnWidth.isTypeNumber());\n //\n // // sort by min values\n // numberColumns.sort((columnOne: ColumnWidth, columnTwo: ColumnWidth) => {\n // \treturn columnOne.getWidth() - columnTwo.getWidth();\n // });\n //\n // numberColumns.forEach(() => {\n // });\n // this.adjustMinimalWidth(ColumnWidthType.NUMBER);\n //\n // this.adjustPercentageWidth();\n //\n // this.adjustAutoWidth();\n return this.columns;\n }\n adjustMinimalWidth(columns) {\n columns.forEach(column => {\n if (column.isTypeNumber()) {\n if (column.getWidth() < this.MIN_COLUMN_WIDTH) {\n column.setWidthAndType(this.MIN_COLUMN_WIDTH);\n }\n }\n });\n }\n adjustPercentageWidth() {\n const percentageColumns = this.columns.filter(columnWidth => columnWidth.isTypePercentage());\n for (const column of this.columns) {\n if (column.getColumnType() === ColumnWidthType.PERCENTAGE) {\n column.setWidth(this.width * column.getWidth() * 0.01);\n }\n }\n }\n adjustAutoWidth() {\n let leftWidth = this.width;\n const autoColumns = [];\n for (let i = 0; i < this.columns.length; i += 1) {\n const column = this.columns[i];\n if (column.getColumnType() !== ColumnWidthType.AUTO) {\n leftWidth -= column.getWidth();\n } else {\n autoColumns.push(column);\n }\n }\n if (autoColumns.length > 0) {\n const splitWidth = leftWidth / autoColumns.length;\n for (const column of autoColumns) {\n column.setWidth(splitWidth);\n }\n }\n }\n}\nclass ColumnWidthCollection {\n MIN_COLUMN_WIDTH;\n baseColumnWidths;\n columnWidths;\n width;\n constructor(MIN_COLUMN_WIDTH, columns = [], width = 100) {\n this.MIN_COLUMN_WIDTH = MIN_COLUMN_WIDTH;\n this.baseColumnWidths = columns.map(column => new ColumnWidth(column.width));\n this.columnWidths = columns.map(column => new ColumnWidth(column.width));\n this.setContainerWidth(width);\n this.calculate();\n }\n getColumnWidths() {\n return this.baseColumnWidths;\n }\n getColumnsWidth() {\n return this.width;\n }\n getWidths() {\n return this.columnWidths.map(c => c.getWidth());\n }\n getMinWidth() {\n const calculator = new CompositionContainerWidthCalculator(this.MIN_COLUMN_WIDTH);\n return calculator.calculateMinWidth(this.columnWidths);\n }\n setWidth(width) {\n this.setContainerWidth(width);\n this.calculate();\n }\n setColumns(columnConfigs) {\n this.baseColumnWidths = columnConfigs.map(column => new ColumnWidth(column.width));\n this.columnWidths = columnConfigs.map(column => new ColumnWidth(column.width));\n this.calculate();\n }\n getMinColumnWidth() {\n return this.MIN_COLUMN_WIDTH;\n }\n calculate() {\n if (this.baseColumnWidths && this.width) {\n const calculator = new CompositionWidthCalculator(this.baseColumnWidths, this.width, this.MIN_COLUMN_WIDTH);\n this.columnWidths = calculator.calculate();\n }\n }\n setContainerWidth(width) {\n if (this.getMinWidth() > width) {\n this.width = this.getMinWidth();\n } else {\n this.width = width;\n }\n this.calculate();\n }\n}\nclass CompositionChangeSortStatusAggregateEvent extends CompositionAggregateEvent {\n activeColumns;\n constructor(aggregateId, activeColumns) {\n super(aggregateId, 'CompositionChangeSortStatusAggregateEvent');\n this.activeColumns = activeColumns;\n }\n toDomainEvent() {\n return new CompositionChangeSortStatusEvent(this.getAggregateId(), this.activeColumns);\n }\n}\nclass ActiveColumnContainer {\n compositionId;\n MIN_COLUMN_WIDTH = 50;\n columns;\n /**\n * Columns taken from user config.\n * This should not be modified and it should be used as a reference point.\n */\n columnWidthCollection = new ColumnWidthCollection(this.MIN_COLUMN_WIDTH);\n constructor(compositionId, columns = [], gridWidth, columnConfigs) {\n this.compositionId = compositionId;\n this.columns = columns;\n if (gridWidth && columnConfigs) {\n this.columnWidthCollection = new ColumnWidthCollection(this.MIN_COLUMN_WIDTH, columnConfigs, gridWidth);\n }\n }\n getColumnWidths() {\n return this.columnWidthCollection.getColumnWidths();\n }\n // REMOVE\n getColumns() {\n return this.columns;\n }\n setWidth(width) {\n this.columnWidthCollection.setWidth(width);\n }\n addColumn(column, index) {\n this.columns.splice(index, 0, column);\n }\n removeColumn(index) {\n this.columns.splice(index, 1);\n }\n setColumns(columns, columnConfigs) {\n this.columns = columns;\n this.columnWidthCollection.setColumns(columnConfigs);\n const updatedWidths = this.columnWidthCollection.getWidths();\n this.columns.forEach((column, index) => {\n column.setWidth(updatedWidths[index]);\n });\n // TODO\n // this.addEvent(new ColumnsSetAggregateEvent(this.getId(), columns));\n }\n changeSort(sortParams) {\n this.columns.forEach(column => {\n column.setSortStatus(SortOrder.NONE);\n });\n for (const param of sortParams) {\n const fieldId = param.fieldId,\n direction = param.direction,\n sortStatus = direction ? SortOrder.ASC : SortOrder.DESC;\n const columns = this.columns.filter(column => {\n return column.getField().getId().getId() === fieldId.getId();\n });\n if (columns.length > 0) {\n columns.forEach(column => {\n column.setSortStatus(sortStatus);\n });\n }\n }\n return new CompositionChangeSortStatusAggregateEvent(this.getCompositionId(), this.columns);\n }\n moveLeft(columnId) {\n const index = this.findColumnIndex(columnId);\n this.move(index, index - 1);\n }\n moveRight(columnId) {\n const index = this.findColumnIndex(columnId);\n this.move(index, index + 1);\n }\n getMinColumnWidth() {\n return this.MIN_COLUMN_WIDTH;\n }\n move(fromIndex, toIndex) {\n if (!this.validateMoveIndex(fromIndex) || !this.validateMoveIndex(toIndex)) {\n return;\n }\n const column = this.columns[fromIndex];\n this.columns[fromIndex] = this.columns[toIndex];\n this.columns[toIndex] = column;\n }\n validateMoveIndex(index) {\n return index >= 0;\n }\n getCompositionId() {\n return this.compositionId;\n }\n findColumnIndex(columnId) {\n return this.columns.findIndex(c => c.getId().equals(columnId));\n }\n}\nclass ActiveColumnEntity extends ColumnEntity {\n constructor(columnId, columnField, header, align, view, config, presentation) {\n super(columnId, columnField, config, true, presentation, header, align, view, undefined);\n }\n static fromEntity(entity) {\n return new ActiveColumnEntity(entity.getId(), entity.getField(), entity.getHeader(), entity.getAlign(), entity.getView(), entity.getColumnConfig(), entity.getPresentation());\n }\n}\nclass ActiveColumnEntityConverter {\n convertMany(entities) {\n return entities.map(e => this.convert(e));\n }\n convert(entity) {\n return ActiveColumnEntity.fromEntity(entity);\n }\n}\nclass CompositionColumnMovedLeftAggregateEvent extends CompositionAggregateEvent {\n constructor(aggregateId) {\n super(aggregateId, 'CompositionColumnMovedLeftAggregateEvent');\n }\n toDomainEvent() {\n return new CompositionColumnMovedLeftEvent(this.getAggregateId());\n }\n}\nclass CompositionColumnMovedRightAggregateEvent extends CompositionAggregateEvent {\n constructor(aggregateId) {\n super(aggregateId, 'CompositionColumnMovedRightAggregateEvent');\n }\n toDomainEvent() {\n return new CompositionColumnMovedRightEvent(this.getAggregateId());\n }\n}\nclass ColumnsSetAggregateEvent extends CompositionAggregateEvent {\n constructor(compositionId) {\n super(compositionId, 'ColumnsSetAggregateEvent');\n }\n toDomainEvent() {\n return new CompositionColumnsSetEvent(this.getAggregateId());\n }\n}\nclass CompositionCreatedAggregateEvent extends CompositionAggregateEvent {\n constructor(compositionId) {\n super(compositionId, 'SchemaCreatedEvent');\n }\n toDomainEvent() {\n return new CompositionCreatedEvent(this.getAggregateId());\n }\n}\nconst emptyGroup = new Group(new GroupId('-1'), '', 100);\nclass CompositionAggregate extends AggregateRoot {\n allColumns = [];\n baseColumns;\n baseParams;\n /**\n * Value taken from user config [width]\n */\n width;\n containerInDOMWidth;\n resizeWidthEnabled = true;\n columnFactory;\n groupFactory;\n activeColumnContainer;\n activeColumnEntityConverter = new ActiveColumnEntityConverter();\n groups = new KeyMap();\n columnNameToGroupId = new Map();\n constructor(id, columnFactory, groupFactory, columnsParams = [], width, resizeWidth) {\n super(id, 'CompositionAggregate');\n const columnConfigs = columnsParams.map(param => param.getColumn());\n this.baseParams = columnsParams;\n this.baseColumns = columnConfigs;\n this.columnFactory = columnFactory;\n this.groupFactory = groupFactory;\n this.width = width;\n this.allColumns = this.columnFactory.create(columnsParams);\n const activeColumns = this.activeColumnEntityConverter.convertMany(this.getEnabledColumns());\n this.activeColumnContainer = new ActiveColumnContainer(this.getId(), activeColumns, width, columnConfigs);\n if (resizeWidth !== undefined && resizeWidth !== null) {\n this.resizeWidthEnabled = resizeWidth;\n }\n }\n createEvent() {\n return CompositionCreatedAggregateEvent;\n }\n // REMOVE\n getColumns() {\n return this.allColumns;\n }\n // REMOVE\n getActiveColumns() {\n return this.activeColumnContainer.getColumns();\n }\n // make private\n getWidth() {\n if (this.resizeWidthEnabled) {\n return this.containerInDOMWidth;\n } else {\n return this.width;\n }\n }\n // REMOVE\n isResizeEnabled() {\n return this.resizeWidthEnabled;\n }\n // REMOVE\n isReady() {\n return !!this.getWidth() && this.getActiveColumns().length > 0;\n }\n setGroups(configs) {\n for (let i = 0; i < configs.length; i += 1) {\n const config = configs[i];\n if (config.columns !== undefined) {\n const group = this.groupFactory.create(config);\n this.groups.set(group.id, group);\n config.columns.forEach((c, index) => {\n this.columnNameToGroupId.set(c.header, group.id);\n });\n } else {\n this.columnNameToGroupId.set(config.header, emptyGroup.id);\n }\n }\n }\n setColumns(params) {\n this.allColumns = this.columnFactory.create(params);\n const columnConfigs = params.map(param => param.getColumn());\n const activeColumns = this.activeColumnEntityConverter.convertMany(this.getEnabledColumns());\n this.activeColumnContainer.setColumns(activeColumns, columnConfigs);\n this.addEvent(new ColumnsSetAggregateEvent(this.getId()));\n }\n setContainerWidth(containerWidth) {\n this.setContainerWidthWithEvent(containerWidth);\n this.recalculateColumns();\n }\n setWidth(width) {\n this.setWidthWithEvent(width);\n this.setResizeWidthWithEvent(false);\n this.recalculateColumns();\n }\n setResizeWidth(enabled) {\n this.setResizeWidthWithEvent(enabled);\n }\n changeSort(sortParams) {\n this.addEvent(this.activeColumnContainer.changeSort(sortParams));\n }\n // DELEGATE\n enableColumn(columnId, enabled) {\n let enabledIndex = -1;\n this.allColumns.forEach((column, index) => {\n if (column.getId().getId() === columnId.getId()) {\n const prevState = column.isEnabled();\n column.setEnabled(enabled);\n if (prevState !== enabled) {\n enabledIndex = index;\n }\n }\n });\n if (enabledIndex > 0) {\n if (enabled) {\n // convert\n const columnToAdd = this.activeColumnEntityConverter.convert(this.allColumns[enabledIndex]);\n this.activeColumnContainer.addColumn(columnToAdd, enabledIndex);\n } else {\n this.activeColumnContainer.removeColumn(enabledIndex);\n }\n }\n this.recalculateColumns();\n this.addEvent(new CompositionColumnSetEnabledAggregateEvent(this.getId(), this.getActiveColumns()));\n }\n moveLeft(columnId) {\n const columnIndex = this.findColumnIndex(columnId);\n let nextLeft,\n nextLeftIndex = -1;\n for (let i = columnIndex - 1; i >= 0; i -= 1) {\n const leftColumn = this.allColumns[i];\n if (leftColumn.isEnabled()) {\n nextLeft = leftColumn;\n nextLeftIndex = i;\n break;\n }\n }\n if (nextLeft && nextLeftIndex >= 0 && columnIndex >= 0) {\n const column = this.allColumns[columnIndex];\n this.allColumns[columnIndex] = nextLeft;\n this.allColumns[nextLeftIndex] = column;\n }\n this.activeColumnContainer.moveLeft(columnId);\n this.addEvent(new CompositionColumnMovedLeftAggregateEvent(this.getId()));\n }\n moveRight(columnId) {\n const columnIndex = this.findColumnIndex(columnId);\n let nextRight,\n nextRightIndex = -1;\n for (let i = columnIndex + 1; i < this.allColumns.length; i += 1) {\n const rightColumn = this.allColumns[i];\n if (rightColumn.isEnabled()) {\n nextRight = rightColumn;\n nextRightIndex = i;\n break;\n }\n }\n if (nextRight && nextRightIndex >= 0 && columnIndex >= 0) {\n const column = this.allColumns[columnIndex];\n this.allColumns[columnIndex] = nextRight;\n this.allColumns[nextRightIndex] = column;\n }\n this.activeColumnContainer.moveRight(columnId);\n this.addEvent(new CompositionColumnMovedRightAggregateEvent(this.getId()));\n }\n recalculateColumns() {\n const activeColumns = this.activeColumnEntityConverter.convertMany(this.getEnabledColumns());\n this.activeColumnContainer.setColumns(activeColumns, activeColumns.map(c => c.getColumnConfig()));\n }\n // TODO Refactor\n setWidthWithEvent(width) {\n const calculator = new CompositionContainerWidthCalculator(this.getMinColumnWidth());\n const minWidth = calculator.calculateMinWidth(this.activeColumnContainer.getColumnWidths());\n if (minWidth > width) {\n this.width = minWidth;\n } else {\n this.width = width;\n }\n this.activeColumnContainer.setWidth(this.getWidth());\n this.addEvent(new CompositionWidthSetAggregateEvent(this.getId()));\n }\n // TODO Refactor\n setContainerWidthWithEvent(containerWidth) {\n const calculator = new CompositionContainerWidthCalculator(this.getMinColumnWidth());\n const minWidth = calculator.calculateMinWidth(this.activeColumnContainer.getColumnWidths());\n if (minWidth > containerWidth) {\n this.containerInDOMWidth = minWidth;\n } else {\n this.containerInDOMWidth = containerWidth;\n }\n this.activeColumnContainer.setWidth(this.getWidth());\n this.addEvent(new CompositionContainerWidthSetAggregateEvent(this.getId(), containerWidth));\n }\n setResizeWidthWithEvent(enabled) {\n this.resizeWidthEnabled = enabled;\n this.activeColumnContainer.setWidth(this.getWidth());\n this.addEvent(new CompositionResizeWidthSetAggregateEvent(this.getId()));\n }\n // REMOVE -> move to allColumnsContainer\n getEnabledColumns() {\n return this.allColumns.filter(c => c.isEnabled());\n }\n findColumnIndex(columnId) {\n return this.allColumns.findIndex(column => column.getId().equals(columnId));\n }\n getMinColumnWidth() {\n return this.activeColumnContainer.getMinColumnWidth();\n }\n}\nlet CompositionAggregateFactory = /*#__PURE__*/(() => {\n class CompositionAggregateFactory extends AggregateFactory {\n columnFactory;\n groupFactory;\n constructor(columnFactory, groupFactory) {\n super();\n this.columnFactory = columnFactory;\n this.groupFactory = groupFactory;\n }\n static services = [ColumnEntityFactory, CompositionGroupFactory];\n create(id) {\n return new CompositionAggregate(id, this.columnFactory, this.groupFactory);\n }\n }\n return CompositionAggregateFactory;\n})();\nconst compositionKey = 'CompositionAggregate';\nclass CompositionDomainModule {\n defineAggregate() {\n return {\n aggregateKey: compositionKey,\n createCommandHandler: CreateCompositionCommandHandler,\n factory: CompositionAggregateFactory,\n repository: InMemoryCompositionAggregateRepository\n };\n }\n registerKey() {\n return compositionKey;\n }\n registerProviders(container) {\n container.provide(InMemoryCompositionAggregateStore);\n container.provide(CompositionAggregateRepository, InMemoryCompositionAggregateRepository);\n container.provide(CompositionDispatcher);\n container.provide(ColumnEntityFactory);\n container.provide(ColumnPresentationConverter);\n container.provide(CompositionEventConverter);\n container.provide(ColumnFieldFactory);\n container.provide(CompositionGroupFactory);\n container.provide(ColumnHighlightArchive);\n container.provide(InMemoryCompositionStore);\n container.provide(InMemoryCompositionReadStore);\n container.provide(CompositionReadModelRootRepository, InMemoryCompositionRepository);\n }\n registerCommandHandlers() {\n return [SetColumnsCommandHandler, SetCompositionWidthCommandHandler, SetCompositionResizeWidthCommandHandler, SetCompositionContainerWidthCommandHandler, CompositionSetColumnEnabledCommandHandler, CompositionChangeSortStatusCommandHandler, CompositionMoveLeftColumnCommandHandler, CompositionMoveRightColumnCommandHandler, SetGroupsCommandHandler];\n }\n registerDomainEventHandler() {\n return [];\n }\n registerMultiDomainEventHandler() {\n return [CompositionChangeSortStatusEventHandler];\n }\n}\nlet FunctionViewComponent = /*#__PURE__*/(() => {\n class FunctionViewComponent extends PureComponent {\n sanitizer;\n element;\n safeHTML;\n constructor(sanitizer, elRef) {\n super(elRef);\n this.sanitizer = sanitizer;\n this.addClassToHost('gui-h-full');\n this.addClassToHost('gui-w-full');\n }\n ngOnChanges() {\n this.safeHTML = this.sanitizer.bypassSecurityTrustHtml(this.element.value);\n }\n getSelectorName() {\n return 'gui-function-view';\n }\n static ɵfac = function FunctionViewComponent_Factory(t) {\n return new (t || FunctionViewComponent)(i0.ɵɵdirectiveInject(i1.DomSanitizer), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: FunctionViewComponent,\n selectors: [[\"gui-function-view\"]],\n inputs: {\n element: \"element\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n decls: 1,\n vars: 1,\n consts: [[1, \"gui-h-full\", \"gui-flex\", \"gui-items-center\", 3, \"innerHTML\"]],\n template: function FunctionViewComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"innerHTML\", ctx.safeHTML, i0.ɵɵsanitizeHtml);\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return FunctionViewComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet PercentageViewComponent = /*#__PURE__*/(() => {\n class PercentageViewComponent extends PureComponent {\n value;\n constructor(elementRef) {\n super(elementRef);\n }\n getSelectorName() {\n return 'gui-percentage-view';\n }\n static ɵfac = function PercentageViewComponent_Factory(t) {\n return new (t || PercentageViewComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: PercentageViewComponent,\n selectors: [[\"gui-percentage-view\", \"value\", \"\"]],\n inputs: {\n value: \"value\"\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c8,\n decls: 1,\n vars: 1,\n template: function PercentageViewComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtext(0);\n }\n if (rf & 2) {\n i0.ɵɵtextInterpolate1(\" \", ctx.value, \" % \");\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return PercentageViewComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet BarViewComponent = /*#__PURE__*/(() => {\n class BarViewComponent extends PureComponent {\n value;\n showPercentage = false;\n width;\n constructor(elementRef) {\n super(elementRef);\n }\n ngOnChanges(changes) {\n ifChanged(changes.value, () => {\n this.width = this.value > 100 ? 100 : this.value;\n });\n }\n getSelectorName() {\n return 'gui-bar-view';\n }\n static ɵfac = function BarViewComponent_Factory(t) {\n return new (t || BarViewComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: BarViewComponent,\n selectors: [[\"gui-bar-view\", \"value\", \"\"]],\n inputs: {\n value: \"value\",\n showPercentage: \"showPercentage\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c8,\n decls: 3,\n vars: 3,\n consts: [[1, \"gui-percentage-bar\"], [1, \"gui-percentage\"], [3, \"value\", 4, \"ngIf\"], [3, \"value\"]],\n template: function BarViewComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵelement(1, \"div\", 1);\n i0.ɵɵtemplate(2, BarViewComponent_gui_percentage_view_2_Template, 1, 1, \"gui-percentage-view\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵstyleProp(\"width\", ctx.width, \"%\");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.showPercentage);\n }\n },\n dependencies: [i4.NgIf, PercentageViewComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return BarViewComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SafePipe = /*#__PURE__*/(() => {\n class SafePipe {\n sanitizer;\n constructor(sanitizer) {\n this.sanitizer = sanitizer;\n }\n transform(value, type) {\n switch (type) {\n case 'html':\n return this.sanitizer.bypassSecurityTrustHtml(value);\n case 'style':\n return this.sanitizer.bypassSecurityTrustStyle(value);\n case 'script':\n return this.sanitizer.bypassSecurityTrustScript(value);\n case 'url':\n return this.sanitizer.bypassSecurityTrustUrl(value);\n case 'resourceUrl':\n return this.sanitizer.bypassSecurityTrustResourceUrl(value);\n default:\n throw new Error(`Invalid safe type specified: ${type}`);\n }\n }\n static ɵfac = function SafePipe_Factory(t) {\n return new (t || SafePipe)(i0.ɵɵdirectiveInject(i1.DomSanitizer, 16));\n };\n static ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"guiSafe\",\n type: SafePipe,\n pure: true\n });\n }\n return SafePipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TextViewComponent = /*#__PURE__*/(() => {\n class TextViewComponent extends PureComponent {\n value;\n isHtml = false;\n constructor(isBold, isItalic, elementRef) {\n super(elementRef);\n if (isBold !== null) {\n this.addClassToHost('gui-bold');\n }\n if (isItalic !== null) {\n this.addClassToHost('gui-italic');\n }\n }\n ngOnChanges() {\n this.isHtml = this.value.type === CellValueType.HTML;\n }\n getSelectorName() {\n return 'gui-text-view';\n }\n static ɵfac = function TextViewComponent_Factory(t) {\n return new (t || TextViewComponent)(i0.ɵɵinjectAttribute('bold'), i0.ɵɵinjectAttribute('italic'), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TextViewComponent,\n selectors: [[\"gui-view-text\", \"value\", \"\"]],\n inputs: {\n value: \"value\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c8,\n decls: 3,\n vars: 2,\n consts: [[\"text\", \"\"], [4, \"ngIf\", \"ngIfElse\"], [3, \"innerHTML\"]],\n template: function TextViewComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TextViewComponent_ng_container_0_Template, 3, 4, \"ng-container\", 1)(1, TextViewComponent_ng_template_1_Template, 2, 1, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const text_r2 = i0.ɵɵreference(2);\n i0.ɵɵproperty(\"ngIf\", ctx.isHtml)(\"ngIfElse\", text_r2);\n }\n },\n dependencies: [i4.NgIf, SafePipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return TextViewComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet HtmlViewComponent = /*#__PURE__*/(() => {\n class HtmlViewComponent extends PureComponent {\n sanitizer;\n element;\n safeHTML;\n constructor(sanitizer, elRef) {\n super(elRef);\n this.sanitizer = sanitizer;\n this.addClassToHost('gui-h-full');\n this.addClassToHost('gui-w-full');\n }\n ngOnChanges() {\n this.safeHTML = this.sanitizer.bypassSecurityTrustHtml(this.element.value);\n }\n getSelectorName() {\n return 'gui-html-view';\n }\n static ɵfac = function HtmlViewComponent_Factory(t) {\n return new (t || HtmlViewComponent)(i0.ɵɵdirectiveInject(i1.DomSanitizer), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: HtmlViewComponent,\n selectors: [[\"gui-html-view\"]],\n inputs: {\n element: \"element\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n decls: 1,\n vars: 1,\n consts: [[1, \"gui-h-full\", \"gui-flex\", \"gui-items-center\", 3, \"innerHTML\"]],\n template: function HtmlViewComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"innerHTML\", ctx.safeHTML, i0.ɵɵsanitizeHtml);\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return HtmlViewComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ViewTemplatesComponent = /*#__PURE__*/(() => {\n class ViewTemplatesComponent {\n textTemplate;\n numberTemplate;\n chipTemplate;\n linkTemplate;\n imageTemplate;\n checkboxTemplate;\n boldTemplate;\n italicTemplate;\n customTemplate;\n functionTemplate;\n htmlTemplate;\n dateTemplate;\n barTemplate;\n percentageBarTemplate;\n percentageTemplate;\n getTemplate(view) {\n switch (view) {\n case CellView.TEXT:\n return this.textTemplate;\n case CellView.NUMBER:\n return this.numberTemplate;\n case CellView.CHIP:\n return this.chipTemplate;\n case CellView.LINK:\n return this.linkTemplate;\n case CellView.IMAGE:\n return this.imageTemplate;\n case CellView.CHECKBOX:\n return this.checkboxTemplate;\n case CellView.BOLD:\n return this.boldTemplate;\n case CellView.ITALIC:\n return this.italicTemplate;\n case CellView.CUSTOM:\n return this.customTemplate;\n case CellView.FUNCTION:\n return this.functionTemplate;\n case CellView.HTML:\n return this.htmlTemplate;\n case CellView.DATE:\n return this.dateTemplate;\n case CellView.BAR:\n return this.barTemplate;\n case CellView.PERCENTAGE_BAR:\n return this.percentageBarTemplate;\n case CellView.PERCENTAGE:\n return this.percentageTemplate;\n default:\n return this.textTemplate;\n }\n }\n static ɵfac = function ViewTemplatesComponent_Factory(t) {\n return new (t || ViewTemplatesComponent)();\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ViewTemplatesComponent,\n selectors: [[\"ng-component\"]],\n viewQuery: function ViewTemplatesComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c9, 7, TemplateRef);\n i0.ɵɵviewQuery(_c10, 7, TemplateRef);\n i0.ɵɵviewQuery(_c11, 7, TemplateRef);\n i0.ɵɵviewQuery(_c12, 7, TemplateRef);\n i0.ɵɵviewQuery(_c13, 7, TemplateRef);\n i0.ɵɵviewQuery(_c14, 7, TemplateRef);\n i0.ɵɵviewQuery(_c15, 7, TemplateRef);\n i0.ɵɵviewQuery(_c16, 7, TemplateRef);\n i0.ɵɵviewQuery(_c17, 7, TemplateRef);\n i0.ɵɵviewQuery(_c18, 7, TemplateRef);\n i0.ɵɵviewQuery(_c19, 7, TemplateRef);\n i0.ɵɵviewQuery(_c20, 7, TemplateRef);\n i0.ɵɵviewQuery(_c21, 7, TemplateRef);\n i0.ɵɵviewQuery(_c22, 7, TemplateRef);\n i0.ɵɵviewQuery(_c23, 7, TemplateRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.textTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.numberTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.chipTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.linkTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.imageTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.checkboxTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.boldTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.italicTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.customTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.functionTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.htmlTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dateTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.barTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.percentageBarTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.percentageTemplate = _t.first);\n }\n },\n decls: 30,\n vars: 0,\n consts: [[\"text\", \"\"], [\"number\", \"\"], [\"chip\", \"\"], [\"link\", \"\"], [\"image\", \"\"], [\"checkbox\", \"\"], [\"bold\", \"\"], [\"italic\", \"\"], [\"custom\", \"\"], [\"function\", \"\"], [\"html\", \"\"], [\"date\", \"\"], [\"bar\", \"\"], [\"percentageBar\", \"\"], [\"percentage\", \"\"], [3, \"value\"], [1, \"gui-cell-number\"], [\"gui-button\", \"\", \"link\", \"true\", 3, \"href\"], [3, \"src\"], [1, \"gui-cell-boolean\"], [3, \"checked\", \"disabled\"], [\"bold\", \"\", 3, \"value\"], [\"italic\", \"\", 3, \"value\"], [3, \"element\"], [1, \"gui-view-text\"], [3, \"value\", \"showPercentage\"]],\n template: function ViewTemplatesComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, ViewTemplatesComponent_ng_template_0_Template, 1, 1, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor)(2, ViewTemplatesComponent_ng_template_2_Template, 2, 1, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor)(4, ViewTemplatesComponent_ng_template_4_Template, 2, 1, \"ng-template\", null, 2, i0.ɵɵtemplateRefExtractor)(6, ViewTemplatesComponent_ng_template_6_Template, 2, 2, \"ng-template\", null, 3, i0.ɵɵtemplateRefExtractor)(8, ViewTemplatesComponent_ng_template_8_Template, 1, 1, \"ng-template\", null, 4, i0.ɵɵtemplateRefExtractor)(10, ViewTemplatesComponent_ng_template_10_Template, 2, 2, \"ng-template\", null, 5, i0.ɵɵtemplateRefExtractor)(12, ViewTemplatesComponent_ng_template_12_Template, 1, 1, \"ng-template\", null, 6, i0.ɵɵtemplateRefExtractor)(14, ViewTemplatesComponent_ng_template_14_Template, 1, 1, \"ng-template\", null, 7, i0.ɵɵtemplateRefExtractor)(16, ViewTemplatesComponent_ng_template_16_Template, 1, 1, \"ng-template\", null, 8, i0.ɵɵtemplateRefExtractor)(18, ViewTemplatesComponent_ng_template_18_Template, 1, 1, \"ng-template\", null, 9, i0.ɵɵtemplateRefExtractor)(20, ViewTemplatesComponent_ng_template_20_Template, 1, 1, \"ng-template\", null, 10, i0.ɵɵtemplateRefExtractor)(22, ViewTemplatesComponent_ng_template_22_Template, 3, 4, \"ng-template\", null, 11, i0.ɵɵtemplateRefExtractor)(24, ViewTemplatesComponent_ng_template_24_Template, 1, 2, \"ng-template\", null, 12, i0.ɵɵtemplateRefExtractor)(26, ViewTemplatesComponent_ng_template_26_Template, 1, 2, \"ng-template\", null, 13, i0.ɵɵtemplateRefExtractor)(28, ViewTemplatesComponent_ng_template_28_Template, 1, 1, \"ng-template\", null, 14, i0.ɵɵtemplateRefExtractor);\n }\n },\n dependencies: [i1$1.FabricChipComponent, i1$1.FabricCheckboxComponent, i1$1.FabricButtonComponent, FunctionViewComponent, BarViewComponent, PercentageViewComponent, TextViewComponent, HtmlViewComponent, i4.DatePipe],\n encapsulation: 2\n });\n }\n return ViewTemplatesComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass TemplateFactory {\n templatesComponentDefinition;\n componentFactoryResolver;\n templates = new Map();\n templatesComponent = null;\n constructor(templatesComponentDefinition, componentFactoryResolver) {\n this.templatesComponentDefinition = templatesComponentDefinition;\n this.componentFactoryResolver = componentFactoryResolver;\n this.createTemplatesComponent();\n }\n getTemplates() {\n return this.templates;\n }\n destroy() {\n if (this.templatesComponent) {\n this.templatesComponent.destroy();\n this.templatesComponent = null;\n }\n }\n createTemplatesComponent() {\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.templatesComponentDefinition);\n const injector = Injector.create({\n providers: []\n });\n this.templatesComponent = componentFactory.create(injector);\n this.generateMap();\n }\n generateMap() {\n this.generateMapKeys().forEach(type => {\n this.findAndSetTemplate(type);\n });\n }\n findAndSetTemplate(dt) {\n const template = this.templatesComponent.instance.getTemplate(dt);\n this.templates.set(dt, template);\n }\n}\nlet ViewTemplateFactory = /*#__PURE__*/(() => {\n class ViewTemplateFactory extends TemplateFactory {\n constructor(componentFactoryResolver) {\n super(ViewTemplatesComponent, componentFactoryResolver);\n }\n static services = [ComponentFactoryResolver];\n generateMapKeys() {\n return Object.keys(CellView).map(key => CellView[key]);\n }\n static ɵfac = function ViewTemplateFactory_Factory(t) {\n return new (t || ViewTemplateFactory)(i0.ɵɵinject(i0.ComponentFactoryResolver));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ViewTemplateFactory,\n factory: ViewTemplateFactory.ɵfac\n });\n }\n return ViewTemplateFactory;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ViewTemplateRepository = /*#__PURE__*/(() => {\n class ViewTemplateRepository {\n columnTemplateFactory;\n constructor(columnTemplateFactory) {\n this.columnTemplateFactory = columnTemplateFactory;\n }\n static services = [ViewTemplateFactory];\n findTemplate(view) {\n const typeToTemplate = this.columnTemplateFactory.getTemplates();\n return typeToTemplate.get(view);\n }\n static ɵfac = function ViewTemplateRepository_Factory(t) {\n return new (t || ViewTemplateRepository)(i0.ɵɵinject(ViewTemplateFactory));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ViewTemplateRepository,\n factory: ViewTemplateRepository.ɵfac\n });\n }\n return ViewTemplateRepository;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar EditEventType = /*#__PURE__*/function (EditEventType) {\n EditEventType[EditEventType[\"SUBMIT\"] = 0] = \"SUBMIT\";\n EditEventType[EditEventType[\"BLUR\"] = 1] = \"BLUR\";\n EditEventType[EditEventType[\"CANCEL\"] = 2] = \"CANCEL\";\n return EditEventType;\n}(EditEventType || {});\nlet EditCommunicationComponent = /*#__PURE__*/(() => {\n class EditCommunicationComponent extends SmartComponent {\n value;\n valueChanges;\n status;\n focus;\n parent;\n ENTER_KEY_CODE = 13;\n ESC_KEY_CODE = 27;\n constructor(changeDetectorRef, elementRef) {\n super(changeDetectorRef, elementRef);\n }\n submit() {\n this.emitStatus(EditEventType.SUBMIT);\n }\n cancel() {\n this.emitStatus(EditEventType.CANCEL);\n }\n emitStatus(status) {\n if (this.status) {\n this.status.emit(status);\n }\n }\n static ɵfac = function EditCommunicationComponent_Factory(t) {\n return new (t || EditCommunicationComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: EditCommunicationComponent,\n inputs: {\n value: \"value\",\n valueChanges: \"valueChanges\",\n status: \"status\",\n focus: \"focus\",\n parent: \"parent\"\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n return EditCommunicationComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet InputEditTemplateComponent = /*#__PURE__*/(() => {\n class InputEditTemplateComponent extends EditCommunicationComponent {\n formBuilder;\n inputRef;\n filterForm;\n filterFieldName = 'phrase';\n constructor(changeDetectorRef, elementRef, formBuilder) {\n super(changeDetectorRef, elementRef);\n this.formBuilder = formBuilder;\n this.filterForm = this.formBuilder.group({\n [this.filterFieldName]: ['']\n });\n }\n ngOnChanges(changes) {\n if (changes.value !== undefined) {\n this.filterForm.get(this.filterFieldName).setValue(this.value);\n }\n }\n ngOnInit() {\n this.observeChanges();\n }\n ngAfterViewInit() {\n const inputElement = this.inputRef.nativeElement;\n this.focusField(inputElement);\n this.emitValueChange(inputElement.value);\n hermesFromEvent(inputElement, 'blur').pipe(this.takeUntil()).subscribe(() => {\n this.unsubscribe();\n this.submit();\n });\n const keyup$ = hermesFromEvent(inputElement, 'keyup');\n keyup$.pipe(hermesFilter(e => e.keyCode === this.ENTER_KEY_CODE), this.takeUntil()).subscribe(() => {\n this.unsubscribe();\n this.submit();\n });\n keyup$.pipe(hermesFilter(e => e.keyCode === this.ESC_KEY_CODE), this.takeUntil()).subscribe(() => {\n this.unsubscribe();\n this.cancel();\n });\n }\n focusField(inputElement) {\n if (this.focus) {\n inputElement.focus();\n }\n }\n observeChanges() {\n fromRxJsObservable(\n // @ts-ignore\n this.filterForm.controls[this.filterFieldName].valueChanges).pipe(this.takeUntil()).subscribe(value => {\n this.emitValueChange(value);\n });\n }\n emitValueChange(value) {\n if (this.valueChanges) {\n this.valueChanges.emit(value);\n }\n }\n static ɵfac = function InputEditTemplateComponent_Factory(t) {\n return new (t || InputEditTemplateComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$2.FormBuilder));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: InputEditTemplateComponent,\n viewQuery: function InputEditTemplateComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c24, 7);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputRef = _t.first);\n }\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return InputEditTemplateComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StringEditTemplateComponent = /*#__PURE__*/(() => {\n class StringEditTemplateComponent extends InputEditTemplateComponent {\n constructor(changeDetectorRef, elementRef, fb) {\n super(changeDetectorRef, elementRef, fb);\n }\n focusField(inputElement) {\n if (this.focus) {\n inputElement.focus();\n inputElement.setSelectionRange(0, inputElement.value.length);\n }\n }\n getSelectorName() {\n return 'gui-string-edit';\n }\n static ɵfac = function StringEditTemplateComponent_Factory(t) {\n return new (t || StringEditTemplateComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$2.FormBuilder));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StringEditTemplateComponent,\n selectors: [[\"gui-string-edit\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 3,\n vars: 2,\n consts: [[\"input\", \"\"], [3, \"formGroup\"], [\"type\", \"type\", 1, \"gui-input\", 3, \"formControlName\"]],\n template: function StringEditTemplateComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"form\", 1);\n i0.ɵɵelement(1, \"input\", 2, 0);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"formGroup\", ctx.filterForm);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"formControlName\", ctx.filterFieldName);\n }\n },\n dependencies: [i1$2.ɵNgNoValidate, i1$2.DefaultValueAccessor, i1$2.NgControlStatus, i1$2.NgControlStatusGroup, i1$2.FormGroupDirective, i1$2.FormControlName],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StringEditTemplateComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet NumberEditTemplateComponent = /*#__PURE__*/(() => {\n class NumberEditTemplateComponent extends InputEditTemplateComponent {\n constructor(changeDetectorRef, elementRef, fb) {\n super(changeDetectorRef, elementRef, fb);\n }\n getSelectorName() {\n return 'gui-number-edit';\n }\n static ɵfac = function NumberEditTemplateComponent_Factory(t) {\n return new (t || NumberEditTemplateComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$2.FormBuilder));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: NumberEditTemplateComponent,\n selectors: [[\"gui-number-edit\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 3,\n vars: 2,\n consts: [[\"input\", \"\"], [3, \"formGroup\"], [\"type\", \"number\", 1, \"gui-input\", 3, \"formControlName\"]],\n template: function NumberEditTemplateComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"form\", 1);\n i0.ɵɵelement(1, \"input\", 2, 0);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"formGroup\", ctx.filterForm);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"formControlName\", ctx.filterFieldName);\n }\n },\n dependencies: [i1$2.ɵNgNoValidate, i1$2.DefaultValueAccessor, i1$2.NumberValueAccessor, i1$2.NgControlStatus, i1$2.NgControlStatusGroup, i1$2.FormGroupDirective, i1$2.FormControlName],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return NumberEditTemplateComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet BooleanEditTemplateComponent = /*#__PURE__*/(() => {\n class BooleanEditTemplateComponent extends EditCommunicationComponent {\n changeDetectorRef;\n checkboxRef;\n filterFieldName = 'booleanEdit';\n constructor(changeDetectorRef, elementRef) {\n super(changeDetectorRef, elementRef);\n this.changeDetectorRef = changeDetectorRef;\n }\n toggle(changed) {\n this.valueChanges.emit(changed);\n this.submit();\n }\n getSelectorName() {\n return 'gui-boolean-edit';\n }\n static ɵfac = function BooleanEditTemplateComponent_Factory(t) {\n return new (t || BooleanEditTemplateComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: BooleanEditTemplateComponent,\n selectors: [[\"gui-boolean-edit\"]],\n viewQuery: function BooleanEditTemplateComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c14, 7, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.checkboxRef = _t.first);\n }\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 3,\n vars: 2,\n consts: [[\"checkbox\", \"\"], [1, \"gui-cell-boolean\"], [3, \"changed\", \"checked\", \"name\"]],\n template: function BooleanEditTemplateComponent_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"span\", 1)(1, \"gui-checkbox\", 2, 0);\n i0.ɵɵlistener(\"changed\", function BooleanEditTemplateComponent_Template_gui_checkbox_changed_1_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.toggle($event));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"checked\", ctx.value)(\"name\", ctx.filterFieldName);\n }\n },\n dependencies: [i1$1.FabricCheckboxComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return BooleanEditTemplateComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet DateEditTemplateComponent = /*#__PURE__*/(() => {\n class DateEditTemplateComponent extends EditCommunicationComponent {\n changeDetectorRef;\n datePickerRef;\n filterFieldName = 'dateEdit';\n opened = false;\n localStreamCloser = new StreamCloser();\n constructor(changeDetectorRef, elementRef) {\n super(changeDetectorRef, elementRef);\n this.changeDetectorRef = changeDetectorRef;\n }\n ngAfterViewInit() {\n const inputElement = this.datePickerRef.nativeElement.querySelector('.gui-date-picker-input');\n const keyup$ = hermesFromEvent(inputElement, 'keyup');\n keyup$.pipe(hermesFilter(e => e.keyCode === this.ENTER_KEY_CODE), this.localStreamCloser.takeUntil()).subscribe(() => {\n this.localStreamCloser.unsubscribe();\n this.submit();\n });\n keyup$.pipe(hermesFilter(e => e.keyCode === this.ESC_KEY_CODE), this.localStreamCloser.takeUntil()).subscribe(() => {\n this.localStreamCloser.unsubscribe();\n this.cancel();\n });\n }\n ngOnDestroy() {\n this.localStreamCloser.unsubscribe();\n super.ngOnDestroy();\n }\n toggle(changed) {\n this.valueChanges.emit(changed);\n }\n dialogOpened(opened) {\n this.opened = opened;\n if (!opened) {\n this.localStreamCloser.unsubscribe();\n this.submit();\n }\n }\n getSelectorName() {\n return 'gui-date-edit';\n }\n static ɵfac = function DateEditTemplateComponent_Factory(t) {\n return new (t || DateEditTemplateComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: DateEditTemplateComponent,\n selectors: [[\"gui-date-edit\"]],\n viewQuery: function DateEditTemplateComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c25, 7, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.datePickerRef = _t.first);\n }\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 2,\n vars: 5,\n consts: [[\"datepicker\", \"\"], [3, \"dialogOpened\", \"dateSelected\", \"selectDate\", \"name\", \"openDialog\", \"onlyDialog\", \"parentElement\"]],\n template: function DateEditTemplateComponent_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"gui-date-picker\", 1, 0);\n i0.ɵɵlistener(\"dialogOpened\", function DateEditTemplateComponent_Template_gui_date_picker_dialogOpened_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.dialogOpened($event));\n })(\"dateSelected\", function DateEditTemplateComponent_Template_gui_date_picker_dateSelected_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.toggle($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"selectDate\", ctx.value)(\"name\", ctx.filterFieldName)(\"openDialog\", true)(\"onlyDialog\", false)(\"parentElement\", ctx.parent);\n }\n },\n dependencies: [i1$1.FabricDatePickerComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return DateEditTemplateComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet EditTemplatesComponent = /*#__PURE__*/(() => {\n class EditTemplatesComponent {\n stringTemplate;\n numberTemplate;\n booleanTemplate;\n dateTemplate;\n emptyTemplate;\n getTemplate(dataType) {\n switch (dataType) {\n case DataType.STRING:\n return this.stringTemplate;\n case DataType.NUMBER:\n return this.numberTemplate;\n case DataType.BOOLEAN:\n return this.booleanTemplate;\n case DataType.DATE:\n return this.dateTemplate;\n default:\n return this.emptyTemplate;\n }\n }\n static ɵfac = function EditTemplatesComponent_Factory(t) {\n return new (t || EditTemplatesComponent)();\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: EditTemplatesComponent,\n selectors: [[\"ng-component\"]],\n viewQuery: function EditTemplatesComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c26, 7, TemplateRef);\n i0.ɵɵviewQuery(_c10, 7, TemplateRef);\n i0.ɵɵviewQuery(_c27, 7, TemplateRef);\n i0.ɵɵviewQuery(_c20, 7, TemplateRef);\n i0.ɵɵviewQuery(_c28, 7, TemplateRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.stringTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.numberTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.booleanTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dateTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.emptyTemplate = _t.first);\n }\n },\n decls: 10,\n vars: 0,\n consts: [[\"string\", \"\"], [\"number\", \"\"], [\"boolean\", \"\"], [\"date\", \"\"], [\"empty\", \"\"], [3, \"valueChanges\", \"value\", \"status\", \"focus\"], [3, \"valueChanges\", \"value\", \"status\", \"focus\", \"parent\"]],\n template: function EditTemplatesComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, EditTemplatesComponent_ng_template_0_Template, 1, 4, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor)(2, EditTemplatesComponent_ng_template_2_Template, 1, 4, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor)(4, EditTemplatesComponent_ng_template_4_Template, 1, 4, \"ng-template\", null, 2, i0.ɵɵtemplateRefExtractor)(6, EditTemplatesComponent_ng_template_6_Template, 1, 5, \"ng-template\", null, 3, i0.ɵɵtemplateRefExtractor)(8, EditTemplatesComponent_ng_template_8_Template, 0, 0, \"ng-template\", null, 4, i0.ɵɵtemplateRefExtractor);\n }\n },\n dependencies: [StringEditTemplateComponent, NumberEditTemplateComponent, BooleanEditTemplateComponent, DateEditTemplateComponent],\n encapsulation: 2\n });\n }\n return EditTemplatesComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet EditTemplateFactory = /*#__PURE__*/(() => {\n class EditTemplateFactory extends TemplateFactory {\n constructor(componentFactoryResolver) {\n super(EditTemplatesComponent, componentFactoryResolver);\n }\n static services = [ComponentFactoryResolver];\n generateMapKeys() {\n return Object.keys(DataType).map(key => DataType[key]);\n }\n static ɵfac = function EditTemplateFactory_Factory(t) {\n return new (t || EditTemplateFactory)(i0.ɵɵinject(i0.ComponentFactoryResolver));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: EditTemplateFactory,\n factory: EditTemplateFactory.ɵfac\n });\n }\n return EditTemplateFactory;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet EditTemplateRepository = /*#__PURE__*/(() => {\n class EditTemplateRepository {\n editTemplateFactory;\n constructor(editTemplateFactory) {\n this.editTemplateFactory = editTemplateFactory;\n }\n static services = [EditTemplateFactory];\n findTemplate(dataType) {\n const typeToTemplate = this.editTemplateFactory.getTemplates();\n return typeToTemplate.get(dataType);\n }\n static ɵfac = function EditTemplateRepository_Factory(t) {\n return new (t || EditTemplateRepository)(i0.ɵɵinject(EditTemplateFactory));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: EditTemplateRepository,\n factory: EditTemplateRepository.ɵfac\n });\n }\n return EditTemplateRepository;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass GroupCollection {\n groups;\n showGroups;\n constructor(groups, showGroups) {\n this.groups = groups;\n this.showGroups = showGroups;\n }\n getGroups() {\n return this.groups;\n }\n isVisible() {\n return this.showGroups;\n }\n}\nclass CompositionGroupArchive extends AggregateArchive {\n static default = new GroupCollection([], false);\n constructor() {\n super(CompositionGroupArchive.default);\n }\n}\nlet CompositionDomainPublisher = /*#__PURE__*/(() => {\n class CompositionDomainPublisher extends CompositionPublisher {\n compositionDispatcher;\n compositionGroupRepository;\n columnHighlightArchive;\n constructor(compositionDispatcher, compositionGroupRepository, columnHighlightArchive) {\n super();\n this.compositionDispatcher = compositionDispatcher;\n this.compositionGroupRepository = compositionGroupRepository;\n this.columnHighlightArchive = columnHighlightArchive;\n }\n static services = [CompositionDispatcher, CompositionGroupArchive, ColumnHighlightArchive];\n create(compositionId) {\n this.compositionDispatcher.create(compositionId);\n }\n setColumns(params, compositionId) {\n this.compositionDispatcher.setColumns(compositionId, params);\n }\n setGroups(configs, compositionId) {\n // this.compositionGroupRepository.next(compositionId, CompositionGroupRepository.default);\n this.compositionDispatcher.setGroups(compositionId, configs);\n }\n setWidth(width, compositionId) {\n this.compositionDispatcher.setWidth(compositionId, width);\n }\n setContainerWidth(width, compositionId) {\n this.compositionDispatcher.setContainerWidth(compositionId, width);\n }\n setResizeWidth(enabled, compositionId) {\n this.compositionDispatcher.setResizeWidth(compositionId, enabled);\n }\n enableColumn(columnDefinitionId, compositionId) {\n this.compositionDispatcher.setColumnEnabled(compositionId, this.toColumnId(columnDefinitionId), true);\n }\n disableColumn(columnDefinitionId, compositionId) {\n this.compositionDispatcher.setColumnEnabled(compositionId, this.toColumnId(columnDefinitionId), false);\n }\n moveLeft(columnDefinitionId, compositionId) {\n this.compositionDispatcher.moveLeft(compositionId, this.toColumnId(columnDefinitionId));\n }\n moveRight(columnDefinitionId, compositionId) {\n this.compositionDispatcher.moveRight(compositionId, this.toColumnId(columnDefinitionId));\n }\n highlightColumn(columnDefinitionId, compositionId) {\n this.columnHighlightArchive.toggle(compositionId, new ColumnId(columnDefinitionId.getId()));\n }\n toColumnId(defId) {\n return new ColumnId(defId.getId());\n }\n }\n return CompositionDomainPublisher;\n})();\nlet CompositionDomainWarehouse = /*#__PURE__*/(() => {\n class CompositionDomainWarehouse extends CompositionWarehouse {\n compositionRepository;\n compositionGroupArchive;\n columnHighlightArchive;\n constructor(compositionRepository, compositionGroupArchive, columnHighlightArchive) {\n super();\n this.compositionRepository = compositionRepository;\n this.compositionGroupArchive = compositionGroupArchive;\n this.columnHighlightArchive = columnHighlightArchive;\n }\n static services = [CompositionReadModelRootRepository, CompositionGroupArchive, ColumnHighlightArchive];\n onWidth(compositionId) {\n return this.compositionRepository.on(compositionId).pipe(hermesMap(composition => composition.getWidth()));\n }\n onContainerWidth(compositionId) {\n return this.compositionRepository.on(compositionId).pipe(hermesMap(composition => composition.getContainerWidth()));\n }\n onWidthForEachColumn(compositionId) {\n return this.compositionRepository.on(compositionId).pipe(hermesMap(composition => composition.getAllColumns().map(c => c.width)));\n }\n onHeaderColumns(compositionId) {\n return this.compositionRepository.on(compositionId).pipe(hermesMap(composition => composition.getActiveHeaderColumns()));\n }\n onAllColumns(compositionId) {\n return this.compositionRepository.on(compositionId).pipe(hermesMap(composition => composition.getHeaderColumns()));\n }\n onSortOrder(fieldId, compositionId) {\n return this.compositionRepository.on(compositionId).pipe(hermesMap(composition => composition.getActiveHeaderColumns()), hermesMap(columns => {\n return columns.filter(c => c.getFieldId().equals(fieldId));\n }), hermesFilter(columns => {\n return columns.length > 0;\n }), hermesMap(columns => columns[0].getSortStatus()));\n }\n onTemplateColumns(compositionId) {\n return this.compositionRepository.on(compositionId).pipe(hermesMap(composition => composition.getTemplateColumns()));\n }\n onResizeWidth(compositionId) {\n return this.compositionRepository.on(compositionId).pipe(hermesMap(composition => composition.isResizeWidthEnabled()));\n }\n onGroups(compositionId) {\n return this.compositionGroupArchive.on(compositionId);\n }\n onHighlightedColumn(columnId, compositionId) {\n return this.columnHighlightArchive.on(compositionId).pipe(hermesMap(manager => manager.isHighlighted(columnId)));\n }\n findColumnNames(compositionId) {\n let names = [];\n this.compositionRepository.find(compositionId).ifPresent(value => {\n names = value.getAllColumns().map(cd => cd.getName());\n });\n return names;\n }\n }\n return CompositionDomainWarehouse;\n})();\nclass CompositionDomainEventRepository extends CompositionEventRepository {\n constructor() {\n super();\n }\n onColumnsChanged(compositionId) {\n return this.onEvent(compositionId, CompositionColumnsSetEvent);\n }\n onContainerWidthChanged(compositionId) {\n return this.onEvent(compositionId, CompositionContainerWidthSetEvent).pipe(hermesMap(event => {\n return event.getPayload();\n }), hermesFilter(width => !!width));\n }\n}\nclass DomainColumnAutoConfigurator extends ColumnAutoConfigurator {\n configure(source) {\n if (source !== undefined && source !== null && Array.isArray(source) && source.length === 0) {\n return [];\n }\n const rawItem = source[0];\n return Object.keys(rawItem).map((key, index) => {\n return this.toColumnConfig(key, rawItem);\n });\n }\n toColumnConfig(key, rawItem) {\n return {\n field: this.getField(key),\n header: this.getHeader(key),\n type: this.getType(key, rawItem)\n };\n }\n getField(key) {\n return key;\n }\n getHeader(key) {\n return key[0].toUpperCase() + key.slice(1);\n }\n getType(key, rawItem) {\n if (typeof rawItem[key] === 'string') {\n return DataType.STRING;\n } else if (typeof rawItem[key] === 'number') {\n return DataType.NUMBER;\n } else if (rawItem[key] instanceof Date) {\n return DataType.DATE;\n } else if (typeof rawItem[key] === 'boolean') {\n return DataType.BOOLEAN;\n } else {\n return DataType.UNKNOWN;\n }\n }\n}\nclass CompositionApiModule {\n registerProviders(container) {\n container.provide(InMemoryCompositionReadStore);\n container.provide(CompositionReadModelRootRepository, InMemoryCompositionRepository);\n container.provide(ColumnDefinitionFactory);\n container.provide(ViewTemplateRepository);\n container.provide(ViewTemplateFactory);\n container.provide(EditTemplateFactory);\n container.provide(EditTemplateRepository);\n container.provide(InMemoryCompositionStore);\n container.provide(CompositionReadModelRootConverter);\n container.provide(CompositionGroupArchive);\n container.provide(CompositionPublisher, CompositionDomainPublisher);\n container.provide(CompositionWarehouse, CompositionDomainWarehouse);\n container.provide(CompositionEventRepository, CompositionDomainEventRepository);\n container.provide(ColumnAutoConfigurator, DomainColumnAutoConfigurator);\n }\n}\nfunction initializeComposition() {\n new DomainInitializer(new CompositionApiModule(), new CompositionDomainModule()).init();\n}\nlet CompositionTemplateWarehouse = /*#__PURE__*/(() => {\n class CompositionTemplateWarehouse {\n compositionWarehouse;\n viewTemplateRepository;\n editTemplateRepository;\n constructor(compositionWarehouse, viewTemplateRepository, editTemplateRepository) {\n this.compositionWarehouse = compositionWarehouse;\n this.viewTemplateRepository = viewTemplateRepository;\n this.editTemplateRepository = editTemplateRepository;\n }\n onHeaderCols(compositionId) {\n return this.compositionWarehouse.onHeaderColumns(compositionId).pipe(hermesMap(arr => {\n return arr.map(context => {\n let headerTemplate;\n if (typeof context.getHeader() === 'function') {\n headerTemplate = this.findViewTemplate(CellView.FUNCTION);\n } else {\n headerTemplate = this.findViewTemplate(CellView.HTML);\n }\n const editTemplate = this.findEditTemplate(context.getDataType());\n return new CompositionTemplateModel(headerTemplate, editTemplate, context);\n });\n }));\n }\n onAll(compositionId) {\n return this.compositionWarehouse.onAllColumns(compositionId).pipe(hermesMap(arr => {\n return arr.map(context => {\n let headerTemplate;\n if (typeof context.getHeader() === 'function') {\n headerTemplate = this.findViewTemplate(CellView.FUNCTION);\n } else {\n headerTemplate = this.findViewTemplate(CellView.HTML);\n }\n const editTemplate = this.findEditTemplate(context.getDataType());\n return new CompositionTemplateModel(headerTemplate, editTemplate, context);\n });\n }));\n }\n // CellTemplateWithAccessor\n onTemplateCols(compositionId) {\n return this.compositionWarehouse.onTemplateColumns(compositionId).pipe(hermesMap(arr => {\n return arr.map(context => {\n let cellTemplate;\n if (context.getCellView() === CellView.NG_TEMPLATE) {\n cellTemplate = context.getColumnConfig().templateRef;\n } else {\n cellTemplate = this.findViewTemplate(context.getCellView());\n }\n const editTemplate = this.findEditTemplate(context.getDataType());\n return new CompositionAccessorModel(cellTemplate, editTemplate, context);\n });\n }));\n }\n findViewTemplate(view) {\n if (view === CellView.FUNCTION) {\n return this.viewTemplateRepository.findTemplate(CellView.FUNCTION);\n } else {\n return this.viewTemplateRepository.findTemplate(view);\n }\n }\n findEditTemplate(dataType) {\n return this.editTemplateRepository.findTemplate(dataType);\n }\n static ɵfac = function CompositionTemplateWarehouse_Factory(t) {\n return new (t || CompositionTemplateWarehouse)(i0.ɵɵinject(CompositionWarehouse), i0.ɵɵinject(ViewTemplateRepository), i0.ɵɵinject(EditTemplateRepository));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: CompositionTemplateWarehouse,\n factory: CompositionTemplateWarehouse.ɵfac\n });\n }\n return CompositionTemplateWarehouse;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass SummariesEventRepository extends EventRepository {\n constructor() {\n super();\n }\n}\nlet StructureSummariesPanelComponent = /*#__PURE__*/(() => {\n class StructureSummariesPanelComponent extends SmartComponent {\n structureSummariesEventRepository;\n translationService;\n sourceWarehouse;\n enabled;\n state = inject(GuiState);\n compositionId = inject(CompositionId);\n structureId = inject(StructureId);\n formationWarehouse = inject(FormationWarehouse);\n compositionTemplateWarehouse = inject(CompositionTemplateWarehouse);\n headerColumns$ = this.compositionTemplateWarehouse.onHeaderCols(this.compositionId);\n state$ = this.state.select();\n checkboxSelection$ = this.selectCheckboxSelection();\n constructor(changeDetectorRef, elementRef, structureSummariesEventRepository, translationService, sourceWarehouse) {\n super(changeDetectorRef, elementRef);\n this.structureSummariesEventRepository = structureSummariesEventRepository;\n this.translationService = translationService;\n this.sourceWarehouse = sourceWarehouse;\n this.addClassToHost('gui-flex');\n this.state.connect('summariesTranslations', this.selectSummariesTranslations());\n this.state.connect('sourceEmpty', this.selectSourceEmpty());\n this.state.connect('summaries', this.selectSummaries());\n }\n isSummariesTypePresent(summaries) {\n return summaries !== undefined && summaries !== null;\n }\n getSelectorName() {\n return 'gui-structure-summaries-panel';\n }\n selectCheckboxSelection() {\n return this.formationWarehouse.onType(this.structureId).pipe(hermesMap(type => {\n return type === RowSelectionType.CHECKBOX;\n }));\n }\n selectSourceEmpty() {\n return this.sourceWarehouse.onItemsSize(this.structureId).pipe(hermesMap(size => {\n return size === 0;\n }));\n }\n selectSummariesTranslations() {\n return this.translationService.onTranslation().pipe(hermesMap(translation => {\n return new SummariesTranslations(translation.summariesDistinctValuesTooltip, translation.summariesAverageTooltip, translation.summariesMinTooltip, translation.summariesMaxTooltip, translation.summariesMedTooltip, translation.summariesCountTooltip);\n }));\n }\n selectSummaries() {\n return this.structureSummariesEventRepository.onSummariesChanged(this.structureId.toReadModelRootId()).pipe(hermesMap(event => {\n return event.getSummaries();\n }));\n }\n static ɵfac = function StructureSummariesPanelComponent_Factory(t) {\n return new (t || StructureSummariesPanelComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(SummariesEventRepository), i0.ɵɵdirectiveInject(TranslationFacade), i0.ɵɵdirectiveInject(SourceWarehouse));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureSummariesPanelComponent,\n selectors: [[\"div\", \"gui-structure-summaries-panel\", \"\", \"enabled\", \"\"]],\n inputs: {\n enabled: \"enabled\"\n },\n features: [i0.ɵɵProvidersFeature([GuiState]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c29,\n decls: 1,\n vars: 1,\n consts: [[4, \"guiLet\"], [4, \"ngIf\"], [\"class\", \"gui-structure-summaries-cell gui-row-checkbox gui-flex gui-justify-between\\n\\t gui-overflow-hidden gui-relative gui-py-0 gui-px-6 gui-box-border\\n\\t gui-leading-4 gui-whitespace-nowrap gui-overflow-ellipsis\", 4, \"ngIf\"], [\"class\", \"gui-structure-summaries-cell\", 3, \"width\", 4, \"ngFor\", \"ngForOf\"], [1, \"gui-structure-summaries-cell\", \"gui-row-checkbox\", \"gui-flex\", \"gui-justify-between\", \"gui-overflow-hidden\", \"gui-relative\", \"gui-py-0\", \"gui-px-6\", \"gui-box-border\", \"gui-leading-4\", \"gui-whitespace-nowrap\", \"gui-overflow-ellipsis\"], [1, \"gui-structure-summaries-cell\"], [\"class\", \"gui-structure-summaries-value\", 4, \"ngIf\"], [1, \"gui-structure-summaries-value\"], [3, \"gui-tooltip\"], [1, \"gui-summaries-value\"]],\n template: function StructureSummariesPanelComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, StructureSummariesPanelComponent_ng_container_0_Template, 2, 1, \"ng-container\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiLet\", ctx.state$);\n }\n },\n dependencies: [i4.NgForOf, i4.NgIf, i1$1.FabricTooltipDirective, GuiLetDirective, TranslationPipe, GuiPushPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureSummariesPanelComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureInfoModalComponent = /*#__PURE__*/(() => {\n class StructureInfoModalComponent extends StaticComponent {\n constructor(elementRef, changeDetectorRef) {\n super(elementRef, changeDetectorRef);\n }\n getSelectorName() {\n return 'gui-info-dialog';\n }\n static ɵfac = function StructureInfoModalComponent_Factory(t) {\n return new (t || StructureInfoModalComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureInfoModalComponent,\n selectors: [[\"div\", \"gui-info-dialog\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c30,\n decls: 31,\n vars: 0,\n consts: [[1, \"gui-structure-info-modal\", \"gui-flex\", \"gui-flex-col\", \"gui-p-0\", \"gui-text-lg\", \"gui-w-full\"], [1, \"gui-text-3xl\", \"gui-mb-8\", \"gui-font-bold\"], [1, \"gui-text-xl\", \"gui-mb-18\", \"gui-font-bold\"], [1, \"gui-quote\", \"gui-text-2xl\", \"gui-italic\", \"gui-font-light\"], [1, \"gui-m-0\", \"gui-px-0\", \"gui-pt-10\", \"gui-pb-6\"], [1, \"gui-font-bold\"], [1, \"gui-m-0\", \"gui-pl-9\", \"gui-list-none\"], [\"href\", \"https://generic-ui.com/\", 1, \"gui-mb-6\", \"gui-no-underline\", \"gui-leading-6\"], [\"href\", \"https://generic-ui.com/guide/\", 1, \"gui-mb-6\", \"gui-no-underline\", \"gui-leading-6\"], [\"href\", \"https://github.com/generic-ui/generic-ui/tree/master/ngx-grid\", 1, \"gui-mb-6\", \"gui-no-underline\", \"gui-leading-6\"], [\"href\", \"https://github.com/generic-ui/generic-ui/issues\", 1, \"gui-mb-6\", \"gui-no-underline\", \"gui-leading-6\"]],\n template: function StructureInfoModalComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0)(1, \"p\", 1);\n i0.ɵɵtext(2, \" Generic UI Grid \");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"p\", 2);\n i0.ɵɵtext(4, \" ver. 0.21.0 \");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(5, \"p\", 3);\n i0.ɵɵtext(6, \" \\\"The best way to success is to help others succeed.\\\" \");\n i0.ɵɵelementEnd();\n i0.ɵɵelement(7, \"br\");\n i0.ɵɵelementStart(8, \"section\", 4)(9, \"p\", 5);\n i0.ɵɵtext(10, \"Links:\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(11, \"ul\", 6)(12, \"li\")(13, \"a\", 7);\n i0.ɵɵtext(14, \"Website\");\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(15, \"li\")(16, \"a\", 8);\n i0.ɵɵtext(17, \"Documentation\");\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(18, \"li\")(19, \"a\", 9);\n i0.ɵɵtext(20, \"Github\");\n i0.ɵɵelementEnd()()();\n i0.ɵɵelement(21, \"br\");\n i0.ɵɵelementStart(22, \"p\", 5);\n i0.ɵɵtext(23, \"Feedback:\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(24, \"ul\", 6)(25, \"li\")(26, \"a\", 10);\n i0.ɵɵtext(27, \"Report a bug\");\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(28, \"li\")(29, \"a\", 10);\n i0.ɵɵtext(30, \"Suggest an idea\");\n i0.ɵɵelementEnd()()()()();\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureInfoModalComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureColumnManagerComponent = /*#__PURE__*/(() => {\n class StructureColumnManagerComponent extends SmartComponent {\n compositionId;\n compositionCommandInvoker;\n compositionTemplateWarehouse;\n state = inject(GuiState);\n state$ = this.state.select();\n constructor(changeDetectorRef, elementRef, compositionId, compositionCommandInvoker, compositionTemplateWarehouse) {\n super(changeDetectorRef, elementRef);\n this.compositionId = compositionId;\n this.compositionCommandInvoker = compositionCommandInvoker;\n this.compositionTemplateWarehouse = compositionTemplateWarehouse;\n this.addClassToHost('gui-block');\n this.state.connect('columns', this.selectColumns());\n this.state.connect('enabledColumnsCount', this.selectEnabledColumnsCount());\n }\n toggleColumn(column) {\n event.stopPropagation();\n if (column.isEnabled()) {\n this.compositionCommandInvoker.disableColumn(column.getColumnDefinitionId(), this.compositionId);\n } else {\n this.compositionCommandInvoker.enableColumn(column.getColumnDefinitionId(), this.compositionId);\n }\n }\n getSelectorName() {\n return 'gui-structure-column-manager';\n }\n selectColumns() {\n return this.compositionTemplateWarehouse.onAll(this.compositionId);\n }\n selectEnabledColumnsCount() {\n return this.compositionTemplateWarehouse.onAll(this.compositionId).pipe(hermesMap(columns => {\n return columns.map(c => +c.isEnabled()).reduce((accumulator, currentValue) => accumulator + currentValue);\n }));\n }\n static ɵfac = function StructureColumnManagerComponent_Factory(t) {\n return new (t || StructureColumnManagerComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(CompositionId), i0.ɵɵdirectiveInject(CompositionPublisher), i0.ɵɵdirectiveInject(CompositionTemplateWarehouse));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureColumnManagerComponent,\n selectors: [[\"div\", \"gui-structure-column-manager\", \"\"]],\n features: [i0.ɵɵProvidersFeature([GuiState]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c31,\n decls: 1,\n vars: 1,\n consts: [[\"class\", \"gui-structure-ordered-list gui-p-0 gui-my-4 gui-list-none gui-overflow-auto\", 4, \"guiLet\"], [1, \"gui-structure-ordered-list\", \"gui-p-0\", \"gui-my-4\", \"gui-list-none\", \"gui-overflow-auto\"], [\"class\", \"gui-px-13 gui-py-6 gui-cursor-pointer\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [1, \"gui-px-13\", \"gui-py-6\", \"gui-cursor-pointer\", 3, \"click\"], [3, \"checked\", \"disabled\"], [4, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"]],\n template: function StructureColumnManagerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, StructureColumnManagerComponent_ol_0_Template, 2, 1, \"ol\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiLet\", ctx.state$);\n }\n },\n dependencies: [i4.NgForOf, i4.NgTemplateOutlet, i1$1.FabricCheckboxComponent, GuiLetDirective],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureColumnManagerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureDialogColumnManagerComponent = /*#__PURE__*/(() => {\n class StructureDialogColumnManagerComponent extends SmartComponent {\n constructor(detector, elementRef) {\n super(detector, elementRef);\n }\n getSelectorName() {\n return 'gui-structure-dialog-column-manager';\n }\n static ɵfac = function StructureDialogColumnManagerComponent_Factory(t) {\n return new (t || StructureDialogColumnManagerComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureDialogColumnManagerComponent,\n selectors: [[\"div\", \"gui-structure-dialog-column-manager\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c32,\n decls: 4,\n vars: 3,\n consts: [[1, \"gui-dialog-title\"], [\"gui-structure-column-manager\", \"\", 1, \"-gui-mx-10\"]],\n template: function StructureDialogColumnManagerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵtext(1);\n i0.ɵɵpipe(2, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelement(3, \"div\", 1);\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, \"columnManagerModalTitle\"));\n }\n },\n dependencies: [StructureColumnManagerComponent, TranslationPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureDialogColumnManagerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureThemeConverter = /*#__PURE__*/(() => {\n class StructureThemeConverter {\n convertTheme(schemaTheme) {\n switch (schemaTheme) {\n case SchemaTheme.FABRIC:\n return Theme.FABRIC;\n case SchemaTheme.MATERIAL:\n return Theme.MATERIAL;\n case SchemaTheme.GENERIC:\n return Theme.GENERIC;\n case SchemaTheme.LIGHT:\n return Theme.LIGHT;\n case SchemaTheme.DARK:\n return Theme.DARK;\n default:\n return Theme.FABRIC;\n }\n }\n static ɵfac = function StructureThemeConverter_Factory(t) {\n return new (t || StructureThemeConverter)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureThemeConverter,\n factory: StructureThemeConverter.ɵfac\n });\n }\n return StructureThemeConverter;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureDialogColumnManagerService = /*#__PURE__*/(() => {\n class StructureDialogColumnManagerService extends Reactive {\n injector;\n schemaWarehouse;\n structureThemeConverter;\n fabricDialogService;\n constructor(injector, schemaWarehouse, structureThemeConverter, fabricDialogService) {\n super();\n this.injector = injector;\n this.schemaWarehouse = schemaWarehouse;\n this.structureThemeConverter = structureThemeConverter;\n this.fabricDialogService = fabricDialogService;\n }\n open(compositionId, readModelId, parentInjector) {\n if (!parentInjector) {\n parentInjector = this.injector;\n }\n const injector = Injector.create({\n parent: parentInjector,\n providers: [{\n provide: CompositionId,\n useValue: compositionId\n }]\n });\n this.schemaWarehouse.findTheme(readModelId).ifPresent(theme => {\n this.fabricDialogService.open({\n injector: injector,\n component: StructureDialogColumnManagerComponent,\n theme: this.structureThemeConverter.convertTheme(theme)\n });\n });\n }\n static ɵfac = function StructureDialogColumnManagerService_Factory(t) {\n return new (t || StructureDialogColumnManagerService)(i0.ɵɵinject(i0.Injector), i0.ɵɵinject(SchemaWarehouse), i0.ɵɵinject(StructureThemeConverter), i0.ɵɵinject(i1$1.FabricDialogService));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureDialogColumnManagerService,\n factory: StructureDialogColumnManagerService.ɵfac\n });\n }\n return StructureDialogColumnManagerService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureSchemaMangerComponent = /*#__PURE__*/(() => {\n class StructureSchemaMangerComponent extends SmartComponent {\n structureId;\n schemaPublisher;\n schemaWarehouse = inject(SchemaWarehouse);\n schemaReadModelRootId = inject(SchemaReadModelRootId);\n coloring = this.createColoringOptions();\n themes = this.createThemeOptions();\n rowColoring$ = this.selectRowColoring();\n theme$ = this.selectTheme();\n verticalGrid$ = this.schemaWarehouse.onVerticalGrid(this.schemaReadModelRootId);\n horizontalGrid$ = this.schemaWarehouse.onHorizontalGrid(this.schemaReadModelRootId);\n constructor(changeDetectorRef, elRef, structureId, schemaPublisher) {\n super(changeDetectorRef, elRef);\n this.structureId = structureId;\n this.schemaPublisher = schemaPublisher;\n }\n toggleTheme(theme) {\n this.schemaPublisher.setTheme(this.toTheme(theme.value), this.schemaReadModelRootId, this.structureId);\n }\n toggleRowColoring(schemaRowColoring) {\n this.schemaPublisher.setRowColoring(this.toRowColoring(schemaRowColoring.value), this.schemaReadModelRootId);\n }\n toggleVerticalGrid(verticalGrid) {\n event.stopPropagation();\n this.schemaPublisher.setVerticalGrid(!verticalGrid, this.schemaReadModelRootId);\n }\n toggleHorizontalGrid(horizontalGrid) {\n event.stopPropagation();\n this.schemaPublisher.setHorizontalGrid(!horizontalGrid, this.schemaReadModelRootId);\n }\n getSelectorName() {\n return 'gui-structure-schema-manager';\n }\n createColoringOptions() {\n return Object.keys(SchemaRowColoring).map(key => SchemaRowColoring[key]).filter(val => !Number.isInteger(val)).map(value => {\n return {\n value: value,\n name: value\n };\n });\n }\n createThemeOptions() {\n return Object.keys(SchemaTheme).map(key => SchemaTheme[key]).filter(val => !Number.isInteger(val)).map(value => {\n return {\n value: value,\n name: value\n };\n });\n }\n selectRowColoring() {\n return this.schemaWarehouse.onRowColoring(this.schemaReadModelRootId).pipe(hermesMap(rowColoring => {\n return {\n value: SchemaRowColoring[rowColoring],\n name: SchemaRowColoring[rowColoring]\n };\n }));\n }\n selectTheme() {\n return this.schemaWarehouse.onTheme(this.schemaReadModelRootId).pipe(hermesMap(schemaTheme => {\n return {\n value: SchemaTheme[schemaTheme],\n name: SchemaTheme[schemaTheme]\n };\n }));\n }\n toTheme(theme) {\n switch (theme.toLowerCase()) {\n case 'fabric':\n return SchemaTheme.FABRIC;\n case 'material':\n return SchemaTheme.MATERIAL;\n case 'generic':\n return SchemaTheme.GENERIC;\n case 'light':\n return SchemaTheme.LIGHT;\n case 'dark':\n return SchemaTheme.DARK;\n default:\n return SchemaTheme.FABRIC;\n }\n }\n toRowColoring(coloring) {\n switch (coloring.toLowerCase()) {\n case 'none':\n return RowColoring.NONE;\n case 'odd':\n return RowColoring.ODD;\n case 'even':\n return RowColoring.EVEN;\n default:\n return RowColoring.NONE;\n }\n }\n static ɵfac = function StructureSchemaMangerComponent_Factory(t) {\n return new (t || StructureSchemaMangerComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(SchemaPublisher));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureSchemaMangerComponent,\n selectors: [[\"div\", \"gui-structure-schema-manager\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c33,\n decls: 19,\n vars: 21,\n consts: [[1, \"gui-schema-manager\", \"gui-flex\", \"gui-flex-col\"], [1, \"gui-dialog-title\", \"gui-mb-8\"], [1, \"gui-structure-schema-manager-select\", \"gui-flex\", \"gui-flex-col\"], [1, \"gui-mb-4\", \"gui-text-xs\"], [3, \"optionChanged\", \"options\", \"selected\", \"width\"], [1, \"gui-structure-ordered-list\", \"gui-mx-10\", \"gui-p-0\", \"gui-my-4\", \"gui-list-none\", \"gui-overflow-auto\"], [\"class\", \"gui-px-13 gui-py-6 gui-cursor-pointer\", 3, \"click\", 4, \"guiLet\"], [1, \"gui-px-13\", \"gui-py-6\", \"gui-cursor-pointer\", 3, \"click\"], [3, \"checked\"]],\n template: function StructureSchemaMangerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0)(1, \"div\", 1);\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"div\", 2)(5, \"span\", 3);\n i0.ɵɵtext(6);\n i0.ɵɵpipe(7, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(8, \"gui-select\", 4);\n i0.ɵɵpipe(9, \"guiPush\");\n i0.ɵɵlistener(\"optionChanged\", function StructureSchemaMangerComponent_Template_gui_select_optionChanged_8_listener($event) {\n return ctx.toggleTheme($event);\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(10, \"div\", 2)(11, \"span\", 3);\n i0.ɵɵtext(12);\n i0.ɵɵpipe(13, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(14, \"gui-select\", 4);\n i0.ɵɵpipe(15, \"guiPush\");\n i0.ɵɵlistener(\"optionChanged\", function StructureSchemaMangerComponent_Template_gui_select_optionChanged_14_listener($event) {\n return ctx.toggleRowColoring($event);\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(16, \"ol\", 5);\n i0.ɵɵtemplate(17, StructureSchemaMangerComponent_li_17_Template, 4, 4, \"li\", 6)(18, StructureSchemaMangerComponent_li_18_Template, 4, 4, \"li\", 6);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 11, \"themeManagerModalTitle\"));\n i0.ɵɵadvance(4);\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 13, \"themeManagerModalTheme\"));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"options\", ctx.themes)(\"selected\", i0.ɵɵpipeBind1(9, 15, ctx.theme$))(\"width\", 180);\n i0.ɵɵadvance(4);\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(13, 17, \"themeManagerModalRowColoring\"), \" \");\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"options\", ctx.coloring)(\"selected\", i0.ɵɵpipeBind1(15, 19, ctx.rowColoring$))(\"width\", 180);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"guiLet\", ctx.verticalGrid$);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"guiLet\", ctx.horizontalGrid$);\n }\n },\n dependencies: [i1$1.FabricCheckboxComponent, i1$1.FabricSelectComponent, GuiLetDirective, TranslationPipe, GuiPushPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureSchemaMangerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureDialogSchemaManagerComponent = /*#__PURE__*/(() => {\n class StructureDialogSchemaManagerComponent extends PureComponent {\n constructor(elRef) {\n super(elRef);\n }\n getSelectorName() {\n return 'gui-schema-manager-dialog';\n }\n static ɵfac = function StructureDialogSchemaManagerComponent_Factory(t) {\n return new (t || StructureDialogSchemaManagerComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureDialogSchemaManagerComponent,\n selectors: [[\"div\", \"gui-schema-manager-dialog\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c34,\n decls: 1,\n vars: 0,\n consts: [[\"gui-structure-schema-manager\", \"\"]],\n template: function StructureDialogSchemaManagerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n }\n },\n dependencies: [StructureSchemaMangerComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureDialogSchemaManagerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureDialogSchemaManagerService = /*#__PURE__*/(() => {\n class StructureDialogSchemaManagerService extends Reactive {\n injector;\n fabricDialogService;\n constructor(injector, fabricDialogService) {\n super();\n this.injector = injector;\n this.fabricDialogService = fabricDialogService;\n }\n open(readModelId, parentInjector) {\n if (!parentInjector) {\n parentInjector = this.injector;\n }\n const injector = Injector.create({\n providers: [{\n provide: SchemaReadModelRootId,\n useValue: readModelId\n }],\n parent: parentInjector\n });\n this.fabricDialogService.open({\n injector: injector,\n component: StructureDialogSchemaManagerComponent\n });\n }\n static ɵfac = function StructureDialogSchemaManagerService_Factory(t) {\n return new (t || StructureDialogSchemaManagerService)(i0.ɵɵinject(i0.Injector), i0.ɵɵinject(i1$1.FabricDialogService));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureDialogSchemaManagerService,\n factory: StructureDialogSchemaManagerService.ɵfac\n });\n }\n return StructureDialogSchemaManagerService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureColumnManagerIconComponent = /*#__PURE__*/(() => {\n class StructureColumnManagerIconComponent extends IconComponent {\n constructor(elementRef, changeDetectorRef) {\n super(elementRef, changeDetectorRef);\n }\n getSelectorName() {\n return 'gui-structure-column-manager-icon';\n }\n static ɵfac = function StructureColumnManagerIconComponent_Factory(t) {\n return new (t || StructureColumnManagerIconComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureColumnManagerIconComponent,\n selectors: [[\"div\", \"gui-structure-column-manager-icon\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c35,\n decls: 7,\n vars: 0,\n consts: [[\"data-name\", \"Layer 1\", \"xmlns\", \"http://www.w3.org/2000/svg\", \"viewBox\", \"0 0 10.32 10.31\"], [\"x1\", \"9.57\", \"y1\", \"3.65\", \"x2\", \"0.75\", \"y2\", \"3.65\", 1, \"cls-1\"], [\"x1\", \"9.57\", \"y1\", \"0.75\", \"x2\", \"0.75\", \"y2\", \"0.75\", 1, \"cls-2\"], [\"x1\", \"0.75\", \"y1\", \"9.56\", \"x2\", \"0.75\", \"y2\", \"0.88\", 1, \"cls-2\"], [\"x1\", \"3.69\", \"y1\", \"9.65\", \"x2\", \"3.69\", \"y2\", \"3.89\", 1, \"cls-1\"], [\"x1\", \"6.63\", \"y1\", \"9.56\", \"x2\", \"6.63\", \"y2\", \"3.89\", 1, \"cls-1\"], [\"x1\", \"9.57\", \"y1\", \"9.56\", \"x2\", \"9.57\", \"y2\", \"0.88\", 1, \"cls-2\"]],\n template: function StructureColumnManagerIconComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 0);\n i0.ɵɵelement(1, \"line\", 1)(2, \"line\", 2)(3, \"line\", 3)(4, \"line\", 4)(5, \"line\", 5)(6, \"line\", 6);\n i0.ɵɵelementEnd();\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureColumnManagerIconComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureSchemaManagerIconComponent = /*#__PURE__*/(() => {\n class StructureSchemaManagerIconComponent extends IconComponent {\n constructor(elRef, cdr) {\n super(elRef, cdr);\n }\n getSelectorName() {\n return 'gui-structure-schema-manager-icon';\n }\n static ɵfac = function StructureSchemaManagerIconComponent_Factory(t) {\n return new (t || StructureSchemaManagerIconComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureSchemaManagerIconComponent,\n selectors: [[\"div\", \"gui-structure-schema-manager-icon\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c36,\n decls: 11,\n vars: 0,\n consts: [[\"height\", \"24\", \"viewBox\", \"0 0 32 24\", \"width\", \"32\", \"xmlns\", \"http://www.w3.org/2000/svg\"], [\"transform\", \"translate(0 -4)\"], [\"d\", \"M23.337,4H32v6H23.337Z\", \"data-name\", \"Path 303\", \"id\", \"Path_303\"], [\"d\", \"M11.662,4h8.662v6H11.662Z\", \"data-name\", \"Path 304\", \"id\", \"Path_304\"], [\"d\", \"M0,4H8.662v6H0Z\", \"data-name\", \"Path 305\", \"id\", \"Path_305\"], [\"d\", \"M23.337,22H32v6H23.337Z\", \"data-name\", \"Path 306\", \"id\", \"Path_306\"], [\"d\", \"M0,22H8.662v6H0Z\", \"data-name\", \"Path 307\", \"id\", \"Path_307\"], [\"d\", \"M11.662,22h8.662v6H11.662Z\", \"data-name\", \"Path 308\", \"id\", \"Path_308\"], [\"d\", \"M23.337,13H32v6H23.337Z\", \"data-name\", \"Path 309\", \"id\", \"Path_309\"], [\"d\", \"M11.662,13h8.662v6H11.662Z\", \"data-name\", \"Path 310\", \"id\", \"Path_310\"], [\"d\", \"M0,13H8.662v6H0Z\", \"data-name\", \"Path 311\", \"id\", \"Path_311\"]],\n template: function StructureSchemaManagerIconComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 0)(1, \"g\", 1);\n i0.ɵɵelement(2, \"path\", 2)(3, \"path\", 3)(4, \"path\", 4)(5, \"path\", 5)(6, \"path\", 6)(7, \"path\", 7)(8, \"path\", 8)(9, \"path\", 9)(10, \"path\", 10);\n i0.ɵɵelementEnd()();\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureSchemaManagerIconComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ActiveSearchComponent = /*#__PURE__*/(() => {\n class ActiveSearchComponent extends SmartComponent {\n structureId = inject(StructureId);\n searchCommandDispatcher = inject(SearchPublisher);\n searchWarehouse = inject(SearchWarehouse);\n phrase$ = this.searchWarehouse.onPhrase(this.structureId);\n constructor(changeDetectorRef, elementRef) {\n super(changeDetectorRef, elementRef);\n }\n clearSearch() {\n event.stopPropagation();\n this.searchCommandDispatcher.search('', this.structureId);\n }\n getSelectorName() {\n return 'gui-active-search';\n }\n static ɵfac = function ActiveSearchComponent_Factory(t) {\n return new (t || ActiveSearchComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ActiveSearchComponent,\n selectors: [[\"div\", \"gui-active-search\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c37,\n decls: 1,\n vars: 1,\n consts: [[4, \"guiLet\"], [\"gui-button\", \"\", 3, \"click\", \"outline\", \"primary\"]],\n template: function ActiveSearchComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, ActiveSearchComponent_ng_container_0_Template, 9, 3, \"ng-container\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiLet\", ctx.phrase$);\n }\n },\n dependencies: [i1$1.FabricButtonComponent, i1$1.FabricChipComponent, GuiLetDirective],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return ActiveSearchComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ActiveFilterListComponent = /*#__PURE__*/(() => {\n class ActiveFilterListComponent extends SmartComponent {\n filterCommandDispatcher;\n structureId = inject(StructureId);\n filterWarehouse = inject(FilterWarehouse);\n activeFilters$ = this.filterWarehouse.onActiveFilters(this.structureId);\n constructor(changeDetectorRef, elementRef, filterCommandDispatcher) {\n super(changeDetectorRef, elementRef);\n this.filterCommandDispatcher = filterCommandDispatcher;\n }\n removeFilter(filter) {\n this.filterCommandDispatcher.remove(filter.getFilterId(), this.structureId);\n }\n getSelectorName() {\n return 'gui-active-filter-list';\n }\n static ɵfac = function ActiveFilterListComponent_Factory(t) {\n return new (t || ActiveFilterListComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(FilterPublisher));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ActiveFilterListComponent,\n selectors: [[\"div\", \"gui-active-filter-list\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c38,\n decls: 2,\n vars: 1,\n consts: [[4, \"guiLet\"], [\"gui-active-search\", \"\"], [4, \"ngFor\", \"ngForOf\"], [3, \"click\"]],\n template: function ActiveFilterListComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, ActiveFilterListComponent_ng_container_0_Template, 2, 1, \"ng-container\", 0);\n i0.ɵɵelement(1, \"div\", 1);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiLet\", ctx.activeFilters$);\n }\n },\n dependencies: [i4.NgForOf, GuiLetDirective, ActiveSearchComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return ActiveFilterListComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ActiveFilterMenuComponent = /*#__PURE__*/(() => {\n class ActiveFilterMenuComponent {\n static ɵfac = function ActiveFilterMenuComponent_Factory(t) {\n return new (t || ActiveFilterMenuComponent)();\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ActiveFilterMenuComponent,\n selectors: [[\"ng-component\"]],\n decls: 8,\n vars: 3,\n consts: [[\"gui-active-filter-list\", \"\"], [\"gui-button\", \"\", 3, \"text\"], [\"gui-button\", \"\", 3, \"outline\", \"primary\"]],\n template: function ActiveFilterMenuComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"h3\");\n i0.ɵɵtext(1, \"Active filters\");\n i0.ɵɵelementEnd();\n i0.ɵɵelement(2, \"div\", 0);\n i0.ɵɵelementStart(3, \"div\")(4, \"button\", 1);\n i0.ɵɵtext(5, \" Cancel \");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(6, \"button\", 2);\n i0.ɵɵtext(7, \" Clear All \");\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"text\", true);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"outline\", true)(\"primary\", true);\n }\n },\n dependencies: [ActiveFilterListComponent, i1$1.FabricButtonComponent],\n encapsulation: 2\n });\n }\n return ActiveFilterMenuComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ActiveFilterService = /*#__PURE__*/(() => {\n class ActiveFilterService extends Reactive {\n injector;\n schemaWarehouse;\n structureThemeConverter;\n fabricDialogService;\n constructor(injector, schemaWarehouse, structureThemeConverter, fabricDialogService) {\n super();\n this.injector = injector;\n this.schemaWarehouse = schemaWarehouse;\n this.structureThemeConverter = structureThemeConverter;\n this.fabricDialogService = fabricDialogService;\n }\n open(readModelId, structureId) {\n const injector = Injector.create({\n parent: this.injector,\n providers: [{\n provide: SchemaReadModelRootId,\n useValue: readModelId\n }, {\n provide: StructureId,\n useValue: structureId\n }]\n });\n this.schemaWarehouse.findTheme(readModelId).ifPresent(theme => {\n this.fabricDialogService.open({\n injector: injector,\n component: ActiveFilterMenuComponent,\n theme: this.structureThemeConverter.convertTheme(theme)\n });\n });\n }\n static ɵfac = function ActiveFilterService_Factory(t) {\n return new (t || ActiveFilterService)(i0.ɵɵinject(i0.Injector), i0.ɵɵinject(SchemaWarehouse), i0.ɵɵinject(StructureThemeConverter), i0.ɵɵinject(i1$1.FabricDialogService));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ActiveFilterService,\n factory: ActiveFilterService.ɵfac\n });\n }\n return ActiveFilterService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ActiveFilterMenuTriggerDirective = /*#__PURE__*/(() => {\n class ActiveFilterMenuTriggerDirective {\n el;\n structureId;\n activeFilterService;\n schemaReadModelRootId;\n constructor(el, structureId, activeFilterService, schemaReadModelRootId) {\n this.el = el;\n this.structureId = structureId;\n this.activeFilterService = activeFilterService;\n this.schemaReadModelRootId = schemaReadModelRootId;\n }\n ngOnInit() {\n // this.renderer.listen(this.el.nativeElement, 'click', () => {\n // \tthis.activeFilterService.open(this.schemaReadModelRootId, this.structureId);\n // });\n }\n static ɵfac = function ActiveFilterMenuTriggerDirective_Factory(t) {\n return new (t || ActiveFilterMenuTriggerDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(ActiveFilterService), i0.ɵɵdirectiveInject(SchemaReadModelRootId));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: ActiveFilterMenuTriggerDirective,\n selectors: [[\"\", \"gui-active-filter-menu-trigger\", \"\"]]\n });\n }\n return ActiveFilterMenuTriggerDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureInfoIconComponent = /*#__PURE__*/(() => {\n class StructureInfoIconComponent extends IconComponent {\n constructor(elRef, cdr) {\n super(elRef, cdr);\n }\n getSelectorName() {\n return 'gui-structure-info-icon';\n }\n static ɵfac = function StructureInfoIconComponent_Factory(t) {\n return new (t || StructureInfoIconComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureInfoIconComponent,\n selectors: [[\"div\", \"gui-structure-info-icon\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c39,\n decls: 3,\n vars: 0,\n consts: [[\"data-name\", \"Layer 1\", \"viewBox\", \"0 0 10.08 10.08\", \"xmlns\", \"http://www.w3.org/2000/svg\"], [\"d\", \"M401.64,307.76c0-.28.23-.45.54-.45s.55.17.55.45v0a.49.49,0,0,1-.55.46.48.48,0,0,1-.54-.46Zm.05,1.27a.49.49,0,0,1,1,0v2.54a.49.49,0,0,1-1,0Z\", \"transform\", \"translate(-397.14 -304.64)\", 1, \"cls-1\"], [\"cx\", \"5.04\", \"cy\", \"5.04\", \"r\", \"4.54\", 1, \"cls-2\"]],\n template: function StructureInfoIconComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 0);\n i0.ɵɵelement(1, \"path\", 1)(2, \"circle\", 2);\n i0.ɵɵelementEnd();\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureInfoIconComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet NumberFormatterPipe = /*#__PURE__*/(() => {\n class NumberFormatterPipe {\n transform(number) {\n return number.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ' ');\n }\n static ɵfac = function NumberFormatterPipe_Factory(t) {\n return new (t || NumberFormatterPipe)();\n };\n static ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"numberFormatter\",\n type: NumberFormatterPipe,\n pure: true\n });\n }\n return NumberFormatterPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureInfoPanelComponent = /*#__PURE__*/(() => {\n class StructureInfoPanelComponent extends SmartComponent {\n injector;\n dialog;\n compositionId;\n schemaReadModelRootId;\n menuColumnManagerService;\n translationService;\n schemaManagerService;\n structureInfoPanelArchive;\n state = inject(GuiState);\n sourceWarehouse = inject(SourceWarehouse);\n structureId = inject(StructureId);\n state$ = this.state.select();\n totalItemsSize$ = this.sourceWarehouse.onOriginSize(this.structureId);\n infoModal = StructureInfoModalComponent;\n constructor(changeDetectorRef, elementRef, injector, dialog, compositionId, schemaReadModelRootId, menuColumnManagerService, translationService, schemaManagerService, structureInfoPanelArchive) {\n super(changeDetectorRef, elementRef);\n this.injector = injector;\n this.dialog = dialog;\n this.compositionId = compositionId;\n this.schemaReadModelRootId = schemaReadModelRootId;\n this.menuColumnManagerService = menuColumnManagerService;\n this.translationService = translationService;\n this.schemaManagerService = schemaManagerService;\n this.structureInfoPanelArchive = structureInfoPanelArchive;\n this.state.connect('infoPanelConfig', this.structureInfoPanelArchive.on());\n this.state.connect('preparedItemsSize', this.sourceWarehouse.onPreparedItems(this.structureId).pipe(hermesMap(items => items.length)));\n this.state.connect('translations', this.translationService.onTranslation());\n }\n openInfo() {\n this.dialog.open({\n component: this.infoModal\n });\n }\n openColumnManager() {\n this.menuColumnManagerService.open(this.compositionId, this.schemaReadModelRootId, this.injector);\n }\n openSchemaManager() {\n this.schemaManagerService.open(this.schemaReadModelRootId, this.injector);\n }\n getSelectorName() {\n return 'gui-structure-info-panel';\n }\n static ɵfac = function StructureInfoPanelComponent_Factory(t) {\n return new (t || StructureInfoPanelComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1$1.FabricDialogService), i0.ɵɵdirectiveInject(CompositionId), i0.ɵɵdirectiveInject(SchemaReadModelRootId), i0.ɵɵdirectiveInject(StructureDialogColumnManagerService), i0.ɵɵdirectiveInject(TranslationFacade), i0.ɵɵdirectiveInject(StructureDialogSchemaManagerService), i0.ɵɵdirectiveInject(StructureInfoPanelArchive));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureInfoPanelComponent,\n selectors: [[\"div\", \"gui-structure-info-panel\", \"\"]],\n features: [i0.ɵɵProvidersFeature([GuiState]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c40,\n decls: 1,\n vars: 1,\n consts: [[4, \"guiLet\"], [1, \"gui-right-section\"], [3, \"click\", 4, \"ngIf\"], [4, \"ngIf\"], [\"gui-active-filter-menu-trigger\", \"\", 4, \"ngIf\"], [\"gui-active-filter-menu-trigger\", \"\"], [3, \"click\"], [\"gui-structure-schema-manager-icon\", \"\", 3, \"gui-tooltip\"], [\"gui-structure-column-manager-icon\", \"\", 3, \"gui-tooltip\"], [\"gui-structure-info-icon\", \"\", 3, \"gui-tooltip\"]],\n template: function StructureInfoPanelComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, StructureInfoPanelComponent_ng_container_0_Template, 7, 4, \"ng-container\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiLet\", ctx.state$);\n }\n },\n dependencies: [i4.NgIf, i1$1.FabricTooltipDirective, StructureColumnManagerIconComponent, StructureSchemaManagerIconComponent, ActiveFilterMenuTriggerDirective, GuiLetDirective, StructureInfoIconComponent, NumberFormatterPipe, TranslationPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureInfoPanelComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet GuiEffects = /*#__PURE__*/(() => {\n class GuiEffects {\n destroy$ = new HermesReplaySubject(1);\n register(effect$, next, complete) {\n return effect$.pipe(hermesTakeUntil(this.destroy$)).subscribe(v => next(v), error => console.log(error), complete ? () => complete() : () => {});\n }\n destroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n ngOnDestroy() {\n this.destroy();\n }\n static ɵfac = function GuiEffects_Factory(t) {\n return new (t || GuiEffects)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: GuiEffects,\n factory: GuiEffects.ɵfac\n });\n }\n return GuiEffects;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SearchIconComponent = /*#__PURE__*/(() => {\n class SearchIconComponent extends IconComponent {\n constructor(elementRef, changeDetectorRef) {\n super(elementRef, changeDetectorRef);\n }\n getSelectorName() {\n return 'gui-search-icon';\n }\n static ɵfac = function SearchIconComponent_Factory(t) {\n return new (t || SearchIconComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: SearchIconComponent,\n selectors: [[\"div\", \"gui-search-icon\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c41,\n decls: 3,\n vars: 0,\n consts: [[\"xmlns\", \"http://www.w3.org/2000/svg\", \"width\", \"10.231\", \"height\", \"10.601\", \"viewBox\", \"0 0 10.231 10.601\", 1, \"gui-search-icon-svg\"], [\"x2\", \"1.77\", \"y2\", \"1.77\", \"transform\", \"translate(7.4 7.77)\", \"fill\", \"none\", \"stroke-linecap\", \"round\", \"stroke-linejoin\", \"round\", \"stroke-width\", \"1.5\"], [\"cx\", \"4.02\", \"cy\", \"4.02\", \"r\", \"4.02\", \"transform\", \"translate(0.5 0.5)\", \"stroke-width\", \"1\", \"stroke-linecap\", \"round\", \"stroke-linejoin\", \"round\", \"fill\", \"none\"]],\n template: function SearchIconComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 0);\n i0.ɵɵelement(1, \"line\", 1)(2, \"circle\", 2);\n i0.ɵɵelementEnd();\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return SearchIconComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SearchComponent = /*#__PURE__*/(() => {\n class SearchComponent extends SmartComponent {\n formBuilder;\n effects;\n searchCommandDispatcher;\n static FORM_SEARCH_NAME = 'searchPhrase';\n formRef;\n structureId = inject(StructureId);\n searchWarehouse = inject(SearchWarehouse);\n searchForm;\n placeholder$ = this.searchWarehouse.onPlaceholder(this.structureId);\n searchingEnabled$ = this.searchWarehouse.onSearchEnabled(this.structureId);\n searchInputSubscription;\n constructor(formBuilder, changeDetectorRef, elementRef, effects, searchCommandDispatcher) {\n super(changeDetectorRef, elementRef);\n this.formBuilder = formBuilder;\n this.effects = effects;\n this.searchCommandDispatcher = searchCommandDispatcher;\n const controlsConfig = {};\n controlsConfig[SearchComponent.FORM_SEARCH_NAME] = '';\n this.searchForm = this.formBuilder.group(controlsConfig);\n this.registerOnPhraseEffect();\n }\n ngOnInit() {\n this.registerOnChangesEffect();\n }\n clear() {\n this.searchForm.reset();\n }\n getSelectorName() {\n return 'gui-search-bar';\n }\n selectPhrase() {\n // @ts-ignore\n const searchPhrase$ = this.searchForm.controls[SearchComponent.FORM_SEARCH_NAME].valueChanges;\n return fromRxJsObservable(searchPhrase$.pipe(debounceTime(200)));\n }\n registerOnChangesEffect() {\n this.searchInputSubscription = this.effects.register(this.selectPhrase(), phrase => {\n this.searchCommandDispatcher.search(phrase, this.structureId);\n });\n }\n registerOnPhraseEffect() {\n this.effects.register(this.searchWarehouse.onPhrase(this.structureId), phrase => {\n if (phrase === undefined) {\n phrase = null;\n }\n const controlsConfig = {};\n controlsConfig[SearchComponent.FORM_SEARCH_NAME] = phrase;\n if (phrase !== this.searchForm.get([SearchComponent.FORM_SEARCH_NAME]).value) {\n this.unregisterObserveChangesEffect();\n this.searchForm.setValue(controlsConfig);\n this.registerOnChangesEffect();\n }\n });\n }\n unregisterObserveChangesEffect() {\n this.searchInputSubscription.unsubscribe();\n }\n static ɵfac = function SearchComponent_Factory(t) {\n return new (t || SearchComponent)(i0.ɵɵdirectiveInject(i1$2.FormBuilder), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(GuiEffects), i0.ɵɵdirectiveInject(SearchPublisher));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: SearchComponent,\n selectors: [[\"div\", \"gui-search-bar\", \"\"]],\n viewQuery: function SearchComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c42, 5, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.formRef = _t.first);\n }\n },\n features: [i0.ɵɵProvidersFeature([GuiEffects]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c43,\n decls: 1,\n vars: 1,\n consts: [[\"formRef\", \"\"], [4, \"guiIf\"], [1, \"gui-flex\", \"gui-relative\", \"gui-w-full\", 3, \"formGroup\"], [\"gui-search-icon\", \"\"], [\"formControlName\", \"searchPhrase\", 1, \"gui-border-0\", \"gui-w-full\", \"gui-h-full\", \"gui-py-5\", \"gui-pr-5\", \"gui-pl-21\", 3, \"placeholder\"], [\"class\", \"gui-clear-search-icon\", 3, \"click\", 4, \"ngIf\"], [1, \"gui-clear-search-icon\", 3, \"click\"]],\n template: function SearchComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, SearchComponent_ng_container_0_Template, 7, 5, \"ng-container\", 1);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiIf\", ctx.searchingEnabled$);\n }\n },\n dependencies: [i4.NgIf, i1$2.ɵNgNoValidate, i1$2.DefaultValueAccessor, i1$2.NgControlStatus, i1$2.NgControlStatusGroup, i1$2.FormGroupDirective, i1$2.FormControlName, GuiIfDirective, SearchIconComponent, GuiPushPipe],\n styles: [\".gui-search-bar form{background:#fff}.gui-search-bar form:hover .gui-search-icon-svg line,.gui-search-bar form:hover .gui-search-icon-svg circle{stroke:#333}.gui-search-bar .gui-search-icon-svg{height:17px;left:10px;position:absolute;top:6px;width:17px}.gui-search-bar .gui-search-icon-svg line,.gui-search-bar .gui-search-icon-svg circle{stroke:#ccc;transition:stroke .3s ease-in-out}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return SearchComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureTopPanelComponent = /*#__PURE__*/(() => {\n class StructureTopPanelComponent extends PureComponent {\n constructor(elementRef) {\n super(elementRef);\n this.addClassToHost('gui-p-6');\n this.addClassToHost('gui-border-b');\n this.addClassToHost('gui-border-b-solid');\n }\n getSelectorName() {\n return 'gui-structure-top-panel';\n }\n static ɵfac = function StructureTopPanelComponent_Factory(t) {\n return new (t || StructureTopPanelComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureTopPanelComponent,\n selectors: [[\"div\", \"gui-structure-top-panel\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c44,\n decls: 1,\n vars: 0,\n consts: [[\"gui-search-bar\", \"\", 1, \"gui-flex\", \"gui-items-center\", \"gui-h-full\", \"gui-w-3/5\", \"gui-mr-auto\"]],\n template: function StructureTopPanelComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n }\n },\n dependencies: [SearchComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureTopPanelComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet EmptySourceComponent = /*#__PURE__*/(() => {\n class EmptySourceComponent extends PureComponent {\n items;\n constructor(elRef) {\n super(elRef);\n this.addClassToHost('gui-py-23');\n this.addClassToHost('gui-px-6');\n }\n ngOnChanges(changes) {\n ifChanged(changes.items, () => {\n if (this.items.length === 0) {\n this.removeClassFromHost('gui-hidden');\n this.addClassToHost('gui-block');\n } else {\n this.removeClassFromHost('gui-block');\n this.addClassToHost('gui-hidden');\n }\n });\n }\n getSelectorName() {\n return 'gui-empty-source';\n }\n static ɵfac = function EmptySourceComponent_Factory(t) {\n return new (t || EmptySourceComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: EmptySourceComponent,\n selectors: [[\"div\", \"gui-empty-source\", \"\", \"items\", \"\"]],\n inputs: {\n items: \"items\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c45,\n decls: 1,\n vars: 1,\n consts: [[4, \"ngIf\"]],\n template: function EmptySourceComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, EmptySourceComponent_ng_container_0_Template, 3, 3, \"ng-container\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.items.length === 0);\n }\n },\n dependencies: [i4.NgIf, TranslationPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return EmptySourceComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass VerticalFormationWarehouse {\n constructor() {}\n}\nlet StructureMenuColumnManagerComponent = /*#__PURE__*/(() => {\n class StructureMenuColumnManagerComponent extends PureComponent {\n constructor(elementRef) {\n super(elementRef);\n }\n getSelectorName() {\n return 'gui-structure-menu-column-manager';\n }\n static ɵfac = function StructureMenuColumnManagerComponent_Factory(t) {\n return new (t || StructureMenuColumnManagerComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureMenuColumnManagerComponent,\n selectors: [[\"div\", \"gui-structure-menu-column-manager\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c46,\n decls: 1,\n vars: 0,\n consts: [[\"gui-structure-column-manager\", \"\"]],\n template: function StructureMenuColumnManagerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n }\n },\n dependencies: [StructureColumnManagerComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureMenuColumnManagerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet UniqueValueListComponent = /*#__PURE__*/(() => {\n class UniqueValueListComponent extends SmartComponent {\n structureId;\n filterWarehouse;\n filterCommandInvoker;\n set fieldId(fieldId) {\n this.state.setValue({\n fieldId\n });\n }\n state = inject(GuiState);\n state$ = this.state.select();\n constructor(changeDetectorRef, elementRef, structureId, filterWarehouse, filterCommandInvoker) {\n super(changeDetectorRef, elementRef);\n this.structureId = structureId;\n this.filterWarehouse = filterWarehouse;\n this.filterCommandInvoker = filterCommandInvoker;\n this.state.connect('uniqueValues', this.selectUniqueValues());\n this.state.connect('selectAllChecked', this.isSelectAllChecked());\n this.state.connect('selectAllIndeterminate', this.isSelectAllIndeterminate());\n }\n toggleAllSelect() {\n event.stopPropagation();\n const fieldId = this.state.getValue('fieldId'),\n selectAllChecked = this.state.getValue('selectAllChecked');\n if (selectAllChecked) {\n this.filterCommandInvoker.unselectAllUniqueFilter(fieldId, this.structureId);\n } else {\n this.filterCommandInvoker.selectAllUniqueFilter(fieldId, this.structureId);\n }\n }\n toggleSelect(uniqueValueModel) {\n event.stopPropagation();\n const fieldId = this.state.getValue('fieldId');\n if (uniqueValueModel.isEnabled()) {\n this.filterCommandInvoker.unselectUniqueFilter(fieldId, uniqueValueModel.getId(), this.structureId);\n } else {\n this.filterCommandInvoker.selectUniqueFilter(fieldId, uniqueValueModel.getId(), this.structureId);\n }\n }\n clearFilters() {\n const fieldId = this.state.getValue('fieldId');\n this.filterCommandInvoker.selectAllUniqueFilter(fieldId, this.structureId);\n }\n getSelectorName() {\n return 'gui-unique-value-list';\n }\n selectUniqueValues() {\n return this.state.select('fieldId').pipe(hermesSwitchMap(fieldId => {\n return this.filterWarehouse.onUniqueValues(this.structureId).pipe(hermesMap(uniqueValueCollectionModel => {\n return uniqueValueCollectionModel.getValues(fieldId);\n }));\n }));\n }\n isSelectAllChecked() {\n return this.state.select('fieldId').pipe(hermesSwitchMap(fieldId => {\n return this.filterWarehouse.onUniqueValues(this.structureId).pipe(hermesMap(uniqueValueCollectionModel => {\n return uniqueValueCollectionModel.isSelectAllChecked(fieldId);\n }));\n }));\n }\n isSelectAllIndeterminate() {\n return this.state.select('fieldId').pipe(hermesSwitchMap(fieldId => {\n return this.filterWarehouse.onUniqueValues(this.structureId).pipe(hermesMap(uniqueValueCollectionModel => {\n return uniqueValueCollectionModel.isIndeterminate(fieldId);\n }));\n }));\n }\n static ɵfac = function UniqueValueListComponent_Factory(t) {\n return new (t || UniqueValueListComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(FilterWarehouse), i0.ɵɵdirectiveInject(FilterPublisher));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: UniqueValueListComponent,\n selectors: [[\"div\", \"gui-unique-value-list\", \"\", \"fieldId\", \"\"]],\n inputs: {\n fieldId: \"fieldId\"\n },\n features: [i0.ɵɵProvidersFeature([GuiState]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c47,\n decls: 1,\n vars: 1,\n consts: [[4, \"guiLet\"], [3, \"changed\", \"checked\", \"indeterminate\"], [1, \"gui-unique-value-list-container\", \"gui-overflow-y-auto\", \"gui-overflow-x-hidden\"], [4, \"ngFor\", \"ngForOf\"], [1, \"gui-unique-value-list-actions\", \"gui-px-4\", \"gui-pb-4\", \"gui-pt-2\", \"gui-flex\", \"gui-justify-end\"], [\"gui-button\", \"\", 1, \"gui-clear-unique-filters\", \"gui-px-4\", \"gui-py-2\", 3, \"click\", \"outline\", \"primary\"], [3, \"changed\", \"checked\"]],\n template: function UniqueValueListComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, UniqueValueListComponent_ng_container_0_Template, 8, 5, \"ng-container\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiLet\", ctx.state$);\n }\n },\n dependencies: [i4.NgForOf, i1$1.FabricButtonComponent, i1$1.FabricCheckboxComponent, GuiLetDirective],\n styles: [\".gui-unique-value-list-container{max-height:300px}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return UniqueValueListComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar StructureArrowPosition = /*#__PURE__*/function (StructureArrowPosition) {\n StructureArrowPosition[StructureArrowPosition[\"UP\"] = 0] = \"UP\";\n StructureArrowPosition[StructureArrowPosition[\"DOWN\"] = 1] = \"DOWN\";\n StructureArrowPosition[StructureArrowPosition[\"LEFT\"] = 2] = \"LEFT\";\n StructureArrowPosition[StructureArrowPosition[\"RIGHT\"] = 3] = \"RIGHT\";\n return StructureArrowPosition;\n}(StructureArrowPosition || {});\nlet StructureArrowIconComponent = /*#__PURE__*/(() => {\n class StructureArrowIconComponent extends IconComponent {\n position = StructureArrowPosition.UP;\n sort;\n styleModifier;\n constructor(elementRef, changeDetectorRef) {\n super(elementRef, changeDetectorRef);\n if (this.sort) {\n this.addClassToHost('gui-structure-column-menu-sort-icon');\n }\n this.styleModifier = new StyleModifier(elementRef.nativeElement);\n }\n ngOnChanges(changes) {\n ifChanged(changes.position, () => {\n if (this.position) {\n this.styleModifier.getHost().setStyleByName('transform', this.getTransformValue());\n }\n });\n }\n getSelectorName() {\n return 'gui-structure-column-menu-arrow-icon';\n }\n getTransformValue() {\n return 'rotate(' + this.getRotationDeg() + 'deg)';\n }\n getRotationDeg() {\n switch (this.position) {\n case StructureArrowPosition.UP:\n {\n return 0;\n }\n case StructureArrowPosition.DOWN:\n {\n return 180;\n }\n case StructureArrowPosition.LEFT:\n {\n return -90;\n }\n case StructureArrowPosition.RIGHT:\n {\n return 90;\n }\n default:\n {\n return 0;\n }\n }\n }\n static ɵfac = function StructureArrowIconComponent_Factory(t) {\n return new (t || StructureArrowIconComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureArrowIconComponent,\n selectors: [[\"div\", \"gui-structure-arrow-icon\", \"\"]],\n inputs: {\n position: \"position\",\n sort: \"sort\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c48,\n decls: 4,\n vars: 0,\n consts: [[\"xmlns\", \"http://www.w3.org/2000/svg\", \"viewBox\", \"0 0 10.04 11.72\"], [\"x1\", \"5.02\", \"y1\", \"2.15\", \"x2\", \"5.02\", \"y2\", \"10.97\", 1, \"cls-1\"], [\"x1\", \"5.02\", \"y1\", \"0.75\", \"x2\", \"9.29\", \"y2\", \"5.02\", 1, \"cls-1\"], [\"x1\", \"5.02\", \"y1\", \"0.75\", \"x2\", \"0.75\", \"y2\", \"5.02\", 1, \"cls-1\"]],\n template: function StructureArrowIconComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 0);\n i0.ɵɵelement(1, \"line\", 1)(2, \"line\", 2)(3, \"line\", 3);\n i0.ɵɵelementEnd();\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureArrowIconComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureColumnConfigSortComponent = /*#__PURE__*/(() => {\n class StructureColumnConfigSortComponent extends SmartComponent {\n changeDetectorRef;\n compositionId;\n structureId;\n sortingCommandDispatcher;\n compositionReadModelService;\n set column(column) {\n this.state.setValue({\n fieldId: column.getFieldId()\n });\n }\n dropdownTextTranslation;\n state = inject(GuiState);\n placement = Placement.Right;\n status = SortOrder;\n StructureArrowPosition = StructureArrowPosition;\n sortOrder$ = this.state.select('sortOrder');\n constructor(changeDetectorRef, elementRef, compositionId, structureId, sortingCommandDispatcher, compositionReadModelService) {\n super(changeDetectorRef, elementRef);\n this.changeDetectorRef = changeDetectorRef;\n this.compositionId = compositionId;\n this.structureId = structureId;\n this.sortingCommandDispatcher = sortingCommandDispatcher;\n this.compositionReadModelService = compositionReadModelService;\n this.state.connect('sortOrder', this.selectSortOrder());\n }\n isAscSort() {\n return this.state.getValue('sortOrder') === SortOrder.ASC;\n }\n isDescSort() {\n return this.state.getValue('sortOrder') === SortOrder.DESC;\n }\n isNoneSort() {\n return this.state.getValue('sortOrder') === SortOrder.NONE;\n }\n setSortOrder(sort) {\n event.preventDefault();\n event.stopPropagation();\n const fieldId = this.state.getValue('fieldId');\n this.sortingCommandDispatcher.setSortOrder(fieldId, sort, this.compositionId, this.structureId);\n }\n getSelectorName() {\n return 'gui-structure-column-config-sort';\n }\n selectSortOrder() {\n return this.state.select('fieldId').pipe(hermesSwitchMap(fieldId => {\n return this.compositionReadModelService.onSortOrder(fieldId, this.compositionId);\n }));\n }\n static ɵfac = function StructureColumnConfigSortComponent_Factory(t) {\n return new (t || StructureColumnConfigSortComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(CompositionId), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(SortingPublisher), i0.ɵɵdirectiveInject(CompositionWarehouse));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureColumnConfigSortComponent,\n selectors: [[\"div\", \"gui-structure-column-config-sort\", \"\", \"column\", \"\", \"dropdownTextTranslation\", \"\"]],\n inputs: {\n column: \"column\",\n dropdownTextTranslation: \"dropdownTextTranslation\"\n },\n features: [i0.ɵɵProvidersFeature([GuiState]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c49,\n decls: 1,\n vars: 1,\n consts: [[\"class\", \"gui-header-menu-dropdown\", 3, \"dropdownText\", \"placement\", \"showOnHover\", \"width\", 4, \"guiLet\"], [1, \"gui-header-menu-dropdown\", 3, \"dropdownText\", \"placement\", \"showOnHover\", \"width\"], [3, \"click\"], [1, \"gui-sort-title\"], [\"gui-structure-arrow-icon\", \"\", 3, \"sort\"], [\"gui-structure-arrow-icon\", \"\", 3, \"position\", \"sort\"]],\n template: function StructureColumnConfigSortComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, StructureColumnConfigSortComponent_gui_dropdown_0_Template, 14, 22, \"gui-dropdown\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiLet\", ctx.sortOrder$);\n }\n },\n dependencies: [i1$1.FabricDropdownComponent, i1$1.FabricDropdownItemComponent, GuiLetDirective, StructureArrowIconComponent, TranslationPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureColumnConfigSortComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureColumnConfigColumnHideComponent = /*#__PURE__*/(() => {\n class StructureColumnConfigColumnHideComponent extends PureComponent {\n column;\n columnHidden = new EventEmitter();\n constructor(elRef) {\n super(elRef);\n }\n hideColumn() {\n this.columnHidden.emit();\n }\n getSelectorName() {\n return 'gui-structure-column-config-column-hide';\n }\n static ɵfac = function StructureColumnConfigColumnHideComponent_Factory(t) {\n return new (t || StructureColumnConfigColumnHideComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureColumnConfigColumnHideComponent,\n selectors: [[\"div\", \"gui-structure-column-config-column-hide\", \"\"]],\n inputs: {\n column: \"column\"\n },\n outputs: {\n columnHidden: \"columnHidden\"\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c50,\n decls: 3,\n vars: 3,\n consts: [[1, \"gui-header-menu-item\", 3, \"click\"]],\n template: function StructureColumnConfigColumnHideComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵlistener(\"click\", function StructureColumnConfigColumnHideComponent_Template_div_click_0_listener() {\n return ctx.hideColumn();\n });\n i0.ɵɵtext(1);\n i0.ɵɵpipe(2, \"guiTranslate\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(2, 1, \"headerMenuMainTabHideColumn\"), \"\\n\");\n }\n },\n dependencies: [TranslationPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureColumnConfigColumnHideComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureColumnConfigColumnMoveComponent = /*#__PURE__*/(() => {\n class StructureColumnConfigColumnMoveComponent extends PureComponent {\n column;\n movedLeft = new EventEmitter();\n movedRight = new EventEmitter();\n StructureArrowPosition = StructureArrowPosition;\n constructor(elRef) {\n super(elRef);\n }\n moveLeft() {\n this.movedLeft.emit();\n }\n moveRight() {\n this.movedRight.emit();\n }\n getSelectorName() {\n return 'gui-structure-column-config-column-move';\n }\n static ɵfac = function StructureColumnConfigColumnMoveComponent_Factory(t) {\n return new (t || StructureColumnConfigColumnMoveComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureColumnConfigColumnMoveComponent,\n selectors: [[\"div\", \"gui-structure-column-config-column-move\", \"\", \"column\", \"\"]],\n inputs: {\n column: \"column\"\n },\n outputs: {\n movedLeft: \"movedLeft\",\n movedRight: \"movedRight\"\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c51,\n decls: 9,\n vars: 8,\n consts: [[1, \"gui-header-menu-column-move\"], [1, \"gui-header-menu-column-move-item\", \"left\", 3, \"click\"], [\"gui-structure-arrow-icon\", \"\", 3, \"position\"], [1, \"gui-header-menu-column-move-item\", \"right\", 3, \"click\"]],\n template: function StructureColumnConfigColumnMoveComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0)(1, \"div\", 1);\n i0.ɵɵlistener(\"click\", function StructureColumnConfigColumnMoveComponent_Template_div_click_1_listener() {\n return ctx.moveLeft();\n });\n i0.ɵɵelement(2, \"div\", 2);\n i0.ɵɵtext(3);\n i0.ɵɵpipe(4, \"guiTranslate\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(5, \"div\", 3);\n i0.ɵɵlistener(\"click\", function StructureColumnConfigColumnMoveComponent_Template_div_click_5_listener() {\n return ctx.moveRight();\n });\n i0.ɵɵtext(6);\n i0.ɵɵpipe(7, \"guiTranslate\");\n i0.ɵɵelement(8, \"div\", 2);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"position\", ctx.StructureArrowPosition.LEFT);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(4, 4, \"headerMenuMainTabMoveLeft\"), \" \");\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(7, 6, \"headerMenuMainTabMoveRight\"), \" \");\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"position\", ctx.StructureArrowPosition.RIGHT);\n }\n },\n dependencies: [StructureArrowIconComponent, TranslationPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureColumnConfigColumnMoveComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureColumnConfigComponent = /*#__PURE__*/(() => {\n class StructureColumnConfigComponent extends SmartComponent {\n translationFacade;\n structureColumnMenuConfigArchive;\n compositionId;\n compositionCommandInvoker;\n injector;\n column;\n headerSortMenu;\n state = inject(GuiState);\n state$ = this.state.select();\n structureColumnConfigService;\n constructor(changeDetectorRef, elementRef, translationFacade, structureColumnMenuConfigArchive, compositionId, compositionCommandInvoker, injector, column) {\n super(changeDetectorRef, elementRef);\n this.translationFacade = translationFacade;\n this.structureColumnMenuConfigArchive = structureColumnMenuConfigArchive;\n this.compositionId = compositionId;\n this.compositionCommandInvoker = compositionCommandInvoker;\n this.injector = injector;\n this.column = column;\n this.structureColumnConfigService = this.injector.get(StructureColumnConfigService);\n this.state.connect('isEnabled', this.selectIsEnabled());\n this.state.connect('config', this.structureColumnMenuConfigArchive.on());\n this.state.connect('translations', this.translationFacade.onTranslation());\n }\n isEnabled(config) {\n return config.isEnabled();\n }\n hideColumn() {\n this.compositionCommandInvoker.disableColumn(this.column.getColumnDefinitionId(), this.compositionId);\n this.structureColumnConfigService.close();\n }\n moveLeft() {\n this.compositionCommandInvoker.moveLeft(this.column.getColumnDefinitionId(), this.compositionId);\n this.structureColumnConfigService.close();\n }\n moveRight() {\n this.compositionCommandInvoker.moveRight(this.column.getColumnDefinitionId(), this.compositionId);\n this.structureColumnConfigService.close();\n }\n highlightColumn() {\n this.compositionCommandInvoker.highlightColumn(this.column.getColumnDefinitionId(), this.compositionId);\n this.structureColumnConfigService.close();\n }\n getSelectorName() {\n return 'gui-column-config';\n }\n selectIsEnabled() {\n return this.structureColumnMenuConfigArchive.on().pipe(hermesMap(config => config.isEnabled()));\n }\n static ɵfac = function StructureColumnConfigComponent_Factory(t) {\n return new (t || StructureColumnConfigComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(TranslationFacade), i0.ɵɵdirectiveInject(StructureColumnMenuConfigArchive), i0.ɵɵdirectiveInject(CompositionId), i0.ɵɵdirectiveInject(CompositionPublisher), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject('column'));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureColumnConfigComponent,\n selectors: [[\"div\", \"gui-column-config\", \"\"]],\n viewQuery: function StructureColumnConfigComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c52, 5, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.headerSortMenu = _t.first);\n }\n },\n features: [i0.ɵɵProvidersFeature([GuiState]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c53,\n decls: 1,\n vars: 1,\n consts: [[4, \"guiLet\"], [\"class\", \"gui-header-menu-tab\", 4, \"ngIf\"], [1, \"gui-header-menu-tab\"], [3, \"active\", \"menu\"], [4, \"ngIf\"], [1, \"gui-tab-item-dropdown\", 3, \"tab\"], [\"gui-structure-column-config-sort\", \"\", 3, \"column\", \"dropdownTextTranslation\", 4, \"ngIf\"], [\"gui-structure-column-config-column-hide\", \"\", 3, \"columnHidden\", \"column\"], [1, \"gui-header-menu-item\", 3, \"click\"], [\"gui-structure-column-config-column-move\", \"\", 3, \"movedLeft\", \"movedRight\", \"column\"], [\"gui-structure-column-config-sort\", \"\", 3, \"column\", \"dropdownTextTranslation\"], [3, \"tab\"], [\"gui-unique-value-list\", \"\", 3, \"fieldId\"], [\"gui-structure-menu-column-manager\", \"\"]],\n template: function StructureColumnConfigComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, StructureColumnConfigComponent_ng_container_0_Template, 2, 1, \"ng-container\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiLet\", ctx.state$);\n }\n },\n dependencies: [i4.NgIf, i1$1.FabricTabComponent, i1$1.FabricTabItemComponent, GuiLetDirective, StructureMenuColumnManagerComponent, UniqueValueListComponent, StructureColumnConfigSortComponent, StructureColumnConfigColumnHideComponent, StructureColumnConfigColumnMoveComponent, TranslationPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureColumnConfigComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureColumnConfigService = /*#__PURE__*/(() => {\n class StructureColumnConfigService extends Reactive {\n injector;\n schemaReadModelRootId;\n schemaWarehouse;\n structureThemeConverter;\n inlineDialogService;\n constructor(injector, schemaReadModelRootId, schemaWarehouse, structureThemeConverter, inlineDialogService) {\n super();\n this.injector = injector;\n this.schemaReadModelRootId = schemaReadModelRootId;\n this.schemaWarehouse = schemaWarehouse;\n this.structureThemeConverter = structureThemeConverter;\n this.inlineDialogService = inlineDialogService;\n }\n open(elementRef, column) {\n this.close();\n const injector = Injector.create({\n providers: [{\n provide: 'column',\n useValue: column\n }],\n parent: this.injector\n });\n this.schemaWarehouse.onceTheme(this.schemaReadModelRootId).pipe(this.hermesTakeUntil()).subscribe(theme => {\n this.inlineDialogService.open(elementRef, StructureColumnConfigComponent, {\n injector: injector,\n placement: FabricPlacement.BOTTOM,\n offset: -34,\n theme: this.structureThemeConverter.convertTheme(theme),\n customClass: 'gui-inline-dialog-header-menu'\n });\n });\n }\n close() {\n this.inlineDialogService.close();\n }\n static ɵfac = function StructureColumnConfigService_Factory(t) {\n return new (t || StructureColumnConfigService)(i0.ɵɵinject(i0.Injector), i0.ɵɵinject(SchemaReadModelRootId), i0.ɵɵinject(SchemaWarehouse), i0.ɵɵinject(StructureThemeConverter), i0.ɵɵinject(i1$1.FabricInlineDialogService));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureColumnConfigService,\n factory: StructureColumnConfigService.ɵfac\n });\n }\n return StructureColumnConfigService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SelectCustomModalComponent = /*#__PURE__*/(() => {\n class SelectCustomModalComponent extends DynamicallyCreatedComponent {\n formationPublisher;\n structureId = inject(StructureId);\n formationWarehouse = inject(FormationWarehouse);\n selection$ = this.formationWarehouse.onCustomSelections(this.structureId);\n constructor(elRef, formationPublisher) {\n super(elRef);\n this.formationPublisher = formationPublisher;\n }\n selectCustom(id) {\n this.formationPublisher.selectCustom(id, this.structureId);\n }\n getSelectorName() {\n return 'gui-select-custom-modal';\n }\n static ɵfac = function SelectCustomModalComponent_Factory(t) {\n return new (t || SelectCustomModalComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(FormationPublisher));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: SelectCustomModalComponent,\n selectors: [[\"div\", \"gui-select-custom-modal\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c54,\n decls: 1,\n vars: 1,\n consts: [[4, \"guiLet\"], [3, \"click\", 4, \"ngFor\", \"ngForOf\"], [3, \"click\"]],\n template: function SelectCustomModalComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, SelectCustomModalComponent_ul_0_Template, 2, 1, \"ul\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiLet\", ctx.selection$);\n }\n },\n dependencies: [i4.NgForOf, GuiLetDirective],\n styles: [\".gui-select-custom-modal{background:#fff;border:1px solid #d6d6d6;border-radius:0 0 4px 4px}.gui-select-custom-modal ul{list-style:none;margin:0;padding:0}.gui-select-custom-modal ul li{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:#fff;border-color:#d6d6d6;box-sizing:border-box;color:#333;cursor:pointer;display:block;font:14px Arial;padding:8px 12px}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return SelectCustomModalComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureSelectCustomService = /*#__PURE__*/(() => {\n class StructureSelectCustomService extends Reactive {\n injector;\n schemaReadModelRootId;\n schemaWarehouse;\n structureThemeConverter;\n inlineDialogService;\n constructor(injector, schemaReadModelRootId, schemaWarehouse, structureThemeConverter, inlineDialogService) {\n super();\n this.injector = injector;\n this.schemaReadModelRootId = schemaReadModelRootId;\n this.schemaWarehouse = schemaWarehouse;\n this.structureThemeConverter = structureThemeConverter;\n this.inlineDialogService = inlineDialogService;\n }\n open(elementRef) {\n this.close();\n this.schemaWarehouse.findTheme(this.schemaReadModelRootId).ifPresent(theme => {\n this.inlineDialogService.open(elementRef, SelectCustomModalComponent, {\n injector: this.injector,\n placement: FabricPlacement.BOTTOM,\n offset: 0,\n theme: this.structureThemeConverter.convertTheme(theme),\n customClass: 'gui-inline-dialog-header-menu'\n });\n });\n }\n close() {\n this.inlineDialogService.close();\n }\n static ɵfac = function StructureSelectCustomService_Factory(t) {\n return new (t || StructureSelectCustomService)(i0.ɵɵinject(i0.Injector), i0.ɵɵinject(SchemaReadModelRootId), i0.ɵɵinject(SchemaWarehouse), i0.ɵɵinject(StructureThemeConverter), i0.ɵɵinject(i1$1.FabricInlineDialogService));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StructureSelectCustomService,\n factory: StructureSelectCustomService.ɵfac\n });\n }\n return StructureSelectCustomService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SelectAllComponent = /*#__PURE__*/(() => {\n class SelectAllComponent extends GuiComponent {\n structureId;\n formationCommandDispatcher;\n formationWarehouse;\n state = inject(GuiState);\n state$ = this.state.select();\n constructor(elementRef, structureId, formationCommandDispatcher, formationWarehouse) {\n super(elementRef);\n this.structureId = structureId;\n this.formationCommandDispatcher = formationCommandDispatcher;\n this.formationWarehouse = formationWarehouse;\n this.state.setValue({\n modeMulti: false\n });\n this.state.connect('modeMulti', this.selectModeMulti());\n this.state.connect('isAllChecked', this.selectAllChecked());\n this.state.connect('isAllIndeterminate', this.selectAllIndeterminate());\n }\n toggleSelectAll(isAllIndeterminate, isAllChecked) {\n if (isAllIndeterminate) {\n this.formationCommandDispatcher.unselectAll(this.structureId);\n } else {\n if (isAllChecked) {\n this.formationCommandDispatcher.unselectAll(this.structureId);\n } else {\n this.formationCommandDispatcher.selectAll(this.structureId);\n }\n }\n }\n getSelectorName() {\n return 'gui-select-all';\n }\n selectModeMulti() {\n return this.formationWarehouse.onMode(this.structureId).pipe(hermesMap(mode => {\n return mode === RowSelectionMode.MULTIPLE;\n }));\n }\n selectAllChecked() {\n return this.formationWarehouse.onRowSelectedReadModel(this.structureId).pipe(hermesMap(rowSelectedReadModel => {\n return rowSelectedReadModel.isAllSelected();\n }));\n }\n selectAllIndeterminate() {\n return this.formationWarehouse.onRowSelectedReadModel(this.structureId).pipe(hermesMap(rowSelectedReadModel => {\n return rowSelectedReadModel.isIndeterminate();\n }));\n }\n static ɵfac = function SelectAllComponent_Factory(t) {\n return new (t || SelectAllComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(FormationPublisher), i0.ɵɵdirectiveInject(FormationWarehouse));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: SelectAllComponent,\n selectors: [[\"div\", \"gui-select-all\", \"\"]],\n features: [i0.ɵɵProvidersFeature([GuiState]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c55,\n decls: 1,\n vars: 1,\n consts: [[4, \"guiLet\"], [3, \"checked\", \"gui-tooltip\", \"indeterminate\", \"changed\", 4, \"ngIf\"], [3, \"changed\", \"checked\", \"gui-tooltip\", \"indeterminate\"]],\n template: function SelectAllComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, SelectAllComponent_ng_container_0_Template, 2, 1, \"ng-container\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiLet\", ctx.state$);\n }\n },\n dependencies: [i4.NgIf, GuiLetDirective, i1$1.FabricCheckboxComponent, i1$1.FabricTooltipDirective],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return SelectAllComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureColumnMenuIconComponent = /*#__PURE__*/(() => {\n class StructureColumnMenuIconComponent extends IconComponent {\n constructor(elementRef, changeDetectorRef) {\n super(elementRef, changeDetectorRef);\n }\n getSelectorName() {\n return 'gui-structure-column-menu-icon';\n }\n static ɵfac = function StructureColumnMenuIconComponent_Factory(t) {\n return new (t || StructureColumnMenuIconComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureColumnMenuIconComponent,\n selectors: [[\"div\", \"gui-structure-menu-icon\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c56,\n decls: 4,\n vars: 0,\n consts: [[\"data-name\", \"Layer 1\", \"xmlns\", \"http://www.w3.org/2000/svg\", \"viewBox\", \"0 0 10.32 7.46\"], [\"x1\", \"9.57\", \"y1\", \"3.73\", \"x2\", \"0.75\", \"y2\", \"3.73\", 1, \"cls-1\"], [\"x1\", \"9.57\", \"y1\", \"0.75\", \"x2\", \"0.75\", \"y2\", \"0.75\", 1, \"cls-1\"], [\"x1\", \"9.57\", \"y1\", \"6.71\", \"x2\", \"0.75\", \"y2\", \"6.71\", 1, \"cls-1\"]],\n template: function StructureColumnMenuIconComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 0);\n i0.ɵɵelement(1, \"line\", 1)(2, \"line\", 2)(3, \"line\", 3);\n i0.ɵɵelementEnd();\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureColumnMenuIconComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureColumnConfigTriggerComponent = /*#__PURE__*/(() => {\n class StructureColumnConfigTriggerComponent extends SmartComponent {\n structureColumnConfigService;\n headerDialogContainer;\n column;\n structureColumnMenuConfigArchive = inject(StructureColumnMenuConfigArchive);\n isEnabled$ = this.selectIsEnabled();\n constructor(elementRef, changeDetectorRef, structureColumnConfigService) {\n super(changeDetectorRef, elementRef);\n this.structureColumnConfigService = structureColumnConfigService;\n }\n openConfigDialog() {\n this.structureColumnConfigService.open(this.headerDialogContainer, this.column);\n }\n getSelectorName() {\n return 'gui-structure-column-config-trigger';\n }\n selectIsEnabled() {\n return this.structureColumnMenuConfigArchive.on().pipe(hermesMap(config => {\n return config.isEnabled();\n }));\n }\n static ɵfac = function StructureColumnConfigTriggerComponent_Factory(t) {\n return new (t || StructureColumnConfigTriggerComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(StructureColumnConfigService));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureColumnConfigTriggerComponent,\n selectors: [[\"div\", \"gui-structure-column-config-trigger\", \"\"]],\n viewQuery: function StructureColumnConfigTriggerComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c57, 5, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.headerDialogContainer = _t.first);\n }\n },\n inputs: {\n column: \"column\"\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c58,\n decls: 1,\n vars: 1,\n consts: [[\"headerDialogContainer\", \"\"], [\"class\", \"gui-header-menu-icon-wrapper\", 3, \"click\", 4, \"guiIf\"], [1, \"gui-header-menu-icon-wrapper\", 3, \"click\"], [\"gui-structure-menu-icon\", \"\", 3, \"ngClass\"]],\n template: function StructureColumnConfigTriggerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, StructureColumnConfigTriggerComponent_div_0_Template, 3, 1, \"div\", 1);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiIf\", ctx.isEnabled$);\n }\n },\n dependencies: [i4.NgClass, GuiIfDirective, StructureColumnMenuIconComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureColumnConfigTriggerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureHeaderColumnsComponent = /*#__PURE__*/(() => {\n class StructureHeaderColumnsComponent extends SmartComponent {\n elementRef;\n injector;\n changeDetectorRef;\n compositionId;\n structureId;\n structureSelectCustomService;\n formationCommandDispatcher;\n sortingCommandDispatcher;\n selectCustomContainer;\n columns;\n showSelection = false;\n showCustom = true;\n constructor(elementRef, injector, changeDetectorRef, compositionId, structureId, structureSelectCustomService, formationCommandDispatcher, sortingCommandDispatcher) {\n super(changeDetectorRef, elementRef);\n this.elementRef = elementRef;\n this.injector = injector;\n this.changeDetectorRef = changeDetectorRef;\n this.compositionId = compositionId;\n this.structureId = structureId;\n this.structureSelectCustomService = structureSelectCustomService;\n this.formationCommandDispatcher = formationCommandDispatcher;\n this.sortingCommandDispatcher = sortingCommandDispatcher;\n }\n toggleSort(column) {\n if (column.isSortEnabled()) {\n this.sortingCommandDispatcher.toggleSort(column.getFieldId(), this.compositionId, this.structureId);\n }\n }\n openConfigDialog() {\n this.structureSelectCustomService.open(this.selectCustomContainer);\n }\n getSelectorName() {\n return 'gui-structure-header-columns';\n }\n static ɵfac = function StructureHeaderColumnsComponent_Factory(t) {\n return new (t || StructureHeaderColumnsComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(CompositionId), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(StructureSelectCustomService), i0.ɵɵdirectiveInject(FormationPublisher), i0.ɵɵdirectiveInject(SortingPublisher));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureHeaderColumnsComponent,\n selectors: [[\"div\", \"gui-structure-header-columns\", \"\", \"columns\", \"\"]],\n viewQuery: function StructureHeaderColumnsComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c59, 5, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.selectCustomContainer = _t.first);\n }\n },\n inputs: {\n columns: \"columns\",\n showSelection: \"showSelection\"\n },\n features: [i0.ɵɵProvidersFeature([StructureColumnConfigService, StructureSelectCustomService]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c60,\n decls: 2,\n vars: 2,\n consts: [[\"class\", \"gui-header-cell gui-row-checkbox\\n\\t gui-flex gui-justify-between\\n\\t gui-overflow-hidden gui-relative gui-py-0 gui-px-6 gui-box-border\\n\\t gui-leading-4 gui-whitespace-nowrap gui-overflow-ellipsis\", 4, \"ngIf\"], [\"class\", \"gui-header-cell gui-flex gui-justify-between\\n\\t gui-overflow-hidden gui-relative gui-py-0 gui-px-6 gui-box-border\\n\\t gui-leading-4 gui-whitespace-nowrap gui-overflow-ellipsis\", 3, \"class\", \"ngClass\", \"width\", \"style\", \"click\", 4, \"ngFor\", \"ngForOf\"], [1, \"gui-header-cell\", \"gui-row-checkbox\", \"gui-flex\", \"gui-justify-between\", \"gui-overflow-hidden\", \"gui-relative\", \"gui-py-0\", \"gui-px-6\", \"gui-box-border\", \"gui-leading-4\", \"gui-whitespace-nowrap\", \"gui-overflow-ellipsis\"], [\"gui-select-all\", \"\"], [1, \"gui-header-cell\", \"gui-flex\", \"gui-justify-between\", \"gui-overflow-hidden\", \"gui-relative\", \"gui-py-0\", \"gui-px-6\", \"gui-box-border\", \"gui-leading-4\", \"gui-whitespace-nowrap\", \"gui-overflow-ellipsis\", 3, \"click\", \"ngClass\"], [1, \"gui-header-title\"], [4, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [\"class\", \"gui-ml-6\", \"gui-structure-arrow-icon\", \"\", 3, \"position\", \"sort\", 4, \"ngIf\"], [1, \"gui-header-menu\"], [\"gui-structure-column-config-trigger\", \"\", 3, \"column\"], [\"gui-structure-arrow-icon\", \"\", 1, \"gui-ml-6\", 3, \"position\", \"sort\"]],\n template: function StructureHeaderColumnsComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, StructureHeaderColumnsComponent_div_0_Template, 2, 0, \"div\", 0)(1, StructureHeaderColumnsComponent_div_1_Template, 6, 13, \"div\", 1);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.showSelection);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx.columns);\n }\n },\n dependencies: [i4.NgClass, i4.NgForOf, i4.NgIf, i4.NgTemplateOutlet, SelectAllComponent, StructureColumnConfigTriggerComponent, StructureArrowIconComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureHeaderColumnsComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureHeaderGroupsComponent = /*#__PURE__*/(() => {\n class StructureHeaderGroupsComponent extends PureComponent {\n elementRef;\n injector;\n changeDetectorRef;\n compositionId;\n structureId;\n formationCommandDispatcher;\n sortingCommandDispatcher;\n groups;\n showGroups;\n checkboxSelection = false;\n globalSearching = false;\n constructor(elementRef, injector, changeDetectorRef, compositionId, structureId, formationCommandDispatcher, sortingCommandDispatcher) {\n super(elementRef);\n this.elementRef = elementRef;\n this.injector = injector;\n this.changeDetectorRef = changeDetectorRef;\n this.compositionId = compositionId;\n this.structureId = structureId;\n this.formationCommandDispatcher = formationCommandDispatcher;\n this.sortingCommandDispatcher = sortingCommandDispatcher;\n }\n toggleSort(column) {\n if (column.isSortEnabled()) {\n this.sortingCommandDispatcher.toggleSort(column.getFieldId(), this.compositionId, this.structureId);\n }\n }\n isSortAsc(column) {\n return column.getSortStatus() === SortOrder.ASC;\n }\n isSortDesc(column) {\n return column.getSortStatus() === SortOrder.DESC;\n }\n isGlobalSortEnabled() {\n return this.globalSearching;\n }\n getSelectorName() {\n return 'gui-structure-header-groups';\n }\n static ɵfac = function StructureHeaderGroupsComponent_Factory(t) {\n return new (t || StructureHeaderGroupsComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(CompositionId), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(FormationPublisher), i0.ɵɵdirectiveInject(SortingPublisher));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureHeaderGroupsComponent,\n selectors: [[\"div\", \"gui-structure-header-groups\", \"\", \"groups\", \"\", \"checkboxSelection\", \"\"]],\n inputs: {\n groups: \"groups\",\n showGroups: \"showGroups\",\n checkboxSelection: \"checkboxSelection\"\n },\n features: [i0.ɵɵProvidersFeature([StructureColumnConfigService]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c62,\n decls: 2,\n vars: 2,\n consts: [[\"class\", \"gui-header-cell gui-row-checkbox gui-flex gui-justify-between\\n\\t gui-overflow-hidden gui-relative gui-py-0 gui-px-6 gui-box-border\\n\\t gui-leading-4 gui-whitespace-nowrap gui-overflow-ellipsis\", 4, \"ngIf\"], [\"class\", \"gui-header-cell gui-flex gui-justify-between\\n\\t gui-overflow-hidden gui-relative gui-py-0 gui-px-6 gui-box-border\\n\\t gui-leading-4 gui-whitespace-nowrap gui-overflow-ellipsis\", 3, \"width\", 4, \"ngFor\", \"ngForOf\"], [1, \"gui-header-cell\", \"gui-row-checkbox\", \"gui-flex\", \"gui-justify-between\", \"gui-overflow-hidden\", \"gui-relative\", \"gui-py-0\", \"gui-px-6\", \"gui-box-border\", \"gui-leading-4\", \"gui-whitespace-nowrap\", \"gui-overflow-ellipsis\"], [\"gui-select-all\", \"\"], [1, \"gui-header-cell\", \"gui-flex\", \"gui-justify-between\", \"gui-overflow-hidden\", \"gui-relative\", \"gui-py-0\", \"gui-px-6\", \"gui-box-border\", \"gui-leading-4\", \"gui-whitespace-nowrap\", \"gui-overflow-ellipsis\"], [1, \"gui-header-title\"]],\n template: function StructureHeaderGroupsComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, StructureHeaderGroupsComponent_div_0_Template, 2, 0, \"div\", 0)(1, StructureHeaderGroupsComponent_div_1_Template, 3, 3, \"div\", 1);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.checkboxSelection);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx.groups);\n }\n },\n dependencies: [i4.NgForOf, i4.NgIf, SelectAllComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureHeaderGroupsComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureHeaderFiltersComponent = /*#__PURE__*/(() => {\n class StructureHeaderFiltersComponent extends PureComponent {\n structureFilterCommandService;\n formBuilder;\n cd;\n effects;\n structureId;\n columns;\n closed = new EventEmitter();\n filterFieldName = 'phrase';\n filterForm;\n filterMode = false;\n constructor(structureFilterCommandService, formBuilder, cd, effects, elementRef, structureId) {\n super(elementRef);\n this.structureFilterCommandService = structureFilterCommandService;\n this.formBuilder = formBuilder;\n this.cd = cd;\n this.effects = effects;\n this.structureId = structureId;\n this.filterForm = this.formBuilder.group({\n [this.filterFieldName]: ['']\n });\n }\n ngOnInit() {\n this.effects.register(this.selectFilterFormChanges(), f => {\n this.filter(f[this.filterFieldName]);\n });\n }\n filter(phrase) {\n if (phrase === undefined || phrase === null) {\n phrase = '';\n }\n // this.structureFilterCommandService.addFilter(this.columns[0].getFieldId(), '1', phrase, this.structureId);\n }\n clearFilters() {\n this.filterForm.reset();\n }\n turnOnFilterMode() {\n this.filterMode = true;\n this.cd.detectChanges();\n }\n turnOffFilterMode() {\n this.filterMode = false;\n this.cd.detectChanges();\n }\n getSelectorName() {\n return '';\n }\n selectFilterFormChanges() {\n return fromRxJsObservable(this.filterForm.valueChanges);\n }\n static ɵfac = function StructureHeaderFiltersComponent_Factory(t) {\n return new (t || StructureHeaderFiltersComponent)(i0.ɵɵdirectiveInject(FilterPublisher), i0.ɵɵdirectiveInject(i1$2.FormBuilder), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(GuiEffects), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(StructureId));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureHeaderFiltersComponent,\n selectors: [[\"div\", \"gui-structure-header-filters\", \"\", \"columns\", \"\"]],\n inputs: {\n columns: \"columns\"\n },\n outputs: {\n closed: \"closed\"\n },\n features: [i0.ɵɵProvidersFeature([GuiEffects]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c63,\n decls: 2,\n vars: 2,\n consts: [[4, \"ngIf\"], [\"class\", \"gui-header-cell gui-flex gui-justify-between\\n\\t gui-overflow-hidden gui-relative gui-py-0 gui-px-6 gui-box-border\\n\\t gui-leading-4 gui-whitespace-nowrap gui-overflow-ellipsis\", 3, \"width\", 4, \"ngFor\", \"ngForOf\"], [1, \"gui-header-cell\", \"gui-flex\", \"gui-justify-between\", \"gui-overflow-hidden\", \"gui-relative\", \"gui-py-0\", \"gui-px-6\", \"gui-box-border\", \"gui-leading-4\", \"gui-whitespace-nowrap\", \"gui-overflow-ellipsis\"], [3, \"click\"], [3, \"options\", \"selected\"], [3, \"formGroup\"], [\"type\", \"text\", \"gui-input\", \"\", 3, \"formControlName\"], [\"gui-button\", \"\", 3, \"click\"]],\n template: function StructureHeaderFiltersComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, StructureHeaderFiltersComponent_ng_container_0_Template, 2, 1, \"ng-container\", 0)(1, StructureHeaderFiltersComponent_ng_container_1_Template, 8, 5, \"ng-container\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", !ctx.filterMode);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.filterMode);\n }\n },\n dependencies: [i4.NgForOf, i4.NgIf, i1$2.ɵNgNoValidate, i1$2.DefaultValueAccessor, i1$2.NgControlStatus, i1$2.NgControlStatusGroup, i1$2.FormGroupDirective, i1$2.FormControlName, i1$1.FabricButtonComponent, i1$1.FabricSelectComponent, i1$1.FabricInputComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureHeaderFiltersComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureHeaderComponent = /*#__PURE__*/(() => {\n class StructureHeaderComponent extends GuiComponent {\n filterWarehouse;\n formationWarehouse;\n compositionTemplateWarehouse;\n state = inject(GuiState);\n compositionWarehouse = inject(CompositionWarehouse);\n structureId = inject(StructureId);\n compositionId = inject(CompositionId);\n verticalFormationWarehouse = inject(VerticalFormationWarehouse);\n state$ = this.state.select();\n width$ = this.compositionWarehouse.onContainerWidth(this.compositionId).pipe(hermesMap(width => {\n return {\n width\n };\n }));\n filterHeaderHeight$ = this.verticalFormationWarehouse.onRowHeight(this.structureId).pipe(hermesMap(rowHeight => {\n const headerHeight = +rowHeight + 2;\n return {\n height: headerHeight\n };\n }));\n constructor(elementRef, filterWarehouse, formationWarehouse, compositionTemplateWarehouse) {\n super(elementRef);\n this.filterWarehouse = filterWarehouse;\n this.formationWarehouse = formationWarehouse;\n this.compositionTemplateWarehouse = compositionTemplateWarehouse;\n this.state.setValue({\n headerColumns: [],\n filterRowEnabled: false,\n showGroups: false\n });\n this.state.connect('showSelection', this.selectShowSelection());\n this.state.connect('headerColumns', this.compositionTemplateWarehouse.onHeaderCols(this.compositionId));\n this.state.connect('filterRowEnabled', this.filterWarehouse.onFilteringEnabled(this.structureId));\n this.state.connect('showGroups', this.selectShowGroups());\n this.state.connect('groups', this.selectGroups());\n }\n getSelectorName() {\n return 'gui-structure-header';\n }\n selectGroups() {\n return this.compositionWarehouse.onGroups(this.compositionId).pipe(hermesMap(collection => collection.getGroups()));\n }\n selectShowGroups() {\n return this.compositionWarehouse.onGroups(this.compositionId).pipe(hermesMap(collection => collection.isVisible()));\n }\n selectShowSelection() {\n return this.formationWarehouse.onType(this.structureId).pipe(hermesMap(type => {\n return type === RowSelectionType.CHECKBOX || type === RowSelectionType.RADIO;\n }));\n }\n static ɵfac = function StructureHeaderComponent_Factory(t) {\n return new (t || StructureHeaderComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(FilterWarehouse), i0.ɵɵdirectiveInject(FormationWarehouse), i0.ɵɵdirectiveInject(CompositionTemplateWarehouse));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureHeaderComponent,\n selectors: [[\"div\", \"gui-structure-header\", \"\"]],\n features: [i0.ɵɵProvidersFeature([GuiState]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c65,\n decls: 3,\n vars: 3,\n consts: [[4, \"guiLet\"], [\"class\", \"gui-header\", \"gui-structure-header-columns\", \"\", 3, \"columns\", \"guiStyle\", \"showSelection\", 4, \"guiLet\"], [\"class\", \"gui-header\", \"gui-structure-header-groups\", \"\", 3, \"checkboxSelection\", \"groups\", 4, \"ngIf\"], [\"gui-structure-header-groups\", \"\", 1, \"gui-header\", 3, \"checkboxSelection\", \"groups\"], [\"gui-structure-header-columns\", \"\", 1, \"gui-header\", 3, \"columns\", \"guiStyle\", \"showSelection\"], [\"class\", \"gui-header\", \"gui-structure-header-filters\", \"\", 3, \"columns\", \"guiStyle\", 4, \"ngIf\"], [\"gui-structure-header-filters\", \"\", 1, \"gui-header\", 3, \"columns\", \"guiStyle\"]],\n template: function StructureHeaderComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, StructureHeaderComponent_ng_container_0_Template, 2, 1, \"ng-container\", 0)(1, StructureHeaderComponent_div_1_Template, 1, 3, \"div\", 1)(2, StructureHeaderComponent_ng_container_2_Template, 2, 1, \"ng-container\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiLet\", ctx.state$);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"guiLet\", ctx.state$);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"guiLet\", ctx.state$);\n }\n },\n dependencies: [i4.NgIf, GuiLetDirective, GuiStyleDirective, StructureHeaderColumnsComponent, StructureHeaderGroupsComponent, StructureHeaderFiltersComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureHeaderComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ResizeDetector = /*#__PURE__*/(() => {\n class ResizeDetector {\n platformId;\n constructor(platformId) {\n this.platformId = platformId;\n }\n on(element) {\n if (isPlatformBrowser(this.platformId)) {\n return fromRxJsObservable(new Observable(observer => {\n const resizeObserver = new ResizeObserver(entries => {\n if (entries && entries.length > 0) {\n observer.next(entries[0].contentRect);\n }\n });\n resizeObserver.observe(element);\n return () => resizeObserver.disconnect();\n }).pipe(throttleTime(25)));\n }\n return hermesEmpty();\n }\n destroy(element) {}\n static ɵfac = function ResizeDetector_Factory(t) {\n return new (t || ResizeDetector)(i0.ɵɵinject(PLATFORM_ID));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ResizeDetector,\n factory: ResizeDetector.ɵfac\n });\n }\n return ResizeDetector;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar RowSelectToggleType = /*#__PURE__*/function (RowSelectToggleType) {\n RowSelectToggleType[RowSelectToggleType[\"NONE\"] = 0] = \"NONE\";\n RowSelectToggleType[RowSelectToggleType[\"ADD\"] = 1] = \"ADD\";\n RowSelectToggleType[RowSelectToggleType[\"RANGE\"] = 2] = \"RANGE\";\n return RowSelectToggleType;\n}(RowSelectToggleType || {});\nclass ChangedValueEmitter {\n subject$ = new HermesReplaySubject(1);\n constructor() {}\n emit(value) {\n this.subject$.next(value);\n }\n on() {\n return this.subject$.toObservable();\n }\n}\nclass StructureEditSourceItemParams {\n itemId;\n columnFieldId;\n value;\n constructor(itemId, columnFieldId,\n // TODO Rethink\n value) {\n this.itemId = itemId;\n this.columnFieldId = columnFieldId;\n this.value = value;\n }\n getItemId() {\n return this.itemId;\n }\n getColumnFieldId() {\n return this.columnFieldId;\n }\n getValue() {\n return this.value;\n }\n}\nlet StructureCellEditBooleanComponent = /*#__PURE__*/(() => {\n class StructureCellEditBooleanComponent extends SmartComponent {\n changeDetectorRef;\n structureId;\n sourceCommandService;\n cellContainerRef;\n entity;\n cell;\n editContext;\n valueChanges$;\n status$;\n actualValue;\n constructor(changeDetectorRef, elementRef, structureId, sourceCommandService) {\n super(changeDetectorRef, elementRef);\n this.changeDetectorRef = changeDetectorRef;\n this.structureId = structureId;\n this.sourceCommandService = sourceCommandService;\n }\n ngOnChanges(changes) {\n ifChanged(changes.entity, () => {\n this.initEditContext();\n });\n ifChanged(changes.cell, () => {\n this.initEditContext();\n });\n }\n ngOnInit() {\n this.initEditContext();\n }\n getSelectorName() {\n return 'gui-structure-cell-edit-boolean';\n }\n submitChanges() {\n const itemId = this.entity.getId(),\n updatedValue = this.actualValue,\n fieldId = this.cell.columnFieldId;\n this.sourceCommandService.editItem(new StructureEditSourceItemParams(itemId, fieldId, updatedValue), this.structureId);\n }\n initEditContext() {\n this.valueChanges$ = new ChangedValueEmitter();\n this.status$ = new ChangedValueEmitter();\n this.editContext = {\n status: this.status$,\n valueChanges: this.valueChanges$,\n value: this.cell.getValue(this.entity).value,\n focus: false,\n parent: this.cellContainerRef\n };\n this.observeValueChanges();\n this.status$.on().pipe(this.takeUntil()).subscribe(status => {\n switch (status) {\n case EditEventType.SUBMIT:\n this.submitChanges();\n break;\n default:\n break;\n }\n });\n }\n observeValueChanges() {\n this.valueChanges$.on().pipe(this.takeUntil()).subscribe(value => {\n this.actualValue = value;\n });\n }\n static ɵfac = function StructureCellEditBooleanComponent_Factory(t) {\n return new (t || StructureCellEditBooleanComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(SourcePublisher));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureCellEditBooleanComponent,\n selectors: [[\"div\", \"gui-structure-cell-edit-boolean\", \"\", \"entity\", \"\", \"cell\", \"\"]],\n viewQuery: function StructureCellEditBooleanComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c66, 7);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.cellContainerRef = _t.first);\n }\n },\n inputs: {\n entity: \"entity\",\n cell: \"cell\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c67,\n decls: 3,\n vars: 2,\n consts: [[\"cellContainer\", \"\"], [4, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"]],\n template: function StructureCellEditBooleanComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", null, 0);\n i0.ɵɵtemplate(2, StructureCellEditBooleanComponent_ng_container_2_Template, 1, 0, \"ng-container\", 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx.cell.editTemplate)(\"ngTemplateOutletContext\", ctx.editContext);\n }\n },\n dependencies: [i4.NgTemplateOutlet],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureCellEditBooleanComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureCellComponent = /*#__PURE__*/(() => {\n class StructureCellComponent extends SmartComponent {\n changeDetectorRef;\n elementRef;\n structureId;\n compositionId;\n structureCellEditStore;\n cellEditCloseAllService;\n sourceCommandService;\n compositionWarehouse;\n entity;\n cell;\n editMode;\n cellEditorManager;\n searchPhrase;\n rowIndex;\n columnIndex;\n inEditMode = false;\n editContext;\n valueChanges$;\n status$;\n actualValue;\n isHighlighted;\n constructor(changeDetectorRef, elementRef, structureId, compositionId, structureCellEditStore, cellEditCloseAllService, sourceCommandService, compositionWarehouse) {\n super(changeDetectorRef, elementRef);\n this.changeDetectorRef = changeDetectorRef;\n this.elementRef = elementRef;\n this.structureId = structureId;\n this.compositionId = compositionId;\n this.structureCellEditStore = structureCellEditStore;\n this.cellEditCloseAllService = cellEditCloseAllService;\n this.sourceCommandService = sourceCommandService;\n this.compositionWarehouse = compositionWarehouse;\n }\n ngOnInit() {\n this.subscribe(this.compositionWarehouse.onHighlightedColumn(new ColumnId(this.cell.columnDefinitionId.toString()), this.compositionId), value => {\n this.isHighlighted = value;\n });\n }\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this.subscribeWithoutRender(this.cellEditCloseAllService.onCloseAll(), () => {\n this.exitEditMode();\n });\n }\n isCellEditingEnabled() {\n return this.cellEditorManager.isEnabled(this.cell.getValue(this.entity), this.entity.getSourceItem(), this.rowIndex) && this.cell.isCellEditingEnabled();\n }\n enterEditMode(forceCheck = true) {\n if (!this.isCellEditingEnabled()) {\n return;\n }\n this.cellEditCloseAllService.closeAll();\n hermesTimer(0).pipe(this.takeUntil()).subscribe(() => {\n this.inEditMode = true;\n this.valueChanges$ = new ChangedValueEmitter();\n this.status$ = new ChangedValueEmitter();\n this.editContext = {\n status: this.status$,\n valueChanges: this.valueChanges$,\n value: this.cell.getValue(this.entity).value,\n focus: forceCheck,\n parent: this.elementRef\n };\n this.observeFieldStatus();\n this.observeValueChanges();\n this.publishEditEnter();\n if (!forceCheck) {\n this.changeDetectorRef.markForCheck();\n } else {\n this.changeDetectorRef.detectChanges();\n }\n });\n }\n exitEditMode() {\n this.inEditMode = false;\n this.changeDetectorRef.detectChanges();\n }\n submitChangesAndExit() {\n const itemId = this.entity.getId(),\n updatedValue = this.actualValue,\n fieldId = this.cell.columnFieldId;\n this.sourceCommandService.editItem(new StructureEditSourceItemParams(itemId, fieldId, updatedValue), this.structureId);\n this.exitEditMode();\n }\n getSelectorName() {\n return 'gui-structure-cell';\n }\n observeFieldStatus() {\n this.status$.on().pipe(this.takeUntil()).subscribe(status => {\n switch (status) {\n case EditEventType.SUBMIT:\n this.submitChangesAndExit();\n this.publishEditSubmit();\n break;\n case EditEventType.CANCEL:\n this.exitEditMode();\n this.publishEditCancel();\n break;\n default:\n break;\n }\n });\n }\n observeValueChanges() {\n this.valueChanges$.on().pipe(this.takeUntil()).subscribe(value => {\n this.actualValue = value;\n });\n }\n publishEditState(state) {\n this.structureCellEditStore.next(state);\n }\n publishEditEnter() {\n this.publishEditState(StructureCellEditState.ENTER);\n }\n publishEditCancel() {\n this.publishEditState(StructureCellEditState.CANCEL);\n }\n publishEditSubmit() {\n this.publishEditState(StructureCellEditState.SUBMIT);\n }\n static ɵfac = function StructureCellComponent_Factory(t) {\n return new (t || StructureCellComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(CompositionId), i0.ɵɵdirectiveInject(StructureCellEditStore), i0.ɵɵdirectiveInject(StructureCellEditCloseAllService), i0.ɵɵdirectiveInject(SourcePublisher), i0.ɵɵdirectiveInject(CompositionWarehouse));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureCellComponent,\n selectors: [[\"div\", \"gui-structure-cell\", \"\", \"entity\", \"\", \"cell\", \"\"]],\n inputs: {\n entity: \"entity\",\n cell: \"cell\",\n editMode: \"editMode\",\n cellEditorManager: \"cellEditorManager\",\n searchPhrase: \"searchPhrase\",\n rowIndex: \"rowIndex\",\n columnIndex: \"columnIndex\"\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c68,\n decls: 2,\n vars: 2,\n consts: [[4, \"ngIf\"], [3, \"ngClass\", \"click\", 4, \"ngIf\"], [\"class\", \"gui-cell-edit-mode\", 4, \"ngIf\"], [3, \"click\", \"ngClass\"], [4, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [1, \"gui-cell-edit-mode\"], [\"gui-structure-cell-edit-boolean\", \"\", 3, \"cell\", \"entity\"]],\n template: function StructureCellComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, StructureCellComponent_ng_container_0_Template, 3, 2, \"ng-container\", 0)(1, StructureCellComponent_ng_container_1_Template, 2, 2, \"ng-container\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", !ctx.cell.isBooleanDataType() || ctx.cell.isBooleanDataType() && !ctx.isCellEditingEnabled());\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.cell.isBooleanDataType() && ctx.isCellEditingEnabled());\n }\n },\n dependencies: [i4.NgClass, i4.NgIf, i4.NgTemplateOutlet, StructureCellEditBooleanComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureCellComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureRowComponent = /*#__PURE__*/(() => {\n class StructureRowComponent extends SmartComponent {\n changeDetectorRef;\n elRef;\n structureId;\n formationWarehouse;\n formationCommandDispatcher;\n cssClassModifier;\n entity;\n columns;\n editMode;\n cellEditing;\n searchPhrase;\n index;\n rowStyle;\n rowClass;\n checkboxSelection = false;\n radioSelection = false;\n selectedItem = false;\n row;\n styleModifier;\n classModifier;\n constructor(changeDetectorRef, elRef, structureId, formationWarehouse, formationCommandDispatcher, cssClassModifier) {\n super(changeDetectorRef, elRef);\n this.changeDetectorRef = changeDetectorRef;\n this.elRef = elRef;\n this.structureId = structureId;\n this.formationWarehouse = formationWarehouse;\n this.formationCommandDispatcher = formationCommandDispatcher;\n this.cssClassModifier = cssClassModifier;\n this.styleModifier = new StyleModifier(this.elRef.nativeElement);\n this.classModifier = new ClassModifier(this.elRef.nativeElement);\n }\n ngOnChanges(changes) {\n ifChanged(changes.entity, () => {\n this.checkSelectedItem();\n this.updateRowClass(changes.entity.previousValue);\n this.updateRowStyle(changes.entity.previousValue);\n });\n ifChanged(changes.rowClass, () => {\n this.updateRowClass();\n });\n ifChanged(changes.rowStyle, () => {\n this.updateRowStyle();\n });\n }\n ngOnInit() {\n this.subscribeWithoutRender(this.formationWarehouse.onRowSelectedReadModel(this.structureId), row => {\n this.row = row;\n const prevValue = this.selectedItem;\n this.checkSelectedItem();\n if (prevValue !== this.selectedItem) {\n if (prevValue) {\n this.cssClassModifier.unselect(this.elRef.nativeElement);\n } else {\n this.cssClassModifier.select(this.elRef.nativeElement);\n }\n this.changeDetectorRef.detectChanges();\n }\n });\n }\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this.updateRowClass();\n this.updateRowStyle();\n }\n trackByFn() {\n return 0;\n }\n selectCheckbox() {\n event.stopPropagation();\n this.formationCommandDispatcher.toggleSelectedRow(this.entity.getId(), RowSelectToggleType.ADD, this.structureId);\n }\n selectRadio() {\n event.stopPropagation();\n this.formationCommandDispatcher.toggleSelectedRow(this.entity.getId(), RowSelectToggleType.NONE, this.structureId);\n }\n checkSelectedItem() {\n if (this.row) {\n const prevValue = this.selectedItem;\n this.selectedItem = this.row.isSelected(this.entity.getId());\n if (prevValue !== this.selectedItem) {\n if (prevValue) {\n this.cssClassModifier.unselect(this.elRef.nativeElement);\n } else {\n this.cssClassModifier.select(this.elRef.nativeElement);\n }\n }\n }\n }\n getSelectorName() {\n return 'gui-structure-row';\n }\n calculateRowStyle(entity) {\n if (!this.rowStyle) {\n return '';\n }\n if (typeof this.rowStyle.style === 'string') {\n return this.rowStyle.style || '';\n }\n if (typeof this.rowStyle.styleFunction === 'function') {\n return this.rowStyle.styleFunction(entity.getSourceItem(), entity.getPosition());\n }\n return '';\n }\n updateRowStyle(prevEntity) {\n if (prevEntity) {\n const rowStylesToRemove = this.calculateRowStyle(prevEntity);\n this.removeRowStyles(rowStylesToRemove);\n }\n const rowStylesToAdd = this.calculateRowStyle(this.entity);\n this.renderRowStyles(rowStylesToAdd);\n }\n removeRowStyles(rowStyle) {\n if (!rowStyle) {\n return;\n }\n const styles = rowStyle.split(';');\n for (let i = 0; i < styles.length; i += 1) {\n const separatedStyles = styles[i].split(':');\n if (separatedStyles[0] && separatedStyles[1]) {\n this.styleModifier.getHost().removeStyleByName(separatedStyles[0].trim());\n }\n }\n }\n renderRowStyles(rowStyle) {\n if (!rowStyle) {\n return;\n }\n const styles = rowStyle.split(';');\n for (let i = 0; i < styles.length; i += 1) {\n const separatedStyles = styles[i].split(':');\n if (separatedStyles[0] && separatedStyles[1]) {\n this.styleModifier.getHost().setStyleByName(separatedStyles[0].trim(), separatedStyles[1].trim());\n }\n }\n }\n updateRowClass(prevEntity) {\n if (prevEntity) {\n const toRemoveClass = this.calculateRowClass(prevEntity);\n if (toRemoveClass) {\n this.classModifier.getHost().remove(toRemoveClass);\n }\n }\n const toAddClass = this.calculateRowClass(this.entity);\n if (toAddClass) {\n this.classModifier.getHost().add(toAddClass);\n }\n }\n calculateRowClass(entity) {\n if (!this.rowClass) {\n return '';\n }\n let clazz;\n if (typeof this.rowClass.class === 'string') {\n clazz = this.rowClass.class || '';\n }\n if (typeof this.rowClass.classFunction === 'function') {\n if (entity) {\n clazz = this.rowClass.classFunction(entity.getSourceItem(), entity.getPosition()) || '';\n }\n }\n return clazz;\n }\n static ɵfac = function StructureRowComponent_Factory(t) {\n return new (t || StructureRowComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(FormationWarehouse), i0.ɵɵdirectiveInject(FormationPublisher), i0.ɵɵdirectiveInject(CssClassModifier));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureRowComponent,\n selectors: [[\"div\", \"gui-structure-row\", \"\"]],\n inputs: {\n entity: \"entity\",\n columns: \"columns\",\n editMode: \"editMode\",\n cellEditing: \"cellEditing\",\n searchPhrase: \"searchPhrase\",\n index: \"index\",\n rowStyle: \"rowStyle\",\n rowClass: \"rowClass\",\n checkboxSelection: \"checkboxSelection\",\n radioSelection: \"radioSelection\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c71,\n decls: 3,\n vars: 4,\n consts: [[\"class\", \"gui-cell gui-row-checkbox\", 4, \"ngIf\"], [\"class\", \"gui-cell gui-row-radio\", 4, \"ngIf\"], [\"class\", \"gui-cell\", \"gui-structure-cell\", \"\", 3, \"cellEditorManager\", \"cell\", \"columnIndex\", \"editMode\", \"entity\", \"rowIndex\", \"searchPhrase\", \"width\", 4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [1, \"gui-cell\", \"gui-row-checkbox\"], [3, \"changed\", \"checked\"], [1, \"gui-cell\", \"gui-row-radio\"], [\"gui-structure-cell\", \"\", 1, \"gui-cell\", 3, \"cellEditorManager\", \"cell\", \"columnIndex\", \"editMode\", \"entity\", \"rowIndex\", \"searchPhrase\"]],\n template: function StructureRowComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, StructureRowComponent_div_0_Template, 2, 1, \"div\", 0)(1, StructureRowComponent_div_1_Template, 2, 1, \"div\", 1)(2, StructureRowComponent_div_2_Template, 1, 9, \"div\", 2);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.checkboxSelection);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.radioSelection);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx.columns)(\"ngForTrackBy\", ctx.trackByFn);\n }\n },\n dependencies: [i4.NgForOf, i4.NgIf, i1$1.FabricCheckboxComponent, i1$1.FabricRadioButtonComponent, StructureCellComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureRowComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureContentComponent = /*#__PURE__*/(() => {\n class StructureContentComponent extends SmartComponent {\n formationPublisher;\n structureEditModeArchive;\n formationWarehouse;\n structureWarehouse;\n verticalFormationWarehouse;\n structureId;\n schemaReadModelRootId;\n searchWarehouse;\n schemaWarehouse;\n source;\n columns;\n state = inject(GuiState);\n state$ = this.state.select();\n constructor(elementRef, changeDetectorRef, formationPublisher, structureEditModeArchive, formationWarehouse, structureWarehouse, verticalFormationWarehouse, structureId, schemaReadModelRootId, searchWarehouse, schemaWarehouse) {\n super(changeDetectorRef, elementRef);\n this.formationPublisher = formationPublisher;\n this.structureEditModeArchive = structureEditModeArchive;\n this.formationWarehouse = formationWarehouse;\n this.structureWarehouse = structureWarehouse;\n this.verticalFormationWarehouse = verticalFormationWarehouse;\n this.structureId = structureId;\n this.schemaReadModelRootId = schemaReadModelRootId;\n this.searchWarehouse = searchWarehouse;\n this.schemaWarehouse = schemaWarehouse;\n this.state.setValue({\n checkboxSelection: false,\n radioSelection: false,\n searchPhrase: ''\n });\n this.state.connect('editMode', this.structureEditModeArchive.on());\n this.state.connect('selectionEnabled', this.formationWarehouse.onSelectionEnabled(this.structureId));\n this.state.connect('rowHeight', this.verticalFormationWarehouse.onRowHeight(this.structureId));\n this.state.connect('cellEditing', this.structureWarehouse.onEditManager(this.structureId));\n this.state.connect('schemaRowClass', this.schemaWarehouse.onRowClass(this.schemaReadModelRootId));\n this.state.connect('schemaRowStyle', this.schemaWarehouse.onRowStyle(this.schemaReadModelRootId));\n this.state.connect('checkboxSelection', this.selectCheckboxSelection());\n this.state.connect('radioSelection', this.selectRadioSelection());\n this.state.connect('searchPhrase', this.selectSearchPhrase());\n }\n trackByFn() {\n return 0;\n }\n translateY(index, rowHeight) {\n const height = index * rowHeight;\n return `translateY(${height}px)`;\n }\n toggleSelectedRow(entity, selectionEnabled, checkboxSelection, radioSelection) {\n if (!selectionEnabled) {\n return;\n }\n if (!checkboxSelection && !radioSelection) {\n this.formationPublisher.toggleSelectedRow(entity.getId(), RowSelectToggleType.NONE, this.structureId);\n }\n }\n getSelectorName() {\n return 'gui-structure-content';\n }\n selectCheckboxSelection() {\n return this.formationWarehouse.onType(this.structureId).pipe(hermesMap(type => {\n return type === RowSelectionType.CHECKBOX;\n }));\n }\n selectRadioSelection() {\n return this.formationWarehouse.onType(this.structureId).pipe(hermesMap(type => {\n return type === RowSelectionType.RADIO;\n }));\n }\n selectSearchPhrase() {\n return fromRxJsObservable(combineLatest(toRxJsObservable(this.searchWarehouse.onPhrase(this.structureId)), toRxJsObservable(this.searchWarehouse.onHighlight(this.structureId)))).pipe(hermesMap(([phrase, highlighting]) => {\n if (!highlighting) {\n return '';\n } else {\n return phrase;\n }\n }));\n }\n static ɵfac = function StructureContentComponent_Factory(t) {\n return new (t || StructureContentComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(FormationPublisher), i0.ɵɵdirectiveInject(StructureEditModeArchive), i0.ɵɵdirectiveInject(FormationWarehouse), i0.ɵɵdirectiveInject(StructureWarehouse), i0.ɵɵdirectiveInject(VerticalFormationWarehouse), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(SchemaReadModelRootId), i0.ɵɵdirectiveInject(SearchWarehouse), i0.ɵɵdirectiveInject(SchemaWarehouse));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureContentComponent,\n selectors: [[\"div\", \"gui-structure-content\", \"\"]],\n inputs: {\n source: \"source\",\n columns: \"columns\"\n },\n features: [i0.ɵɵProvidersFeature([GuiState]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c72,\n decls: 1,\n vars: 1,\n consts: [[\"class\", \"gui-content\", 4, \"guiLet\"], [1, \"gui-content\"], [\"class\", \"gui-row\", \"gui-structure-row\", \"\", 3, \"cellEditing\", \"checkboxSelection\", \"columns\", \"editMode\", \"entity\", \"id\", \"index\", \"ngClass\", \"ngStyle\", \"radioSelection\", \"rowClass\", \"rowStyle\", \"searchPhrase\", \"height\", \"click\", 4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [\"gui-structure-row\", \"\", 1, \"gui-row\", 3, \"click\", \"cellEditing\", \"checkboxSelection\", \"columns\", \"editMode\", \"entity\", \"id\", \"index\", \"ngClass\", \"ngStyle\", \"radioSelection\", \"rowClass\", \"rowStyle\", \"searchPhrase\"]],\n template: function StructureContentComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, StructureContentComponent_div_0_Template, 2, 2, \"div\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiLet\", ctx.state$);\n }\n },\n dependencies: [i4.NgClass, i4.NgForOf, i4.NgStyle, GuiLetDirective, StructureRowComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureContentComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureContainerComponent = /*#__PURE__*/(() => {\n class StructureContainerComponent extends SmartComponent {\n elRef;\n ngZone;\n structureId;\n compositionId;\n structureCommandService;\n structureWarehouse;\n verticalFormationWarehouse;\n sourceWarehouse;\n compositionCommandInvoker;\n compositionWarehouse;\n compositionTemplateWarehouse;\n formationWarehouse;\n resizeDetector;\n structureInitialValuesReadyArchive;\n structureParent;\n sourceCollectionRef;\n columns = [];\n source = [];\n height;\n rowColoring;\n autoResizeWidthEnabled = false;\n scrollObservation$ = new HermesSubject();\n styleModifier;\n constructor(changeDetectorRef, elRef, ngZone, structureId, compositionId, structureCommandService, structureWarehouse, verticalFormationWarehouse, sourceWarehouse, compositionCommandInvoker, compositionWarehouse, compositionTemplateWarehouse, formationWarehouse, resizeDetector, structureInitialValuesReadyArchive, structureParent) {\n super(changeDetectorRef, elRef);\n this.elRef = elRef;\n this.ngZone = ngZone;\n this.structureId = structureId;\n this.compositionId = compositionId;\n this.structureCommandService = structureCommandService;\n this.structureWarehouse = structureWarehouse;\n this.verticalFormationWarehouse = verticalFormationWarehouse;\n this.sourceWarehouse = sourceWarehouse;\n this.compositionCommandInvoker = compositionCommandInvoker;\n this.compositionWarehouse = compositionWarehouse;\n this.compositionTemplateWarehouse = compositionTemplateWarehouse;\n this.formationWarehouse = formationWarehouse;\n this.resizeDetector = resizeDetector;\n this.structureInitialValuesReadyArchive = structureInitialValuesReadyArchive;\n this.structureParent = structureParent;\n this.styleModifier = new StyleModifier(this.elRef.nativeElement);\n }\n ngOnInit() {\n this.subscribeWithoutRender(this.verticalFormationWarehouse.onContainerHeight(this.structureId), containerHeight => {\n this.setContainerHeight(containerHeight);\n });\n this.subscribe(fromRxJsObservable(toRxJsObservable(this.structureInitialValuesReadyArchive.once(this.structureId)).pipe(flatMap(() => {\n return combineLatest(toRxJsObservable(this.sourceWarehouse.onItems(this.structureId)), toRxJsObservable(this.compositionTemplateWarehouse.onTemplateCols(this.compositionId)));\n }))), arr => {\n this.source = arr[0];\n this.columns = arr[1];\n });\n this.subscribeWithoutRender(this.compositionWarehouse.onResizeWidth(this.compositionId), enabled => {\n this.autoResizeWidthEnabled = enabled;\n });\n }\n ngAfterViewInit() {\n super.ngAfterViewInit();\n // turn on when structure is ready\n if (this.structureParent) {\n this.subscribeWithoutRender(this.resizeDetector.on(this.structureParent.getElementRef().nativeElement).pipe(hermesFilter(() => this.autoResizeWidthEnabled), hermesMap(size => size.width), hermesDistinctUntilChanged()), width => {\n this.recalculateContainer(width);\n });\n }\n this.subscribeWithoutRender(this.compositionWarehouse.onContainerWidth(this.compositionId), width => {\n this.styleModifier.getElement(this.sourceCollectionRef.nativeElement).setWidth(width);\n });\n this.subscribeWithoutRender(this.verticalFormationWarehouse.onEnabled(this.structureId), enabled => {\n if (enabled) {\n this.enableScrollObservation();\n } else {\n this.disableScrollObservation();\n }\n });\n this.subscribeWithoutRender(this.structureWarehouse.on(this.structureId).pipe(hermesFilter(str => {\n return str.isVerticalScrollEnabled();\n })), structure => {\n const topMargin = structure.getTopMargin(),\n sourceHeight = structure.getSourceHeight();\n this.setSourceHeight(topMargin, sourceHeight);\n });\n this.subscribeWithoutRender(this.verticalFormationWarehouse.onScrollBarPosition(this.structureId), scrollPosition => {\n this.elRef.nativeElement.scrollTop = scrollPosition;\n });\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n this.resizeDetector.destroy(this.elRef.nativeElement);\n }\n getSelectorName() {\n return 'gui-structure-container';\n }\n setContainerHeight(height) {\n this.height = height;\n this.styleModifier.getHost().setHeight(height);\n }\n setSourceHeight(topMargin, sourceHeight) {\n this.styleModifier.getElement(this.sourceCollectionRef.nativeElement).setPaddingTop(topMargin);\n this.styleModifier.getElement(this.sourceCollectionRef.nativeElement).setHeight(sourceHeight);\n }\n recalculateContainer(width) {\n if (this.autoResizeWidthEnabled) {\n this.compositionCommandInvoker.setContainerWidth(width, this.compositionId);\n }\n }\n enableScrollObservation() {\n this.ngZone.runOutsideAngular(() => {\n hermesFromEvent(this.elRef.nativeElement, 'scroll').pipe(hermesTakeUntil(this.scrollObservation$)).subscribe(event => {\n const scrollTop = event.target.scrollTop;\n this.structureCommandService.setScrollPosition(scrollTop, this.structureId);\n });\n });\n }\n disableScrollObservation() {\n this.scrollObservation$.next();\n this.scrollObservation$.complete();\n }\n static ɵfac = function StructureContainerComponent_Factory(t) {\n return new (t || StructureContainerComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(CompositionId), i0.ɵɵdirectiveInject(StructurePublisher), i0.ɵɵdirectiveInject(StructureWarehouse), i0.ɵɵdirectiveInject(VerticalFormationWarehouse), i0.ɵɵdirectiveInject(SourceWarehouse), i0.ɵɵdirectiveInject(CompositionPublisher), i0.ɵɵdirectiveInject(CompositionWarehouse), i0.ɵɵdirectiveInject(CompositionTemplateWarehouse), i0.ɵɵdirectiveInject(FormationWarehouse), i0.ɵɵdirectiveInject(ResizeDetector), i0.ɵɵdirectiveInject(StructureInitialValuesReadyArchive), i0.ɵɵdirectiveInject(structureParentComponent, 8));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureContainerComponent,\n selectors: [[\"div\", \"gui-structure-container\", \"\"]],\n viewQuery: function StructureContainerComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c75, 5, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.sourceCollectionRef = _t.first);\n }\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c76,\n decls: 3,\n vars: 2,\n consts: [[\"sourceCollection\", \"\"], [1, \"gui-h-full\", \"gui-w-full\", \"gui-absolute\", \"gui-structure-container-element\"], [\"gui-structure-content\", \"\", 3, \"columns\", \"source\"]],\n template: function StructureContainerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 1, 0);\n i0.ɵɵelement(2, \"div\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"columns\", ctx.columns)(\"source\", ctx.source);\n }\n },\n dependencies: [StructureContentComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureContainerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureBannerPanel = /*#__PURE__*/(() => {\n class StructureBannerPanel extends SmartComponent {\n bannerPanel$;\n constructor(changeDetectorRef, elementRef) {\n super(changeDetectorRef, elementRef);\n }\n initObservables() {\n this.bannerPanel$ = this.selectBannerPanelTemplate();\n }\n selectBannerPanelTemplate() {\n return this.onBannerPanelConfig().pipe(hermesMap(config => {\n if (typeof config.template === 'function') {\n return config.template();\n }\n return config.template;\n }));\n }\n static ɵfac = function StructureBannerPanel_Factory(t) {\n return new (t || StructureBannerPanel)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureBannerPanel,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n return StructureBannerPanel;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureTitlePanelComponent = /*#__PURE__*/(() => {\n class StructureTitlePanelComponent extends StructureBannerPanel {\n structureTitlePanelConfigArchive;\n constructor(structureTitlePanelConfigArchive, changeDetectorRef, elementRef) {\n super(changeDetectorRef, elementRef);\n this.structureTitlePanelConfigArchive = structureTitlePanelConfigArchive;\n this.initObservables();\n }\n onBannerPanelConfig() {\n return this.structureTitlePanelConfigArchive.on();\n }\n getSelectorName() {\n return 'gui-structure-title-panel';\n }\n static ɵfac = function StructureTitlePanelComponent_Factory(t) {\n return new (t || StructureTitlePanelComponent)(i0.ɵɵdirectiveInject(StructureTitlePanelConfigArchive), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureTitlePanelComponent,\n selectors: [[\"div\", \"gui-structure-title-panel\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c77,\n decls: 3,\n vars: 6,\n consts: [[1, \"gui-title-panel\", \"gui-p-6\", \"gui-border-b\", \"gui-border-b-solid\", 3, \"innerHTML\"]],\n template: function StructureTitlePanelComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n i0.ɵɵpipe(1, \"guiPush\");\n i0.ɵɵpipe(2, \"guiSafe\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"innerHTML\", i0.ɵɵpipeBind2(2, 3, i0.ɵɵpipeBind1(1, 1, ctx.bannerPanel$), \"html\"), i0.ɵɵsanitizeHtml);\n }\n },\n dependencies: [GuiPushPipe, SafePipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureTitlePanelComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureFooterPanelComponent = /*#__PURE__*/(() => {\n class StructureFooterPanelComponent extends StructureBannerPanel {\n structureFooterPanelConfigArchive;\n constructor(structureFooterPanelConfigArchive, changeDetectorRef, elementRef) {\n super(changeDetectorRef, elementRef);\n this.structureFooterPanelConfigArchive = structureFooterPanelConfigArchive;\n this.initObservables();\n }\n onBannerPanelConfig() {\n return this.structureFooterPanelConfigArchive.on();\n }\n getSelectorName() {\n return 'gui-structure-footer-panel';\n }\n static ɵfac = function StructureFooterPanelComponent_Factory(t) {\n return new (t || StructureFooterPanelComponent)(i0.ɵɵdirectiveInject(StructureFooterPanelConfigArchive), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureFooterPanelComponent,\n selectors: [[\"div\", \"gui-structure-footer-panel\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c78,\n decls: 3,\n vars: 6,\n consts: [[1, \"gui-footer-panel\", \"gui-p-6\", \"gui-border-t\", \"gui-border-t-solid\", 3, \"innerHTML\"]],\n template: function StructureFooterPanelComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n i0.ɵɵpipe(1, \"guiPush\");\n i0.ɵɵpipe(2, \"guiSafe\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"innerHTML\", i0.ɵɵpipeBind2(2, 3, i0.ɵɵpipeBind1(1, 1, ctx.bannerPanel$), \"html\"), i0.ɵɵsanitizeHtml);\n }\n },\n dependencies: [GuiPushPipe, SafePipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureFooterPanelComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureBlueprintComponent = /*#__PURE__*/(() => {\n class StructureBlueprintComponent extends SmartComponent {\n structureDefinition;\n className;\n structureId = inject(StructureId);\n summariesWarehouse = inject(SummariesWarehouse);\n structureHeaderTopEnabledArchive = inject(StructureHeaderTopEnabledArchive);\n structureHeaderBottomEnabledArchive = inject(StructureHeaderBottomEnabledArchive);\n searchWarehouse = inject(SearchWarehouse);\n pagingWarehouse = inject(PagingWarehouse);\n structureWarehouse = inject(StructureWarehouse);\n structureInfoPanelArchive = inject(StructureInfoPanelArchive);\n structureTitlePanelConfigArchive = inject(StructureTitlePanelConfigArchive);\n structureFooterPanelConfigArchive = inject(StructureFooterPanelConfigArchive);\n bottomSummariesPanelEnabled$ = this.summariesWarehouse.onBottomEnabled(this.structureId);\n contentCssClass;\n headerCssClass;\n headerTopClasses;\n headerBottomClasses;\n topHeaderEnabled$ = this.structureHeaderTopEnabledArchive.on();\n bottomHeaderEnabled$ = this.structureHeaderBottomEnabledArchive.on();\n footerPanelEnabled$ = this.selectFooterPanelEnabled();\n items$ = this.selectItems();\n topSummariesPanelEnabled$ = this.summariesWarehouse.onTopEnabled(this.structureId);\n searchEnabled$ = this.searchWarehouse.onSearchEnabled(this.structureId);\n titlePanelEnabled$ = this.selectTitlePanelEnabled();\n infoPanelEnabled$ = this.selectInfoPanelEnabled();\n pagingModel$ = this.pagingWarehouse.onPaging(this.structureId);\n constructor(changeDetectorRef, elementRef, structureDefinition, className) {\n super(changeDetectorRef, elementRef);\n this.structureDefinition = structureDefinition;\n this.className = className;\n this.headerCssClass = `gui-${this.className}-header`;\n this.contentCssClass = `gui-${this.className}-content`;\n this.headerTopClasses = this.headerCssClass + ' gui-header-top';\n this.headerBottomClasses = this.headerCssClass + ' gui-header-bottom';\n }\n isColumnHeaderTopEnabled(topHeaderEnabled) {\n return this.structureDefinition.isHeaderEnabled() && topHeaderEnabled;\n }\n isColumnHeaderBottomEnabled(bottomHeaderEnabled) {\n return this.structureDefinition.isHeaderEnabled() && bottomHeaderEnabled;\n }\n isPagingTopEnabled(pagingModel) {\n return this.structureDefinition.getTopPaging().isEnabled() && pagingModel.isPagerTop();\n }\n isPagingBottomEnabled(pagingModel) {\n return this.structureDefinition.getBottomPaging().isEnabled() && pagingModel.isPagerBottom();\n }\n getSelectorName() {\n return 'gui-structure-blueprint';\n }\n selectTitlePanelEnabled() {\n return this.structureTitlePanelConfigArchive.on().pipe(hermesMap(titlePanel => {\n return titlePanel.enabled;\n }));\n }\n selectInfoPanelEnabled() {\n return this.structureInfoPanelArchive.on().pipe(hermesMap(infoPanel => {\n return infoPanel.isEnabled();\n }));\n }\n selectFooterPanelEnabled() {\n return this.structureFooterPanelConfigArchive.on().pipe(hermesMap(footerPanel => {\n return footerPanel.enabled;\n }));\n }\n selectItems() {\n return this.structureWarehouse.on(this.structureId).pipe(hermesMap(structure => {\n return structure.getEntities();\n }));\n }\n static ɵfac = function StructureBlueprintComponent_Factory(t) {\n return new (t || StructureBlueprintComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(StructureDefinition), i0.ɵɵdirectiveInject(STRUCTURE_CSS_CLASS_NAME));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureBlueprintComponent,\n selectors: [[\"div\", \"gui-structure-blueprint\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c79,\n decls: 15,\n vars: 18,\n consts: [[\"gui-structure-title-panel\", \"\", 4, \"guiIf\"], [\"gui-structure-top-panel\", \"\", 4, \"guiIf\"], [4, \"guiLet\"], [\"gui-structure-summaries-panel\", \"\", 1, \"gui-structure-summaries-panel-top\", 3, \"enabled\"], [\"gui-structure-container\", \"\", 3, \"ngClass\"], [\"gui-empty-source\", \"\", 3, \"items\"], [\"gui-structure-summaries-panel\", \"\", 1, \"gui-structure-summaries-panel-bottom\", 3, \"enabled\"], [\"gui-structure-info-panel\", \"\", 4, \"guiIf\"], [\"gui-structure-title-panel\", \"\"], [\"gui-structure-top-panel\", \"\"], [\"gui-paging\", \"\", 3, \"position\", 4, \"ngIf\"], [\"gui-paging\", \"\", 3, \"position\"], [\"gui-structure-header\", \"\", 3, \"ngClass\", 4, \"ngIf\"], [\"gui-structure-header\", \"\", 3, \"ngClass\"], [\"gui-structure-footer-panel\", \"\", 4, \"ngIf\"], [\"gui-structure-footer-panel\", \"\"], [\"gui-structure-info-panel\", \"\"]],\n template: function StructureBlueprintComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, StructureBlueprintComponent_div_0_Template, 1, 0, \"div\", 0)(1, StructureBlueprintComponent_div_1_Template, 1, 0, \"div\", 1)(2, StructureBlueprintComponent_ng_container_2_Template, 2, 1, \"ng-container\", 2);\n i0.ɵɵelement(3, \"div\", 3);\n i0.ɵɵpipe(4, \"guiPush\");\n i0.ɵɵtemplate(5, StructureBlueprintComponent_ng_container_5_Template, 2, 1, \"ng-container\", 2);\n i0.ɵɵelement(6, \"div\", 4)(7, \"div\", 5);\n i0.ɵɵpipe(8, \"guiPush\");\n i0.ɵɵtemplate(9, StructureBlueprintComponent_ng_container_9_Template, 2, 1, \"ng-container\", 2);\n i0.ɵɵelement(10, \"div\", 6);\n i0.ɵɵpipe(11, \"guiPush\");\n i0.ɵɵtemplate(12, StructureBlueprintComponent_ng_container_12_Template, 2, 1, \"ng-container\", 2)(13, StructureBlueprintComponent_ng_container_13_Template, 2, 1, \"ng-container\", 2)(14, StructureBlueprintComponent_div_14_Template, 1, 0, \"div\", 7);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"guiIf\", ctx.titlePanelEnabled$);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"guiIf\", ctx.searchEnabled$);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"guiLet\", ctx.pagingModel$);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"enabled\", i0.ɵɵpipeBind1(4, 12, ctx.topSummariesPanelEnabled$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"guiLet\", ctx.topHeaderEnabled$);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngClass\", ctx.contentCssClass);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"items\", i0.ɵɵpipeBind1(8, 14, ctx.items$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"guiLet\", ctx.bottomHeaderEnabled$);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"enabled\", i0.ɵɵpipeBind1(11, 16, ctx.bottomSummariesPanelEnabled$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"guiLet\", ctx.footerPanelEnabled$);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"guiLet\", ctx.pagingModel$);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"guiIf\", ctx.infoPanelEnabled$);\n }\n },\n dependencies: [i4.NgClass, i4.NgIf, GuiLetDirective, GuiIfDirective, PagingComponent, StructureSummariesPanelComponent, StructureInfoPanelComponent, StructureTopPanelComponent, EmptySourceComponent, StructureHeaderComponent, StructureContainerComponent, StructureTitlePanelComponent, StructureFooterPanelComponent, GuiPushPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureBlueprintComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** @internal */\nfunction structureIdFactoryForGrid(generator) {\n return new StructureId('gui-grid-' + generator.generateId());\n}\n/** @internal */\nfunction compositionIdFactoryForGrid(generator) {\n return new CompositionId('gui-grid-' + generator.generateId());\n}\n/** @internal */\nfunction schemaIdFactoryForGrid(generator) {\n return new SchemaReadModelRootId('gui-grid-' + generator.generateId());\n}\n/** @internal */\nlet StructureComponent = /*#__PURE__*/(() => {\n class StructureComponent extends StructureGateway {\n elementRef;\n detectorRef;\n injector;\n structureDefinition;\n structureWarehouse;\n compositionWarehouse;\n schemaStylesManager;\n schemaReadModelRootId;\n structureDetailViewService;\n loaderEnabled = false;\n circleLoaderEnabled = true;\n initialLoaderAnimation = false;\n styleModifier;\n constructor(structureId, compositionId, pagingCommandService, pagingEventRepository, sourceCommandDispatcher, sourceEventService, sortingCommandDispatcher, searchCommandDispatcher, fieldCommandDispatcher, schemaCommandInvoker, compositionCommandDispatcher, compositionEventRepository, formationEventService, structureCommandService, structureEditModeArchive, structureCellEditArchive, structureInfoPanelArchive, structureInfoPanelConfigService, structureCellEditStore, columnFieldFactory, structureColumnMenuConfigArchive, pagingDisplayModeArchive, formationCommandDispatcher, searchEventRepository, structureHeaderBottomEnabledArchive, structureDetailViewConfigArchive, structureTitlePanelConfigArchive, structureFooterPanelConfigArchive, schemaEventRepository, translationService, structureInitialValuesReadyArchive, columnAutoConfigurator, elementRef, detectorRef, injector, structureDefinition, structureWarehouse, compositionWarehouse, schemaStylesManager, schemaReadModelRootId, structureDetailViewService) {\n super(detectorRef, elementRef, columnAutoConfigurator, structureId, compositionId, schemaReadModelRootId, structureCommandService, pagingCommandService, pagingEventRepository, sortingCommandDispatcher, searchCommandDispatcher, sourceCommandDispatcher, sourceEventService, schemaCommandInvoker, compositionCommandDispatcher, compositionEventRepository, formationEventService, structureEditModeArchive, structureCellEditArchive, structureInfoPanelConfigService, structureCellEditStore, columnFieldFactory, formationCommandDispatcher, searchEventRepository, structureHeaderBottomEnabledArchive, schemaEventRepository, translationService, structureInitialValuesReadyArchive);\n this.elementRef = elementRef;\n this.detectorRef = detectorRef;\n this.injector = injector;\n this.structureDefinition = structureDefinition;\n this.structureWarehouse = structureWarehouse;\n this.compositionWarehouse = compositionWarehouse;\n this.schemaStylesManager = schemaStylesManager;\n this.schemaReadModelRootId = schemaReadModelRootId;\n this.structureDetailViewService = structureDetailViewService;\n this.styleModifier = new StyleModifier(this.elementRef.nativeElement);\n structureCommandService.create(this.structureId);\n compositionCommandDispatcher.create(this.compositionId);\n schemaCommandInvoker.create(this.schemaId);\n }\n ngOnInit() {\n super.ngOnInit();\n this.subscribe(this.structureWarehouse.on(this.structureId), structureReadModelRoot => {\n this.loaderEnabled = structureReadModelRoot.getSource().isLoading();\n this.circleLoaderEnabled = structureReadModelRoot.isLoaderVisible();\n if (this.loaderEnabled && !this.initialLoaderAnimation) {\n this.initialLoaderAnimation = true;\n }\n this.detectorRef.detectChanges();\n });\n this.structureDetailViewService.init(this.elementRef);\n }\n ngAfterViewInit() {\n this.structureInitialValuesReadyArchive.next(this.structureId, true);\n let width = this.elementRef.nativeElement.offsetWidth;\n if (width > 0) {\n this.compositionCommandDispatcher.setContainerWidth(width, this.compositionId);\n } else {\n /**\n * When gui-grid is in dynamic container which is created later then grid.\n */\n hermesTimer(0).pipe(this.takeUntil()).subscribe(() => {\n width = this.elementRef.nativeElement.offsetWidth;\n if (width > 0) {\n this.compositionCommandDispatcher.setContainerWidth(width, this.compositionId);\n }\n });\n }\n this.schemaStylesManager.init(this.elementRef, this.schemaReadModelRootId);\n this.subscribeWithoutRender(this.compositionWarehouse.onWidth(this.compositionId), width => {\n this.styleModifier.getHost().setWidth(width);\n });\n }\n isBorderEnabled() {\n return this.structureDefinition.isBorderEnabled();\n }\n getStructureId() {\n return this.structureId;\n }\n getElementRef() {\n return this.elementRef;\n }\n getSelectorName() {\n return 'gui-structure';\n }\n static ɵfac = function StructureComponent_Factory(t) {\n return new (t || StructureComponent)(i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(CompositionId), i0.ɵɵdirectiveInject(PagingPublisher), i0.ɵɵdirectiveInject(PagingEventRepository), i0.ɵɵdirectiveInject(SourcePublisher), i0.ɵɵdirectiveInject(SourceEventService), i0.ɵɵdirectiveInject(SortingPublisher), i0.ɵɵdirectiveInject(SearchPublisher), i0.ɵɵdirectiveInject(FieldPublisher), i0.ɵɵdirectiveInject(SchemaPublisher), i0.ɵɵdirectiveInject(CompositionPublisher), i0.ɵɵdirectiveInject(CompositionEventRepository), i0.ɵɵdirectiveInject(FormationEventRepository), i0.ɵɵdirectiveInject(StructurePublisher), i0.ɵɵdirectiveInject(StructureEditModeArchive), i0.ɵɵdirectiveInject(StructureCellEditArchive), i0.ɵɵdirectiveInject(StructureInfoPanelArchive), i0.ɵɵdirectiveInject(StructureInfoPanelConfigService), i0.ɵɵdirectiveInject(StructureCellEditStore), i0.ɵɵdirectiveInject(ColumnFieldFactory), i0.ɵɵdirectiveInject(StructureColumnMenuConfigArchive), i0.ɵɵdirectiveInject(PagingDisplayModeArchive), i0.ɵɵdirectiveInject(FormationPublisher), i0.ɵɵdirectiveInject(SearchEventRepository), i0.ɵɵdirectiveInject(StructureHeaderBottomEnabledArchive), i0.ɵɵdirectiveInject(StructureRowDetailConfigArchive), i0.ɵɵdirectiveInject(StructureTitlePanelConfigArchive), i0.ɵɵdirectiveInject(StructureFooterPanelConfigArchive), i0.ɵɵdirectiveInject(SchemaEventRepository), i0.ɵɵdirectiveInject(TranslationFacade), i0.ɵɵdirectiveInject(StructureInitialValuesReadyArchive), i0.ɵɵdirectiveInject(ColumnAutoConfigurator), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(StructureDefinition), i0.ɵɵdirectiveInject(StructureWarehouse), i0.ɵɵdirectiveInject(CompositionWarehouse), i0.ɵɵdirectiveInject(SchemaCssClassManager), i0.ɵɵdirectiveInject(SchemaReadModelRootId), i0.ɵɵdirectiveInject(StructureRowDetailService));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureComponent,\n selectors: [[\"gui-structure\"]],\n hostVars: 3,\n hostBindings: function StructureComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵhostProperty(\"id\", ctx.structureId.toString());\n i0.ɵɵclassProp(\"gui-structure-border\", ctx.isBorderEnabled());\n }\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: StructureId,\n useFactory: structureIdFactoryForGrid,\n deps: [StructureIdGenerator]\n }, {\n provide: CompositionId,\n useFactory: compositionIdFactoryForGrid,\n deps: [StructureIdGenerator]\n }, {\n provide: SchemaReadModelRootId,\n useFactory: schemaIdFactoryForGrid,\n deps: [StructureIdGenerator]\n }, SchemaCssClassManager, StructureCellEditCloseAllService, StructureCellEditStore, StructureEditModeArchive, StructureInfoPanelArchive, StructureInfoPanelConfigService, StructureColumnMenuConfigArchive, PagingFeatureModule.forComponent(), TranslationFeatureModule.forComponent(), StructureHeaderTopEnabledArchive, StructureHeaderBottomEnabledArchive, StructureRowDetailConfigArchive, StructureRowDetailService, StructureTitlePanelConfigArchive, StructureFooterPanelConfigArchive, {\n provide: structureComponentToken,\n useExisting: StructureComponent\n }, {\n provide: filterContainerToken,\n useExisting: StructureComponent\n }]), i0.ɵɵInheritDefinitionFeature],\n decls: 3,\n vars: 5,\n consts: [[\"gui-structure-blueprint\", \"\"], [1, \"gui-loading\", 3, \"ngClass\"], [3, \"diameter\", \"primary\", 4, \"ngIf\"], [3, \"diameter\", \"primary\"]],\n template: function StructureComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n i0.ɵɵelementStart(1, \"div\", 1);\n i0.ɵɵtemplate(2, StructureComponent_gui_spinner_2_Template, 1, 2, \"gui-spinner\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngClass\", i0.ɵɵpureFunction2(2, _c80, ctx.loaderEnabled, !ctx.loaderEnabled && ctx.initialLoaderAnimation));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.circleLoaderEnabled);\n }\n },\n dependencies: [i4.NgClass, i4.NgIf, i1$1.FabricSpinnerComponent, StructureBlueprintComponent],\n styles: [\".gui-box-border{box-sizing:border-box}.gui-bg-transparent{background-color:transparent}.gui-border{border-width:1px}.gui-border-0{border-width:0}.gui-border-b{border-bottom-width:1px}.gui-border-t{border-top-width:1px}.gui-border-solid{border-style:solid}.gui-border-b-solid{border-bottom-style:solid}.gui-border-t-solid{border-top-style:solid}.gui-border-none{border-style:none}.gui-rounded{border-radius:4px}.gui-cursor-pointer{cursor:pointer}.gui-block{display:block}.gui-inline-block{display:inline-block}.gui-inline{display:inline}.gui-flex{display:-ms-flexbox;display:flex}.gui-hidden{display:none}.gui-display-grid{display:grid}.gui-flex-row{-ms-flex-direction:row;flex-direction:row}.gui-flex-row-reverse{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.gui-flex-col{-ms-flex-direction:column;flex-direction:column}.gui-flex-col-reverse{-ms-flex-direction:column-reverse;flex-direction:column-reverse}.gui-justify-start{-ms-flex-pack:start;justify-content:flex-start}.gui-justify-end{-ms-flex-pack:end;justify-content:flex-end}.gui-justify-center{-ms-flex-pack:center;justify-content:center}.gui-justify-between{-ms-flex-pack:justify;justify-content:space-between}.gui-justify-around{-ms-flex-pack:distribute;justify-content:space-around}.gui-justify-evenly{-ms-flex-pack:space-evenly;justify-content:space-evenly}.gui-items-start{-ms-flex-align:start;align-items:flex-start}.gui-items-end{-ms-flex-align:end;align-items:flex-end}.gui-items-center{-ms-flex-align:center;align-items:center}.gui-items-between{-ms-flex-align:space-between;align-items:space-between}.gui-items-around{-ms-flex-align:space-around;align-items:space-around}.gui-items-evenly{-ms-flex-align:space-evenly;align-items:space-evenly}.gui-flex-wrap{-ms-flex-wrap:wrap;flex-wrap:wrap}.gui-flex-wrap-reverse{-ms-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse}.gui-flex-nowrap{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.gui-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.gui-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.gui-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.gui-grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.gui-grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.gui-grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.gui-grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.gui-grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.gui-grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.gui-grid-rows-1{grid-template-rows:repeat(1,minmax(0,1fr))}.gui-grid-rows-2{grid-template-rows:repeat(2,minmax(0,1fr))}.gui-grid-rows-3{grid-template-rows:repeat(3,minmax(0,1fr))}.gui-grid-rows-4{grid-template-rows:repeat(4,minmax(0,1fr))}.gui-grid-rows-5{grid-template-rows:repeat(5,minmax(0,1fr))}.gui-grid-rows-6{grid-template-rows:repeat(6,minmax(0,1fr))}.gui-grid-rows-7{grid-template-rows:repeat(7,minmax(0,1fr))}.gui-grid-rows-8{grid-template-rows:repeat(8,minmax(0,1fr))}.gui-grid-rows-9{grid-template-rows:repeat(9,minmax(0,1fr))}.gui-grid-rows-gap-0{grid-row-gap:0}.gui-grid-rows-gap-1{grid-row-gap:1px}.gui-grid-rows-gap-2{grid-row-gap:2px}.gui-grid-rows-gap-3{grid-row-gap:3px}.gui-grid-rows-gap-4{grid-row-gap:4px}.gui-grid-rows-gap-5{grid-row-gap:6px}.gui-grid-rows-gap-6{grid-row-gap:8px}.gui-grid-rows-gap-7{grid-row-gap:10px}.gui-grid-rows-gap-8{grid-row-gap:12px}.gui-grid-rows-gap-10{grid-row-gap:16px}.gui-grid-rows-gap-13{grid-row-gap:22px}.gui-grid-rows-gap-23{grid-row-gap:42px}.gui-grid-cols-gap-0{grid-column-gap:0}.gui-grid-cols-gap-1{grid-column-gap:1px}.gui-grid-cols-gap-2{grid-column-gap:2px}.gui-grid-cols-gap-3{grid-column-gap:3px}.gui-grid-cols-gap-4{grid-column-gap:4px}.gui-grid-cols-gap-5{grid-column-gap:6px}.gui-grid-cols-gap-6{grid-column-gap:8px}.gui-grid-cols-gap-7{grid-column-gap:10px}.gui-grid-cols-gap-8{grid-column-gap:12px}.gui-grid-cols-gap-10{grid-column-gap:16px}.gui-grid-cols-gap-13{grid-column-gap:22px}.gui-grid-cols-gap-23{grid-column-gap:42px}.gui-h-full{height:100%}.gui-list-none{list-style-type:none}.gui-m-0{margin:0}.gui-mx-0{margin-left:0;margin-right:0}.gui-my-0{margin-bottom:0;margin-top:0}.-gui-m-0{margin:0}.-gui-mx-0{margin-left:0;margin-right:0}.-gui-my-0{margin-bottom:0;margin-top:0}.gui-m-1{margin:1px}.gui-mx-1{margin-left:1px;margin-right:1px}.gui-my-1{margin-bottom:1px;margin-top:1px}.-gui-m-1{margin:-1px}.-gui-mx-1{margin-left:-1px;margin-right:-1px}.-gui-my-1{margin-bottom:-1px;margin-top:-1px}.gui-m-2{margin:2px}.gui-mx-2{margin-left:2px;margin-right:2px}.gui-my-2{margin-bottom:2px;margin-top:2px}.-gui-m-2{margin:-2px}.-gui-mx-2{margin-left:-2px;margin-right:-2px}.-gui-my-2{margin-bottom:-2px;margin-top:-2px}.gui-m-3{margin:3px}.gui-mx-3{margin-left:3px;margin-right:3px}.gui-my-3{margin-bottom:3px;margin-top:3px}.-gui-m-3{margin:-3px}.-gui-mx-3{margin-left:-3px;margin-right:-3px}.-gui-my-3{margin-bottom:-3px;margin-top:-3px}.gui-m-4{margin:4px}.gui-mx-4{margin-left:4px;margin-right:4px}.gui-my-4{margin-bottom:4px;margin-top:4px}.-gui-m-4{margin:-4px}.-gui-mx-4{margin-left:-4px;margin-right:-4px}.-gui-my-4{margin-bottom:-4px;margin-top:-4px}.gui-m-5{margin:6px}.gui-mx-5{margin-left:6px;margin-right:6px}.gui-my-5{margin-bottom:6px;margin-top:6px}.-gui-m-5{margin:-6px}.-gui-mx-5{margin-left:-6px;margin-right:-6px}.-gui-my-5{margin-bottom:-6px;margin-top:-6px}.gui-m-6{margin:8px}.gui-mx-6{margin-left:8px;margin-right:8px}.gui-my-6{margin-bottom:8px;margin-top:8px}.-gui-m-6{margin:-8px}.-gui-mx-6{margin-left:-8px;margin-right:-8px}.-gui-my-6{margin-bottom:-8px;margin-top:-8px}.gui-m-7{margin:10px}.gui-mx-7{margin-left:10px;margin-right:10px}.gui-my-7{margin-bottom:10px;margin-top:10px}.-gui-m-7{margin:-10px}.-gui-mx-7{margin-left:-10px;margin-right:-10px}.-gui-my-7{margin-bottom:-10px;margin-top:-10px}.gui-m-8{margin:12px}.gui-mx-8{margin-left:12px;margin-right:12px}.gui-my-8{margin-bottom:12px;margin-top:12px}.-gui-m-8{margin:-12px}.-gui-mx-8{margin-left:-12px;margin-right:-12px}.-gui-my-8{margin-bottom:-12px;margin-top:-12px}.gui-m-10{margin:16px}.gui-mx-10{margin-left:16px;margin-right:16px}.gui-my-10{margin-bottom:16px;margin-top:16px}.-gui-m-10{margin:-16px}.-gui-mx-10{margin-left:-16px;margin-right:-16px}.-gui-my-10{margin-bottom:-16px;margin-top:-16px}.gui-m-13{margin:22px}.gui-mx-13{margin-left:22px;margin-right:22px}.gui-my-13{margin-bottom:22px;margin-top:22px}.-gui-m-13{margin:-22px}.-gui-mx-13{margin-left:-22px;margin-right:-22px}.-gui-my-13{margin-bottom:-22px;margin-top:-22px}.gui-m-23{margin:42px}.gui-mx-23{margin-left:42px;margin-right:42px}.gui-my-23{margin-bottom:42px;margin-top:42px}.-gui-m-23{margin:-42px}.-gui-mx-23{margin-left:-42px;margin-right:-42px}.-gui-my-23{margin-bottom:-42px;margin-top:-42px}.gui-mb-4{margin-bottom:4px}.gui-mb-6{margin-bottom:8px}.gui-mb-8{margin-bottom:12px}.gui-mb-10{margin-bottom:16px}.gui-mb-18{margin-bottom:32px}.gui-mr-0{margin-right:0}.gui-mr-5{margin-right:6px}.gui-mr-auto{margin-right:auto}.gui-ml-auto{margin-left:auto}.gui-ml-6{margin-left:8px}.gui-mt-0{margin-top:0}.gui-mt-4{margin-top:4px}.gui-mt-6{margin-top:8px}.gui-mt-10{margin-top:16px}.gui-mt-14{margin-top:24px}.gui-overflow-hidden{overflow:hidden}.gui-overflow-y-scroll{overflow-y:scroll}.gui-overflow-x-hidden{overflow-x:hidden}.gui-overflow-auto{overflow:auto}.gui-p-0{padding:0}.gui-px-0{padding-left:0;padding-right:0}.gui-py-0{padding-bottom:0;padding-top:0}.gui-p-1{padding:1px}.gui-px-1{padding-left:1px;padding-right:1px}.gui-py-1{padding-bottom:1px;padding-top:1px}.gui-p-2{padding:2px}.gui-px-2{padding-left:2px;padding-right:2px}.gui-py-2{padding-bottom:2px;padding-top:2px}.gui-p-3{padding:3px}.gui-px-3{padding-left:3px;padding-right:3px}.gui-py-3{padding-bottom:3px;padding-top:3px}.gui-p-4{padding:4px}.gui-px-4{padding-left:4px;padding-right:4px}.gui-py-4{padding-bottom:4px;padding-top:4px}.gui-p-5{padding:6px}.gui-px-5{padding-left:6px;padding-right:6px}.gui-py-5{padding-bottom:6px;padding-top:6px}.gui-p-6{padding:8px}.gui-px-6{padding-left:8px;padding-right:8px}.gui-py-6{padding-bottom:8px;padding-top:8px}.gui-p-7{padding:10px}.gui-px-7{padding-left:10px;padding-right:10px}.gui-py-7{padding-bottom:10px;padding-top:10px}.gui-p-8{padding:12px}.gui-px-8{padding-left:12px;padding-right:12px}.gui-py-8{padding-bottom:12px;padding-top:12px}.gui-p-10{padding:16px}.gui-px-10{padding-left:16px;padding-right:16px}.gui-py-10{padding-bottom:16px;padding-top:16px}.gui-p-13{padding:22px}.gui-px-13{padding-left:22px;padding-right:22px}.gui-py-13{padding-bottom:22px;padding-top:22px}.gui-p-23{padding:42px}.gui-px-23{padding-left:42px;padding-right:42px}.gui-py-23{padding-bottom:42px;padding-top:42px}.gui-pr-10{padding-right:16px}.gui-pl-9{padding-right:10px}.gui-pb-6{padding-bottom:8px}.gui-pb-12{padding-bottom:20px}.gui-pl-21{padding-left:38px}.gui-pt-4{padding-top:4px}.gui-pt-6{padding-top:8px}.gui-pt-10{padding-top:16px}.gui-pt-12{padding-top:20px}.gui-pt-14{padding-top:24px}.gui-static{position:static}.gui-fixed{position:fixed}.gui-relative{position:relative}.gui-absolute{position:absolute}.gui-text-xxs{font-size:11px}.gui-text-xs{font-size:12px}.gui-text-sm{font-size:13px}.gui-text-base{font-size:14px}.gui-text-lg{font-size:16px}.gui-text-xl{font-size:18px}.gui-text-2xl{font-size:20px}.gui-text-3xl{font-size:22px}.gui-leading-4{line-height:16px}.gui-leading-6{line-height:24px}.gui-font-thin{font-weight:100}.gui-font-extralight{font-weight:200}.gui-font-light{font-weight:300}.gui-font-normal{font-weight:400}.gui-font-medium{font-weight:500}.gui-font-semibold{font-weight:600}.gui-font-bold{font-weight:700}.gui-font-extrabold{font-weight:800}.gui-font-black{font-weight:900}.gui-not-italic{font-style:normal}.gui-whitespace-nowrap{white-space:nowrap}.gui-overflow-ellipsis{text-overflow:ellipsis}.gui-no-underline{text-decoration:none}.gui-text-center{text-align:center}.gui-w-full{width:100%}.gui-w-96{width:384px}.gui-w-3\\\\/5{width:60%}.gui-structure *,.gui-structure *:after,.gui-structure *:before{box-sizing:border-box}.gui-structure input{font-size:13px;outline:0}.gui-bold{font-weight:700}.gui-italic{font-style:italic}.gui-bar-view{width:100%}.gui-align-right{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;text-align:right;width:100%}.gui-align-left{text-align:left;width:100%}.gui-align-center{-ms-flex-pack:center;justify-content:center;text-align:center;width:100%}.gui-icon{cursor:pointer}.gui-icon svg{fill:#aaa;stroke:#aaa;transition:stroke .3s ease-in-out}.gui-icon svg:hover{fill:#464646!important;stroke:#464646!important}.gui-view-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gui-percentage-bar{background:#deebff;border-radius:4px;box-shadow:inset 1px 1px 2px #ccc;color:#0747a6;height:22px;padding:4px;position:relative;text-align:center;width:100%}.gui-percentage-bar .gui-percentage{background:#8abcfc;border-radius:4px;height:22px;left:0;position:absolute;top:0}.gui-percentage-bar .gui-percentage-view{color:#031d44;position:relative;width:100%}.gui-clear-search-icon{cursor:pointer;height:16px;position:absolute;right:8px;top:50%;-ms-transform:translateY(-50%);transform:translateY(-50%);width:16px}.gui-clear-search-icon:before,.gui-clear-search-icon:after{background-color:#aaa;border-radius:8px;content:\\\" \\\";height:16px;left:7px;position:absolute;width:2px}.gui-clear-search-icon:before{-ms-transform:rotate(45deg);transform:rotate(45deg)}.gui-clear-search-icon:after{-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.gui-clear-search-icon:hover:before,.gui-clear-search-icon:hover:after{background-color:#464646}\\n\", \".gui-structure,.gui-structure *{border-color:#d6d6d6;font-size:14px}.gui-structure input{color:#333;font-family:Arial}.gui-header{background:#f2f3f4;border-bottom:1px solid;border-color:inherit;height:36px}.gui-header .gui-header-cell.gui-header-sortable{cursor:pointer}.gui-header .gui-header-cell.gui-header-sortable:hover{background:#e6e7e8}.gui-header .gui-header-cell .gui-header-menu-icon{display:none}.gui-header .gui-header-cell:hover .gui-header-menu{cursor:pointer}.gui-header .gui-header-cell:hover .gui-header-menu .gui-header-menu-icon-wrapper .gui-header-menu-icon{display:block}.gui-header .gui-header-cell:last-of-type{border-right:0}.gui-header .gui-header-cell .gui-header-title{display:-ms-flexbox;display:flex;line-height:1.4em}.gui-header .gui-header-cell .gui-header-menu{display:-ms-flexbox;display:flex}.gui-header .gui-header-cell .gui-header-menu .gui-header-menu-icon-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:16px;padding:16px;position:relative;right:0;width:16px}.gui-header .gui-header-cell .gui-header-menu .gui-header-menu-icon-wrapper .gui-header-menu-icon{display:none;height:16px;width:16px}.gui-header-bottom .gui-header{border-bottom:0;border-color:inherit;border-top:1px solid}.gui-structure{background:#fff;border-color:#d6d6d6;box-sizing:border-box;color:#333;display:block;font-family:Arial;font-size:14px;position:relative}.gui-structure *{box-sizing:border-box}.gui-structure .gui-structure-header{display:block;height:100%;width:100%}.gui-structure .gui-structure-header .gui-structure-header-filters.gui-header{height:32px}.gui-structure .gui-structure-header .gui-structure-header-filters.gui-header .gui-header-cell{padding:4px}.gui-structure .gui-structure-header .gui-structure-header-filters.gui-header .gui-header-cell input{box-sizing:border-box;height:100%;padding:2px;position:relative;width:100%;border-color:#d6d6d6;border-style:solid;border-width:1px;font-size:13px}.gui-structure-container{display:block;height:100%;overflow:auto;overflow-x:hidden;position:relative;width:100%}.gui-structure-container .gui-structure-container-element{height:100%;position:absolute;width:100%}.gui-structure-container .gui-structure-container-element .gui-content{height:100%;position:relative}.gui-structure-container .gui-structure-container-element .gui-content .gui-row{border-bottom:1px solid transparent;position:absolute;width:100%}.gui-structure-container .gui-structure-container-element .gui-content .gui-row:last-child{border-bottom:0}.gui-structure-container .gui-structure-container-element .gui-content .gui-row:hover{background:#ecedee}.gui-structure-container .gui-structure-container-element .gui-content .gui-row.selected{background:#d0e8fb}.gui-structure-container .gui-structure-container-element .gui-content .gui-row .gui-cell{border-right:1px solid transparent;box-sizing:border-box;line-height:1em;overflow:hidden;padding:0;white-space:nowrap}.gui-structure-container .gui-structure-container-element .gui-content .gui-row .gui-cell .gui-cell-view span{line-height:1.4em}.gui-structure-container .gui-structure-container-element .gui-content .gui-row .gui-cell .gui-button{padding:0}.gui-structure-container .gui-structure-container-element .gui-content .gui-row .gui-cell .gui-cell-boolean{-ms-flex-pack:center;justify-content:center}.gui-structure-container .gui-structure-container-element .gui-content .gui-row .gui-cell .gui-checkbox{line-height:24px;position:relative}.gui-structure-container .gui-structure-container-element .gui-content .gui-row .gui-cell .gui-checkbox input{position:relative}.gui-structure-container .gui-structure-container-element .gui-content .gui-row .gui-cell .gui-chip{line-height:1em;margin:0;padding:4px 8px}.gui-structure-container .gui-structure-container-element .gui-content .gui-row .gui-cell .gui-badge{padding:0}.gui-structure-container .gui-structure-container-element .gui-content .gui-row .gui-cell .gui-input{background:transparent;font-size:14px;padding:0;border-radius:0;border-style:none}.gui-structure-container .gui-cell{display:inline-block}.gui-structure-container .gui-cell:last-child .gui-cell-view{padding-right:20px}.gui-structure-container .gui-cell>span{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:100%;padding:0 8px;width:100%}.gui-structure-container .gui-cell .gui-cell-edit-mode{border:2px solid #2185d0;height:100%;padding:6px}.gui-structure-container .gui-cell .gui-cell-edit-mode .gui-boolean-edit{margin-left:calc(50% - 11px)}.gui-structure-container .gui-cell .gui-cell-edit-mode input:focus{box-shadow:none;outline:none}.gui-vertical-grid .gui-structure-summaries-cell,.gui-vertical-grid .gui-structure-container-element .gui-content .gui-row .gui-cell,.gui-vertical-grid .gui-structure-header .gui-header .gui-header-cell{border-right:1px solid;border-right-color:inherit}.gui-vertical-grid .gui-structure-container-element .gui-content .gui-row .gui-cell:last-of-type,.gui-vertical-grid .gui-structure-header .gui-header .gui-header-cell:last-of-type{border-right:0}.gui-vertical-grid .gui-row-checkbox{border-right:1px solid!important;border-right-color:inherit!important}.gui-horizontal-grid .gui-structure-container-element .gui-content .gui-row{border-bottom:1px solid;border-bottom-color:inherit}.gui-horizontal-grid .gui-structure-container-element .gui-content .gui-row:last-of-type{border-bottom:0}.gui-rows-even .gui-row.even,.gui-rows-odd .gui-row.odd{background:#f7f8f9}.gui-structure-info-panel{-ms-flex-align:center;align-items:center;background:#f2f3f4;box-sizing:border-box;display:-ms-flexbox;display:flex;height:36px;-ms-flex-pack:justify;justify-content:space-between;padding:0 6px;width:100%;border-top-color:inherit;border-top-style:solid;border-top-width:1px}.gui-structure-info-panel p{margin:0}.gui-structure-info-panel p b{font-weight:700}.gui-structure-info-panel div button{background:#ccc;color:#fff;cursor:pointer;font-family:Arial;font-weight:700;height:16px;line-height:14px;padding:0;width:16px;border-color:transparent;border-radius:50%;border-style:solid;border-width:1px}.gui-structure-info-panel div button:focus{box-shadow:0 0 4px #ccc;outline:none}.gui-structure-border{border:1px solid;border-color:#d6d6d6}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.gui-loading{-ms-flex-line-pack:center;align-content:center;animation-duration:.2s;background:rgba(255,255,255,.8);border:1px solid;border-color:inherit;display:-ms-flexbox;display:flex;height:100%;-ms-flex-pack:center;justify-content:center;left:0;opacity:0;position:absolute;top:0;visibility:hidden;width:100%}.gui-loading .gui-spinner{-ms-flex-item-align:center;align-self:center}.gui-loading.gui-loader-hidden{animation-name:fadeOut;opacity:0;visibility:visible;z-index:-1}.gui-loading.gui-loader-visible{animation-name:fadeIn;opacity:1;visibility:visible;z-index:1}.gui-text-highlight{background:#fff799;padding:0!important}.gui-title-panel{border-bottom-color:#d6d6d6}.gui-footer-panel{border-top-color:#d6d6d6}.gui-structure-schema-manager-icon{margin-right:16px}.gui-structure-schema-manager-icon svg{height:18px;margin-bottom:-1px;width:18px}.gui-row-radio{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox!important;display:flex!important;-ms-flex-pack:center;justify-content:center;padding:0 12px!important;width:48px!important}.gui-row-radio .gui-radio-button{height:24px;margin:0;padding:0;width:24px}.gui-row-checkbox{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox!important;display:flex!important;-ms-flex-pack:center;justify-content:center;padding:0 12px!important;width:48px!important}.gui-row-checkbox .gui-checkbox{height:24px;margin:0;padding:0;width:24px}.gui-select-all .gui-checkbox .gui-checkmark{top:0}.gui-structure-cell-edit-boolean{height:100%}.gui-column-highlighted{background:#fffddd}.gui-structure-column-manager>div:hover{background:#ecedee}.gui-structure-column-manager label{margin-bottom:0}.gui-structure-ordered-list li:hover{background:#ecedee}\\n\", \".gui-structure-column-menu-icon svg{height:16px;width:16px}.gui-structure-column-menu-icon .cls-1{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px}.gui-structure-column-menu-arrow-icon{display:inline-block}.gui-structure-column-menu-arrow-icon svg{height:10px;width:12px}.gui-structure-column-menu-arrow-icon .gui-structure-column-menu-sort-icon svg{height:16px}.gui-structure-column-menu-arrow-icon .cls-1{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px}\\n\", \".gui-summaries-value{font-weight:700}.gui-structure-summaries-panel{background:#f2f3f4}.gui-structure-summaries-panel.gui-structure-summaries-panel-bottom .gui-structure-summaries-cell{border-top:1px solid #d6d6d6}.gui-structure-summaries-panel.gui-structure-summaries-panel-top .gui-structure-summaries-cell{border-bottom:1px solid #d6d6d6}.gui-structure-summaries-panel .gui-structure-summaries-cell{font-size:14px;padding-left:16px;padding-right:16px}.gui-structure-summaries-panel .gui-structure-summaries-cell:last-child{padding-right:20px}.gui-structure-summaries-panel .gui-structure-summaries-value{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;line-height:1em;overflow:hidden;padding:8px 0}.gui-structure-summaries-panel .gui-structure-summaries-value div .gui-math-symbol{position:relative;top:-1px}.gui-structure-summaries-panel .gui-structure-summaries-value .gui-mean,.gui-structure-summaries-panel .gui-structure-summaries-value .gui-median{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.gui-structure-summaries-panel .gui-structure-summaries-value .gui-mean span:nth-child(1){left:1px;position:absolute;top:-15px}.gui-structure-summaries-panel .gui-structure-summaries-value .gui-median span:nth-child(1){left:1px;position:absolute;top:-8px}\\n\", \".gui-structure-column-manager-icon svg{height:16px;width:16px}.gui-structure-column-manager-icon .cls-1,.gui-structure-column-manager-icon .cls-2{fill:none;stroke-linecap:round;stroke-linejoin:round}.gui-structure-column-manager-icon .cls-2{stroke-width:1.5px}.gui-structure-info-icon svg{height:16px;width:16px}.gui-structure-info-icon .cls-1{stroke-width:0}.gui-structure-info-icon .cls-2{fill:none;stroke-linecap:round;stroke-linejoin:round}.gui-structure-info-panel div,.gui-structure-info-panel div button{display:inline-block}.gui-structure-info-panel .gui-right-section .gui-structure-column-manager-icon{margin-right:16px;position:relative}.gui-structure-info-panel .gui-right-section .gui-structure-info-icon{margin-right:4px;position:relative}.gui-structure-info-modal .gui-quote{color:#575757}.gui-structure-info-modal p{color:#333}.gui-structure-info-modal a{color:#2185d0}.gui-structure-info-modal a:hover{color:#59a9e5;text-decoration:underline}\\n\", \"@media (max-width: 500px){.gui-paging>*{padding-left:4px}.gui-paging .gui-paging-stats{padding-left:4px}}\\n\", \".gui-header{display:-ms-flexbox;display:flex}.gui-header .gui-header-cell{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}.gui-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.gui-content .gui-structure-cell-container,.gui-content .gui-row{display:-ms-flexbox;display:flex}.gui-content .gui-structure-cell-container .gui-cell,.gui-content .gui-row .gui-cell{display:inline-block}.gui-content .gui-structure-row-details{background:#80cbc4;display:block;height:200px;position:absolute;-ms-transform:translateY(0);transform:translateY(0);width:100%}\\n\", \".gui-inline-dialog-header-menu.gui-inline-dialog-wrapper .gui-inline-dialog-content{background:transparent;box-shadow:none}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-item-active{font-weight:700}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab .gui-tab-menu .gui-tab-menu-list{background:#fff}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab .gui-tab-menu .gui-tab-menu-item{color:#333}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab .gui-tab-menu .gui-tab-menu-item:hover{background:#ecedee}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab .gui-tab-menu .gui-tab-menu-item.gui-active{color:#2185d0}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab .gui-tab-content{box-shadow:0 3px 7px #ccc;box-sizing:content-box;padding:0;width:225px}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-menu-column-move{color:#333;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:0}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-menu-column-move .gui-header-menu-column-move-item{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-menu-column-move .gui-header-menu-column-move-item svg line{stroke:#aaa}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-menu-column-move .gui-header-menu-column-move-item.left{padding:12px 16px 12px 12px;width:48%}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-menu-column-move .gui-header-menu-column-move-item.right{padding:12px 10px;width:52%}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-menu-column-move .gui-header-menu-column-move-item:hover{background:#ecedee}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-menu-column-move .gui-header-menu-column-move-item:hover svg line{stroke:#464646}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-dropdown-container{border:none;border-radius:0}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-dropdown-container:hover{background:#ecedee}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-dropdown-container:hover .gui-dropdown-arrow{opacity:1}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-dropdown-menu{width:125px}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-dropdown-menu .gui-item{background:#fff;color:#333;display:-ms-flexbox;display:flex;padding:8px 8px 8px 12px}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-dropdown-menu .gui-item:hover{background:#ecedee}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-dropdown-menu .gui-item:hover .gui-sort-title svg line{stroke:#464646}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-dropdown-menu .gui-item .gui-sort-title{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;width:100%}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-dropdown-menu .gui-item .gui-sort-title svg{margin-top:3px}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-dropdown-menu .gui-item .gui-sort-title svg line{stroke:#aaa}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-menu-item{color:#333;cursor:pointer;display:block;padding:8px 12px}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-menu-item:hover{background:#ecedee}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-checkbox{color:#333;margin-left:12px;padding:8px 12px 8px 32px;width:169px}.gui-inline-dialog-header-menu .gui-header-menu-tab .gui-checkbox label{display:inline-block;width:inherit}\\n\", \".gui-schema-manager-dialog .gui-schema-manager{min-width:180px}.gui-schema-manager-dialog .gui-schema-manager .gui-structure-schema-manager-select,.gui-schema-manager-dialog .gui-schema-manager .gui-checkbox{color:#333}.gui-schema-manager-dialog .gui-schema-manager .gui-structure-schema-manager-select:nth-last-child(1),.gui-schema-manager-dialog .gui-schema-manager .gui-checkbox:nth-last-child(1){margin-bottom:0}.gui-dialog-title{border-bottom:solid 1px #d6d6d6;font-size:18px;font-weight:700;margin-left:-16px;margin-right:-16px;padding-bottom:16px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.gui-structure-schema-manager-select{padding:8px 0 24px}.gui-structure-dialog-column-manager ol{max-height:400px;min-width:250px}\\n\", \".gui-cell .gui-checkbox{display:block}.gui-cell .gui-chip{margin:0;padding:2px 8px}.gui-cell .gui-input{display:block;font-size:11px;padding:2px 4px;width:100%}.gui-cell .gui-button{padding:2px 8px}.gui-cell .gui-cell-number{display:block;width:100%}.gui-cell .gui-cell-boolean{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:100%;text-align:center;width:100%}.gui-cell .gui-string-edit{width:100%}\\n\", \".gui-fabric{border-color:#d6d6d6;font-family:Arial;font-size:14px}.gui-fabric .gui-header-cell,.gui-fabric .gui-structure-header-columns,.gui-fabric .gui-structure-top-panel,.gui-fabric .gui-structure-info-panel,.gui-fabric .gui-paging{height:42px}\\n\", \".gui-material{border-color:#0000001f;font-family:Arial;font-size:14px}.gui-material *{border-color:#0000001f}.gui-material.gui-structure{border:0;border-radius:0;box-shadow:0 2px 2px #00000024,0 3px 1px -2px #0000001f,0 1px 5px #0003}.gui-material.gui-structure,.gui-material .gui-header{font-family:Arial}.gui-material .gui-header-cell,.gui-material .gui-structure-header-columns{height:56px}.gui-material .gui-header .gui-header-cell.gui-header-sortable:hover{background:transparent}.gui-material .gui-header-cell{padding-left:16px;padding-right:16px}.gui-material .gui-structure-container-element .gui-structure-cell>span{padding-left:16px;padding-right:16px}.gui-material .gui-structure-container .gui-structure-container-element .gui-content .gui-row:hover{background:rgba(0,0,0,.04)}.gui-material .gui-structure-container .gui-structure-container-element .gui-content .gui-row.selected{background:#e6f7ff}.gui-material .gui-structure-header .gui-header{background:transparent;color:#464646;font-weight:700}.gui-material .gui-structure-header .gui-header .gui-header-cell{border-color:inherit}.gui-material .gui-cell .gui-button,.gui-material .gui-cell .gui-badge{padding:0}.gui-material .gui-paging-alternative-navigator .gui-button{background:transparent;color:#333;margin:0 4px;padding:0}.gui-material .gui-paging-alternative-navigator .gui-button:hover{background:transparent}.gui-material .gui-paging-alternative-navigator .gui-button:disabled{background:transparent;color:#ccc;opacity:.4}.gui-material .gui-structure-summaries-panel{background:#fff}.gui-material gui-structure-top-panel,.gui-material .gui-structure-info-panel,.gui-material .gui-paging{height:52px;padding-left:16px;padding-right:16px}.gui-material .gui-structure-info-panel{background:#fff;border-radius:0}.gui-material gui-structure-top-panel{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;padding-right:0}.gui-material gui-structure-top-panel .gui-search-bar form input{border:0;outline:0}.gui-material .gui-search-bar form input{border:0;outline:none}\\n\", \".gui-dark{border-color:#575757;border-radius:2px;color:#f0f0f0;font-family:Arial;font-size:14px}.gui-dark *{border-color:#575757;color:#f0f0f0}.gui-dark.gui-structure{border-radius:2px}.gui-dark .gui-header-cell,.gui-dark .gui-structure-header-columns{background:#333;height:46px}.gui-dark .gui-structure-border{border:none;box-shadow:5px 5px 10px 2px #1f1f1f}.gui-dark .gui-header-cell{border-bottom:1px solid;border-color:inherit;padding-left:16px;padding-right:16px}.gui-dark .gui-structure-container-element .gui-structure-cell>span{padding-left:16px;padding-right:16px}.gui-dark .gui-structure-header .gui-header{border-bottom-color:#666;color:#bdbdbd}.gui-dark .gui-structure-header .gui-header .gui-header-cell:hover{background:#525252}.gui-dark .gui-structure-header .gui-header .gui-header-cell:hover .gui-header-menu .gui-header-menu-icon-wrapper{background-color:#525252}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab .gui-tab-menu .gui-tab-menu-list{background:#383838}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab .gui-tab-menu .gui-tab-menu-item{color:#f0f0f0}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab .gui-tab-menu .gui-tab-menu-item:hover{background:#525252}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab .gui-tab-menu .gui-tab-menu-item.gui-active{color:#ce93d8}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab .gui-tab-content{box-shadow:0 1px 2px #525252}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab .gui-structure-column-manager ol li:hover{background:#525252}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-menu-column-move{color:#f0f0f0}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-menu-column-move .gui-header-menu-column-move-item:hover{background:#525252}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-menu-column-move .gui-header-menu-column-move-item:hover svg line{stroke:#ce93d8}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-dropdown-container .gui-dropdown-menu{border-color:#666}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-dropdown-container .gui-dropdown-menu .gui-item:hover svg line{stroke:#ce93d8}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-dropdown-container:hover{background:#525252}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-item{background:#383838;color:#f0f0f0;display:-ms-flexbox;display:flex}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-tab-item-dropdown .gui-header-menu-dropdown.gui-dropdown .gui-item:hover{background:#525252}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-menu-item{color:#f0f0f0}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-header-menu-item:hover{background:#525252}.gui-dark .gui-inline-dialog-header-menu .gui-header-menu-tab .gui-checkbox{color:#f0f0f0}.gui-dark .gui-structure-column-manager>div:hover{background:#525252}.gui-dark .gui-structure-container .gui-structure-container-element .gui-content .gui-row:hover{background:#525252}.gui-dark .gui-structure-container .gui-structure-container-element .gui-content .gui-row.selected{background:rgba(124,185,246,.3215686275)}.gui-dark.gui-rows-odd .gui-row.odd,.gui-dark.gui-rows-even .gui-row.even{background:#4f4f4f}.gui-dark .gui-horizontal-grid .gui-structure-container-element .gui-row .gui-cell{border-bottom-color:#666}.gui-dark .gui-paging.gui-paging-bottom{border-top-color:#666}.gui-dark .gui-paging.gui-paging-top{border-bottom-color:#666}.gui-dark ::-webkit-scrollbar{width:15px}.gui-dark ::-webkit-scrollbar-track{background:#616161}.gui-dark ::-webkit-scrollbar-thumb{background:#424242}.gui-dark ::-webkit-scrollbar-thumb:hover{background:#212121}.gui-dark .gui-structure-top-panel,.gui-dark .gui-structure-info-panel,.gui-dark .gui-paging,.gui-dark .gui-structure-container-element,.gui-dark .gui-row{background:#444}.gui-dark .gui-structure-top-panel,.gui-dark .gui-structure-info-panel,.gui-dark .gui-paging{height:42px;padding-left:16px;padding-right:16px}.gui-dark .gui-structure-summaries-cell{background:#383838;color:#f0f0f0}.gui-dark .gui-structure-summaries-panel-bottom .gui-structure-summaries-cell{border-top-color:#666}.gui-dark .gui-structure-summaries-panel-top .gui-structure-summaries-cell{border-bottom-color:#666}.gui-dark .gui-structure-info-panel{background:#383838;border-top-color:#666}.gui-dark .gui-structure-info-panel div{color:#f0f0f0}.gui-dark .gui-structure-info-panel div button{background:#616161}.gui-dark .gui-structure-info-panel p,.gui-dark .gui-structure-info-modal p{color:#f0f0f0}.gui-dark gui-paging-alternative-navigator .gui-button{background:transparent;color:#f0f0f0;margin:0 4px;padding:0}.gui-dark gui-paging-alternative-navigator .gui-button:hover{background:transparent}.gui-dark gui-paging-alternative-navigator .gui-button:disabled{background:transparent;color:#f0f0f0;opacity:.4}.gui-dark gui-paging-alternative-navigator gui-paging-alternative-pages .gui-paging-active-page{box-shadow:0 1px #f0f0f0;color:#f0f0f0}.gui-dark .gui-search-bar form{background:#444}.gui-dark .gui-search-bar input{background:#444;border:0;color:#f0f0f0;cursor:pointer}.gui-dark .gui-search-bar:hover .gui-search-icon-svg line,.gui-dark .gui-search-bar:hover .gui-search-icon-svg circle{stroke:#878787}.gui-dark .gui-icon{cursor:pointer}.gui-dark .gui-icon svg{stroke:#aaa;transition:stroke .3s ease-in-out}.gui-dark .gui-icon svg:hover{stroke:#e6e6e6!important}.gui-dark .gui-empty-source div{background:#383838}.gui-dark .gui-dialog-wrapper .gui-dialog-content .gui-schema-manager-dialog .gui-dialog-title{color:#f0f0f0}.gui-dark .gui-title-panel,.gui-dark .gui-footer-panel{background:#383838}.gui-dark .gui-structure-ordered-list li:hover{background:#525252}\\n\", \".gui-light{border-color:#f0f0f0;font-family:Arial;font-size:14px}.gui-light *{border-color:#f0f0f0}.gui-light.gui-structure-border{border:0}.gui-light.gui-structure,.gui-light .gui-header{background:#fff;color:#333;font-family:Arial}.gui-light .gui-header-cell,.gui-light .gui-structure-header-columns{height:56px}.gui-light.gui-structure-border{border-color:#f0f0f0 transparent}.gui-light .gui-header-cell,.gui-light .gui-structure-container-element .gui-structure-cell>span{padding-left:16px;padding-right:16px}.gui-light .gui-structure-header .gui-header{color:#333;font-weight:700}.gui-light .gui-structure-header .gui-header .gui-header-cell:hover{background:#f3f9ff}.gui-light .gui-structure-header .gui-header .gui-header-cell:hover .gui-header-menu .gui-header-menu-icon-wrapper{background-color:#f3f9ff}.gui-light .gui-structure-container .gui-structure-container-element .gui-content .gui-row:hover{background:#f3f9ff}.gui-light .gui-structure-container .gui-structure-container-element .gui-content .gui-row.selected{background:rgba(124,185,246,.3215686275)}.gui-light.gui-rows-odd .gui-row.odd,.gui-light.gui-rows-even .gui-row.even{background:#f7f7f7}.gui-light gui-paging-alternative-navigator .gui-button{background:transparent;color:#333;margin:0 4px;padding:0}.gui-light gui-paging-alternative-navigator .gui-button:hover{background:transparent}.gui-light gui-paging-alternative-navigator .gui-button:disabled{background:transparent;color:#333;opacity:.4}.gui-light .gui-structure-top-panel,.gui-light .gui-structure-info-panel,.gui-light .gui-paging{height:56px;padding-left:16px;padding-right:16px}.gui-light .gui-structure-top-panel,.gui-light .gui-structure-info-panel,.gui-light .gui-paging,.gui-light .gui-structure-summaries-panel{background:#fff}.gui-light .gui-search-bar form input{border:0;outline:none}\\n\", \".gui-structure.gui-generic{border-color:#2224261a;font-family:Arial;font-size:14px}.gui-structure.gui-generic *{border-color:#2224261a}.gui-structure.gui-generic .gui-header-cell,.gui-structure.gui-generic .gui-structure-header-columns{height:46px}.gui-structure.gui-generic .gui-header .gui-header-cell.gui-header-sortable:hover{background:rgba(0,0,0,.04);transition:.15s all}.gui-structure.gui-generic .gui-header-cell,.gui-structure.gui-generic .gui-structure-container-element .gui-structure-cell>span{padding-left:12px;padding-right:12px}.gui-structure.gui-generic .gui-structure-container-element .gui-structure-cell:last-child>span{padding-right:20px}.gui-structure.gui-generic .gui-structure-header.gui-header-bottom .gui-header{border-color:inherit;border-style:solid;border-width:2px 0 0}.gui-structure.gui-generic .gui-structure-container .gui-structure-container-element .gui-content .gui-row:hover{background:rgba(0,0,0,.04)}.gui-structure.gui-generic .gui-structure-container .gui-structure-container-element .gui-content .gui-row.selected{background:#e6f7ff}.gui-structure.gui-generic .gui-structure-header .gui-header{background:#f9fafb;border-width:0 0 2px;color:#464646;font-weight:700}.gui-structure.gui-generic .gui-rows-odd .gui-row.odd,.gui-structure.gui-generic .gui-rows-even .gui-row.even{background:#f9fafb}.gui-structure.gui-generic .gui-cell .gui-button,.gui-structure.gui-generic .gui-cell .gui-badge{padding:0}.gui-structure.gui-generic .gui-paging-alternative-navigator .gui-button{background:transparent;color:#333;margin:0 4px;padding:0}.gui-structure.gui-generic .gui-paging-alternative-navigator .gui-button:hover{background:transparent}.gui-structure.gui-generic .gui-paging-alternative-navigator .gui-button:disabled{background:transparent;color:#ccc;opacity:.4}.gui-structure.gui-generic .gui-structure-summaries-panel{background:#f9fafb}.gui-structure.gui-generic .gui-structure-top-panel,.gui-structure.gui-generic .gui-structure-info-panel,.gui-structure.gui-generic .gui-paging{height:46px;padding-left:12px;padding-right:12px}.gui-structure.gui-generic .gui-structure-info-panel{background:#f9fafb;border-radius:0}.gui-structure.gui-generic .gui-structure-top-panel{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;padding-right:0}.gui-structure.gui-generic .gui-structure-top-panel .gui-search-bar form input{border:0;outline:0}.gui-structure.gui-generic .gui-rows-odd gui-row.odd,.gui-structure.gui-generic .gui-rows-even .gui-row.even{background:#f9fafb}.gui-structure.gui-generic .gui-row:hover{background:#f9fafb;transition:.15s all}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureColumnHeaderGate = /*#__PURE__*/(() => {\n class StructureColumnHeaderGate extends Gate {\n structureHeaderTopEnabledArchive;\n structureHeaderBottomEnabledArchive;\n columnHeaderTop;\n columnHeaderBottom;\n constructor(structureHeaderTopEnabledArchive, structureHeaderBottomEnabledArchive) {\n super();\n this.structureHeaderTopEnabledArchive = structureHeaderTopEnabledArchive;\n this.structureHeaderBottomEnabledArchive = structureHeaderBottomEnabledArchive;\n }\n ngOnChanges(changes) {\n if (this.isDefined('columnHeaderTop', changes)) {\n this.structureHeaderTopEnabledArchive.next(this.columnHeaderTop);\n }\n if (this.isDefined('columnHeaderBottom', changes)) {\n this.structureHeaderBottomEnabledArchive.next(this.columnHeaderBottom);\n }\n }\n static ɵfac = function StructureColumnHeaderGate_Factory(t) {\n return new (t || StructureColumnHeaderGate)(i0.ɵɵdirectiveInject(StructureHeaderTopEnabledArchive), i0.ɵɵdirectiveInject(StructureHeaderBottomEnabledArchive));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureColumnHeaderGate,\n selectors: [[\"gui-structure\", \"columnHeaderTop\", \"\", \"columnHeaderBottom\", \"\"], [\"gui-structure\", \"columnHeaderTop\", \"\"], [\"gui-structure\", \"columnHeaderBottom\", \"\"]],\n inputs: {\n columnHeaderTop: \"columnHeaderTop\",\n columnHeaderBottom: \"columnHeaderBottom\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructureColumnHeaderGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet PagingGate = /*#__PURE__*/(() => {\n class PagingGate extends Gate {\n structureId;\n compositionId;\n pagingCommandInvoker;\n pagingEventRepository;\n paging;\n pageChanged = new EventEmitter();\n pageSizeChanged = new EventEmitter();\n constructor(structureId, compositionId, pagingCommandInvoker, pagingEventRepository) {\n super();\n this.structureId = structureId;\n this.compositionId = compositionId;\n this.pagingCommandInvoker = pagingCommandInvoker;\n this.pagingEventRepository = pagingEventRepository;\n }\n ngOnChanges(changes) {\n if (this.isDefined('paging', changes)) {\n let pagingConfig;\n if (typeof this.paging === 'boolean') {\n pagingConfig = {\n enabled: this.paging\n };\n } else {\n pagingConfig = this.paging;\n }\n this.pagingCommandInvoker.setPaging(pagingConfig, this.compositionId);\n }\n }\n ngOnInit() {\n this.subscribeAndEmit(this.pagingEventRepository.onPageChange(this.structureId.toReadModelRootId()), this.pageChanged);\n this.subscribeAndEmit(this.pagingEventRepository.onPageSizeChange(this.structureId.toReadModelRootId()), this.pageSizeChanged);\n }\n onPageChange(page) {\n this.pageChanged.emit(page);\n }\n static ɵfac = function PagingGate_Factory(t) {\n return new (t || PagingGate)(i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(CompositionId), i0.ɵɵdirectiveInject(PagingPublisher), i0.ɵɵdirectiveInject(PagingEventRepository));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: PagingGate,\n inputs: {\n paging: \"paging\"\n },\n outputs: {\n pageChanged: \"pageChanged\",\n pageSizeChanged: \"pageSizeChanged\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return PagingGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructurePagingGate = /*#__PURE__*/(() => {\n class StructurePagingGate extends PagingGate {\n pagingDisplayModeArchive;\n constructor(structureId, compositionId, pagingPublisher, pagingEventRepository, pagingDisplayModeArchive) {\n super(structureId, compositionId, pagingPublisher, pagingEventRepository);\n this.pagingDisplayModeArchive = pagingDisplayModeArchive;\n }\n ngOnChanges(changes) {\n if (this.isDefined('paging', changes)) {\n let pagingConfig;\n if (typeof this.paging === 'boolean') {\n pagingConfig = {\n enabled: this.paging\n };\n } else {\n pagingConfig = this.paging;\n if (this.paging.displayMode !== undefined) {\n this.pagingDisplayModeArchive.next(this.paging.displayMode);\n }\n }\n this.pagingCommandInvoker.setPaging(pagingConfig, this.structureId);\n }\n }\n static ɵfac = function StructurePagingGate_Factory(t) {\n return new (t || StructurePagingGate)(i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(CompositionId), i0.ɵɵdirectiveInject(PagingPublisher), i0.ɵɵdirectiveInject(PagingEventRepository), i0.ɵɵdirectiveInject(PagingDisplayModeArchive));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructurePagingGate,\n selectors: [[\"gui-structure\", \"paging\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructurePagingGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SearchingGate = /*#__PURE__*/(() => {\n class SearchingGate extends Gate {\n structureId;\n searchEventRepository;\n searchCommandInvoker;\n searching;\n searchPhraseChanged = new EventEmitter();\n constructor(structureId, searchEventRepository, searchCommandInvoker) {\n super();\n this.structureId = structureId;\n this.searchEventRepository = searchEventRepository;\n this.searchCommandInvoker = searchCommandInvoker;\n }\n ngOnChanges(changes) {\n if (this.isDefined('searching', changes)) {\n let searching;\n if (typeof this.searching === 'boolean') {\n searching = {\n enabled: this.searching\n };\n } else {\n searching = this.searching;\n }\n this.searchCommandInvoker.setSearchingConfig(searching, this.structureId);\n }\n }\n ngOnInit() {\n this.subscribeAndEmit(this.searchEventRepository.onSearchPhrase(this.structureId.toReadModelRootId()), this.searchPhraseChanged);\n }\n static ɵfac = function SearchingGate_Factory(t) {\n return new (t || SearchingGate)(i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(SearchEventRepository), i0.ɵɵdirectiveInject(SearchPublisher));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: SearchingGate,\n inputs: {\n searching: \"searching\"\n },\n outputs: {\n searchPhraseChanged: \"searchPhraseChanged\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return SearchingGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureSearchingGate = /*#__PURE__*/(() => {\n class StructureSearchingGate extends SearchingGate {\n constructor(structureId, searchEventRepository, searchCommandInvoker) {\n super(structureId, searchEventRepository, searchCommandInvoker);\n }\n static ɵfac = function StructureSearchingGate_Factory(t) {\n return new (t || StructureSearchingGate)(i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(SearchEventRepository), i0.ɵɵdirectiveInject(SearchPublisher));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureSearchingGate,\n selectors: [[\"gui-structure\", \"searching\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n return StructureSearchingGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SelectionGate = /*#__PURE__*/(() => {\n class SelectionGate extends Gate {\n structureId;\n formationEventRepository;\n formationPublisher;\n rowSelection;\n itemsSelected = new EventEmitter();\n selectedRows = new EventEmitter();\n constructor(structureId, formationEventRepository, formationPublisher) {\n super();\n this.structureId = structureId;\n this.formationEventRepository = formationEventRepository;\n this.formationPublisher = formationPublisher;\n }\n ngOnChanges(changes) {\n if (this.isDefined('rowSelection', changes)) {\n if (this.rowSelection.isEnabledDefined()) {\n this.formationPublisher.setSelection(this.rowSelection.isEnabled(), this.structureId);\n }\n if (this.rowSelection.isTypeDefined()) {\n this.formationPublisher.changeType(this.rowSelection.getType(), this.structureId);\n }\n if (this.rowSelection.isModeDefined()) {\n this.formationPublisher.changeMode(this.rowSelection.getMode(), this.structureId);\n }\n if (this.rowSelection.isMatcherDefined()) {\n this.formationPublisher.setMatcher(this.rowSelection.getMatcher(), this.structureId);\n }\n if (this.rowSelection.isSelectedRowIndexesDefined()) {\n this.formationPublisher.selectByIndex(this.rowSelection.getSelectedRowIndexes(), this.structureId);\n }\n if (this.rowSelection.isSelectedRowIdsDefined()) {\n this.formationPublisher.selectByIds(this.rowSelection.getSelectedRowIds(), this.structureId);\n }\n if (this.rowSelection.isCustomSelectConfig()) {\n this.formationPublisher.setCustomSelection(this.rowSelection.getCustomSelectConfig(), this.structureId);\n }\n }\n }\n ngOnInit() {\n this.subscribeAndEmit(this.formationEventRepository.onItemSelected(this.structureId), this.selectedRows);\n this.subscribeAndEmit(this.selectItemsSelected(), this.itemsSelected);\n }\n selectItemsSelected() {\n return this.formationEventRepository.onItemSelected(this.structureId).pipe(hermesMap(items => {\n return items.map(i => i.getItem());\n }));\n }\n static ɵfac = function SelectionGate_Factory(t) {\n return new (t || SelectionGate)(i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(FormationEventRepository), i0.ɵɵdirectiveInject(FormationPublisher));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: SelectionGate,\n inputs: {\n rowSelection: \"rowSelection\"\n },\n outputs: {\n itemsSelected: \"itemsSelected\",\n selectedRows: \"selectedRows\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return SelectionGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureSelectionGate = /*#__PURE__*/(() => {\n class StructureSelectionGate extends SelectionGate {\n selectionGate;\n constructor(structureId, formationEventService, formationCommandDispatcher) {\n super(structureId, formationEventService, formationCommandDispatcher);\n }\n static ɵfac = function StructureSelectionGate_Factory(t) {\n return new (t || StructureSelectionGate)(i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(FormationEventRepository), i0.ɵɵdirectiveInject(FormationPublisher));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureSelectionGate,\n selectors: [[\"gui-structure\", \"rowSelection\", \"\"], [\"gui-structure\", \"selectionGate\", \"\"]],\n inputs: {\n selectionGate: \"selectionGate\"\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n return StructureSelectionGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureL10nGate = /*#__PURE__*/(() => {\n class StructureL10nGate extends Gate {\n translationService;\n localization;\n constructor(translationService) {\n super();\n this.translationService = translationService;\n }\n ngOnChanges(changes) {\n if (this.isDefined('localization', changes)) {\n if (this.localization.translationResolver) {\n this.translationService.setResolver(this.localization.translationResolver);\n }\n if (this.localization.translation) {\n this.translationService.changeTranslation(this.localization.translation);\n }\n }\n }\n static ɵfac = function StructureL10nGate_Factory(t) {\n return new (t || StructureL10nGate)(i0.ɵɵdirectiveInject(TranslationFacade));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureL10nGate,\n selectors: [[\"gui-structure\", \"localization\", \"\"]],\n inputs: {\n localization: \"localization\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructureL10nGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructurePanelGate = /*#__PURE__*/(() => {\n class StructurePanelGate extends Gate {\n structureTitlePanelConfigArchive;\n structureFooterPanelConfigArchive;\n titlePanel;\n footerPanel;\n constructor(structureTitlePanelConfigArchive, structureFooterPanelConfigArchive) {\n super();\n this.structureTitlePanelConfigArchive = structureTitlePanelConfigArchive;\n this.structureFooterPanelConfigArchive = structureFooterPanelConfigArchive;\n }\n ngOnChanges(changes) {\n if (this.isDefined('titlePanel', changes)) {\n this.structureTitlePanelConfigArchive.next(this.titlePanel);\n }\n if (this.isDefined('footerPanel', changes)) {\n this.structureFooterPanelConfigArchive.next(this.footerPanel);\n }\n }\n static ɵfac = function StructurePanelGate_Factory(t) {\n return new (t || StructurePanelGate)(i0.ɵɵdirectiveInject(StructureTitlePanelConfigArchive), i0.ɵɵdirectiveInject(StructureFooterPanelConfigArchive));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructurePanelGate,\n selectors: [[\"gui-structure\", \"titlePanel\", \"\", \"footerPanel\", \"\"]],\n inputs: {\n titlePanel: \"titlePanel\",\n footerPanel: \"footerPanel\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructurePanelGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureRowDetailGate = /*#__PURE__*/(() => {\n class StructureRowDetailGate extends Gate {\n structureDetailViewConfigArchive;\n rowDetail;\n constructor(structureDetailViewConfigArchive) {\n super();\n this.structureDetailViewConfigArchive = structureDetailViewConfigArchive;\n }\n ngOnChanges(changes) {\n if (this.isDefined('rowDetail', changes)) {\n this.structureDetailViewConfigArchive.next(this.rowDetail);\n }\n }\n static ɵfac = function StructureRowDetailGate_Factory(t) {\n return new (t || StructureRowDetailGate)(i0.ɵɵdirectiveInject(StructureRowDetailConfigArchive));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureRowDetailGate,\n selectors: [[\"gui-structure\", \"rowDetail\", \"\"]],\n inputs: {\n rowDetail: \"rowDetail\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructureRowDetailGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureColumnMenuGate = /*#__PURE__*/(() => {\n class StructureColumnMenuGate extends Gate {\n structureColumnMenuConfigArchive;\n columnMenu;\n constructor(structureColumnMenuConfigArchive) {\n super();\n this.structureColumnMenuConfigArchive = structureColumnMenuConfigArchive;\n }\n ngOnChanges(changes) {\n if (this.isDefined('columnMenu', changes)) {\n this.structureColumnMenuConfigArchive.nextConfig(this.columnMenu);\n }\n }\n static ɵfac = function StructureColumnMenuGate_Factory(t) {\n return new (t || StructureColumnMenuGate)(i0.ɵɵdirectiveInject(StructureColumnMenuConfigArchive));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureColumnMenuGate,\n selectors: [[\"gui-structure\", \"columnMenu\", \"\"]],\n inputs: {\n columnMenu: \"columnMenu\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructureColumnMenuGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureSummariesGate = /*#__PURE__*/(() => {\n class StructureSummariesGate extends Gate {\n structureId;\n summariesCommandInvoker;\n summaries;\n constructor(structureId, summariesCommandInvoker) {\n super();\n this.structureId = structureId;\n this.summariesCommandInvoker = summariesCommandInvoker;\n }\n ngOnChanges(changes) {\n ifChanged(changes.summaries, () => {\n this.summariesCommandInvoker.setConfig(this.summaries, this.structureId);\n });\n }\n static ɵfac = function StructureSummariesGate_Factory(t) {\n return new (t || StructureSummariesGate)(i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(SummariesPublisher));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureSummariesGate,\n selectors: [[\"gui-structure\", \"summaries\", \"\"]],\n inputs: {\n summaries: \"summaries\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructureSummariesGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureInfoPanelGate = /*#__PURE__*/(() => {\n class StructureInfoPanelGate extends Gate {\n structureInfoPanelConfigService;\n infoPanel;\n constructor(structureInfoPanelConfigService) {\n super();\n this.structureInfoPanelConfigService = structureInfoPanelConfigService;\n }\n ngOnChanges(changes) {\n if (this.isDefined('infoPanel', changes)) {\n if (typeof this.infoPanel === 'boolean') {\n this.infoPanel = {\n enabled: this.infoPanel\n };\n }\n this.structureInfoPanelConfigService.set(this.infoPanel);\n }\n }\n static ɵfac = function StructureInfoPanelGate_Factory(t) {\n return new (t || StructureInfoPanelGate)(i0.ɵɵdirectiveInject(StructureInfoPanelConfigService));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureInfoPanelGate,\n selectors: [[\"gui-structure\", \"infoPanel\", \"\"]],\n inputs: {\n infoPanel: \"infoPanel\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructureInfoPanelGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureRowClassGate = /*#__PURE__*/(() => {\n class StructureRowClassGate extends Gate {\n schemaReadModelRootId;\n schemaPublisher;\n rowClass;\n constructor(schemaReadModelRootId, schemaPublisher) {\n super();\n this.schemaReadModelRootId = schemaReadModelRootId;\n this.schemaPublisher = schemaPublisher;\n }\n ngOnChanges(changes) {\n if (this.isDefined('rowClass', changes)) {\n this.schemaPublisher.setRowClass(this.rowClass, this.schemaReadModelRootId);\n }\n }\n static ɵfac = function StructureRowClassGate_Factory(t) {\n return new (t || StructureRowClassGate)(i0.ɵɵdirectiveInject(SchemaReadModelRootId), i0.ɵɵdirectiveInject(SchemaPublisher));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureRowClassGate,\n selectors: [[\"gui-structure\", \"rowClass\", \"\"]],\n inputs: {\n rowClass: \"rowClass\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructureRowClassGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureRowStyleGate = /*#__PURE__*/(() => {\n class StructureRowStyleGate extends Gate {\n schemaReadModelRootId;\n schemaPublisher;\n rowStyle;\n constructor(schemaReadModelRootId, schemaPublisher) {\n super();\n this.schemaReadModelRootId = schemaReadModelRootId;\n this.schemaPublisher = schemaPublisher;\n }\n ngOnChanges(changes) {\n if (this.isDefined('rowStyle', changes)) {\n this.schemaPublisher.setRowStyle(this.rowStyle, this.schemaReadModelRootId);\n }\n }\n static ɵfac = function StructureRowStyleGate_Factory(t) {\n return new (t || StructureRowStyleGate)(i0.ɵɵdirectiveInject(SchemaReadModelRootId), i0.ɵɵdirectiveInject(SchemaPublisher));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureRowStyleGate,\n selectors: [[\"gui-structure\", \"rowStyle\", \"\"]],\n inputs: {\n rowStyle: \"rowStyle\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructureRowStyleGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureRowColoringGate = /*#__PURE__*/(() => {\n class StructureRowColoringGate extends Gate {\n schemaId;\n schemaCommandInvoker;\n schemaEventRepository;\n rowColoring;\n rowColoringChanged = new EventEmitter();\n constructor(schemaId, schemaCommandInvoker, schemaEventRepository) {\n super();\n this.schemaId = schemaId;\n this.schemaCommandInvoker = schemaCommandInvoker;\n this.schemaEventRepository = schemaEventRepository;\n }\n ngOnChanges(changes) {\n if (this.isDefined('rowColoring', changes)) {\n this.schemaCommandInvoker.setRowColoring(this.rowColoring, this.schemaId);\n }\n }\n ngOnInit() {\n this.subscribeAndEmit(this.schemaEventRepository.onRowColoring(this.schemaId), this.rowColoringChanged);\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n }\n static ɵfac = function StructureRowColoringGate_Factory(t) {\n return new (t || StructureRowColoringGate)(i0.ɵɵdirectiveInject(SchemaReadModelRootId), i0.ɵɵdirectiveInject(SchemaPublisher), i0.ɵɵdirectiveInject(SchemaEventRepository));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureRowColoringGate,\n selectors: [[\"gui-structure\", \"rowColoring\", \"\"]],\n inputs: {\n rowColoring: \"rowColoring\"\n },\n outputs: {\n rowColoringChanged: \"rowColoringChanged\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructureRowColoringGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ThemeGridGate = /*#__PURE__*/(() => {\n class ThemeGridGate extends Gate {\n schemaId;\n schemaCommandInvoker;\n schemaEventRepository;\n verticalGrid;\n horizontalGrid;\n horizontalGridChanged = new EventEmitter();\n verticalGridChanged = new EventEmitter();\n constructor(schemaId, schemaCommandInvoker, schemaEventRepository) {\n super();\n this.schemaId = schemaId;\n this.schemaCommandInvoker = schemaCommandInvoker;\n this.schemaEventRepository = schemaEventRepository;\n this.subscribeAndEmit(this.schemaEventRepository.onHorizontalGridChanged(this.schemaId), this.horizontalGridChanged);\n this.subscribeAndEmit(this.schemaEventRepository.onVerticalGridChanged(this.schemaId), this.verticalGridChanged);\n }\n ngOnChanges(changes) {\n if (this.isDefined('verticalGrid', changes)) {\n this.schemaCommandInvoker.setVerticalGrid(this.verticalGrid, this.schemaId);\n }\n if (this.isDefined('horizontalGrid', changes)) {\n this.schemaCommandInvoker.setHorizontalGrid(this.horizontalGrid, this.schemaId);\n }\n }\n static ɵfac = function ThemeGridGate_Factory(t) {\n return new (t || ThemeGridGate)(i0.ɵɵdirectiveInject(SchemaReadModelRootId), i0.ɵɵdirectiveInject(SchemaPublisher), i0.ɵɵdirectiveInject(SchemaEventRepository));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: ThemeGridGate,\n selectors: [[\"gui-structure\", \"verticalGrid\", \"\", \"horizontalGrid\", \"\"]],\n inputs: {\n verticalGrid: \"verticalGrid\",\n horizontalGrid: \"horizontalGrid\"\n },\n outputs: {\n horizontalGridChanged: \"horizontalGridChanged\",\n verticalGridChanged: \"verticalGridChanged\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return ThemeGridGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureSortingGate = /*#__PURE__*/(() => {\n class StructureSortingGate extends Gate {\n structureId;\n sortingCommandInvoker;\n sorting;\n constructor(structureId, sortingCommandInvoker) {\n super();\n this.structureId = structureId;\n this.sortingCommandInvoker = sortingCommandInvoker;\n }\n ngOnChanges(changes) {\n ifChanged(changes.sorting, () => {\n let sorting;\n if (typeof this.sorting === 'boolean') {\n sorting = {\n enabled: this.sorting\n };\n } else {\n sorting = this.sorting;\n }\n this.sortingCommandInvoker.setSortingConfig(sorting, this.structureId);\n });\n }\n static ɵfac = function StructureSortingGate_Factory(t) {\n return new (t || StructureSortingGate)(i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(SortingPublisher));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureSortingGate,\n selectors: [[\"gui-structure\", \"sorting\", \"\"]],\n inputs: {\n sorting: \"sorting\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructureSortingGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SourceLoadingGate = /*#__PURE__*/(() => {\n class SourceLoadingGate extends Gate {\n structureId;\n sourceCommandInvoker;\n loading;\n constructor(structureId, sourceCommandInvoker) {\n super();\n this.structureId = structureId;\n this.sourceCommandInvoker = sourceCommandInvoker;\n }\n ngOnChanges(changes) {\n if (this.isDefined('loading', changes)) {\n this.sourceCommandInvoker.setLoading(this.loading, this.structureId);\n }\n }\n ngOnInit() {}\n static ɵfac = function SourceLoadingGate_Factory(t) {\n return new (t || SourceLoadingGate)(i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(SourcePublisher));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: SourceLoadingGate,\n selectors: [[\"gui-structure\", \"loading\", \"\"]],\n inputs: {\n loading: \"loading\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return SourceLoadingGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureFilterGate = /*#__PURE__*/(() => {\n class StructureFilterGate extends Gate {\n structureId;\n structureCommandInvoker;\n filtering;\n constructor(structureId, structureCommandInvoker) {\n super();\n this.structureId = structureId;\n this.structureCommandInvoker = structureCommandInvoker;\n }\n ngOnChanges(changes) {\n ifChanged(changes.filtering, () => {\n let filtering;\n if (typeof this.filtering === 'boolean') {\n filtering = {\n enabled: this.filtering\n };\n } else {\n filtering = this.filtering;\n }\n this.structureCommandInvoker.setFilterConfig(filtering, this.structureId);\n });\n }\n static ɵfac = function StructureFilterGate_Factory(t) {\n return new (t || StructureFilterGate)(i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(StructurePublisher));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureFilterGate,\n selectors: [[\"gui-structure\", \"filtering\", \"\"]],\n inputs: {\n filtering: \"filtering\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructureFilterGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureQuickFiltersGate = /*#__PURE__*/(() => {\n class StructureQuickFiltersGate extends Gate {\n structureId;\n structureCommandInvoker;\n quickFilters;\n constructor(structureId, structureCommandInvoker) {\n super();\n this.structureId = structureId;\n this.structureCommandInvoker = structureCommandInvoker;\n }\n ngOnChanges(changes) {\n ifChanged(changes.quickFilters, () => {\n let quickFilters;\n if (typeof this.quickFilters === 'boolean') {\n quickFilters = {\n enabled: this.quickFilters\n };\n } else {\n quickFilters = this.quickFilters;\n }\n this.structureCommandInvoker.setQuickFiltersConfig(quickFilters, this.structureId);\n });\n }\n static ɵfac = function StructureQuickFiltersGate_Factory(t) {\n return new (t || StructureQuickFiltersGate)(i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(StructurePublisher));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: StructureQuickFiltersGate,\n selectors: [[\"gui-structure\", \"quickFilters\", \"\"]],\n inputs: {\n quickFilters: \"quickFilters\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return StructureQuickFiltersGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet VerticalFormationGate = /*#__PURE__*/(() => {\n class VerticalFormationGate extends Gate {\n structureId;\n structureCommandInvoker;\n virtualScroll;\n constructor(structureId, structureCommandInvoker) {\n super();\n this.structureId = structureId;\n this.structureCommandInvoker = structureCommandInvoker;\n }\n ngOnChanges(changes) {\n if (this.isDefined('virtualScroll', changes)) {\n if (this.virtualScroll) {\n this.structureCommandInvoker.enableVirtualScroll(this.structureId);\n } else {\n this.structureCommandInvoker.disableVirtualScroll(this.structureId);\n }\n }\n }\n static ɵfac = function VerticalFormationGate_Factory(t) {\n return new (t || VerticalFormationGate)(i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(StructurePublisher));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: VerticalFormationGate,\n selectors: [[\"gui-structure\", \"virtualScroll\", \"\"]],\n inputs: {\n virtualScroll: \"virtualScroll\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n return VerticalFormationGate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet GuiGridComponent = /*#__PURE__*/(() => {\n class GuiGridComponent extends GuiGridGateway {\n platformId;\n elementRef;\n changeDetectorRef;\n gridRegister;\n structureIdGenerator;\n formationCommandDispatcher;\n formationWarehouse;\n compositionCommandInvoker;\n compositionWarehouse;\n filterIntegration;\n sourceCommandDispatcher;\n searchCommandInvoker;\n schemaCommandInvoker;\n structureCommandDispatcher;\n summariesCommandInvoker;\n sortingCommandInvoker;\n pagingCommandInvoker;\n static GUI_GRID_ID = 'gui-grid-id';\n structureRef;\n gridId; // can be set once\n api;\n localGridId;\n gridThemeCommandInvoker;\n classModifier;\n attributeModifier;\n constructor(platformId, elementRef, changeDetectorRef, gridRegister, structureIdGenerator,\n // delegate\n formationCommandDispatcher, formationWarehouse, compositionCommandInvoker, compositionWarehouse, filterIntegration, sourceCommandDispatcher, searchCommandInvoker, schemaCommandInvoker, structureCommandDispatcher, summariesCommandInvoker, sortingCommandInvoker, pagingCommandInvoker) {\n super();\n this.platformId = platformId;\n this.elementRef = elementRef;\n this.changeDetectorRef = changeDetectorRef;\n this.gridRegister = gridRegister;\n this.structureIdGenerator = structureIdGenerator;\n this.formationCommandDispatcher = formationCommandDispatcher;\n this.formationWarehouse = formationWarehouse;\n this.compositionCommandInvoker = compositionCommandInvoker;\n this.compositionWarehouse = compositionWarehouse;\n this.filterIntegration = filterIntegration;\n this.sourceCommandDispatcher = sourceCommandDispatcher;\n this.searchCommandInvoker = searchCommandInvoker;\n this.schemaCommandInvoker = schemaCommandInvoker;\n this.structureCommandDispatcher = structureCommandDispatcher;\n this.summariesCommandInvoker = summariesCommandInvoker;\n this.sortingCommandInvoker = sortingCommandInvoker;\n this.pagingCommandInvoker = pagingCommandInvoker;\n this.gridThemeCommandInvoker = new GuiGridThemeCommandInvoker(this.schemaCommandInvoker, this.gridThemeConverter, this.gridRowColoringConverter);\n this.classModifier = new ClassModifier(this.elementRef.nativeElement);\n this.attributeModifier = new AttributeModifier(this.elementRef.nativeElement);\n }\n ngOnInit() {\n this.classModifier.getHost().add('gui-grid');\n this.initApi();\n let gridId = this.gridId;\n if (gridId === undefined) {\n // gridId = this.gridIdGenerator.generateId();\n gridId = 'gui-grid-' + this.structureIdGenerator.generateId();\n }\n this.localGridId = gridId;\n this.exposeGridId();\n // register\n this.gridRegister.register(gridId, this, this.structureRef.getStructureId());\n if (isPlatformBrowser(this.platformId)) {\n window['getGuiGrid'] = gridId => {\n const gridConsoleConfig = this.gridRegister.getValues(gridId);\n if (gridConsoleConfig) {\n return this.api;\n } else {\n return undefined;\n }\n };\n }\n }\n ngOnDestroy() {\n this.gridRegister.unregister(this.localGridId);\n }\n getElementRef() {\n return this.elementRef;\n }\n detectChanges() {\n this.changeDetectorRef.detectChanges();\n }\n exposeGridId() {\n this.attributeModifier.getHost().setAttribute(GuiGridComponent.GUI_GRID_ID, this.localGridId);\n }\n initApi() {\n this.api = new GuiGridApiProvider(this.structureRef.structureId, this.structureRef.compositionId, this.structureRef.schemaReadModelRootId, this.formationCommandDispatcher, this.formationWarehouse, this.compositionCommandInvoker, this.compositionWarehouse, this.filterIntegration, this.sourceCommandDispatcher, this.searchCommandInvoker, this.gridThemeCommandInvoker, this.structureCommandDispatcher, this.summariesCommandInvoker, this.sortingCommandInvoker, this.pagingCommandInvoker).provide();\n }\n static ɵfac = function GuiGridComponent_Factory(t) {\n return new (t || GuiGridComponent)(i0.ɵɵdirectiveInject(PLATFORM_ID), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(GuiGridRegister), i0.ɵɵdirectiveInject(StructureIdGenerator), i0.ɵɵdirectiveInject(FormationPublisher), i0.ɵɵdirectiveInject(FormationWarehouse), i0.ɵɵdirectiveInject(CompositionPublisher), i0.ɵɵdirectiveInject(CompositionWarehouse), i0.ɵɵdirectiveInject(FilterIntegration), i0.ɵɵdirectiveInject(SourcePublisher), i0.ɵɵdirectiveInject(SearchPublisher), i0.ɵɵdirectiveInject(SchemaPublisher), i0.ɵɵdirectiveInject(StructurePublisher), i0.ɵɵdirectiveInject(SummariesPublisher), i0.ɵɵdirectiveInject(SortingPublisher), i0.ɵɵdirectiveInject(PagingPublisher));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: GuiGridComponent,\n selectors: [[\"gui-grid\"]],\n viewQuery: function GuiGridComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c81, 7);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.structureRef = _t.first);\n }\n },\n inputs: {\n gridId: \"gridId\"\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: StructureDefinition,\n useValue: guiGridStructureDefinition\n }, {\n provide: structureParentComponent,\n useExisting: GuiGridComponent\n }]), i0.ɵɵInheritDefinitionFeature],\n decls: 2,\n vars: 31,\n consts: [[\"structure\", \"\"], [3, \"cellEditCanceled\", \"cellEditEntered\", \"cellEditSubmitted\", \"columnsChanged\", \"containerWidthChanged\", \"horizontalGridChanged\", \"itemsSelected\", \"pageChanged\", \"pageSizeChanged\", \"rowColoringChanged\", \"searchPhraseChanged\", \"selectedRows\", \"sourceEdited\", \"themeChanged\", \"verticalGridChanged\", \"autoResizeWidth\", \"cellEditing\", \"columnHeaderBottom\", \"columnHeaderTop\", \"columnMenu\", \"columns\", \"editMode\", \"filtering\", \"footerPanel\", \"horizontalGrid\", \"infoPanel\", \"loading\", \"localization\", \"maxHeight\", \"paging\", \"quickFilters\", \"rowClass\", \"rowColoring\", \"rowDetail\", \"rowHeight\", \"rowSelection\", \"rowStyle\", \"searching\", \"sorting\", \"source\", \"summaries\", \"theme\", \"titlePanel\", \"verticalGrid\", \"virtualScroll\", \"width\"]],\n template: function GuiGridComponent_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"gui-structure\", 1, 0);\n i0.ɵɵlistener(\"cellEditCanceled\", function GuiGridComponent_Template_gui_structure_cellEditCanceled_0_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onCellEditCancel());\n })(\"cellEditEntered\", function GuiGridComponent_Template_gui_structure_cellEditEntered_0_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onCellEditEnter());\n })(\"cellEditSubmitted\", function GuiGridComponent_Template_gui_structure_cellEditSubmitted_0_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onCellEditSubmit());\n })(\"columnsChanged\", function GuiGridComponent_Template_gui_structure_columnsChanged_0_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onColumnsChange());\n })(\"containerWidthChanged\", function GuiGridComponent_Template_gui_structure_containerWidthChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onContainerWidthChange($event));\n })(\"horizontalGridChanged\", function GuiGridComponent_Template_gui_structure_horizontalGridChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onHorizontalGrid($event));\n })(\"itemsSelected\", function GuiGridComponent_Template_gui_structure_itemsSelected_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onItemSelect($event));\n })(\"pageChanged\", function GuiGridComponent_Template_gui_structure_pageChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onPageChange($event));\n })(\"pageSizeChanged\", function GuiGridComponent_Template_gui_structure_pageSizeChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onPageSizeChange($event));\n })(\"rowColoringChanged\", function GuiGridComponent_Template_gui_structure_rowColoringChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onRowColoring($event));\n })(\"searchPhraseChanged\", function GuiGridComponent_Template_gui_structure_searchPhraseChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onSearchPhrase($event));\n })(\"selectedRows\", function GuiGridComponent_Template_gui_structure_selectedRows_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onRowsSelect($event));\n })(\"sourceEdited\", function GuiGridComponent_Template_gui_structure_sourceEdited_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onSourceEdit($event));\n })(\"themeChanged\", function GuiGridComponent_Template_gui_structure_themeChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onTheme($event));\n })(\"verticalGridChanged\", function GuiGridComponent_Template_gui_structure_verticalGridChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onVerticalGrid($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"autoResizeWidth\", ctx.autoResizeWidth)(\"cellEditing\", ctx.cellEditingConfig)(\"columnHeaderBottom\", ctx.columnHeaderBottom)(\"columnHeaderTop\", ctx.columnHeaderTop)(\"columnMenu\", ctx.columnMenuConfig)(\"columns\", ctx.columnsConfig)(\"editMode\", ctx.editMode)(\"filtering\", ctx.filtering)(\"footerPanel\", ctx.footerPanel)(\"horizontalGrid\", ctx.horizontalGrid)(\"infoPanel\", ctx.infoPanel)(\"loading\", ctx.loading)(\"localization\", ctx.localization)(\"maxHeight\", ctx.maxHeight)(\"paging\", ctx.paging)(\"quickFilters\", ctx.quickFilters)(\"rowClass\", ctx.rowClass)(\"rowColoring\", ctx.rowColoringConfig)(\"rowDetail\", ctx.rowDetail)(\"rowHeight\", ctx.rowHeight)(\"rowSelection\", ctx.rowSelectionConfig)(\"rowStyle\", ctx.rowStyle)(\"searching\", ctx.searching)(\"sorting\", ctx.sorting)(\"source\", ctx.source)(\"summaries\", ctx.summaries)(\"theme\", ctx.themeConfig)(\"titlePanel\", ctx.titlePanel)(\"verticalGrid\", ctx.verticalGrid)(\"virtualScroll\", ctx.virtualScroll)(\"width\", ctx.width);\n }\n },\n dependencies: [StructureComponent, StructureColumnHeaderGate, StructurePagingGate, StructureSearchingGate, StructureSelectionGate, StructureL10nGate, StructurePanelGate, StructureRowDetailGate, StructureColumnMenuGate, StructureSummariesGate, StructureInfoPanelGate, StructureRowClassGate, StructureRowStyleGate, StructureRowColoringGate, ThemeGridGate, StructureSortingGate, SourceLoadingGate, StructureFilterGate, StructureQuickFiltersGate, VerticalFormationGate],\n styles: [\".gui-grid{display:block;width:100%}\\n\"],\n encapsulation: 2\n });\n }\n return GuiGridComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst fabricImports = [FabricBadgeModule, FabricButtonModule, FabricButtonGroupModule, FabricCheckboxModule, FabricChipModule, FabricDrawerModule, FabricDropdownModule, FabricRadioButtonModule, FabricRadioGroupModule, FabricProgressBarModule, FabricProgressSpinnerModule, FabricSelectModule, FabricSpinnerModule, FabricTabModule, FabricTooltipModule, FabricToggleButtonModule, FabricInputModule, FabricDialogModule, FabricInlineDialogModule, FabricTabModule];\nlet NumberFormatterModule = /*#__PURE__*/(() => {\n class NumberFormatterModule {\n static ɵfac = function NumberFormatterModule_Factory(t) {\n return new (t || NumberFormatterModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: NumberFormatterModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n return NumberFormatterModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst declarations$3 = [StructureColumnManagerComponent, StructureDialogColumnManagerComponent, StructureMenuColumnManagerComponent, StructureColumnManagerIconComponent];\nlet StructureColumnManagerModule = /*#__PURE__*/(() => {\n class StructureColumnManagerModule {\n static ɵfac = function StructureColumnManagerModule_Factory(t) {\n return new (t || StructureColumnManagerModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: StructureColumnManagerModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [StructureDialogColumnManagerService],\n imports: [CommonModule, fabricImports, GuiTemplateModule, TranslationFeatureModule]\n });\n }\n return StructureColumnManagerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SchemaManagerModule = /*#__PURE__*/(() => {\n class SchemaManagerModule {\n static ɵfac = function SchemaManagerModule_Factory(t) {\n return new (t || SchemaManagerModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: SchemaManagerModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [StructureDialogSchemaManagerService],\n imports: [CommonModule, fabricImports, TranslationFeatureModule, GuiTemplateModule]\n });\n }\n return SchemaManagerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FilterIconComponent = /*#__PURE__*/(() => {\n class FilterIconComponent extends IconComponent {\n constructor(elementRef, changeDetectorRef) {\n super(elementRef, changeDetectorRef);\n }\n getSelectorName() {\n return 'gui-filter-icon';\n }\n static ɵfac = function FilterIconComponent_Factory(t) {\n return new (t || FilterIconComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: FilterIconComponent,\n selectors: [[\"div\", \"gui-filter-icon\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c82,\n decls: 4,\n vars: 0,\n consts: [[\"xmlns\", \"http://www.w3.org/2000/svg\", \"viewBox\", \"0 0 10.32 7.23\"], [\"x1\", \"9.57\", \"y1\", \"0.75\", \"x2\", \"0.75\", \"y2\", \"0.75\", 1, \"cls-1\"], [\"x1\", \"8.14\", \"y1\", \"3.62\", \"x2\", \"2.18\", \"y2\", \"3.62\", 1, \"cls-1\"], [\"x1\", \"6.71\", \"y1\", \"6.48\", \"x2\", \"3.62\", \"y2\", \"6.48\", 1, \"cls-1\"]],\n template: function FilterIconComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 0);\n i0.ɵɵelement(1, \"line\", 1)(2, \"line\", 2)(3, \"line\", 3);\n i0.ɵɵelementEnd();\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return FilterIconComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass FieldWarehouse {\n constructor() {}\n}\nlet FilterTypeSelectorComponent = /*#__PURE__*/(() => {\n class FilterTypeSelectorComponent extends PureComponent {\n filterTypes;\n filterTypeSelected = new EventEmitter();\n filterTypesAsOptions = [];\n disabled = true;\n constructor(elementRef) {\n super(elementRef);\n }\n ngOnChanges(changes) {\n this.ifChanged(changes.filterTypes, () => {\n this.filterTypesAsOptions = this.filterTypes.map(filter => {\n return {\n name: filter.getId().toString(),\n value: filter.getName()\n };\n });\n this.disabled = this.filterTypesAsOptions.length === 0;\n });\n }\n onSelectChange(option) {\n const filterType = this.filterTypes.find(filterType => {\n return filterType.getId().toString() === option.name;\n });\n this.filterTypeSelected.emit(filterType.getId());\n }\n getSelectorName() {\n return 'gui-filter-type-selector';\n }\n static ɵfac = function FilterTypeSelectorComponent_Factory(t) {\n return new (t || FilterTypeSelectorComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: FilterTypeSelectorComponent,\n selectors: [[\"div\", \"gui-filter-type-selector\", \"\", \"filterTypes\", \"\"]],\n inputs: {\n filterTypes: \"filterTypes\"\n },\n outputs: {\n filterTypeSelected: \"filterTypeSelected\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c83,\n decls: 1,\n vars: 3,\n consts: [[3, \"optionChanged\", \"disabled\", \"options\", \"placeholder\"]],\n template: function FilterTypeSelectorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"gui-select\", 0);\n i0.ɵɵlistener(\"optionChanged\", function FilterTypeSelectorComponent_Template_gui_select_optionChanged_0_listener($event) {\n return ctx.onSelectChange($event);\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"disabled\", ctx.disabled)(\"options\", ctx.filterTypesAsOptions)(\"placeholder\", \"Select filter type\");\n }\n },\n dependencies: [i1$1.FabricSelectComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return FilterTypeSelectorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FilterValueComponent = /*#__PURE__*/(() => {\n class FilterValueComponent extends SmartComponent {\n effects;\n formBuilder;\n static FORM_FILTER_VALUE = 'filterValue';\n formRef;\n valueChanged = new EventEmitter();\n filterForm;\n constructor(detector, elementRef, effects, formBuilder) {\n super(detector, elementRef);\n this.effects = effects;\n this.formBuilder = formBuilder;\n const controlsConfig = {};\n controlsConfig[FilterValueComponent.FORM_FILTER_VALUE] = '';\n this.filterForm = this.formBuilder.group(controlsConfig);\n }\n ngOnInit() {\n this.effects.register(this.selectFilterFormValue(), value => {\n this.valueChanged.emit(value);\n });\n }\n getSelectorName() {\n return 'gui-filter-value';\n }\n selectFilterFormValue() {\n const value$ = this.filterForm.controls[FilterValueComponent.FORM_FILTER_VALUE].valueChanges;\n return fromRxJsObservable(value$);\n }\n static ɵfac = function FilterValueComponent_Factory(t) {\n return new (t || FilterValueComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(GuiEffects), i0.ɵɵdirectiveInject(i1$2.FormBuilder));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: FilterValueComponent,\n selectors: [[\"div\", \"gui-filter-value\", \"\"]],\n viewQuery: function FilterValueComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c42, 5, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.formRef = _t.first);\n }\n },\n outputs: {\n valueChanged: \"valueChanged\"\n },\n features: [i0.ɵɵProvidersFeature([GuiEffects]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c84,\n decls: 3,\n vars: 1,\n consts: [[\"formRef\", \"\"], [3, \"formGroup\"], [\"formControlName\", \"filterValue\"]],\n template: function FilterValueComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"form\", 1, 0);\n i0.ɵɵelement(2, \"input\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"formGroup\", ctx.filterForm);\n }\n },\n dependencies: [i1$2.ɵNgNoValidate, i1$2.DefaultValueAccessor, i1$2.NgControlStatus, i1$2.NgControlStatusGroup, i1$2.FormGroupDirective, i1$2.FormControlName],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return FilterValueComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FieldSelectorComponent = /*#__PURE__*/(() => {\n class FieldSelectorComponent extends PureComponent {\n fields;\n fieldSelected = new EventEmitter();\n fieldsAsOptions;\n constructor(elementRef) {\n super(elementRef);\n }\n ngOnChanges(changes) {\n ifChanged(changes.fields, () => {\n this.fieldsAsOptions = this.fields.map(field => {\n return {\n name: field.getFieldId().toString(),\n value: field.getName()\n };\n });\n });\n }\n onFieldSelected(fieldId) {\n const field = this.fields.find(field => field.getFieldId().toString() === fieldId.name);\n this.fieldSelected.emit(field);\n }\n getSelectorName() {\n return 'gui-field-selector';\n }\n static ɵfac = function FieldSelectorComponent_Factory(t) {\n return new (t || FieldSelectorComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: FieldSelectorComponent,\n selectors: [[\"div\", \"gui-field-selector\", \"\", \"fields\", \"\"]],\n inputs: {\n fields: \"fields\"\n },\n outputs: {\n fieldSelected: \"fieldSelected\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c85,\n decls: 1,\n vars: 0,\n template: function FieldSelectorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtext(0, \"./field-selector.component.html\");\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return FieldSelectorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FilterMenuActiveFiltersComponent = /*#__PURE__*/(() => {\n class FilterMenuActiveFiltersComponent extends PureComponent {\n activeFilters;\n removedFilter = new EventEmitter();\n constructor(elementRef) {\n super(elementRef);\n this.addClassToHost('gui-py-8');\n }\n remove(filter) {\n this.removedFilter.emit(filter.getFilterId());\n }\n getSelectorName() {\n return 'gui-filter-menu-active-filters';\n }\n static ɵfac = function FilterMenuActiveFiltersComponent_Factory(t) {\n return new (t || FilterMenuActiveFiltersComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: FilterMenuActiveFiltersComponent,\n selectors: [[\"div\", \"gui-filter-menu-active-filters\", \"\", \"activeFilters\", \"\"]],\n inputs: {\n activeFilters: \"activeFilters\"\n },\n outputs: {\n removedFilter: \"removedFilter\"\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c86,\n decls: 1,\n vars: 0,\n template: function FilterMenuActiveFiltersComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtext(0, \"./filter-menu-active-filters.component.html\");\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return FilterMenuActiveFiltersComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FilterMenuComponent = /*#__PURE__*/(() => {\n class FilterMenuComponent extends SmartComponent {\n filterCommandInvoker;\n structureId = inject(StructureId);\n fieldWarehouse = inject(FieldWarehouse);\n filterWarehouse = inject(FilterWarehouse);\n selectedColumn;\n selectedField;\n filterTypes;\n selectedFilterTypeId;\n selectedValue;\n fields$ = this.fieldWarehouse.onFields(this.structureId);\n activeFilters$ = this.filterWarehouse.onActiveFilters(this.structureId);\n constructor(changeDetectorRef, elementRef, filterCommandInvoker) {\n super(changeDetectorRef, elementRef);\n this.filterCommandInvoker = filterCommandInvoker;\n this.addClassToHost('gui-block');\n }\n onFieldSelect(field) {\n this.selectedField = field;\n const filterTypeMapOpt = this.filterWarehouse.findFilterTypes(this.structureId);\n filterTypeMapOpt.ifPresent(filterTypeMap => {\n this.filterTypes = filterTypeMap.getFilterTypes(this.selectedField.getFieldId());\n this.reRender();\n });\n }\n onFilterTypeSelect(filterTypeId) {\n this.selectedFilterTypeId = filterTypeId;\n this.reRender();\n }\n removeAllFilters() {\n this.filterCommandInvoker.removeAll(this.structureId);\n }\n onValueChanged(value) {\n this.selectedValue = value;\n }\n addFilter() {\n const fieldId = this.selectedField.getFieldId(),\n filterTypeId = this.selectedFilterTypeId,\n value = this.selectedValue;\n this.filterCommandInvoker.add(fieldId, filterTypeId, value, this.structureId);\n this.clearAddFilterForm();\n }\n onRemovedFilter(filterId) {\n event.preventDefault();\n this.filterCommandInvoker.remove(filterId, this.structureId);\n }\n removeFilter() {}\n clearAddFilterForm() {\n this.selectedColumn = null;\n this.selectedField = null;\n this.selectedFilterTypeId = null;\n this.selectedValue = null;\n this.reRender();\n }\n getSelectorName() {\n return 'gui-filter-menu';\n }\n static ɵfac = function FilterMenuComponent_Factory(t) {\n return new (t || FilterMenuComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(FilterPublisher));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: FilterMenuComponent,\n selectors: [[\"div\", \"gui-filter-menu\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c87,\n decls: 24,\n vars: 10,\n consts: [[\"gui-filter-menu-active-filters\", \"\", 3, \"removedFilter\", \"activeFilters\"], [1, \"gui-flex\", \"gui-flex-row\", \"gui-pb-12\"], [\"gui-field-selector\", \"\", 3, \"fieldSelected\", \"fields\"], [\"gui-filter-type-selector\", \"\", 3, \"filterTypeSelected\", \"filterTypes\"], [\"gui-filter-value\", \"\", 3, \"valueChanged\", 4, \"ngIf\"], [3, \"click\"], [\"gui-button\", \"\", 3, \"primary\"], [1, \"gui-flex\", \"gui-flex-row\", \"gui-justify-between\", \"gui-pt-12\"], [\"gui-button\", \"\", 3, \"click\", \"outline\"], [\"gui-filter-value\", \"\", 3, \"valueChanged\"]],\n template: function FilterMenuComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"h1\");\n i0.ɵɵtext(1, \"Filter menu\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"div\", 0);\n i0.ɵɵpipe(3, \"guiPush\");\n i0.ɵɵlistener(\"removedFilter\", function FilterMenuComponent_Template_div_removedFilter_2_listener($event) {\n return ctx.onRemovedFilter($event);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"div\", 1)(5, \"div\", 2);\n i0.ɵɵpipe(6, \"guiPush\");\n i0.ɵɵlistener(\"fieldSelected\", function FilterMenuComponent_Template_div_fieldSelected_5_listener($event) {\n return ctx.onFieldSelect($event);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(7, \"div\", 3);\n i0.ɵɵlistener(\"filterTypeSelected\", function FilterMenuComponent_Template_div_filterTypeSelected_7_listener($event) {\n return ctx.onFilterTypeSelect($event);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(8, FilterMenuComponent_div_8_Template, 1, 0, \"div\", 4);\n i0.ɵɵelementStart(9, \"button\", 5);\n i0.ɵɵlistener(\"click\", function FilterMenuComponent_Template_button_click_9_listener() {\n return ctx.addFilter();\n });\n i0.ɵɵtext(10, \"Filter\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(11, \"button\", 5);\n i0.ɵɵlistener(\"click\", function FilterMenuComponent_Template_button_click_11_listener() {\n return ctx.removeFilter();\n });\n i0.ɵɵtext(12, \"Remove\");\n i0.ɵɵelementEnd()();\n i0.ɵɵelement(13, \"br\")(14, \"br\")(15, \"br\");\n i0.ɵɵelementStart(16, \"button\", 6);\n i0.ɵɵtext(17, \" Add filter\\n\");\n i0.ɵɵelementEnd();\n i0.ɵɵelement(18, \"br\")(19, \"br\")(20, \"br\");\n i0.ɵɵelementStart(21, \"div\", 7)(22, \"button\", 8);\n i0.ɵɵlistener(\"click\", function FilterMenuComponent_Template_button_click_22_listener() {\n return ctx.removeAllFilters();\n });\n i0.ɵɵtext(23, \" Clear filters \");\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"activeFilters\", i0.ɵɵpipeBind1(3, 6, ctx.activeFilters$));\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"fields\", i0.ɵɵpipeBind1(6, 8, ctx.fields$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"filterTypes\", ctx.filterTypes);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.selectedFilterTypeId);\n i0.ɵɵadvance(8);\n i0.ɵɵproperty(\"primary\", true);\n i0.ɵɵadvance(6);\n i0.ɵɵproperty(\"outline\", false);\n }\n },\n dependencies: [i4.NgIf, i1$1.FabricButtonComponent, FilterTypeSelectorComponent, FilterValueComponent, FieldSelectorComponent, FilterMenuActiveFiltersComponent, GuiPushPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return FilterMenuComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FilterMenuTriggerComponent = /*#__PURE__*/(() => {\n class FilterMenuTriggerComponent extends SmartComponent {\n injector;\n fabricDialogService;\n structureId;\n filterWarehouse;\n activeFiltersExist$ = this.selectActiveFiltersExist();\n constructor(detector, elementRef, injector, fabricDialogService, structureId, filterWarehouse) {\n super(detector, elementRef);\n this.injector = injector;\n this.fabricDialogService = fabricDialogService;\n this.structureId = structureId;\n this.filterWarehouse = filterWarehouse;\n }\n openDrawer() {\n this.fabricDialogService.open({\n component: FilterMenuComponent,\n injector: this.injector\n });\n }\n getSelectorName() {\n return 'gui-filter-menu-trigger';\n }\n selectActiveFiltersExist() {\n return this.filterWarehouse.onActiveFilters(this.structureId).pipe(hermesMap(activeFilters => {\n return activeFilters.length > 0;\n }));\n }\n static ɵfac = function FilterMenuTriggerComponent_Factory(t) {\n return new (t || FilterMenuTriggerComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1$1.FabricDialogService), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(FilterWarehouse));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: FilterMenuTriggerComponent,\n selectors: [[\"div\", \"gui-filter-menu-trigger\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c88,\n decls: 3,\n vars: 2,\n consts: [[1, \"gui-filter-icon-wrapper\", 3, \"click\", \"gui-tooltip\"], [4, \"guiLet\"], [\"gui-filter-icon\", \"\"], [\"class\", \"gui-filter-active\", 4, \"ngIf\"], [1, \"gui-filter-active\"]],\n template: function FilterMenuTriggerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵlistener(\"click\", function FilterMenuTriggerComponent_Template_div_click_0_listener() {\n return ctx.openDrawer();\n });\n i0.ɵɵtemplate(1, FilterMenuTriggerComponent_ng_container_1_Template, 2, 1, \"ng-container\", 1);\n i0.ɵɵelement(2, \"div\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"gui-tooltip\", \"Filters\");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"guiLet\", ctx.activeFiltersExist$);\n }\n },\n dependencies: [i4.NgIf, i1$1.FabricTooltipDirective, GuiLetDirective, FilterIconComponent],\n styles: [\".gui-filter-icon-wrapper{height:19px;margin-right:24px;position:relative;width:19px}.gui-filter-active{border:2px solid #aaa!important;border-radius:50%;height:27px;left:-6px;position:absolute;top:-6px;width:27px}.gui-filter-menu{width:600px}.gui-filter-icon svg{height:16px;width:16px}.gui-filter-icon svg .cls-1{fill:none;stroke:#aaa;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;transition:stroke .3s ease-in-out}.gui-filter-icon:hover .cls-1{stroke:#464646}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return FilterMenuTriggerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ColumnSelectorComponent = /*#__PURE__*/(() => {\n class ColumnSelectorComponent extends PureComponent {\n columns;\n columnSelected = new EventEmitter();\n constructor(elementRef) {\n super(elementRef);\n }\n onSelectChange(column) {\n this.columnSelected.emit(column);\n }\n getSelectorName() {\n return 'gui-column-selector';\n }\n static ɵfac = function ColumnSelectorComponent_Factory(t) {\n return new (t || ColumnSelectorComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ColumnSelectorComponent,\n selectors: [[\"div\", \"gui-column-selector\", \"\", \"columns\", \"\"]],\n inputs: {\n columns: \"columns\"\n },\n outputs: {\n columnSelected: \"columnSelected\"\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n attrs: _c89,\n decls: 1,\n vars: 0,\n template: function ColumnSelectorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtext(0, \"./column-selector.component.html\");\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return ColumnSelectorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass ToggleFilterCommand extends StructureCommand {\n fieldId;\n externalFilterId;\n filterValue;\n constructor(structureId, fieldId, externalFilterId, filterValue) {\n super(structureId, 'ToggleFilterCommand');\n this.fieldId = fieldId;\n this.externalFilterId = externalFilterId;\n this.filterValue = filterValue;\n }\n getFieldId() {\n return this.fieldId;\n }\n getExternalFilterId() {\n return this.externalFilterId;\n }\n getFilterValue() {\n return this.filterValue;\n }\n}\nclass FilterToggledEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'FilterToggledEvent');\n }\n}\nclass ToggleFilterCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return ToggleFilterCommand;\n }\n handle(aggregate, command) {\n const fieldId = command.getFieldId(),\n externalFieldId = command.getExternalFilterId(),\n filterValue = command.getFilterValue();\n aggregate.toggleFilter(fieldId, externalFieldId, filterValue);\n }\n publish(aggregate, command) {\n this.domainEventPublisher.publish(new FilterToggledEvent(command.getAggregateId()));\n }\n}\nclass AddFilterCommand extends StructureCommand {\n fieldId;\n filterTypeId;\n value;\n constructor(structureId, fieldId, filterTypeId, value) {\n super(structureId, 'AddFilterCommand');\n this.fieldId = fieldId;\n this.filterTypeId = filterTypeId;\n this.value = value;\n }\n getFieldId() {\n return this.fieldId;\n }\n getFilterTypeId() {\n return this.filterTypeId;\n }\n getValue() {\n return this.value;\n }\n}\nclass AddFilterCommandHandler {\n forCommand() {\n return AddFilterCommand;\n }\n handle(structure, command) {\n const fieldId = command.getFieldId(),\n filterTypeId = command.getFilterTypeId(),\n value = command.getValue();\n structure.addFilter(fieldId, filterTypeId, value);\n }\n}\nclass RemoveAllFiltersCommand extends StructureCommand {\n constructor(structureId) {\n super(structureId, 'RemoveAllFiltersCommand');\n }\n}\nclass RemoveAllFiltersCommandHandler {\n forCommand() {\n return RemoveAllFiltersCommand;\n }\n handle(structure, command) {\n structure.removeAllFilters();\n }\n}\nclass RemoveFilterCommand extends StructureCommand {\n filterId;\n constructor(structureId, filterId) {\n super(structureId, 'RemoveFilterCommand');\n this.filterId = filterId;\n }\n getFilterId() {\n return this.filterId;\n }\n}\nclass RemoveFilterCommandHandler {\n forCommand() {\n return RemoveFilterCommand;\n }\n handle(structure, command) {\n const filterId = command.getFilterId();\n structure.removeFilter(filterId);\n }\n}\nclass SetConfigFilterCommand extends StructureCommand {\n filterConfig;\n constructor(structureId, filterConfig) {\n super(structureId, 'SetConfigFilterCommand');\n this.filterConfig = filterConfig;\n }\n getConfig() {\n return this.filterConfig;\n }\n}\nclass ConfigFilterSetEvent extends StructureDomainEvent {\n enabled;\n constructor(aggregateId, enabled) {\n super(aggregateId, enabled, 'ConfigFilterSetEvent');\n this.enabled = enabled;\n }\n getEnabled() {\n return this.enabled;\n }\n}\nclass SetConfigFilterCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SetConfigFilterCommand;\n }\n handle(aggregate, command) {\n const filterConfig = command.getConfig();\n aggregate.setFilterConfig(filterConfig);\n }\n publish(aggregate, command) {\n const filterConfig = command.getConfig();\n this.domainEventPublisher.publish(new ConfigFilterSetEvent(command.getAggregateId(), filterConfig.enabled));\n }\n}\nclass SetConfigQuickFilterCommand extends StructureCommand {\n quickFiltersConfig;\n constructor(structureId, quickFiltersConfig) {\n super(structureId, 'SetConfigQuickFilterCommand');\n this.quickFiltersConfig = quickFiltersConfig;\n }\n getConfig() {\n return this.quickFiltersConfig;\n }\n}\nclass ConfigQuickFilterSetEvent extends StructureDomainEvent {\n enabled;\n constructor(aggregateId, enabled) {\n super(aggregateId, enabled, 'ConfigQuickFilterSetEvent');\n this.enabled = enabled;\n }\n getEnabled() {\n return this.enabled;\n }\n}\nclass SetConfigQuickFilterCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SetConfigQuickFilterCommand;\n }\n handle(aggregate, command) {\n const quickFiltersConfig = command.getConfig();\n aggregate.setQuickFiltersConfig(quickFiltersConfig);\n }\n publish(aggregate, command) {\n const structureId = command.getAggregateId(),\n quickFiltersConfig = command.getConfig();\n this.domainEventPublisher.publish(new ConfigQuickFilterSetEvent(structureId, quickFiltersConfig.enabled));\n }\n}\nclass Filter extends Entity {\n filterId;\n fieldId;\n filterTypeId;\n filterValue;\n constructor(filterId, fieldId, filterTypeId, filterValue) {\n super(filterId);\n this.filterId = filterId;\n this.fieldId = fieldId;\n this.filterTypeId = filterTypeId;\n this.filterValue = filterValue;\n }\n getFilterId() {\n return this.filterId;\n }\n getFilterTypeId() {\n return this.filterTypeId;\n }\n getFieldId() {\n return this.fieldId;\n }\n getFilterValue() {\n return this.filterValue;\n }\n}\nclass FilterSettings {\n filteringEnabled = false;\n searchEnabled = false;\n quickFiltersEnabled = false;\n constructor(filteringEnabled = false, searchEnabled = false, quickFiltersEnabled = false) {\n this.filteringEnabled = filteringEnabled;\n this.searchEnabled = searchEnabled;\n this.quickFiltersEnabled = quickFiltersEnabled;\n }\n isFilteringEnabled() {\n return this.filteringEnabled;\n }\n isQuickFilteringEnabled() {\n return this.quickFiltersEnabled;\n }\n isSearchingEnabled() {\n return this.searchEnabled;\n }\n setFilterConfig(config) {\n if (config && config.enabled !== undefined && config.enabled !== null) {\n this.filteringEnabled = config.enabled;\n }\n }\n setSearchingConfig(config) {\n if (config && config.enabled !== undefined && config.enabled !== null) {\n this.searchEnabled = config.enabled;\n }\n }\n setQuickFiltersConfig(config) {\n if (config && config.enabled !== undefined && config.enabled !== null) {\n this.quickFiltersEnabled = config.enabled;\n }\n }\n}\nclass BaseFilterType extends EntityId {\n // private readonly filterTypeId: FilterTypeId;\n constructor(filterTypeId) {\n super(filterTypeId);\n // this.filterTypeId = filterTypeId;\n }\n // getId(): FilterTypeId {\n // \treturn this.filterTypeId;\n // }\n toString() {\n return this.getId().toString();\n }\n filterMany(entities, field, value) {\n if (entities.length === 0) {\n return entities;\n }\n return entities.filter(item => {\n return this.filterEntity(item, field, value);\n });\n }\n filterOne(entity, field, value) {\n return this.filterEntity(entity, field, value);\n }\n}\nclass ContainsFilterType extends BaseFilterType {\n constructor(filterTypeId) {\n super(filterTypeId);\n }\n getName() {\n return 'Contains';\n }\n filterEntity(entity, field, value) {\n const fieldValue = field.getValue(entity);\n return !!fieldValue.includes(value);\n }\n}\nclass FilterTypeId extends EntityId {\n id;\n constructor(id) {\n super(id);\n this.id = id;\n }\n toString() {\n return this.id;\n }\n}\nlet FilterTypeIdGenerator = /*#__PURE__*/(() => {\n class FilterTypeIdGenerator {\n static index = 0;\n generate() {\n FilterTypeIdGenerator.index += 1;\n return new FilterTypeId(`${FilterTypeIdGenerator.index}`);\n }\n }\n return FilterTypeIdGenerator;\n})();\nclass FilterTypeModel {\n filterTypeId;\n name;\n constructor(id, name) {\n this.filterTypeId = id;\n this.name = name;\n }\n getId() {\n return this.filterTypeId;\n }\n getName() {\n return this.name;\n }\n}\nclass FilterTypeManager {\n fieldIds = [];\n map = new WeakMap();\n filterTypeMap = new WeakMap();\n dataTypeToFilterType = new Map();\n filterTypeIdGenerator = new FilterTypeIdGenerator();\n constructor(fields) {\n this.assignFilterTypes();\n this.addFields(fields);\n }\n getFilterType(filterTypeId) {\n return this.filterTypeMap.get(filterTypeId);\n }\n getFieldIdsToFilterTypes() {\n const map = new Map();\n for (const fieldId of this.fieldIds) {\n const filterTypes = this.map.get(fieldId),\n readModels = filterTypes.map(f => {\n return new FilterTypeModel(f.getId(), f.getName());\n });\n map.set(fieldId.toString(), readModels);\n }\n return map;\n }\n addFields(fields) {\n for (const field of fields) {\n this.addField(field);\n }\n }\n addField(field) {\n const fieldId = field.getId(),\n dataType = field.getDataType();\n const filterTypesFromDataType = this.dataTypeToFilterType.get(dataType);\n this.fieldIds.push(fieldId);\n this.map.set(fieldId, Array.from(filterTypesFromDataType));\n }\n assignFilterTypes() {\n this.assignFilterTypesForDataTypeUnknown();\n this.assignFilterTypesForDataTypeNumber();\n this.assignFilterTypesForDataTypeString();\n this.assignFilterTypesForDataTypeBoolean();\n this.assignFilterTypesForDataTypeDate();\n this.assignFilterTypesForDataTypeCustom();\n }\n assignFilterTypesForDataTypeUnknown() {\n this.dataTypeToFilterType.set(DataType.UNKNOWN, []);\n }\n assignFilterTypesForDataTypeNumber() {\n this.dataTypeToFilterType.set(DataType.NUMBER, []);\n }\n assignFilterTypesForDataTypeString() {\n const filterTypes = [new ContainsFilterType(this.generateId())];\n this.dataTypeToFilterType.set(DataType.STRING, filterTypes);\n this.addFilterTypes(filterTypes);\n }\n assignFilterTypesForDataTypeBoolean() {\n this.dataTypeToFilterType.set(DataType.BOOLEAN, []);\n }\n assignFilterTypesForDataTypeDate() {\n this.dataTypeToFilterType.set(DataType.DATE, []);\n }\n assignFilterTypesForDataTypeCustom() {\n this.dataTypeToFilterType.set(DataType.CUSTOM, []);\n }\n generateId() {\n return this.filterTypeIdGenerator.generate();\n }\n addFilterTypes(filterTypes) {\n for (const filterType of filterTypes) {\n this.filterTypeMap.set(filterType.getId(), filterType);\n }\n }\n}\nclass FilterId extends EntityId {\n constructor(filterId) {\n super(filterId);\n }\n toString() {\n return this.getId();\n }\n}\nlet FilterIdGenerator = /*#__PURE__*/(() => {\n class FilterIdGenerator {\n static index = 0;\n static generateId() {\n return new FilterId(`${FilterIdGenerator.index}`);\n }\n }\n return FilterIdGenerator;\n})();\nclass ActiveFilterModel {\n filterId;\n fieldName;\n filterTypeName;\n value;\n constructor(filterId, fieldName, filterTypeName, value) {\n this.filterId = filterId;\n this.fieldName = fieldName;\n this.filterTypeName = filterTypeName;\n this.value = value;\n }\n getText() {\n return `${this.fieldName}: ${this.filterTypeName}: ${this.value}`;\n }\n getFilterId() {\n return this.filterId;\n }\n getFieldName() {\n return this.fieldName;\n }\n getFilterTypeName() {\n return this.filterTypeName;\n }\n getValue() {\n return this.value;\n }\n}\nclass FilterManager {\n filterSettings = new FilterSettings();\n // string -> FilterId\n filters = new Map();\n activeFilters = [];\n filterTypeManager;\n constructor() {}\n getSettings() {\n return this.filterSettings;\n }\n getAll() {\n return Array.from(this.filters).map(arr => arr[1]);\n }\n getAllActiveFilters(fields) {\n return this.activeFilters.map(af => {\n return new ActiveFilterModel(af.getFilterId(), fields.get(af.getFieldId().toString()).getName(), this.filterTypeManager.getFilterType(af.getFilterTypeId()).getName(), af.getFilterValue());\n });\n }\n getFilterTypes() {\n return this.filterTypeManager.getFieldIdsToFilterTypes();\n }\n assignFilterTypes(fields) {\n this.filterTypeManager = new FilterTypeManager(fields);\n }\n add(fieldId, filterTypeId, value) {\n const filter = new Filter(FilterIdGenerator.generateId(), fieldId, filterTypeId, value);\n this.activeFilters.push(filter);\n }\n filter(entities, fields) {\n let filteredEntities = Array.from(entities);\n for (const filter of this.activeFilters) {\n const filterTypeId = filter.getFilterTypeId(),\n filterType = this.getFilterType(filterTypeId),\n value = filter.getFilterValue();\n filteredEntities = filterType.filterMany(filteredEntities, fields.get(filter.getFieldId().toString()), value);\n }\n return filteredEntities;\n }\n removeAll() {\n this.activeFilters.length = 0;\n }\n remove(filterId) {\n this.activeFilters = this.activeFilters.filter(filter => {\n return filter.getFilterId() !== filterId;\n });\n }\n getFilterType(filterTypeId) {\n return this.filterTypeManager.getFilterType(filterTypeId);\n }\n}\nclass FilterManagerFactory {\n create(enabled = false) {\n return new FilterManager();\n }\n}\nlet QuickFilterEnabledArchive = /*#__PURE__*/(() => {\n class QuickFilterEnabledArchive extends AggregateArchive {\n static default = false;\n constructor() {\n super(QuickFilterEnabledArchive.default);\n }\n }\n return QuickFilterEnabledArchive;\n})();\nlet ConfigQuickFilterSetEventHandler = /*#__PURE__*/(() => {\n class ConfigQuickFilterSetEventHandler {\n quickFilterEnabledArchive;\n constructor(quickFilterEnabledArchive) {\n this.quickFilterEnabledArchive = quickFilterEnabledArchive;\n }\n static services = [QuickFilterEnabledArchive];\n forEvent() {\n return ConfigQuickFilterSetEvent;\n }\n handle(event) {\n if (event.ofMessageType('ConfigQuickFilterSetEvent')) {\n this.quickFilterEnabledArchive.next(event.getAggregateId(), event.getEnabled());\n }\n }\n }\n return ConfigQuickFilterSetEventHandler;\n})();\nlet FilterEnabledArchive = /*#__PURE__*/(() => {\n class FilterEnabledArchive extends AggregateArchive {\n static default = false;\n constructor() {\n super(FilterEnabledArchive.default);\n }\n }\n return FilterEnabledArchive;\n})();\nlet ConfigFilterSetEventHandler = /*#__PURE__*/(() => {\n class ConfigFilterSetEventHandler {\n filterEnabledArchive;\n constructor(filterEnabledArchive) {\n this.filterEnabledArchive = filterEnabledArchive;\n }\n static services = [FilterEnabledArchive];\n forEvent() {\n return ConfigFilterSetEvent;\n }\n handle(event) {\n if (event.ofMessageType('ConfigFilterSetEvent')) {\n this.filterEnabledArchive.next(event.getAggregateId(), event.getEnabled());\n }\n }\n }\n return ConfigFilterSetEventHandler;\n})();\nclass FilterTypeCollectionModel {\n map; // = new WeakMap<FieldId, Array<FilterTypeReadModel>>();\n constructor(map) {\n this.map = map;\n }\n getFilterTypes(fieldId) {\n const result = this.map.get(fieldId.toString());\n if (result === undefined) {\n return [];\n } else {\n return result;\n }\n }\n}\nclass FilterTypeArchive extends AggregateArchive {\n static default = new FilterTypeCollectionModel(new Map());\n constructor() {\n super(FilterTypeArchive.default);\n }\n}\nclass FilterTypesInitedEvent extends StructureDomainEvent {\n map;\n constructor(aggregateId, map) {\n super(aggregateId, map, 'FilterTypesInitedEvent');\n this.map = map;\n }\n getMap() {\n return this.map;\n }\n}\nlet ActiveFilterArchive = /*#__PURE__*/(() => {\n class ActiveFilterArchive extends AggregateArchive {\n static default = [];\n constructor() {\n super(ActiveFilterArchive.default);\n }\n }\n return ActiveFilterArchive;\n})();\nconst filterDiContainer = createContainer();\nfilterDiContainer.provide(ActiveFilterArchive);\nfilterDiContainer.provide(FilterTypeArchive);\nconst FilterDiContainer = filterDiContainer;\nclass FilterTypeConfigFilterSetEventHandler {\n filterTypeArchive = FilterDiContainer.resolve(FilterTypeArchive);\n forEvent() {\n return FilterTypesInitedEvent;\n }\n handle(filterTypesInitedEvent) {\n if (filterTypesInitedEvent.ofMessageType('FilterTypesInitedEvent')) {\n const map = filterTypesInitedEvent.getMap();\n this.filterTypeArchive.next(filterTypesInitedEvent.getAggregateId(), new FilterTypeCollectionModel(map));\n }\n }\n}\nclass ActiveFiltersSetEvent extends StructureDomainEvent {\n filters;\n constructor(structureId, filters) {\n super(structureId, filters, 'ActiveFiltersSetEvent');\n this.filters = filters;\n }\n getFilters() {\n return this.filters;\n }\n}\nclass ActiveFiltersSetEventHandler {\n activeFilterRepository = FilterDiContainer.resolve(ActiveFilterArchive);\n forEvent() {\n return ActiveFiltersSetEvent;\n }\n handle(activeFiltersSetEvent) {\n if (activeFiltersSetEvent.ofMessageType('ActiveFiltersSetEvent')) {\n const activeFilters = activeFiltersSetEvent.getFilters();\n this.activeFilterRepository.next(activeFiltersSetEvent.getAggregateId(), activeFilters);\n }\n }\n}\nclass UniqueFilterCalculatedEvent extends StructureDomainEvent {\n map;\n constructor(aggregateId, map) {\n super(aggregateId, map, 'UniqueFilterCalculatedEvent');\n this.map = map;\n }\n getUniqueValues() {\n return this.map;\n }\n}\nclass UniqueValueCollectionModel {\n map = new Map();\n allSelected = new Map();\n allDisabled = new Map();\n constructor(map) {\n this.map = map;\n this.calculateSelection();\n }\n getValues(fieldId) {\n return this.map.get(fieldId.toString());\n }\n areAllSelected(fieldId) {\n return this.allSelected.get(fieldId.toString());\n }\n areAllDisabled(fieldId) {\n return this.allDisabled.get(fieldId.toString());\n }\n isSelectAllChecked(fieldId) {\n return this.areAllSelected(fieldId);\n }\n isIndeterminate(fieldId) {\n return !(this.areAllSelected(fieldId) || this.areAllDisabled(fieldId));\n }\n calculateSelection() {\n for (const key of Array.from(this.map.keys())) {\n const values = this.map.get(key);\n this.allSelected.set(key, !values.some(r => !r.isEnabled()));\n this.allDisabled.set(key, !values.some(r => r.isEnabled()));\n }\n }\n}\nclass UniqueValueCollectionArchive extends AggregateArchive {\n static default = new UniqueValueCollectionModel(new Map());\n constructor() {\n super(UniqueValueCollectionArchive.default);\n }\n}\nclass UniqueValueModel {\n id;\n value;\n displayValue;\n enabled;\n constructor(id, value, enabled) {\n this.id = id;\n this.value = value;\n this.enabled = enabled;\n }\n getId() {\n return this.id;\n }\n getValue() {\n return this.value;\n }\n geDisplayValue() {\n return this.displayValue;\n }\n isEnabled() {\n return this.enabled;\n }\n}\nlet UniqueFilterCalculatedEventHandler = /*#__PURE__*/(() => {\n class UniqueFilterCalculatedEventHandler {\n uniqueValuesRepository;\n constructor(uniqueValuesRepository) {\n this.uniqueValuesRepository = uniqueValuesRepository;\n }\n static services = [UniqueValueCollectionArchive];\n forEvent() {\n return UniqueFilterCalculatedEvent;\n }\n handle(calculatedEvent) {\n if (calculatedEvent.ofMessageType('UniqueFilterCalculatedEvent')) {\n const uvRM = new Map();\n calculatedEvent.getUniqueValues().forEach((values, key) => {\n const valuesRM = values.map(uv => {\n return new UniqueValueModel(uv.getId(), uv.getDisplayValue(), uv.isEnabled());\n });\n uvRM.set(key, valuesRM);\n });\n const uniqueValues = new UniqueValueCollectionModel(uvRM);\n this.uniqueValuesRepository.next(calculatedEvent.getAggregateId(), uniqueValues);\n }\n }\n }\n return UniqueFilterCalculatedEventHandler;\n})(); // TODO Remove\nclass FilterTypeFieldsInitedEventHandler {\n // constructor(private readonly filterTypeManagerRepository: FilterTypeManagerRepository,\n // \t\t\tprivate readonly domainEventPublisher: DomainEventPublisher) {\n // }\n forEvent() {\n return FieldsInitedEvent;\n }\n handle(fieldsInitedEvent) {\n // if (fieldsInitedEvent.ofMessageType('FieldsInitedEvent')) {\n //\n // \tconst fields = fieldsInitedEvent.getFields();\n //\n // \tconst manager = new FilterTypeManager(fields);\n //\n // \tthis.filterTypeManagerRepository.next(fieldsInitedEvent.getAggregateId(), manager);\n //\n // \tthis.domainEventPublisher.publish(new FilterTypesInitedEvent(fieldsInitedEvent.getAggregateId(), manager.getFieldIdsToFieldTypes()));\n // }\n }\n}\nclass UnselectAllUniqueFilterCommand extends StructureCommand {\n fieldId;\n constructor(structureId, fieldId) {\n super(structureId, 'UnselectAllUniqueFilterCommand');\n this.fieldId = fieldId;\n }\n getFieldId() {\n return this.fieldId;\n }\n}\nclass UnselectAllUniqueFilterCommandHandler {\n forCommand() {\n return UnselectAllUniqueFilterCommand;\n }\n handle(structure, command) {\n const fieldId = command.getFieldId();\n structure.unselectAllUniqueFilter(fieldId);\n }\n}\nclass UnselectUniqueFilterCommand extends StructureCommand {\n fieldId;\n uniqueValueId;\n constructor(structureId, fieldId, uniqueValueId) {\n super(structureId, 'UnselectUniqueFilterCommand');\n this.fieldId = fieldId;\n this.uniqueValueId = uniqueValueId;\n }\n getFieldId() {\n return this.fieldId;\n }\n getUniqueValueId() {\n return this.uniqueValueId;\n }\n}\nclass UnselectUniqueFilterCommandHandler {\n forCommand() {\n return UnselectUniqueFilterCommand;\n }\n handle(structure, command) {\n const fieldId = command.getFieldId(),\n uniqueValueId = command.getUniqueValueId();\n structure.unselectUniqueFilter(fieldId, uniqueValueId);\n }\n}\nclass SelectAllUniqueFilterCommand extends StructureCommand {\n fieldId;\n constructor(structureId, fieldId) {\n super(structureId, 'SelectAllUniqueFilterCommand');\n this.fieldId = fieldId;\n }\n getFieldId() {\n return this.fieldId;\n }\n}\nclass SelectAllUniqueFilterCommandHandler {\n forCommand() {\n return SelectAllUniqueFilterCommand;\n }\n handle(structure, command) {\n const fieldId = command.getFieldId();\n structure.selectAllUniqueFilter(fieldId);\n }\n}\nclass SelectUniqueFilterCommand extends StructureCommand {\n fieldId;\n uniqueValueId;\n constructor(structureId, fieldId, uniqueValueId) {\n super(structureId, 'SelectUniqueFilterCommand');\n this.fieldId = fieldId;\n this.uniqueValueId = uniqueValueId;\n }\n getFieldId() {\n return this.fieldId;\n }\n getUniqueValueId() {\n return this.uniqueValueId;\n }\n}\nclass SelectUniqueFilterCommandHandler {\n forCommand() {\n return SelectUniqueFilterCommand;\n }\n handle(structure, command) {\n const fieldId = command.getFieldId(),\n uniqueValueId = command.getUniqueValueId();\n structure.selectUniqueFilter(fieldId, uniqueValueId);\n }\n}\nclass FilterDomainModule {\n defineAggregate() {\n return null;\n }\n registerKey() {\n return structureKey;\n }\n registerProviders(container) {\n container.provide(FilterManagerFactory);\n }\n registerCommandHandlers() {\n return [SetConfigFilterCommandHandler, SetConfigQuickFilterCommandHandler, ToggleFilterCommandHandler, AddFilterCommandHandler, RemoveAllFiltersCommandHandler, RemoveFilterCommandHandler, SelectUniqueFilterCommandHandler, SelectAllUniqueFilterCommandHandler, UnselectUniqueFilterCommandHandler, UnselectAllUniqueFilterCommandHandler];\n }\n registerDomainEventHandler() {\n return [ConfigQuickFilterSetEventHandler, ConfigFilterSetEventHandler, FilterTypeConfigFilterSetEventHandler, ActiveFiltersSetEventHandler, UniqueFilterCalculatedEventHandler, FilterTypeFieldsInitedEventHandler];\n }\n registerMultiDomainEventHandler() {\n return [];\n }\n}\nlet FilterDomainWarehouse = /*#__PURE__*/(() => {\n class FilterDomainWarehouse extends FilterWarehouse {\n filterEnabledArchive;\n structureQuickFilterRepository;\n uniqueValuesArchive;\n activeFilterArchive = FilterDiContainer.resolve(ActiveFilterArchive);\n filterTypeArchive = FilterDiContainer.resolve(FilterTypeArchive);\n constructor(filterEnabledArchive, structureQuickFilterRepository, uniqueValuesArchive) {\n super();\n this.filterEnabledArchive = filterEnabledArchive;\n this.structureQuickFilterRepository = structureQuickFilterRepository;\n this.uniqueValuesArchive = uniqueValuesArchive;\n }\n static services = [FilterEnabledArchive, QuickFilterEnabledArchive, UniqueValueCollectionArchive];\n onFilteringEnabled(structureId) {\n return this.filterEnabledArchive.on(structureId);\n }\n onQuickFiltersEnabled(structureId) {\n return this.structureQuickFilterRepository.on(structureId);\n }\n onFilterTypes(structureId) {\n return this.filterTypeArchive.on(structureId);\n }\n findFilterTypes(structureId) {\n return this.filterTypeArchive.find(structureId);\n }\n onFilterTypesForFieldId(fieldId, structureId) {\n return this.onFilterTypes(structureId).pipe(hermesMap(map => {\n return map.getFilterTypes(fieldId);\n }));\n }\n onActiveFilters(structureId) {\n return this.activeFilterArchive.on(structureId);\n }\n findFilters(structureId) {\n return this.activeFilterArchive.find(structureId);\n }\n onUniqueValues(structureId) {\n return this.uniqueValuesArchive.on(structureId);\n }\n onceFilterTypeId(fieldId, filterTypeName, structureId) {\n return singleFromObservable(this.onFilterTypes(structureId).pipe(hermesMap(map => {\n const filterTypes = map.getFilterTypes(fieldId);\n const filterType = filterTypes.find(fieldType => fieldType.getName() === filterTypeName);\n if (filterType === undefined) {\n return Optional.empty();\n } else {\n return Optional.of(filterType.getId());\n }\n })));\n }\n }\n return FilterDomainWarehouse;\n})();\nlet FilterDomainPublisher = /*#__PURE__*/(() => {\n class FilterDomainPublisher extends FilterPublisher {\n commandDispatcher;\n constructor(commandDispatcher) {\n super();\n this.commandDispatcher = commandDispatcher;\n }\n static services = [CommandDispatcher];\n setConfig(config, structureId) {\n this.commandDispatcher.dispatch(new SetConfigFilterCommand(structureId, config));\n }\n add(fieldId, filterTypeId, value, structureId) {\n this.commandDispatcher.dispatch(new AddFilterCommand(structureId, fieldId, filterTypeId, value));\n }\n removeAll(structureId) {\n this.commandDispatcher.dispatch(new RemoveAllFiltersCommand(structureId));\n }\n remove(filterId, structureId) {\n this.commandDispatcher.dispatch(new RemoveFilterCommand(structureId, filterId));\n }\n selectAllUniqueFilter(fieldId, structureId) {\n this.commandDispatcher.dispatch(new SelectAllUniqueFilterCommand(structureId, fieldId));\n }\n unselectAllUniqueFilter(fieldId, structureId) {\n this.commandDispatcher.dispatch(new UnselectAllUniqueFilterCommand(structureId, fieldId));\n }\n selectUniqueFilter(fieldId, uniqueValueId, structureId) {\n this.commandDispatcher.dispatch(new SelectUniqueFilterCommand(structureId, fieldId, uniqueValueId));\n }\n unselectUniqueFilter(fieldId, uniqueValueId, structureId) {\n this.commandDispatcher.dispatch(new UnselectUniqueFilterCommand(structureId, fieldId, uniqueValueId));\n }\n }\n return FilterDomainPublisher;\n})();\nclass FilterApiModule {\n registerProviders(container) {\n container.provide(FilterPublisher, FilterDomainPublisher);\n container.provide(FilterWarehouse, FilterDomainWarehouse);\n container.provide(UniqueValueCollectionArchive);\n container.provide(FilterEnabledArchive);\n container.provide(QuickFilterEnabledArchive);\n container.provide(FilterIntegration);\n }\n}\nfunction initializeFilter() {\n new DomainInitializer(new FilterApiModule(), new FilterDomainModule()).init();\n}\ninitializeFilter();\nfunction provideFilterCommandInvoker() {\n return CoreContainer.resolve(FilterPublisher);\n}\nfunction provideFilterWarehouse() {\n return CoreContainer.resolve(FilterWarehouse);\n}\nfunction provideFilterIntegration() {\n return CoreContainer.resolve(FilterIntegration);\n}\nlet FilterFeatureModule = /*#__PURE__*/(() => {\n class FilterFeatureModule {\n static ɵfac = function FilterFeatureModule_Factory(t) {\n return new (t || FilterFeatureModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: FilterFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: FilterPublisher,\n useFactory: provideFilterCommandInvoker\n }, {\n provide: FilterWarehouse,\n useFactory: provideFilterWarehouse\n }, {\n provide: FilterIntegration,\n useFactory: provideFilterIntegration\n }]\n });\n }\n return FilterFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ActiveFilterListModule = /*#__PURE__*/(() => {\n class ActiveFilterListModule extends FeatureModule {\n static forComponent() {\n return [];\n }\n static ɵfac = /* @__PURE__ */(() => {\n let ɵActiveFilterListModule_BaseFactory;\n return function ActiveFilterListModule_Factory(t) {\n return (ɵActiveFilterListModule_BaseFactory || (ɵActiveFilterListModule_BaseFactory = i0.ɵɵgetInheritedFactory(ActiveFilterListModule)))(t || ActiveFilterListModule);\n };\n })();\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: ActiveFilterListModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule, fabricImports, GuiTemplateModule, FilterFeatureModule]\n });\n }\n return ActiveFilterListModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FilterMenuFeatureModule = /*#__PURE__*/(() => {\n class FilterMenuFeatureModule extends FeatureModule {\n static forComponent() {\n return [];\n }\n static ɵfac = /* @__PURE__ */(() => {\n let ɵFilterMenuFeatureModule_BaseFactory;\n return function FilterMenuFeatureModule_Factory(t) {\n return (ɵFilterMenuFeatureModule_BaseFactory || (ɵFilterMenuFeatureModule_BaseFactory = i0.ɵɵgetInheritedFactory(FilterMenuFeatureModule)))(t || FilterMenuFeatureModule);\n };\n })();\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: FilterMenuFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule, FabricModule, ReactiveFormsModule, GuiTemplateModule, FilterFeatureModule, ActiveFilterListModule]\n });\n }\n return FilterMenuFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SourceCounterFeatureModule = /*#__PURE__*/(() => {\n class SourceCounterFeatureModule extends FeatureModule {\n static forComponent() {\n return [];\n }\n static ɵfac = /* @__PURE__ */(() => {\n let ɵSourceCounterFeatureModule_BaseFactory;\n return function SourceCounterFeatureModule_Factory(t) {\n return (ɵSourceCounterFeatureModule_BaseFactory || (ɵSourceCounterFeatureModule_BaseFactory = i0.ɵɵgetInheritedFactory(SourceCounterFeatureModule)))(t || SourceCounterFeatureModule);\n };\n })();\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: SourceCounterFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [ActiveFilterService],\n imports: [CommonModule, FilterMenuFeatureModule, ActiveFilterListModule, FabricButtonModule]\n });\n }\n return SourceCounterFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureInfoPanelModule = /*#__PURE__*/(() => {\n class StructureInfoPanelModule {\n static ɵfac = function StructureInfoPanelModule_Factory(t) {\n return new (t || StructureInfoPanelModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: StructureInfoPanelModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [StructureInfoPanelConfigConverter],\n imports: [CommonModule, NumberFormatterModule, FabricModule, StructureColumnManagerModule, SchemaManagerModule, SourceCounterFeatureModule, TranslationFeatureModule, GuiTemplateModule]\n });\n }\n return StructureInfoPanelModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureHeaderFilterComponent = /*#__PURE__*/(() => {\n class StructureHeaderFilterComponent extends SmartComponent {\n changeDetectorRef;\n structureFilterCommandService;\n structureId;\n column;\n sub = new ChangedValueEmitter();\n editContext;\n constructor(changeDetectorRef, elementRef, structureFilterCommandService, structureId) {\n super(changeDetectorRef, elementRef);\n this.changeDetectorRef = changeDetectorRef;\n this.structureFilterCommandService = structureFilterCommandService;\n this.structureId = structureId;\n this.editContext = {\n changes: this.sub\n };\n }\n ngOnInit() {\n this.sub.on().subscribe(phrase => this.filter(phrase));\n }\n filter(phrase) {\n // this.structureFilterCommandService.addFilter(this.column.getFieldId(), '1', phrase, this.structureId);\n }\n getSelectorName() {\n return 'gui-structure-header-filter';\n }\n static ɵfac = function StructureHeaderFilterComponent_Factory(t) {\n return new (t || StructureHeaderFilterComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(FilterPublisher), i0.ɵɵdirectiveInject(StructureId));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureHeaderFilterComponent,\n selectors: [[\"gui-structure-header-filter\"]],\n inputs: {\n column: \"column\"\n },\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 2,\n vars: 1,\n consts: [[\"gui-button\", \"\", 3, \"primary\"]],\n template: function StructureHeaderFilterComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"button\", 0);\n i0.ɵɵtext(1, \"Add Filter\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"primary\", true);\n }\n },\n dependencies: [i1$1.FabricButtonComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureHeaderFilterComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureQuickFiltersComponent = /*#__PURE__*/(() => {\n class StructureQuickFiltersComponent {\n static ɵfac = function StructureQuickFiltersComponent_Factory(t) {\n return new (t || StructureQuickFiltersComponent)();\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureQuickFiltersComponent,\n selectors: [[\"div\", \"gui-structure-quick-filters\", \"\"]],\n attrs: _c90,\n decls: 1,\n vars: 0,\n template: function StructureQuickFiltersComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtext(0, \" QuickFilters \");\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureQuickFiltersComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass ConsoleLogger extends Logger {\n warn(text) {\n // eslint-disable-next-line no-console\n console.warn(text);\n }\n error(text) {\n // eslint-disable-next-line no-console\n console.error(text);\n }\n}\nfunction initializeLogger() {\n CoreContainer.provide(Logger, ConsoleLogger);\n}\ninitializeLogger();\nfunction provideLogger() {\n return CoreContainer.resolve(Logger);\n}\nlet LoggerModule = /*#__PURE__*/(() => {\n class LoggerModule {\n static ɵfac = function LoggerModule_Factory(t) {\n return new (t || LoggerModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: LoggerModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: Logger,\n useFactory: provideLogger\n }]\n });\n }\n return LoggerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass Item {\n id;\n source;\n position;\n version = 0;\n constructor(source, position, id, version = 0) {\n this.source = source;\n this.position = position;\n this.version = version;\n if (!id) {\n this.id = RandomStringGenerator.generate();\n } else {\n this.id = id;\n }\n }\n getSourceItem() {\n return this.source;\n }\n getUiId() {\n return 'gui' + this.id.replace(/-/g, '');\n }\n getId() {\n return this.id;\n }\n getVersion() {\n return this.version;\n }\n getPosition() {\n return this.position;\n }\n isSelected() {\n return false;\n }\n isEven() {\n return this.position % 2 === 0;\n }\n isOdd() {\n return this.position % 2 === 1;\n }\n equals(entity) {\n return this.id === entity.id && this.getVersion() === entity.getVersion();\n }\n equalsById(id) {\n return this.id === id;\n }\n}\nclass ItemEntity extends Entity {\n sourceItem; // tODO\n version;\n position;\n constructor(id, sourceItem, position, version = 0) {\n super(id);\n this.sourceItem = sourceItem;\n this.position = position;\n this.version = version;\n }\n getSourceItem() {\n return this.sourceItem;\n }\n getVersion() {\n return this.version;\n }\n getPosition() {\n return this.position;\n }\n bumpVersion() {\n this.version += 1;\n }\n setPosition(position) {\n this.position = position;\n }\n clone() {\n const rawData = {\n ...this.sourceItem\n };\n return new ItemEntity(this.getId(), rawData, this.version);\n }\n}\nclass ItemFactory {\n create(source) {\n if (Array.isArray(source)) {\n return this.createItems(source);\n } else {\n return this.createItem(source);\n }\n }\n createItems(source) {\n return source.map(source => this.createItem(source));\n }\n createItem(originItem) {\n if (originItem instanceof ItemEntity) {\n return new Item(originItem.sourceItem, originItem.getPosition(), originItem.getId().toString(), originItem.getVersion());\n } else {\n return new Item(originItem, 0);\n }\n }\n}\nclass SetConfigSearchingCommand extends StructureCommand {\n searchConfig;\n constructor(structureId, searchConfig) {\n super(structureId, 'SetConfigSearchingCommand');\n this.searchConfig = searchConfig;\n }\n getConfig() {\n return this.searchConfig;\n }\n}\nclass ConfigSearchingSetEvent extends StructureDomainEvent {\n enabled;\n constructor(aggregateId, enabled) {\n super(aggregateId, enabled, 'ConfigSearchingSetEvent');\n this.enabled = enabled;\n }\n isEnabled() {\n return this.enabled;\n }\n}\nclass SetConfigSearchingCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SetConfigSearchingCommand;\n }\n handle(aggregate, command) {\n const searchingConfig = command.getConfig();\n aggregate.setSearchingConfig(searchingConfig);\n }\n publish(aggregate, command) {\n const searchingConfig = command.getConfig();\n this.domainEventPublisher.publish(new ConfigSearchingSetEvent(command.getAggregateId(), searchingConfig.enabled));\n }\n}\nclass SetSearchPhraseCommand extends StructureCommand {\n phrase;\n initial;\n constructor(structureId, phrase, initial) {\n super(structureId, 'SetSearchPhraseCommand');\n this.phrase = phrase;\n this.initial = initial;\n }\n getPhrase() {\n return this.phrase;\n }\n isInitial() {\n return this.initial;\n }\n}\nclass SearchPhraseSetDomainEvent extends StructureDomainEvent {\n phrase;\n initial;\n constructor(aggregateId, phrase, initial) {\n super(aggregateId, {\n phrase,\n initial\n }, 'SearchPhraseSetDomainEvent');\n this.phrase = phrase;\n this.initial = initial;\n }\n getPhrase() {\n return this.phrase;\n }\n isInitial() {\n return this.initial;\n }\n}\nclass OriginSetEvent extends StructureDomainEvent {\n origin;\n constructor(aggregateId, origin) {\n super(aggregateId, origin, 'OriginSetEvent');\n this.origin = origin;\n }\n getOrigin() {\n return this.origin;\n }\n}\nclass StructureSummariesChangedEvent extends StructureDomainEvent {\n values;\n constructor(structureId, values) {\n super(structureId, values, 'StructureSummariesChangedEvent');\n this.values = values;\n }\n getSummaries() {\n return this.values;\n }\n}\nclass StructurePreparedEntitiesSetEvent extends StructureDomainEvent {\n preparedItems;\n constructor(aggregateId, preparedItems) {\n super(aggregateId, preparedItems, 'StructurePreparedEntitiesSetEvent');\n this.preparedItems = preparedItems;\n }\n getPreparedItems() {\n return this.preparedItems;\n }\n}\nclass SourceDomainEventPublisher {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n publish(events) {\n events.forEach(event => {\n this.publishEvent(event);\n });\n }\n publishEvent(event) {\n if (event.getType() === 'StructureOriginChangedAggregateEvent') {\n const structureOriginChangedAggregateEvent = event;\n const domainEvent = new OriginSetEvent(structureOriginChangedAggregateEvent.getAggregateId(), structureOriginChangedAggregateEvent.getOrigin());\n this.domainEventPublisher.publish(domainEvent);\n }\n if (event.getType() === 'StructureSourceItemEditedAggregateEvent') {\n const structureSourceItemEditedAggregateEvent = event;\n const domainEvent = new StructureSourceItemEditedEvent(structureSourceItemEditedAggregateEvent.getAggregateId(), structureSourceItemEditedAggregateEvent.getBeforeItem(), structureSourceItemEditedAggregateEvent.getAfterItem());\n this.domainEventPublisher.publish(domainEvent);\n }\n if (event.getType() === 'StructureSummariesChangedAggregateEvent') {\n const structureSummariesChangedAggregateEvent = event;\n const domainEvent = new StructureSummariesChangedEvent(structureSummariesChangedAggregateEvent.getAggregateId(), structureSummariesChangedAggregateEvent.getSummaries());\n this.domainEventPublisher.publish(domainEvent);\n }\n if (event.getType() === 'StructurePreparedEntitiesSetAggregateEvent') {\n const structurePreparedEntitiesSetAggregateEvent = event;\n const domainEvent = new StructurePreparedEntitiesSetEvent(structurePreparedEntitiesSetAggregateEvent.getAggregateId(), structurePreparedEntitiesSetAggregateEvent.getPreparedItems());\n this.domainEventPublisher.publish(domainEvent);\n }\n if (event.getType() === 'UniqueFilterCalculatedAggregateEvent') {\n const uniqueFilterCalculatedAggregateEvent = event;\n const domainEvent = uniqueFilterCalculatedAggregateEvent.toDomainEvent();\n this.domainEventPublisher.publish(domainEvent);\n }\n }\n}\nlet StructureSetSearchPhraseCommandHandler = /*#__PURE__*/(() => {\n class StructureSetSearchPhraseCommandHandler {\n structureSourceDomainEventPublisher;\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n constructor(structureSourceDomainEventPublisher) {\n this.structureSourceDomainEventPublisher = structureSourceDomainEventPublisher;\n }\n static services = [SourceDomainEventPublisher];\n forCommand() {\n return SetSearchPhraseCommand;\n }\n handle(aggregate, command) {\n const phrase = command.getPhrase();\n aggregate.addSearchPhrase(phrase);\n }\n publish(aggregate, command) {\n const phrase = command.getPhrase(),\n initial = command.isInitial();\n this.domainEventPublisher.publish(new SearchPhraseSetDomainEvent(command.getAggregateId(), phrase, initial));\n this.structureSourceDomainEventPublisher.publish(aggregate.getEvents());\n }\n }\n return StructureSetSearchPhraseCommandHandler;\n})();\nclass SearchManager {\n searchFields = [];\n searchPhrase;\n enabledDataTypes = [DataType.STRING];\n addSearchPhrase(fields, searchPhrase) {\n if (!searchPhrase) {\n this.searchFields = [];\n return;\n }\n const searchableFields = fields.filter(field => {\n return this.enabledDataTypes.some(dt => dt === field.getDataType());\n });\n if (searchableFields.length === 0) {\n return;\n }\n this.searchFields = searchableFields;\n this.searchPhrase = searchPhrase;\n }\n removeSearchFilters() {\n this.searchFields = [];\n }\n search(entities) {\n if (entities.length === 0 || this.searchFields.length === 0) {\n return entities;\n }\n const searchedItems = new Set();\n for (let i = 0; i < entities.length; i += 1) {\n this.searchFields.filter(field => field.search(entities[i], this.searchPhrase)).forEach(() => {\n searchedItems.add(entities[i]);\n });\n }\n return Array.from(searchedItems);\n }\n}\nclass SearchManagerFactory {\n create() {\n return new SearchManager();\n }\n}\nlet SearchHighlightArchive = /*#__PURE__*/(() => {\n class SearchHighlightArchive extends AggregateArchive {\n static HIGHLIGHTING = true;\n constructor() {\n super(SearchHighlightArchive.HIGHLIGHTING);\n }\n }\n return SearchHighlightArchive;\n})();\nlet SearchPlaceholderArchive = /*#__PURE__*/(() => {\n class SearchPlaceholderArchive extends AggregateArchive {\n static PLACEHOLDER = 'Search...';\n constructor() {\n super(SearchPlaceholderArchive.PLACEHOLDER);\n }\n }\n return SearchPlaceholderArchive;\n})();\nlet SearchDispatcher = /*#__PURE__*/(() => {\n class SearchDispatcher {\n commandDispatcher;\n searchHighlightArchive;\n searchPlaceholderArchive;\n constructor(commandDispatcher, searchHighlightArchive, searchPlaceholderArchive) {\n this.commandDispatcher = commandDispatcher;\n this.searchHighlightArchive = searchHighlightArchive;\n this.searchPlaceholderArchive = searchPlaceholderArchive;\n }\n static services = [CommandDispatcher, SearchHighlightArchive, SearchPlaceholderArchive];\n setSearchingConfig(config, structureId) {\n if (config.highlighting !== undefined && config.highlighting !== null) {\n this.searchHighlightArchive.next(structureId, config.highlighting);\n }\n if (config.placeholder !== undefined && config.placeholder !== null) {\n this.searchPlaceholderArchive.next(structureId, config.placeholder);\n }\n if (config.phrase !== undefined && config.phrase !== null) {\n this.searchOnInit(config.phrase, structureId);\n }\n this.commandDispatcher.dispatch(new SetConfigSearchingCommand(structureId, config));\n }\n search(phrase, structureId) {\n this.commandDispatcher.dispatch(new SetSearchPhraseCommand(structureId, phrase, false));\n }\n searchOnInit(phrase, structureId) {\n this.commandDispatcher.dispatch(new SetSearchPhraseCommand(structureId, phrase, true));\n }\n }\n return SearchDispatcher;\n})();\nlet SearchPhraseArchive = /*#__PURE__*/(() => {\n class SearchPhraseArchive extends AggregateArchive {\n static SEARCH_PHRASE = '';\n constructor() {\n super(SearchPhraseArchive.SEARCH_PHRASE);\n }\n }\n return SearchPhraseArchive;\n})();\nlet SearchPhraseSetEventHandler = /*#__PURE__*/(() => {\n class SearchPhraseSetEventHandler {\n searchPhraseRepository;\n constructor(searchPhraseRepository) {\n this.searchPhraseRepository = searchPhraseRepository;\n }\n static services = [SearchPhraseArchive];\n forEvent() {\n return SearchPhraseSetDomainEvent;\n }\n handle(event) {\n if (event.ofMessageType('SearchPhraseSetDomainEvent')) {\n this.searchPhraseRepository.next(event.getAggregateId(), event.getPhrase());\n }\n }\n }\n return SearchPhraseSetEventHandler;\n})();\nlet SearchingEnabledArchive = /*#__PURE__*/(() => {\n class SearchingEnabledArchive extends AggregateArchive {\n static ENABLED = false;\n constructor() {\n super(SearchingEnabledArchive.ENABLED);\n }\n }\n return SearchingEnabledArchive;\n})();\nlet ConfigSearchingSetEventHandler = /*#__PURE__*/(() => {\n class ConfigSearchingSetEventHandler {\n searchingEnabledArchive;\n constructor(searchingEnabledArchive) {\n this.searchingEnabledArchive = searchingEnabledArchive;\n }\n static services = [SearchingEnabledArchive];\n forEvent() {\n return ConfigSearchingSetEvent;\n }\n handle(event) {\n if (event.ofMessageType('ConfigSearchingSetEvent')) {\n this.searchingEnabledArchive.next(event.getAggregateId(), event.isEnabled());\n }\n }\n }\n return ConfigSearchingSetEventHandler;\n})();\nclass RemoveSearchPhraseCommand extends StructureCommand {\n constructor(structureId) {\n super(structureId, 'RemoveSearchPhraseCommand');\n }\n}\nclass RemoveSearchPhraseCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return RemoveSearchPhraseCommand;\n }\n handle(aggregate, command) {\n aggregate.removeSearchPhrase();\n }\n publish(aggregate, command) {\n this.domainEventPublisher.publish(new FilterToggledEvent(command.getAggregateId()));\n }\n}\nclass SearchDomainModule {\n defineAggregate() {\n return null;\n }\n registerKey() {\n return structureKey;\n }\n registerProviders(container) {\n container.provide(SearchManagerFactory);\n container.provide(SearchDispatcher);\n }\n registerCommandHandlers() {\n return [SetConfigSearchingCommandHandler, StructureSetSearchPhraseCommandHandler, RemoveSearchPhraseCommandHandler];\n }\n registerDomainEventHandler() {\n return [SearchPhraseSetEventHandler, ConfigSearchingSetEventHandler];\n }\n registerMultiDomainEventHandler() {\n return [];\n }\n}\nlet SearchDomainWarehouse = /*#__PURE__*/(() => {\n class SearchDomainWarehouse extends SearchWarehouse {\n searchingEnabledArchive;\n searchPhraseArchive;\n searchHighlightArchive;\n searchPlaceholderArchive;\n constructor(searchingEnabledArchive, searchPhraseArchive, searchHighlightArchive, searchPlaceholderArchive) {\n super();\n this.searchingEnabledArchive = searchingEnabledArchive;\n this.searchPhraseArchive = searchPhraseArchive;\n this.searchHighlightArchive = searchHighlightArchive;\n this.searchPlaceholderArchive = searchPlaceholderArchive;\n }\n static services = [SearchingEnabledArchive, SearchPhraseArchive, SearchHighlightArchive, SearchPlaceholderArchive];\n onSearchEnabled(structureId) {\n return this.searchingEnabledArchive.on(structureId);\n }\n onPhrase(structureId) {\n return this.searchPhraseArchive.on(structureId);\n }\n onHighlight(structureId) {\n return this.searchHighlightArchive.on(structureId);\n }\n onPlaceholder(structureId) {\n return this.searchPlaceholderArchive.on(structureId);\n }\n }\n return SearchDomainWarehouse;\n})();\nclass SearchDomainEventRepository extends SearchEventRepository {\n constructor() {\n super();\n }\n onSearchPhrase(structureId) {\n return this.onEvent(structureId, SearchPhraseSetDomainEvent).pipe(hermesFilter(event => event.isInitial() === false), hermesMap(event => event.getPhrase()), hermesFilter(phrase => phrase !== null));\n }\n}\nlet SearchDomainPublisher = /*#__PURE__*/(() => {\n class SearchDomainPublisher extends SearchPublisher {\n searchDispatcher;\n constructor(searchDispatcher) {\n super();\n this.searchDispatcher = searchDispatcher;\n }\n static services = [SearchDispatcher];\n setSearchingConfig(config, structureId) {\n this.searchDispatcher.setSearchingConfig(config, structureId);\n }\n search(phrase, structureId) {\n this.searchDispatcher.search(phrase, structureId);\n }\n }\n return SearchDomainPublisher;\n})();\nclass SearchApiModule {\n registerProviders(container) {\n container.provide(SearchPublisher, SearchDomainPublisher);\n container.provide(SearchWarehouse, SearchDomainWarehouse);\n container.provide(SearchEventRepository, SearchDomainEventRepository);\n container.provide(SearchPhraseArchive);\n container.provide(SearchHighlightArchive);\n container.provide(SearchPlaceholderArchive);\n container.provide(SearchingEnabledArchive);\n }\n}\nfunction initializeSearch() {\n new DomainInitializer(new SearchApiModule(), new SearchDomainModule()).init();\n}\ninitializeSearch();\nfunction provideSearchCommandInvoker() {\n return CoreContainer.resolve(SearchPublisher);\n}\nfunction provideSearchWarehouse() {\n return CoreContainer.resolve(SearchWarehouse);\n}\nfunction provideSearchEventRepository() {\n return CoreContainer.resolve(SearchEventRepository);\n}\nlet SearchFeatureModule = /*#__PURE__*/(() => {\n class SearchFeatureModule extends FeatureModule {\n static forComponent() {\n return [];\n }\n static ɵfac = /* @__PURE__ */(() => {\n let ɵSearchFeatureModule_BaseFactory;\n return function SearchFeatureModule_Factory(t) {\n return (ɵSearchFeatureModule_BaseFactory || (ɵSearchFeatureModule_BaseFactory = i0.ɵɵgetInheritedFactory(SearchFeatureModule)))(t || SearchFeatureModule);\n };\n })();\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: SearchFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: SearchPublisher,\n useFactory: provideSearchCommandInvoker\n }, {\n provide: SearchWarehouse,\n useFactory: provideSearchWarehouse\n }, {\n provide: SearchEventRepository,\n useFactory: provideSearchEventRepository\n }],\n imports: [CommonModule, FabricModule, ReactiveFormsModule, GuiTemplateModule]\n });\n }\n return SearchFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureTopPanelModule = /*#__PURE__*/(() => {\n class StructureTopPanelModule {\n static ɵfac = function StructureTopPanelModule_Factory(t) {\n return new (t || StructureTopPanelModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: StructureTopPanelModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule, ReactiveFormsModule, FilterMenuFeatureModule, SearchFeatureModule]\n });\n }\n return StructureTopPanelModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet UniqueValueListModule = /*#__PURE__*/(() => {\n class UniqueValueListModule extends FeatureModule {\n static forComponent() {\n return [];\n }\n static ɵfac = /* @__PURE__ */(() => {\n let ɵUniqueValueListModule_BaseFactory;\n return function UniqueValueListModule_Factory(t) {\n return (ɵUniqueValueListModule_BaseFactory || (ɵUniqueValueListModule_BaseFactory = i0.ɵɵgetInheritedFactory(UniqueValueListModule)))(t || UniqueValueListModule);\n };\n })();\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: UniqueValueListModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule, fabricImports, GuiTemplateModule, FilterFeatureModule]\n });\n }\n return UniqueValueListModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst icon$1 = [StructureColumnMenuIconComponent];\nlet StructureMenuIconModule = /*#__PURE__*/(() => {\n class StructureMenuIconModule {\n static ɵfac = function StructureMenuIconModule_Factory(t) {\n return new (t || StructureMenuIconModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: StructureMenuIconModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n return StructureMenuIconModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst icon = [StructureArrowIconComponent];\nlet StructureArrowIconModule = /*#__PURE__*/(() => {\n class StructureArrowIconModule {\n static ɵfac = function StructureArrowIconModule_Factory(t) {\n return new (t || StructureArrowIconModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: StructureArrowIconModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n return StructureArrowIconModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst declarations$2 = [StructureColumnConfigComponent, StructureColumnConfigTriggerComponent, StructureColumnConfigSortComponent, StructureColumnConfigColumnHideComponent, StructureColumnConfigColumnMoveComponent];\nconst icons$1 = [StructureMenuIconModule, StructureArrowIconModule];\nlet StructureColumnMenuModule = /*#__PURE__*/(() => {\n class StructureColumnMenuModule {\n static ɵfac = function StructureColumnMenuModule_Factory(t) {\n return new (t || StructureColumnMenuModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: StructureColumnMenuModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule, fabricImports, GuiTemplateModule, StructureColumnManagerModule, UniqueValueListModule, TranslationFeatureModule, icons$1]\n });\n }\n return StructureColumnMenuModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureCellEditComponent = /*#__PURE__*/(() => {\n class StructureCellEditComponent extends SmartComponent {\n changeDetectorRef;\n structureId;\n sourceCommandService;\n cellContainerRef;\n entity;\n cell;\n editContext;\n valueChanges$;\n status$;\n actualValue;\n constructor(changeDetectorRef, elementRef, structureId, sourceCommandService) {\n super(changeDetectorRef, elementRef);\n this.changeDetectorRef = changeDetectorRef;\n this.structureId = structureId;\n this.sourceCommandService = sourceCommandService;\n }\n ngOnChanges(changes) {\n ifChanged(changes.entity, () => {\n this.initEditContext();\n });\n ifChanged(changes.cell, () => {\n this.initEditContext();\n });\n }\n ngOnInit() {\n this.initEditContext();\n }\n submitChangesAndExit() {\n const itemId = this.entity.getId(),\n updatedValue = this.actualValue,\n fieldId = this.cell.columnFieldId;\n this.sourceCommandService.editItem(new StructureEditSourceItemParams(itemId, fieldId, updatedValue), this.structureId);\n }\n getSelectorName() {\n return 'gui-structure-cell-edit';\n }\n initEditContext() {\n this.valueChanges$ = new ChangedValueEmitter();\n this.status$ = new ChangedValueEmitter();\n this.editContext = {\n status: this.status$,\n valueChanges: this.valueChanges$,\n value: this.cell.getValue(this.entity),\n focus: false,\n parent: this.cellContainerRef\n };\n this.status$.on().pipe(this.takeUntil()).subscribe(status => {\n switch (status) {\n case EditEventType.SUBMIT:\n this.submitChangesAndExit();\n this.publishEditSubmit();\n break;\n case EditEventType.CANCEL:\n // this.exitEditMode();\n this.publishEditCancel();\n break;\n default:\n break;\n }\n });\n }\n observeValueChanges() {\n this.valueChanges$.on().pipe(this.takeUntil()).subscribe(value => {\n this.actualValue = value;\n });\n }\n publishEditState(state) {\n // this.structureCellEditStore.next(state);\n }\n publishEditEnter() {\n this.publishEditState(StructureCellEditState.ENTER);\n }\n publishEditCancel() {\n this.publishEditState(StructureCellEditState.CANCEL);\n }\n publishEditSubmit() {\n this.publishEditState(StructureCellEditState.SUBMIT);\n }\n static ɵfac = function StructureCellEditComponent_Factory(t) {\n return new (t || StructureCellEditComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(SourcePublisher));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: StructureCellEditComponent,\n selectors: [[\"div\", \"gui-structure-cell-edit\", \"\", \"entity\", \"\", \"cell\", \"\"]],\n viewQuery: function StructureCellEditComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c66, 7, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.cellContainerRef = _t.first);\n }\n },\n inputs: {\n entity: \"entity\",\n cell: \"cell\"\n },\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature],\n attrs: _c91,\n decls: 3,\n vars: 2,\n consts: [[\"cellContainer\", \"\"], [4, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"]],\n template: function StructureCellEditComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", null, 0);\n i0.ɵɵtemplate(2, StructureCellEditComponent_ng_container_2_Template, 1, 0, \"ng-container\", 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx.cell.editTemplate)(\"ngTemplateOutletContext\", ctx.editContext);\n }\n },\n dependencies: [i4.NgTemplateOutlet],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return StructureCellEditComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet EmptySourceFeatureModule = /*#__PURE__*/(() => {\n class EmptySourceFeatureModule extends FeatureModule {\n static forComponent() {\n return [];\n }\n static ɵfac = /* @__PURE__ */(() => {\n let ɵEmptySourceFeatureModule_BaseFactory;\n return function EmptySourceFeatureModule_Factory(t) {\n return (ɵEmptySourceFeatureModule_BaseFactory || (ɵEmptySourceFeatureModule_BaseFactory = i0.ɵɵgetInheritedFactory(EmptySourceFeatureModule)))(t || EmptySourceFeatureModule);\n };\n })();\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: EmptySourceFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule, TranslationFeatureModule]\n });\n }\n return EmptySourceFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass ToggleSortCommand extends StructureCommand {\n compositionId;\n fieldId;\n constructor(structureId, compositionId, fieldId) {\n super(structureId, 'ToggleSortCommand');\n this.compositionId = compositionId;\n this.fieldId = fieldId;\n }\n getCompositionId() {\n return this.compositionId;\n }\n getFieldId() {\n return this.fieldId;\n }\n}\nclass ToggleSortCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return ToggleSortCommand;\n }\n handle(structure, command) {\n const aggregateId = command.getAggregateId(),\n compositionId = command.getCompositionId(),\n fieldId = command.getFieldId();\n const sorters = structure.toggleSort(fieldId);\n this.publishSortEvent(aggregateId, compositionId, fieldId, sorters);\n }\n publish(aggregate, command) {}\n publishSortEvent(aggregateId, compositionId, fieldId, sorters) {\n const directions = sorters.map(sorter => {\n return {\n direction: sorter.hasDirection(),\n fieldId: sorter.getField().getId()\n };\n });\n this.domainEventPublisher.publish(new SortToggledEvent(aggregateId, compositionId, directions));\n }\n}\nclass SetSortingCommand extends StructureCommand {\n sortingConfig;\n constructor(structureId, sortingConfig) {\n super(structureId, 'SetSortingCommand');\n this.sortingConfig = sortingConfig;\n }\n getSortingConfig() {\n return this.sortingConfig;\n }\n}\nclass SortingSetEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'SortingSetEvent');\n }\n}\nclass SetSortingCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SetSortingCommand;\n }\n handle(aggregate, command) {\n const sortingConfig = command.getSortingConfig();\n aggregate.setSortingConfig(sortingConfig);\n }\n publish(aggregate, command) {\n this.domainEventPublisher.publish(new SortingSetEvent(command.getAggregateId()));\n }\n}\nclass SetSortOrderCommand extends StructureCommand {\n compositionId;\n fieldId;\n sortOrder;\n constructor(structureId, compositionId, fieldId, sortOrder) {\n super(structureId, 'SetSortOrderCommand');\n this.compositionId = compositionId;\n this.fieldId = fieldId;\n this.sortOrder = sortOrder;\n }\n getCompositionId() {\n return this.compositionId;\n }\n getFieldId() {\n return this.fieldId;\n }\n getSortOrder() {\n return this.sortOrder;\n }\n}\nclass SetSortOrderCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SetSortOrderCommand;\n }\n handle(structure, command) {\n const structureId = command.getAggregateId(),\n compositionId = command.getCompositionId(),\n fieldId = command.getFieldId(),\n sortOrder = command.getSortOrder();\n const sorters = structure.setSortOrder(fieldId, sortOrder);\n this.publishSortEvent(structureId, compositionId, fieldId, sorters);\n }\n publish(aggregate, command) {}\n publishSortEvent(aggregateId, compositionId, fieldId, sorters) {\n const directions = sorters.map(sorter => {\n return {\n direction: sorter.hasDirection(),\n fieldId: sorter.getField().getId()\n };\n });\n this.domainEventPublisher.publish(new SortOrderSetEvent(aggregateId, compositionId, directions));\n }\n}\nclass SortingDispatcher {\n commandDispatcher = CoreContainer.resolve(CommandDispatcher);\n setSortingConfig(config, structureId) {\n this.commandDispatcher.dispatch(new SetSortingCommand(structureId, config));\n }\n toggleSort(fieldId, compositionId, structureId) {\n this.commandDispatcher.dispatch(new ToggleSortCommand(structureId, compositionId, fieldId));\n }\n setSortOrder(fieldId, sortOrder, compositionId, structureId) {\n this.commandDispatcher.dispatch(new SetSortOrderCommand(structureId, compositionId, fieldId, sortOrder));\n }\n}\nclass SortingDomainModule {\n defineAggregate() {\n return null;\n }\n registerKey() {\n return structureKey;\n }\n registerProviders(container) {\n container.provide(SortingDispatcher);\n }\n registerCommandHandlers() {\n return [ToggleSortCommandHandler, SetSortingCommandHandler, SetSortOrderCommandHandler];\n }\n registerDomainEventHandler() {\n return [];\n }\n registerMultiDomainEventHandler() {\n return [];\n }\n}\nlet SortingDomainPublisher = /*#__PURE__*/(() => {\n class SortingDomainPublisher extends SortingPublisher {\n sortingDispatcher;\n constructor(sortingDispatcher) {\n super();\n this.sortingDispatcher = sortingDispatcher;\n }\n static services = [SortingDispatcher];\n setSortingConfig(config, structureId) {\n this.sortingDispatcher.setSortingConfig(config, structureId);\n }\n toggleSort(fieldId, compositionId, structureId) {\n this.sortingDispatcher.toggleSort(fieldId, compositionId, structureId);\n }\n setSortOrder(fieldId, sortOrder, compositionId, structureId) {\n this.sortingDispatcher.setSortOrder(fieldId, sortOrder, compositionId, structureId);\n }\n }\n return SortingDomainPublisher;\n})();\nclass SortingApiModule {\n registerProviders(container) {\n container.provide(SortingPublisher, SortingDomainPublisher);\n }\n}\nfunction initializeSorting() {\n new DomainInitializer(new SortingApiModule(), new SortingDomainModule()).init();\n}\ninitializeSorting();\nfunction provideSortingCommandInvoker() {\n return CoreContainer.resolve(SortingPublisher);\n}\nlet SortingFeatureModule = /*#__PURE__*/(() => {\n class SortingFeatureModule extends FeatureModule {\n static forComponent() {\n return [];\n }\n static ɵfac = /* @__PURE__ */(() => {\n let ɵSortingFeatureModule_BaseFactory;\n return function SortingFeatureModule_Factory(t) {\n return (ɵSortingFeatureModule_BaseFactory || (ɵSortingFeatureModule_BaseFactory = i0.ɵɵgetInheritedFactory(SortingFeatureModule)))(t || SortingFeatureModule);\n };\n })();\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: SortingFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: SortingPublisher,\n useFactory: provideSortingCommandInvoker\n }],\n imports: [CommonModule]\n });\n }\n return SortingFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FieldArchive = /*#__PURE__*/(() => {\n class FieldArchive extends AggregateArchive {\n static default = [];\n constructor() {\n super(FieldArchive.default);\n }\n }\n return FieldArchive;\n})();\nclass FieldModel {\n id;\n dataType;\n name;\n constructor(id, dataType, name) {\n this.id = id;\n this.dataType = dataType;\n this.name = name;\n }\n getFieldId() {\n return this.id;\n }\n getId() {\n return this.id.getId();\n }\n getDataType() {\n return this.dataType;\n }\n getName() {\n return this.name;\n }\n}\nclass FieldConverter {\n convert(fields) {\n return fields.map(field => {\n return this.convertOne(field);\n });\n }\n convertOne(field) {\n return new FieldModel(field.getId(), field.getDataType(), field.getName());\n }\n}\nclass FieldCollection {\n fieldFactory;\n fields = new Map();\n constructor(fieldFactory) {\n this.fieldFactory = fieldFactory;\n }\n getField(fieldId) {\n if (fieldId === null) {\n return this.getAllFields()[0];\n }\n return this.fields.get(fieldId.getId());\n }\n getAllFieldIds() {\n return Array.from(this.fields.keys());\n }\n getAllFields() {\n return Array.from(this.fields.values());\n }\n getFieldsAsMap() {\n return this.fields;\n }\n initFields(fieldConfigs) {\n const fields = this.fieldFactory.create(fieldConfigs);\n this.clear();\n this.addFields(fields);\n }\n addFields(fields) {\n for (const field of fields) {\n this.addField(field);\n }\n }\n addField(field) {\n this.fields.set(field.getId().toString(), field);\n }\n clear() {\n this.fields.clear();\n }\n}\nclass FieldEntity extends Entity {\n id;\n field;\n name;\n constructor(id, field, name) {\n super(id);\n this.id = id;\n this.field = field;\n this.name = name;\n }\n static of(id, dataField, name) {\n return new FieldEntity(id, dataField, name);\n }\n getId() {\n return this.id;\n }\n getKey() {\n return this.getId().toString();\n }\n getDataType() {\n return this.field.getDataType();\n }\n getName() {\n return this.name;\n }\n /**\n * @deprecated\n */\n getField() {\n return this.field;\n }\n /**\n * Probably should not be used.\n *\n * @deprecated\n */\n getAccessor() {\n return this.field.getAccessor();\n }\n /**\n * Probably should not be used.\n *\n * @deprecated\n */\n getAccessorMethod() {\n return this.field.getAccessorMethod();\n }\n /**\n * Probably should not be used.\n *\n * @deprecated\n */\n getSearchAccessorMethod() {\n return this.field.getSearchAccessorMethod();\n }\n getValue(entity) {\n return this.field.getValue(entity);\n }\n getDisplayValue(value) {\n return this.field.getDisplayValue(value);\n }\n /**\n * Probably should not be used.\n *\n * @deprecated\n */\n isSummaries(type) {\n return this.field.isSummaries(type);\n }\n /**\n * Probably should not be used.\n *\n * @deprecated\n */\n isSummariesEnabled() {\n return this.field.isSummariesEnabled();\n }\n search(item, searchPhrase) {\n return this.field.search(item, searchPhrase);\n }\n filter(item, filterPhrase) {\n const value = this.field.getValue(item);\n if (this.field.getDataType() === DataType.NUMBER) {\n return this.field.filter(value, filterPhrase);\n } else if (this.field.getDataType() === DataType.BOOLEAN) {\n return this.field.filter(value, filterPhrase);\n } else if (this.field.getDataType() === DataType.STRING) {\n return this.field.filter(value, filterPhrase);\n } else if (this.field.getDataType() === DataType.DATE) {\n return this.field.filter(value, filterPhrase);\n } else {\n return true;\n }\n }\n sort(entityOne, entityTwo, direction) {\n const valueOne = direction ? this.field.getSortValue(entityOne) : this.field.getSortValue(entityTwo),\n valueTwo = direction ? this.field.getSortValue(entityTwo) : this.field.getSortValue(entityOne);\n if (this.field.getDataType() === DataType.NUMBER) {\n return this.field.sort(valueOne, valueTwo);\n } else if (this.field.getDataType() === DataType.BOOLEAN) {\n return this.field.sort(valueOne, valueTwo);\n } else if (this.field.getDataType() === DataType.STRING) {\n return this.field.sort(valueOne, valueTwo);\n } else if (this.field.getDataType() === DataType.DATE) {\n return this.field.sort(valueOne, valueTwo);\n } else {\n return 0;\n }\n }\n}\nclass BaseDataField {\n // TODO\n accessor; // (rawData: any) => any;\n dataType;\n accessorMethod;\n matchers;\n constructor(accessor, dataType, matchers) {\n this.accessor = accessor;\n this.dataType = dataType;\n this.matchers = matchers;\n if (typeof accessor === 'string') {\n this.accessorMethod = entity => entity.getSourceItem()[accessor];\n } else if (typeof accessor === 'function') {\n this.accessorMethod = entity => accessor(entity.getSourceItem());\n } else {\n this.accessorMethod = entity => entity;\n }\n }\n getDataType() {\n return this.dataType;\n }\n getAccessor() {\n return this.accessor;\n }\n getAccessorMethod() {\n return this.accessorMethod;\n }\n getMatchers() {\n return this.matchers;\n }\n getSearchAccessorMethod() {\n let matcher;\n this.matchers.getSearchMatcher().ifPresent(m => {\n matcher = m;\n });\n if (matcher) {\n return entity => {\n const val = this.accessorMethod(entity);\n return matcher(val);\n };\n } else {\n return entity => {\n return this.accessorMethod(entity);\n };\n }\n }\n getValue(entity) {\n return this.accessorMethod(entity);\n }\n getSortValue(entity) {\n let value = this.accessorMethod(entity);\n this.matchers.getSortMatcher().ifPresent(matcher => {\n value = matcher(value);\n });\n return value;\n }\n getSearchValue(entity) {\n let value = this.accessorMethod(entity);\n this.matchers.getSearchMatcher().ifPresent(matcher => {\n value = matcher(value);\n });\n return value;\n }\n}\nclass DataField extends BaseDataField {\n summariesEnabled = true;\n summariesTypes;\n possibleSummaries;\n constructor(accessor, dataType, matchers, summariesConfig) {\n super(accessor, dataType, matchers);\n this.possibleSummaries = this.assignPossibleSummaries();\n this.assignSummaries(summariesConfig);\n }\n isSummaries(type) {\n if (!this.isSummariesEnabled()) {\n return false;\n }\n return !!(this.summariesTypes & type);\n }\n isSummariesEnabled() {\n return this.summariesEnabled;\n }\n setSummariesEnabled(enabled) {\n this.summariesEnabled = enabled;\n }\n assignSummaries(summariesConfig) {\n if (!!summariesConfig && Object.keys(summariesConfig).length !== 0) {\n if (summariesConfig.enabled) {\n this.summariesEnabled = !!summariesConfig.enabled;\n }\n if (summariesConfig.summariesTypes) {\n this.summariesTypes = SummariesType.DISTINCT;\n summariesConfig.summariesTypes.forEach(t => {\n this.summariesTypes |= t;\n });\n } else {\n this.summariesTypes = this.assignDefaultSummaries();\n }\n } else {\n this.summariesTypes = this.assignDefaultSummaries();\n }\n }\n}\nclass UnknownDataField extends DataField {\n constructor(accessor, matchers, summariesConfig) {\n super(accessor, DataType.UNKNOWN, matchers, summariesConfig);\n }\n assignDefaultSummaries() {\n return SummariesType.DISTINCT;\n // return SummariesType.COUNT |\n // \tSummariesType.DISTINCT;\n }\n assignPossibleSummaries() {\n return SummariesType.COUNT | SummariesType.DISTINCT;\n }\n search(item, searchPhrase) {\n return false;\n }\n sort(one, two) {\n return 0;\n }\n filter(value, filterPhrase) {\n return false;\n }\n equals(item, value) {\n return false;\n }\n getDisplayValue(item) {\n return item;\n }\n}\nclass NumberDataField extends DataField {\n constructor(accessor, matchers, summariesConfig) {\n super(accessor, DataType.NUMBER, matchers, summariesConfig);\n }\n getField() {\n return this;\n }\n assignDefaultSummaries() {\n return SummariesType.DISTINCT;\n // return SummariesType.COUNT |\n // \tSummariesType.DISTINCT |\n // \tSummariesType.SUM |\n // \tSummariesType.MIN |\n // \tSummariesType.MAX |\n // \tSummariesType.AVERAGE |\n // \tSummariesType.MEDIAN;\n }\n assignPossibleSummaries() {\n return SummariesType.COUNT | SummariesType.DISTINCT | SummariesType.SUM | SummariesType.MIN | SummariesType.MAX | SummariesType.AVERAGE | SummariesType.MEDIAN;\n }\n search(item, searchPhrase) {\n return false;\n }\n sort(numOne, numTwo) {\n const sureNumOne = +numOne,\n sureNumTwo = +numTwo;\n return sureNumOne - sureNumTwo;\n }\n filter(value, filterPhrase) {\n return value > filterPhrase;\n }\n equals(item, value) {\n return this.getValue(item) === value;\n }\n getDisplayValue(item) {\n return `${item}`;\n }\n}\nclass StringDataField extends DataField {\n constructor(accessor, matchers, summariesConfig) {\n super(accessor, DataType.STRING, matchers, summariesConfig);\n }\n assignDefaultSummaries() {\n return SummariesType.DISTINCT;\n // return SummariesType.COUNT |\n // \tSummariesType.DISTINCT;\n }\n assignPossibleSummaries() {\n return SummariesType.COUNT | SummariesType.DISTINCT;\n }\n search(item, searchPhrase) {\n const value = this.getSearchValue(item);\n if (typeof value === 'string') {\n return value.toLowerCase().indexOf(searchPhrase.toLowerCase()) > -1;\n } else {\n return false;\n }\n }\n sort(strOne, strTwo) {\n const sureStrOne = '' + strOne,\n sureStrTwo = '' + strTwo;\n return sureStrOne.localeCompare(sureStrTwo);\n }\n filter(value, filterPhrase) {\n return value.toLowerCase().indexOf(filterPhrase.toLowerCase()) > -1;\n }\n equals(item, value) {\n return this.getValue(item) === value;\n }\n getDisplayValue(item) {\n return item;\n }\n}\nclass BooleanDataField extends DataField {\n constructor(accessor, matchers, summariesConfig) {\n super(accessor, DataType.BOOLEAN, matchers, summariesConfig);\n }\n assignDefaultSummaries() {\n return SummariesType.DISTINCT;\n // return SummariesType.COUNT |\n // \tSummariesType.DISTINCT |\n // \tSummariesType.TRUTHY |\n // \tSummariesType.FALSY;\n }\n assignPossibleSummaries() {\n return SummariesType.COUNT | SummariesType.DISTINCT | SummariesType.TRUTHY | SummariesType.FALSY;\n }\n search(item, searchPhrase) {\n return false;\n }\n sort(booleanOne, booleanTwo) {\n const sureBoolOne = !!booleanOne,\n sureBoolTwo = !!booleanTwo;\n return sureBoolOne === sureBoolTwo ? 0 : sureBoolTwo ? -1 : 1;\n }\n filter(value, filterPhrase) {\n return value === filterPhrase;\n }\n equals(item, value) {\n return this.getValue(item) === value;\n }\n getDisplayValue(item) {\n return item ? 'True' : 'False';\n }\n}\nclass DateDataField extends DataField {\n constructor(accessor, matchers, summariesConfig) {\n super(accessor, DataType.DATE, matchers, summariesConfig);\n }\n assignDefaultSummaries() {\n return SummariesType.DISTINCT;\n // return SummariesType.COUNT |\n // \tSummariesType.DISTINCT;\n }\n assignPossibleSummaries() {\n return SummariesType.COUNT | SummariesType.DISTINCT;\n }\n search(item, searchPhrase) {\n return false;\n }\n sort(dateOne, dateTwo) {\n return dateOne - dateTwo;\n }\n filter(value, filterPhrase) {\n return false;\n }\n equals(item, value) {\n return this.getValue(item).getTime() === value.getTime();\n }\n getDisplayValue(item) {\n return item.toDateString();\n }\n}\nclass FieldMatchers {\n matcher;\n sortMatcher;\n searchMatcher;\n constructor(matcher, sortMatcher, searchMatcher) {\n this.matcher = matcher;\n this.sortMatcher = sortMatcher;\n this.searchMatcher = searchMatcher;\n }\n getMatcher() {\n return Optional.of(this.matcher);\n }\n getSortMatcher() {\n let matcher;\n if (this.sortMatcher) {\n matcher = this.sortMatcher;\n }\n if (this.matcher) {\n matcher = this.matcher;\n }\n return Optional.of(matcher);\n }\n getSearchMatcher() {\n let matcher;\n if (this.searchMatcher) {\n matcher = this.searchMatcher;\n }\n if (this.matcher) {\n matcher = this.matcher;\n }\n return Optional.of(matcher);\n }\n}\nclass DataFieldFactory {\n create(fieldConfig) {\n const fieldMatchers = this.createMatchers(fieldConfig);\n let columnType = fieldConfig.type;\n if (columnType === undefined) {\n columnType = DataType.STRING;\n }\n if (columnType === DataType.UNKNOWN) {\n return new UnknownDataField(fieldConfig.field, fieldMatchers, fieldConfig.summaries);\n }\n if (columnType === DataType.NUMBER) {\n return new NumberDataField(fieldConfig.field, fieldMatchers, fieldConfig.summaries);\n }\n if (columnType === DataType.STRING) {\n return new StringDataField(fieldConfig.field, fieldMatchers);\n }\n if (columnType === DataType.BOOLEAN) {\n return new BooleanDataField(fieldConfig.field, fieldMatchers);\n }\n if (columnType === DataType.DATE) {\n return new DateDataField(fieldConfig.field, fieldMatchers);\n }\n return new UnknownDataField(fieldConfig.field, fieldMatchers, fieldConfig.summaries);\n }\n createMatchers(fieldConfig) {\n const matcher = fieldConfig.matcher;\n let sortMatcher;\n if (fieldConfig.sorting) {\n sortMatcher = fieldConfig.sorting.matcher;\n }\n return new FieldMatchers(matcher, sortMatcher);\n }\n}\nclass FieldEntityIdGenerator {\n generateId() {\n const id = RandomStringGenerator.generate();\n return new FieldId(id);\n }\n}\nlet FieldEntityFactory = /*#__PURE__*/(() => {\n class FieldEntityFactory {\n fieldIdGenerator;\n dataFieldFactory;\n constructor(fieldIdGenerator, dataFieldFactory) {\n this.fieldIdGenerator = fieldIdGenerator;\n this.dataFieldFactory = dataFieldFactory;\n }\n static services = [FieldEntityIdGenerator, DataFieldFactory];\n create(configs) {\n if (!configs) {\n return [];\n }\n return configs.map((fieldConfig, index) => {\n const fieldId = this.fieldIdGenerator.generateId(),\n dataField = this.dataFieldFactory.create(fieldConfig);\n return new FieldEntity(fieldId, dataField, this.getFieldName(fieldConfig, index));\n });\n }\n getFieldName(fieldConfig, index) {\n if (typeof fieldConfig.field === 'string') {\n return fieldConfig.field.toLowerCase();\n } else {\n return 'Field #' + index;\n }\n }\n }\n return FieldEntityFactory;\n})();\nlet FieldCollectionFactory = /*#__PURE__*/(() => {\n class FieldCollectionFactory {\n fieldFactory;\n constructor(fieldFactory) {\n this.fieldFactory = fieldFactory;\n }\n static services = [FieldEntityFactory];\n create() {\n return new FieldCollection(this.fieldFactory);\n }\n }\n return FieldCollectionFactory;\n})();\nclass InitFieldsCommandHandler {\n forCommand() {\n return InitFieldsCommand;\n }\n handle(structure, command) {\n const fieldConfigs = command.getFieldConfigs();\n structure.createFields(fieldConfigs);\n }\n}\nlet FieldsInitedEventHandler = /*#__PURE__*/(() => {\n class FieldsInitedEventHandler {\n fieldArchive;\n fieldConverter;\n constructor(fieldArchive, fieldConverter) {\n this.fieldArchive = fieldArchive;\n this.fieldConverter = fieldConverter;\n }\n static services = [FieldArchive, FieldConverter];\n forEvent() {\n return FieldsInitedEvent;\n }\n handle(event) {\n if (event.ofMessageType('FieldsInitedEvent')) {\n const fields = this.fieldConverter.convert(event.getFields());\n this.fieldArchive.next(event.getAggregateId(), fields);\n }\n }\n }\n return FieldsInitedEventHandler;\n})();\nclass FieldDomainModule {\n defineAggregate() {\n return null;\n }\n registerKey() {\n return structureKey;\n }\n registerProviders(container) {\n container.provide(FieldCollectionFactory);\n container.provide(FieldEntityFactory);\n container.provide(FieldEntityIdGenerator);\n container.provide(DataFieldFactory);\n }\n registerCommandHandlers() {\n return [InitFieldsCommandHandler];\n }\n registerDomainEventHandler() {\n return [FieldsInitedEventHandler];\n }\n registerMultiDomainEventHandler() {\n return [];\n }\n}\nlet FieldDomainWarehouse = /*#__PURE__*/(() => {\n class FieldDomainWarehouse extends FieldWarehouse {\n fieldReadModelArchive;\n constructor(fieldReadModelArchive) {\n super();\n this.fieldReadModelArchive = fieldReadModelArchive;\n }\n static services = [FieldArchive];\n onFields(structureId) {\n return this.fieldReadModelArchive.on(structureId);\n }\n findFields(structureId) {\n return this.fieldReadModelArchive.find(structureId);\n }\n }\n return FieldDomainWarehouse;\n})();\nlet FieldDomainPublisher = /*#__PURE__*/(() => {\n class FieldDomainPublisher extends FieldPublisher {\n commandDispatcher;\n constructor(commandDispatcher) {\n super();\n this.commandDispatcher = commandDispatcher;\n }\n static services = [CommandDispatcher];\n initFields(fieldConfigs, structureId) {\n this.commandDispatcher.dispatch(new InitFieldsCommand(structureId, fieldConfigs));\n }\n }\n return FieldDomainPublisher;\n})();\nclass FieldApiModule {\n registerProviders(container) {\n container.provide(FieldPublisher, FieldDomainPublisher);\n container.provide(FieldArchive);\n container.provide(FieldConverter);\n container.provide(FieldWarehouse, FieldDomainWarehouse);\n }\n}\nfunction initializeField() {\n new DomainInitializer(new FieldApiModule(), new FieldDomainModule()).init();\n}\ninitializeField();\nfunction provideFieldCommandInvoker() {\n return CoreContainer.resolve(FieldPublisher);\n}\nfunction provideFieldWarehouse() {\n return CoreContainer.resolve(FieldWarehouse);\n}\nlet FieldFeatureModule = /*#__PURE__*/(() => {\n class FieldFeatureModule extends FeatureModule {\n static forComponent() {\n return [];\n }\n static ɵfac = /* @__PURE__ */(() => {\n let ɵFieldFeatureModule_BaseFactory;\n return function FieldFeatureModule_Factory(t) {\n return (ɵFieldFeatureModule_BaseFactory || (ɵFieldFeatureModule_BaseFactory = i0.ɵɵgetInheritedFactory(FieldFeatureModule)))(t || FieldFeatureModule);\n };\n })();\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: FieldFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: FieldPublisher,\n useFactory: provideFieldCommandInvoker\n }, {\n provide: FieldWarehouse,\n useFactory: provideFieldWarehouse\n }],\n imports: [CommonModule]\n });\n }\n return FieldFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass StructureSetSummariesEnabledCommand extends StructureCommand {\n enabled;\n constructor(structureId, enabled) {\n super(structureId, 'StructureSetSummariesEnabledCommand');\n this.enabled = enabled;\n }\n isEnabled() {\n return this.enabled;\n }\n}\nconst StructureSummariesEnabledSetEventName = 'StructureSummariesEnabledSetEvent';\nclass StructureSummariesEnabledSetEvent extends StructureDomainEvent {\n enabled;\n constructor(aggregateId, enabled) {\n super(aggregateId, enabled, StructureSummariesEnabledSetEventName);\n this.enabled = enabled;\n }\n isEnabled() {\n return this.enabled;\n }\n}\nlet StructureSetSummariesEnabledCommandHandler = /*#__PURE__*/(() => {\n class StructureSetSummariesEnabledCommandHandler {\n structureSourceDomainEventPublisher;\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n constructor(structureSourceDomainEventPublisher) {\n this.structureSourceDomainEventPublisher = structureSourceDomainEventPublisher;\n }\n static services = [SourceDomainEventPublisher];\n forCommand() {\n return StructureSetSummariesEnabledCommand;\n }\n handle(structure, command) {\n const enabled = command.isEnabled();\n structure.setSummariesEnabled(enabled);\n }\n publish(aggregate, command) {\n const enabled = command.isEnabled(),\n aggregateEvents = aggregate.getEvents();\n this.domainEventPublisher.publish(new StructureSummariesEnabledSetEvent(command.getAggregateId(), enabled));\n this.structureSourceDomainEventPublisher.publish(aggregateEvents);\n }\n }\n return StructureSetSummariesEnabledCommandHandler;\n})();\nclass StructureSummariesChangedAggregateEvent extends StructureAggregateEvent {\n summarizedValues;\n constructor(aggregateId, summarizedValues) {\n super(aggregateId, 'StructureSummariesChangedAggregateEvent');\n this.summarizedValues = summarizedValues;\n }\n toDomainEvent() {\n return new StructureSummariesChangedEvent(this.getAggregateId(), this.summarizedValues);\n }\n getSummaries() {\n return this.summarizedValues;\n }\n}\nlet SummariesManager = /*#__PURE__*/(() => {\n class SummariesManager {\n calculators;\n static DEFAULT_ENABLED = false;\n structureId;\n enabled;\n values = new Map();\n constructor(structureId, calculators) {\n this.calculators = calculators;\n this.structureId = structureId;\n this.enabled = SummariesManager.DEFAULT_ENABLED;\n }\n calculate(fields, entities) {\n if (!this.enabled) {\n return [];\n }\n const calculations = new Map();\n this.calculators.forEach(calc => {\n const aggregatedValues = calc.calculate(fields, entities);\n if (aggregatedValues) {\n Array.from(aggregatedValues.keys()).forEach(key => {\n calculations.set(key, aggregatedValues.get(key));\n });\n }\n });\n if (calculations.size > 0) {\n return [new StructureSummariesChangedAggregateEvent(this.structureId, calculations)];\n } else {\n return [];\n }\n }\n setEnabled(enabled) {\n this.enabled = enabled;\n }\n add() {}\n remove() {}\n update() {}\n }\n return SummariesManager;\n})();\nclass SummariesEnabledArchive extends AggregateArchive {\n constructor() {\n super(SummariesManager.DEFAULT_ENABLED);\n }\n init(structureId) {\n this.next(structureId, SummariesManager.DEFAULT_ENABLED);\n }\n}\nlet StructureSummariesEnabledSetEventHandler = /*#__PURE__*/(() => {\n class StructureSummariesEnabledSetEventHandler {\n summariesEnabledArchive;\n constructor(summariesEnabledArchive) {\n this.summariesEnabledArchive = summariesEnabledArchive;\n }\n static services = [SummariesEnabledArchive];\n forEvent() {\n return StructureSummariesEnabledSetEvent;\n }\n handle(event) {\n if (event.ofMessageType('StructureSummariesEnabledSetEvent')) {\n this.summariesEnabledArchive.next(event.getAggregateId(), event.isEnabled());\n }\n }\n }\n return StructureSummariesEnabledSetEventHandler;\n})();\nclass SummariesCalculator {\n calculate(fields, items) {\n const filteredFields = fields.filter(field => this.forDataType(field.getDataType()));\n if (!filteredFields || filteredFields.length === 0 || items.length === 0) {\n return null;\n }\n const count = new Map(),\n distinct = new Map();\n // init\n filteredFields.forEach(field => {\n const key = field.getKey();\n count.set(key, 0);\n distinct.set(key, new Set());\n this.prepare(field);\n });\n // calculate\n items.forEach(item => {\n filteredFields.forEach(field => {\n const key = field.getKey(),\n value = field.getValue(item);\n if (value !== null || value !== undefined || value !== '') {\n if (field.isSummaries(SummariesType.COUNT)) {\n const countForField = count.get(key);\n count.set(key, countForField + 1);\n }\n if (field.isSummaries(SummariesType.DISTINCT)) {\n const distinctSet = distinct.get(key);\n distinctSet.add(value);\n }\n }\n this.aggregate(field, value);\n });\n });\n filteredFields.forEach(field => {\n this.postCalculate(field, items);\n });\n const summaries = new Map();\n filteredFields.forEach(field => {\n const key = field.getKey();\n const aggregatedValues = this.generateAggregatedValues(field);\n if (field.isSummaries(SummariesType.COUNT)) {\n aggregatedValues.setCount(count.get(key));\n }\n if (field.isSummaries(SummariesType.DISTINCT)) {\n aggregatedValues.setDistinct(distinct.get(key).size);\n }\n summaries.set(key, aggregatedValues);\n });\n return summaries;\n }\n}\nclass SummariesValues {\n count;\n distinct;\n setCount(value) {\n this.count = value;\n }\n setDistinct(value) {\n this.distinct = value;\n }\n}\nclass BooleanSummarizedValues extends SummariesValues {\n truthy;\n falsy;\n constructor(truthy, falsy) {\n super();\n this.truthy = truthy;\n this.falsy = falsy;\n }\n}\nclass BooleanSummariesCalculator extends SummariesCalculator {\n truthy = new Map();\n falsy = new Map();\n constructor() {\n super();\n }\n forDataType(dataType) {\n return dataType === DataType.BOOLEAN;\n }\n prepare(field) {\n const key = field.getKey();\n if (field.isSummaries(SummariesType.TRUTHY)) {\n this.truthy.set(key, 0);\n }\n if (field.isSummaries(SummariesType.FALSY)) {\n this.falsy.set(key, 0);\n }\n }\n postCalculate(field, items) {}\n aggregate(field, value) {\n const booleanValue = value,\n // (value as any === 'true'),\n key = field.getKey(),\n truthyForField = this.truthy.get(key),\n falsyForField = this.falsy.get(key);\n if (booleanValue) {\n if (field.isSummaries(SummariesType.TRUTHY)) {\n this.truthy.set(key, truthyForField + 1);\n }\n } else {\n if (field.isSummaries(SummariesType.FALSY)) {\n this.falsy.set(key, falsyForField + 1);\n }\n }\n }\n generateAggregatedValues(field) {\n const key = field.getKey();\n return new BooleanSummarizedValues(this.truthy.get(key), this.falsy.get(key));\n }\n}\nclass DateSummarizedValues extends SummariesValues {\n constructor() {\n super();\n }\n}\nclass DateSummariesCalculator extends SummariesCalculator {\n constructor() {\n super();\n }\n forDataType(dataType) {\n return dataType === DataType.DATE;\n }\n prepare(field) {}\n postCalculate(field, items) {}\n aggregate(field, value) {}\n generateAggregatedValues(field) {\n return new DateSummarizedValues();\n }\n}\nclass NumberSummarizedValues extends SummariesValues {\n sum;\n min;\n max;\n average;\n median;\n constructor(sum, min, max, average, median) {\n super();\n this.sum = this.setValueWithPrecision(sum);\n this.min = this.setValueWithPrecision(min);\n this.max = this.setValueWithPrecision(max);\n this.average = this.setValueWithPrecision(average);\n this.median = this.setValueWithPrecision(median);\n }\n setValueWithPrecision(value) {\n if (!value && value !== 0) {\n return null;\n }\n if (value === 0) {\n return 0;\n }\n return +value.toFixed(2);\n }\n}\nclass NumberSummariesCalculator extends SummariesCalculator {\n sum = new Map();\n min = new Map();\n max = new Map();\n average = new Map();\n median = new Map();\n constructor() {\n super();\n }\n forDataType(dataType) {\n return dataType === DataType.NUMBER;\n }\n prepare(field) {\n const key = field.getKey();\n this.sum.set(key, 0);\n this.min.set(key, Number.MAX_SAFE_INTEGER);\n this.max.set(key, 0);\n }\n postCalculate(field, items) {\n const key = field.getKey();\n if (field.isSummaries(SummariesType.AVERAGE)) {\n this.average.set(key, this.sum.get(key) / items.length);\n }\n if (field.isSummaries(SummariesType.MEDIAN)) {\n this.median.set(key, field.getValue(items[Math.floor(items.length / 2)]));\n }\n }\n aggregate(field, value) {\n const numberValue = +value,\n key = field.getKey(),\n sumForField = this.sum.get(key),\n minForField = this.min.get(key),\n maxForField = this.max.get(key);\n if (field.isSummaries(SummariesType.SUM) || field.isSummaries(SummariesType.AVERAGE)) {\n this.sum.set(key, sumForField + numberValue);\n }\n if (field.isSummaries(SummariesType.MIN)) {\n if (minForField > numberValue) {\n this.min.set(key, numberValue);\n }\n }\n if (field.isSummaries(SummariesType.MAX)) {\n if (maxForField < numberValue) {\n this.max.set(key, numberValue);\n }\n }\n }\n generateAggregatedValues(field) {\n const key = field.getKey(),\n sum = field.isSummaries(SummariesType.SUM) ? this.sum.get(key) : undefined,\n min = field.isSummaries(SummariesType.MIN) ? this.min.get(key) : undefined,\n max = field.isSummaries(SummariesType.MAX) ? this.max.get(key) : undefined,\n average = field.isSummaries(SummariesType.AVERAGE) ? this.average.get(key) : undefined,\n median = field.isSummaries(SummariesType.MEDIAN) ? this.median.get(key) : undefined;\n return new NumberSummarizedValues(sum, min, max, average, median);\n }\n}\nclass StringSummarizedValues extends SummariesValues {\n constructor() {\n super();\n }\n}\nclass StringSummariesCalculator extends SummariesCalculator {\n constructor() {\n super();\n }\n forDataType(dataType) {\n return dataType === DataType.STRING;\n }\n prepare(field) {}\n postCalculate(field, items) {}\n aggregate(field, value) {}\n generateAggregatedValues(field) {\n return new StringSummarizedValues();\n }\n}\nclass UnknownSummarizedValues extends SummariesValues {\n constructor() {\n super();\n }\n}\nclass UnknownSummariesCalculator extends SummariesCalculator {\n constructor() {\n super();\n }\n forDataType(dataType) {\n return dataType === DataType.UNKNOWN;\n }\n prepare(field) {}\n postCalculate(field, items) {}\n aggregate(field, value) {}\n generateAggregatedValues(field) {\n return new UnknownSummarizedValues();\n }\n}\nconst SUMMARIES_CALCULATORS = 'GUI - Summaries Calculators';\nlet SummariesManagerFactory = /*#__PURE__*/(() => {\n class SummariesManagerFactory {\n calculators;\n constructor(calculators) {\n this.calculators = calculators;\n }\n static services = [{\n inject: SUMMARIES_CALCULATORS,\n collection: true\n }];\n create(structureId) {\n return new SummariesManager(structureId, this.calculators);\n }\n }\n return SummariesManagerFactory;\n})();\nclass SummariesDispatcher {\n commandDispatcher = CoreContainer.resolve(CommandDispatcher);\n setSummariesEnabled(enabled, structureId) {\n this.commandDispatcher.dispatch(new StructureSetSummariesEnabledCommand(structureId, enabled));\n }\n}\nlet StructureSummariesPanelConfig = /*#__PURE__*/(() => {\n class StructureSummariesPanelConfig {\n static defaultTop = false;\n static defaultBottom = true;\n top = StructureSummariesPanelConfig.defaultTop;\n bottom = StructureSummariesPanelConfig.defaultBottom;\n setTop(top) {\n this.top = top;\n }\n setBottom(bottom) {\n this.bottom = bottom;\n }\n isTopEnabled() {\n return this.top;\n }\n isBottomEnabled() {\n return this.bottom;\n }\n }\n return StructureSummariesPanelConfig;\n})();\nclass StructureSummariesConfigArchive extends AggregateArchive {\n static default = new StructureSummariesPanelConfig();\n constructor() {\n super(StructureSummariesConfigArchive.default);\n }\n}\nclass StructureSummariesPanelConfigConverter {\n convert(config) {\n const panelConfig = new StructureSummariesPanelConfig();\n if (config.top !== undefined && config.top !== null) {\n panelConfig.setTop(config.top);\n }\n if (config.bottom !== undefined && config.bottom !== null) {\n panelConfig.setBottom(config.bottom);\n }\n return panelConfig;\n }\n}\nclass SummariesDomainModule {\n defineAggregate() {\n return null;\n }\n registerKey() {\n return structureKey;\n }\n registerProviders(container) {\n container.provide(SummariesManagerFactory);\n container.provide(SummariesDispatcher);\n container.provide(StructureSummariesConfigArchive);\n container.provide(StructureSummariesPanelConfigConverter);\n container.provideCollection(SUMMARIES_CALCULATORS, BooleanSummariesCalculator);\n container.provideCollection(SUMMARIES_CALCULATORS, DateSummariesCalculator);\n container.provideCollection(SUMMARIES_CALCULATORS, NumberSummariesCalculator);\n container.provideCollection(SUMMARIES_CALCULATORS, StringSummariesCalculator);\n container.provideCollection(SUMMARIES_CALCULATORS, UnknownSummariesCalculator);\n }\n registerCommandHandlers() {\n return [StructureSetSummariesEnabledCommandHandler];\n }\n registerDomainEventHandler() {\n return [StructureSummariesEnabledSetEventHandler];\n }\n registerMultiDomainEventHandler() {\n return [];\n }\n}\nlet SummariesDomainWarehouse = /*#__PURE__*/(() => {\n class SummariesDomainWarehouse extends SummariesWarehouse {\n summariesEnabledArchive;\n structureSummariesArchive;\n constructor(summariesEnabledArchive, structureSummariesArchive) {\n super();\n this.summariesEnabledArchive = summariesEnabledArchive;\n this.structureSummariesArchive = structureSummariesArchive;\n }\n static services = [SummariesEnabledArchive, StructureSummariesConfigArchive];\n onEnabled(structureId) {\n return this.summariesEnabledArchive.on(structureId);\n }\n onTopEnabled(structureId) {\n return this.onEnabled(structureId).pipe(hermesSwitchMap(enabled => {\n return this.structureSummariesArchive.on(structureId).pipe(hermesMap(config => enabled && config.isTopEnabled()));\n }));\n }\n onBottomEnabled(structureId) {\n return this.onEnabled(structureId).pipe(hermesSwitchMap(enabled => {\n return this.structureSummariesArchive.on(structureId).pipe(hermesMap(config => enabled && config.isBottomEnabled()));\n }));\n }\n }\n return SummariesDomainWarehouse;\n})();\nlet SummariesDomainPublisher = /*#__PURE__*/(() => {\n class SummariesDomainPublisher extends SummariesPublisher {\n summariesDispatcher;\n configConverter;\n structureSummariesConfigArchive;\n constructor(summariesDispatcher, configConverter, structureSummariesConfigArchive) {\n super();\n this.summariesDispatcher = summariesDispatcher;\n this.configConverter = configConverter;\n this.structureSummariesConfigArchive = structureSummariesConfigArchive;\n }\n static services = [SummariesDispatcher, StructureSummariesPanelConfigConverter, StructureSummariesConfigArchive];\n setSummariesEnabled(enabled, structureId) {\n this.summariesDispatcher.setSummariesEnabled(enabled, structureId);\n }\n setConfig(config, structureId) {\n const summariesPanelConfig = this.configConverter.convert(config);\n this.setSummariesEnabled(config.enabled, structureId);\n this.structureSummariesConfigArchive.next(structureId, summariesPanelConfig);\n }\n }\n return SummariesDomainPublisher;\n})();\nclass SummariesDomainEventRepository extends SummariesEventRepository {\n constructor() {\n super();\n }\n onSummariesChanged(structureId) {\n return this.onEvent(structureId, StructureSummariesChangedEvent);\n }\n}\nclass SummariesApiModule {\n registerProviders(container) {\n container.provide(SummariesPublisher, SummariesDomainPublisher);\n container.provide(SummariesEventRepository, SummariesDomainEventRepository);\n container.provide(SummariesWarehouse, SummariesDomainWarehouse);\n container.provide(SummariesEnabledArchive);\n }\n}\nfunction initializeSummaries() {\n new DomainInitializer(new SummariesApiModule(), new SummariesDomainModule()).init();\n}\nfunction provideSummariesCalculator(clazz) {\n return {\n provide: SUMMARIES_CALCULATORS,\n useClass: clazz,\n multi: true\n };\n}\ninitializeSummaries();\nfunction provideSummariesCommandInvoker() {\n return CoreContainer.resolve(SummariesPublisher);\n}\nfunction provideSummariesWarehouse() {\n return CoreContainer.resolve(SummariesWarehouse);\n}\nfunction provideSummariesEventRepository() {\n return CoreContainer.resolve(SummariesEventRepository);\n}\nlet SummariesFeatureModule = /*#__PURE__*/(() => {\n class SummariesFeatureModule extends FeatureModule {\n static forComponent() {\n return [];\n }\n static ɵfac = /* @__PURE__ */(() => {\n let ɵSummariesFeatureModule_BaseFactory;\n return function SummariesFeatureModule_Factory(t) {\n return (ɵSummariesFeatureModule_BaseFactory || (ɵSummariesFeatureModule_BaseFactory = i0.ɵɵgetInheritedFactory(SummariesFeatureModule)))(t || SummariesFeatureModule);\n };\n })();\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: SummariesFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: SummariesPublisher,\n useFactory: provideSummariesCommandInvoker\n }, {\n provide: SummariesWarehouse,\n useFactory: provideSummariesWarehouse\n }, {\n provide: SummariesEventRepository,\n useFactory: provideSummariesEventRepository\n }, provideSummariesCalculator(BooleanSummariesCalculator), provideSummariesCalculator(DateSummariesCalculator), provideSummariesCalculator(NumberSummariesCalculator), provideSummariesCalculator(StringSummariesCalculator), provideSummariesCalculator(UnknownSummariesCalculator)],\n imports: [CommonModule, FabricModule, TranslationFeatureModule, GuiTemplateModule]\n });\n }\n return SummariesFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass VerticalRange {\n start;\n end;\n margin;\n constructor(start, end, margin) {\n this.start = start;\n this.end = end;\n this.margin = margin;\n }\n getStart() {\n return this.start;\n }\n getEnd() {\n return this.end;\n }\n getMargin() {\n return this.margin;\n }\n}\nlet VerticalFormationContainerHeight = /*#__PURE__*/(() => {\n let VerticalFormationContainerHeight = class VerticalFormationContainerHeight {\n containerHeight = Optional.empty();\n sourceHeight;\n isContainerHeightProperForVirtualScroll() {\n if (this.containerHeight.isPresent()) {\n return this.containerHeight.getValueOrNullOrThrowError() > 0;\n } else {\n return false;\n }\n }\n getVisibleContainerHeight() {\n return this.getHeight();\n }\n getHeight() {\n if (this.containerHeight.isPresent()) {\n return this.getContainerHeight();\n }\n return this.sourceHeight;\n }\n getSourceHeight() {\n return this.sourceHeight;\n }\n setContainerHeight(height) {\n if (height >= 0) {\n this.containerHeight = Optional.of(height);\n }\n }\n setSourceSize(height) {\n this.sourceHeight = height;\n }\n getContainerHeight() {\n if (this.containerHeight.getValueOrNullOrThrowError() > this.sourceHeight) {\n return this.sourceHeight;\n } else {\n return this.containerHeight.getValueOrNullOrThrowError();\n }\n }\n };\n VerticalFormationContainerHeight = __decorate([DomainObject], VerticalFormationContainerHeight);\n return VerticalFormationContainerHeight;\n})();\nclass ScrollBarPositionSetEvent extends StructureDomainEvent {\n position;\n constructor(aggregateId, position) {\n super(aggregateId, position, 'ScrollBarPositionSetEvent');\n this.position = position;\n }\n getPosition() {\n return this.position;\n }\n}\nclass ScrollBarPositionSetAggregateEvent extends StructureAggregateEvent {\n position;\n constructor(schemaId, position) {\n super(schemaId, 'ScrollBarPositionSetAggregateEvent');\n this.position = position;\n }\n toDomainEvent() {\n return new ScrollBarPositionSetEvent(this.getAggregateId(), this.position);\n }\n}\nvar VerticalFormation_1;\nlet VerticalFormation = class VerticalFormation {\n static #_ = VerticalFormation_1 = this;\n structureId;\n enabled;\n static ROW_HEIGHT = 42;\n static HIDDEN_ITEMS_TOP = 5;\n static HIDDEN_ITEMS_BOTTOM = 2;\n rowHeight = VerticalFormation_1.ROW_HEIGHT;\n hiddenItemsTop = VerticalFormation_1.HIDDEN_ITEMS_TOP;\n hiddenItemsBottom = VerticalFormation_1.HIDDEN_ITEMS_BOTTOM;\n container = new VerticalFormationContainerHeight();\n scrollPosition;\n range;\n sourceSize;\n logger;\n constructor(structureId, enabled = false, viewportHeight = 0, sourceSize = 0, scrollPosition = 0, rowHeight, hiddenItemsTop, hiddenItemsBottom) {\n this.structureId = structureId;\n this.enabled = enabled;\n this.sourceSize = sourceSize;\n this.container.setSourceSize(this.sourceSize * this.rowHeight);\n this.container.setContainerHeight(viewportHeight);\n this.scrollPosition = scrollPosition;\n if (Number.isInteger(rowHeight)) {\n this.rowHeight = rowHeight;\n }\n if (Number.isInteger(hiddenItemsTop)) {\n this.hiddenItemsTop = hiddenItemsTop;\n }\n if (Number.isInteger(hiddenItemsBottom)) {\n this.hiddenItemsBottom = hiddenItemsBottom;\n }\n this.calculateRange();\n }\n isEnabled() {\n return this.enabled && this.container.getHeight() > 0 && this.sourceSize > 0;\n }\n getViewPortHeight() {\n return this.container.getVisibleContainerHeight();\n }\n getSourceHeight() {\n return this.container.getSourceHeight();\n }\n getRowHeight() {\n return this.rowHeight;\n }\n getRange() {\n return this.range;\n }\n getTopMargin() {\n return this.range.getStart() * this.rowHeight;\n }\n calculateRange() {\n if (this.calcFullHeight() <= this.container.getHeight()) {\n this.range = new VerticalRange(0, this.sourceSize, 0);\n return;\n }\n const itemsInViewport = Math.ceil(this.container.getHeight() / this.rowHeight),\n viewportPositionIndex = Math.floor(this.scrollPosition / this.rowHeight);\n let end = viewportPositionIndex + itemsInViewport + this.hiddenItemsBottom;\n let topMargin = viewportPositionIndex;\n if (topMargin + itemsInViewport >= this.sourceSize) {\n topMargin = this.sourceSize - itemsInViewport;\n }\n let start = Math.max(viewportPositionIndex - this.hiddenItemsTop, 0);\n if (end > this.sourceSize) {\n end = this.sourceSize;\n start = end - itemsInViewport;\n }\n // end - itemsInViewport;\n this.range = new VerticalRange(start, end, topMargin);\n return {\n start,\n end,\n topMargin\n };\n }\n setEnabled(enabled) {\n this.enabled = enabled;\n // TODO dispatch aggregate event\n if (this.enabled && !this.container.isContainerHeightProperForVirtualScroll()) {\n this.logger.warn('Height needs to be specified in order for virtual scroll to work.');\n }\n this.calculateRange();\n }\n setSourceSize(sourceSize = 0) {\n this.sourceSize = sourceSize;\n this.container.setSourceSize(this.sourceSize * this.rowHeight);\n this.calculateRange();\n }\n setTopHiddenItemsCount(count) {\n this.hiddenItemsTop = count;\n this.calculateRange();\n }\n setBottomHiddenItemsCount(count) {\n this.hiddenItemsBottom = count;\n this.calculateRange();\n }\n setScrollPosition(scrollPosition) {\n this.scrollPosition = scrollPosition;\n this.calculateRange();\n }\n scrollToIndex(index) {\n if (index >= this.sourceSize) {\n index = this.sourceSize;\n }\n if (index < -1) {\n index = 0;\n }\n const position = index * this.rowHeight;\n return new ScrollBarPositionSetAggregateEvent(this.structureId, position);\n }\n setViewportHeight(height) {\n this.container.setContainerHeight(height);\n this.calculateRange();\n }\n setRowHeight(rowHeight) {\n this.rowHeight = rowHeight;\n this.container.setSourceSize(this.sourceSize * this.rowHeight);\n this.calculateRange();\n }\n setLogger(logger) {\n this.logger = logger;\n }\n // TODO REMOVE\n calcFullHeight() {\n return this.sourceSize * this.rowHeight;\n }\n};\nVerticalFormation = VerticalFormation_1 = __decorate([DomainObject], VerticalFormation);\nlet VerticalFormationFactory = /*#__PURE__*/(() => {\n class VerticalFormationFactory {\n logger;\n constructor(logger) {\n this.logger = logger;\n }\n static services = [Logger];\n create(structureId, enabled = false, viewportHeight = -1, sourceSize = 0, scrollPosition = 0, rowHeight, hiddenItemsTop, hiddenItemsBottom) {\n const vf = new VerticalFormation(structureId, enabled, viewportHeight, sourceSize, scrollPosition, rowHeight, hiddenItemsTop, hiddenItemsBottom);\n vf.setLogger(this.logger);\n return vf;\n }\n }\n return VerticalFormationFactory;\n})();\nclass SetScrollPositionCommand extends StructureCommand {\n position;\n constructor(structureId, position) {\n super(structureId, 'SetScrollPositionCommand');\n this.position = position;\n }\n getPosition() {\n return this.position;\n }\n}\nclass ScrollPositionSetEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'ScrollPositionSetEvent');\n }\n}\nclass SetScrollPositionCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SetScrollPositionCommand;\n }\n handle(structure, command) {\n const position = command.getPosition();\n structure.setScrollPosition(position);\n }\n publish(aggregate, command) {\n this.domainEventPublisher.publish(new ScrollPositionSetEvent(command.getAggregateId()));\n }\n}\nclass SetVerticalScrollEnabledCommand extends StructureCommand {\n enabled;\n constructor(structureId, enabled) {\n super(structureId, 'SetVerticalScrollEnabledCommand');\n this.enabled = enabled;\n }\n isEnabled() {\n return this.enabled;\n }\n}\nclass VerticalScrollEnabledSetEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'VerticalScrollEnabledSetEvent');\n }\n}\nclass SetVerticalScrollEnabledCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SetVerticalScrollEnabledCommand;\n }\n handle(structure, command) {\n const enabled = command.isEnabled();\n structure.setVerticalFormationEnabled(enabled);\n }\n publish(aggregate, command) {\n this.domainEventPublisher.publish(new VerticalScrollEnabledSetEvent(command.getAggregateId()));\n }\n}\nclass SetRowHeightBasedOnThemeCommand extends StructureCommand {\n theme;\n constructor(structureId, theme) {\n super(structureId, 'SetRowHeightBasedOnThemeCommand');\n this.theme = theme;\n }\n getTheme() {\n return this.theme;\n }\n}\nclass RowHeightSetBasedOnThemeEvent extends StructureDomainEvent {\n constructor(structureId) {\n super(structureId, null, 'RowHeightSetBasedOnThemeEvent');\n }\n}\nclass SetRowHeightBasedOnThemeCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SetRowHeightBasedOnThemeCommand;\n }\n handle(structure, command) {\n const theme = command.getTheme();\n structure.setTheme(theme);\n }\n publish(aggregate, command) {\n this.domainEventPublisher.publish(new RowHeightSetBasedOnThemeEvent(command.getAggregateId()));\n }\n}\nclass SetRowHeightCommand extends StructureCommand {\n rowHeight;\n constructor(structureId, rowHeight) {\n super(structureId, 'SetRowHeightCommand');\n this.rowHeight = rowHeight;\n }\n getRowHeight() {\n return this.rowHeight;\n }\n}\nclass RowHeightSetEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'RowHeightSetEvent');\n }\n}\nclass SetRowHeightCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SetRowHeightCommand;\n }\n handle(structure, command) {\n const rowHeight = command.getRowHeight();\n const formation = structure.getVerticalFormation();\n formation.setRowHeight(rowHeight);\n }\n publish(aggregate, command) {\n this.domainEventPublisher.publish(new RowHeightSetEvent(command.getAggregateId()));\n }\n}\nclass StructureSetHeightCommand extends StructureCommand {\n height;\n constructor(structureId, height) {\n super(structureId, 'StructureSetHeightCommand');\n this.height = height;\n }\n getHeight() {\n return this.height;\n }\n}\nclass StructureHeightSetEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'StructureHeightSetEvent');\n }\n}\nclass StructureSetHeightCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return StructureSetHeightCommand;\n }\n handle(aggregate, command) {\n const height = command.getHeight();\n aggregate.setHeight(height);\n }\n publish(aggregate, command) {\n this.domainEventPublisher.publish(new StructureHeightSetEvent(command.getAggregateId()));\n }\n}\nlet VerticalFormationScrollBarPositionArchive = /*#__PURE__*/(() => {\n class VerticalFormationScrollBarPositionArchive extends AggregateArchive {\n static DEFAULT_POSITION = 0;\n constructor() {\n super(VerticalFormationScrollBarPositionArchive.DEFAULT_POSITION);\n }\n }\n return VerticalFormationScrollBarPositionArchive;\n})();\nlet ScrollBarPositionSetEventHandler = /*#__PURE__*/(() => {\n class ScrollBarPositionSetEventHandler {\n positionRepository;\n constructor(positionRepository) {\n this.positionRepository = positionRepository;\n }\n static services = [VerticalFormationScrollBarPositionArchive];\n forEvent() {\n return ScrollBarPositionSetEvent;\n }\n handle(event) {\n if (event.ofMessageType('ScrollBarPositionSetEvent')) {\n this.positionRepository.next(event.getAggregateId(), event.getPosition());\n }\n }\n }\n return ScrollBarPositionSetEventHandler;\n})();\nclass SetScrollBarPositionCommand extends StructureCommand {\n position;\n constructor(structureId, position) {\n super(structureId, 'SetScrollBarPositionCommand');\n this.position = position;\n }\n getPosition() {\n return this.position;\n }\n}\nclass SetScrollBarPositionCommandHandler {\n forCommand() {\n return SetScrollBarPositionCommand;\n }\n handle(structure, command) {\n const index = command.getPosition();\n structure.scrollToIndex(index);\n }\n}\nclass VerticalFormationDispatcher {\n commandDispatcher = CoreContainer.resolve(CommandDispatcher);\n setVirtualScrollEnabled(enabled, structureId) {\n this.commandDispatcher.dispatch(new SetVerticalScrollEnabledCommand(structureId, enabled));\n }\n scrollTo(position, structureId) {\n this.commandDispatcher.dispatch(new SetScrollBarPositionCommand(structureId, position));\n }\n setScrollPosition(position, structureId) {\n this.commandDispatcher.dispatch(new SetScrollPositionCommand(structureId, position));\n }\n}\nclass VerticalFormationDomainModule {\n defineAggregate() {\n return null;\n }\n registerKey() {\n return structureKey;\n }\n registerProviders(container) {\n container.provide(VerticalFormationFactory);\n container.provide(VerticalFormationDispatcher);\n }\n registerCommandHandlers() {\n return [SetScrollPositionCommandHandler, SetVerticalScrollEnabledCommandHandler, SetRowHeightBasedOnThemeCommandHandler, SetRowHeightCommandHandler, StructureSetHeightCommandHandler, SetScrollBarPositionCommandHandler];\n }\n registerDomainEventHandler() {\n return [ScrollBarPositionSetEventHandler];\n }\n registerMultiDomainEventHandler() {\n return [];\n }\n}\nlet VerticalFormationModel = /*#__PURE__*/(() => {\n let VerticalFormationModel = class VerticalFormationModel {\n enabled;\n topMargin;\n sourceHeight;\n viewportHeight;\n rowHeight;\n constructor(enabled, topMargin, sourceHeight, viewportHeight, rowHeight) {\n this.enabled = enabled;\n this.topMargin = topMargin;\n this.sourceHeight = sourceHeight;\n this.viewportHeight = viewportHeight;\n this.rowHeight = rowHeight;\n }\n isEnabled() {\n return this.enabled;\n }\n getTopMargin() {\n return this.topMargin; // * this.rowHeight;\n }\n getSourceHeight() {\n return this.sourceHeight;\n }\n getViewPortHeight() {\n return this.viewportHeight;\n }\n getRowHeight() {\n return this.rowHeight;\n }\n };\n VerticalFormationModel = __decorate([ReadModelObject], VerticalFormationModel);\n return VerticalFormationModel;\n})();\nclass VerticalFormationConverter {\n convert(verticalFormation) {\n const enabled = verticalFormation.isEnabled(),\n topMargin = verticalFormation.getTopMargin(),\n sourceHeight = verticalFormation.getSourceHeight(),\n viewportHeight = verticalFormation.getViewPortHeight(),\n rowHeight = verticalFormation.getRowHeight();\n return new VerticalFormationModel(enabled, topMargin, sourceHeight, viewportHeight, rowHeight);\n }\n}\nclass StructureCreatedEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'StructureCreatedEvent');\n }\n}\nclass InMemoryStructureStore extends InMemoryStore {}\nlet SourceIsLoadingModel = /*#__PURE__*/(() => {\n let SourceIsLoadingModel = class SourceIsLoadingModel {\n loading;\n constructor(loading) {\n this.loading = loading;\n }\n isLoading() {\n return this.loading;\n }\n };\n SourceIsLoadingModel = __decorate([ReadModelObject], SourceIsLoadingModel);\n return SourceIsLoadingModel;\n})();\nclass SourceConverter {\n convert(aggregate) {\n return new SourceIsLoadingModel(aggregate.isLoading());\n }\n}\nclass StructureReadModelRoot extends ReadModelRoot {\n paging;\n entities;\n source;\n verticalFormation;\n constructor(uid, paging, entities, source, verticalFormation) {\n super(uid);\n this.paging = paging;\n this.entities = entities;\n this.source = source;\n this.verticalFormation = verticalFormation;\n }\n getPaging() {\n return this.paging;\n }\n getEntities() {\n return this.entities;\n }\n getSource() {\n return this.source;\n }\n getVerticalFormation() {\n return this.verticalFormation;\n }\n // TODO Remove\n getTopMargin() {\n return this.verticalFormation.getTopMargin();\n }\n isLoaderVisible() {\n return this.getSource().isLoading();\n }\n getSourceHeight() {\n return this.verticalFormation.getSourceHeight();\n }\n isReadyToDisplay() {\n return this.entities.length > 0;\n // this.presentation.getColumns().length > 0; // TODO presentation getColumns\n }\n isVerticalScrollEnabled() {\n return this.verticalFormation.isEnabled();\n }\n}\nlet StructureReadModelRootConverter = /*#__PURE__*/(() => {\n class StructureReadModelRootConverter {\n pagingConverter;\n sourceConverter;\n verticalFormationConverter;\n constructor(pagingConverter, sourceConverter, verticalFormationConverter) {\n this.pagingConverter = pagingConverter;\n this.sourceConverter = sourceConverter;\n this.verticalFormationConverter = verticalFormationConverter;\n }\n static services = [PagingConverter, SourceConverter, VerticalFormationConverter];\n convert(aggregate) {\n const pagingAggregate = aggregate.getPaging(),\n originItemEntities = aggregate.getEntities(),\n sourceCoordinator = aggregate.getSource(),\n verticalFormation = aggregate.getVerticalFormation();\n return new StructureReadModelRoot(aggregate.getId().toReadModelRootId(), this.pagingConverter.convert(pagingAggregate), this.convertSource(originItemEntities), this.sourceConverter.convert(sourceCoordinator), this.verticalFormationConverter.convert(verticalFormation));\n }\n convertSource(source) {\n return source.map(originItem => {\n return new Item(originItem.sourceItem, originItem.getPosition(), originItem.getId().toString(), originItem.getVersion());\n });\n }\n }\n return StructureReadModelRootConverter;\n})();\nlet InMemoryStructureReadStore = /*#__PURE__*/(() => {\n class InMemoryStructureReadStore extends InMemoryReadModelStore {\n inMemoryProjectStore;\n structureConverter;\n constructor(inMemoryProjectStore, structureConverter) {\n super(inMemoryProjectStore);\n this.inMemoryProjectStore = inMemoryProjectStore;\n this.structureConverter = structureConverter;\n }\n static services = [InMemoryStructureStore, StructureReadModelRootConverter];\n toReadModel(aggregate) {\n return this.structureConverter.convert(aggregate);\n }\n }\n return InMemoryStructureReadStore;\n})();\nclass SchemaDomainEvent extends DomainEvent {}\nclass SchemaThemeSetEvent extends SchemaDomainEvent {\n theme;\n constructor(schemaId, theme) {\n super(schemaId, theme, 'SchemaThemeSetEvent');\n this.theme = theme;\n }\n getTheme() {\n return this.theme;\n }\n}\nclass UniqueFilterUnselectedEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'UniqueFilterUnselectedEvent');\n }\n}\nclass AllUniqueFilterUnselectedEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'AllUniqueFilterUnselectedEvent');\n }\n}\nclass AllUniqueFilterSelectedEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'AllUniqueFilterSelectedEvent');\n }\n}\nclass UniqueFilterSelectedEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'UniqueFilterSelectedEvent');\n }\n}\nlet VerticalFormationRepository = /*#__PURE__*/(() => {\n class VerticalFormationRepository extends Reactive {\n inMemoryStructureReadStore;\n verticalFormation = new Map();\n verticalFormation$ = new HermesReplaySubject(1);\n domainEventBus = CoreContainer.resolve(DomainEventBus);\n constructor(inMemoryStructureReadStore) {\n super();\n this.inMemoryStructureReadStore = inMemoryStructureReadStore;\n this.domainEventBus.ofEvents([StructureCreatedEvent, VerticalScrollEnabledSetEvent, OriginSetEvent, StructureHeightSetEvent, RowHeightSetEvent, SchemaThemeSetEvent, RowHeightSetBasedOnThemeEvent, ScrollPositionSetEvent, SearchPhraseSetDomainEvent, UniqueFilterUnselectedEvent, AllUniqueFilterUnselectedEvent, AllUniqueFilterSelectedEvent, UniqueFilterSelectedEvent, PageChangedEvent, PagingSetEvent, ActiveFiltersSetEvent]).pipe(this.hermesTakeUntil()).subscribe(event => {\n const aggregateId = event.getAggregateId();\n const optStructure = this.inMemoryStructureReadStore.getById(aggregateId);\n optStructure.ifPresent(structureReadModelRoot => {\n const verticalFormation = structureReadModelRoot.getVerticalFormation();\n this.next(aggregateId, verticalFormation);\n });\n });\n }\n static services = [InMemoryStructureReadStore];\n onVerticalScrollEnabled(structureId) {\n return this.onVerticalFormation(structureId).pipe(hermesMap(v => v.isEnabled()), hermesDistinctUntilChanged());\n }\n onRowHeight(structureId) {\n return this.onVerticalFormation(structureId).pipe(hermesMap(v => v.getRowHeight()), hermesDistinctUntilChanged());\n }\n onContainerHeight(structureId) {\n return this.onVerticalFormation(structureId).pipe(hermesMap(v => v.getViewPortHeight()), hermesDistinctUntilChanged());\n }\n onTopMargin(structureId) {\n return this.onVerticalFormation(structureId).pipe(hermesMap(v => v.getTopMargin()), hermesDistinctUntilChanged());\n }\n onVerticalFormation(structureId) {\n return this.verticalFormation$.toObservable().pipe(hermesFilter(idToVerticalFormation => {\n const key = structureId.getId();\n return idToVerticalFormation.has(key);\n }), hermesMap(idToVerticalFormation => idToVerticalFormation.get(structureId.getId())));\n }\n next(structureId, verticalFormation) {\n this.verticalFormation.set(structureId.toString(), verticalFormation);\n this.verticalFormation$.next(this.verticalFormation);\n }\n }\n return VerticalFormationRepository;\n})();\nlet VerticalFormationDomainWarehouse = /*#__PURE__*/(() => {\n class VerticalFormationDomainWarehouse extends VerticalFormationWarehouse {\n verticalFormationRepository;\n positionRepository;\n constructor(verticalFormationRepository, positionRepository) {\n super();\n this.verticalFormationRepository = verticalFormationRepository;\n this.positionRepository = positionRepository;\n }\n static services = [VerticalFormationRepository, VerticalFormationScrollBarPositionArchive];\n onEnabled(structureId) {\n return this.verticalFormationRepository.onVerticalScrollEnabled(structureId);\n }\n onRowHeight(structureId) {\n return this.verticalFormationRepository.onRowHeight(structureId);\n }\n onContainerHeight(structureId) {\n return this.verticalFormationRepository.onContainerHeight(structureId);\n }\n onTopMargin(structureId) {\n return this.verticalFormationRepository.onTopMargin(structureId);\n }\n onScrollBarPosition(structureId) {\n return this.positionRepository.on(structureId);\n }\n }\n return VerticalFormationDomainWarehouse;\n})();\nclass VerticalFormationPublisher {\n constructor() {}\n}\nlet VerticalFormationDomainPublisher = /*#__PURE__*/(() => {\n class VerticalFormationDomainPublisher extends VerticalFormationPublisher {\n verticalFormationDispatcher;\n constructor(verticalFormationDispatcher) {\n super();\n this.verticalFormationDispatcher = verticalFormationDispatcher;\n }\n static services = [VerticalFormationDispatcher];\n enableVirtualScroll(structureId) {\n this.verticalFormationDispatcher.setVirtualScrollEnabled(true, structureId);\n }\n disableVirtualScroll(structureId) {\n this.verticalFormationDispatcher.setVirtualScrollEnabled(false, structureId);\n }\n scrollToTop(structureId) {\n this.verticalFormationDispatcher.scrollTo(0, structureId);\n }\n scrollToBottom(structureId) {\n this.verticalFormationDispatcher.scrollTo(Number.MAX_SAFE_INTEGER, structureId);\n }\n scrollToIndex(index, structureId) {\n this.verticalFormationDispatcher.scrollTo(index, structureId);\n }\n setScrollPosition(position, structureId) {\n this.verticalFormationDispatcher.setScrollPosition(position, structureId);\n }\n }\n return VerticalFormationDomainPublisher;\n})();\nclass VerticalFormationApiModule {\n registerProviders(container) {\n container.provide(VerticalFormationConverter);\n container.provide(VerticalFormationRepository);\n container.provide(VerticalFormationWarehouse, VerticalFormationDomainWarehouse);\n container.provide(VerticalFormationPublisher, VerticalFormationDomainPublisher);\n container.provide(VerticalFormationScrollBarPositionArchive);\n }\n}\nfunction initializeVerticalFormation() {\n new DomainInitializer(new VerticalFormationApiModule(), new VerticalFormationDomainModule()).init();\n}\ninitializeVerticalFormation();\nfunction provideVerticalFormationCommandInvoker() {\n return CoreContainer.resolve(VerticalFormationPublisher);\n}\nfunction provideVerticalFormationWarehouse() {\n return CoreContainer.resolve(VerticalFormationWarehouse);\n}\nlet VerticalFormationFeatureModule = /*#__PURE__*/(() => {\n class VerticalFormationFeatureModule extends FeatureModule {\n static forComponent() {\n return [];\n }\n static ɵfac = /* @__PURE__ */(() => {\n let ɵVerticalFormationFeatureModule_BaseFactory;\n return function VerticalFormationFeatureModule_Factory(t) {\n return (ɵVerticalFormationFeatureModule_BaseFactory || (ɵVerticalFormationFeatureModule_BaseFactory = i0.ɵɵgetInheritedFactory(VerticalFormationFeatureModule)))(t || VerticalFormationFeatureModule);\n };\n })();\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: VerticalFormationFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: VerticalFormationPublisher,\n useFactory: provideVerticalFormationCommandInvoker\n }, {\n provide: VerticalFormationWarehouse,\n useFactory: provideVerticalFormationWarehouse\n }],\n imports: [CommonModule]\n });\n }\n return VerticalFormationFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass SchemaAggregateRepository extends AggregateRepository {}\nclass InMemorySchemaStore extends InMemoryStore {}\nlet InMemorySchemaAggregateStore = /*#__PURE__*/(() => {\n class InMemorySchemaAggregateStore extends InMemoryAggregateStore {\n constructor(inMemorySchemaStore) {\n super(inMemorySchemaStore);\n }\n static services = [InMemorySchemaStore];\n }\n return InMemorySchemaAggregateStore;\n})();\nlet InMemorySchemaAggregateRepository = /*#__PURE__*/(() => {\n class InMemorySchemaAggregateRepository extends SchemaAggregateRepository {\n inMemorySchemaAggregateStore;\n constructor(inMemorySchemaAggregateStore) {\n super();\n this.inMemorySchemaAggregateStore = inMemorySchemaAggregateStore;\n }\n static services = [InMemorySchemaAggregateStore];\n findById(schemaId) {\n return this.inMemorySchemaAggregateStore.findById(schemaId);\n }\n save(schemaAggregate) {\n this.inMemorySchemaAggregateStore.save(schemaAggregate);\n }\n }\n return InMemorySchemaAggregateRepository;\n})();\nclass SchemaCommand extends Command {}\nclass SetSchemaThemeCommand extends SchemaCommand {\n theme;\n constructor(schemaId, theme) {\n super(schemaId, 'SetSchemaThemeCommand');\n this.theme = theme;\n }\n getTheme() {\n return this.theme;\n }\n}\nclass SetSchemaThemeCommandHandler {\n forCommand() {\n return SetSchemaThemeCommand;\n }\n handle(schemaAggregate, command) {\n const theme = command.getTheme();\n schemaAggregate.changeTheme(theme);\n }\n}\nclass SetRowColoringCommand extends SchemaCommand {\n coloring;\n constructor(schemaId, coloring) {\n super(schemaId, 'SetRowColoringCommand');\n this.coloring = coloring;\n }\n getColoring() {\n return this.coloring;\n }\n}\nclass SetRowColoringCommandHandler {\n forCommand() {\n return SetRowColoringCommand;\n }\n handle(schemaAggregate, command) {\n const coloring = command.getColoring();\n schemaAggregate.setRowColoring(coloring);\n }\n}\nclass SetSchemaHorizontalGridCommand extends SchemaCommand {\n enabled;\n constructor(schemaId, enabled) {\n super(schemaId, 'SetSchemaHorizontalGridCommand');\n this.enabled = enabled;\n }\n isEnabled() {\n return this.enabled;\n }\n}\nclass SetSchemaHorizontalGridCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SetSchemaHorizontalGridCommand;\n }\n handle(schemaAggregate, command) {\n const enabled = command.isEnabled();\n schemaAggregate.setHorizontalGrid(enabled);\n }\n publish(schemaAggregate, command) {\n this.domainEventPublisher.publishFromAggregate(schemaAggregate);\n }\n}\nclass SetSchemaVerticalGridCommand extends SchemaCommand {\n enabled;\n constructor(schemaId, enabled) {\n super(schemaId, 'SetSchemaVerticalGridCommand');\n this.enabled = enabled;\n }\n isEnabled() {\n return this.enabled;\n }\n}\nclass SetSchemaVerticalGridCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SetSchemaVerticalGridCommand;\n }\n handle(schemaAggregate, command) {\n const enabled = command.isEnabled();\n schemaAggregate.setVerticalGrid(enabled);\n }\n publish(schemaAggregate, command) {\n this.domainEventPublisher.publishFromAggregate(schemaAggregate);\n }\n}\nclass SchemaCssClassesRepository extends AggregateArchive {\n constructor() {\n super();\n }\n}\nclass RowColoringSetEvent extends SchemaDomainEvent {\n rowColoring;\n constructor(schemaId, rowColoring) {\n super(schemaId, rowColoring, 'RowColoringSetEvent');\n this.rowColoring = rowColoring;\n }\n getRowColoring() {\n return this.rowColoring;\n }\n}\nclass SchemaHorizontalGridSetEvent extends SchemaDomainEvent {\n horizontalGrid;\n constructor(schemaId, horizontalGrid) {\n super(schemaId, horizontalGrid, 'SchemaHorizontalGridSetEvent');\n this.horizontalGrid = horizontalGrid;\n }\n getHorizontalGrid() {\n return this.horizontalGrid;\n }\n}\nclass SchemaVerticalGridSetEvent extends SchemaDomainEvent {\n verticalGrid;\n constructor(schemaId, verticalGrid) {\n super(schemaId, verticalGrid, 'SchemaVerticalGridSetEvent');\n this.verticalGrid = verticalGrid;\n }\n getVerticalGrid() {\n return this.verticalGrid;\n }\n}\nclass SchemaCssClass {\n verticalGrid;\n horizontalGrid;\n theme;\n rowColoring;\n constructor(verticalGrid, horizontalGrid, theme, rowColoring) {\n this.verticalGrid = verticalGrid;\n this.horizontalGrid = horizontalGrid;\n this.theme = theme;\n this.rowColoring = rowColoring;\n }\n getRowColoring() {\n return this.rowColoring;\n }\n}\nlet SchemaCssClassesEventHandler = /*#__PURE__*/(() => {\n class SchemaCssClassesEventHandler {\n schemaCssClassesRepository;\n rowColoring;\n horizontalGrid;\n verticalGrid;\n schemaTheme;\n constructor(schemaCssClassesRepository) {\n this.schemaCssClassesRepository = schemaCssClassesRepository;\n }\n static services = [SchemaCssClassesRepository];\n forEvents() {\n return [SchemaThemeSetEvent, RowColoringSetEvent, SchemaHorizontalGridSetEvent, SchemaVerticalGridSetEvent];\n }\n handle(event) {\n if (event.ofMessageType('RowColoringSetEvent')) {\n this.rowColoring = event.getRowColoring();\n }\n if (event.ofMessageType('SchemaHorizontalGridSetEvent')) {\n this.horizontalGrid = event.getHorizontalGrid();\n }\n if (event.ofMessageType('SchemaVerticalGridSetEvent')) {\n this.verticalGrid = event.getVerticalGrid();\n }\n if (event.ofMessageType('SchemaThemeSetEvent')) {\n this.schemaTheme = event.getTheme();\n }\n this.publish(event.getAggregateId());\n }\n publish(aggregateId) {\n if (this.rowColoring !== undefined && this.horizontalGrid !== undefined && this.verticalGrid !== undefined && this.schemaTheme !== undefined) {\n this.schemaCssClassesRepository.next(aggregateId, new SchemaCssClass(this.verticalGrid, this.horizontalGrid, this.schemaTheme, this.rowColoring));\n }\n }\n }\n return SchemaCssClassesEventHandler;\n})();\nconst schemaKey = 'SchemaAggregate';\nclass SchemaVerticalGridRepository extends EventDrivenRepository {\n constructor() {\n super();\n }\n forEvent() {\n return SchemaVerticalGridSetEvent;\n }\n}\nclass SchemaThemeRepository extends EventDrivenRepository {\n constructor() {\n super();\n }\n forEvent() {\n return SchemaThemeSetEvent;\n }\n}\nclass SchemaRowColoringRepository extends EventDrivenRepository {\n constructor() {\n super();\n }\n forEvent() {\n return RowColoringSetEvent;\n }\n}\nclass SchemaHorizontalGridRepository extends EventDrivenRepository {\n constructor() {\n super();\n }\n forEvent() {\n return SchemaHorizontalGridSetEvent;\n }\n}\nclass CreateSchemaCommand extends CreateAggregateCommand {\n constructor(schemaId) {\n super(schemaId, 'CreateSchemaCommand');\n }\n}\nclass CreateSchemaCommandHandler {\n forCommand() {\n return CreateSchemaCommand;\n }\n}\nclass SchemaAggregateEvent extends AggregateEvent {}\nclass SchemaThemeSetAggregateEvent extends SchemaAggregateEvent {\n theme;\n constructor(schemaId, theme) {\n super(schemaId, 'SchemaThemeSetAggregateEvent');\n this.theme = theme;\n }\n toDomainEvent() {\n return new SchemaThemeSetEvent(this.getAggregateId(), this.theme);\n }\n}\nclass RowColoringSetAggregateEvent extends SchemaAggregateEvent {\n rowColoring;\n constructor(schemaId, rowColoring) {\n super(schemaId, 'RowColoringSetEvent');\n this.rowColoring = rowColoring;\n }\n toDomainEvent() {\n return new RowColoringSetEvent(this.getAggregateId(), this.rowColoring);\n }\n}\nclass SchemaVerticalGridSetAggregateEvent extends SchemaAggregateEvent {\n verticalGrid;\n constructor(schemaId, verticalGrid) {\n super(schemaId, 'SchemaHorizontalGridSetEvent');\n this.verticalGrid = verticalGrid;\n }\n toDomainEvent() {\n return new SchemaVerticalGridSetEvent(this.getAggregateId(), this.verticalGrid);\n }\n}\nclass SchemaHorizontalGridSetAggregateEvent extends SchemaAggregateEvent {\n horizontalGrid;\n constructor(schemaId, horizontalGrid) {\n super(schemaId, 'SchemaHorizontalGridSetEvent');\n this.horizontalGrid = horizontalGrid;\n }\n toDomainEvent() {\n return new SchemaHorizontalGridSetEvent(this.getAggregateId(), this.horizontalGrid);\n }\n}\nclass SchemaCreatedEvent extends SchemaDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'SchemaCreatedEvent');\n }\n}\nclass SchemaCreatedAggregateEvent extends SchemaAggregateEvent {\n constructor(aggregateId) {\n super(aggregateId, 'SchemaCreatedAggregateEvent');\n }\n toDomainEvent() {\n return new SchemaCreatedEvent(this.getAggregateId());\n }\n}\nclass SchemaAggregate extends AggregateRoot {\n static DEFAULT_THEME = SchemaTheme.GENERIC;\n static DEFAULT_ROW_COLORING = SchemaRowColoring.ODD;\n static DEFAULT_VERTICAL_GRID = true;\n static DEFAULT_HORIZONTAL_GRID = true;\n horizontalGrid;\n verticalGrid;\n theme;\n rowColoring;\n constructor(id) {\n super(id, 'SchemaAggregate');\n this.setTheme(SchemaAggregate.DEFAULT_THEME);\n this.setHorizontalGrid(SchemaAggregate.DEFAULT_HORIZONTAL_GRID);\n this.setVerticalGrid(SchemaAggregate.DEFAULT_VERTICAL_GRID);\n this.setRowColoring(SchemaAggregate.DEFAULT_ROW_COLORING);\n }\n createEvent() {\n return SchemaCreatedAggregateEvent;\n }\n changeTheme(theme) {\n this.setTheme(theme);\n if (theme === SchemaTheme.MATERIAL) {\n this.setRowColoring(SchemaRowColoring.NONE);\n this.setVerticalGrid(false);\n }\n if (theme === SchemaTheme.LIGHT) {\n this.setRowColoring(SchemaRowColoring.NONE);\n this.setVerticalGrid(false);\n }\n if (theme === SchemaTheme.DARK) {\n this.setRowColoring(SchemaRowColoring.NONE);\n this.setVerticalGrid(false);\n }\n if (theme === SchemaTheme.GENERIC) {\n this.setRowColoring(SchemaRowColoring.ODD);\n }\n }\n setRowColoring(coloring) {\n this.rowColoring = coloring;\n this.addEvent(new RowColoringSetAggregateEvent(this.getId(), this.rowColoring));\n }\n setVerticalGrid(enabled) {\n this.verticalGrid = enabled;\n this.addEvent(new SchemaVerticalGridSetAggregateEvent(this.getId(), this.verticalGrid));\n }\n setHorizontalGrid(enabled) {\n this.horizontalGrid = enabled;\n this.addEvent(new SchemaHorizontalGridSetAggregateEvent(this.getId(), this.horizontalGrid));\n }\n setTheme(theme) {\n this.theme = theme;\n this.addEvent(new SchemaThemeSetAggregateEvent(this.getId(), this.theme));\n }\n}\nclass SchemaAggregateFactory extends AggregateFactory {\n constructor() {\n super();\n }\n create(aggregateId) {\n return new SchemaAggregate(aggregateId);\n }\n}\nclass SchemaRowClassArchive extends AggregateArchive {\n constructor() {\n super();\n }\n}\nclass SchemaRowStyleArchive extends AggregateArchive {\n constructor() {\n super();\n }\n}\nclass SchemaDomainModule {\n defineAggregate() {\n return {\n aggregateKey: schemaKey,\n createCommandHandler: CreateSchemaCommandHandler,\n factory: SchemaAggregateFactory,\n repository: InMemorySchemaAggregateRepository\n };\n }\n registerKey() {\n return schemaKey;\n }\n registerProviders(container) {\n container.provide(SchemaRowClassArchive);\n container.provide(SchemaRowStyleArchive);\n }\n registerCommandHandlers() {\n return [SetSchemaThemeCommandHandler, SetRowColoringCommandHandler, SetSchemaHorizontalGridCommandHandler, SetSchemaVerticalGridCommandHandler];\n }\n registerDomainEventHandler() {\n return [SchemaThemeRepository, SchemaHorizontalGridRepository, SchemaRowColoringRepository, SchemaVerticalGridRepository];\n }\n registerMultiDomainEventHandler() {\n return [SchemaCssClassesEventHandler];\n }\n}\nclass SchemaDispatcher {\n commandDispatcher = CoreContainer.resolve(CommandDispatcher);\n create(schemaId) {\n this.commandDispatcher.dispatch(new CreateSchemaCommand(schemaId));\n }\n setTheme(theme, schemaId) {\n this.commandDispatcher.dispatch(new SetSchemaThemeCommand(schemaId, theme));\n }\n setRowColoring(rowColoring, schemaId) {\n this.commandDispatcher.dispatch(new SetRowColoringCommand(schemaId, rowColoring));\n }\n setVerticalGrid(verticalGrid, schemaId) {\n this.commandDispatcher.dispatch(new SetSchemaVerticalGridCommand(schemaId, verticalGrid));\n }\n setHorizontalGrid(horizontalGrid, schemaId) {\n this.commandDispatcher.dispatch(new SetSchemaHorizontalGridCommand(schemaId, horizontalGrid));\n }\n}\nlet SchemaDomainPublisher = /*#__PURE__*/(() => {\n class SchemaDomainPublisher extends SchemaPublisher {\n schemaDispatcher;\n structurePublisher;\n fabricModalThemeService;\n schemaRowClassArchive;\n schemaRowStyleArchive;\n constructor(schemaDispatcher, structurePublisher, fabricModalThemeService, schemaRowClassArchive, schemaRowStyleArchive) {\n super();\n this.schemaDispatcher = schemaDispatcher;\n this.structurePublisher = structurePublisher;\n this.fabricModalThemeService = fabricModalThemeService;\n this.schemaRowClassArchive = schemaRowClassArchive;\n this.schemaRowStyleArchive = schemaRowStyleArchive;\n }\n static services = [SchemaDispatcher, StructurePublisher, FabricModalThemeService, SchemaRowClassArchive, SchemaRowStyleArchive];\n create(schemaId) {\n this.schemaDispatcher.create(schemaId.toAggregateId());\n }\n setTheme(theme, schemaId, structureId) {\n this.schemaDispatcher.setTheme(theme, schemaId.toAggregateId());\n this.fabricModalThemeService.changeTheme(this.toFabricTheme(theme)); // TODO github #2162\n this.structurePublisher.setRowHeightBasedOnTheme(theme, structureId);\n }\n setRowColoring(rowColoring, schemaId) {\n const schemaRowColoring = this.toSchemaRowColoring(rowColoring);\n this.schemaDispatcher.setRowColoring(schemaRowColoring, schemaId.toAggregateId());\n }\n setVerticalGrid(verticalGrid, schemaId) {\n this.schemaDispatcher.setVerticalGrid(verticalGrid, schemaId.toAggregateId());\n }\n setHorizontalGrid(horizontalGrid, schemaId) {\n this.schemaDispatcher.setHorizontalGrid(horizontalGrid, schemaId.toAggregateId());\n }\n setRowClass(schemaRowClass, schemaId) {\n return this.schemaRowClassArchive.next(schemaId.toAggregateId(), schemaRowClass);\n }\n setRowStyle(rowStyle, schemaId) {\n return this.schemaRowStyleArchive.next(schemaId.toAggregateId(), rowStyle);\n }\n // move to function\n toSchemaRowColoring(coloring) {\n switch (coloring) {\n case RowColoring.NONE:\n return SchemaRowColoring.NONE;\n case RowColoring.ODD:\n return SchemaRowColoring.ODD;\n case RowColoring.EVEN:\n return SchemaRowColoring.EVEN;\n default:\n return SchemaRowColoring.NONE;\n }\n }\n // move to function\n toFabricTheme(schemaTheme) {\n switch (schemaTheme) {\n case SchemaTheme.DARK:\n {\n return Theme.DARK;\n }\n case SchemaTheme.FABRIC:\n {\n return Theme.FABRIC;\n }\n case SchemaTheme.GENERIC:\n {\n return Theme.GENERIC;\n }\n case SchemaTheme.LIGHT:\n {\n return Theme.LIGHT;\n }\n case SchemaTheme.MATERIAL:\n {\n return Theme.MATERIAL;\n }\n default:\n return Theme.FABRIC;\n }\n }\n }\n return SchemaDomainPublisher;\n})();\nlet SchemaDomainWarehouse = /*#__PURE__*/(() => {\n class SchemaDomainWarehouse extends SchemaWarehouse {\n schemaCssClassesRepository;\n schemaThemeRepository;\n schemaHorizontalGridRepository;\n schemaRowColoringRepository;\n schemaVerticalGridRepository;\n schemaRowClassArchive;\n schemaRowStyleArchive;\n constructor(schemaCssClassesRepository, schemaThemeRepository, schemaHorizontalGridRepository, schemaRowColoringRepository, schemaVerticalGridRepository, schemaRowClassArchive, schemaRowStyleArchive) {\n super();\n this.schemaCssClassesRepository = schemaCssClassesRepository;\n this.schemaThemeRepository = schemaThemeRepository;\n this.schemaHorizontalGridRepository = schemaHorizontalGridRepository;\n this.schemaRowColoringRepository = schemaRowColoringRepository;\n this.schemaVerticalGridRepository = schemaVerticalGridRepository;\n this.schemaRowClassArchive = schemaRowClassArchive;\n this.schemaRowStyleArchive = schemaRowStyleArchive;\n }\n static services = [SchemaCssClassesRepository, SchemaThemeRepository, SchemaHorizontalGridRepository, SchemaRowColoringRepository, SchemaVerticalGridRepository, SchemaRowClassArchive, SchemaRowStyleArchive];\n onTheme(schemaId) {\n return this.schemaThemeRepository.on(schemaId.toAggregateId());\n }\n onceTheme(schemaId) {\n return singleFromObservable(this.onTheme(schemaId));\n }\n findTheme(schemaId) {\n return this.schemaThemeRepository.find(schemaId.toAggregateId());\n }\n onHorizontalGrid(schemaId) {\n return this.schemaHorizontalGridRepository.on(schemaId.toAggregateId());\n }\n onVerticalGrid(schemaId) {\n return this.schemaVerticalGridRepository.on(schemaId.toAggregateId());\n }\n onRowColoring(schemaId) {\n return this.schemaRowColoringRepository.on(schemaId.toAggregateId());\n }\n onCssClasses(schemaId) {\n return this.schemaCssClassesRepository.on(schemaId.toAggregateId());\n }\n onRowClass(schemaId) {\n return this.schemaRowClassArchive.on(schemaId.toAggregateId());\n }\n onRowStyle(schemaId) {\n return this.schemaRowStyleArchive.on(schemaId.toAggregateId());\n }\n }\n return SchemaDomainWarehouse;\n})();\nclass SchemaDomainEventRepository extends SchemaEventRepository {\n constructor() {\n super();\n }\n onThemeChanged(schemaId) {\n return this.onEvent(schemaId, SchemaThemeSetEvent).pipe(hermesMap(event => {\n return event.getTheme();\n }));\n }\n onHorizontalGridChanged(schemaId) {\n return this.onEvent(schemaId, SchemaHorizontalGridSetEvent).pipe(hermesMap(event => event.getHorizontalGrid()));\n }\n onVerticalGridChanged(schemaId) {\n return this.onEvent(schemaId, SchemaVerticalGridSetEvent).pipe(hermesMap(event => event.getVerticalGrid()));\n }\n onRowColoring(schemaId) {\n return this.onEvent(schemaId, RowColoringSetEvent).pipe(hermesMap(event => event.getRowColoring()));\n }\n}\nclass SchemaApiModule {\n registerProviders(container) {\n container.provide(SchemaDispatcher);\n container.provide(SchemaAggregateRepository, InMemorySchemaAggregateRepository);\n container.provide(InMemorySchemaAggregateStore);\n container.provide(InMemorySchemaStore);\n container.provide(SchemaPublisher, SchemaDomainPublisher);\n container.provide(SchemaWarehouse, SchemaDomainWarehouse);\n container.provide(SchemaEventRepository, SchemaDomainEventRepository);\n container.provide(SchemaCssClassesRepository);\n }\n}\nconst initSchema = () => {\n new DomainInitializer(new SchemaApiModule(), new SchemaDomainModule()).init();\n};\nfunction useFactorySchemaCommandInvoker() {\n return CoreContainer.resolve(SchemaPublisher);\n}\nfunction useFactorySchemaWarehouse() {\n return CoreContainer.resolve(SchemaWarehouse);\n}\nfunction useFactorySchemaEventRepository() {\n return CoreContainer.resolve(SchemaEventRepository);\n}\ninitSchema();\nlet SchemaFeatureModule = /*#__PURE__*/(() => {\n class SchemaFeatureModule extends FeatureModule {\n constructor() {\n super();\n }\n static forComponent() {\n return [];\n }\n static ɵfac = function SchemaFeatureModule_Factory(t) {\n return new (t || SchemaFeatureModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: SchemaFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: SchemaPublisher,\n useFactory: useFactorySchemaCommandInvoker\n }, {\n provide: SchemaWarehouse,\n useFactory: useFactorySchemaWarehouse\n }, {\n provide: SchemaEventRepository,\n useFactory: useFactorySchemaEventRepository\n }],\n imports: [CommonModule]\n });\n }\n return SchemaFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SanitizeModule = /*#__PURE__*/(() => {\n class SanitizeModule {\n static ɵfac = function SanitizeModule_Factory(t) {\n return new (t || SanitizeModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: SanitizeModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule]\n });\n }\n return SanitizeModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ColumnQueryComponent = /*#__PURE__*/(() => {\n class ColumnQueryComponent {\n cellTemplate;\n header;\n headerTemplate;\n static ɵfac = function ColumnQueryComponent_Factory(t) {\n return new (t || ColumnQueryComponent)();\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ColumnQueryComponent,\n selectors: [[\"gui-column\", \"header\", \"\"]],\n contentQueries: function ColumnQueryComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, TemplateRef, 5, TemplateRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.cellTemplate = _t.first);\n }\n },\n inputs: {\n header: \"header\"\n },\n attrs: _c92,\n decls: 0,\n vars: 0,\n template: function ColumnQueryComponent_Template(rf, ctx) {},\n encapsulation: 2\n });\n }\n return ColumnQueryComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst components = [ViewTemplatesComponent, EditTemplatesComponent, StringEditTemplateComponent, NumberEditTemplateComponent, BooleanEditTemplateComponent, DateEditTemplateComponent, ColumnQueryComponent, FunctionViewComponent, BarViewComponent, PercentageViewComponent, TextViewComponent, HtmlViewComponent];\nconst exportDeclarations$2 = [ViewTemplatesComponent, EditTemplatesComponent, ColumnQueryComponent, FabricChipModule, FabricCheckboxModule, FabricButtonModule, FabricInputModule, FunctionViewComponent, BarViewComponent, PercentageViewComponent, HtmlViewComponent];\ninitializeComposition();\nfunction provideCompositionCommandPublisher() {\n return CoreContainer.resolve(CompositionPublisher);\n}\nfunction provideCompositionWarehouse() {\n return CoreContainer.resolve(CompositionWarehouse);\n}\nfunction provideCompositionEventRepository() {\n return CoreContainer.resolve(CompositionEventRepository);\n}\nfunction provideColumnAutoConfigurator() {\n return CoreContainer.resolve(ColumnAutoConfigurator);\n}\nfunction provideColumnFieldFactory() {\n return CoreContainer.resolve(ColumnFieldFactory);\n}\nlet CompositionFeatureModule = /*#__PURE__*/(() => {\n class CompositionFeatureModule extends FeatureModule {\n constructor(cfr) {\n super();\n CoreContainer.provideValue(ComponentFactoryResolver, cfr);\n }\n static forComponent() {\n return [];\n }\n static ɵfac = function CompositionFeatureModule_Factory(t) {\n return new (t || CompositionFeatureModule)(i0.ɵɵinject(i0.ComponentFactoryResolver));\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: CompositionFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: CompositionPublisher,\n useFactory: provideCompositionCommandPublisher\n }, {\n provide: CompositionWarehouse,\n useFactory: provideCompositionWarehouse\n }, {\n provide: CompositionEventRepository,\n useFactory: provideCompositionEventRepository\n }, CompositionTemplateWarehouse, ViewTemplateRepository, ViewTemplateFactory, EditTemplateRepository, EditTemplateFactory, {\n provide: ColumnAutoConfigurator,\n useFactory: provideColumnAutoConfigurator\n }, {\n provide: ColumnFieldFactory,\n useFactory: provideColumnFieldFactory\n }],\n imports: [CommonModule, ReactiveFormsModule, SanitizeModule, FabricChipModule, FabricCheckboxModule, FabricButtonModule, FabricInputModule, FabricDatePickerModule, FabricChipModule, FabricCheckboxModule, FabricButtonModule, FabricInputModule]\n });\n }\n return CompositionFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst structureGates = [StructureColumnHeaderGate, StructurePagingGate, StructureSearchingGate,\n// StructureSourceGate,\nStructureSelectionGate, StructureL10nGate, StructurePanelGate, StructureRowDetailGate, StructureColumnMenuGate, StructureSummariesGate, StructureInfoPanelGate, StructureRowClassGate, StructureRowStyleGate, StructureRowColoringGate, ThemeGridGate, StructureSortingGate, SourceLoadingGate, StructureFilterGate, StructureQuickFiltersGate, VerticalFormationGate];\nclass SetSourceLoadingEvent extends StructureDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'SetSourceLoadingEvent');\n }\n}\nclass SourceSetLoadingCommand extends StructureCommand {\n enabled;\n constructor(structureId, enabled) {\n super(structureId, 'SourceSetLoadingCommand');\n this.enabled = enabled;\n }\n isEnabled() {\n return this.enabled;\n }\n}\nclass SourceSetLoadingCommandHandler {\n domainEventPublisher = CoreContainer.resolve(DomainEventPublisher);\n forCommand() {\n return SourceSetLoadingCommand;\n }\n handle(aggregate, command) {\n const enabled = command.isEnabled(),\n source = aggregate.getSource();\n source.setLoading(enabled);\n }\n publish(aggregate, command) {\n this.domainEventPublisher.publish(new SetSourceLoadingEvent(command.getAggregateId()));\n }\n}\nclass SetOriginCommand extends StructureCommand {\n items;\n constructor(structureId, items = []) {\n super(structureId, 'SetOriginCommand');\n this.items = items;\n }\n getItems() {\n return this.items;\n }\n}\nlet SetOriginCommandHandler = /*#__PURE__*/(() => {\n class SetOriginCommandHandler {\n structureSourceDomainEventPublisher;\n constructor(structureSourceDomainEventPublisher) {\n this.structureSourceDomainEventPublisher = structureSourceDomainEventPublisher;\n }\n static services = [SourceDomainEventPublisher];\n forCommand() {\n return SetOriginCommand;\n }\n handle(structure, command) {\n const items = command.getItems();\n structure.setOrigin(items);\n }\n publish(aggregate, command) {\n const aggregateEvents = aggregate.getEvents();\n this.structureSourceDomainEventPublisher.publish(aggregateEvents);\n }\n }\n return SetOriginCommandHandler;\n})();\nclass StructureEditSourceItemCommand extends StructureCommand {\n params;\n constructor(structureId, params) {\n super(structureId, 'StructureEditSourceItemCommand');\n this.params = params;\n }\n getParams() {\n return this.params;\n }\n}\nlet StructureEditSourceItemCommandHandler = /*#__PURE__*/(() => {\n class StructureEditSourceItemCommandHandler {\n structureSourceDomainEventPublisher;\n constructor(structureSourceDomainEventPublisher) {\n this.structureSourceDomainEventPublisher = structureSourceDomainEventPublisher;\n }\n static services = [SourceDomainEventPublisher];\n forCommand() {\n return StructureEditSourceItemCommand;\n }\n handle(structure, command) {\n const params = command.getParams();\n structure.editItem(params);\n }\n publish(aggregate, command) {\n const aggregateEvents = aggregate.getEvents();\n this.structureSourceDomainEventPublisher.publish(aggregateEvents);\n }\n }\n return StructureEditSourceItemCommandHandler;\n})();\nclass StructureSourceItemEditedAggregateEvent extends StructureAggregateEvent {\n beforeItem;\n afterItem;\n constructor(aggregateId, beforeItem, afterItem) {\n super(aggregateId, 'StructureSourceItemEditedAggregateEvent');\n this.beforeItem = beforeItem;\n this.afterItem = afterItem;\n }\n toDomainEvent() {\n return new StructureSourceItemEditedEvent(this.getAggregateId(), this.beforeItem, this.afterItem);\n }\n getBeforeItem() {\n return this.beforeItem;\n }\n getAfterItem() {\n return this.afterItem;\n }\n}\nclass StructureOriginChangedAggregateEvent extends StructureAggregateEvent {\n origin;\n constructor(aggregateId, origin) {\n super(aggregateId, 'StructureOriginChangedAggregateEvent');\n this.origin = origin;\n }\n toDomainEvent() {\n return new OriginSetEvent(this.getAggregateId(), this.origin);\n }\n getOrigin() {\n return this.origin;\n }\n}\nclass ItemEntityId extends EntityId {\n constructor(id) {\n super(id);\n }\n toString() {\n return this.getId();\n }\n}\nclass SourceManager {\n events = [];\n loading = false;\n fetched = false;\n origin;\n entities = [];\n // Entities after filtering, searching\n preparedEntities = [];\n slicedEntities = [];\n formationManager;\n constructor(formationManager) {\n this.formationManager = formationManager;\n this.events.push(...this.formationManager.init(true, RowSelectionMode.SINGLE, RowSelectionType.ROW));\n }\n isLoading() {\n return this.loading;\n }\n setLoading(enabled) {\n this.loading = enabled;\n }\n setEntities(ent) {\n this.entities = ent;\n this.recalculatePositions();\n }\n getEntities() {\n return this.entities;\n }\n setPreparedEntities() {\n this.preparedEntities = Array.from(this.entities);\n }\n getPreparedEntities() {\n return this.preparedEntities;\n }\n setSlicedEntities(ent) {\n this.slicedEntities = ent;\n }\n getSlicedEntities() {\n return this.slicedEntities;\n }\n setOrigin(items = [], structureId) {\n this.origin = this.convertItems(items);\n return this.createOriginChangedEvent(structureId);\n }\n setConvertedOrigin(items = [], structureId) {\n this.origin = Array.from(items);\n return this.createOriginChangedEvent(structureId);\n }\n getOrigin() {\n return this.origin;\n }\n editOriginItem(itemId, value, field, structureId) {\n const item = this.findOriginItem(itemId),\n itemBeforeChange = item.clone();\n if (item) {\n item.sourceItem[field.getAccessor()] = value;\n item.bumpVersion();\n }\n return [new StructureSourceItemEditedAggregateEvent(structureId, itemBeforeChange, item.clone()), this.createOriginChangedEvent(structureId)];\n }\n deleteAllSelected(structureId) {\n let events = [];\n const itemEntityIds = this.formationManager.getSelectedItemIds();\n itemEntityIds.forEach(itemEntityId => {\n events = events.concat(this.deleteOriginItemByItemId(itemEntityId, structureId));\n });\n return events;\n }\n deleteOriginItem(payload, structureId) {\n if (payload instanceof ItemEntityId) {\n return this.deleteOriginItemByItemId(payload, structureId);\n } else if (Array.isArray(payload)) {\n let events = [];\n payload.forEach(item => {\n events = events.concat(this.deleteOneOriginItem(item, structureId));\n });\n return events;\n } else if (Number.isInteger(payload)) {\n return this.deleteOriginItemByIndex(payload, structureId);\n } else {\n return [];\n }\n }\n addOriginItem(item, structureId) {\n this.origin.push(item);\n return [this.createOriginChangedEvent(structureId)];\n }\n setCustomConfig(config) {\n return this.formationManager.setCustomConfig(config);\n }\n selectCustom(id) {\n this.formationManager.selectCustom(id, this.getEntities());\n }\n selectAll() {\n this.formationManager.selectAll(this.getEntities().map(entity => entity.getId()));\n }\n unselectAll() {\n this.formationManager.unselectAll();\n }\n selectByIndex(indexes) {\n this.formationManager.selectByIndex(indexes, this.getEntities().map(e => e.getId()));\n }\n selectByIds(ids) {\n this.formationManager.selectByIds(ids, this.getEntities());\n }\n reSelect() {\n this.formationManager.reSelectByIds(this.getEntities());\n }\n setSelectedRows(selectedRows) {\n this.formationManager.selectRows(selectedRows, this.getEntities().map(e => e.getId()));\n }\n toggleRow(itemId, type) {\n this.formationManager.toggleRow(itemId, type, this.getEntities().map(e => e.getId()));\n }\n getFormation() {\n return this.formationManager;\n }\n convertItems(items) {\n return items.map((item, index) => {\n return new ItemEntity(new ItemEntityId(RandomStringGenerator.generate()), item, index);\n });\n }\n createOriginChangedEvent(structureId) {\n return new StructureOriginChangedAggregateEvent(structureId, this.origin);\n }\n findOriginItem(itemId) {\n return this.origin.find(item => item.getId().toString() === itemId);\n }\n findOriginItemIndex(itemId) {\n return this.origin.findIndex(item => item.getId().toString() === itemId);\n }\n recalculatePositions() {\n this.entities.forEach((ent, index) => {\n ent.setPosition(index);\n });\n }\n deleteOneOriginItem(item, structureId) {\n if (item instanceof ItemEntityId) {\n return this.deleteOriginItemByItemId(item, structureId);\n } else if (Number.isInteger(item)) {\n return this.deleteOriginItemByIndex(item, structureId);\n } else {\n return [];\n }\n }\n deleteOriginItemByItemId(itemId, structureId) {\n const index = this.findOriginItemIndex(itemId.toString());\n return this.deleteOriginItemByIndex(index, structureId);\n }\n deleteOriginItemByIndex(index, structureId) {\n if (index > -1) {\n const removedItems = this.origin.splice(index, 1);\n if (removedItems.length > 0) {\n for (const element of removedItems) {\n this.formationManager.unselectRow(element.getId());\n }\n this.formationManager.calculateAllSelected(removedItems.map(f => f.getId()));\n this.formationManager.calculateAllUnselected();\n }\n return [this.createOriginChangedEvent(structureId)];\n }\n return [];\n }\n deleteManyOriginItemByIndex(indexes, structureId) {\n let events = [];\n indexes.forEach(index => {\n events = events.concat(this.deleteOriginItemByIndex(index, structureId));\n });\n return events;\n }\n deleteManyOriginItemByItemID(itemIds, structureId) {\n let events = [];\n itemIds.forEach(itemId => {\n events = events.concat(this.deleteOriginItemByItemId(itemId, structureId));\n });\n return events;\n }\n}\nclass FormationSelection {\n mode;\n type;\n constructor(mode, type) {\n this.mode = mode;\n this.type = type;\n }\n setMode(mode) {\n this.mode = mode;\n }\n getMode() {\n if (this.type === RowSelectionType.RADIO) {\n return RowSelectionMode.SINGLE;\n } else {\n return this.mode;\n }\n }\n isSingle() {\n return this.getMode() === RowSelectionMode.SINGLE;\n }\n setType(type) {\n this.type = type;\n }\n getType() {\n return this.type;\n }\n}\nclass SelectionModeSetEvent extends StructureDomainEvent {\n mode;\n constructor(aggregateId, mode) {\n super(aggregateId, mode, 'SelectionModeSetEvent');\n this.mode = mode;\n }\n getMode() {\n return this.mode;\n }\n}\nclass SelectionModeSetAggregateEvent extends StructureAggregateEvent {\n mode;\n constructor(structureId, mode) {\n super(structureId, 'SelectionModeSetAggregateEvent');\n this.mode = mode;\n }\n toDomainEvent() {\n return new SelectionModeSetEvent(this.getAggregateId(), this.mode);\n }\n}\nclass SelectionTypeSetEvent extends StructureDomainEvent {\n selectionType;\n constructor(aggregateId, selectionType) {\n super(aggregateId, selectionType, 'SelectionTypeSetEvent');\n this.selectionType = selectionType;\n }\n getType() {\n return this.selectionType;\n }\n}\nclass SelectionTypeSetAggregateEvent extends StructureAggregateEvent {\n selectionType;\n constructor(structureId, selectionType) {\n super(structureId, 'SelectionTypeSetAggregateEvent');\n this.selectionType = selectionType;\n }\n toDomainEvent() {\n return new SelectionTypeSetEvent(this.getAggregateId(), this.selectionType);\n }\n}\nclass SelectionEnabledSetEvent extends StructureDomainEvent {\n enabled;\n constructor(aggregateId, enabled) {\n super(aggregateId, enabled, 'SelectionEnabledSetEvent');\n this.enabled = enabled;\n }\n isEnabled() {\n return this.enabled;\n }\n}\nclass SelectionEnabledSetAggregateEvent extends StructureAggregateEvent {\n enabled;\n constructor(structureId, enabled) {\n super(structureId, 'SelectionEnabledSetAggregateEvent');\n this.enabled = enabled;\n }\n toDomainEvent() {\n return new SelectionEnabledSetEvent(this.getAggregateId(), this.enabled);\n }\n}\nclass FormationCustomSelectId extends HermesId {\n constructor(uid) {\n super(uid);\n }\n toString() {\n return super.getId();\n }\n}\nclass FormationCustomSelectionFunctionModel {\n key;\n text;\n customSelectId;\n builtIn;\n method;\n constructor(key, text, customSelectId, builtIn, method) {\n this.key = key;\n this.text = text;\n this.customSelectId = customSelectId;\n this.builtIn = builtIn;\n this.method = method;\n }\n getKey() {\n return this.key;\n }\n getText() {\n return this.text;\n }\n getCustomSelectId() {\n return this.customSelectId;\n }\n isBuiltIn() {\n return this.builtIn;\n }\n customSelect(items) {\n return this.method(items);\n }\n}\nclass FormationCustomSelection {\n enabled;\n selections;\n constructor(enabled, selections) {\n this.enabled = enabled;\n this.selections = selections;\n }\n isEnabled() {\n return this.enabled;\n }\n getSelections() {\n return this.selections;\n }\n}\nlet FormationCustomManager = /*#__PURE__*/(() => {\n class FormationCustomManager {\n enabled;\n selections;\n static id = 0;\n constructor(enabled, selections) {\n this.enabled = enabled;\n this.selections = selections;\n }\n init() {\n return [];\n }\n isEnabled() {\n return this.enabled;\n }\n setEnabled(enabled) {\n this.enabled = enabled;\n }\n getSelections() {\n return this.selections;\n }\n setSelections(selections) {\n this.selections = selections.map(sel => {\n if (typeof sel === 'string') {\n return new FormationCustomSelectionFunctionModel('', sel, new FormationCustomSelectId(sel), true);\n } else {\n FormationCustomManager.id++;\n return new FormationCustomSelectionFunctionModel(sel.key, sel.text, new FormationCustomSelectId(`${FormationCustomManager.id}`), false, sel.select);\n }\n });\n }\n findSelection(id) {\n return Optional.of(this.selections.find(s => s.getCustomSelectId().equals(id)));\n }\n }\n return FormationCustomManager;\n})();\nclass FormationCustomSelectionChangeEvent extends StructureDomainEvent {\n customSelection;\n constructor(aggregateId, customSelection) {\n super(aggregateId, customSelection, 'FormationCustomSelectionChangeEvent');\n this.customSelection = customSelection;\n }\n getCustomSelection() {\n return this.customSelection;\n }\n}\nclass FormationCustomSelectionChangeAggregateEvent extends StructureAggregateEvent {\n customSelection;\n constructor(structureId, customSelection) {\n super(structureId, 'FormationCustomSelectionChangeAggregateEvent');\n this.customSelection = customSelection;\n }\n toDomainEvent() {\n return new FormationCustomSelectionChangeEvent(this.getAggregateId(), this.customSelection);\n }\n}\nclass FormationManager {\n id;\n selectedItemIds;\n enabled;\n selection = new FormationSelection(RowSelectionMode.SINGLE, RowSelectionType.ROW);\n allSelected;\n allUnselected;\n customSelection;\n matcher = item => item.id;\n constructor(id, selectedItemIds) {\n this.id = id;\n this.selectedItemIds = selectedItemIds;\n }\n init(enabled, mode, type) {\n this.enabled = enabled;\n this.selection.setMode(mode);\n this.selection.setType(type);\n this.customSelection = new FormationCustomManager(false, [new FormationCustomSelectionFunctionModel('select_all', 'SELECT_ALL', new FormationCustomSelectId('SELECT_ALL'), true), new FormationCustomSelectionFunctionModel('UNSELECT_ALL', 'UNSELECT_ALL', new FormationCustomSelectId('UNSELECT_ALL'), true), new FormationCustomSelectionFunctionModel('', 'INVERT', new FormationCustomSelectId('INVERT'), true)]);\n return [new SelectionEnabledSetAggregateEvent(this.getId(), this.enabled), new SelectionModeSetAggregateEvent(this.getId(), this.selection.getMode()), new SelectionTypeSetAggregateEvent(this.getId(), this.selection.getType()), new FormationCustomSelectionChangeAggregateEvent(this.getId(), new FormationCustomSelection(this.customSelection.isEnabled(), this.customSelection.getSelections()))];\n }\n setSelection(enabled) {\n this.enabled = enabled;\n return [new SelectionEnabledSetAggregateEvent(this.getId(), this.enabled)];\n }\n setMode(mode) {\n this.selection.setMode(mode);\n return [new SelectionModeSetAggregateEvent(this.getId(), this.selection.getMode()), new SelectionTypeSetAggregateEvent(this.getId(), this.selection.getType())];\n }\n setType(type) {\n this.selection.setType(type);\n return [new SelectionModeSetAggregateEvent(this.getId(), this.selection.getMode()), new SelectionTypeSetAggregateEvent(this.getId(), this.selection.getType())];\n }\n setMatcher(matcher) {\n this.matcher = matcher;\n }\n setCustomConfig(config) {\n if (config?.enabled) {\n this.customSelection.setEnabled(config.enabled);\n }\n if (config?.selections) {\n this.customSelection.setSelections(config.selections);\n }\n return [new FormationCustomSelectionChangeAggregateEvent(this.getId(), new FormationCustomSelection(this.customSelection.isEnabled(), this.customSelection.getSelections()))];\n }\n isAllSelected() {\n return this.allSelected;\n }\n isAllUnselected() {\n return this.allUnselected;\n }\n getSelectedItemIds() {\n return Array.from(this.selectedItemIds).map(id => new ItemEntityId(id));\n }\n selectCustom(id, itemEntities) {\n this.customSelection.findSelection(id).ifPresent(s => {\n if (s.isBuiltIn()) {\n switch (s.getCustomSelectId().toString()) {\n case 'SELECT_ALL':\n this.selectAll(itemEntities.map(i => i.getId()));\n break;\n case 'UNSELECT_ALL':\n this.unselectAll();\n break;\n case 'INVERT':\n this.invertSelected(itemEntities.map(i => i.getId()));\n break;\n default:\n break;\n }\n } else {\n const selectedItems = s.customSelect(itemEntities);\n this.selectedItemIds = new Set(selectedItems.map(item => item.getId().toString()));\n }\n });\n }\n selectAll(allEntityIds) {\n this.selectedItemIds = new Set(allEntityIds.map(id => id.toString()));\n this.allSelected = true;\n this.allUnselected = false;\n }\n unselectAll() {\n this.selectedItemIds.clear();\n this.allSelected = false;\n this.allUnselected = true;\n }\n invertSelected(allEntityIds) {\n const selectedItemIds = this.getSelectedItemIds();\n const a = allEntityIds.filter(id => {\n return !selectedItemIds.some(selId => selId.equals(id));\n });\n this.selectedItemIds = new Set(a.map(id => id.toString()));\n this.calculateAllSelected(allEntityIds);\n this.calculateAllUnselected();\n }\n reSelectByIds(itemEntities) {\n this.selectByIds(this.getSelectedItemIds().map(i => i.getId()), itemEntities);\n this.calculateAllSelected(itemEntities.map(i => i.getId()));\n this.calculateAllUnselected();\n }\n selectByIds(ids, itemEntities) {\n if (!this.enabled) {\n return;\n }\n const itemIds = [];\n for (let i = 0; i < ids.length; i++) {\n const items = itemEntities.filter(item => {\n return this.matcher(item.getSourceItem()) === ids[i];\n }).map(item => item.getId().toString());\n itemIds.push(...items);\n }\n let type = RowSelectToggleType.ADD;\n if (this.selection.isSingle()) {\n type = RowSelectToggleType.NONE;\n }\n itemIds.forEach(id => {\n this.toggleRowByType(type, id);\n });\n this.calculateAllSelected(itemEntities.map(i => i.getId()));\n this.calculateAllUnselected();\n }\n selectByIndex(indexes, allEntityIds) {\n if (!this.enabled) {\n return;\n }\n const itemIds = indexes.map(i => {\n if (!allEntityIds[i]) {\n console.error('Item not found');\n }\n return allEntityIds[i].toString();\n });\n let type = RowSelectToggleType.ADD;\n if (this.selection.isSingle()) {\n type = RowSelectToggleType.NONE;\n }\n itemIds.forEach(id => {\n this.toggleRowByType(type, id);\n });\n this.calculateAllSelected(allEntityIds);\n this.calculateAllUnselected();\n }\n selectRows(itemIds, itemEntityIds) {}\n toggleRow(itemId, type, itemEntityIds) {\n if (!this.enabled) {\n return;\n }\n if (type === RowSelectToggleType.ADD && this.selection.isSingle()) {\n type = RowSelectToggleType.NONE;\n }\n this.toggleRowByType(type, itemId);\n this.calculateAllSelected(itemEntityIds);\n this.calculateAllUnselected();\n }\n calculateAllSelected(itemEntityIds) {\n if (itemEntityIds.length !== this.selectedItemIds.size) {\n this.allSelected = false;\n } else {\n const rows = Array.from(this.selectedItemIds);\n let equal = true;\n rows.sort();\n itemEntityIds.sort();\n for (let i = 0; i < rows.length; i += 1) {\n if (rows[i] !== itemEntityIds[i].toString()) {\n equal = false;\n break;\n }\n }\n this.allSelected = equal;\n }\n }\n calculateAllUnselected() {\n this.allUnselected = this.selectedItemIds.size === 0;\n }\n unselectRow(itemEntityId) {\n if (this.selectedItemIds.has(itemEntityId.toString())) {\n this.selectedItemIds.delete(itemEntityId.toString());\n }\n }\n getId() {\n return this.id;\n }\n getType() {\n return this.selection.getType();\n }\n toggleRowByType(type, itemId) {\n switch (type) {\n case RowSelectToggleType.NONE:\n if (this.selectedItemIds.has(itemId)) {\n this.selectedItemIds.delete(itemId);\n } else {\n this.selectedItemIds.clear();\n this.selectedItemIds.add(itemId);\n }\n break;\n case RowSelectToggleType.ADD:\n if (this.selectedItemIds.has(itemId)) {\n this.selectedItemIds.delete(itemId);\n } else {\n this.selectedItemIds.add(itemId);\n }\n break;\n case RowSelectToggleType.RANGE:\n break;\n default:\n break;\n }\n }\n}\nclass FormationManagerFactory {\n create(id) {\n return new FormationManager(id, new Set());\n }\n}\nlet SourceManagerFactory = /*#__PURE__*/(() => {\n class SourceManagerFactory {\n formationManagerFactory;\n constructor(formationManagerFactory) {\n this.formationManagerFactory = formationManagerFactory;\n }\n static services = [FormationManagerFactory];\n createDefault(id) {\n const fm = this.formationManagerFactory.create(id);\n return new SourceManager(fm);\n }\n create(id) {\n const fm = this.formationManagerFactory.create(id);\n return new SourceManager(fm);\n }\n }\n return SourceManagerFactory;\n})();\nvar DeleteCommandPayloadType = /*#__PURE__*/function (DeleteCommandPayloadType) {\n DeleteCommandPayloadType[DeleteCommandPayloadType[\"INDEX\"] = 0] = \"INDEX\";\n DeleteCommandPayloadType[DeleteCommandPayloadType[\"ITEM_ID\"] = 1] = \"ITEM_ID\";\n DeleteCommandPayloadType[DeleteCommandPayloadType[\"MANY_INDEX\"] = 2] = \"MANY_INDEX\";\n DeleteCommandPayloadType[DeleteCommandPayloadType[\"MANY_ITEM_ID\"] = 3] = \"MANY_ITEM_ID\";\n return DeleteCommandPayloadType;\n}(DeleteCommandPayloadType || {});\nclass DeleteOriginItemCommand extends StructureCommand {\n payload;\n type;\n constructor(structureId, payload, type) {\n super(structureId, 'DeleteOriginItemCommand');\n this.payload = payload;\n this.type = type;\n }\n static byIndex(structureId, index) {\n return new DeleteOriginItemCommand(structureId, index, DeleteCommandPayloadType.INDEX);\n }\n static byManyIndex(structureId, indexes) {\n return new DeleteOriginItemCommand(structureId, indexes, DeleteCommandPayloadType.MANY_INDEX);\n }\n static byItemId(structureId, itemId) {\n return new DeleteOriginItemCommand(structureId, itemId, DeleteCommandPayloadType.ITEM_ID);\n }\n static byManyItemId(structureId, itemIds) {\n return new DeleteOriginItemCommand(structureId, itemIds, DeleteCommandPayloadType.MANY_ITEM_ID);\n }\n getType() {\n return this.type;\n }\n getPayload() {\n return this.payload;\n }\n}\nclass DeleteOriginItemCommandHandler {\n forCommand() {\n return DeleteOriginItemCommand;\n }\n handle(aggregate, command) {\n aggregate.deleteItem(command.getPayload());\n }\n}\nlet StructureSourceOriginArchive = /*#__PURE__*/(() => {\n class StructureSourceOriginArchive extends AggregateArchive {\n static default = [];\n constructor() {\n super(StructureSourceOriginArchive.default);\n }\n }\n return StructureSourceOriginArchive;\n})();\nlet StructureOriginChangedEventHandler = /*#__PURE__*/(() => {\n class StructureOriginChangedEventHandler {\n structureSourceOriginRepository;\n constructor(structureSourceOriginRepository) {\n this.structureSourceOriginRepository = structureSourceOriginRepository;\n }\n static services = [StructureSourceOriginArchive];\n forEvent() {\n return OriginSetEvent;\n }\n handle(event) {\n if (event.ofMessageType('OriginSetEvent')) {\n const origin = event.getOrigin();\n this.structureSourceOriginRepository.next(event.getAggregateId(), origin);\n }\n }\n }\n return StructureOriginChangedEventHandler;\n})();\nlet StructurePreparedItemsArchive = /*#__PURE__*/(() => {\n class StructurePreparedItemsArchive extends AggregateArchive {\n static default = [];\n constructor() {\n super(StructurePreparedItemsArchive.default);\n }\n /**\n * @deprecated\n */\n getPreparedItems(structureId) {\n return this.find(structureId).getValueOrNullOrThrowError();\n }\n }\n return StructurePreparedItemsArchive;\n})();\nlet StructurePreparedItemsEventHandler = /*#__PURE__*/(() => {\n class StructurePreparedItemsEventHandler {\n structurePreparedItemsRepository;\n constructor(structurePreparedItemsRepository) {\n this.structurePreparedItemsRepository = structurePreparedItemsRepository;\n }\n static services = [StructurePreparedItemsArchive];\n forEvent() {\n return StructurePreparedEntitiesSetEvent;\n }\n handle(event) {\n if (event.ofMessageType('StructurePreparedEntitiesSetEvent')) {\n const preparedItems = event.getPreparedItems();\n this.structurePreparedItemsRepository.next(event.getAggregateId(), preparedItems);\n }\n }\n }\n return StructurePreparedItemsEventHandler;\n})();\nclass SourceDomainModule {\n defineAggregate() {\n return null;\n }\n registerKey() {\n return structureKey;\n }\n registerProviders(container) {\n container.provide(StructureSourceOriginArchive);\n container.provide(SourceManagerFactory);\n container.provide(SourceDomainEventPublisher);\n }\n registerCommandHandlers() {\n return [SourceSetLoadingCommandHandler, SetOriginCommandHandler, StructureEditSourceItemCommandHandler, DeleteOriginItemCommandHandler];\n }\n registerDomainEventHandler() {\n return [StructureOriginChangedEventHandler, StructurePreparedItemsEventHandler];\n }\n registerMultiDomainEventHandler() {\n return [];\n }\n}\nlet SourceDomainWarehouse = /*#__PURE__*/(() => {\n class SourceDomainWarehouse extends SourceWarehouse {\n structureRepository;\n structurePreparedItemsRepository;\n structureSourceOriginRepository;\n constructor(structureRepository, structurePreparedItemsRepository, structureSourceOriginRepository) {\n super();\n this.structureRepository = structureRepository;\n this.structurePreparedItemsRepository = structurePreparedItemsRepository;\n this.structureSourceOriginRepository = structureSourceOriginRepository;\n }\n static services = [StructureReadModelRepository, StructurePreparedItemsArchive, StructureSourceOriginArchive];\n findItems(structureId) {\n return this.structureRepository.getStructure(structureId).getEntities();\n }\n onItems(structureId) {\n return this.structureRepository.on(structureId).pipe(hermesMap(structure => structure.getEntities()), hermesDistinctUntilChanged((ents1, ents2) => {\n if (ents1.length !== ents2.length) {\n return false;\n }\n let flag = true;\n ents1.forEach((ent, index) => {\n if (!ent.equals(ents2[index])) {\n flag = false;\n return;\n }\n });\n return flag;\n }));\n }\n onItemsSize(structureId) {\n return this.onItems(structureId).pipe(hermesMap(entities => {\n return entities.length;\n }));\n }\n onceItems(structureId) {\n return singleFromObservable(this.onItems(structureId));\n }\n onOriginSize(structureId) {\n return this.structureSourceOriginRepository.on(structureId).pipe(hermesMap(origin => origin.length));\n }\n onLoading(structureId) {\n return this.structureRepository.on(structureId).pipe(hermesMap(structure => structure.getSource().isLoading()));\n }\n onPreparedItems(structureId) {\n return this.structurePreparedItemsRepository.on(structureId);\n }\n findPreparedItems(structureId) {\n return this.structurePreparedItemsRepository.getPreparedItems(structureId);\n }\n }\n return SourceDomainWarehouse;\n})();\nlet SourceDomainPublisher = /*#__PURE__*/(() => {\n class SourceDomainPublisher extends SourcePublisher {\n commandDispatcher;\n fieldWarehouse;\n sourceReadModelService;\n constructor(commandDispatcher, fieldWarehouse, sourceReadModelService) {\n super();\n this.commandDispatcher = commandDispatcher;\n this.fieldWarehouse = fieldWarehouse;\n this.sourceReadModelService = sourceReadModelService;\n }\n static services = [CommandDispatcher, FieldWarehouse, SourceWarehouse];\n setOrigin(items, structureId) {\n this.commandDispatcher.dispatch(new SetOriginCommand(structureId, items));\n }\n setLoading(enabled, structureId) {\n this.commandDispatcher.dispatch(new SourceSetLoadingCommand(structureId, enabled));\n }\n editItem(params, structureId) {\n this.commandDispatcher.dispatch(new StructureEditSourceItemCommand(structureId, params));\n }\n editItemByIndex(itemIndex, fieldIndex, value, structureId) {\n const itemId$ = toRxJsObservable(this.sourceReadModelService.onceItems(structureId).pipe(hermesMap(entities => {\n return entities[itemIndex].getId();\n })));\n const fieldId$ = toRxJsObservable(this.fieldWarehouse.onFields(structureId));\n fromRxJsObservable(zip(itemId$, fieldId$)).pipe(hermesTake(1)).subscribe(array => {\n const itemId = array[0],\n fields = array[1];\n this.editItem(new StructureEditSourceItemParams(itemId, fields[fieldIndex], value), structureId);\n });\n }\n deleteRow(row, structureId) {\n if (row.getItemId() !== undefined) {\n this.deleteItemById(row.getItemId(), structureId);\n } else if (row.getIndex() !== undefined) {\n this.deleteItemByIndex(row.getIndex(), structureId);\n }\n }\n deleteRows(rows, structureId) {\n if (rows.length > 0) {\n if (rows[0].getItemId() !== undefined) {\n this.deleteManyItemsByItemIds(rows.map(r => r.getItemId()), structureId);\n } else if (rows[0].getIndex() !== undefined) {\n this.deleteManyItemsByIndex(rows.map(r => r.getIndex()), structureId);\n }\n }\n }\n deleteItemByIndex(index, structureId) {\n this.commandDispatcher.dispatch(DeleteOriginItemCommand.byIndex(structureId, index));\n }\n deleteItemById(itemId, structureId) {\n this.commandDispatcher.dispatch(DeleteOriginItemCommand.byItemId(structureId, itemId));\n }\n deleteManyItemsByIndex(indexes, structureId) {\n this.commandDispatcher.dispatch(DeleteOriginItemCommand.byManyIndex(structureId, indexes));\n }\n deleteManyItemsByItemIds(itemIds, structureId) {\n this.commandDispatcher.dispatch(DeleteOriginItemCommand.byManyItemId(structureId, itemIds));\n }\n }\n return SourceDomainPublisher;\n})();\nclass SourceApiModule {\n registerProviders(container) {\n container.provide(SourcePublisher, SourceDomainPublisher);\n container.provide(SourceWarehouse, SourceDomainWarehouse);\n container.provide(SourceEventService);\n container.provide(StructurePreparedItemsArchive);\n container.provide(SourceConverter);\n }\n}\nfunction initializeSource() {\n new DomainInitializer(new SourceApiModule(), new SourceDomainModule()).init();\n}\ninitializeSource();\nfunction provideSourceCommandInvoker() {\n return CoreContainer.resolve(SourcePublisher);\n}\nfunction provideSourceWarehouse() {\n return CoreContainer.resolve(SourceWarehouse);\n}\nfunction provideSourceEventRepository() {\n return CoreContainer.resolve(SourceEventService);\n}\nlet SourceFeatureModule = /*#__PURE__*/(() => {\n class SourceFeatureModule extends FeatureModule {\n static forComponent() {\n return [];\n }\n static ɵfac = /* @__PURE__ */(() => {\n let ɵSourceFeatureModule_BaseFactory;\n return function SourceFeatureModule_Factory(t) {\n return (ɵSourceFeatureModule_BaseFactory || (ɵSourceFeatureModule_BaseFactory = i0.ɵɵgetInheritedFactory(SourceFeatureModule)))(t || SourceFeatureModule);\n };\n })();\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: SourceFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: SourcePublisher,\n useFactory: provideSourceCommandInvoker\n }, {\n provide: SourceWarehouse,\n useFactory: provideSourceWarehouse\n }, {\n provide: SourceEventService,\n useFactory: provideSourceEventRepository\n }],\n imports: [CommonModule]\n });\n }\n return SourceFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nCoreContainer.provide(CssClassModifier);\nfunction provideCssClassModifier() {\n return CoreContainer.resolve(CssClassModifier);\n}\nlet CssClassModule = /*#__PURE__*/(() => {\n class CssClassModule {\n static ɵfac = function CssClassModule_Factory(t) {\n return new (t || CssClassModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: CssClassModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: CssClassModifier,\n useFactory: provideCssClassModifier\n }]\n });\n }\n return CssClassModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StructureSharedModule = /*#__PURE__*/(() => {\n class StructureSharedModule {\n static ɵfac = function StructureSharedModule_Factory(t) {\n return new (t || StructureSharedModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: StructureSharedModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CssClassModule]\n });\n }\n return StructureSharedModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ResizeDetectorModule = /*#__PURE__*/(() => {\n class ResizeDetectorModule {\n static ɵfac = function ResizeDetectorModule_Factory(t) {\n return new (t || ResizeDetectorModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: ResizeDetectorModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [ResizeDetector]\n });\n }\n return ResizeDetectorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass RowSelectedReadModel {\n itemIds;\n allSelected;\n allUnselected;\n constructor(itemIds, allSelected, allUnselected) {\n this.itemIds = itemIds;\n this.allSelected = allSelected;\n this.allUnselected = allUnselected;\n }\n getAll() {\n return this.itemIds;\n }\n isSelected(id) {\n return this.itemIds.some(itemId => itemId === id);\n }\n isAllSelected() {\n return this.allSelected;\n }\n isAllUnselected() {\n return this.allUnselected;\n }\n isIndeterminate() {\n return !(this.isAllSelected() || this.isAllUnselected());\n }\n}\nclass RowSelectedArchive extends AggregateArchive {\n static default = new RowSelectedReadModel([], false, false);\n constructor() {\n super(RowSelectedArchive.default);\n }\n}\nclass SetEnabledSelectionCommand extends StructureCommand {\n enabled;\n constructor(structureId, enabled) {\n super(structureId, 'SetEnabledSelectionCommand');\n this.enabled = enabled;\n }\n isEnabled() {\n return this.enabled;\n }\n}\nclass SetEnabledSelectionCommandHandler {\n forCommand() {\n return SetEnabledSelectionCommand;\n }\n handle(aggregate, command) {\n aggregate.setSelection(command.isEnabled());\n }\n}\nclass ToggleSelectedRowCommand extends StructureCommand {\n selectedRow;\n type;\n constructor(structureId, selectedRow, type) {\n super(structureId, 'ToggleSelectedRowCommand');\n this.selectedRow = selectedRow;\n this.type = type;\n }\n getSelectedRow() {\n return this.selectedRow;\n }\n getType() {\n return this.type;\n }\n}\nclass ToggleSelectedRowCommandHandler {\n forCommand() {\n return ToggleSelectedRowCommand;\n }\n handle(aggregate, command) {\n const selectedRow = command.getSelectedRow(),\n type = command.getType();\n aggregate.toggleRow(selectedRow, type);\n }\n}\nlet SelectedRowChangedEventHandler = /*#__PURE__*/(() => {\n class SelectedRowChangedEventHandler {\n rowSelectedArchive;\n constructor(rowSelectedArchive) {\n this.rowSelectedArchive = rowSelectedArchive;\n }\n static services = [RowSelectedArchive];\n forEvent() {\n return SelectedRowChangedEvent;\n }\n handle(rowChangedEvent) {\n if (rowChangedEvent.ofMessageType('SelectedRowChangedEvent')) {\n const rowSelectedRead = new RowSelectedReadModel(rowChangedEvent.getSelectedRows(), rowChangedEvent.isAllSelected(), rowChangedEvent.isAllUnselected());\n this.rowSelectedArchive.next(rowChangedEvent.getAggregateId(), rowSelectedRead);\n }\n }\n }\n return SelectedRowChangedEventHandler;\n})();\nclass SetSelectionModeCommand extends StructureCommand {\n mode;\n constructor(structureId, mode) {\n super(structureId, 'SetSelectionModeCommand');\n this.mode = mode;\n }\n getMode() {\n return this.mode;\n }\n}\nclass SetSelectionModeCommandHandler {\n forCommand() {\n return SetSelectionModeCommand;\n }\n handle(aggregate, command) {\n aggregate.setSelectionMode(command.getMode());\n }\n}\nclass SelectAllRowsCommand extends StructureCommand {\n constructor(structureId) {\n super(structureId, 'SelectAllRowsCommand');\n }\n}\nclass SelectAllRowsCommandHandler {\n forCommand() {\n return SelectAllRowsCommand;\n }\n handle(aggregate, command) {\n aggregate.selectAll();\n }\n}\nclass UnselectAllRowsCommand extends StructureCommand {\n constructor(structureId) {\n super(structureId, 'UnselectAllRowsCommand');\n }\n}\nclass UnselectAllRowsCommandHandler {\n forCommand() {\n return UnselectAllRowsCommand;\n }\n handle(aggregate, command) {\n aggregate.unselectAll();\n }\n}\nclass SetSelectionTypeCommand extends StructureCommand {\n type;\n constructor(structureId, type) {\n super(structureId, 'SetSelectionTypeCommand');\n this.type = type;\n }\n getType() {\n return this.type;\n }\n}\nclass SetSelectionTypeCommandHandler {\n forCommand() {\n return SetSelectionTypeCommand;\n }\n handle(aggregate, command) {\n aggregate.setSelectionType(command.getType());\n }\n}\nclass FormationTypeRepository extends EventDrivenRepository {\n constructor() {\n super();\n }\n forEvent() {\n return SelectionTypeSetEvent;\n }\n}\nclass FormationModeRepository extends EventDrivenRepository {\n constructor() {\n super();\n }\n forEvent() {\n return SelectionModeSetEvent;\n }\n}\nclass FormationEnabledRepository extends EventDrivenRepository {\n constructor() {\n super();\n }\n forEvent() {\n return SelectionEnabledSetEvent;\n }\n}\nclass SetSelectedRowCommand extends StructureCommand {\n selectedRows;\n constructor(structureId, selectedRows) {\n super(structureId, 'SetSelectedRowCommand');\n this.selectedRows = selectedRows;\n }\n getSelectedRows() {\n return this.selectedRows;\n }\n}\nclass SetSelectedRowCommandHandler {\n forCommand() {\n return SetSelectedRowCommand;\n }\n handle(aggregate, command) {\n const selectedRows = command.getSelectedRows();\n aggregate.setSelectedRows(selectedRows);\n }\n}\nclass SelectRowByIndexCommand extends StructureCommand {\n indexes;\n constructor(structureId, indexes) {\n super(structureId, 'SelectRowByIndexCommand');\n this.indexes = indexes;\n }\n getIndexes() {\n return this.indexes;\n }\n}\nclass SelectRowByIndexCommandHandler {\n forCommand() {\n return SelectRowByIndexCommand;\n }\n handle(aggregate, command) {\n const selectedRowIndexes = command.getIndexes();\n aggregate.selectByIndex(selectedRowIndexes);\n }\n}\nclass SelectRowByIdCommand extends StructureCommand {\n ids;\n constructor(structureId, ids) {\n super(structureId, 'SelectRowByIdCommand');\n this.ids = ids;\n }\n getIds() {\n return this.ids;\n }\n}\nclass SelectRowByIdCommandHandler {\n forCommand() {\n return SelectRowByIdCommand;\n }\n handle(aggregate, command) {\n const selectedRowIds = command.getIds();\n aggregate.selectByIds(selectedRowIds);\n }\n}\nclass FormationSetMatcherCommand extends StructureCommand {\n matcher;\n constructor(structureId, matcher) {\n super(structureId, 'FormationSetMatcherCommand');\n this.matcher = matcher;\n }\n getMatcher() {\n return this.matcher;\n }\n}\nclass FormationSetMatcherCommandHandler {\n forCommand() {\n return FormationSetMatcherCommand;\n }\n handle(aggregate, command) {\n const matcher = command.getMatcher();\n aggregate.setFormationMatcher(matcher);\n }\n}\nclass FormationCustomRepository extends EventDrivenRepository {\n constructor() {\n super();\n }\n forEvent() {\n return FormationCustomSelectionChangeEvent;\n }\n}\nclass FormationCustomSelectCommand extends StructureCommand {\n customSelectId;\n constructor(structureId, customSelectId) {\n super(structureId, 'FormationCustomSelectCommand');\n this.customSelectId = customSelectId;\n }\n getCustomSelectId() {\n return this.customSelectId;\n }\n}\nclass FormationCustomSelectCommandHandler {\n forCommand() {\n return FormationCustomSelectCommand;\n }\n handle(aggregate, command) {\n const customSelectId = command.getCustomSelectId();\n aggregate.selectCustom(customSelectId);\n }\n}\nclass FormationSetCustomSelectConfigCommand extends StructureCommand {\n config;\n constructor(structureId, config) {\n super(structureId, 'FormationSetCustomSelectConfigCommand');\n this.config = config;\n }\n getConfig() {\n return this.config;\n }\n}\nclass FormationSetCustomSelectConfigCommandHandler {\n forCommand() {\n return FormationSetCustomSelectConfigCommand;\n }\n handle(aggregate, command) {\n const config = command.getConfig();\n aggregate.setSelectionCustomConfig(config);\n }\n}\nclass FormationDomainModule {\n defineAggregate() {\n return null;\n }\n registerKey() {\n return structureKey;\n }\n registerProviders(container) {\n container.provide(FormationManagerFactory);\n }\n registerCommandHandlers() {\n return [SetEnabledSelectionCommandHandler, SetSelectionModeCommandHandler, SetSelectionTypeCommandHandler, SelectAllRowsCommandHandler, UnselectAllRowsCommandHandler, ToggleSelectedRowCommandHandler, SetSelectedRowCommandHandler, SelectRowByIndexCommandHandler, SelectRowByIdCommandHandler, FormationSetMatcherCommandHandler, FormationCustomSelectCommandHandler, FormationSetCustomSelectConfigCommandHandler];\n }\n registerDomainEventHandler() {\n return [SelectedRowChangedEventHandler, FormationTypeRepository, FormationModeRepository, FormationEnabledRepository, FormationCustomRepository];\n }\n registerMultiDomainEventHandler() {\n return [];\n }\n}\nlet FormationDomainWarehouse = /*#__PURE__*/(() => {\n class FormationDomainWarehouse extends FormationWarehouse {\n rowSelectedRepository;\n formationModeRepository;\n formationTypeRepository;\n formationEnabledRepository;\n formationCustomRepository;\n sourceWarehouse;\n constructor(rowSelectedRepository, formationModeRepository, formationTypeRepository, formationEnabledRepository, formationCustomRepository, sourceWarehouse) {\n super();\n this.rowSelectedRepository = rowSelectedRepository;\n this.formationModeRepository = formationModeRepository;\n this.formationTypeRepository = formationTypeRepository;\n this.formationEnabledRepository = formationEnabledRepository;\n this.formationCustomRepository = formationCustomRepository;\n this.sourceWarehouse = sourceWarehouse;\n }\n static services = [RowSelectedArchive, FormationModeRepository, FormationTypeRepository, FormationEnabledRepository, FormationCustomRepository, SourceWarehouse];\n findSelectedRows(structureId) {\n const items = this.sourceWarehouse.findPreparedItems(structureId),\n selectedItemIds = this.findSelectedItemIds(structureId).getValueOrNullOrThrowError();\n const selectedItems = [],\n length = items.length;\n for (let i = 0; i < length; i += 1) {\n const item = items[i];\n if (selectedItemIds.some(itemId => itemId === item.getId().toString())) {\n selectedItems.push(new SelectedRow(item.getSourceItem(), i, item.getId()));\n }\n }\n return Optional.of(selectedItems);\n }\n onRowSelectedReadModel(structureId) {\n return this.rowSelectedRepository.on(structureId);\n }\n findSelectedItemIds(structureId) {\n return this.rowSelectedRepository.find(structureId).map(r => {\n return r.getAll();\n });\n }\n onSelectedRows(structureId) {\n return this.rowSelectedRepository.on(structureId).pipe(hermesMap(rm => {\n return rm.getAll();\n }));\n }\n onMode(structureId) {\n return this.formationModeRepository.on(structureId);\n }\n onType(structureId) {\n return this.formationTypeRepository.on(structureId);\n }\n onSelectionEnabled(structureId) {\n return this.formationEnabledRepository.on(structureId);\n }\n onCustomSelections(structureId) {\n return this.formationCustomRepository.on(structureId);\n }\n }\n return FormationDomainWarehouse;\n})();\nlet FormationDomainPublisher = /*#__PURE__*/(() => {\n class FormationDomainPublisher extends FormationPublisher {\n commandDispatcher;\n constructor(commandDispatcher) {\n super();\n this.commandDispatcher = commandDispatcher;\n }\n static services = [CommandDispatcher];\n setSelection(enabled, structureId) {\n this.commandDispatcher.dispatch(new SetEnabledSelectionCommand(structureId, enabled));\n }\n selectRows(selectedRow, structureId) {\n this.commandDispatcher.dispatch(new SetSelectedRowCommand(structureId, selectedRow));\n }\n selectByIndex(indexes, structureId) {\n this.commandDispatcher.dispatch(new SelectRowByIndexCommand(structureId, indexes));\n }\n selectByIds(ids, structureId) {\n this.commandDispatcher.dispatch(new SelectRowByIdCommand(structureId, ids));\n }\n toggleSelectedRow(selectedRow, type, structureId) {\n this.commandDispatcher.dispatch(new ToggleSelectedRowCommand(structureId, selectedRow, type));\n }\n changeMode(mode, structureId) {\n this.commandDispatcher.dispatch(new SetSelectionModeCommand(structureId, mode));\n }\n changeType(type, structureId) {\n this.commandDispatcher.dispatch(new SetSelectionTypeCommand(structureId, type));\n }\n setMatcher(matcher, structureId) {\n this.commandDispatcher.dispatch(new FormationSetMatcherCommand(structureId, matcher));\n }\n selectAll(structureId) {\n this.commandDispatcher.dispatch(new SelectAllRowsCommand(structureId));\n }\n unselectAll(structureId) {\n this.commandDispatcher.dispatch(new UnselectAllRowsCommand(structureId));\n }\n selectCustom(id, structureId) {\n this.commandDispatcher.dispatch(new FormationCustomSelectCommand(structureId, id));\n }\n setCustomSelection(config, structureId) {\n this.commandDispatcher.dispatch(new FormationSetCustomSelectConfigCommand(structureId, config));\n }\n }\n return FormationDomainPublisher;\n})();\nclass FormationApiModule {\n registerProviders(container) {\n container.provide(RowSelectedArchive);\n container.provide(FormationEventRepository);\n container.provide(FormationPublisher, FormationDomainPublisher);\n container.provide(FormationWarehouse, FormationDomainWarehouse);\n }\n}\nfunction initializeFormation() {\n new DomainInitializer(new FormationApiModule(), new FormationDomainModule()).init();\n}\nlet SelectCustomComponent = /*#__PURE__*/(() => {\n class SelectCustomComponent extends SmartComponent {\n changeDetectorRef;\n structureSelectCustomService;\n structureId;\n formationCommandDispatcher;\n formationWarehouse;\n // @ViewChild('selectCustomContainer', { static: true })\n headerDialogContainer;\n options = ['a', 'b'];\n context = useReactiveContext();\n constructor(changeDetectorRef, elementRef, structureSelectCustomService, structureId, formationCommandDispatcher, formationWarehouse) {\n super(changeDetectorRef, elementRef);\n this.changeDetectorRef = changeDetectorRef;\n this.structureSelectCustomService = structureSelectCustomService;\n this.structureId = structureId;\n this.formationCommandDispatcher = formationCommandDispatcher;\n this.formationWarehouse = formationWarehouse;\n }\n openConfigDialog() {\n this.structureSelectCustomService.open(this.headerDialogContainer);\n }\n getSelectorName() {\n return 'gui-select-custom';\n }\n static ɵfac = function SelectCustomComponent_Factory(t) {\n return new (t || SelectCustomComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(StructureSelectCustomService), i0.ɵɵdirectiveInject(StructureId), i0.ɵɵdirectiveInject(FormationPublisher), i0.ɵɵdirectiveInject(FormationWarehouse));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: SelectCustomComponent,\n selectors: [[\"gui-select-custom\"]],\n features: [i0.ɵɵProvidersFeature([StructureSelectCustomService]), i0.ɵɵInheritDefinitionFeature],\n decls: 3,\n vars: 0,\n consts: [[\"selectCustomContainer\", \"\"], [3, \"click\"], [\"gui-structure-menu-icon\", \"\"]],\n template: function SelectCustomComponent_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 1, 0);\n i0.ɵɵlistener(\"click\", function SelectCustomComponent_Template_div_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.openConfigDialog());\n });\n i0.ɵɵelement(2, \"div\", 2);\n i0.ɵɵelementEnd();\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n return SelectCustomComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\ninitializeFormation();\nfunction provideFormationCommandInvoker() {\n return CoreContainer.resolve(FormationPublisher);\n}\nfunction provideFormationWarehouse() {\n return CoreContainer.resolve(FormationWarehouse);\n}\nfunction provideFormationEventRepository() {\n return CoreContainer.resolve(FormationEventRepository);\n}\nlet FormationFeatureModule = /*#__PURE__*/(() => {\n class FormationFeatureModule extends FeatureModule {\n static ɵfac = /* @__PURE__ */(() => {\n let ɵFormationFeatureModule_BaseFactory;\n return function FormationFeatureModule_Factory(t) {\n return (ɵFormationFeatureModule_BaseFactory || (ɵFormationFeatureModule_BaseFactory = i0.ɵɵgetInheritedFactory(FormationFeatureModule)))(t || FormationFeatureModule);\n };\n })();\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: FormationFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: FormationPublisher,\n useFactory: provideFormationCommandInvoker\n }, {\n provide: FormationWarehouse,\n useFactory: provideFormationWarehouse\n }, {\n provide: FormationEventRepository,\n useFactory: provideFormationEventRepository\n }],\n imports: [CommonModule, GuiTemplateModule, FabricCheckboxModule, FabricTooltipModule]\n });\n }\n return FormationFeatureModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass CreateStructureCommand extends StructureCommand {\n constructor(structureId) {\n super(structureId, 'CreateStructureCommand');\n }\n}\nclass CreateStructureCommandHandler {\n forCommand() {\n return CreateStructureCommand;\n }\n}\nclass StructurePreparedEntitiesSetAggregateEvent extends StructureAggregateEvent {\n preparedItems;\n constructor(aggregateId, preparedItems) {\n super(aggregateId, 'StructurePreparedEntitiesSetAggregateEvent');\n this.preparedItems = preparedItems;\n }\n toDomainEvent() {\n return new StructurePreparedEntitiesSetEvent(this.getAggregateId(), this.preparedItems);\n }\n getPreparedItems() {\n return this.preparedItems;\n }\n}\nclass FieldsInitedAggregateEvent extends StructureAggregateEvent {\n fieldConfigs;\n fields;\n constructor(structureId, fieldConfigs,\n // TODO merge\n fields) {\n super(structureId, 'FieldsInitedAggregateEvent');\n this.fieldConfigs = fieldConfigs;\n this.fields = fields;\n }\n toDomainEvent() {\n return new FieldsInitedEvent(this.getAggregateId(), this.fieldConfigs, this.fields);\n }\n getFieldConfigs() {\n return this.fieldConfigs;\n }\n getFields() {\n return this.fields;\n }\n}\nclass StructureCreatedAggregateEvent extends StructureAggregateEvent {\n constructor(aggregateId) {\n super(aggregateId, 'StructureCreatedAggregateEvent');\n }\n toDomainEvent() {\n return new StructureCreatedEvent(this.getAggregateId());\n }\n}\nclass FilterTypesInitedAggregateEvent extends StructureAggregateEvent {\n filterTypes;\n constructor(structureId, filterTypes) {\n super(structureId, 'FilterTypesInitedAggregateEvent');\n this.filterTypes = filterTypes;\n }\n toDomainEvent() {\n return new FilterTypesInitedEvent(this.getAggregateId(), this.filterTypes);\n }\n getFilterTypes() {\n return this.filterTypes;\n }\n}\nclass AllFiltersRemovedAggregateEvent extends StructureAggregateEvent {\n constructor(aggregateId) {\n super(aggregateId, 'FilterAddedEvent');\n }\n toDomainEvent() {\n return new ActiveFiltersSetEvent(this.getAggregateId(), []);\n }\n}\nclass FilterAddedAggregateEvent extends StructureAggregateEvent {\n activeFilters;\n constructor(aggregateId, activeFilters) {\n super(aggregateId, 'FilterAddedEvent');\n this.activeFilters = activeFilters;\n }\n toDomainEvent() {\n return new ActiveFiltersSetEvent(this.getAggregateId(), this.activeFilters);\n }\n}\nclass FilterRemovedAggregateEvent extends StructureAggregateEvent {\n activeFilters;\n constructor(aggregateId, activeFilters) {\n super(aggregateId, 'FilterRemovedAggregateEvent');\n this.activeFilters = activeFilters;\n }\n toDomainEvent() {\n return new ActiveFiltersSetEvent(this.getAggregateId(), this.activeFilters);\n }\n}\nclass UniqueFilterCalculatedAggregateEvent extends StructureAggregateEvent {\n map;\n constructor(aggregateId, map) {\n super(aggregateId, 'UniqueFilterCalculatedAggregateEvent');\n this.map = map;\n }\n toDomainEvent() {\n return new UniqueFilterCalculatedEvent(this.getAggregateId(), this.map);\n }\n}\nclass UniqueFilterSelectedAggregateEvent extends StructureAggregateEvent {\n constructor(aggregateId) {\n super(aggregateId, 'UniqueFilterSelectedAggregateEvent');\n }\n toDomainEvent() {\n return new UniqueFilterSelectedEvent(this.getAggregateId());\n }\n}\nclass UniqueFilterUnselectedAggregateEvent extends StructureAggregateEvent {\n constructor(aggregateId) {\n super(aggregateId, 'UniqueFilterUnselectedAggregateEvent');\n }\n toDomainEvent() {\n return new UniqueFilterUnselectedEvent(this.getAggregateId());\n }\n}\nclass AllUniqueFilterUnselectedAggregateEvent extends StructureAggregateEvent {\n constructor(aggregateId) {\n super(aggregateId, 'AllUniqueFilterUnselectedAggregateEvent');\n }\n toDomainEvent() {\n return new AllUniqueFilterUnselectedEvent(this.getAggregateId());\n }\n}\nclass AllUniqueFilterSelectedAggregateEvent extends StructureAggregateEvent {\n constructor(aggregateId) {\n super(aggregateId, 'AllUniqueFilterSelectedAggregateEvent');\n }\n toDomainEvent() {\n return new AllUniqueFilterSelectedEvent(this.getAggregateId());\n }\n}\nclass SelectedRowChangedAggregateEvent extends StructureAggregateEvent {\n selectedRows;\n allSelected;\n allUnselected;\n constructor(structureId, selectedRows, allSelected, allUnselected) {\n super(structureId, 'SelectedRowChangedAggregateEvent');\n this.selectedRows = selectedRows;\n this.allSelected = allSelected;\n this.allUnselected = allUnselected;\n }\n toDomainEvent() {\n return new SelectedRowChangedEvent(this.getAggregateId(), this.selectedRows, this.allSelected, this.allUnselected);\n }\n}\nclass StructureAggregate extends AggregateRoot {\n pagingManager;\n sourceManager;\n sorterManager;\n filterManager;\n searchManager;\n verticalFormation;\n fieldCollection;\n summariesManager;\n uniqueFilterManager;\n constructor(structureId, pagingAggregate, sourceManager, verticalFormation, summariesManager, sorterCollection, filterManager, uniqueFilterManager, searchManager, fieldCollection) {\n super(structureId, structureKey);\n this.pagingManager = pagingAggregate;\n this.sourceManager = sourceManager;\n this.verticalFormation = verticalFormation;\n this.summariesManager = summariesManager;\n this.sorterManager = sorterCollection;\n this.filterManager = filterManager;\n this.uniqueFilterManager = uniqueFilterManager;\n this.searchManager = searchManager;\n this.fieldCollection = fieldCollection;\n this.addEvent(this.sourceManager.events);\n this.sourceManager.events = [];\n }\n createEvent() {\n return StructureCreatedAggregateEvent;\n }\n clearEvents() {\n super.clearEvents();\n this.pagingManager.clearEvents();\n }\n init() {\n this.initTheme();\n }\n setVerticalFormationEnabled(enabled) {\n this.verticalFormation.setEnabled(enabled);\n this.calculateSource();\n }\n getVerticalFormation() {\n return this.verticalFormation;\n }\n setSummariesEnabled(enabled) {\n this.summariesManager.setEnabled(enabled);\n this.calculateSource();\n return this.getEvents();\n }\n setOrigin(items) {\n this.addEvent(this.sourceManager.setOrigin(items, this.getId()));\n // if (false) {\n this.calculateUniqueValues();\n // }\n this.calculateSource();\n return this.getEvents();\n }\n deleteItem(payload) {\n this.addEvent(this.sourceManager.deleteOriginItem(payload, this.getId()));\n this.generateSelectedRowChangedEvent();\n this.calculateSource();\n }\n editItem(editParams) {\n const itemId = editParams.getItemId(),\n fieldId = editParams.getColumnFieldId(),\n field = this.fieldCollection.getField(fieldId),\n // as FieldId\n value = editParams.getValue();\n const editItemEvents = this.sourceManager.editOriginItem(itemId, value, field, this.getId());\n editItemEvents.forEach(e => this.addEvent(e));\n // TODO\n this.calculateUniqueValues();\n this.calculateSource();\n return this.getEvents();\n }\n setHeight(height) {\n this.verticalFormation.setViewportHeight(height);\n this.calculateSourceBasedOnVirtualScroll();\n }\n setTheme(theme) {\n // #1707 Move to SchemeAggregate\n if (theme === SchemaTheme.MATERIAL) {\n this.getVerticalFormation().setRowHeight(52);\n }\n if (theme === SchemaTheme.GENERIC) {\n this.getVerticalFormation().setRowHeight(42);\n }\n if (theme === SchemaTheme.FABRIC) {\n this.getVerticalFormation().setRowHeight(36);\n }\n if (theme === SchemaTheme.LIGHT) {\n this.getVerticalFormation().setRowHeight(56);\n }\n if (theme === SchemaTheme.DARK) {\n this.getVerticalFormation().setRowHeight(38);\n }\n }\n setScrollPosition(position) {\n this.verticalFormation.setScrollPosition(position);\n this.calculateSourceBasedOnVirtualScroll();\n }\n scrollToIndex(index) {\n this.addEvent(this.verticalFormation.scrollToIndex(index));\n }\n setSelection(enabled) {\n this.sourceManager.getFormation().setSelection(enabled);\n this.addEvent(new SelectionEnabledSetAggregateEvent(this.getId(), enabled));\n }\n setSelectionMode(mode) {\n this.addEvent(this.sourceManager.getFormation().setMode(mode));\n }\n setSelectionType(type) {\n this.addEvent(this.sourceManager.getFormation().setType(type));\n }\n setFormationMatcher(matcher) {\n this.getFormation().setMatcher(matcher);\n this.sourceManager.reSelect();\n this.generateSelectedRowChangedEvent();\n }\n selectByIndex(indexes) {\n this.sourceManager.selectByIndex(indexes);\n this.generateSelectedRowChangedEvent();\n }\n selectByIds(ids) {\n this.sourceManager.selectByIds(ids);\n this.generateSelectedRowChangedEvent();\n }\n /**\n *\n * Doesnt' work\n */\n setSelectedRows(selectedRows) {\n this.sourceManager.setSelectedRows(selectedRows);\n this.generateSelectedRowChangedEvent();\n }\n setSelectionCustomConfig(config) {\n this.addEvent(this.sourceManager.setCustomConfig(config));\n }\n toggleRow(selectedRow, type) {\n this.sourceManager.toggleRow(selectedRow, type);\n this.generateSelectedRowChangedEvent();\n }\n selectCustom(id) {\n this.sourceManager.selectCustom(id);\n this.generateSelectedRowChangedEvent();\n }\n selectAll() {\n this.sourceManager.selectAll();\n this.generateSelectedRowChangedEvent();\n }\n unselectAll() {\n this.sourceManager.unselectAll();\n this.generateSelectedRowChangedEvent();\n }\n getFormation() {\n return this.sourceManager.getFormation();\n }\n getPaging() {\n return this.pagingManager;\n }\n changePaging(config) {\n this.pagingManager.change(config);\n this.calculateSource();\n }\n setPaging(paging) {\n this.pagingManager = paging;\n this.calculateSource();\n }\n nextPage() {\n this.pagingManager.nextPage();\n this.calculateSource();\n }\n prevPage() {\n this.pagingManager.prevPage();\n this.calculateSource();\n }\n changePageSize(pageSize) {\n const pagingEvents = this.pagingManager.changePageSize(pageSize);\n // TODO\n pagingEvents.forEach(event => {\n this.addEvent(event);\n });\n this.calculateSource();\n return this.getEvents();\n }\n getEntities() {\n return this.sourceManager.getSlicedEntities();\n }\n getSource() {\n return this.sourceManager;\n }\n createFields(fieldConfigs) {\n this.fieldCollection.initFields(fieldConfigs);\n const fields = this.fieldCollection.getAllFields();\n this.addEvent(new FieldsInitedAggregateEvent(this.getId(), fieldConfigs, fields));\n this.filterManager.assignFilterTypes(fields);\n this.addEvent(new FilterTypesInitedAggregateEvent(this.getId(), this.filterManager.getFilterTypes()));\n return this.getEvents();\n }\n setSortingConfig(config) {\n this.sorterManager.setConfig(config);\n }\n toggleSort(fieldId) {\n const field = this.fieldCollection.getField(fieldId);\n this.sorterManager.toggle(field);\n this.calculateSource();\n return this.sorterManager.getAll();\n }\n setSortOrder(fieldId, sortOrder) {\n const field = this.fieldCollection.getField(fieldId);\n this.sorterManager.setSortOrder(field, sortOrder);\n this.calculateSource();\n return this.sorterManager.getAll();\n }\n setFilterConfig(config) {\n this.filterManager.getSettings().setFilterConfig(config);\n }\n setQuickFiltersConfig(config) {\n this.filterManager.getSettings().setQuickFiltersConfig(config);\n }\n toggleFilter(fieldId, externalFilterId, filterValue) {\n const field = this.fieldCollection.getField(fieldId);\n // Field not found\n // TODO throw aggregate event\n if (field === undefined) {\n return [];\n }\n // this.filterManager.addFilter(field, externalFilterId, filterValue);\n this.calculateSource();\n return [];\n }\n addFilter(fieldId, filterTypeId, value) {\n this.filterManager.add(fieldId, filterTypeId, value);\n const fields = this.fieldCollection.getFieldsAsMap();\n const activeFilters = this.filterManager.getAllActiveFilters(fields);\n this.addEvent(new FilterAddedAggregateEvent(this.getId(), activeFilters));\n this.calculateSource();\n }\n removeAllFilters() {\n this.filterManager.removeAll();\n this.addEvent(new AllFiltersRemovedAggregateEvent(this.getId()));\n this.calculateSource();\n }\n removeFilter(filterId) {\n this.filterManager.remove(filterId);\n const fields = this.fieldCollection.getFieldsAsMap();\n const activeFilters = this.filterManager.getAllActiveFilters(fields);\n this.addEvent(new FilterRemovedAggregateEvent(this.getId(), activeFilters));\n this.calculateSource();\n }\n setSearchingConfig(config) {\n this.filterManager.getSettings().setSearchingConfig(config);\n }\n addSearchPhrase(phrase) {\n const fields = this.fieldCollection.getAllFields();\n this.searchManager.addSearchPhrase(fields, phrase);\n this.calculateSource();\n return [];\n }\n removeSearchPhrase() {\n this.searchManager.removeSearchFilters();\n this.calculateSource();\n return [];\n }\n selectAllUniqueFilter(fieldId) {\n this.uniqueFilterManager.selectAll(fieldId);\n this.addEvent(new AllUniqueFilterSelectedAggregateEvent(this.getId()));\n this.generateCalculateUniqueValuesAggregateEvent();\n this.calculateSource();\n }\n selectUniqueFilter(fieldId, uniqueValueId) {\n this.uniqueFilterManager.select(fieldId, uniqueValueId);\n this.addEvent(new UniqueFilterSelectedAggregateEvent(this.getId()));\n this.generateCalculateUniqueValuesAggregateEvent();\n this.calculateSource();\n }\n unselectAllUniqueFilter(fieldId) {\n this.uniqueFilterManager.unselectAll(fieldId);\n this.addEvent(new AllUniqueFilterUnselectedAggregateEvent(this.getId()));\n this.generateCalculateUniqueValuesAggregateEvent();\n this.calculateSource();\n }\n unselectUniqueFilter(fieldId, uniqueValueId) {\n this.uniqueFilterManager.unselect(fieldId, uniqueValueId);\n this.addEvent(new UniqueFilterUnselectedAggregateEvent(this.getId()));\n this.generateCalculateUniqueValuesAggregateEvent();\n this.calculateSource();\n }\n calculateSource() {\n if (!this.sourceManager.getOrigin() || !this.pagingManager) {\n return;\n }\n // TODO Refactor\n this.sourceManager.setEntities(this.sourceManager.getOrigin());\n // filtering\n this.sourceManager.setEntities(this.filterManager.filter(this.sourceManager.getEntities(), this.fieldCollection.getFieldsAsMap()));\n // search\n const searchedEntities = this.searchManager.search(this.sourceManager.getEntities());\n this.sourceManager.setEntities(searchedEntities);\n // unique filtering\n if (true) {\n // this.sourceManager.setEntities(\n // \tthis.uniqueFilterManager.filterAll(this.sourceManager.getEntities(), this.fieldCollection.getAllFields())\n // );\n }\n // sorting\n const ents = this.sorterManager.sort(this.sourceManager.getEntities());\n this.sourceManager.setEntities(ents);\n // calculate filteredEntities\n this.sourceManager.setPreparedEntities();\n this.pagingManager.setSourceSize(this.sourceManager.getPreparedEntities().length);\n this.addEvent(new StructurePreparedEntitiesSetAggregateEvent(this.getId(), ents));\n // summaries\n const summariesEvents = this.summariesManager.calculate(this.fieldCollection.getAllFields(), this.sourceManager.getEntities());\n summariesEvents.forEach(ae => {\n this.addEvent(ae);\n });\n // paging\n this.sourceManager.setEntities(this.pagingManager.sample(this.sourceManager.getEntities()));\n this.verticalFormation.setSourceSize(this.sourceManager.getEntities().length);\n this.calculateSourceBasedOnVirtualScroll();\n }\n calculateSourceBasedOnVirtualScroll() {\n if (this.verticalFormation.isEnabled()) {\n const range = this.verticalFormation.getRange();\n this.sourceManager.setSlicedEntities(this.sourceManager.getEntities().slice(range.getStart(), range.getEnd()));\n } else {\n this.sourceManager.setSlicedEntities(this.sourceManager.getEntities());\n }\n }\n initTheme() {\n // TODO\n const theme = SchemaAggregate.DEFAULT_THEME;\n this.setTheme(theme);\n }\n calculateUniqueValues() {\n const fields = this.fieldCollection.getAllFields(),\n items = this.sourceManager.getOrigin();\n this.uniqueFilterManager.calculateAll(items, fields);\n this.generateCalculateUniqueValuesAggregateEvent();\n }\n generateCalculateUniqueValuesAggregateEvent() {\n this.addEvent(new UniqueFilterCalculatedAggregateEvent(this.getId(), this.uniqueFilterManager.getAll(this.fieldCollection.getAllFields())));\n }\n generateSelectedRowChangedEvent() {\n this.addEvent(new SelectedRowChangedAggregateEvent(this.getId(), this.sourceManager.getFormation().getSelectedItemIds().map(i => i.toString()), this.sourceManager.getFormation().isAllSelected(), this.sourceManager.getFormation().isAllUnselected()));\n }\n}\nclass Sorter {\n sorterId;\n columnId;\n field;\n rank = 1;\n direction;\n constructor(id, field, direction = true) {\n this.sorterId = id;\n this.field = field;\n this.direction = direction;\n }\n getId() {\n return this.sorterId;\n }\n getRank() {\n return this.rank;\n }\n getField() {\n return this.field;\n }\n hasDirection() {\n return this.direction;\n }\n changeDirection() {\n this.direction = !this.direction;\n }\n setDirection(direction) {\n this.direction = direction;\n }\n sort(entities) {\n if (entities.length === 0) {\n return entities;\n }\n return entities.sort((entityOne, entityTwo) => {\n return this.field.sort(entityOne, entityTwo, this.direction);\n });\n }\n}\nclass SorterId {\n sorterId;\n constructor(id) {\n this.sorterId = id;\n }\n getId() {\n return this.sorterId;\n }\n}\nclass SorterManager {\n enabled;\n multi;\n sorters = new Map();\n constructor(enabled = false, multi = false) {\n this.enabled = enabled;\n this.multi = multi;\n }\n setConfig(config) {\n if (config && config.enabled !== undefined && config.enabled !== null) {\n this.enabled = config.enabled;\n }\n if (config && config.multiSorting !== undefined && config.multiSorting !== null) {\n this.multi = config.multiSorting;\n this.sorters.clear();\n }\n }\n toggle(field) {\n const fieldId = field.getId(),\n sorter = this.sorters.get(fieldId.getId());\n if (sorter) {\n if (sorter.hasDirection()) {\n sorter.changeDirection();\n } else {\n this.delete(fieldId);\n }\n } else {\n this.add(field);\n }\n }\n setSortOrder(field, sortOrder) {\n const fieldId = field.getId(),\n sorter = this.sorters.get(fieldId.getId());\n if (sortOrder === SortOrder.NONE) {\n this.delete(fieldId);\n } else if (sortOrder === SortOrder.ASC || sortOrder === SortOrder.DESC) {\n this.delete(fieldId);\n const direction = sortOrder === SortOrder.ASC;\n this.add(field, direction);\n }\n }\n add(field, direction = true) {\n this.addSorter(field.getId(), new Sorter(new SorterId(RandomStringGenerator.generate()), field, direction));\n }\n addSorter(fieldId, sorter) {\n if (!this.multi) {\n this.sorters.clear();\n }\n this.sorters.set(fieldId.getId(), sorter);\n }\n delete(fieldId) {\n this.sorters.delete(fieldId.getId());\n }\n update() {}\n // TODO Remove the loop from sorter.sort\n sort(entities) {\n const sorters = this.getAll();\n let sortedEntities = Array.from(entities);\n for (const sorter of sorters) {\n sortedEntities = sorter.sort(sortedEntities);\n }\n return sortedEntities;\n }\n getAll() {\n if (!this.enabled) {\n return [];\n }\n return Array.from(this.sorters).map(arr => arr[1]).sort((sorterOne, sorterTwo) => {\n return sorterOne.getRank() - sorterTwo.getRank();\n }).reverse();\n }\n}\nclass UniqueValue {\n id;\n value;\n displayValue;\n enabled;\n constructor(id, value, displayValue, enabled) {\n this.id = id;\n this.value = value;\n this.displayValue = displayValue;\n this.enabled = enabled;\n }\n getId() {\n return this.id;\n }\n getValue() {\n return this.value;\n }\n getDisplayValue() {\n return this.displayValue;\n }\n isEnabled() {\n return this.enabled;\n }\n isDisabled() {\n return !this.enabled;\n }\n select() {\n this.enabled = true;\n }\n unselect() {\n this.enabled = false;\n }\n}\nclass UniqueValueId {\n id;\n constructor(uniqueValueId) {\n this.id = uniqueValueId;\n }\n toString() {\n return this.id;\n }\n equals(uniqueValueId) {\n return uniqueValueId.toString() === this.id;\n }\n}\nlet UniqueValueIdGenerator = /*#__PURE__*/(() => {\n class UniqueValueIdGenerator {\n static index = 0;\n static generate() {\n UniqueValueIdGenerator.index += 1;\n return new UniqueValueId(`${UniqueValueIdGenerator.index}`);\n }\n }\n return UniqueValueIdGenerator;\n})();\nclass UniqueValueCollection {\n values = [];\n allSelected;\n allDisabled;\n constructor(values, field) {\n for (const value of values) {\n this.values.push(new UniqueValue(UniqueValueIdGenerator.generate(), value, field.getDisplayValue(value), true));\n }\n this.calculateAllSelected();\n this.calculateAllDisabled();\n }\n getAll() {\n return this.values;\n }\n isAllSelected() {\n return this.allSelected;\n }\n isAllDisabled() {\n return this.allDisabled;\n }\n getNotSelected() {\n return this.values.filter(uv => uv.isDisabled());\n }\n selectAll() {\n this.values.forEach(uv => {\n uv.select();\n });\n this.allSelected = true;\n this.allDisabled = false;\n }\n select(uniqueValueId) {\n this.values.filter(uv => uv.getId().equals(uniqueValueId)).forEach(uv => {\n uv.select();\n });\n this.calculateAllSelected();\n this.calculateAllDisabled();\n }\n unselectAll() {\n this.values.forEach(uv => {\n uv.unselect();\n });\n this.allSelected = false;\n this.allDisabled = true;\n }\n unselect(uniqueValueId) {\n this.values.filter(uv => uv.getId().equals(uniqueValueId)).forEach(uv => {\n uv.unselect();\n });\n this.calculateAllSelected();\n this.calculateAllDisabled();\n }\n calculateAllSelected() {\n this.allSelected = !this.values.some(f => f.isDisabled());\n }\n calculateAllDisabled() {\n this.allDisabled = !this.values.some(f => f.isEnabled());\n }\n}\nclass UniqueFilterManager {\n uniqueValueMap = new KeyMap();\n calculate(entities, field) {\n const fieldId = field.getId();\n const optUVM = this.uniqueValueMap.find(fieldId);\n optUVM.ifEmpty(() => {\n const set = new Set();\n for (const entity of entities) {\n set.add(field.getValue(entity));\n }\n // sort\n const sortedValues = Array.from(set.values()).sort((a, b) => {\n return field.getField().sort(a, b);\n });\n const uvc = new UniqueValueCollection(sortedValues, field);\n this.uniqueValueMap.set(field.getId(), uvc);\n });\n }\n calculateAll(entities, fields) {\n for (const field of fields) {\n this.calculate(entities, field);\n }\n }\n filterAll(entities, fields) {\n let values = entities;\n for (const field of fields) {\n values = this.filter(values, field);\n }\n return values;\n }\n filter(entities, field) {\n let values = [];\n this.uniqueValueMap.find(field.getId()).ifPresent(uvc => {\n if (uvc.isAllSelected()) {\n values = entities;\n } else if (uvc.isAllDisabled()) {\n values = [];\n } else {\n values = entities.filter(itemEntity => {\n for (const notSelectedValue of uvc.getNotSelected()) {\n if (field.getField().equals(itemEntity, notSelectedValue.getValue())) {\n return false;\n }\n }\n return true;\n });\n }\n });\n return values;\n }\n selectAll(fieldId) {\n this.uniqueValueMap.find(fieldId).ifPresent(uvc => {\n uvc.selectAll();\n });\n }\n select(fieldId, uniqueValueId) {\n this.uniqueValueMap.find(fieldId).ifPresent(uvc => {\n uvc.select(uniqueValueId);\n });\n }\n unselectAll(fieldId) {\n this.uniqueValueMap.find(fieldId).ifPresent(uvc => {\n uvc.unselectAll();\n });\n }\n unselect(fieldId, uniqueValueId) {\n this.uniqueValueMap.find(fieldId).ifPresent(uvc => {\n uvc.unselect(uniqueValueId);\n });\n }\n getAll(fields) {\n const map = new Map();\n for (const field of fields) {\n this.getValues(field).ifPresent(v => {\n map.set(field.getId().toString(), v);\n });\n }\n return map;\n }\n getValues(field) {\n return this.uniqueValueMap.find(field.getId()).map(uvc => {\n return uvc.getAll();\n });\n }\n}\nlet StructureAggregateFactory = /*#__PURE__*/(() => {\n class StructureAggregateFactory extends AggregateFactory {\n pagingAggregateFactory;\n sourceManagerFactory;\n verticalFormationFactory;\n summariesManagerFactory;\n filterManagerFactory;\n searchManagerFactory;\n fieldCollectionFactory;\n constructor(pagingAggregateFactory, sourceManagerFactory, verticalFormationFactory, summariesManagerFactory, filterManagerFactory, searchManagerFactory, fieldCollectionFactory) {\n super();\n this.pagingAggregateFactory = pagingAggregateFactory;\n this.sourceManagerFactory = sourceManagerFactory;\n this.verticalFormationFactory = verticalFormationFactory;\n this.summariesManagerFactory = summariesManagerFactory;\n this.filterManagerFactory = filterManagerFactory;\n this.searchManagerFactory = searchManagerFactory;\n this.fieldCollectionFactory = fieldCollectionFactory;\n }\n static services = [PagingManagerFactory, SourceManagerFactory, VerticalFormationFactory, SummariesManagerFactory, FilterManagerFactory, SearchManagerFactory, FieldCollectionFactory];\n create(structureId) {\n const paging = this.pagingAggregateFactory.createDefault(),\n source = this.sourceManagerFactory.createDefault(structureId),\n verticalFormation = this.verticalFormationFactory.create(structureId);\n const sorterContainer = new SorterManager(),\n filterContainer = this.filterManagerFactory.create(false),\n fieldContainer = this.fieldCollectionFactory.create(),\n summariesManager = this.summariesManagerFactory.create(structureId),\n searchManager = this.searchManagerFactory.create();\n const structureAggregate = new StructureAggregate(structureId, paging, source, verticalFormation, summariesManager, sorterContainer, filterContainer, new UniqueFilterManager(), searchManager, fieldContainer);\n this.init(structureAggregate);\n return structureAggregate;\n }\n init(structureAggregate) {\n structureAggregate.init();\n }\n }\n return StructureAggregateFactory;\n})();\nclass StructureAggregateRepository extends AggregateRepository {}\nlet InMemoryStructureAggregateStore = /*#__PURE__*/(() => {\n class InMemoryStructureAggregateStore extends InMemoryAggregateStore {\n constructor(inMemoryStructureStore) {\n super(inMemoryStructureStore);\n }\n static services = [InMemoryStructureStore];\n }\n return InMemoryStructureAggregateStore;\n})();\nlet InMemoryStructureAggregateRepository = /*#__PURE__*/(() => {\n class InMemoryStructureAggregateRepository extends StructureAggregateRepository {\n inMemoryStructureAggregateStore;\n constructor(inMemoryStructureAggregateStore) {\n super();\n this.inMemoryStructureAggregateStore = inMemoryStructureAggregateStore;\n }\n static services = [InMemoryStructureAggregateStore];\n findById(aggregateId) {\n return this.inMemoryStructureAggregateStore.findById(aggregateId);\n }\n save(aggregate) {\n this.inMemoryStructureAggregateStore.save(aggregate);\n }\n }\n return InMemoryStructureAggregateRepository;\n})();\nlet StructureCreatedEventHandler = /*#__PURE__*/(() => {\n class StructureCreatedEventHandler {\n summariesEnabledArchive;\n constructor(summariesEnabledArchive) {\n this.summariesEnabledArchive = summariesEnabledArchive;\n }\n static services = [SummariesEnabledArchive];\n forEvent() {\n return StructureCreatedEvent;\n }\n handle(event) {\n if (event.ofMessageType('StructureCreatedEvent')) {\n const structureId = event.getAggregateId();\n this.summariesEnabledArchive.init(structureId);\n }\n }\n }\n return StructureCreatedEventHandler;\n})();\nclass StructureDomainModule {\n defineAggregate() {\n return {\n aggregateKey: structureKey,\n createCommandHandler: CreateStructureCommandHandler,\n factory: StructureAggregateFactory,\n repository: InMemoryStructureAggregateRepository\n };\n }\n registerKey() {\n return structureKey;\n }\n registerProviders(container) {\n // container.provide(ListViewDispatcher);\n }\n registerCommandHandlers() {\n return [\n // SetListViewModeCommandHandler,\n // ToggleListViewSelectorCommandHandler\n ];\n }\n registerDomainEventHandler() {\n return [StructureCreatedEventHandler];\n }\n registerMultiDomainEventHandler() {\n return [];\n }\n}\nclass FilterAddedEvent extends StructureDomainEvent {\n fieldId;\n filterTypeId;\n value;\n constructor(aggregateId, fieldId, filterTypeId, value) {\n super(aggregateId, {\n fieldId,\n filterTypeId,\n value\n }, 'FilterAddedEvent');\n this.fieldId = fieldId;\n this.filterTypeId = filterTypeId;\n this.value = value;\n }\n}\nlet InMemoryStructureRepository = /*#__PURE__*/(() => {\n class InMemoryStructureRepository extends StructureReadModelRepository {\n inMemoryStructureReadStore;\n structureIdToStructure = new Map();\n hermesStructure$ = new HermesReplaySubject(1);\n constructor(inMemoryStructureReadStore) {\n super();\n this.inMemoryStructureReadStore = inMemoryStructureReadStore;\n }\n static services = [InMemoryStructureReadStore];\n getStructure(structureId) {\n return this.structureIdToStructure.get(structureId.getId());\n }\n on(structureId) {\n return this.hermesStructure$.toObservable().pipe(hermesFilter(structureIdToStructure => {\n const key = structureId.getId();\n return structureIdToStructure.has(key);\n }), hermesMap(structureIdToStructure => {\n return structureIdToStructure.get(structureId.getId());\n }));\n }\n forEvents() {\n return [StructureCreatedEvent, SetSourceLoadingEvent, PagingSetEvent, PrevPageEvent, NextPageEvent, PagesizeChangedEvent, SelectionEnabledSetEvent, VerticalScrollEnabledSetEvent, ScrollPositionSetEvent, SortToggledEvent, FilterToggledEvent, SearchPhraseSetDomainEvent, SortOrderSetEvent, OriginSetEvent, RowHeightSetEvent, StructureHeightSetEvent, RowHeightSetBasedOnThemeEvent, FilterAddedEvent, ActiveFiltersSetEvent, UniqueFilterSelectedEvent, AllUniqueFilterSelectedEvent, UniqueFilterUnselectedEvent, AllUniqueFilterUnselectedEvent];\n }\n subs(event) {\n const aggregateId = event.getAggregateId();\n const optStructure = this.inMemoryStructureReadStore.getById(aggregateId);\n optStructure.ifPresent(structureReadModelRoot => {\n const key = structureReadModelRoot.getId().toString();\n this.structureIdToStructure.set(key, structureReadModelRoot);\n this.hermesStructure$.next(this.structureIdToStructure);\n });\n }\n }\n return InMemoryStructureRepository;\n})();\nlet StructureDomainPublisher = /*#__PURE__*/(() => {\n class StructureDomainPublisher extends StructurePublisher {\n filterCommandInvoker;\n sourcePublisher;\n verticalFormationCommandInvoker;\n structureCellEditArchive;\n commandDispatcher = CoreContainer.resolve(CommandDispatcher);\n constructor(filterCommandInvoker, sourcePublisher, verticalFormationCommandInvoker, structureCellEditArchive) {\n super();\n this.filterCommandInvoker = filterCommandInvoker;\n this.sourcePublisher = sourcePublisher;\n this.verticalFormationCommandInvoker = verticalFormationCommandInvoker;\n this.structureCellEditArchive = structureCellEditArchive;\n }\n static services = [FilterPublisher, SourcePublisher, VerticalFormationPublisher, StructureCellEditArchive];\n create(structureId) {\n this.commandDispatcher.dispatch(new CreateStructureCommand(structureId));\n }\n // REMOVE\n enableVirtualScroll(structureId) {\n this.verticalFormationCommandInvoker.enableVirtualScroll(structureId);\n }\n // REMOVE\n disableVirtualScroll(structureId) {\n this.verticalFormationCommandInvoker.disableVirtualScroll(structureId);\n }\n // REMOVE\n scrollToTop(structureId) {\n this.verticalFormationCommandInvoker.scrollToTop(structureId);\n }\n // REMOVE\n scrollToBottom(structureId) {\n this.verticalFormationCommandInvoker.scrollToBottom(structureId);\n }\n // REMOVE\n scrollToIndex(index, structureId) {\n this.verticalFormationCommandInvoker.scrollToIndex(index, structureId);\n }\n // REMOVE\n setScrollPosition(position, structureId) {\n this.verticalFormationCommandInvoker.setScrollPosition(position, structureId);\n }\n setFilterConfig(config, structureId) {\n this.filterCommandInvoker.setConfig(config, structureId);\n }\n setQuickFiltersConfig(config, structureId) {\n this.commandDispatcher.dispatch(new SetConfigQuickFilterCommand(structureId, config));\n }\n setRowHeight(rowHeight, structureId) {\n this.commandDispatcher.dispatch(new SetRowHeightCommand(structureId, +rowHeight));\n }\n // REMOVE\n setContainerHeight(height, structureId) {\n this.commandDispatcher.dispatch(new StructureSetHeightCommand(structureId, +height));\n }\n // REMOVE\n setRowHeightBasedOnTheme(theme, structureId) {\n this.commandDispatcher.dispatch(new SetRowHeightBasedOnThemeCommand(structureId, theme));\n }\n setCellEdit(cellEdit, structureId) {\n this.structureCellEditArchive.next(structureId, new CellEditorManager(cellEdit));\n }\n }\n return StructureDomainPublisher;\n})();\nclass StructureApiModule {\n registerProviders(container) {\n container.provide(InMemoryStructureReadStore);\n container.provide(StructureReadModelRepository, InMemoryStructureRepository);\n container.provide(StructureAggregateFactory);\n container.provide(StructureReadModelRootConverter);\n container.provide(StructureWarehouse);\n container.provide(StructurePublisher, StructureDomainPublisher);\n container.provide(StructureInitialValuesReadyArchive);\n container.provide(InMemoryStructureAggregateStore);\n container.provide(InMemoryStructureStore);\n container.provide(StructureAggregateRepository, InMemoryStructureAggregateRepository);\n container.provide(FabricModalThemeService);\n container.provide(StructureCellEditArchive);\n }\n}\nfunction initializeStructure() {\n new DomainInitializer(new StructureApiModule(), new StructureDomainModule()).init();\n}\nclass CreateListViewCommand extends CreateAggregateCommand {\n constructor(listViewId) {\n super(listViewId, 'CreateListViewCommand');\n }\n}\nclass ListViewCommand extends Command {}\nclass SetListViewModeCommand extends ListViewCommand {\n mode;\n constructor(listViewId, mode) {\n super(listViewId, 'SetListViewModeCommand');\n this.mode = mode;\n }\n getMode() {\n return this.mode;\n }\n}\nclass ToggleListViewSelectorCommand extends ListViewCommand {\n enabled;\n constructor(listViewId, enabled) {\n super(listViewId, 'ToggleListViewSelectorCommand');\n this.enabled = enabled;\n }\n isEnabled() {\n return this.enabled;\n }\n}\nclass ListViewDispatcher {\n commandDispatcher = CoreContainer.resolve(CommandDispatcher);\n create(listViewId) {\n this.commandDispatcher.dispatch(new CreateListViewCommand(listViewId));\n }\n setMode(mode, listViewId) {\n this.commandDispatcher.dispatch(new SetListViewModeCommand(listViewId, mode));\n }\n toggleSelector(enabled, listViewId) {\n this.commandDispatcher.dispatch(new ToggleListViewSelectorCommand(listViewId, enabled));\n }\n}\nclass ListViewId extends AggregateId {\n constructor(id) {\n super(id);\n }\n toReadModelRootId() {\n return new ListViewReadModelRootId(this.getId());\n }\n}\nclass ListViewReadModelRootId extends ReadModelRootId {\n constructor(id) {\n super(id);\n }\n toAggregateId() {\n return new ListViewId(this.getId());\n }\n}\nconst listViewGlobalId = new ListViewReadModelRootId('-1');\nlet ListViewPublisher = /*#__PURE__*/(() => {\n class ListViewPublisher {\n listViewDispatcher;\n constructor(listViewDispatcher) {\n this.listViewDispatcher = listViewDispatcher;\n }\n static services = [ListViewDispatcher];\n create(listViewReadModelRootId = listViewGlobalId) {\n this.listViewDispatcher.create(listViewReadModelRootId.toAggregateId());\n }\n setMode(mode, listViewReadModelRootId = listViewGlobalId) {\n this.listViewDispatcher.setMode(mode, listViewReadModelRootId.toAggregateId());\n }\n toggleSelector(enabled, listViewReadModelRootId = listViewGlobalId) {\n this.listViewDispatcher.toggleSelector(enabled, listViewReadModelRootId.toAggregateId());\n }\n }\n return ListViewPublisher;\n})();\nclass ListViewDomainEvent extends DomainEvent {}\nclass ListViewModeSetEvent extends ListViewDomainEvent {\n mode;\n constructor(schemaId, mode) {\n super(schemaId, mode, 'ListViewModeSetEvent');\n this.mode = mode;\n }\n getTheme() {\n return this.mode;\n }\n}\nclass ListViewEventRepository extends EventRepository {\n constructor() {\n super();\n }\n onModeChange(listViewReadModelRootId) {\n return this.onEvent(listViewReadModelRootId, ListViewModeSetEvent);\n }\n}\nvar ListViewMode = /*#__PURE__*/function (ListViewMode) {\n ListViewMode[\"LIST\"] = \"List\";\n ListViewMode[\"CARD\"] = \"Card\";\n return ListViewMode;\n}(ListViewMode || {});\nclass ListViewModeArchive extends AggregateArchive {\n static default = ListViewMode.LIST;\n constructor() {\n super(ListViewModeArchive.default);\n }\n}\nlet ListViewSelectorArchive = /*#__PURE__*/(() => {\n class ListViewSelectorArchive extends AggregateArchive {\n static default = false;\n constructor() {\n super(ListViewSelectorArchive.default);\n }\n }\n return ListViewSelectorArchive;\n})();\nlet ListViewWarehouse = /*#__PURE__*/(() => {\n class ListViewWarehouse {\n listViewModeArchive;\n listViewSelectorArchive;\n constructor(listViewModeArchive, listViewSelectorArchive) {\n this.listViewModeArchive = listViewModeArchive;\n this.listViewSelectorArchive = listViewSelectorArchive;\n }\n static services = [ListViewModeArchive, ListViewSelectorArchive];\n onMode(id) {\n return this.listViewModeArchive.on(id);\n }\n onSelector(id) {\n return this.listViewSelectorArchive.on(id);\n }\n }\n return ListViewWarehouse;\n})();\nclass InMemoryListViewStore extends InMemoryStore {}\nlet InMemoryListViewAggregateStore = /*#__PURE__*/(() => {\n class InMemoryListViewAggregateStore extends InMemoryAggregateStore {\n constructor(inMemorySchemaStore) {\n super(inMemorySchemaStore);\n }\n static services = [InMemoryListViewStore];\n }\n return InMemoryListViewAggregateStore;\n})();\nclass SetListViewModeCommandHandler {\n forCommand() {\n return SetListViewModeCommand;\n }\n handle(listViewAggregate, command) {\n const mode = command.getMode();\n listViewAggregate.setMode(mode);\n }\n}\nclass ToggleListViewSelectorCommandHandler {\n forCommand() {\n return ToggleListViewSelectorCommand;\n }\n handle(listViewAggregate, command) {\n const enabled = command.isEnabled();\n listViewAggregate.toggleModeSelector(enabled);\n }\n}\nlet ListViewModeSetEventHandler = /*#__PURE__*/(() => {\n class ListViewModeSetEventHandler {\n listViewModeArchive;\n constructor(listViewModeArchive) {\n this.listViewModeArchive = listViewModeArchive;\n }\n static services = [ListViewModeArchive];\n forEvent() {\n return ListViewModeSetEvent;\n }\n handle(event) {\n if (event.ofMessageType('ListViewModeSetEvent')) {\n this.listViewModeArchive.next(event.getAggregateId(), event.getTheme());\n }\n }\n }\n return ListViewModeSetEventHandler;\n})();\nclass ListViewSelectorToggledEvent extends ListViewDomainEvent {\n enabled;\n constructor(schemaId, enabled) {\n super(schemaId, enabled, 'ListViewSelectorToggledEvent');\n this.enabled = enabled;\n }\n isEnabled() {\n return this.enabled;\n }\n}\nlet ListViewSelectorToggledEventHandler = /*#__PURE__*/(() => {\n class ListViewSelectorToggledEventHandler {\n listViewSelectorArchive;\n constructor(listViewSelectorArchive) {\n this.listViewSelectorArchive = listViewSelectorArchive;\n }\n static services = [ListViewSelectorArchive];\n forEvent() {\n return ListViewSelectorToggledEvent;\n }\n handle(event) {\n if (event.ofMessageType('ListViewSelectorToggledEvent')) {\n this.listViewSelectorArchive.next(event.getAggregateId(), event.isEnabled());\n }\n }\n }\n return ListViewSelectorToggledEventHandler;\n})();\nclass CreateListViewCommandHandler {\n forCommand() {\n return CreateListViewCommand;\n }\n}\nclass ListViewCreatedEvent extends ListViewDomainEvent {\n constructor(aggregateId) {\n super(aggregateId, null, 'ListViewCreatedEvent');\n }\n}\nclass ListViewAggregateEvent extends AggregateEvent {}\nclass ListViewCreatedAggregateEvent extends ListViewAggregateEvent {\n constructor(aggregateId) {\n super(aggregateId, 'ListViewCreatedAggregateEvent');\n }\n toDomainEvent() {\n return new ListViewCreatedEvent(this.getAggregateId());\n }\n}\nclass ListViewModeSetAggregateEvent extends ListViewAggregateEvent {\n mode;\n constructor(listViewId, mode) {\n super(listViewId, 'ListViewModeSetAggregateEvent');\n this.mode = mode;\n }\n toDomainEvent() {\n return new ListViewModeSetEvent(this.getAggregateId(), this.mode);\n }\n}\nclass SelectorVisibility {\n enabled = null;\n visible = false;\n constructor() {}\n isVisible() {\n if (this.enabled !== null) {\n return this.enabled;\n }\n return this.visible;\n }\n setEnabled(enabled) {\n this.enabled = enabled;\n }\n setVisible(visible) {\n this.visible = visible;\n }\n}\nclass ListViewSelectorToggledAggregateEvent extends ListViewAggregateEvent {\n enabled;\n constructor(listViewId, enabled) {\n super(listViewId, 'ListViewSelectorToggledAggregateEvent');\n this.enabled = enabled;\n }\n toDomainEvent() {\n return new ListViewSelectorToggledEvent(this.getAggregateId(), this.enabled);\n }\n}\nclass ListViewAggregate extends AggregateRoot {\n mode;\n selectorVisibility;\n constructor(listViewId) {\n super(listViewId, 'ListViewAggregate');\n this.setMode(ListViewMode.LIST);\n this.initSelectorVisibility();\n }\n createEvent() {\n return ListViewCreatedAggregateEvent;\n }\n setMode(mode) {\n this.mode = mode;\n this.addEvent(new ListViewModeSetAggregateEvent(this.getId(), this.mode));\n }\n toggleModeSelector(enabled) {\n this.selectorVisibility.setEnabled(enabled);\n this.emitEventAfterSelectorVisibilityChange();\n }\n initSelectorVisibility() {\n this.selectorVisibility = new SelectorVisibility();\n this.emitEventAfterSelectorVisibilityChange();\n }\n emitEventAfterSelectorVisibilityChange() {\n this.addEvent(new ListViewSelectorToggledAggregateEvent(this.getId(), this.selectorVisibility.isVisible()));\n }\n}\nclass ListViewAggregateFactory extends AggregateFactory {\n constructor() {\n super();\n }\n create(id) {\n return new ListViewAggregate(id);\n }\n}\nclass ListViewAggregateRepository extends AggregateRepository {}\nlet InMemoryListViewAggregateRepository = /*#__PURE__*/(() => {\n class InMemoryListViewAggregateRepository extends ListViewAggregateRepository {\n inMemorySchemaAggregateStore;\n constructor(inMemorySchemaAggregateStore) {\n super();\n this.inMemorySchemaAggregateStore = inMemorySchemaAggregateStore;\n }\n static services = [InMemoryListViewAggregateStore];\n findById(listViewId) {\n return this.inMemorySchemaAggregateStore.findById(listViewId);\n }\n save(listViewAggregate) {\n this.inMemorySchemaAggregateStore.save(listViewAggregate);\n }\n }\n return InMemoryListViewAggregateRepository;\n})();\nclass ListViewDomainModule {\n defineAggregate() {\n return {\n aggregateKey: listViewKey,\n createCommandHandler: CreateListViewCommandHandler,\n factory: ListViewAggregateFactory,\n repository: InMemoryListViewAggregateRepository\n };\n }\n registerKey() {\n return listViewKey;\n }\n registerProviders(container) {\n container.provide(ListViewDispatcher);\n }\n registerCommandHandlers() {\n return [SetListViewModeCommandHandler, ToggleListViewSelectorCommandHandler];\n }\n registerDomainEventHandler() {\n return [ListViewModeSetEventHandler, ListViewSelectorToggledEventHandler];\n }\n registerMultiDomainEventHandler() {\n return [];\n }\n}\nconst listViewKey = 'ListViewKey';\nclass ListViewApiModule {\n registerProviders(container) {\n container.provide(ListViewPublisher);\n container.provide(ListViewEventRepository);\n container.provide(ListViewWarehouse);\n container.provide(ListViewModeArchive);\n container.provide(ListViewSelectorArchive);\n container.provide(InMemoryListViewAggregateStore);\n container.provide(InMemoryListViewStore);\n }\n}\nfunction initializeListView() {\n new DomainInitializer(new ListViewApiModule(), new ListViewDomainModule()).init();\n}\nfunction provideStructureCommandInvoker() {\n return CoreContainer.resolve(StructurePublisher);\n}\nfunction provideStructureWarehouse() {\n return CoreContainer.resolve(StructureWarehouse);\n}\nfunction provideStructureInitialValuesReadyArchive() {\n return CoreContainer.resolve(StructureInitialValuesReadyArchive);\n}\nconst structureProviders = [{\n provide: StructurePublisher,\n useFactory: provideStructureCommandInvoker\n}, {\n provide: StructureWarehouse,\n useFactory: provideStructureWarehouse\n}, {\n provide: StructureInitialValuesReadyArchive,\n useFactory: provideStructureInitialValuesReadyArchive\n}];\nfunction createStructureDefinition() {\n return new StructureDefinition.DefaultBuilder().build();\n}\nconst icons = [StructureArrowIconModule, StructureMenuIconModule];\nconst imports$1 = [CommonModule, ReactiveFormsModule, TranslationFeatureModule, GuiTemplateModule,\n// .withConfig({\n// \tloggers: false\n// }),\nfabricImports, ResizeDetectorModule, PagingFeatureModule, SortingFeatureModule, FieldFeatureModule, FormationFeatureModule, SearchFeatureModule, FilterMenuFeatureModule, SourceFeatureModule, SummariesFeatureModule, VerticalFormationFeatureModule, SchemaFeatureModule, StructureSharedModule, StructureInfoPanelModule, StructureTopPanelModule, StructureColumnMenuModule, StructureColumnManagerModule, SchemaManagerModule, EmptySourceFeatureModule, CompositionFeatureModule, LoggerModule, SanitizeModule, icons];\nconst declarations$1 = [StructureComponent, StructureHeaderComponent, StructureHeaderColumnsComponent, StructureHeaderGroupsComponent, StructureHeaderFiltersComponent, StructureHeaderFilterComponent, StructureContentComponent, StructureRowComponent, StructureCellComponent, StructureCellEditComponent, StructureCellEditBooleanComponent, StructureContainerComponent, StructureQuickFiltersComponent, StructureBlueprintComponent, StructureRowDetailViewComponent, StructureTitlePanelComponent, StructureFooterPanelComponent, structureGates];\nconst exportDeclarations$1 = [FabricModule, StructureComponent, StructureHeaderComponent, StructureContentComponent, StructureRowComponent, StructureContainerComponent, fabricImports, PagingFeatureModule, structureGates];\nfunction provideStructureCellEditArchive() {\n return CoreContainer.resolve(StructureCellEditArchive);\n}\nfunction provideFabricModalThemeService() {\n return CoreContainer.resolve(FabricModalThemeService);\n}\ninitializeListView();\ninitializeStructure();\nclass GridViewFeatureModule {\n platformId;\n static HERMES_API = 'hermesApi';\n static exportDeclarations = Array.from(exportDeclarations$1);\n static withConfig(structureConfig = {\n cssClassName: '',\n hermesModuleConfig: {\n loggers: false\n }\n }) {\n return {\n ngModule: GridViewFeatureModule,\n providers: [{\n provide: STRUCTURE_CSS_CLASS_NAME,\n useValue: structureConfig.cssClassName\n }, {\n provide: COMMAND_LOGGER_ENABLED,\n useValue: structureConfig.hermesModuleConfig.loggers\n }, {\n provide: EVENT_LOGGER_ENABLED,\n useValue: structureConfig.hermesModuleConfig.loggers\n }, {\n provide: STRUCTURE_CSS_CLASS_NAME,\n useValue: 'structure'\n }, {\n provide: StructureDefinition,\n useFactory: createStructureDefinition\n }, ItemFactory, StructureThemeConverter, StructureIdGenerator, {\n provide: StructureCellEditArchive,\n useFactory: provideStructureCellEditArchive\n }, {\n provide: FabricModalThemeService,\n useFactory: provideFabricModalThemeService\n }, structureProviders]\n };\n }\n constructor(platformId) {\n this.platformId = platformId;\n runHermes();\n if (isPlatformBrowser(this.platformId)) {\n initHermesApi();\n window[GridViewFeatureModule.HERMES_API].loggers = false;\n }\n }\n static ɵfac = function GridViewFeatureModule_Factory(t) {\n return new (t || GridViewFeatureModule)(i0.ɵɵinject(PLATFORM_ID));\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: GridViewFeatureModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [imports$1, FabricModule, i1$1.FabricBadgeModule, i1$1.FabricButtonModule, i1$1.FabricButtonGroupModule, i1$1.FabricCheckboxModule, i1$1.FabricChipModule, i1$1.FabricDrawerModule, i1$1.FabricDropdownModule, i1$1.FabricRadioButtonModule, i1$1.FabricRadioGroupModule, i1$1.FabricProgressBarModule, i1$1.FabricProgressSpinnerModule, i1$1.FabricSelectModule, i1$1.FabricSpinnerModule, i1$1.FabricTabModule, i1$1.FabricTooltipModule, i1$1.FabricToggleButtonModule, i1$1.FabricInputModule, i1$1.FabricDialogModule, i1$1.FabricInlineDialogModule, i1$1.FabricTabModule, PagingFeatureModule]\n });\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet GuiGridIdGenerator = /*#__PURE__*/(() => {\n class GuiGridIdGenerator {\n static PREFIX = 'gui-grid-';\n static index = 0;\n generateId() {\n GuiGridIdGenerator.index++;\n return GuiGridIdGenerator.PREFIX + GuiGridIdGenerator.index;\n }\n static ɵfac = function GuiGridIdGenerator_Factory(t) {\n return new (t || GuiGridIdGenerator)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: GuiGridIdGenerator,\n factory: GuiGridIdGenerator.ɵfac\n });\n }\n return GuiGridIdGenerator;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst imports = [GridViewFeatureModule.withConfig({\n cssClassName: 'grid',\n hermesModuleConfig: {\n loggers: true\n }\n})];\nconst declarations = [GuiGridComponent, GuiGridColumnComponent];\nconst providers = [GuiGridIdGenerator, GuiGridRegister];\nconst exportDeclarations = [GuiGridComponent, GuiGridColumnComponent];\nconst elementComponents = [GuiGridComponent, GuiGridColumnComponent];\nclass GuiGridModule {\n static exportDeclarations = Array.from(exportDeclarations);\n static elementComponents = Array.from(elementComponents);\n static ɵfac = function GuiGridModule_Factory(t) {\n return new (t || GuiGridModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: GuiGridModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: providers,\n imports: [imports]\n });\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { GuiBooleanCellView, GuiCellView, GuiColumnAlign, GuiDataType, GuiDateCellView, GuiDefaultTranslation, GuiGridColumnComponent, GuiGridComponent, GuiGridModule, GuiNumberCellView, GuiPagingDisplay, GuiRowColoring, GuiRowSelectionMode, GuiRowSelectionType, GuiSortingOrder, GuiStringCellView, GuiTheme };\n//# sourceMappingURL=generic-ui-ngx-grid.mjs.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}