@mediusinc/mng-commons 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/assets/i18n/en.json +2 -2
  2. package/assets/i18n/sl.json +2 -2
  3. package/esm2020/lib/api/models/builders/query-param.builder.mjs +7 -1
  4. package/esm2020/lib/api/services/crud-api.abstract.service.mjs +2 -2
  5. package/esm2020/lib/components/action/action.component.mjs +3 -3
  6. package/esm2020/lib/components/action/editor/action-editor.component.mjs +5 -5
  7. package/esm2020/lib/components/action/models/action-execution.model.mjs +3 -2
  8. package/esm2020/lib/components/action/route/action-route.component.mjs +3 -3
  9. package/esm2020/lib/components/form/autocomplete/autocomplete.component.mjs +3 -3
  10. package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +3 -3
  11. package/esm2020/lib/components/form/editor/form-editor.component.mjs +3 -3
  12. package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +3 -3
  13. package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +3 -3
  14. package/esm2020/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +5 -5
  15. package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +3 -3
  16. package/esm2020/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.mjs +3 -3
  17. package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +3 -3
  18. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +27 -36
  19. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +3 -3
  20. package/esm2020/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +3 -3
  21. package/esm2020/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +3 -3
  22. package/esm2020/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.mjs +3 -3
  23. package/esm2020/lib/components/layout/breadcrumb.component.mjs +3 -3
  24. package/esm2020/lib/components/layout/footer.component.mjs +3 -3
  25. package/esm2020/lib/components/layout/main-layout.component.mjs +3 -3
  26. package/esm2020/lib/components/layout/menu-item.component.mjs +3 -3
  27. package/esm2020/lib/components/layout/menu.component.mjs +3 -3
  28. package/esm2020/lib/components/layout/services/main-layout.component.service.mjs +3 -3
  29. package/esm2020/lib/components/layout/topbar.component.mjs +3 -3
  30. package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +3 -3
  31. package/esm2020/lib/components/tableview/route/tableview-route.component.mjs +3 -3
  32. package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +3 -3
  33. package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +3 -3
  34. package/esm2020/lib/components/tableview/table/table.component.mjs +94 -26
  35. package/esm2020/lib/components/tableview/tableview.component.mjs +5 -13
  36. package/esm2020/lib/config/formly.config.mjs +5 -5
  37. package/esm2020/lib/data-providers/editor.data-provider.mjs +1 -1
  38. package/esm2020/lib/descriptors/action.descriptor.mjs +6 -15
  39. package/esm2020/lib/descriptors/column.descriptor.mjs +32 -1
  40. package/esm2020/lib/descriptors/editor.descriptor.mjs +3 -3
  41. package/esm2020/lib/descriptors/field-validation.descriptor.mjs +21 -0
  42. package/esm2020/lib/descriptors/field.descriptor.mjs +14 -14
  43. package/esm2020/lib/descriptors/index.mjs +2 -2
  44. package/esm2020/lib/descriptors/table.descriptor.mjs +72 -9
  45. package/esm2020/lib/descriptors/tableview.descriptor.mjs +4 -4
  46. package/esm2020/lib/directives/component.directive.mjs +3 -3
  47. package/esm2020/lib/directives/template.directive.mjs +3 -3
  48. package/esm2020/lib/mng-commons.module.mjs +4 -4
  49. package/esm2020/lib/pipes/boolean.pipe.mjs +3 -3
  50. package/esm2020/lib/pipes/enum.pipe.mjs +3 -3
  51. package/esm2020/lib/pipes/i18n-property.pipe.mjs +3 -3
  52. package/esm2020/lib/pipes/json-path.pipe.mjs +3 -3
  53. package/esm2020/lib/pipes/link-formatter.pipe.mjs +3 -3
  54. package/esm2020/lib/services/action-executor.service.mjs +6 -6
  55. package/esm2020/lib/services/commons.service.mjs +3 -3
  56. package/esm2020/lib/services/internal/commons-init.service.mjs +3 -3
  57. package/esm2020/lib/services/navigation.service.mjs +3 -3
  58. package/esm2020/lib/services/view-container.component.service.mjs +3 -3
  59. package/esm2020/lib/types/type.model.mjs +1 -1
  60. package/esm2020/lib/utils/action-data-provider.util.mjs +116 -0
  61. package/esm2020/lib/utils/editor-formly.util.mjs +31 -11
  62. package/esm2020/lib/utils/index.mjs +2 -1
  63. package/esm2020/lib/utils/styles.util.mjs +41 -0
  64. package/fesm2015/mediusinc-mng-commons.mjs +579 -260
  65. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  66. package/fesm2020/mediusinc-mng-commons.mjs +567 -251
  67. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  68. package/lib/api/models/builders/query-param.builder.d.ts +1 -0
  69. package/lib/api/services/crud-api.abstract.service.d.ts +8 -2
  70. package/lib/components/action/models/action-execution.model.d.ts +5 -3
  71. package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +1 -4
  72. package/lib/components/tableview/table/table.component.d.ts +21 -11
  73. package/lib/components/tableview/tableview.component.d.ts +1 -3
  74. package/lib/data-providers/editor.data-provider.d.ts +4 -4
  75. package/lib/descriptors/action.descriptor.d.ts +3 -3
  76. package/lib/descriptors/column.descriptor.d.ts +10 -0
  77. package/lib/descriptors/editor.descriptor.d.ts +2 -3
  78. package/lib/descriptors/field-validation.descriptor.d.ts +18 -0
  79. package/lib/descriptors/field.descriptor.d.ts +8 -9
  80. package/lib/descriptors/index.d.ts +1 -1
  81. package/lib/descriptors/table.descriptor.d.ts +27 -5
  82. package/lib/descriptors/tableview.descriptor.d.ts +2 -2
  83. package/lib/types/type.model.d.ts +7 -0
  84. package/lib/utils/action-data-provider.util.d.ts +17 -0
  85. package/lib/utils/editor-formly.util.d.ts +2 -1
  86. package/lib/utils/index.d.ts +1 -0
  87. package/lib/utils/styles.util.d.ts +14 -0
  88. package/package.json +6 -6
  89. package/scss/mng-overrides/_theme_datatable.scss +21 -0
  90. package/scss/mng-overrides/_theme_tableview.scss +0 -43
  91. package/esm2020/lib/descriptors/field.validator.mjs +0 -21
  92. package/lib/descriptors/field.validator.d.ts +0 -18
@@ -1 +1 @@
1
- {"version":3,"file":"mediusinc-mng-commons.mjs","sources":["../../src/lib/data-providers/base.data-provider.ts","../../src/lib/data-providers/editor.data-provider.ts","../../src/lib/data-providers/lookup.data-provider.ts","../../src/lib/api/models/filter-match-type.model.ts","../../src/lib/api/models/filter-param.model.ts","../../src/lib/api/models/query-mode.model.ts","../../src/lib/api/models/query-param.model.ts","../../src/lib/api/models/query-result.model.ts","../../src/lib/api/models/builders/query-param.builder.ts","../../src/lib/api/models/mappers.ts","../../src/lib/data-providers/table.data-provider.ts","../../src/lib/data-providers/tableview.data-provider.ts","../../src/lib/descriptors/action.descriptor.ts","../../src/lib/descriptors/filter.descriptor.ts","../../src/lib/descriptors/column.descriptor.ts","../../src/lib/descriptors/editor.descriptor.ts","../../src/lib/components/form/models/form-editor.event.ts","../../src/lib/descriptors/field.descriptor.ts","../../src/lib/descriptors/field.validator.ts","../../src/lib/descriptors/model.descriptor.ts","../../src/lib/descriptors/table.descriptor.ts","../../src/lib/descriptors/tableview.descriptor.ts","../../src/lib/utils/editor-formly.util.ts","../../src/lib/utils/enum.util.ts","../../src/lib/types/type.decorator.ts","../../src/lib/utils/type.util.ts","../../src/lib/utils/i18n.util.ts","../../src/lib/utils/model.util.ts","../../src/lib/utils/notification.util.ts","../../src/lib/api/utils/object-serializer.util.ts","../../src/lib/api/utils/medius-rest.util.ts","../../src/lib/components/action/models/action-execution.model.ts","../../src/lib/services/tokens/browser-storage.token.ts","../../src/lib/services/tokens/commons-init.token.ts","../../src/lib/services/tokens/default-setting.token.ts","../../src/lib/services/tokens/module-config.token.ts","../../src/lib/services/navigation.service.ts","../../src/lib/services/error-mapper.service.ts","../../src/lib/pipes/boolean.pipe.ts","../../src/lib/pipes/enum.pipe.ts","../../src/lib/pipes/i18n-property.pipe.ts","../../src/lib/pipes/link-formatter.pipe.ts","../../src/lib/pipes/json-path.pipe.ts","../../src/lib/services/action-executor.service.ts","../../src/lib/services/configuration.service.ts","../../src/lib/services/commons.service.ts","../../src/lib/services/view-container.component.service.ts","../../src/lib/components/action/action.component.ts","../../src/lib/components/action/action.component.html","../../src/lib/components/action/route/action-route.component.ts","../../src/lib/components/action/route/action-route.component.html","../../src/lib/directives/component.directive.ts","../../src/lib/directives/template.directive.ts","../../src/lib/components/form/editor/form-editor.component.ts","../../src/lib/components/form/editor/form-editor.component.html","../../src/lib/components/form/autocomplete/autocomplete.component.ts","../../src/lib/components/form/autocomplete/autocomplete.component.html","../../src/lib/components/form/dropdown/dropdown.component.ts","../../src/lib/components/form/dropdown/dropdown.component.html","../../src/lib/components/action/editor/action-editor.component.ts","../../src/lib/components/action/editor/action-editor.component.html","../../src/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.ts","../../src/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.html","../../src/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.ts","../../src/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.html","../../src/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.ts","../../src/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.html","../../src/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.ts","../../src/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.html","../../src/lib/components/tableview/models/table.event.ts","../../src/lib/components/tableview/table/column-filter/column-filter.component.ts","../../src/lib/components/tableview/table/column-filter/column-filter.component.html","../../src/lib/components/tableview/table/column-value/column-value.component.ts","../../src/lib/components/tableview/table/column-value/column-value.component.html","../../src/lib/components/tableview/table/table.component.ts","../../src/lib/components/tableview/table/table.component.html","../../src/lib/components/tableview/tableview.component.ts","../../src/lib/components/tableview/tableview.component.html","../../src/lib/components/tableview/route/tableview-route.abstract.component.ts","../../src/lib/components/tableview/route/tableview-route.component.ts","../../templates/tableview-route.component.html","../../src/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.ts","../../src/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.html","../../src/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.ts","../../src/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.html","../../src/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.ts","../../src/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.html","../../src/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.ts","../../src/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.html","../../src/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.ts","../../src/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.html","../../src/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.ts","../../src/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.html","../../src/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.ts","../../src/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.html","../../src/lib/components/layout/breadcrumb.component.ts","../../src/lib/components/layout/breadcrumb.component.html","../../src/lib/components/layout/footer.component.ts","../../src/lib/components/layout/footer.component.html","../../src/lib/components/layout/services/main-layout.component.service.ts","../../src/lib/components/layout/menu-item.component.ts","../../src/lib/components/layout/menu-item.component.html","../../src/lib/components/layout/menu.component.ts","../../src/lib/components/layout/menu.component.html","../../src/lib/components/layout/topbar.component.ts","../../src/lib/components/layout/topbar.component.html","../../src/lib/components/layout/main-layout.component.ts","../../src/lib/components/layout/main-layout.component.html","../../src/lib/services/internal/commons-init.provider.ts","../../src/lib/services/internal/commons-init.service.ts","../../src/lib/services/providers/config-service.provider.ts","../../src/lib/config/formly.config.ts","../../src/lib/services/providers/formly-config.provider.ts","../../src/lib/mng-commons.module.ts","../../src/lib/api/services/api.abstract.service.ts","../../src/lib/api/services/get-all-api.abstract.service.ts","../../src/lib/api/services/crud-api.abstract.service.ts","../../src/lib/utils/route.util.ts","../../src/lib/router/route-builder.ts","../../src/public-api.ts","../../src/mediusinc-mng-commons.ts"],"sourcesContent":["import {Type} from '@angular/core';\n\nimport {ClassType} from '../types';\n\nexport interface IDataProvider<T, S> {\n modelType: ClassType<T> | null;\n serviceType?: Type<S>;\n}\n\nexport class DataProvider<T, S> {\n protected _modelType: ClassType<T> | null;\n protected _serviceType?: Type<S>;\n\n constructor(modelType: ClassType<T> | null, serviceType?: Type<S>) {\n this._modelType = modelType;\n this._serviceType = serviceType;\n }\n\n public get serviceType() {\n return this._serviceType;\n }\n\n public get modelType() {\n return this._modelType;\n }\n\n public withServiceType(type: Type<S>): this {\n this._serviceType = type;\n return this;\n }\n}\n","import {Type} from '@angular/core';\n\nimport {Observable, throwError} from 'rxjs';\n\nimport {ClassType, IdType} from '../types';\nimport {DataProvider, IDataProvider} from './base.data-provider';\n\nexport interface IEditorDataProvider<T, S> extends IDataProvider<T, S> {\n fetch: (id: IdType, service?: S) => Observable<T>;\n create?: (item?: T, service?: S) => Observable<T>;\n update?: (id: IdType, item?: T, service?: S) => Observable<T>;\n delete?: (id: IdType, item?: T, service?: S) => Observable<T>;\n}\n\nexport class EditorDataProvider<T, S> extends DataProvider<T, S> implements IEditorDataProvider<T, S> {\n protected _fetch: (id: IdType, service?: S) => Observable<T> = id => throwError(`No fetch function provided for id ${id}.`);\n protected _create?: (item?: T, service?: S) => Observable<T>;\n protected _update?: (id: IdType, item?: T, service?: S) => Observable<T>;\n protected _delete?: (id: IdType, item?: T, service?: S) => Observable<T>;\n\n constructor(modelType: ClassType<T>, serviceType?: Type<S>) {\n super(modelType, serviceType);\n }\n\n public get fetch() {\n return this._fetch;\n }\n\n public get create() {\n return this._create;\n }\n\n public get update() {\n return this._update;\n }\n\n public get delete() {\n return this._delete;\n }\n\n public withFetch(fetch: (id: IdType, service?: S) => Observable<T>): this {\n this._fetch = fetch;\n return this;\n }\n\n public withCreate(create: (item?: T, service?: S) => Observable<T>): this {\n this._create = create;\n return this;\n }\n\n public withUpdate(update: (id: IdType, item?: T, service?: S) => Observable<T>): this {\n this._update = update;\n return this;\n }\n\n public withDelete(deleteFn: (id: IdType, item?: T, service?: S) => Observable<T>): this {\n this._delete = deleteFn;\n return this;\n }\n}\n","import {Type} from '@angular/core';\n\nimport {Observable, of} from 'rxjs';\n\nimport {MediusQueryParam} from '../api/models';\nimport {ClassType} from '../types';\nimport {DataProvider, IDataProvider} from './base.data-provider';\n\nexport interface ILookupDataProvider<T, S> extends IDataProvider<T, S> {\n lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>;\n}\n\nexport class LookupDataProvider<T, S> extends DataProvider<T, S> implements ILookupDataProvider<T, S> {\n protected _lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>> = () => of([]);\n\n constructor(modelType: ClassType<T> | null, serviceType?: Type<S>) {\n super(modelType, serviceType);\n }\n\n public get lookup() {\n return this._lookup;\n }\n\n public withLookup(lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>): this {\n this._lookup = lookup;\n return this;\n }\n}\n","/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport enum MediusFilterMatchType {\n Equals = 'EQUALS',\n NotEquals = 'NOT_EQUALS',\n FromTo = 'FROM_TO',\n Contains = 'CONTAINS',\n StartsWith = 'STARTS_WITH',\n EndsWith = 'ENDS_WITH',\n In = 'IN',\n NotIn = 'NOT_IN',\n SmallerThan = 'SMALLER_THAN',\n GreaterThan = 'GREATER_THAN'\n}\n","/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {MediusFilterMatchType} from './filter-match-type.model';\nimport {AttributeDef} from './serialization.model';\n\nexport class MediusFilterParam {\n property?: string;\n filterValue?: object;\n filterValueTo?: object;\n filterMatchType?: MediusFilterMatchType;\n filterMatchCaseSensitive?: boolean;\n\n public static discriminator?: string;\n\n public static attributeTypeMap: Array<AttributeDef> = [\n {\n name: 'property',\n baseName: 'property',\n type: 'string'\n },\n {\n name: 'filterValue',\n baseName: 'filter_value',\n type: 'object'\n },\n {\n name: 'filterValueTo',\n baseName: 'filter_value_to',\n type: 'object'\n },\n {\n name: 'filterMatchType',\n baseName: 'filter_match_type',\n type: 'FilterMatchType'\n },\n {\n name: 'filterMatchCaseSensitive',\n baseName: 'filter_match_case_sensitive',\n type: 'boolean'\n }\n ];\n\n public static getAttributeTypeMap() {\n return MediusFilterParam.attributeTypeMap;\n }\n}\n","/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport enum MediusQueryMode {\n Count = 'COUNT',\n Data = 'DATA',\n All = 'ALL'\n}\n","/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {MediusFilterParam} from './filter-param.model';\nimport {MediusQueryMode} from './query-mode.model';\nimport {AttributeDef} from './serialization.model';\n\nexport class MediusQueryParam {\n sortProperty?: Array<string>;\n sortAsc?: Array<boolean>;\n itemsOffset?: number;\n itemsPerPage?: number;\n filterParams?: Array<MediusFilterParam>;\n filterAllParam?: string;\n filterAllProperties?: Array<string>;\n validateProperties?: Array<string>;\n selectInTwoSteps?: boolean;\n sortEnumByOrdinal?: boolean;\n groupByProperties?: Array<string>;\n queryMode?: MediusQueryMode;\n\n public static discriminator?: string;\n\n public static attributeTypeMap: Array<AttributeDef> = [\n {\n name: 'sortProperty',\n baseName: 'sort_property',\n type: 'Array<string>'\n },\n {\n name: 'sortAsc',\n baseName: 'sort_asc',\n type: 'Array<boolean>'\n },\n {\n name: 'itemsOffset',\n baseName: 'items_offset',\n type: 'number'\n },\n {\n name: 'itemsPerPage',\n baseName: 'items_per_page',\n type: 'number'\n },\n {\n name: 'filterParams',\n baseName: 'filter_params',\n type: 'Array<FilterParam>'\n },\n {\n name: 'filterAllParam',\n baseName: 'filter_all_param',\n type: 'string'\n },\n {\n name: 'filterAllProperties',\n baseName: 'filter_all_properties',\n type: 'Array<string>'\n },\n {\n name: 'validateProperties',\n baseName: 'validate_properties',\n type: 'Array<string>'\n },\n {\n name: 'selectInTwoSteps',\n baseName: 'select_in_two_steps',\n type: 'boolean'\n },\n {\n name: 'sortEnumByOrdinal',\n baseName: 'sort_enum_by_ordinal',\n type: 'boolean'\n },\n {\n name: 'groupByProperties',\n baseName: 'group_by_properties',\n type: 'Array<string>'\n },\n {\n name: 'queryMode',\n baseName: 'query_mode',\n type: 'QueryMode'\n }\n ];\n\n public static getAttributeTypeMap() {\n return MediusQueryParam.attributeTypeMap;\n }\n}\n","/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {AttributeDef} from './serialization.model';\n\nexport class MediusQueryResult<T> implements IMediusQueryResult<T> {\n allDataCount?: number;\n pageData?: Array<T>;\n\n static discriminator?: string;\n\n static attributeTypeMap: Array<AttributeDef> = [\n {\n name: 'allDataCount',\n baseName: 'all_data_count',\n type: 'number'\n },\n {\n name: 'pageData',\n baseName: 'page_data',\n type: 'Array<T>'\n }\n ];\n\n static getAttributeTypeMap() {\n return MediusQueryResult.attributeTypeMap;\n }\n}\n\nexport interface IMediusQueryResult<T> {\n allDataCount?: number;\n pageData?: Array<T>;\n}\n","import {MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam} from '../';\n\nexport class MediusQueryParamBuilder {\n private constructor(private queryParam: MediusQueryParam) {}\n\n public static create(itemsPerPage = 50, itemsOffset = 0): MediusQueryParamBuilder {\n const queryParam = new MediusQueryParam();\n queryParam.itemsPerPage = itemsPerPage;\n queryParam.itemsOffset = itemsOffset;\n queryParam.queryMode = MediusQueryMode.All;\n return new MediusQueryParamBuilder(queryParam);\n }\n\n public withItemsPerPage(itemsPerPage: number): MediusQueryParamBuilder {\n this.queryParam.itemsPerPage = itemsPerPage;\n return this;\n }\n\n public withItemsOffset(itemsOffset: number): MediusQueryParamBuilder {\n this.queryParam.itemsOffset = itemsOffset;\n return this;\n }\n\n public withQueryMode(queryMode: MediusQueryMode): MediusQueryParamBuilder {\n this.queryParam.queryMode = queryMode;\n return this;\n }\n\n public withSort(property: string, asc = true): MediusQueryParamBuilder {\n if (!this.queryParam.sortProperty || !this.queryParam.sortAsc) {\n this.queryParam.sortProperty = [];\n this.queryParam.sortAsc = [];\n }\n this.queryParam.sortProperty.push(property);\n this.queryParam.sortAsc.push(asc);\n return this;\n }\n\n public withFilter(\n property: string,\n value: any,\n valueTo: any = undefined,\n matchType: MediusFilterMatchType = MediusFilterMatchType.Contains,\n matchCaseSensitive = false\n ): MediusQueryParamBuilder {\n if (!this.queryParam.filterParams) {\n this.queryParam.filterParams = [];\n }\n const filterParam = new MediusFilterParam();\n filterParam.property = property;\n filterParam.filterValue = value;\n filterParam.filterValueTo = valueTo;\n filterParam.filterMatchType = matchType;\n filterParam.filterMatchCaseSensitive = matchCaseSensitive;\n this.queryParam.filterParams.push(filterParam);\n return this;\n }\n\n public build(): MediusQueryParam {\n const queryParam = this.queryParam;\n this.queryParam = new MediusQueryParam();\n return queryParam;\n }\n}\n","import {MediusFilterMatchType} from './filter-match-type.model';\nimport {MediusFilterParam} from './filter-param.model';\nimport {MediusQueryMode} from './query-mode.model';\nimport {MediusQueryParam} from './query-param.model';\n\nexport const enumsMapBase: {[index: string]: any} = {\n FilterMatchType: MediusFilterMatchType,\n QueryMode: MediusQueryMode\n};\n\nexport const typeMapBase: {[index: string]: any} = {\n FilterParam: MediusFilterParam,\n QueryParam: MediusQueryParam\n};\n","import {Type} from '@angular/core';\n\nimport {Observable, of} from 'rxjs';\n\nimport {MediusQueryParam, MediusQueryResult} from '../api/models';\nimport {ClassType} from '../types';\nimport {DataProvider, IDataProvider} from './base.data-provider';\n\nexport interface ITableDataProvider<T, S> extends IDataProvider<T, S> {\n getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>;\n}\n\nexport class TableDataProvider<T, S> extends DataProvider<T, S> implements ITableDataProvider<T, S> {\n protected _getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>> = () => of(new MediusQueryResult<T>());\n\n constructor(modelType: ClassType<T>, serviceType?: Type<S>) {\n super(modelType, serviceType);\n }\n\n public get getAll() {\n return this._getAll;\n }\n\n public withGetAll(getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>): this {\n this._getAll = getAll;\n return this;\n }\n}\n","import {Type} from '@angular/core';\n\nimport {Observable, of} from 'rxjs';\n\nimport {MediusQueryParam, MediusQueryResult} from '../api/models';\nimport {ClassType} from '../types';\nimport {EditorDataProvider, IEditorDataProvider} from './editor.data-provider';\nimport {ITableDataProvider} from './table.data-provider';\n\nexport interface ITableviewDataProvider<T, S> extends IEditorDataProvider<T, S> {\n getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>;\n}\n\nexport class TableviewDataProvider<T, S> extends EditorDataProvider<T, S> implements ITableviewDataProvider<T, S>, ITableDataProvider<T, S>, IEditorDataProvider<T, S> {\n protected _getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>> = () => of(new MediusQueryResult<T>());\n\n constructor(modelType: ClassType<T>, serviceType?: Type<S>) {\n super(modelType, serviceType);\n }\n\n public get getAll() {\n return this._getAll;\n }\n\n public withGetAll(getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>): this {\n this._getAll = getAll;\n return this;\n }\n}\n","import {Type} from '@angular/core';\nimport {Params, QueryParamsHandling} from '@angular/router';\n\nimport {Confirmation} from 'primeng/api';\nimport {Observable, of, throwError} from 'rxjs';\n\nimport {ActionExecContext} from '../components/action/models';\nimport {DataProvider, EditorDataProvider, IDataProvider, IEditorDataProvider} from '../data-providers';\nimport {ClassType, IdType} from '../types';\nimport {TypeUtil} from '../utils';\nimport {EditorDescriptor, ModelDescriptor} from './';\n\nexport class ActionDescriptor<T> {\n protected readonly _model: ModelDescriptor<T> | null;\n protected readonly _actionName: string;\n protected readonly _parentType?: ClassType<any>;\n protected readonly _parentTypeName?: string;\n protected readonly _parentProperty?: string;\n protected readonly _i18nModelActionBaseKey?: string;\n\n protected _type: ActionTypeEnum = ActionTypeEnum.Direct;\n protected _activationTrigger: ActionActivationTriggerEnum = ActionActivationTriggerEnum.OnClick;\n protected _position: ActionPositionEnum = ActionPositionEnum.ToolbarRight;\n protected _level: ActionLevelEnum = ActionLevelEnum.Default;\n\n protected _routeUrl: string | null = null;\n\n protected _title?: string | null;\n protected _icon?: string | null;\n protected _tooltip?: string | null;\n protected _className = '';\n protected _size: ActionDescriptor.SizeEnum = ActionDescriptor.SizeEnum.Normal;\n protected _isStyleText = false;\n protected _isStyleOutlined = false;\n protected _isStyleRaised = false;\n\n protected _dataProvider?: IDataProvider<T, any>;\n protected _runFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T | undefined>;\n protected _isVisibleFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>;\n protected _isEnabledFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>;\n\n private _hasRunConfirmation = false;\n private _runConfirmationIcon?: string;\n private _runConfirmationTitle?: string;\n private _runConfirmationMessage?: string;\n private _runConfirmationAcceptTitle?: string;\n private _runConfirmationRejectTitle?: string;\n private _runConfirmationConfigMapFn?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>, confirmConfig: Confirmation) => Confirmation;\n\n protected _hasRunNotificationSuccess = true;\n private _runNotificationSuccessTitle?: string;\n private _runNotificationSuccessMessage?: string;\n\n private _hasRunNotificationError = true;\n private _runNotificationErrorTitle?: string;\n private _runNotificationErrorMessage?: string;\n\n constructor(model: ModelDescriptor<T> | null, actionName: string, parentType?: ClassType<any>, parentProperty?: string) {\n this._model = model;\n this._actionName = actionName;\n\n if ((parentType && !parentProperty) || (!parentProperty && parentProperty)) {\n throw new Error(`Provide both the parent type and parent property or none: ${parentType}, ${parentProperty}.`);\n }\n this._parentType = parentType;\n this._parentTypeName = parentType ? TypeUtil.findTypeName(parentType) : undefined;\n this._parentProperty = parentProperty;\n\n if (this._parentTypeName || this._model) {\n this._i18nModelActionBaseKey = this._parentTypeName\n ? `${this._parentTypeName}.actions.${this._parentProperty}_${actionName}`\n : `${this._model!.typeName}.actions.${actionName}`;\n }\n }\n\n public get model() {\n return this._model;\n }\n\n public get parentTypeName() {\n return this._parentTypeName;\n }\n\n public get parentProperty() {\n return this._parentProperty;\n }\n\n public get i18nModelActionBaseKey() {\n return this._i18nModelActionBaseKey;\n }\n\n public get type() {\n return this._type;\n }\n\n public get activationTrigger() {\n return this._activationTrigger;\n }\n\n public get position() {\n return this._position;\n }\n\n public get level() {\n return this._level;\n }\n\n public get routeUrl() {\n return this._routeUrl;\n }\n\n public get title() {\n return this._title;\n }\n\n public get icon() {\n return this._icon;\n }\n\n public get tooltip() {\n return this._tooltip;\n }\n\n public get dataProvider() {\n return this._dataProvider;\n }\n\n public get hasRunFunction(): boolean {\n return typeof this._runFunction === 'function';\n }\n\n public get runFunction(): (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T | undefined> {\n if (!this._runFunction) {\n throw new Error('Run function is not defined and cannot be invoked');\n }\n return this._runFunction;\n }\n\n public get isVisibleFunction() {\n return this._isVisibleFunction;\n }\n\n public get isEnabledFunction() {\n return this._isEnabledFunction;\n }\n\n public get actionName() {\n return this._actionName;\n }\n\n public get className() {\n return this._className;\n }\n\n get isStyleText() {\n return this._isStyleText;\n }\n\n get isStyleOutlined() {\n return this._isStyleOutlined;\n }\n\n get isStyleRaised() {\n return this._isStyleRaised;\n }\n\n public get size() {\n return this._size;\n }\n\n public get isSizeExtraSmall() {\n return this._size === ActionDescriptor.SizeEnum.ExtraSmall;\n }\n\n public get isSizeSmall() {\n return this._size === ActionDescriptor.SizeEnum.Small;\n }\n\n public get isSizeLarge() {\n return this._size === ActionDescriptor.SizeEnum.Large;\n }\n\n public get isSizeExtraLarge() {\n return this._size === ActionDescriptor.SizeEnum.ExtraLarge;\n }\n\n get hasRunConfirmation() {\n return this._hasRunConfirmation;\n }\n\n get runConfirmationIcon() {\n return this._runConfirmationIcon;\n }\n\n get runConfirmationTitle() {\n return this._runConfirmationTitle;\n }\n\n get runConfirmationMessage() {\n return this._runConfirmationMessage;\n }\n\n get runConfirmationAcceptTitle() {\n return this._runConfirmationAcceptTitle;\n }\n\n get runConfirmationRejectTitle() {\n return this._runConfirmationRejectTitle;\n }\n\n get runConfirmationConfigMapFn() {\n return this._runConfirmationConfigMapFn;\n }\n\n get hasRunNotificationSuccess() {\n return this._hasRunNotificationSuccess;\n }\n\n get runNotificationSuccessTitle() {\n return this._runNotificationSuccessTitle;\n }\n\n get runNotificationSuccessMessage() {\n return this._runNotificationSuccessMessage;\n }\n\n get hasRunNotificationError() {\n return this._hasRunNotificationError;\n }\n\n get runNotificationErrorTitle() {\n return this._runNotificationErrorTitle;\n }\n\n get runNotificationErrorMessage() {\n return this._runNotificationErrorMessage;\n }\n\n public withDataProvider(dataProvider: IDataProvider<T, any>): this {\n this._dataProvider = dataProvider;\n return this;\n }\n\n public withServiceType<S>(serviceType: Type<S>): this {\n if (!this._model) {\n throw new Error(`Cannot set data provider if no model type is provided for action ${this._actionName}`);\n }\n this._dataProvider = new DataProvider(this._model.type, serviceType);\n return this;\n }\n\n public withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T | undefined>): this {\n this._runFunction = fn;\n return this;\n }\n\n public withIsVisibleFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<boolean>): this {\n this._isVisibleFunction = fn;\n return this;\n }\n\n public withIsEnabledFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<boolean>): this {\n this._isEnabledFunction = fn;\n return this;\n }\n\n public withRouteTrigger(routeUrl: string): this {\n this._activationTrigger = ActionActivationTriggerEnum.OnRoute;\n this._routeUrl = routeUrl;\n return this;\n }\n\n public withLevel(level: ActionLevelEnum): this {\n this._level = level;\n return this;\n }\n\n /**\n * Overrides default title key with model action key (${model.typeName}.actions.${actionName}). Not relevant if parentType name is provided.\n */\n public withModelTitle(): this {\n this._title = `${this._i18nModelActionBaseKey}.title`;\n return this;\n }\n\n /**\n * Overrides default title key (${actionName}.title). If null, no title will be shown.\n * @param title Title i18n key or title.\n */\n public withTitle(title: string | null): this {\n this._title = title;\n return this;\n }\n\n public withIcon(icon: string | null): this {\n this._icon = icon;\n return this;\n }\n\n public withTooltip(tooltip: string | null): this {\n this._title = tooltip;\n return this;\n }\n\n public withClassName(className: string): this {\n this._className = className;\n return this;\n }\n\n public withSize(size: ActionDescriptor.SizeEnum = ActionDescriptor.SizeEnum.Normal): this {\n this._size = size;\n return this;\n }\n\n public withStyle(styleText = false, styleOutlined = false, styleRaised = false): this {\n this._isStyleText = styleText;\n this._isStyleOutlined = styleOutlined;\n this._isStyleRaised = styleRaised;\n return this;\n }\n\n public withPosition(position: ActionPositionEnum): this {\n this._position = position;\n return this;\n }\n\n /**\n * Add a confirmation dialogue to the action\n * @param icon the icon to display on the confirmation dialogue\n * @param title the title of the confirmation dialogue\n * @param message the message on the confirmation dialogue\n * @param acceptTitle the title of the accepting button\n * @param rejectTitle the title of the rejecting button\n * @param runConfirmationConfigMapFn function used to generate the confirmation dialogue. **WARNING** changing the *accept* and *reject* methods of the *confirmConfig* parameter\n * may lead to unexpected behaviour\n */\n public withRunConfirmation(\n icon = 'pi pi-exclamation-triangle',\n title?: string,\n message?: string,\n acceptTitle?: string,\n rejectTitle?: string,\n runConfirmationConfigMapFn?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>, confirmConfig: Confirmation) => Confirmation\n ): this {\n this._hasRunConfirmation = true;\n this._runConfirmationIcon = icon;\n this._runConfirmationTitle = title;\n this._runConfirmationMessage = message;\n this._runConfirmationAcceptTitle = acceptTitle;\n this._runConfirmationRejectTitle = rejectTitle;\n this._runConfirmationConfigMapFn = runConfirmationConfigMapFn;\n return this;\n }\n\n public withRunNotificationSuccess(title?: string, message?: string, hasNotification = true) {\n this._hasRunNotificationSuccess = hasNotification;\n this._runNotificationSuccessTitle = title;\n this._runNotificationSuccessMessage = message;\n }\n\n public withRunNotificationError(title?: string, message?: string, hasNotification = true) {\n this._hasRunNotificationError = hasNotification;\n this._runNotificationErrorTitle = title;\n this._runNotificationErrorMessage = message;\n }\n}\n\nexport namespace ActionDescriptor {\n export enum SizeEnum {\n ExtraSmall,\n Small,\n Normal,\n Large,\n ExtraLarge\n }\n}\n\nexport class ActionSimpleDescriptor<T> extends ActionDescriptor<T> {\n constructor(actionName: string, modelType?: ClassType<T>, idProperty?: string, titleProperty?: string) {\n const model = modelType ? new ModelDescriptor<T>(modelType, idProperty, titleProperty) : null;\n super(model, actionName);\n }\n}\n\nexport class ActionEditorDescriptor<T> extends ActionDescriptor<T> {\n private readonly _editorDescriptor: EditorDescriptor<T>;\n\n protected _editorActions: ActionDescriptor<T>[] = [];\n protected _editorTitle?: string | null = undefined;\n\n protected _hasFetchNotificationSuccess = false;\n protected _fetchNotificationSuccessTitle?: string;\n protected _fetchNotificationSuccessMessage?: string;\n\n protected _dialogSize: ActionEditorDescriptor.DialogSizeEnum = ActionEditorDescriptor.DialogSizeEnum.Normal;\n protected _dialogClassName?: string;\n\n protected override _dataProvider?: IEditorDataProvider<T, any>;\n protected _fetchFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;\n protected _submitFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;\n\n protected _editorComponent?: Type<any>;\n\n constructor(editorDescriptor: EditorDescriptor<T>, actionName: string, parentType?: ClassType<any>, parentProperty?: string) {\n super(editorDescriptor.model, actionName, parentType, parentProperty);\n this._type = ActionTypeEnum.Editor;\n this._editorDescriptor = editorDescriptor;\n this._editorActions.push(new ActionEditorSubmitDescriptor(this), new ActionEditorSubmitDescriptor(this, ActionEditorSubmitDescriptor.TypeEnum.Cancel));\n }\n\n public get editorTitle() {\n return this._editorTitle;\n }\n\n public get editorDescriptor() {\n return this._editorDescriptor;\n }\n\n public get dialogSize() {\n return this._dialogSize;\n }\n\n public get dialogClassName() {\n return this._dialogClassName;\n }\n\n public get hasFetchNotificationSuccess() {\n return this._hasFetchNotificationSuccess;\n }\n\n public get fetchNotificationSuccessTitle() {\n return this._fetchNotificationSuccessTitle;\n }\n\n public get fetchNotificationSuccessMessage() {\n return this._fetchNotificationSuccessMessage;\n }\n\n public override get dataProvider() {\n return this._dataProvider;\n }\n\n public override get runFunction(): (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T> {\n throw new Error('Run function cannot be used in editor action. Use submit function instead!');\n }\n\n public get fetchFunction(): (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T> {\n if (!this._fetchFunction) {\n return ctx => {\n console.warn(`Fetch function is not provided for function ${this._actionName}, using default and returning context item`, ctx.data?.item);\n return of(ctx.data?.item ? ctx.data.item : ({} as T));\n };\n }\n return this._fetchFunction;\n }\n\n public get submitFunction() {\n return this._submitFunction;\n }\n\n public get editorActions() {\n return this._editorActions;\n }\n\n public get editorComponent() {\n return this._editorComponent;\n }\n\n public withEditorTitle(title: string | null): this {\n this._editorTitle = title;\n return this;\n }\n\n public override withDataProvider(dataProvider: IEditorDataProvider<T, any>): this {\n this._dataProvider = dataProvider;\n return this;\n }\n\n public override withServiceType<S>(serviceType: Type<S>): this {\n if (!this._model) {\n throw new Error(`Cannot set data provider if no model type is provided for action ${this._actionName}`);\n }\n this._dataProvider = new EditorDataProvider(this._model.type, serviceType);\n return this;\n }\n\n public withDialogSize(size = ActionEditorDescriptor.DialogSizeEnum.Normal): this {\n this._dialogSize = size;\n return this;\n }\n\n public withDialogClassName(className: string): this {\n this._dialogClassName = className;\n return this;\n }\n\n public override withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T>): this {\n return this.withSubmitFunction(fn as (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>);\n }\n\n public withFetchFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this {\n this._fetchFunction = fn;\n return this;\n }\n\n public withSubmitFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this {\n this._submitFunction = fn;\n return this;\n }\n\n public withFetchNotificationError(title?: string, message?: string, hasNotification = true): this {\n this._hasFetchNotificationSuccess = hasNotification;\n this._fetchNotificationSuccessTitle = title;\n this._fetchNotificationSuccessMessage = message;\n return this;\n }\n\n public withEditorAction(action: ActionDescriptor<T>): this {\n this._editorActions.push(action);\n return this;\n }\n\n public withEditorActions(actions: ActionDescriptor<T>[]): this {\n this._editorActions = actions;\n return this;\n }\n\n public withEditorComponent(editorComponent: Type<any>): this {\n this._editorComponent = editorComponent;\n return this;\n }\n}\n\nexport namespace ActionEditorDescriptor {\n export enum DialogSizeEnum {\n ExtraSmall,\n Small,\n Normal,\n Large,\n ExtraLarge\n }\n}\n\nexport class ActionEditorSubmitDescriptor<T> extends ActionDescriptor<T> {\n private readonly _editorAction: ActionEditorDescriptor<T>;\n private readonly _submitType: ActionEditorSubmitDescriptor.TypeEnum;\n\n constructor(editorAction: ActionEditorDescriptor<T>, submitType = ActionEditorSubmitDescriptor.TypeEnum.Submit) {\n super(editorAction.model, submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit ? 'submit' : 'cancel');\n this._editorAction = editorAction;\n this._submitType = submitType;\n this._position = ActionPositionEnum.FooterRight;\n this._isStyleText = true;\n }\n\n public get submitType() {\n return this._submitType;\n }\n}\n\nexport namespace ActionEditorSubmitDescriptor {\n export enum TypeEnum {\n Submit,\n Cancel\n }\n}\n\nexport class ActionEditorDetailsDescriptor<T> extends ActionEditorDescriptor<T> {\n public static readonly ACTION_NAME = 'details';\n\n constructor(editorDescriptor: EditorDescriptor<T>) {\n super(editorDescriptor, ActionEditorDetailsDescriptor.ACTION_NAME);\n this.withPosition(ActionPositionEnum.RowClick);\n this.withRouteTrigger(':itemId');\n this.withFetchFunction(ctx =>\n ctx.dataProvider?.fetch && ctx.data?.itemId\n ? ctx.dataProvider.fetch(ctx.data?.itemId, ctx.serviceInstance)\n : throwError(new Error(`Data provider fetch function or item id ${ctx.data?.itemId} is missing.`))\n );\n this.withEditorActions([new ActionEditorSubmitDescriptor(this, ActionEditorSubmitDescriptor.TypeEnum.Cancel)]);\n }\n\n public override withServiceType<S>(serviceType: Type<S>): this {\n return this.withServiceFetchFunction(serviceType);\n }\n\n public withServiceFetchFunction<S>(serviceType: Type<S>, fetchFn?: (id: IdType, service?: S) => Observable<T>): this {\n const dataProvider = new EditorDataProvider(this._model!.type, serviceType);\n if (fetchFn) {\n dataProvider.withFetch(fetchFn);\n }\n this._dataProvider = dataProvider;\n return this;\n }\n}\n\nexport class ActionEditorAddDescriptor<T> extends ActionEditorDescriptor<T> {\n public static readonly ACTION_NAME = 'add';\n\n constructor(editorDescriptor: EditorDescriptor<T>) {\n super(editorDescriptor, ActionEditorAddDescriptor.ACTION_NAME);\n this.withPosition(ActionPositionEnum.ToolbarLeft);\n this.withRouteTrigger('add');\n this.withSubmitFunction(ctx =>\n ctx.dataProvider?.create ? ctx.dataProvider.create(ctx.data?.item, ctx.serviceInstance) : throwError(new Error(`Data provider create function is missing.`))\n );\n this.withLevel(ActionLevelEnum.Success);\n this.withIcon('pi pi-plus');\n }\n\n public override withServiceType<S>(serviceType: Type<S>): this {\n return this.withServiceSubmitFunction(serviceType);\n }\n\n public withServiceSubmitFunction<S>(serviceType: Type<S>, createFn?: (item?: T, service?: S) => Observable<T>, fetchFn?: (id: IdType, service?: S) => Observable<T>): this {\n const dataProvider = new EditorDataProvider(this._model!.type, serviceType);\n if (createFn) {\n dataProvider.withCreate(createFn);\n }\n if (fetchFn) {\n dataProvider.withFetch(fetchFn);\n }\n this._dataProvider = dataProvider;\n return this;\n }\n}\n\nexport class ActionEditorEditDescriptor<T> extends ActionEditorDescriptor<T> {\n public static readonly ACTION_NAME = 'edit';\n\n constructor(editorDescriptor: EditorDescriptor<T>) {\n super(editorDescriptor, ActionEditorEditDescriptor.ACTION_NAME);\n this.withPosition(ActionPositionEnum.RowInline);\n this.withTitle(null);\n this.withRouteTrigger(':itemId/edit');\n this.withFetchFunction(ctx =>\n ctx.dataProvider?.fetch && ctx.data?.itemId\n ? ctx.dataProvider.fetch(ctx.data.itemId, ctx.serviceInstance)\n : throwError(new Error(`Data provider fetch function or item id ${ctx.data?.itemId} is missing.`))\n );\n this.withSubmitFunction(ctx =>\n ctx.dataProvider?.update && ctx.data?.itemId\n ? ctx.dataProvider.update(ctx.data.itemId, ctx.data?.item, ctx.serviceInstance)\n : throwError(new Error(`Data provider update function or item id ${ctx.data?.itemId} is missing.`))\n );\n this.withIcon('pi pi-pencil');\n }\n\n public override withServiceType<S>(serviceType: Type<S>): this {\n return this.withServiceSubmitFunction(serviceType);\n }\n\n public withServiceSubmitFunction<S>(\n serviceType: Type<S>,\n updateFn?: (id: IdType, item?: T, service?: S) => Observable<T>,\n fetchFn?: (id: IdType, service?: S) => Observable<T>\n ): this {\n const dataProvider = new EditorDataProvider(this._model!.type, serviceType);\n if (updateFn) {\n dataProvider.withUpdate(updateFn);\n }\n if (fetchFn) {\n dataProvider.withFetch(fetchFn);\n }\n this._dataProvider = dataProvider;\n return this;\n }\n}\n\nexport class ActionDeleteDescriptor<T> extends ActionDescriptor<T> {\n public static readonly ACTION_NAME = 'delete';\n\n constructor(model: ModelDescriptor<T>) {\n super(model, ActionDeleteDescriptor.ACTION_NAME);\n this.withPosition(ActionPositionEnum.RowInline);\n this.withTitle(null);\n this.withRunFunction(ctx => {\n const editorDataProvider = ctx.dataProvider as IEditorDataProvider<T, any>;\n return editorDataProvider?.delete && ctx.data?.itemId\n ? editorDataProvider.delete(ctx.data.itemId, ctx.data.item, ctx.serviceInstance)\n : throwError(new Error(`Data provider delete function or item id ${ctx.data?.itemId} is missing.`));\n });\n this.withLevel(ActionLevelEnum.Danger);\n this.withIcon('pi pi-trash');\n this.withRunConfirmation(undefined);\n }\n\n public override withServiceType<S>(serviceType: Type<S>): this {\n return this.withServiceDeleteFunction(serviceType);\n }\n\n public withServiceDeleteFunction<S>(serviceType: Type<S>, deleteFn?: (id: IdType, item?: T, service?: S) => Observable<T>): this {\n const dataProvider = new EditorDataProvider(this._model!.type, serviceType);\n if (deleteFn) {\n dataProvider.withDelete(deleteFn);\n }\n this._dataProvider = dataProvider;\n return this;\n }\n}\n\nexport class ActionLinkDescriptor<T> extends ActionDescriptor<T> {\n private _url = '';\n private _pathSegments: string[] = [];\n private _queryParams?: Params;\n private _queryParamsHandling?: QueryParamsHandling;\n private _replaceUrl = false;\n private _target = '_self';\n private _isStyleLink = false;\n\n constructor(model: ModelDescriptor<T> | null = null, actionName = 'link') {\n super(model, actionName);\n }\n\n public get url(): string {\n return this._url;\n }\n\n public get pathSegments(): string[] {\n return this._pathSegments;\n }\n\n public get queryParams(): Params | undefined {\n return this._queryParams;\n }\n\n public get queryParamsHandling(): QueryParamsHandling | undefined {\n return this._queryParamsHandling;\n }\n\n public get replaceUrl(): boolean {\n return this._replaceUrl;\n }\n\n public get target(): string {\n return this._target;\n }\n\n public get isStyleLink(): boolean {\n return this._isStyleLink;\n }\n\n public withHref(url: string): this {\n this._url = url;\n return this;\n }\n\n public withRouterLink(...pathSegments: string[]): this {\n this._pathSegments = pathSegments;\n return this;\n }\n\n public withQueryParams(queryParams: Params, queryParamsHandling?: QueryParamsHandling): this {\n this._queryParams = queryParams;\n this._queryParamsHandling = queryParamsHandling;\n return this;\n }\n\n public withReplaceUrl(replaceUrl = false): this {\n this._replaceUrl = replaceUrl;\n return this;\n }\n\n public withTarget(target: '_self' | '_blank' = '_self'): this {\n this._target = target;\n return this;\n }\n\n public withStyleLink(isStyleLink: boolean): this {\n this._isStyleLink = isStyleLink;\n return this;\n }\n}\n\nexport enum ActionPositionEnum {\n ToolbarLeft,\n ToolbarRight,\n TableHeader,\n RowInline,\n RowClick,\n FooterLeft,\n FooterRight\n}\n\nexport enum ActionActivationTriggerEnum {\n OnClick, // action is triggered for activation on click\n OnRoute // action is triggered for activation by route url\n}\n\nexport enum ActionTypeEnum {\n Direct, // action is directly activated and executed\n Event, // action is executed by outputting event, no additional activation is done\n Editor // editor providing middle step for activation\n}\n\nexport enum ActionLevelEnum {\n Default,\n Primary,\n Secondary,\n Info,\n Help,\n Success,\n Warning,\n Danger\n}\n","import {Type} from '@angular/core';\n\nimport {Observable, of} from 'rxjs';\n\nimport {MediusQueryParam} from '../api/models';\nimport {ILookupDataProvider, LookupDataProvider} from '../data-providers';\nimport {EnumValue} from '../models';\nimport {ClassType, EnumConstantType, EnumType} from '../types';\nimport {EnumUtil, ModelUtil, TypeUtil} from '../utils';\nimport {ILookupDescriptor} from './lookup.descriptor';\n\nexport class FilterDescriptor<T> {\n protected readonly _property: string;\n protected _filterType = FilterDescriptor.TypeEnum.String;\n protected _filterProperty?: string;\n\n protected _matchModes: string[] | null = null;\n\n protected _placeholder?: string;\n protected _className = '';\n\n constructor(property: string) {\n this._property = property;\n }\n\n public get filterType() {\n return this._filterType;\n }\n\n public get filterProperty() {\n return this._filterProperty;\n }\n\n public get matchModes() {\n return this._matchModes;\n }\n\n public get placeholder() {\n return this._placeholder;\n }\n\n public get className() {\n return this._className;\n }\n\n public get property() {\n return this._property;\n }\n\n public asFilterType(filterType: FilterDescriptor.TypeEnum) {\n this._filterType = filterType;\n return this;\n }\n\n /**\n * Sets different filter property name instead of default property. Use this if API requires different property provided to perform correct filter.\n * @param filterProperty\n */\n public withFilterProperty(filterProperty: string): this {\n this._filterProperty = filterProperty;\n return this;\n }\n\n public withPlaceholder(placeholder: string): this {\n this._placeholder = placeholder;\n return this;\n }\n\n public withClassName(className: string): this {\n this._className = className;\n return this;\n }\n\n public withMatchModes(matchModes: Array<FilterDescriptor.MatchModeEnum>): this {\n this._matchModes = matchModes;\n return this;\n }\n\n public copy(): FilterDescriptor<T> {\n const descriptor = new FilterDescriptor<T>(this._property);\n this.copyFieldsTo(descriptor);\n return descriptor;\n }\n\n protected copyFieldsTo(descriptor: FilterDescriptor<T>) {\n descriptor._filterType = this._filterType;\n descriptor._filterProperty = this._filterProperty;\n descriptor._placeholder = this._placeholder;\n descriptor._className = this._className;\n }\n}\n\nexport namespace FilterDescriptor {\n export enum TypeEnum {\n String,\n Number,\n Boolean,\n Date,\n Lookup,\n LookupEnum\n }\n\n export enum MatchModeEnum {\n StartsWith = 'startsWith',\n Contains = 'contains',\n EndsWith = 'endsWith',\n Equals = 'equals',\n NotEquals = 'notEquals',\n In = 'in',\n LessThan = 'lt',\n LessThanOrEqualTo = 'lte',\n GreaterThan = 'gt',\n GreaterThanOrEqualTo = 'gte',\n Between = 'between',\n DateIs = 'dateIs',\n DateIsNot = 'dateIsNot',\n DateBefore = 'dateBefore',\n DateAfter = 'dateAfter'\n }\n}\n\nexport class FilterLookupDescriptor<T> extends FilterDescriptor<T> implements ILookupDescriptor<T> {\n protected readonly _modelType: ClassType<T> | null = null;\n protected _lookupType?: FilterLookupDescriptor.LookupTypeEnum = FilterLookupDescriptor.LookupTypeEnum.Dropdown;\n\n protected _dataProvider?: ILookupDataProvider<T, any>;\n protected _itemsLabelProperty?: string;\n protected _itemsLabelTranslate = false;\n protected _itemsValueProperty?: string;\n protected _dataKeyProperty?: string;\n protected _multiselect = false;\n\n protected _dropdownClassName = 'mng-filter-lookup-dropdown';\n\n protected _autocompleteOpenOnFocus = false;\n protected _autocompleteInlineSearch = false;\n\n constructor(property: string, modelType: ClassType<T> | null) {\n super(property);\n this._modelType = modelType;\n this._filterType = FilterDescriptor.TypeEnum.Lookup;\n ModelUtil.trySetLookupItemsProperties(this);\n }\n\n public get lookupType() {\n return this._lookupType;\n }\n\n public get dataProvider() {\n return this._dataProvider;\n }\n\n public get itemsLabelProperty() {\n return this._itemsLabelProperty;\n }\n\n public get itemsLabelTranslate() {\n return this._itemsLabelTranslate;\n }\n\n public get itemsValueProperty() {\n return this._itemsValueProperty;\n }\n\n public get dataKeyProperty() {\n return this._dataKeyProperty;\n }\n\n public get multiselect() {\n return this._multiselect;\n }\n\n public get autocompleteOpenOnFocus() {\n return this._autocompleteOpenOnFocus;\n }\n\n public get autocompleteInlineSearch() {\n return this._autocompleteInlineSearch;\n }\n\n public get dropdownClassName() {\n return this._dropdownClassName;\n }\n\n public get modelType() {\n return this._modelType;\n }\n\n public withItemsLabelProperty(itemsLabelProperty: string, translate = false): this {\n this._itemsLabelProperty = itemsLabelProperty;\n this._itemsLabelTranslate = translate;\n return this;\n }\n\n public withItemsValueProperty(itemsValueProperty: string): this {\n this._itemsValueProperty = itemsValueProperty;\n this._dataKeyProperty = itemsValueProperty;\n return this;\n }\n\n public withDataKeyProperty(dataKeyProperty: string): this {\n this._dataKeyProperty = dataKeyProperty;\n this._itemsValueProperty = dataKeyProperty;\n return this;\n }\n\n public withLookup<S>(lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>, serviceType?: Type<S>): this {\n const dataProvider = new LookupDataProvider<T, S>(this._modelType);\n if (serviceType) {\n dataProvider.withServiceType(serviceType);\n }\n dataProvider.withLookup(lookup);\n this._dataProvider = dataProvider;\n return this;\n }\n\n public withLookupDataProvider(dataProvider: ILookupDataProvider<T, any>): this {\n this._dataProvider = dataProvider;\n return this;\n }\n\n public withMultiselect(multiselect = true) {\n this._multiselect = multiselect;\n return this;\n }\n\n public withDropdownClassName(dropdownClassName: string): this {\n this._dropdownClassName = dropdownClassName;\n return this;\n }\n\n public asAutocomplete(openOnFocus = false, inlineSearch = false): this {\n this._lookupType = FilterLookupDescriptor.LookupTypeEnum.Autocomplete;\n this._autocompleteOpenOnFocus = openOnFocus;\n this._autocompleteInlineSearch = inlineSearch;\n return this;\n }\n\n public override copy(): FilterLookupDescriptor<T> {\n const descriptor = new FilterLookupDescriptor<T>(this._property, this._modelType);\n this.copyFieldsTo(descriptor);\n return descriptor;\n }\n\n protected override copyFieldsTo(filter: FilterLookupDescriptor<T>) {\n super.copyFieldsTo(filter);\n filter._dataProvider = this._dataProvider;\n filter._lookupType = this._lookupType;\n filter._itemsLabelProperty = this._itemsLabelProperty;\n filter._itemsLabelTranslate = this._itemsLabelTranslate;\n filter._itemsValueProperty = this._itemsValueProperty;\n filter._dataKeyProperty = this._dataKeyProperty;\n filter._multiselect = this._multiselect;\n filter._dropdownClassName = this._dropdownClassName;\n filter._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;\n filter._autocompleteInlineSearch = this._autocompleteInlineSearch;\n }\n}\n\nexport class FilterLookupEnumDescriptor extends FilterLookupDescriptor<EnumValue<string | number>> {\n private readonly _enumType: EnumType;\n\n constructor(property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue = false, optionsTitlePath?: string | null) {\n super(property, null);\n this._enumType = enumType;\n if (typeof optionsTitlePath === 'undefined') {\n optionsTitlePath = TypeUtil.findEnumName(enumType);\n }\n const optionEnumValues = Array.isArray(options)\n ? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath ?? undefined)\n : EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath ?? undefined);\n const dataProvider = new LookupDataProvider<EnumValue<string | number>, any>(null).withLookup(() => of(optionEnumValues));\n this.withLookupDataProvider(dataProvider);\n this.withItemsLabelProperty('title', optionsTitlePath !== null);\n this.withItemsValueProperty('value');\n }\n\n public get enumType() {\n return this._enumType;\n }\n\n public override asAutocomplete(openOnFocus = true): this {\n super.asAutocomplete(openOnFocus, true);\n return this;\n }\n\n public override copy(): FilterLookupEnumDescriptor {\n const field = new FilterLookupEnumDescriptor(this._property, this._enumType, []);\n this.copyFieldsTo(field);\n return field;\n }\n}\n\nexport namespace FilterLookupDescriptor {\n export enum LookupTypeEnum {\n Dropdown,\n Autocomplete\n }\n}\n","import {Type} from '@angular/core';\n\nimport {IColumnValueComponent} from '../models';\nimport {ClassType, EnumConstantType, EnumType} from '../types';\nimport {ModelUtil, TypeUtil} from '../utils';\nimport {FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor} from './filter.descriptor';\nimport {TableDescriptor} from './table.descriptor';\n\nexport class ColumnDescriptor<T, TT> {\n private readonly _table: TableDescriptor<TT>;\n private readonly _property: string;\n private _columnType: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.String;\n private _title?: string;\n private _jsonPath?: string;\n private _isSortEnabled = false;\n private _filterDescriptor?: FilterDescriptor<T>;\n private _displayFormat?: string;\n\n // enum specifics\n private _enumType?: EnumType;\n private _enumTitlePath?: string | null;\n private _enumNameAsValue = false;\n\n // boolean specifics\n private _booleanAsIcon = false;\n private _booleanYes?: string;\n private _booleanNo?: string;\n\n // model specifics\n private _objectModelType?: ClassType<any>;\n private _objectTitleProperty?: string;\n\n // custom specifics\n private _customComponentType?: Type<IColumnValueComponent<TT>>;\n\n constructor(table: TableDescriptor<TT>, property: string) {\n this._table = table;\n this._property = property;\n }\n\n public get columnType() {\n return this._columnType;\n }\n\n public get title() {\n return this._title;\n }\n\n public get jsonPath() {\n return this._jsonPath;\n }\n\n public get isSortEnabled() {\n return this._isSortEnabled;\n }\n\n public get filterDescriptor() {\n return this._filterDescriptor;\n }\n\n public get displayFormat() {\n return this._displayFormat;\n }\n\n public get table() {\n return this._table;\n }\n\n public get property() {\n return this._property;\n }\n\n public get enumType() {\n return this._enumType;\n }\n\n public get enumTitlePath() {\n return this._enumTitlePath;\n }\n\n public get enumNameAsValue() {\n return this._enumNameAsValue;\n }\n\n public get booleanAsIcon() {\n return this._booleanAsIcon;\n }\n\n public get booleanYes() {\n return this._booleanYes;\n }\n\n public get booleanNo() {\n return this._booleanNo;\n }\n\n public get objectModelType() {\n return this._objectModelType;\n }\n\n public get objectTitleProperty() {\n return this._objectTitleProperty;\n }\n\n public get customComponentType() {\n return this._customComponentType;\n }\n\n public asType(type: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.String): this {\n this._columnType = type;\n return this;\n }\n\n public asNumber(displayFormat = '1.0-0'): this {\n this._columnType = ColumnDescriptor.TypeEnum.Number;\n this._displayFormat = displayFormat;\n return this;\n }\n\n public asDate(displayFormat = 'dd.MM.yyyy'): this {\n this._columnType = ColumnDescriptor.TypeEnum.Date;\n this._displayFormat = displayFormat;\n return this;\n }\n\n public asBoolean(yes?: string, no?: string, asIcon = false): this {\n this._columnType = ColumnDescriptor.TypeEnum.Boolean;\n this._booleanAsIcon = asIcon;\n this._booleanYes = yes;\n this._booleanNo = no;\n return this;\n }\n\n public asEnum(enumType: EnumType, nameAsValue = false, titlePath?: string | null): this {\n this._columnType = ColumnDescriptor.TypeEnum.Enum;\n this._enumType = enumType;\n this._enumNameAsValue = nameAsValue;\n if (typeof titlePath === 'undefined') {\n titlePath = TypeUtil.findEnumName(enumType);\n }\n this._enumTitlePath = titlePath;\n return this;\n }\n\n public asCustomComponent(customComponentType: Type<IColumnValueComponent<TT>>): this {\n this._columnType = ColumnDescriptor.TypeEnum.Custom;\n this._customComponentType = customComponentType;\n return this;\n }\n\n public withObjectProperty<MT>(modelType: ClassType<MT>, titleProperty?: string): this {\n this._objectModelType = modelType;\n if (!titleProperty) {\n this._objectTitleProperty = ModelUtil.findTitleAttribute(modelType) ?? undefined;\n } else {\n this._objectTitleProperty = titleProperty;\n }\n return this;\n }\n\n public withTitle(title: string): this {\n this._title = title;\n return this;\n }\n\n public withJsonPath(path: string): this {\n this._jsonPath = path;\n return this;\n }\n\n public withFilter(forceSimple = false): FilterDescriptor<T> {\n this._filterDescriptor = new FilterDescriptor<any>(this._property);\n let filterType: FilterDescriptor.TypeEnum;\n\n if (!forceSimple && this._objectModelType) {\n return this.withFilterLookup();\n }\n switch (this._columnType) {\n case ColumnDescriptor.TypeEnum.Number:\n filterType = FilterDescriptor.TypeEnum.Number;\n break;\n case ColumnDescriptor.TypeEnum.Boolean:\n filterType = FilterDescriptor.TypeEnum.Boolean;\n break;\n case ColumnDescriptor.TypeEnum.Date:\n filterType = FilterDescriptor.TypeEnum.Date;\n break;\n case ColumnDescriptor.TypeEnum.Enum:\n if (!forceSimple) {\n return this.withFilterLookupEnum();\n } else {\n filterType = FilterDescriptor.TypeEnum.String;\n break;\n }\n case ColumnDescriptor.TypeEnum.String:\n case ColumnDescriptor.TypeEnum.Custom:\n default:\n filterType = FilterDescriptor.TypeEnum.String;\n break;\n }\n this._filterDescriptor.asFilterType(filterType);\n return this._filterDescriptor;\n }\n\n public withFilterLookup(): FilterLookupDescriptor<T> {\n const filterDescriptor = new FilterLookupDescriptor<any>(this._property, this._objectModelType ?? null);\n this._filterDescriptor = filterDescriptor;\n return filterDescriptor;\n }\n\n public withFilterLookupEnum(options?: Array<EnumConstantType>): FilterLookupEnumDescriptor {\n if (this._columnType !== ColumnDescriptor.TypeEnum.Enum || !this._enumType) {\n throw new Error(`Column ${this._property} is not of type enum or enum type is undefined.`);\n }\n const filterDescriptor = new FilterLookupEnumDescriptor(this._property, this._enumType, options, this._enumNameAsValue, this._enumTitlePath);\n this._filterDescriptor = filterDescriptor;\n return filterDescriptor;\n }\n\n public withSort(isEnabled = true): this {\n this._isSortEnabled = isEnabled;\n return this;\n }\n\n public copy(): ColumnDescriptor<T, TT> {\n const descriptor = new ColumnDescriptor<T, TT>(this._table, this._property);\n descriptor._jsonPath = this._jsonPath;\n descriptor._title = this._title;\n descriptor._isSortEnabled = this._isSortEnabled;\n descriptor._columnType = this._columnType;\n descriptor._filterDescriptor = this._filterDescriptor?.copy();\n descriptor._enumType = this._enumType;\n descriptor._enumTitlePath = this._enumTitlePath;\n descriptor._enumNameAsValue = this._enumNameAsValue;\n descriptor._booleanAsIcon = this._booleanAsIcon;\n descriptor._booleanYes = this._booleanYes;\n descriptor._booleanNo = this._booleanNo;\n descriptor._objectModelType = this._objectModelType;\n descriptor._objectTitleProperty = this._objectTitleProperty;\n return descriptor;\n }\n}\n\nexport namespace ColumnDescriptor {\n export enum TypeEnum {\n String,\n Number,\n Boolean,\n Date,\n Enum,\n Custom\n }\n}\n","import {AbstractControl} from '@angular/forms';\n\nimport {ClassType, EnumConstantType, EnumType} from '../types';\nimport {I18nUtils} from '../utils';\nimport {\n AFieldDescriptor,\n FieldGroupDescriptor,\n FieldInputDescriptor,\n FieldLookupDescriptor,\n FieldLookupEnumDescriptor,\n FieldManyEditorDescriptor,\n FieldManyToManyEditorDescriptor,\n FieldTabGroupDescriptor,\n ModelDescriptor,\n TableDescriptor,\n TableviewDescriptor\n} from './';\n\nexport class EditorDescriptor<T> {\n public static readonly defaultGroupName = '_default';\n\n private readonly _model: ModelDescriptor<T>;\n private readonly _tableviewEditorType: EditorDescriptor.TableviewEditorTypeEnum;\n private readonly _tabs: Array<FieldTabGroupDescriptor<T>> = [];\n private readonly _groups: Array<FieldGroupDescriptor<T>> = [];\n private readonly _fields: Array<AFieldDescriptor<any, T>> = [];\n private _currentTabGroup?: FieldTabGroupDescriptor<T>;\n private _currentGroup?: FieldGroupDescriptor<T>;\n\n private _disabled = false;\n\n constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string, tableviewEditorType = EditorDescriptor.TableviewEditorTypeEnum.None) {\n this._model = new ModelDescriptor<T>(modelType, idProperty, titleProperty);\n this._tableviewEditorType = tableviewEditorType;\n }\n\n public get model() {\n return this._model;\n }\n\n public get tabs() {\n return this._tabs;\n }\n\n public get fields() {\n return this._fields;\n }\n\n public get tableviewEditorType() {\n return this._disabled;\n }\n\n public get disabled() {\n return this._disabled;\n }\n\n public createTabGroup(name: string, title?: string): FieldTabGroupDescriptor<T> {\n const tabGroup = new FieldTabGroupDescriptor<T>(this, name);\n if (!title) {\n title = I18nUtils.Type.getTabKey(this.model.typeName, name);\n }\n tabGroup.withTitle(title);\n this.createTabGroupDescriptor(tabGroup);\n return tabGroup;\n }\n\n public createFieldGroup(name: string, title?: string | null): FieldGroupDescriptor<T> {\n const fieldGroup = new FieldGroupDescriptor<T>(this, name);\n if (title !== null) {\n if (!title) {\n title = I18nUtils.Type.getGroupKey(this.model.typeName, name);\n }\n fieldGroup.withTitle(title);\n }\n this.createFieldGroupDescriptor(fieldGroup);\n return fieldGroup;\n }\n\n public addFieldDescriptor<FT>(field: AFieldDescriptor<FT, T>): this {\n this.createDefaultGroup();\n this._fields.push(field);\n this._currentGroup?.addField(field);\n return this;\n }\n\n public addField(property: string): FieldInputDescriptor<T> {\n const field = new FieldInputDescriptor<T>(this, property);\n this.addFieldDescriptor(field);\n return field;\n }\n\n public removeField(property: string): this {\n const fieldIdx = this._fields.findIndex(f => f.property === property);\n if (fieldIdx < 0) {\n throw new Error(`Field ${property} does not exist.`);\n }\n const field = this._fields[fieldIdx];\n if (field.group) {\n const groupFieldIdx = field.group.fields.findIndex(f => f instanceof AFieldDescriptor && f.property === property);\n if (groupFieldIdx >= 0) {\n field.group.fields.splice(groupFieldIdx, 1);\n }\n }\n this._fields.splice(fieldIdx, 1);\n return this;\n }\n\n public getField(property: string): AFieldDescriptor<any, T> | null {\n return this._fields.find(f => f.property === property) ?? null;\n }\n\n public addFieldLookup<FT>(property: string, modelType: ClassType<FT>): FieldLookupDescriptor<FT, T> {\n const field = new FieldLookupDescriptor<FT, T>(this, property, modelType);\n this.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldLookupEnum(\n property: string,\n enumType: EnumType,\n options?: Array<EnumConstantType>,\n nameAsValue = false,\n optionsTitlePath?: string | null\n ): FieldLookupEnumDescriptor<T> {\n const field = new FieldLookupEnumDescriptor(this, property, enumType, options, nameAsValue, optionsTitlePath);\n this.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldManyEditor<FT>(property: string, tableviewDescriptor: TableviewDescriptor<FT>): FieldManyEditorDescriptor<FT, T> {\n const field = new FieldManyEditorDescriptor(this, property, tableviewDescriptor);\n this.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldManyToManyEditor<FT>(\n property: string,\n mainTableDescriptor: TableDescriptor<FT>,\n lookupTableDescriptor: TableDescriptor<FT>\n ): FieldManyToManyEditorDescriptor<FT, T> {\n const field = new FieldManyToManyEditorDescriptor(this, property, mainTableDescriptor, lookupTableDescriptor);\n this.addFieldDescriptor(field);\n return field;\n }\n\n public withDisabled(disabled = true): this {\n this._disabled = disabled;\n return this;\n }\n\n public addValidator(name: string, expression: (control: AbstractControl) => boolean) {\n if (this._currentGroup) {\n this._currentGroup.withValidator(name, expression);\n }\n }\n\n public copy(): EditorDescriptor<T> {\n const editor = new EditorDescriptor<T>(this.model.type, this.model.idPropertyName, this.model.titlePropertyName);\n for (const tabGroup of this._tabs) {\n editor.createTabGroupDescriptor(tabGroup.copy());\n }\n for (const tabGroup of editor._tabs) {\n for (const fieldGroup of tabGroup.fields) {\n editor._fields.push(...fieldGroup.fields);\n }\n editor._groups.push(...tabGroup.fields);\n }\n editor._currentTabGroup = editor._tabs[editor._tabs.length - 1];\n editor._currentGroup = editor._currentTabGroup.fields[editor._currentTabGroup.fields.length - 1];\n editor._disabled = this._disabled;\n return editor;\n }\n\n public createFieldGroupDescriptor(fieldGroup: FieldGroupDescriptor<T>): this {\n this.createDefaultTabGroup();\n this._currentGroup = fieldGroup;\n this._groups.push(fieldGroup);\n this._currentTabGroup?.addField(fieldGroup);\n return this;\n }\n\n private createTabGroupDescriptor(tabGroup: FieldTabGroupDescriptor<T>): this {\n this._currentTabGroup = tabGroup;\n this._tabs.push(tabGroup);\n return this;\n }\n\n private createDefaultGroup() {\n this.createDefaultTabGroup();\n if (this._currentTabGroup?.fields.length === 0) {\n this.createFieldGroup(EditorDescriptor.defaultGroupName, null);\n }\n }\n\n private createDefaultTabGroup() {\n if (this._tabs.length === 0) {\n this.createTabGroup(EditorDescriptor.defaultGroupName, 'general.general');\n }\n }\n}\n\nexport namespace EditorDescriptor {\n export enum TableviewEditorTypeEnum {\n None,\n View,\n Edit,\n Add\n }\n}\n","import {Type} from '@angular/core';\n\nexport class MngFormEditorSubmitEvent<T> {\n public success = true;\n\n constructor(public readonly formItem: T) {}\n}\n\nexport enum MngFormFieldEventTypeEnum {\n Component,\n ValueChange,\n DataProvider,\n Dialog,\n Other\n}\n\nexport class MngFormFieldEventComponentSubtype {\n public static readonly ON_INIT = 'Component.OnInit';\n public static readonly ON_VIEW_INIT = 'Component.OnViewInit';\n public static readonly ON_CONTENT_INIT = 'Component.OnContentInit';\n public static readonly ON_DESTROY = 'Component.OnDestroy';\n}\n\nexport class MngFormFieldEventDialogSubtype {\n public static readonly VISIBILITY = 'Dialog.Visibility';\n public static readonly TABLE_CAPTION_COMPONENT_INSTANCE = 'Dialog.MngTable.CaptionComponentInstance';\n public static readonly TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE = 'Dialog.MngTable.ColumnActionsComponentInstance';\n}\n\nexport interface MngFormFieldEventData<T, ET> {\n eventSubtype?: string;\n value?: T;\n formValue?: ET;\n\n [key: string]: any;\n}\n\nexport class MngFormFieldEvent<T, ET> {\n constructor(\n public readonly type: MngFormFieldEventTypeEnum,\n public readonly componentType: Type<any>,\n public readonly componentInstance: any,\n public readonly data: MngFormFieldEventData<T, ET> = {}\n ) {}\n}\n","import {Type} from '@angular/core';\nimport {AbstractControl, Validators} from '@angular/forms';\n\nimport {FormlyFieldConfig} from '@ngx-formly/core';\nimport {Observable, Subject, of} from 'rxjs';\n\nimport {MediusQueryParam, MediusQueryResult} from '../api/models';\nimport {MngFormFieldEvent, MngFormFieldEventData, MngFormFieldEventTypeEnum} from '../components/form/models';\nimport {ILookupDataProvider, ITableDataProvider, LookupDataProvider, TableviewDataProvider} from '../data-providers';\nimport {EnumValue} from '../models';\nimport {ClassType, EnumConstantType, EnumType} from '../types';\nimport {EnumUtil, I18nUtils, ModelUtil, TypeUtil} from '../utils';\nimport {ActionDescriptor, EditorDescriptor, FieldValidator, FilterLookupDescriptor, ILookupDescriptor, TableDescriptor, TableviewDescriptor} from './';\nimport {FieldConfig, FieldLookupConfig} from './field.descriptor.interface';\n\nexport abstract class AGenericFieldDescriptor<ET> {\n protected readonly _editor: EditorDescriptor<ET>;\n protected _config: FieldConfig = {};\n\n protected constructor(editor: EditorDescriptor<ET>) {\n this._editor = editor;\n }\n\n public get editor() {\n return this._editor;\n }\n\n public get config() {\n return this._config;\n }\n\n public withConfig(config: FieldConfig): this {\n this._config = config;\n return this;\n }\n}\n\nexport abstract class AFieldDescriptor<T, ET> extends AGenericFieldDescriptor<ET> {\n protected readonly _property: string;\n protected _group?: AFieldGroupDescriptor<ET>;\n protected _label?: string | null;\n\n protected _placeholder?: string;\n protected _helpText?: string;\n\n protected _required = false;\n protected _disabled = false;\n protected _defaultValue?: T;\n protected _getter?: (item: ET) => T;\n protected _setter?: (item: ET, value: T) => void;\n protected _validators: Array<FieldValidator> = [];\n protected _requiredExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;\n protected _disabledExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;\n protected _hiddenExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;\n\n protected _className = '';\n protected _fieldClassName?: string;\n protected _labelClassName = '';\n protected _inputClassName = '';\n protected _size: FieldDescriptor.SizeEnum = FieldDescriptor.SizeEnum.Normal;\n\n protected readonly _eventsSubject = new Subject<MngFormFieldEvent<T, ET>>();\n\n protected constructor(editor: EditorDescriptor<ET>, property: string) {\n super(editor);\n this._property = property;\n this._label = I18nUtils.Type.getPropertyKey(this._editor.model.typeName, property);\n }\n\n public get property() {\n return this._property;\n }\n\n public get group() {\n return this._group;\n }\n\n public get label() {\n return this._label;\n }\n\n public get placeholder() {\n return this._placeholder;\n }\n\n public get helpText() {\n return this._helpText;\n }\n\n public get required() {\n return this._required;\n }\n\n public get disabled() {\n return this._disabled;\n }\n\n public get defaultValue() {\n return this._defaultValue;\n }\n\n public get getter() {\n return this._getter;\n }\n\n public get setter() {\n return this._setter;\n }\n\n public get validators() {\n return this._validators;\n }\n\n public get requiredExpression() {\n return this._requiredExpression;\n }\n\n public get disabledExpression() {\n return this._disabledExpression;\n }\n\n public get hiddenExpression() {\n return this._hiddenExpression;\n }\n\n public get className() {\n return this._className;\n }\n\n public get fieldClassName() {\n return this._fieldClassName;\n }\n\n public get labelClassName() {\n return this._labelClassName;\n }\n\n public get inputClassName() {\n return this._inputClassName;\n }\n\n public get size() {\n return this._size;\n }\n\n public get isSizeSmall() {\n return this._size === FieldDescriptor.SizeEnum.Small;\n }\n\n public get isSizeLarge() {\n return this._size === FieldDescriptor.SizeEnum.Large;\n }\n\n public abstract copy(): AFieldDescriptor<T, ET>;\n\n public withLabel(label: string | null): this {\n this._label = label;\n return this;\n }\n\n public withPlaceholder(placeholder: string): this {\n this._placeholder = placeholder;\n return this;\n }\n\n public withHelpText(helpText: string): this {\n this._helpText = helpText;\n return this;\n }\n\n public withRequired(required = true, requiredExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this {\n this._required = required;\n if (requiredExpression) {\n this._requiredExpression = requiredExpression;\n }\n return this;\n }\n\n public withDisabled(disabled = true, disabledExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this {\n this._disabled = disabled;\n if (disabledExpression) {\n this._disabledExpression = disabledExpression;\n }\n return this;\n }\n\n public withHidden(hiddenExpression: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this {\n this._hiddenExpression = hiddenExpression;\n return this;\n }\n\n public withDefaultValue(defaultValue: T): this {\n this._defaultValue = defaultValue;\n return this;\n }\n\n public withGetter(getter: (item: ET) => T): this {\n this._getter = getter;\n return this;\n }\n\n public withSetter(setter: (item: ET, value: T) => void): this {\n this._setter = setter;\n return this;\n }\n\n public withValidator(name: string, expression: (control: AbstractControl) => boolean, message?: (err: any, field: FormlyFieldConfig) => string): this {\n this._validators.push(new FieldValidator(name, expression, message));\n return this;\n }\n\n public withClassName(className: string, labelClassName = '', inputClassName = '', fieldClassName?: string): this {\n this._className = className;\n this._labelClassName = labelClassName;\n this._inputClassName = inputClassName;\n this._fieldClassName = fieldClassName;\n return this;\n }\n\n public withSize(size: FieldDescriptor.SizeEnum = FieldDescriptor.SizeEnum.Normal): this {\n this._size = size;\n return this;\n }\n\n public nextEvent(type: MngFormFieldEventTypeEnum, cmpType: Type<any>, cmpInstance: any, data?: MngFormFieldEventData<T, ET>) {\n this._eventsSubject.next(new MngFormFieldEvent(type, cmpType, cmpInstance, data));\n }\n\n public get events$() {\n return this._eventsSubject.asObservable();\n }\n\n protected copyFieldsTo(obj: AFieldDescriptor<T, ET>) {\n obj._label = this._label;\n obj._placeholder = this._placeholder;\n obj._helpText = this._helpText;\n obj._required = this._required;\n obj._disabled = this._disabled;\n obj._defaultValue = this._defaultValue;\n obj._requiredExpression = this._requiredExpression;\n obj._hiddenExpression = this._hiddenExpression;\n obj._disabledExpression = this._disabledExpression;\n obj._className = this._className;\n obj._size = this.size;\n obj._getter = this._getter;\n obj._setter = this._setter;\n obj._validators = this._validators;\n }\n}\n\nexport namespace FieldDescriptor {\n export enum SizeEnum {\n Small,\n Normal,\n Large\n }\n}\n\nexport class FieldInputDescriptor<ET> extends AFieldDescriptor<string | number | boolean | Date, ET> {\n private _fieldType: FieldInputDescriptor.TypeEnum = FieldInputDescriptor.TypeEnum.Text;\n\n // textarea specific properties\n private _rows?: number;\n\n // number specific properties\n private _numberMin?: number;\n private _numberMax?: number;\n private _numberStep?: number;\n private _numberMinFractionDigits?: number;\n private _numberMaxFractionDigits?: number;\n private _numberUseGrouping = true;\n\n // radio specific properties\n private _radioOptions: Array<EnumValue<string | number | boolean | Date>> = [];\n\n // datepicker specific properties\n private _datePickerFormat?: string;\n private _datePickerMin?: Date;\n private _datePickerMax?: Date;\n private _datePickerShowTime = false;\n\n // input specific properties\n private _maxLength?: number;\n private _minLength?: number;\n private _pattern?: string | RegExp;\n\n // mask specific properties\n private _mask?: string;\n private _slotChar?: string;\n\n // custom component properties\n private _customComponentName?: string;\n\n constructor(editor: EditorDescriptor<ET>, property: string) {\n super(editor, property);\n }\n\n public get fieldType() {\n return this._fieldType;\n }\n\n public get rows() {\n return this._rows;\n }\n\n public get numberMin() {\n return this._numberMin;\n }\n\n public get numberMax() {\n return this._numberMax;\n }\n\n public get numberStep() {\n return this._numberStep;\n }\n\n public get numberMinFractionDigits() {\n return this._numberMinFractionDigits;\n }\n\n public get numberMaxFractionDigits() {\n return this._numberMaxFractionDigits;\n }\n\n public get numberUseGrouping() {\n return this._numberUseGrouping;\n }\n\n public get radioOptions() {\n return this._radioOptions;\n }\n\n public get datePickerFormat() {\n return this._datePickerFormat;\n }\n\n public get datePickerMin() {\n return this._datePickerMin;\n }\n\n public get datePickerMax() {\n return this._datePickerMax;\n }\n\n public get datePickerShowTime() {\n return this._datePickerShowTime;\n }\n\n public get maxLength() {\n return this._maxLength;\n }\n\n public get minLength() {\n return this._minLength;\n }\n\n public get pattern() {\n return this._pattern;\n }\n\n public get mask() {\n return this._mask;\n }\n\n public get slotChar() {\n return this._slotChar;\n }\n\n public get customComponentName() {\n return this._customComponentName;\n }\n\n public asHidden(): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Hidden;\n return this;\n }\n\n public asLabel(): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Label;\n return this;\n }\n\n public asText(minLength?: number, maxLength?: number, pattern?: string | RegExp, isEmail?: boolean): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Text;\n this._minLength = minLength;\n this._maxLength = maxLength;\n this._pattern = pattern;\n if (isEmail) {\n this.withValidator('email', control => !Validators.email(control));\n }\n return this;\n }\n\n public asTextarea(rows = 3, minLength?: number, maxLength?: number, pattern?: string | RegExp): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Textarea;\n this._rows = rows;\n this._minLength = minLength;\n this._maxLength = maxLength;\n this._pattern = pattern;\n return this;\n }\n\n public asNumber(step?: number, min?: number, max?: number, minFractionDigits?: number, maxFractionDigits?: number, numberUseGrouping = true): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Number;\n this._numberStep = step;\n this._numberMinFractionDigits = minFractionDigits;\n this._numberMaxFractionDigits = maxFractionDigits;\n this._numberMin = min ?? Number.MIN_SAFE_INTEGER;\n this._numberMax = max ?? Number.MAX_SAFE_INTEGER;\n this._numberUseGrouping = numberUseGrouping;\n\n return this;\n }\n\n public asSwitch(): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Switch;\n return this;\n }\n\n public asRadio(options: Array<string | number>, optionsTitlePath?: string): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Radio;\n this._radioOptions = options.map(o => <EnumValue<string | number>>{value: o, title: `${optionsTitlePath ? `${optionsTitlePath}.` : ''}${o}`});\n return this;\n }\n\n public asRadioFromEnum(enumType: EnumType, optionsTitlePath?: string | null, values?: Array<EnumConstantType>, nameAsValue = false): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Radio;\n if (typeof optionsTitlePath === 'undefined') {\n optionsTitlePath = TypeUtil.findEnumName(enumType);\n }\n this._radioOptions = Array.isArray(values)\n ? EnumUtil.fromValuesAsEnumValueArray(enumType, values, nameAsValue, optionsTitlePath ?? undefined)\n : EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath ?? undefined);\n return this;\n }\n\n public asDatePicker(format?: string, min?: Date, max?: Date, showTime?: boolean): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Datepicker;\n this._datePickerFormat = format ? format : 'dd.mm.yy';\n this._datePickerMin = min;\n this._datePickerMax = max;\n this._datePickerShowTime = showTime ?? false;\n return this;\n }\n\n public asMask(mask: string, slotChar: string): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Mask;\n this._mask = mask;\n this._slotChar = slotChar;\n return this;\n }\n\n public asCustomComponent(customComponentName: string): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Custom;\n this._customComponentName = customComponentName;\n return this;\n }\n\n public copy(): FieldInputDescriptor<ET> {\n const field = new FieldInputDescriptor<ET>(this._editor, this._property);\n this.copyFieldsTo(field);\n field._fieldType = this._fieldType;\n field._rows = this._rows;\n field._numberMin = this._numberMin;\n field._numberMax = this._numberMax;\n field._numberStep = this._numberStep;\n field._numberMinFractionDigits = this._numberMinFractionDigits;\n field._numberMaxFractionDigits = this._numberMaxFractionDigits;\n field._numberUseGrouping = this._numberUseGrouping;\n field._radioOptions = [...this._radioOptions];\n field._datePickerFormat = this._datePickerFormat;\n field._datePickerMin = this._datePickerMin;\n field._datePickerMax = this._datePickerMax;\n field._datePickerShowTime = this._datePickerShowTime;\n field._maxLength = this._maxLength;\n field._minLength = this._minLength;\n field._pattern = this._pattern;\n field._mask = this._mask;\n field._slotChar = this._slotChar;\n field._customComponentName = this._customComponentName;\n return field;\n }\n}\n\nexport namespace FieldInputDescriptor {\n export enum TypeEnum {\n Hidden,\n Label,\n Text,\n Textarea,\n Number,\n Switch,\n Radio,\n Datepicker,\n Mask,\n Custom\n }\n}\n\nexport class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET> implements ILookupDescriptor<T> {\n protected readonly _modelType: ClassType<T> | null;\n protected _lookupType: FieldLookupDescriptor.LookupTypeEnum = FieldLookupDescriptor.LookupTypeEnum.Dropdown;\n protected _itemsLabelProperty?: string;\n protected _itemsLabelTranslate = false;\n protected _itemsValueProperty?: string;\n protected _itemsDisabledProperty?: string;\n protected _dataKeyProperty?: string;\n protected _dataProvider?: ILookupDataProvider<T, any>;\n\n protected _dropdownClassName = 'mng-filter-lookup-dropdown';\n\n protected _autocompleteOpenOnFocus = false;\n protected _autocompleteInlineSearch = false;\n\n protected _dialogTableDescriptor?: TableDescriptor<T>;\n protected _dialogTableDataProvider?: ITableDataProvider<T, any>;\n\n constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T> | null) {\n super(editor, property);\n this._modelType = modelType;\n ModelUtil.trySetLookupItemsProperties(this);\n }\n\n public get lookupType() {\n return this._lookupType;\n }\n\n public get itemsLabelProperty() {\n return this._itemsLabelProperty;\n }\n\n public get itemsLabelTranslate() {\n return this._itemsLabelTranslate;\n }\n\n public get itemsValueProperty() {\n return this._itemsValueProperty;\n }\n\n public get itemsDisabledProperty() {\n return this._itemsDisabledProperty;\n }\n\n public get dataKeyProperty() {\n return this._dataKeyProperty;\n }\n\n public get dataProvider() {\n return this._dataProvider;\n }\n\n public get autocompleteOpenOnFocus() {\n return this._autocompleteOpenOnFocus;\n }\n\n public get autocompleteInlineSearch() {\n return this._autocompleteInlineSearch;\n }\n\n public get dropdownClassName() {\n return this._dropdownClassName;\n }\n\n public get modelType() {\n return this._modelType;\n }\n\n public get dialogTableDescriptor() {\n return this._dialogTableDescriptor;\n }\n\n public get dialogTableDataProvider() {\n return this._dialogTableDataProvider;\n }\n\n public withItemsLabelProperty(itemsLabelProperty: string, translate = false): this {\n this._itemsLabelProperty = itemsLabelProperty;\n this._itemsLabelTranslate = translate;\n return this;\n }\n\n public withItemsValueProperty(itemsValueProperty: string): this {\n this._itemsValueProperty = itemsValueProperty;\n this._dataKeyProperty = undefined;\n return this;\n }\n\n public withItemsDisabledProperty(itemsDisabledProperty: string): this {\n this._itemsDisabledProperty = itemsDisabledProperty;\n return this;\n }\n\n public withDataKeyProperty(property: string): this {\n this._dataKeyProperty = property;\n this._itemsValueProperty = undefined;\n return this;\n }\n\n public withLookup<S>(lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>, serviceType?: Type<S>): this {\n const dataProvider = new LookupDataProvider<T, S>(this._modelType);\n if (serviceType) {\n dataProvider.withServiceType(serviceType);\n }\n dataProvider.withLookup(lookup);\n this._dataProvider = dataProvider;\n return this;\n }\n\n public withLookupDataProvider(dataProvider: ILookupDataProvider<T, any>): this {\n this._dataProvider = dataProvider;\n return this;\n }\n\n public override withConfig(config: FieldLookupConfig): this {\n return super.withConfig(config);\n }\n\n public asAutocomplete(openOnFocus = false, inlineSearch = false): this {\n this._lookupType = FilterLookupDescriptor.LookupTypeEnum.Autocomplete;\n this._autocompleteOpenOnFocus = openOnFocus;\n this._autocompleteInlineSearch = inlineSearch;\n return this;\n }\n\n public asDialog(lookupTableDescriptor: TableDescriptor<T>, tableDataProvider?: ITableDataProvider<T, any>): this {\n this._lookupType = FieldLookupDescriptor.LookupTypeEnum.Dialog;\n this._dialogTableDescriptor = lookupTableDescriptor;\n this._dialogTableDataProvider = tableDataProvider;\n return this;\n }\n\n public copy(): FieldLookupDescriptor<T, ET> {\n const field = new FieldLookupDescriptor(this._editor, this._property, this._modelType);\n this.copyFieldsTo(field);\n field._lookupType = this._lookupType;\n field._itemsLabelProperty = this._itemsLabelProperty;\n field._itemsLabelTranslate = this._itemsLabelTranslate;\n field._itemsValueProperty = this._itemsValueProperty;\n field._itemsDisabledProperty = this._itemsDisabledProperty;\n field._dataKeyProperty = this._dataKeyProperty;\n field._dataProvider = this._dataProvider;\n field._dropdownClassName = this._dropdownClassName;\n field._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;\n field._autocompleteInlineSearch = this._autocompleteInlineSearch;\n field._dialogTableDescriptor = this._dialogTableDescriptor;\n return field;\n }\n}\n\nexport namespace FieldLookupDescriptor {\n export enum LookupTypeEnum {\n Dropdown,\n Autocomplete,\n Dialog\n }\n}\n\nexport class FieldLookupEnumDescriptor<ET> extends FieldLookupDescriptor<EnumValue<string | number>, ET> {\n private readonly _enumType: EnumType;\n private readonly _optionEnumValues: EnumValue<string | number>[];\n private readonly _nameAsValue: boolean = false;\n\n constructor(editor: EditorDescriptor<ET>, property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue = false, optionsTitlePath?: string | null) {\n super(editor, property, null);\n this._enumType = enumType;\n this._nameAsValue = nameAsValue;\n if (typeof optionsTitlePath === 'undefined') {\n optionsTitlePath = TypeUtil.findEnumName(enumType);\n }\n this._optionEnumValues = Array.isArray(options)\n ? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath ?? undefined)\n : EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath ?? undefined);\n const dataProvider = new LookupDataProvider<EnumValue<string | number>, any>(null).withLookup(() => of(this._optionEnumValues));\n this.withLookupDataProvider(dataProvider);\n this.withItemsLabelProperty('title', optionsTitlePath !== null);\n this.withItemsValueProperty('value');\n this.withItemsDisabledProperty('disabled');\n }\n\n public get enumType() {\n return this._enumType;\n }\n\n public withDisabledOptions(...disabledOptions: Array<EnumConstantType>): this {\n for (const disabledOption of disabledOptions) {\n const disabledOptionValue = this._nameAsValue ? EnumUtil.getConstantName(this._enumType, disabledOption) : disabledOption;\n if (disabledOptionValue) {\n const option = this._optionEnumValues.find(o => o.value === disabledOptionValue);\n if (option) {\n option.disabled = true;\n }\n }\n }\n return this;\n }\n\n public withDefaultValueEnum(defaultValue: EnumConstantType): this {\n const defaultOptionValue = this._nameAsValue ? EnumUtil.getConstantName(this._enumType, defaultValue) : defaultValue;\n if (defaultOptionValue) {\n const option = this._optionEnumValues.find(o => o.value === defaultOptionValue);\n if (option) {\n this.withDefaultValue(option);\n }\n }\n return this;\n }\n\n public override asAutocomplete(openOnFocus = true): this {\n super.asAutocomplete(openOnFocus, true);\n return this;\n }\n\n public override copy(): FieldLookupEnumDescriptor<ET> {\n const field = new FieldLookupEnumDescriptor<ET>(this._editor, this._property, this._enumType, []);\n this.copyFieldsTo(field);\n field._lookupType = this._lookupType;\n field._itemsLabelProperty = this._itemsLabelProperty;\n field._itemsValueProperty = this._itemsValueProperty;\n field._itemsDisabledProperty = this._itemsDisabledProperty;\n field._dataKeyProperty = this._dataKeyProperty;\n field._dataProvider = this._dataProvider;\n return field;\n }\n}\n\nexport class FieldManyToManyEditorDescriptor<T, ET> extends AFieldDescriptor<T, ET> {\n private readonly _mainTableDescriptor: TableDescriptor<T>; // table descriptor for main table component\n private readonly _lookupTableDescriptor: TableDescriptor<T>; // table descriptor for where select will be applied\n private _fieldType: FieldManyToManyEditorDescriptor.TypeEnum = FieldManyToManyEditorDescriptor.TypeEnum.DialogTableMultiselect;\n private _lookupTableDataProvider: ITableDataProvider<T, any> | null = null;\n private _actions: Array<FieldManyToManyEditorDescriptor.ActionEnum> = [];\n private _hasLookupExcludeValues = false;\n private _excludeFilterProperty = '';\n private _excludeValueProperty = '';\n\n constructor(editor: EditorDescriptor<ET>, property: string, mainTableDescriptor: TableDescriptor<T>, lookupTableDescriptor: TableDescriptor<T>) {\n super(editor, property);\n this._mainTableDescriptor = mainTableDescriptor;\n this._lookupTableDescriptor = lookupTableDescriptor;\n this._actions.push(FieldManyToManyEditorDescriptor.ActionEnum.Add, FieldManyToManyEditorDescriptor.ActionEnum.Delete);\n }\n\n public get fieldType() {\n return this._fieldType;\n }\n\n public get lookupTableDataProvider() {\n return this._lookupTableDataProvider;\n }\n\n public get actions() {\n return this._actions;\n }\n\n public get hasLookupExcludeValues() {\n return this._hasLookupExcludeValues;\n }\n\n public get excludeFilterProperty() {\n return this._excludeFilterProperty;\n }\n\n public get excludeValueProperty() {\n return this._excludeValueProperty;\n }\n\n public get mainTableDescriptor() {\n return this._mainTableDescriptor;\n }\n\n public get lookupTableDescriptor() {\n return this._lookupTableDescriptor;\n }\n\n public withLookup<S>(getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>, serviceType?: Type<S>): this {\n const dataProvider = new TableviewDataProvider<T, S>(this._mainTableDescriptor.model.type);\n if (serviceType) {\n dataProvider.withServiceType(serviceType);\n }\n dataProvider.withGetAll(getAll);\n this._lookupTableDataProvider = dataProvider;\n return this;\n }\n\n public withLookupDataProvider(dataProvider: ITableDataProvider<T, any>): this {\n this._lookupTableDataProvider = dataProvider;\n return this;\n }\n\n public withActions(actions: Array<FieldManyToManyEditorDescriptor.ActionEnum> = []): this {\n this.actions.push(...actions);\n return this;\n }\n\n public withLookupExclude(filterProperty: string, valueProperty: string, hasLookupExclude = true): this {\n this._hasLookupExcludeValues = hasLookupExclude;\n this._excludeFilterProperty = filterProperty;\n this._excludeValueProperty = valueProperty;\n return this;\n }\n\n public copy(): FieldManyToManyEditorDescriptor<T, ET> {\n const field = new FieldManyToManyEditorDescriptor(this._editor, this._property, this._mainTableDescriptor.copy(), this._lookupTableDescriptor.copy());\n this.copyFieldsTo(field);\n field._fieldType = this._fieldType;\n field._actions = this._actions.map(a => a);\n field._lookupTableDataProvider = this._lookupTableDataProvider;\n field._hasLookupExcludeValues = this._hasLookupExcludeValues;\n field._excludeFilterProperty = this._excludeFilterProperty;\n field._excludeValueProperty = this._excludeValueProperty;\n return field;\n }\n}\n\nexport namespace FieldManyToManyEditorDescriptor {\n export enum TypeEnum {\n DialogTableMultiselect\n }\n\n export enum ActionEnum {\n Add,\n Delete\n }\n}\n\nexport class FieldManyEditorDescriptor<T, ET> extends AFieldDescriptor<T, ET> {\n private readonly _tableviewDescriptor: TableviewDescriptor<T>;\n private _fieldType: FieldManyEditorDescriptor.TypeEnum = FieldManyEditorDescriptor.TypeEnum.DialogEditor;\n private _fieldActions: Array<FieldManyEditorDescriptor.ActionEnum> = [];\n private _actions: Array<ActionDescriptor<T>> = [];\n\n constructor(editor: EditorDescriptor<ET>, property: string, tableviewDescriptor: TableviewDescriptor<T>) {\n super(editor, property);\n // this._modelType = modelType;\n this._tableviewDescriptor = tableviewDescriptor;\n this._fieldActions.push(\n FieldManyEditorDescriptor.ActionEnum.View,\n FieldManyEditorDescriptor.ActionEnum.Add,\n FieldManyEditorDescriptor.ActionEnum.Edit,\n FieldManyEditorDescriptor.ActionEnum.Delete\n );\n }\n\n public get fieldType() {\n return this._fieldType;\n }\n\n public get fieldActions() {\n return this._fieldActions;\n }\n\n public get actions() {\n return this._actions;\n }\n\n public get tableviewDescriptor() {\n return this._tableviewDescriptor;\n }\n\n public get tableDescriptor() {\n return this._tableviewDescriptor.table;\n }\n\n public get editorForCreate() {\n return this._tableviewDescriptor.addEditor;\n }\n\n public get editorForRead() {\n return this._tableviewDescriptor.viewEditor;\n }\n\n public get editorForUpdate() {\n return this._tableviewDescriptor.editEditor;\n }\n\n public withFieldAction(action: FieldManyEditorDescriptor.ActionEnum): this {\n this._fieldActions.push(action);\n return this;\n }\n\n public withFieldActions(actions: FieldManyEditorDescriptor.ActionEnum[]): this {\n this._fieldActions = actions;\n return this;\n }\n\n public withAction(action: ActionDescriptor<T>): this {\n this._actions.push(action);\n return this;\n }\n\n public copy(): FieldManyEditorDescriptor<T, ET> {\n const field = new FieldManyEditorDescriptor(this._editor, this._property, this._tableviewDescriptor.copy());\n this.copyFieldsTo(field);\n field._fieldType = this._fieldType;\n field._fieldActions = this._fieldActions.map(a => a);\n return field;\n }\n}\n\nexport namespace FieldManyEditorDescriptor {\n export enum TypeEnum {\n DialogEditor\n }\n\n export enum ActionEnum {\n View,\n Add,\n Edit,\n Delete\n }\n}\n\nexport abstract class AFieldGroupDescriptor<ET> extends AGenericFieldDescriptor<ET> {\n protected readonly _name: string;\n protected readonly _default: boolean;\n protected _title?: string;\n protected _fields: AGenericFieldDescriptor<ET>[] = [];\n protected _validators: Array<FieldValidator> = [];\n\n protected constructor(editor: EditorDescriptor<ET>, name: string) {\n super(editor);\n this._name = `${this.baseName}${name}`;\n this._default = name === EditorDescriptor.defaultGroupName;\n }\n\n public get title() {\n return this._title;\n }\n\n abstract get fields(): AGenericFieldDescriptor<ET>[];\n\n public get validators() {\n return this._validators;\n }\n\n public get baseName() {\n return `${this.groupName()}_`;\n }\n\n public get name() {\n return this._name;\n }\n\n public get default() {\n return this._default;\n }\n\n abstract groupName(): string;\n\n abstract addField(field: AGenericFieldDescriptor<ET>): this;\n\n abstract copy(): AFieldGroupDescriptor<ET>;\n\n public withTitle(title: string): this {\n this._title = title;\n return this;\n }\n\n public withValidator(name: string, expression: (control: AbstractControl) => boolean) {\n this._validators.push(new FieldValidator(name, expression, undefined));\n return this;\n }\n}\n\nexport class FieldTabGroupDescriptor<ET> extends AFieldGroupDescriptor<ET> {\n constructor(editor: EditorDescriptor<ET>, name: string) {\n super(editor, name);\n }\n\n public get fields(): Array<FieldGroupDescriptor<ET>> {\n return this._fields as Array<FieldGroupDescriptor<ET>>;\n }\n\n public groupName(): string {\n return 'tab';\n }\n\n public addField(field: FieldGroupDescriptor<ET>): this {\n this._fields.push(field);\n return this;\n }\n\n public copy(): FieldTabGroupDescriptor<ET> {\n const tab = new FieldTabGroupDescriptor<ET>(this._editor, this.name.substring(this.baseName.length));\n tab._title = this._title;\n tab._fields = this.fields.map(f => f.copy());\n return tab;\n }\n}\n\nexport class FieldGroupDescriptor<ET> extends AFieldGroupDescriptor<ET> {\n private _type = FieldGroupDescriptor.TypeEnum.Fieldset;\n\n constructor(editor: EditorDescriptor<ET>, name: string) {\n super(editor, name);\n if (this._default) {\n this.asLogical();\n }\n }\n\n public get type() {\n return this._type;\n }\n\n public get fields(): Array<AFieldDescriptor<any, ET>> {\n return this._fields as Array<AFieldDescriptor<any, ET>>;\n }\n\n public groupName(): string {\n return 'group';\n }\n\n public addField(field: AFieldDescriptor<any, ET>): this {\n this._fields.push(field);\n return this;\n }\n\n public asLogical(): this {\n this._type = FieldGroupDescriptor.TypeEnum.Logical;\n return this;\n }\n\n public copy(): FieldGroupDescriptor<ET> {\n const group = new FieldGroupDescriptor<ET>(this._editor, this.name.substring(this.baseName.length));\n group._type = this._type;\n group._title = this._title;\n group._fields = this.fields.map(f => f.copy());\n return group;\n }\n}\n\nexport namespace FieldGroupDescriptor {\n export enum TypeEnum {\n Fieldset,\n Logical\n }\n}\n","import {AbstractControl} from '@angular/forms';\n\nimport {FormlyFieldConfig} from '@ngx-formly/core';\nimport {Observable} from 'rxjs';\n\nexport class FieldValidator {\n private readonly _name: string;\n private readonly _expression?: (control: AbstractControl) => boolean;\n private readonly _message?: (err: any, field: FormlyFieldConfig) => string | Observable<string>;\n private readonly _options?: {errorPath: string};\n\n constructor(\n name: string,\n expression?: (control: AbstractControl) => boolean,\n message?: (err: any, field: FormlyFieldConfig) => string | Observable<string>,\n options?: {errorPath: string}\n ) {\n this._name = name;\n this._expression = expression;\n this._message = message;\n this._options = options;\n }\n\n public get name(): string {\n return this._name;\n }\n\n public get expression() {\n return this._expression;\n }\n\n public get message() {\n return this._message;\n }\n\n public get options() {\n return this._options;\n }\n}\n","import {ClassType} from '../types';\nimport {ModelUtil, TypeUtil} from '../utils';\n\nexport class ModelDescriptor<T> {\n private readonly _type: ClassType<T>;\n private readonly _typeName: string;\n private _idPropertyName?: string;\n private _titlePropertyName?: string;\n\n constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string) {\n this._type = modelType;\n this._idPropertyName = idProperty ?? ModelUtil.findIdAttribute(modelType) ?? undefined;\n this._titlePropertyName = titleProperty ?? ModelUtil.findTitleAttribute(modelType) ?? undefined;\n this._typeName = TypeUtil.findTypeName(this._type);\n }\n\n public get type() {\n return this._type;\n }\n\n public get typeName() {\n return this._typeName;\n }\n\n public get idPropertyName() {\n return this._idPropertyName;\n }\n\n public get titlePropertyName() {\n return this._titlePropertyName;\n }\n\n public withIdPropertyName(idProperty: string): this {\n this._idPropertyName = idProperty;\n return this;\n }\n\n public withTitlePropertyName(titleProperty: string): this {\n this._titlePropertyName = titleProperty;\n return this;\n }\n\n public copy(): ModelDescriptor<T> {\n const model = new ModelDescriptor(this._type, this._idPropertyName, this._titlePropertyName);\n return model;\n }\n}\n","import {Type} from '@angular/core';\n\nimport {IColumnValueComponent} from '../models';\nimport {ClassType, EnumType} from '../types';\nimport {ModelUtil} from '../utils';\nimport {ColumnDescriptor} from './column.descriptor';\nimport {ModelDescriptor} from './model.descriptor';\n\nexport class TableDescriptor<T> {\n private readonly _model: ModelDescriptor<T>;\n private _filterDisplay: TableDescriptor.FilterDisplayEnum = TableDescriptor.FilterDisplayEnum.Menu;\n private _paginationMode: TableDescriptor.PaginationModeEnum = TableDescriptor.PaginationModeEnum.Pagination;\n private _columns: Array<ColumnDescriptor<any, T>> = [];\n private _title?: string;\n private _hideHeader = false;\n private _dataKeyProperty?: string;\n private _hasDefaultSort = false;\n private _defaultSortProperty: string[] = [];\n private _defaultSortAsc: boolean[] = [];\n\n private _rowHeight = 45;\n private _tableFullHeightOffset = 315;\n\n constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string) {\n this._model = new ModelDescriptor<T>(modelType, idProperty, titleProperty);\n this._dataKeyProperty = idProperty ?? ModelUtil.findIdAttribute(modelType) ?? undefined;\n }\n\n public get filterDisplay() {\n return this._filterDisplay;\n }\n\n public get paginationMode() {\n return this._paginationMode;\n }\n\n public get columns() {\n return this._columns;\n }\n\n public get title() {\n return this._title;\n }\n\n public get hideHeader() {\n return this._hideHeader;\n }\n\n public get dataKeyProperty() {\n return this._dataKeyProperty;\n }\n\n public get hasDefaultSort() {\n return this._hasDefaultSort;\n }\n\n public get defaultSortProperty() {\n return this._defaultSortProperty;\n }\n\n public get defaultSortAsc() {\n return this._defaultSortAsc;\n }\n\n public get rowHeight() {\n return this._rowHeight;\n }\n\n public get tableFullHeightOffset() {\n return this._tableFullHeightOffset;\n }\n\n public get model() {\n return this._model;\n }\n\n public addColumnDescriptor<CT>(column: ColumnDescriptor<CT, T>): TableDescriptor<T> {\n this._columns.push(column);\n return this;\n }\n\n public addColumn(property: string): ColumnDescriptor<string, T> {\n const column = new ColumnDescriptor<string, T>(this, property);\n this._columns.push(column);\n return column;\n }\n\n public addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T> {\n const column = new ColumnDescriptor<number, T>(this, property);\n column.asNumber(displayFormat);\n this._columns.push(column);\n return column;\n }\n\n public addColumnDate(property: string, displayFormat?: string): ColumnDescriptor<Date, T> {\n const column = new ColumnDescriptor<Date, T>(this, property);\n column.asDate(displayFormat);\n this._columns.push(column);\n return column;\n }\n\n public addColumnBoolean(property: string, yes?: string, no?: string, asIcon = false): ColumnDescriptor<boolean, T> {\n const column = new ColumnDescriptor<boolean, T>(this, property);\n column.asBoolean(yes, no, asIcon);\n this._columns.push(column);\n return column;\n }\n\n public addColumnEnum(property: string, enumType: EnumType, nameAsValue = false, titlePath?: string | null): ColumnDescriptor<EnumType, T> {\n const column = new ColumnDescriptor<EnumType, T>(this, property);\n column.asEnum(enumType, nameAsValue, titlePath);\n this._columns.push(column);\n return column;\n }\n\n public addColumnCustomComponent(property: string, customComponentType: Type<IColumnValueComponent<T>>): ColumnDescriptor<any, T> {\n const column = new ColumnDescriptor<any, T>(this, property);\n column.asCustomComponent(customComponentType);\n this._columns.push(column);\n return column;\n }\n\n public withFilterDisplay(filterDisplayType: TableDescriptor.FilterDisplayEnum): this {\n this._filterDisplay = filterDisplayType;\n return this;\n }\n\n public withPaginationMode(paginationMode: TableDescriptor.PaginationModeEnum): this {\n this._paginationMode = paginationMode;\n return this;\n }\n\n public withTitle(title: string): TableDescriptor<T> {\n this._title = title;\n return this;\n }\n\n public withHideHeader(hideHeader = true) {\n this._hideHeader = hideHeader;\n return this;\n }\n\n public withDataKeyProperty(property: string): TableDescriptor<T> {\n this._dataKeyProperty = property;\n return this;\n }\n\n public withDefaultSort(property: string, asc = true): TableDescriptor<T> {\n this._hasDefaultSort = true;\n this._defaultSortProperty.push(property);\n this._defaultSortAsc.push(asc);\n return this;\n }\n\n public withRowHeight(rowHeight: number): TableDescriptor<T> {\n this._rowHeight = rowHeight;\n return this;\n }\n\n public withTableFullHeightOffset(tableFullHeightOffset: number): TableDescriptor<T> {\n this._tableFullHeightOffset = tableFullHeightOffset;\n return this;\n }\n\n public copy(): TableDescriptor<T> {\n const descriptor = new TableDescriptor(this.model.type, this.model.idPropertyName, this.model.titlePropertyName);\n descriptor._columns = this.columns.map(c => c.copy());\n descriptor._title = this._title;\n descriptor._hideHeader = this._hideHeader;\n descriptor._dataKeyProperty = this._dataKeyProperty;\n descriptor._defaultSortProperty = this._defaultSortProperty.map(p => p);\n descriptor._defaultSortAsc = this._defaultSortAsc.map(p => p);\n descriptor._filterDisplay = this._filterDisplay;\n return descriptor;\n }\n}\n\nexport namespace TableDescriptor {\n export enum PaginationModeEnum {\n Pagination,\n InfiniteScroll\n }\n\n export enum FilterDisplayEnum {\n Row,\n Menu\n }\n}\n","import {Type} from '@angular/core';\nimport {AbstractControl} from '@angular/forms';\n\nimport {IColumnValueComponent} from '../models';\nimport {ClassType, EnumConstantType, EnumType} from '../types';\nimport {\n AFieldDescriptor,\n ColumnDescriptor,\n EditorDescriptor,\n FieldInputDescriptor,\n FieldLookupDescriptor,\n FieldLookupEnumDescriptor,\n FieldManyEditorDescriptor,\n FieldManyToManyEditorDescriptor,\n ModelDescriptor,\n TableDescriptor\n} from './';\n\nimport TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum;\n\nexport class TableviewDescriptor<T> {\n private readonly _model: ModelDescriptor<T>;\n\n constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string) {\n this._model = new ModelDescriptor<T>(modelType, idProperty, titleProperty);\n this._table = new TableDescriptor<T>(modelType, idProperty, titleProperty);\n this._viewEditor = new EditorDescriptor<T>(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.View);\n this._viewEditor.withDisabled();\n this._addEditor = new EditorDescriptor<T>(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Add);\n this._editEditor = new EditorDescriptor<T>(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Edit);\n this._tableTitle = `${this._model.typeName}.name`;\n }\n\n private _table: TableDescriptor<T>;\n\n public get table() {\n return this._table;\n }\n\n private _viewEditor: EditorDescriptor<T>;\n\n public get viewEditor() {\n return this._viewEditor;\n }\n\n private _addEditor: EditorDescriptor<T>;\n\n public get addEditor() {\n return this._addEditor;\n }\n\n private _editEditor: EditorDescriptor<T>;\n\n public get editEditor() {\n return this._editEditor;\n }\n\n private _tableTitle: string;\n\n public get tableTitle() {\n return this._tableTitle;\n }\n\n public get model() {\n return this._model;\n }\n\n public withTableDescriptor(descriptor: TableDescriptor<T>): this {\n this._table = descriptor;\n return this;\n }\n\n public withViewDescriptor(descriptor: EditorDescriptor<T>): this {\n this._viewEditor = descriptor;\n return this;\n }\n\n public withAddDescriptor(descriptor: EditorDescriptor<T>): this {\n this._addEditor = descriptor;\n return this;\n }\n\n public withEditDescriptor(descriptor: EditorDescriptor<T>): this {\n this._editEditor = descriptor;\n return this;\n }\n\n public withTableTitle(title: string): this {\n this._tableTitle = title;\n return this;\n }\n\n public withValidator(name: string, expression: (control: AbstractControl) => boolean): this {\n this._viewEditor.addValidator(name, expression);\n this._addEditor.addValidator(name, expression);\n this._editEditor.addValidator(name, expression);\n return this;\n }\n\n public addColumnDescriptor<CT>(column: ColumnDescriptor<CT, T>): TableDescriptor<T> {\n return this._table.addColumnDescriptor<CT>(column);\n }\n\n public addColumn(property: string): ColumnDescriptor<string, T> {\n return this._table.addColumn(property);\n }\n\n public addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T> {\n return this._table.addColumnNumber(property, displayFormat);\n }\n\n public addColumnDate(property: string, displayFormat?: string): ColumnDescriptor<Date, T> {\n return this._table.addColumnDate(property, displayFormat);\n }\n\n public addColumnBoolean(property: string, yes?: string, no?: string, asIcon = false): ColumnDescriptor<boolean, T> {\n return this._table.addColumnBoolean(property, yes, no, asIcon);\n }\n\n public addColumnEnum(property: string, enumType: EnumType, nameAsValue = false, titlePath?: string | null): ColumnDescriptor<EnumType, T> {\n return this._table.addColumnEnum(property, enumType, nameAsValue, titlePath);\n }\n\n public addColumnCustomComponent(property: string, customComponentType: Type<IColumnValueComponent<T>>): ColumnDescriptor<any, T> {\n return this._table.addColumnCustomComponent(property, customComponentType);\n }\n\n public createTabGroup(name: string, title?: string): this {\n this._viewEditor.createTabGroup(name, title);\n this._addEditor.createTabGroup(name, title);\n this._editEditor.createTabGroup(name, title);\n return this;\n }\n\n public createFieldGroup(name: string, title?: string): this {\n this._viewEditor.createFieldGroup(name, title);\n this._addEditor.createFieldGroup(name, title);\n this._editEditor.createFieldGroup(name, title);\n return this;\n }\n\n public addFieldDescriptor<FT>(field: AFieldDescriptor<FT, T>): this {\n this._viewEditor.addFieldDescriptor(field);\n this._addEditor.addFieldDescriptor(field);\n this._editEditor.addFieldDescriptor(field);\n return this;\n }\n\n public addField(property: string): FieldInputDescriptor<T> {\n const field = this._viewEditor.addField(property);\n this._addEditor.addFieldDescriptor(field);\n this._editEditor.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldLookup<FT>(property: string, modelType: ClassType<FT>): FieldLookupDescriptor<FT, T> {\n const field = this._viewEditor.addFieldLookup(property, modelType);\n this._addEditor.addFieldDescriptor(field);\n this._editEditor.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldLookupEnum(\n property: string,\n enumType: EnumType,\n options?: Array<EnumConstantType>,\n nameAsValue = false,\n optionsTitlePath?: string | null\n ): FieldLookupEnumDescriptor<T> {\n const field = this._viewEditor.addFieldLookupEnum(property, enumType, options, nameAsValue, optionsTitlePath);\n this._addEditor.addFieldDescriptor(field);\n this._editEditor.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldManyEditor<FT>(property: string, tableviewDescriptor: TableviewDescriptor<FT>): FieldManyEditorDescriptor<FT, T> {\n const field = this._viewEditor.addFieldManyEditor(property, tableviewDescriptor);\n this._addEditor.addFieldDescriptor(field);\n this._editEditor.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldManyToManyEditor<FT>(\n property: string,\n mainTableDescriptor: TableDescriptor<FT>,\n lookupTableDescriptor: TableDescriptor<FT>\n ): FieldManyToManyEditorDescriptor<FT, T> {\n const field = this._viewEditor.addFieldManyToManyEditor(property, mainTableDescriptor, lookupTableDescriptor);\n this._addEditor.addFieldDescriptor(field);\n this._editEditor.addFieldDescriptor(field);\n return field;\n }\n\n public copy(): TableviewDescriptor<T> {\n const tableview = new TableviewDescriptor(this._model.type, this._model.idPropertyName, this._model.titlePropertyName);\n tableview._table = this._table.copy();\n tableview._viewEditor = this._viewEditor.copy();\n tableview._addEditor = this._addEditor.copy();\n tableview._editEditor = this._editEditor.copy();\n return tableview;\n }\n}\n","import {FormlyFieldConfig} from '@ngx-formly/core';\n\nimport {\n AFieldDescriptor,\n EditorDescriptor,\n FieldGroupDescriptor,\n FieldInputDescriptor,\n FieldLookupDescriptor,\n FieldLookupEnumDescriptor,\n FieldManyEditorDescriptor,\n FieldManyToManyEditorDescriptor,\n FieldTabGroupDescriptor\n} from '../descriptors';\n\nexport class EditorFormlyUtil {\n public static createFormlyConfigFromDescriptor(descriptor: EditorDescriptor<any>): FormlyFieldConfig[] {\n const fields: FormlyFieldConfig[] = [];\n\n if (descriptor.tabs.length === 1 && descriptor.tabs[0].default) {\n // dont use tabs\n fields.push(...EditorFormlyUtil.createFormlyGroupType(descriptor.tabs[0].fields));\n } else {\n fields.push(...EditorFormlyUtil.createFormlyTabType(descriptor.tabs));\n }\n\n return fields;\n }\n\n public static createFormlyTabType(tabGroups: FieldTabGroupDescriptor<any>[]): FormlyFieldConfig[] {\n const tabsField: FormlyFieldConfig = {\n type: 'tabs',\n fieldGroup: []\n };\n for (const tab of tabGroups) {\n const tabField: FormlyFieldConfig = {\n id: tab.name,\n templateOptions: {},\n fieldGroup: []\n };\n if (tab.title) {\n tabField.templateOptions!.label = tab.title;\n }\n tabField.fieldGroup!.push(...EditorFormlyUtil.createFormlyGroupType(tab.fields));\n tabsField.fieldGroup!.push(tabField);\n }\n return [tabsField];\n }\n\n public static createFormlyGroupType(groups: FieldGroupDescriptor<any>[]): FormlyFieldConfig[] {\n if (groups.length === 1 && groups[0].default) {\n // dont use fieldset, just create fields\n return EditorFormlyUtil.createFormlyFields(groups[0]);\n } else {\n const groupsField: FormlyFieldConfig = {\n type: 'fieldset',\n fieldGroup: []\n };\n for (const group of groups) {\n const groupField: FormlyFieldConfig = {\n id: group.name,\n templateOptions: {\n descriptor: group\n },\n fieldGroup: []\n };\n if (group.title) {\n groupField.templateOptions!.label = group.title;\n }\n groupField.fieldGroup!.push(...EditorFormlyUtil.createFormlyFields(group));\n groupsField.fieldGroup!.push(groupField);\n }\n return [groupsField];\n }\n }\n\n public static createFormlyFields(descriptor: FieldGroupDescriptor<any>): FormlyFieldConfig[] {\n const fields: FormlyFieldConfig[] = [];\n for (const descriptorField of descriptor.fields) {\n fields.push(EditorFormlyUtil.createFormlyField(descriptorField));\n }\n // wrap in group to be able to use flex grid\n const wrapperGroup: FormlyFieldConfig = {\n fieldGroupClassName: 'p-fluid formgrid grid',\n fieldGroup: fields,\n validators: {}\n };\n\n for (const validator of descriptor.validators) {\n wrapperGroup.validators[validator.name] = {expression: validator.expression, message: validator.message};\n }\n\n return [wrapperGroup];\n }\n\n public static createFormlyField(descriptor: AFieldDescriptor<any, any>): FormlyFieldConfig {\n const field: FormlyFieldConfig = {\n key: descriptor.property,\n expressionProperties: {},\n templateOptions: {},\n validators: {}\n };\n\n let className = descriptor.className;\n if (!className) {\n // assign default field width through entire row\n className = 'col-12';\n }\n field.className = className;\n\n field.templateOptions!['descriptor'] = descriptor;\n if (descriptor instanceof FieldInputDescriptor) {\n switch (descriptor.fieldType) {\n case FieldInputDescriptor.TypeEnum.Hidden:\n break;\n case FieldInputDescriptor.TypeEnum.Label:\n field.type = 'label';\n delete field.key;\n break;\n case FieldInputDescriptor.TypeEnum.Textarea:\n field.type = 'textarea';\n break;\n case FieldInputDescriptor.TypeEnum.Number:\n field.type = 'number';\n field.templateOptions!.min = descriptor.numberMin;\n field.templateOptions!.max = descriptor.numberMax;\n break;\n case FieldInputDescriptor.TypeEnum.Switch:\n field.type = 'switch';\n break;\n case FieldInputDescriptor.TypeEnum.Radio:\n field.type = 'radio';\n break;\n case FieldInputDescriptor.TypeEnum.Datepicker:\n field.type = 'datepicker';\n break;\n case FieldInputDescriptor.TypeEnum.Mask:\n field.type = 'mask';\n break;\n case FieldInputDescriptor.TypeEnum.Custom:\n field.type = descriptor.customComponentName;\n break;\n default:\n field.type = 'input';\n field.templateOptions!.minLength = descriptor.minLength;\n field.templateOptions!.maxLength = descriptor.maxLength;\n field.templateOptions!.pattern = descriptor.pattern;\n break;\n }\n } else if (descriptor instanceof FieldLookupEnumDescriptor) {\n field.type = 'enum';\n } else if (descriptor instanceof FieldLookupDescriptor) {\n switch (descriptor.lookupType) {\n case FieldLookupDescriptor.LookupTypeEnum.Autocomplete:\n field.type = 'autocomplete';\n break;\n case FieldLookupDescriptor.LookupTypeEnum.Dialog:\n field.type = 'dialog';\n break;\n case FieldLookupDescriptor.LookupTypeEnum.Dropdown:\n default:\n field.type = 'dropdown';\n break;\n }\n } else if (descriptor instanceof FieldManyToManyEditorDescriptor) {\n field.type = 'table-dialog-multiselect';\n } else if (descriptor instanceof FieldManyEditorDescriptor) {\n field.type = 'table-dialog-form';\n }\n\n if (descriptor.label) {\n field.templateOptions!.label = descriptor.label;\n }\n\n if (descriptor.requiredExpression) {\n field.expressionProperties!['templateOptions.required'] = descriptor.requiredExpression;\n }\n if (descriptor.required) {\n field.templateOptions!.required = true;\n }\n\n if (descriptor.hiddenExpression) {\n field.expressionProperties!['hide'] = descriptor.hiddenExpression;\n }\n\n if (descriptor.disabledExpression) {\n field.expressionProperties!['templateOptions.disabled'] = descriptor.disabledExpression;\n } else if (descriptor.disabled) {\n field.templateOptions!.disabled = true;\n } else {\n field.expressionProperties!['templateOptions.disabled'] = 'formState.disabled';\n }\n\n if (typeof descriptor.defaultValue !== 'undefined') {\n field.defaultValue = descriptor.defaultValue;\n }\n\n for (const validator of descriptor.validators) {\n field.validators[validator.name] = {expression: validator.expression, message: validator.message};\n }\n\n return field;\n }\n}\n","import {EnumValue} from '../models';\nimport {EnumConstantType, EnumType} from '../types';\n\nexport class EnumUtil {\n /**\n * Returns array of names for constants in enum.\n * @param enumType Enum object.\n */\n public static getConstantNames(enumType: EnumType): Array<string> {\n return EnumUtil.getConstantNamesFromEnumObject(enumType);\n }\n\n /**\n * Returns array of names for constants in enum.\n * @param enumObj Enum object.\n */\n public static getConstantNamesFromEnumObject(enumObj: object): Array<string> {\n // in number enum, the numbers are also represented in objects and should be filtered out\n return Object.keys(enumObj).filter(v => isNaN(+v));\n }\n\n /**\n * Returns array of string values for constants in enum.\n * @param enumType Enum object.\n */\n public static getConstantValuesAsString(enumType: EnumType): Array<string> {\n return Object.keys(enumType).map(v => enumType[v as keyof object] as string);\n }\n\n /**\n * Returns array of number values for constants in enum.\n * @param enumType Enum object.\n */\n public static getConstantValuesAsNumber(enumType: EnumType): Array<number> {\n return Object.keys(enumType)\n .filter(v => !isNaN(+v))\n .map(v => +v);\n }\n\n /**\n * Returns array of type EnumValue for all constants in enum.\n * @param enumType Enum object.\n * @param nameAsValue If use name of constant as value (optional, default: false).\n * @param titlePath Base path for title to use as translation (optional).\n */\n public static fromConstantsAsEnumValueArray(enumType: EnumType, nameAsValue = false, titlePath?: string) {\n return EnumUtil.getConstantNames(enumType).map(\n n => <EnumValue<string | number>>{name: n, title: `${titlePath ? `${titlePath}.` : ''}${n}`, value: nameAsValue ? n : enumType[n]}\n );\n }\n\n /**\n * Returns array of type EnumValue for provided values in enum.\n * @param enumType Enum object.\n * @param nameAsValue If use name of constant as value (optional, default: false).\n * @param titlePath Base path for title to use as translation (optional).\n */\n public static fromValuesAsEnumValueArray(enumType: EnumType, values: Array<EnumConstantType>, nameAsValue = false, titlePath?: string) {\n return values.map(v => {\n const k = EnumUtil.getConstantName(enumType, v);\n return {name: k, title: `${titlePath ? `${titlePath}.` : ''}${k}`, value: nameAsValue ? k : v} as EnumValue<string | number>;\n });\n }\n\n /**\n * Gets constant name for value.\n * @param enumType Enum object.\n * @param value Value of enum constant.\n */\n public static getConstantName(enumType: EnumType, value: EnumConstantType): string | null {\n if (typeof value === 'string') {\n return this.getConstantNames(enumType).find(c => enumType[c] === value) ?? null;\n } else {\n return typeof enumType[value] !== 'undefined' ? (enumType[value] as string) : null;\n }\n }\n\n /**\n * Gets constant name for value.\n * @param enumObj Enum object.\n * @param value Value of enum constant.\n */\n public static getConstantNameFromEnumObject(enumObj: object, value: EnumConstantType): string | null {\n const enumObjAny = enumObj as any;\n if (typeof value === 'string') {\n return this.getConstantNamesFromEnumObject(enumObj).find(c => enumObjAny[c] === value) ?? null;\n } else {\n return typeof enumObjAny[value] !== 'undefined' ? (enumObjAny[value] as string) : null;\n }\n }\n}\n","export const typeNameDecoratorPropertyName = 'typeName';\n\nexport function TypeName(typeName: string): ClassDecorator {\n return function (target: any) {\n target[typeNameDecoratorPropertyName] = typeName;\n };\n}\n\nexport const enumNameDecoratorPropertyName = 'enumName';\n\nexport function EnumName(typeName: string): ClassDecorator {\n return function (target: any) {\n target[enumNameDecoratorPropertyName] = typeName;\n };\n}\n","import 'reflect-metadata';\n\nimport {ClassType, EnumType, enumNameDecoratorPropertyName, typeNameDecoratorPropertyName} from '../types';\n\nexport class TypeUtil {\n /**\n * Defines type name decorator.\n * @param targetType class.\n * @param typeName Name of the type.\n */\n public static defineReflectTypeName(targetType: ClassType<any>, typeName?: string) {\n if (!typeName) {\n typeName = TypeUtil.getDecoratorTypeName(targetType);\n if (!typeName) {\n console.warn(`Type name not provided for target ${targetType}, nor could be retrieved from decorator. Type name was not registered to reflect.`);\n return;\n }\n }\n\n if (!Reflect.hasOwnMetadata(typeNameDecoratorPropertyName, targetType)) {\n Reflect.defineMetadata(typeNameDecoratorPropertyName, typeName, targetType);\n }\n }\n\n /**\n * Defines enum name decorator.\n * @param targetType enum object.\n * @param enumName Name of the enum.\n */\n public static defineReflectEnumName(targetType: EnumType, enumName: string) {\n if (!Reflect.hasOwnMetadata(enumNameDecoratorPropertyName, targetType)) {\n Reflect.defineMetadata(enumNameDecoratorPropertyName, enumName, targetType);\n }\n }\n\n /**\n * Gets type name from either decorator or reflect metadata.\n * @param type Class.\n */\n public static findTypeName(type: ClassType<any>): string {\n let decoratorName = TypeUtil.getDecoratorTypeName(type);\n if (decoratorName) {\n return decoratorName;\n }\n decoratorName = Reflect.getMetadata(typeNameDecoratorPropertyName, type);\n if (decoratorName) {\n return decoratorName;\n }\n return type.name;\n }\n\n /**\n * Gets enum name from either decorator or reflect metadata.\n * @param enumType Class.\n */\n public static findEnumName(enumType: EnumType): string {\n let decoratorName = TypeUtil.getDecoratorEnumName(enumType);\n if (decoratorName) {\n return decoratorName;\n }\n decoratorName = Reflect.getMetadata(enumNameDecoratorPropertyName, enumType);\n if (decoratorName) {\n return decoratorName;\n }\n throw new Error('Could not fined enum name');\n }\n\n /**\n * Get value from decorator defined property name\n * @param type Class.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n public static getDecoratorTypeName(type: Function): string | undefined {\n return (type as any)[typeNameDecoratorPropertyName];\n }\n\n /**\n * Get value from decorator defined property name\n * @param type Enum object.\n */\n public static getDecoratorEnumName(type: EnumType): string | undefined {\n return (type as any)[enumNameDecoratorPropertyName];\n }\n}\n","import {TranslateService} from '@ngx-translate/core';\nimport {Observable, of} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {ActionDescriptor, ActionEditorDescriptor, ModelDescriptor} from '../descriptors';\nimport {MngError} from '../models';\nimport {ClassType} from '../types';\nimport {TypeUtil} from './type.util';\n\nexport namespace I18nUtils {\n export class Common {\n public static getAsync(translate: TranslateService, params?: any, ...keys: Array<string>): Observable<string | null> {\n return translate.stream(keys, params).pipe(map(i18n => I18nUtils.Common.selectI18n(keys, i18n)));\n }\n\n public static get(translate: TranslateService, params?: any, ...keys: Array<string>): string | null {\n const i18n = translate.instant(keys, params);\n return I18nUtils.Common.selectI18n(keys, i18n);\n }\n\n public static populateParams(item?: any, params: any = {}) {\n const paramsRes = {...params};\n if (item) {\n paramsRes.item = item;\n }\n return paramsRes;\n }\n\n public static selectI18n(keys: string[], i18n: any): string | null {\n for (const key of keys) {\n if (key !== i18n[key]) {\n return i18n[key];\n }\n }\n return null;\n }\n }\n\n export class Type {\n public static getClassNameAsync(translate: TranslateService, classType: ClassType<any>, singular?: boolean): Observable<string | null> {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getNameAsync(translate, typeName, singular);\n }\n\n public static getClassName(translate: TranslateService, classType: ClassType<any>, singular?: boolean): string | null {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getName(translate, typeName, singular);\n }\n\n public static getNameAsync(translate: TranslateService, typeName: string, singular?: boolean): Observable<string | null> {\n const keys = I18nUtils.Type.getNameKeys(typeName, singular);\n return I18nUtils.Common.getAsync(translate, undefined, ...keys);\n }\n\n public static getName(translate: TranslateService, typeName: string, singular?: boolean): string | null {\n const keys = I18nUtils.Type.getNameKeys(typeName, singular);\n return I18nUtils.Common.get(translate, undefined, ...keys);\n }\n\n public static getClassTabKey(classType: ClassType<any>, tab: string): string {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getTabKey(typeName, tab);\n }\n\n public static getTabKey(typeName: string, tab: string): string {\n return I18nUtils.Type.getPath(typeName, 'tabs', tab);\n }\n\n public static getClassGroupKey(classType: ClassType<any>, group: string): string {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getGroupKey(typeName, group);\n }\n\n public static getGroupKey(typeName: string, group: string): string {\n return I18nUtils.Type.getPath(typeName, 'groups', group);\n }\n\n public static getClassPropertyKey(classType: ClassType<any>, property: string): string {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getPropertyKey(typeName, property);\n }\n\n public static getPropertyKey(typeName: string, property: string): string {\n return I18nUtils.Type.getPath(typeName, 'properties', property);\n }\n\n public static getClassPath(classType: ClassType<any>, ...path: Array<string>): string {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getPath(typeName, ...path);\n }\n\n public static getPath(typeName: string, ...path: Array<string>): string {\n return `${typeName}.${path.join('.')}`;\n }\n\n public static getClassParams(translate: TranslateService, classType: ClassType<any>, item: any, params: any = {}): any {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getParams(translate, typeName, item, params);\n }\n\n public static getParams(translate: TranslateService, typeName?: string, item?: any, params: any = {}): any {\n const i18nTypeName = typeName ? I18nUtils.Type.getName(translate, typeName, true) : null;\n return I18nUtils.Type.populateParams(i18nTypeName ?? undefined, item, params);\n }\n\n public static getClassParamsAsync(translate: TranslateService, classType: ClassType<any>, item?: any, params: any = {}): Observable<any> {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getParamsAsync(translate, typeName, item, params);\n }\n\n public static getParamsAsync(translate: TranslateService, typeName?: string, item?: any, params: any = {}): Observable<any> {\n return (typeName ? I18nUtils.Type.getNameAsync(translate, typeName, true) : of(null)).pipe(\n map(i18nTypeName => I18nUtils.Type.populateParams(i18nTypeName ?? undefined, item, params))\n );\n }\n\n public static populateParams(i18nTypeName?: string, item?: any, params: any = {}): any {\n const paramsRes = {...params};\n if (i18nTypeName) {\n paramsRes.typeName = i18nTypeName;\n }\n return I18nUtils.Common.populateParams(item, paramsRes);\n }\n\n private static getNameKeys(typeName: string, singular?: boolean): Array<string> {\n const keys = [];\n if (typeof singular !== 'undefined') {\n keys.push(singular ? `${typeName}.nameSingular` : `${typeName}.namePlural`);\n }\n keys.push(`${typeName}.name`);\n return keys;\n }\n }\n\n export class Model {\n public static get(\n translate: TranslateService,\n model: ModelDescriptor<any>,\n keyPath: string,\n customKey?: string,\n item?: any,\n fallbackKey?: string,\n params?: any\n ): string | null {\n const keys = I18nUtils.Model.getKeysByPriority(model, keyPath, customKey, fallbackKey);\n const i18nParams = I18nUtils.Model.getParams(translate, model, item, params);\n return I18nUtils.Common.get(translate, i18nParams, ...keys);\n }\n\n public static getName(translate: TranslateService, model: ModelDescriptor<any>, singular?: boolean): string | null {\n return I18nUtils.Type.getName(translate, model.typeName, singular);\n }\n\n public static getNameAsync(translate: TranslateService, model: ModelDescriptor<any>, singular?: boolean): Observable<string | null> {\n return I18nUtils.Type.getNameAsync(translate, model.typeName, singular);\n }\n\n public static getParams(translate: TranslateService, model?: ModelDescriptor<any>, item?: any, params: any = {}): any {\n const i18nParams = I18nUtils.Type.getParams(translate, model?.typeName, item, params);\n return I18nUtils.Model.populateParams(model?.idPropertyName, model?.titlePropertyName, item, i18nParams);\n }\n\n public static getParamsAsync(translate: TranslateService, model?: ModelDescriptor<any>, item?: any, params: any = {}): Observable<any> {\n return I18nUtils.Type.getParamsAsync(translate, model?.typeName, item, params).pipe(\n map(i18nParams => I18nUtils.Model.populateParams(model?.idPropertyName, model?.titlePropertyName, item, i18nParams))\n );\n }\n\n public static populateParams(idProperty?: string, titleProperty?: string, item?: any, params: any = {}): any {\n const paramsRes = {...params, itemId: '', itemTitle: ''};\n if (item) {\n if (idProperty && item[idProperty]) {\n paramsRes.itemId = item[idProperty];\n }\n if (titleProperty && item[titleProperty]) {\n paramsRes.itemTitle = item[titleProperty];\n }\n }\n return paramsRes;\n }\n\n private static getKeysByPriority(model: ModelDescriptor<any>, keyPath: string, customKey?: string, fallbackKey?: string) {\n const keys = [];\n if (customKey) {\n keys.push(customKey);\n }\n const modelActionKey = I18nUtils.Type.getPath(model.typeName, ...keyPath);\n keys.push(modelActionKey);\n if (fallbackKey) {\n keys.push(fallbackKey);\n }\n return keys;\n }\n }\n\n export class Action {\n public static get(\n translate: TranslateService,\n action: ActionDescriptor<any>,\n actionPathKeys: string | Array<string>,\n customKey?: string,\n item?: any,\n fallbackKey?: string,\n params?: any\n ): string | null {\n const keys = I18nUtils.Action.getKeysByPriority(action, actionPathKeys, customKey, fallbackKey);\n const i18nParams = I18nUtils.Action.getParams(translate, action, item, params);\n return I18nUtils.Common.get(translate, i18nParams, ...keys);\n }\n\n public static getAsync(\n translate: TranslateService,\n action: ActionDescriptor<any>,\n actionPathKeys: string | Array<string>,\n customKey?: string,\n item?: any,\n fallbackKey?: string,\n params?: any\n ): Observable<string | null> {\n return I18nUtils.Action.getParamsAsync(translate, action, item, params).pipe(\n mergeMap(i18nParams => {\n const keys = I18nUtils.Action.getKeysByPriority(action, actionPathKeys, customKey, fallbackKey);\n return I18nUtils.Common.getAsync(translate, i18nParams, ...keys);\n })\n );\n }\n\n public static getTitleAsync(translate: TranslateService, action: ActionDescriptor<any>, item?: any): Observable<string | null> {\n return I18nUtils.Action.getAsync(translate, action, 'title', undefined, item);\n }\n\n public static getEditorTitleAsync(translate: TranslateService, action: ActionEditorDescriptor<any>, item?: any): Observable<string | null> {\n return I18nUtils.Action.getAsync(translate, action, ['editor.title', 'title'], action.editorTitle ?? undefined, item);\n }\n\n public static getParams(translate: TranslateService, action: ActionDescriptor<any>, item?: any, params: any = {}): any {\n const i18nParams = I18nUtils.Model.getParams(translate, action.model ?? undefined, item, params);\n return I18nUtils.Action.populateParams(i18nParams);\n }\n\n public static getParamsAsync(translate: TranslateService, action: ActionDescriptor<any>, item?: any, params: any = {}): Observable<any> {\n return I18nUtils.Model.getParamsAsync(translate, action.model ?? undefined, item, params).pipe(map(i18nParams => I18nUtils.Action.populateParams(i18nParams)));\n }\n\n public static populateParams(params: any = {}): any {\n params = {...params};\n return params;\n }\n\n private static getKeysByPriority(action: ActionDescriptor<any>, actionPathKeys: string | Array<string>, customKey?: string, fallbackKey?: string) {\n const keys = [];\n if (customKey) {\n keys.push(customKey);\n }\n if (!Array.isArray(actionPathKeys)) {\n actionPathKeys = [actionPathKeys];\n }\n actionPathKeys.forEach(k => {\n const modelActionKey = `${action.i18nModelActionBaseKey}.${k}`;\n const actionKey = `${action.actionName}.${k}`;\n keys.push(modelActionKey, actionKey);\n });\n if (fallbackKey) {\n keys.push(fallbackKey);\n }\n return keys;\n }\n }\n\n export class Error {\n public static get(translate: TranslateService, error: MngError, params: any = {}): string | null {\n const i18nParams = I18nUtils.Error.getParams(error, params);\n if (error.messageCode) {\n const keys = [`errors.${error.messageCode}`, `messages.${error.messageCode}`];\n const i18n = I18nUtils.Common.get(translate, i18nParams, ...keys);\n if (i18n) {\n return i18n;\n }\n }\n return I18nUtils.Common.get(translate, i18nParams, error.message);\n }\n\n public static getParams(error: MngError, params: any = {}) {\n const paramsRes = {...params};\n paramsRes.errorStatus = '';\n paramsRes.errorMessage = '';\n\n if (error.status) {\n paramsRes.errorStatus = error.status;\n }\n if (error.message) {\n paramsRes.errorMessage = error.message;\n }\n if (error.statusDescription) {\n paramsRes.errorStatusDescription = error.statusDescription;\n }\n paramsRes.error = error;\n return paramsRes;\n }\n }\n}\n","import {AttributeDef} from '../api/models';\nimport {ObjectSerializer} from '../api/utils';\nimport {ILookupDescriptor} from '../descriptors';\nimport {ClassType} from '../types';\n\nexport class ModelUtil {\n public static findIdAttribute<T>(classType: ClassType<T>): string | null {\n const objSerializer = ObjectSerializer.get();\n const attributes = objSerializer.findAttributesDefinitionByClassType(classType);\n if (!attributes) {\n return null;\n }\n\n let idAttribute = ModelUtil.findAttributeByTypeAndName(attributes, 'string', 'id', 'uuid', 'code', 'sifra');\n if (!idAttribute) {\n // if no id or code, take the first attribute\n idAttribute = attributes[0];\n }\n\n return idAttribute?.name ?? null;\n }\n\n public static findTitleAttribute<T>(classType: ClassType<T>): string | null {\n const objSerializer = ObjectSerializer.get();\n const attributes = objSerializer.findAttributesDefinitionByClassType(classType);\n if (!attributes) {\n return null;\n }\n\n let titleAttribute = ModelUtil.findAttributeByTypeAndName(attributes, 'string', 'name', 'ime', 'title', 'naziv');\n if (!titleAttribute) {\n // if no name or title, take the first attribute\n titleAttribute = attributes[0];\n }\n\n return titleAttribute?.name ?? null;\n }\n\n private static findAttributeByTypeAndName(attributes: AttributeDef[], type: string, ...names: string[]): AttributeDef | null {\n for (const name of names) {\n const attribute = attributes.find(a => a.type === type && a.name === name);\n if (attribute) {\n return attribute;\n }\n }\n return null;\n }\n\n public static trySetLookupItemsProperties<T>(lookup: ILookupDescriptor<T>, idAsDataKey = true) {\n if (lookup.modelType) {\n if (!lookup.itemsValueProperty || !lookup.dataKeyProperty) {\n const idProperty = ModelUtil.findIdAttribute(lookup.modelType) ?? undefined;\n if (idProperty && !lookup.itemsValueProperty && !lookup.dataKeyProperty) {\n if (idAsDataKey) {\n lookup.withDataKeyProperty(idProperty);\n } else {\n lookup.withItemsValueProperty(idProperty);\n }\n }\n }\n if (!lookup.itemsLabelProperty) {\n const labelProperty = ModelUtil.findTitleAttribute(lookup.modelType);\n if (labelProperty) {\n lookup.withItemsLabelProperty(labelProperty);\n }\n }\n }\n }\n}\n","import {TranslateService} from '@ngx-translate/core';\nimport {Message} from 'primeng/api';\n\nimport {ActionDescriptor, TableDescriptor} from '../descriptors';\nimport {IViewContainer, MngError} from '../models';\nimport {I18nUtils} from './i18n.util';\n\nexport class NotificationUtil {\n public static notification(viewContainer?: IViewContainer<any, any>, title?: string, message?: string, severity: 'success' | 'warn' | 'error' = 'success'): Message {\n const messageService = viewContainer?.getMessageService();\n const notification: Message = {severity: severity, summary: title, detail: message, life: severity === 'error' ? 10000 : 5000};\n if (messageService) {\n messageService.add(notification);\n } else {\n console.warn(`No message service was provided through view container, message will not be displayed.`);\n }\n return notification;\n }\n\n public static tableNotificationError(translate: TranslateService, table: TableDescriptor<any>, error: any, viewContainer?: IViewContainer<any, any>): Message {\n const params: any = {};\n if (error?.message) {\n params.errorMessage = `: ${error.message}`;\n } else {\n params.errorMessage = '.';\n }\n const tableErrorTitle = I18nUtils.Model.get(translate, table.model, 'table.error.title', undefined, undefined, 'general.error', params) ?? undefined;\n const tableErrorMessage = I18nUtils.Model.get(translate, table.model, 'table.error.message', undefined, undefined, 'general.errorMessage', params) ?? undefined;\n return NotificationUtil.notification(viewContainer, tableErrorTitle, tableErrorMessage, 'error');\n }\n\n public static actionNotificationSuccess(\n translate: TranslateService,\n action: ActionDescriptor<any>,\n functionName: string,\n customTitleKey?: string,\n customMessageKey?: string,\n viewContainer?: IViewContainer<any, any>,\n item?: any\n ): Message {\n const actionSuccessTitle = I18nUtils.Action.get(translate, action, 'success.title', customTitleKey, item, 'general.success', functionName) ?? undefined;\n const actionSuccessMessage = I18nUtils.Action.get(translate, action, 'success.message', customMessageKey, item, 'general.successMessage', functionName) ?? undefined;\n return NotificationUtil.notification(viewContainer, actionSuccessTitle, actionSuccessMessage);\n }\n\n public static actionNotificationError(\n translate: TranslateService,\n action: ActionDescriptor<any>,\n error: MngError,\n functionName: string,\n viewContainer?: IViewContainer<any, any>,\n item?: any,\n severity: 'warn' | 'error' = 'error'\n ): Message {\n const params = {\n errorMessage: I18nUtils.Error.get(translate, error) ?? error.message\n };\n const actionErrorTitle =\n I18nUtils.Action.get(translate, action, [`error.${functionName}.title`, 'error.title'], action.runNotificationErrorTitle, item, 'general.error', params) ?? undefined;\n const actionErrorMessage =\n I18nUtils.Action.get(translate, action, [`error.${functionName}.message`, 'error.message'], action.runNotificationErrorMessage, item, 'general.errorMessage', params) ??\n undefined;\n return NotificationUtil.notification(viewContainer, actionErrorTitle, actionErrorMessage, severity);\n }\n\n public static getFormEditorWarningMessage(translate: TranslateService, title: string, message: string): Message {\n const actionErrorTitle = translate.instant(title) ?? undefined;\n const actionErrorMessage = translate.instant(message) ?? undefined;\n return {severity: 'warn', summary: actionErrorTitle, detail: actionErrorMessage};\n }\n}\n","import {ClassType} from '../../types';\nimport {TypeUtil} from '../../utils';\nimport {AttributeDef, SerializableTypeMap, enumsMapBase, typeMapBase} from '../models';\n\nexport class ObjectSerializer {\n private static _instance: ObjectSerializer = new ObjectSerializer();\n private readonly _primitives: string[] = ['string', 'boolean', 'double', 'integer', 'long', 'float', 'number', 'any'];\n private readonly _typeMap: SerializableTypeMap = {\n ...typeMapBase\n };\n private readonly _enumMap: SerializableTypeMap = {\n ...enumsMapBase\n };\n\n public get primitives() {\n return this._primitives;\n }\n\n public get typeMap() {\n return this._typeMap;\n }\n\n public get enumMap() {\n return this._enumMap;\n }\n\n /**\n * Only use one instance of object (out of Angular context)\n */\n public static get(): ObjectSerializer {\n return ObjectSerializer._instance;\n }\n\n public findAttributeDefinitionByClassType(type: ClassType<any>, attributeName: string): AttributeDef | null {\n return this.findAttributeDefinition(TypeUtil.findTypeName(type), attributeName);\n }\n\n public findAttributeDefinition(typeName: string, attributeName: string): AttributeDef | null {\n const attributeDefs = this.findAttributesDefinition(typeName);\n if (!attributeDefs) {\n return null;\n }\n for (const attribute of attributeDefs) {\n if (attribute.name === attributeName) {\n return attribute;\n }\n }\n return null;\n }\n\n public findAttributesDefinitionByClassType(type: ClassType<any>): Array<AttributeDef> | null {\n return this.findAttributesDefinition(TypeUtil.findTypeName(type));\n }\n\n public findAttributesDefinition(typeName: string): Array<AttributeDef> | null {\n const typeDef = this.findType(typeName);\n if (!typeDef) {\n return null;\n }\n return typeDef.getAttributeTypeMap() as Array<AttributeDef>;\n }\n\n public findByClassType(type: ClassType<any>): any {\n return this.findType(TypeUtil.findTypeName(type));\n }\n\n public findType(typeName: string): any {\n return this._typeMap[typeName];\n }\n\n public findEnum(enumName: string): any {\n return this._enumMap[enumName];\n }\n\n public registerTypes(types: SerializableTypeMap) {\n for (const key in types) {\n this.registerType(types[key], key);\n }\n }\n\n public registerType(type: ClassType<any>, optTypeName?: string) {\n // try to find name from decorator\n let typeName = TypeUtil.getDecoratorTypeName(type);\n if (!typeName) {\n // defined name from optional type name\n typeName = optTypeName;\n if (!typeName) {\n console.warn(`Registering type ${type} failed, because typeName could not be determined and optional name was not provided.`);\n return;\n }\n }\n if (typeof this._typeMap[typeName] !== 'undefined') {\n console.warn(`Registering type ${type} under key ${typeName} skipped, because type already exists for this key.`);\n } else {\n TypeUtil.defineReflectTypeName(type, typeName);\n this._typeMap[typeName] = type;\n }\n }\n\n public registerEnums(enums: SerializableTypeMap) {\n for (const key in enums) {\n this.registerEnum(enums[key], key);\n }\n }\n\n public registerEnum(enumType: any, enumName: string) {\n // try to find name from decorator\n if (typeof this._enumMap[enumName] !== 'undefined') {\n console.warn(`Registering enum ${enumName} skipped, because enum already exists.`);\n } else {\n TypeUtil.defineReflectEnumName(enumType, enumName);\n this._enumMap[enumName] = enumType;\n }\n }\n\n public findCorrectType(data: any, expectedType: string) {\n if (data == undefined) {\n return expectedType;\n } else if (this._primitives.indexOf(expectedType.toLowerCase()) !== -1) {\n return expectedType;\n } else if (expectedType === 'Date') {\n return expectedType;\n } else {\n if (this._enumMap[expectedType]) {\n return expectedType;\n }\n\n if (!this._typeMap[expectedType]) {\n return expectedType; // w/e we don't know the type\n }\n\n // Check the discriminator\n const discriminatorProperty = this._typeMap[expectedType].discriminator;\n if (discriminatorProperty == null) {\n return expectedType; // the type does not have a discriminator. use it.\n } else {\n if (data[discriminatorProperty]) {\n const discriminatorType = data[discriminatorProperty];\n if (this._typeMap[discriminatorType]) {\n return discriminatorType; // use the type given in the discriminator\n } else {\n return expectedType; // discriminator did not map to a type\n }\n } else {\n return expectedType; // discriminator was not present (or an empty string)\n }\n }\n }\n }\n\n public serializeClass<T>(data: T, type: ClassType<T>) {\n return this.serialize(data, TypeUtil.findTypeName(type));\n }\n\n public serializeClassArray<T>(data: Array<T>, type: ClassType<T>) {\n return this.serialize(data, `Array<${TypeUtil.findTypeName(type)}>`);\n }\n\n public serialize(data: any, type: string) {\n if (data == undefined) {\n return data;\n } else if (this._primitives.indexOf(type.toLowerCase()) !== -1) {\n return data;\n } else if (type.lastIndexOf('Array<', 0) === 0) {\n // string.startsWith pre es6\n let subType: string = type.replace('Array<', ''); // Array<Type> => Type>\n subType = subType.substring(0, subType.length - 1); // Type> => Type\n const transformedData: any[] = [];\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < data.length; index++) {\n const datum = data[index];\n transformedData.push(this.serialize(datum, subType));\n }\n return transformedData;\n } else if (type === 'Date') {\n if (data instanceof Date) {\n return data.toISOString();\n } else {\n return new Date(data).toISOString();\n }\n } else {\n if (this._enumMap[type]) {\n return data;\n }\n if (!this._typeMap[type]) {\n // in case we dont know the type\n return data;\n }\n\n // Get the actual type of this object\n type = this.findCorrectType(data, type);\n\n // get the map for the correct type.\n const attributeTypes = this._typeMap[type].getAttributeTypeMap() as Array<AttributeDef>;\n const instance: {[index: string]: any} = {};\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < attributeTypes.length; index++) {\n const attributeType = attributeTypes[index];\n instance[attributeType.baseName] = this.serialize(data[attributeType.name], attributeType.type);\n }\n return instance;\n }\n }\n\n public deserializeClass<T>(data: any, type: ClassType<T>): T {\n return this.deserialize(data, TypeUtil.findTypeName(type));\n }\n\n public deserializeClassArray<T>(data: any, type: ClassType<T>): Array<T> {\n return this.deserialize(data, `Array<${TypeUtil.findTypeName(type)}>`);\n }\n\n public deserialize(data: any, type: string) {\n // polymorphism may change the actual type.\n type = this.findCorrectType(data, type);\n if (data == undefined) {\n return data;\n } else if (this._primitives.indexOf(type.toLowerCase()) !== -1) {\n return data;\n } else if (type.lastIndexOf('Array<', 0) === 0) {\n // string.startsWith pre es6\n let subType: string = type.replace('Array<', ''); // Array<Type> => Type>\n subType = subType.substring(0, subType.length - 1); // Type> => Type\n const transformedData: any[] = [];\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < data.length; index++) {\n const datum = data[index];\n transformedData.push(this.deserialize(datum, subType));\n }\n return transformedData;\n } else if (type === 'Date') {\n return new Date(data);\n } else {\n if (this._enumMap[type]) {\n // is Enum\n return data;\n }\n\n if (!this._typeMap[type]) {\n // dont know the type\n return data;\n }\n const instance = new this._typeMap[type]();\n const attributeTypes = this._typeMap[type].getAttributeTypeMap() as Array<AttributeDef>;\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < attributeTypes.length; index++) {\n const attributeType = attributeTypes[index];\n instance[attributeType.name] = this.deserialize(data[attributeType.baseName], attributeType.type);\n }\n return instance;\n }\n }\n}\n","import {Params} from '@angular/router';\n\nimport {FilterMetadata, LazyLoadEvent} from 'primeng/api';\n\nimport {FilterDescriptor} from '../../descriptors';\nimport {MediusFilterMatchType, MediusQueryParam, MediusQueryParamBuilder} from '../models';\n\nexport class MediusRestUtil {\n // first value is from primeNG, second is for use in query params\n public static readonly matchModeMapping: Array<[string, string, MediusFilterMatchType]> = [\n ['contains', 'c', MediusFilterMatchType.Contains],\n ['endsWith', 'ew', MediusFilterMatchType.EndsWith],\n ['equals', 'eq', MediusFilterMatchType.Equals],\n ['gte', 'gte', MediusFilterMatchType.GreaterThan],\n ['leq', 'leq', MediusFilterMatchType.SmallerThan],\n ['startsWith', 'sw', MediusFilterMatchType.StartsWith],\n ['in', 'in', MediusFilterMatchType.In],\n ['notEquals', 'neq', MediusFilterMatchType.NotEquals]\n ];\n\n public static fromAngularQueryParamsToMediusQueryParams(\n params: Params,\n filterDescriptors: Array<FilterDescriptor<any>>,\n defaultItemsPerPage = 10,\n defaultOffset = 0\n ): MediusQueryParam {\n const offset = params['first'] ? parseInt(params['first']) : defaultOffset;\n const itemsPerPage = params['rows'] ? parseInt(params['rows']) : defaultItemsPerPage;\n\n const mediusParamsBuilder = MediusQueryParamBuilder.create(itemsPerPage, offset);\n\n if (params['sort']) {\n for (const sort of params['sort'].split(',')) {\n const qpSortSplit = sort.split(':');\n const field = qpSortSplit[0];\n const asc = qpSortSplit.length > 1 ? qpSortSplit[1] === 'asc' : true;\n mediusParamsBuilder.withSort(field, asc);\n }\n }\n if (params['filter']) {\n const filterSplit = params['filter'].split(',');\n for (const filterField of filterSplit) {\n const filterFieldSplit = filterField.split(':');\n const field = filterFieldSplit[0];\n const operator = filterFieldSplit.length > 1 ? filterFieldSplit[1] : 'eq';\n\n // prepare value\n let value: any = filterFieldSplit.length > 2 ? filterFieldSplit[2] : '';\n const valueTo: any = undefined;\n if (value.startsWith(\"'\")) {\n value = value.substring(1, value.length - 1);\n }\n if (value.startsWith('[') && value.endsWith(']')) {\n value = value\n .substring(1, value.length - 1)\n .split(',')\n .map((v: string) => (v.startsWith(\"'\") ? v.substring(1, v.length - 1) : v));\n }\n\n const operatorMapping = MediusRestUtil.matchModeMapping.find(mapping => mapping[1] === operator);\n const filterDescriptor = filterDescriptors.find(f => f.property === field);\n if (operatorMapping && filterDescriptor) {\n const fieldFilterProperty = filterDescriptor.filterProperty ?? filterDescriptor.property;\n mediusParamsBuilder.withFilter(fieldFilterProperty, value, valueTo, MediusRestUtil.getMediusFilterMatchTypeFromPrimeMatchMode(operatorMapping[0]));\n }\n }\n }\n\n return mediusParamsBuilder.build();\n }\n\n public static fromPrimeLazyLoadEventToAngularQueryParams(event: LazyLoadEvent, defaultItemsPerPage = 10, defaultOffset = 0): Params {\n const params: Params = {\n first: null,\n rows: null,\n sort: null,\n filter: null\n };\n\n if (event.first && event.first !== defaultOffset && event.first > 0) {\n params['first'] = event.first;\n }\n if (event.rows && event.rows !== defaultItemsPerPage && event.rows > 0) {\n params['rows'] = event.rows;\n }\n\n if (event.multiSortMeta?.length ?? 0 > 0) {\n params['sort'] = event.multiSortMeta?.map(s => `${s.field}${s.order === 1 ? '' : ':desc'}`).join(',');\n }\n\n if (event.filters) {\n const filters = [];\n for (const field in event.filters) {\n const primeOperator = event.filters[field].matchMode;\n let value = event.filters[field].value;\n const operatorMapping = MediusRestUtil.matchModeMapping.find(mapping => mapping[0] === primeOperator);\n if (\n operatorMapping &&\n typeof value !== 'undefined' &&\n value !== null &&\n ((typeof value === 'string' && value.length > 0) || (Array.isArray(value) && value.length > 0))\n ) {\n if (Array.isArray(value)) {\n value = `[${value.map(v => `'${v}'`).join(',')}]`;\n } else {\n value = `'${value}'`;\n }\n\n filters.push(`${field}:${operatorMapping[1]}:${value}`);\n }\n }\n if (filters.length > 0) {\n params['filter'] = filters.join(',');\n }\n }\n\n return params;\n }\n\n public static fromPrimeLazyLoadEventToMediusQueryParams(event: LazyLoadEvent): MediusQueryParam {\n const queryParamBuilder = MediusQueryParamBuilder.create(event.rows, event.first);\n\n // apply sorting\n if (event.multiSortMeta) {\n event.multiSortMeta.forEach(msm => queryParamBuilder.withSort(msm.field, msm.order === 1));\n }\n\n // apply filtering\n if (event.filters) {\n for (const key of Object.keys(event.filters)) {\n const filterEvent = event.filters[key];\n if (Array.isArray(filterEvent)) {\n (filterEvent as FilterMetadata[]).filter(e => e.value).forEach(e => MediusRestUtil.addMediusFilterFromPrimeFilterMetadata(queryParamBuilder, key, e));\n } else if (typeof filterEvent === 'object') {\n if (filterEvent.value) {\n MediusRestUtil.addMediusFilterFromPrimeFilterMetadata(queryParamBuilder, key, filterEvent);\n }\n }\n }\n }\n\n return queryParamBuilder.build();\n }\n\n public static addMediusFilterFromPrimeFilterMetadata(queryParamBuilder: MediusQueryParamBuilder, property: string, filterMetadata: FilterMetadata) {\n const matchType: MediusFilterMatchType = MediusRestUtil.getMediusFilterMatchTypeFromPrimeMatchMode(filterMetadata.matchMode ?? 'contains');\n queryParamBuilder.withFilter(property, filterMetadata.value, undefined, matchType);\n }\n\n public static getMediusFilterMatchTypeFromPrimeMatchMode(matchMode: string): MediusFilterMatchType {\n const mapping = MediusRestUtil.matchModeMapping.find(m => m[0] === matchMode);\n return mapping?.[2] ?? MediusFilterMatchType.Contains;\n }\n}\n","import {Message} from 'primeng/api';\nimport {DynamicDialogRef} from 'primeng/dynamicdialog';\nimport {Observable} from 'rxjs';\n\nimport {IDataProvider} from '../../../data-providers';\nimport {IViewContainer} from '../../../models';\nimport {IdType} from '../../../types';\n\nexport class ActionExecContext<T, S, DP extends IDataProvider<T, S>> {\n constructor(\n public readonly dataProvider?: DP,\n public readonly serviceInstance?: S,\n public readonly data?: {\n item?: T;\n itemId?: IdType;\n actionData?: ActionData;\n },\n public readonly sourceComponent: any = null,\n public readonly viewContainer: IViewContainer<T, S> | null = null\n ) {}\n}\n\nexport class ActionError {\n constructor(\n public readonly error: any, // error details\n public readonly dismissed: boolean = false // by user\n ) {}\n}\n\nexport class ActionRunResult<T, S, DP extends IDataProvider<T, S>> {\n public notification?: Message;\n constructor(public readonly context?: ActionExecContext<T, S, DP>, public readonly result?: T, public readonly error?: ActionError) {}\n}\n\nexport class ActionActivationResult<T, S, DP extends IDataProvider<T, S>> {\n constructor(public readonly runResult?: ActionRunResult<T, S, DP>, public readonly dialogRef?: DynamicDialogRef) {}\n\n public get runContext() {\n return this.runResult ? this.runResult.context : null;\n }\n\n public get result() {\n return this.runResult ? this.runResult.result : null;\n }\n\n public get error() {\n return this.runResult ? this.runResult.error : null;\n }\n}\n\nexport class ActionTriggerResult<T, S, DP extends IDataProvider<T, S>> {\n constructor(public readonly activationResult?: ActionActivationResult<T, S, DP>, public readonly routerNavigation?: Observable<boolean>) {}\n\n public get runContext() {\n return this.activationResult ? this.activationResult.runResult : null;\n }\n\n public get result() {\n return this.activationResult ? this.activationResult.result : null;\n }\n\n public get error() {\n return this.activationResult ? this.activationResult.error : null;\n }\n\n public get dialogRef() {\n return this.activationResult ? this.activationResult.dialogRef : null;\n }\n}\n\nexport type ActionData = {\n [key: string]: any;\n};\n","import {InjectionToken} from '@angular/core';\n\nexport const MNG_BROWSER_STORAGE_IT = new InjectionToken<Storage>('Browser storage', {\n providedIn: 'root',\n factory: () => localStorage\n});\n","import {InjectionToken} from '@angular/core';\n\nimport {Observable} from 'rxjs';\n\nexport const MNG_COMMONS_INITIALIZER_IT = new InjectionToken<ReadonlyArray<() => Observable<unknown>>>('MNG Commons Initializer');\n","import {InjectionToken, Type} from '@angular/core';\n\nexport const ACTION_EDITOR_DIALOG_COMPONENT_SETTING: InjectionToken<Type<any>> = new InjectionToken<Type<any>>('ACTION_EDITOR_DIALOG_COMPONENT_SETTING');\n","import {InjectionToken} from '@angular/core';\n\nimport {MngModuleConfig} from '../../config/models';\n\nexport const MNG_MODULE_CONFIG_IT = new InjectionToken<MngModuleConfig>('MngModuleConfig');\n","import {Location} from '@angular/common';\nimport {Injectable} from '@angular/core';\nimport {NavigationEnd, Router} from '@angular/router';\n\n@Injectable()\nexport class MngNavigationService {\n private history: Array<string> = [];\n\n constructor(private router: Router, private location: Location) {\n this.router.events.subscribe(event => {\n if (event instanceof NavigationEnd) {\n this.history.push(event.urlAfterRedirects);\n }\n });\n }\n\n public getCurrentLocation(): string | null {\n if (this.history.length > 0) {\n return this.history[this.history.length - 1];\n } else {\n return null;\n }\n }\n\n public getPreviousLocation(): string | null {\n if (this.history.length > 1) {\n return this.history[this.history.length - 2];\n } else {\n return null;\n }\n }\n\n public back(): void {\n this.history.pop();\n if (this.history.length > 0) {\n this.location.back();\n } else {\n this.router.navigateByUrl('/');\n }\n }\n}\n","import {MngError} from '../models';\n\nexport abstract class MngErrorMapperService {\n abstract toMngError(error?: any, mngError?: MngError): MngError;\n}\n\nexport class DefaultMngErrorMapperService extends MngErrorMapperService {\n toMngError(error?: any, mngError?: MngError): MngError {\n if (!mngError) {\n mngError = {\n name: error?.name ?? 'UnknownError',\n message: error.message ?? 'Unknown error'\n };\n }\n return mngError;\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({\n name: 'boolean',\n pure: true\n})\nexport class MngBooleanPipe implements PipeTransform {\n transform(value: any, yes?: string, no?: string, icon = false): any {\n if (typeof value === 'boolean') {\n if (icon) {\n return value ? yes ?? 'pi pi-check' : no ?? 'pi pi-times';\n } else {\n return value ? yes ?? 'general.yes' : no ?? 'general.no';\n }\n } else {\n return value;\n }\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nimport {EnumType} from '../types';\nimport {EnumUtil, TypeUtil} from '../utils';\n\n@Pipe({\n name: 'enum',\n pure: true\n})\nexport class MngEnumPipe implements PipeTransform {\n transform(value: unknown, enumObj: EnumType | undefined, i18nPath?: string | null, nameAsValue = false): any {\n if (!value || (typeof value !== 'number' && typeof value !== 'string') || !enumObj) {\n return value;\n }\n const enumConstantName = nameAsValue ? value : EnumUtil.getConstantNameFromEnumObject(enumObj, value);\n if (typeof i18nPath === 'undefined') {\n i18nPath = TypeUtil.findEnumName(enumObj as EnumType);\n }\n return i18nPath ? `${i18nPath}.${enumConstantName}` : enumConstantName;\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nimport {ModelDescriptor} from '../descriptors';\nimport {I18nUtils} from '../utils';\n\n@Pipe({\n name: 'i18nProperty',\n pure: true\n})\nexport class MngI18nPropertyPipe implements PipeTransform {\n transform(property: string, model: ModelDescriptor<any>): any {\n return I18nUtils.Type.getPropertyKey(model.typeName, property);\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nimport {ActionData} from '../components/action/models';\nimport {ModelDescriptor} from '../descriptors';\nimport {IdType} from '../types';\n\n@Pipe({\n name: 'linkFormatter',\n pure: true\n})\nexport class MngLinkFormatterPipe implements PipeTransform {\n private parseUrl(s: string, itemId?: IdType, itemAny?: any, model?: ModelDescriptor<any> | null, actionData?: ActionData): any {\n if (s === ':itemId') {\n return itemId!;\n } else if (model && s.startsWith(`:${model.typeName}.`)) {\n return itemAny[s.substring(model.typeName.length + 2)] ?? '';\n } else if (s.startsWith(':')) {\n return actionData?.[s.substring(1)] ?? '';\n } else {\n return s;\n }\n }\n\n transform(value: string | string[], itemId?: IdType, item?: any, model?: ModelDescriptor<any> | null, actionData?: ActionData): any {\n const itemAny = (item ?? {}) as any;\n if (typeof value === 'string') {\n return value.split('/').map(s => this.parseUrl(s, itemId, itemAny, model, actionData));\n } else {\n const transformedItems: string[] = [];\n value.forEach(val => transformedItems.push(...val.split('/').map(s => this.parseUrl(s, itemId, itemAny, model, actionData))));\n return transformedItems;\n }\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\n/**\n * Imitation of JSONPath Syntax. Supports:\n * - Root object notation with '$'\n * - Dot notation (e.g.: $.foo.bar), no bracket notation for properties\n * - Array notation (e.g.: [0])\n */\n@Pipe({\n name: 'jsonPath',\n pure: true\n})\nexport class JsonPathPipe implements PipeTransform {\n transform(value: any, path = ''): any {\n if (path === '$') {\n // only return the root\n return value;\n }\n\n // Check for leading root object notation\n if (path.startsWith('$')) {\n path = path.substring(1);\n }\n\n // Check for leading .\n if (path.startsWith('.')) {\n path = path.substring(1);\n }\n\n if (path.indexOf('.') >= 0) {\n const pathSplit = path.split('.');\n let currValue = value;\n for (const p of pathSplit) {\n if (typeof currValue === 'undefined' || currValue === null) {\n return currValue;\n }\n\n if (!p.length) {\n // empty path, return current value\n return currValue;\n }\n\n const leftBracketIdx = p.indexOf('[');\n if (leftBracketIdx >= 0 && p.endsWith(']')) {\n // should be reference to array\n const arrayPath = p.substring(0, leftBracketIdx);\n const arrayIdx = +p.substring(leftBracketIdx + 1, p.length - 1);\n const array = currValue[arrayPath];\n console.log(arrayPath, arrayIdx, array);\n if (Array.isArray(array)) {\n if (arrayIdx >= 0 && arrayIdx < array.length) {\n // valid index, continue on the path\n currValue = array[arrayIdx];\n continue;\n } else {\n console.warn(`Path ${path} array index at ${p} is not within valid array range`, value);\n }\n } else {\n console.warn(`Path ${path} array at ${p} is not a valid array`, value);\n }\n\n return undefined;\n } else if (typeof currValue === 'object') {\n currValue = currValue[p];\n } else {\n console.warn(`Path ${path} is not valid for object`, value);\n return currValue;\n }\n }\n return currValue;\n } else {\n return value[path];\n }\n }\n}\n","import {HttpErrorResponse} from '@angular/common/http';\nimport {Inject, Injectable, Injector, Type} from '@angular/core';\nimport {ActivatedRoute, Router, UrlTree} from '@angular/router';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {Confirmation, ConfirmationService} from 'primeng/api';\nimport {DialogService, DynamicDialogConfig} from 'primeng/dynamicdialog';\nimport {Observable, from, of, throwError} from 'rxjs';\nimport {catchError, first, map} from 'rxjs/operators';\n\nimport {ActionActivationResult, ActionData, ActionError, ActionExecContext, ActionRunResult, ActionTriggerResult, IActionConfirmationService} from '../components/action/models';\nimport {MngTableCellClickEvent} from '../components/tableview/models';\nimport {IDataProvider, IEditorDataProvider} from '../data-providers';\nimport {ActionActivationTriggerEnum, ActionDescriptor, ActionEditorDescriptor, ActionTypeEnum, TableDescriptor} from '../descriptors';\nimport {IViewContainer, MngError} from '../models';\nimport {MngLinkFormatterPipe} from '../pipes';\nimport {IdType} from '../types';\nimport {I18nUtils, NotificationUtil} from '../utils';\nimport {MngErrorMapperService} from './error-mapper.service';\nimport {MngNavigationService} from './navigation.service';\nimport {ACTION_EDITOR_DIALOG_COMPONENT_SETTING} from './tokens';\n\n@Injectable()\nexport class MngActionExecutorService {\n constructor(\n private injector: Injector,\n private router: Router,\n private dialogService: DialogService,\n private confirmationService: ConfirmationService,\n private translate: TranslateService,\n private navigationService: MngNavigationService,\n private errorMapper: MngErrorMapperService,\n private linkFormatter: MngLinkFormatterPipe,\n @Inject(ACTION_EDITOR_DIALOG_COMPONENT_SETTING) private defaultEditorDialogComponent: Type<any>\n ) {}\n\n public prepareActionExecContext<T, S>(\n action: ActionDescriptor<T>,\n itemId?: IdType,\n item?: T,\n dataProvider?: IDataProvider<T, S>,\n viewContainer?: IViewContainer<T, S>,\n sourceComponent?: any,\n actionData?: ActionData\n ): ActionExecContext<T, S, IDataProvider<T, S>> {\n const ctxDataProvider = dataProvider ?? action.dataProvider ?? viewContainer?.getDataProvider();\n return new ActionExecContext<T, S, IDataProvider<T, S>>(\n ctxDataProvider,\n this.getDataProviderService(ctxDataProvider) ?? undefined,\n {\n item,\n itemId,\n actionData\n },\n sourceComponent,\n viewContainer\n );\n }\n\n public runAction<T, S>(\n action: ActionDescriptor<T>,\n itemId?: IdType,\n item?: T,\n dataProvider?: IDataProvider<T, S>,\n sourceComponent?: any,\n viewContainer?: IViewContainer<T, S>,\n actionData?: ActionData\n ): Observable<ActionRunResult<T, S, IDataProvider<T, S>>> {\n const context = this.prepareActionExecContext(action, itemId, item, dataProvider, viewContainer, sourceComponent, actionData);\n if (action.hasRunConfirmation) {\n if (typeof sourceComponent?.getConfirmationService !== 'function' || typeof sourceComponent?.getConfirmationServiceInstanceKey !== 'function') {\n throw Error(`Source component ${sourceComponent} should be implementing IConfirmationService interface to be able to provide confirmation functionality.`);\n }\n\n const srcConfirmComponent = sourceComponent as IActionConfirmationService;\n let confirmParams: Confirmation = {\n key: srcConfirmComponent.getConfirmationServiceInstanceKey(action),\n acceptVisible: false,\n rejectVisible: false\n };\n\n if (action.runConfirmationTitle !== null) {\n confirmParams.header = I18nUtils.Action.get(this.translate, action, 'confirm.title', action.runConfirmationTitle, item, 'general.confirmation') ?? undefined;\n }\n if (action.runConfirmationMessage !== null) {\n confirmParams.message = I18nUtils.Action.get(this.translate, action, 'confirm.message', action.runConfirmationMessage, item, 'general.confirmation') ?? undefined;\n }\n if (action.runConfirmationIcon !== null) {\n confirmParams.icon = action.runConfirmationIcon === undefined ? 'pi pi-exclamation-triangle' : action.runConfirmationIcon;\n }\n if (action.runConfirmationAcceptTitle !== null) {\n confirmParams.acceptLabel = I18nUtils.Action.get(this.translate, action, 'confirm.accept', action.runConfirmationAcceptTitle, item, 'general.yes') ?? undefined;\n confirmParams.acceptVisible = true;\n }\n if (action.runConfirmationRejectTitle !== null) {\n confirmParams.rejectLabel = I18nUtils.Action.get(this.translate, action, 'confirm.reject', action.runConfirmationRejectTitle, item, 'general.no') ?? undefined;\n confirmParams.rejectVisible = true;\n }\n\n const observable = new Observable<ActionRunResult<T, S, IDataProvider<T, S>>>(observer => {\n confirmParams.accept = () => {\n action\n .runFunction(context)\n .pipe(\n first(),\n map(res => new ActionRunResult(context, res)),\n map(runResult => {\n if (action.hasRunNotificationSuccess) {\n runResult.notification = NotificationUtil.actionNotificationSuccess(\n this.translate,\n action,\n 'run',\n action.runNotificationSuccessTitle,\n action.runNotificationSuccessMessage,\n viewContainer,\n item\n );\n }\n return runResult;\n }),\n catchError(err => {\n const actionError = this.toMngActionError(err);\n if (action.hasRunNotificationError) {\n actionError.notification = NotificationUtil.actionNotificationError(this.translate, action, actionError, 'run', viewContainer, item);\n }\n return throwError(() => actionError);\n })\n )\n .subscribe(res => {\n observer.next(res);\n observer.complete();\n });\n };\n\n confirmParams.reject = () => {\n observer.error(new ActionRunResult(context, undefined, new ActionError(null, true)));\n };\n\n if (action.runConfirmationConfigMapFn) {\n confirmParams = action.runConfirmationConfigMapFn(context, confirmParams);\n }\n\n srcConfirmComponent.getConfirmationService().confirm(confirmParams);\n });\n return observable;\n } else {\n return action.runFunction(context).pipe(\n map(res => new ActionRunResult(context, res)),\n map(runResult => {\n if (action.hasRunNotificationSuccess) {\n runResult.notification = NotificationUtil.actionNotificationSuccess(\n this.translate,\n action,\n 'run',\n action.runNotificationSuccessTitle,\n action.runNotificationSuccessMessage,\n viewContainer,\n item\n );\n }\n return runResult;\n }),\n catchError(err => {\n const actionError = this.toMngActionError(err);\n if (action.hasRunNotificationError) {\n actionError.notification = NotificationUtil.actionNotificationError(this.translate, action, actionError, 'run', viewContainer, item);\n }\n return throwError(() => actionError);\n })\n );\n }\n }\n\n /**\n * Runs editor action save function usually triggered on form submit.\n *\n * @param action Action descriptor.\n * @param itemId Item id (if exists).\n * @param formItem Item instance (from form).\n * @param dataProvider Data provider\n * @param sourceComponent Source component from where the fetch function was called.\n * @param viewContainer View container/service.\n * @param actionData Additional action data.\n */\n public runEditorSave<T, S>(\n action: ActionEditorDescriptor<T>,\n itemId?: IdType,\n formItem?: T,\n dataProvider?: IEditorDataProvider<T, S>,\n sourceComponent?: any,\n viewContainer?: IViewContainer<T, S>,\n actionData?: ActionData\n ): Observable<ActionRunResult<T, S, IEditorDataProvider<T, S>>> {\n const context = this.prepareExecContextForEditor(action, formItem, itemId, dataProvider, sourceComponent, viewContainer, actionData);\n if (typeof action.submitFunction !== 'function') {\n throw new Error(`Submit function for action ${action.actionName} cannot be invoked.`);\n }\n return action.submitFunction(context).pipe(\n map(res => new ActionRunResult(context, res)),\n map(runResult => {\n if (action.hasRunNotificationSuccess) {\n runResult.notification = NotificationUtil.actionNotificationSuccess(\n this.translate,\n action,\n 'submit',\n action.runNotificationSuccessTitle,\n action.runNotificationSuccessMessage,\n viewContainer,\n formItem\n );\n }\n return runResult;\n }),\n catchError(err => {\n const actionError = this.toMngActionError(err);\n if (action.hasRunNotificationError) {\n actionError.notification = NotificationUtil.actionNotificationError(this.translate, action, actionError, 'submit', viewContainer, formItem);\n }\n return throwError(() => actionError);\n })\n );\n }\n\n /**\n * Runs editor action fetch function.\n *\n * @param action Action descriptor.\n * @param item Item instance (if exists).\n * @param itemId Item id.\n * @param dataProvider Data provider\n * @param sourceComponent Source component from where the fetch function was called.\n * @param viewContainer View container/service. Tableview component.\n * @param actionData Additional action data.\n */\n public runEditorFetch<T, S>(\n action: ActionEditorDescriptor<T>,\n item?: T,\n itemId?: IdType,\n dataProvider?: IEditorDataProvider<T, S>,\n sourceComponent?: any,\n viewContainer?: IViewContainer<T, S>,\n actionData?: ActionData\n ): Observable<ActionRunResult<T, S, IEditorDataProvider<T, S>>> {\n const context = this.prepareExecContextForEditor(action, item, itemId, dataProvider, sourceComponent, viewContainer, actionData);\n return action.fetchFunction(context).pipe(map(res => new ActionRunResult(context, res)));\n // TODO: error handling\n }\n\n /**\n * Prepares action exec context for action of type editor.\n *\n * @param item Item instance (if exists).\n * @param itemId Item id (if exists).\n * @param dataProvider Data provider.\n * @param sourceComponent Source component from where the context preparation was called.\n * @param viewContainer View container/service.\n * @param actionData Additional action data.\n */\n private prepareExecContextForEditor<T, S>(\n action: ActionEditorDescriptor<T>,\n item?: T,\n itemId?: IdType,\n dataProvider?: IEditorDataProvider<T, S>,\n sourceComponent?: any,\n viewContainer?: IViewContainer<T, S>,\n actionData?: ActionData\n ): ActionExecContext<T, S, IEditorDataProvider<T, S>> {\n let ctxDataProvider = dataProvider;\n if (!ctxDataProvider && action.dataProvider) {\n ctxDataProvider = action.dataProvider;\n }\n if (!ctxDataProvider) {\n const viewContainerDataProvider = viewContainer?.getDataProvider();\n if (viewContainerDataProvider) {\n ctxDataProvider = viewContainerDataProvider as IEditorDataProvider<T, S>;\n }\n }\n const context = new ActionExecContext<T, S, IEditorDataProvider<T, S>>(\n ctxDataProvider,\n this.getDataProviderService(ctxDataProvider) ?? undefined,\n {\n item,\n itemId,\n actionData\n },\n sourceComponent,\n viewContainer\n );\n return context;\n }\n\n /**\n * Gets service instance of data provider.\n *\n * @param dataProvider Data provider instance.\n */\n private getDataProviderService<T, S>(dataProvider?: IDataProvider<T, S>): S | null {\n if (dataProvider?.serviceType) {\n return this.injector.get<S>(dataProvider.serviceType);\n } else {\n return null;\n }\n }\n\n /**\n * Activates action.\n *\n * @param action Action descriptor.\n * @param item Item instance (if exists).\n * @param itemId Item id (if exists).\n * @param actionData Optional additional action data.\n * @param viewContainer View container component/service.\n * @param sourceComponent Source activation component.\n */\n public activateAction<T, S>(\n action: ActionDescriptor<T>,\n itemId?: IdType,\n item?: T,\n actionData?: ActionData,\n viewContainer?: IViewContainer<T, S>,\n sourceComponent?: any\n ): Observable<ActionActivationResult<T, S, IDataProvider<T, S>>> {\n if (action.type === ActionTypeEnum.Editor) {\n let dialogComponent = this.defaultEditorDialogComponent;\n let dialogClassName = '';\n if (action instanceof ActionEditorDescriptor) {\n dialogClassName = action.dialogClassName ?? 'mng-action-editor-dialog';\n let dialogSizeClassName = '';\n switch (action.dialogSize) {\n case ActionEditorDescriptor.DialogSizeEnum.ExtraSmall:\n dialogSizeClassName = 'mng-action-editor-dialog-xs';\n break;\n case ActionEditorDescriptor.DialogSizeEnum.Small:\n dialogSizeClassName = 'mng-action-editor-dialog-sm';\n break;\n case ActionEditorDescriptor.DialogSizeEnum.Large:\n dialogSizeClassName = 'mng-action-editor-dialog-lg';\n break;\n case ActionEditorDescriptor.DialogSizeEnum.ExtraLarge:\n dialogSizeClassName = 'mng-action-editor-dialog-xl';\n break;\n case ActionEditorDescriptor.DialogSizeEnum.Normal:\n default:\n break;\n }\n if (dialogSizeClassName.length) {\n dialogClassName += ` ${dialogSizeClassName}`;\n }\n if (action.editorComponent) {\n dialogComponent = action.editorComponent;\n }\n }\n console.log(dialogClassName);\n const dialogConfig: DynamicDialogConfig = {\n data: {\n action\n },\n styleClass: dialogClassName\n };\n if (itemId) {\n dialogConfig.data.itemId = itemId;\n }\n if (item) {\n dialogConfig.data.item = item;\n }\n if (actionData) {\n dialogConfig.data.actionData = actionData;\n }\n if (viewContainer) {\n dialogConfig.data.viewContainer = viewContainer;\n }\n if (sourceComponent) {\n dialogConfig.data.sourceComponent = sourceComponent;\n }\n const dialogRef = this.dialogService.open(dialogComponent, dialogConfig);\n return of(new ActionActivationResult<T, S, IDataProvider<T, S>>(undefined, dialogRef));\n } else if (action.type === ActionTypeEnum.Event) {\n // just emit event\n return of(new ActionActivationResult<T, S, IDataProvider<T, S>>(undefined));\n } else {\n // directly execute action\n return this.runAction<T, S>(action, itemId, item, undefined, sourceComponent, viewContainer, actionData).pipe(\n map(res => new ActionActivationResult<T, S, IDataProvider<T, S>>(res))\n );\n }\n }\n\n /**\n * Triggers action from table row click position.\n *\n * @param action Action descriptor.\n * @param event Target table click event.\n * @param route Currently activate route.\n * @param tableDescriptor Table descriptor.\n * @param dataKeyProperty Data key property.\n */\n public triggerRowClickAction<T>(\n action: ActionDescriptor<T>,\n event: MngTableCellClickEvent<T>,\n route?: ActivatedRoute,\n tableDescriptor?: TableDescriptor<T>,\n dataKeyProperty?: string\n ) {\n const idProperty = dataKeyProperty ?? tableDescriptor?.dataKeyProperty ?? action?.model?.idPropertyName ?? dataKeyProperty;\n if (!idProperty) {\n throw new Error(`Row click action ${action.actionName} can not be triggered, because id property could not be found.`);\n }\n const rowItem = event?.rowItem as any;\n return this.triggerAction(action, rowItem[idProperty], event.rowItem, undefined, route);\n }\n\n /**\n * Triggers action with optional data (item, itemId, ...) and currently activated route.\n *\n * @param action Action.\n * @param actionData Optional action data.\n * @param route Optional activated route.\n */\n public triggerAction<T, S>(\n action: ActionDescriptor<T>,\n itemId?: IdType,\n item?: T,\n actionData?: ActionData,\n route?: ActivatedRoute,\n viewContainer?: IViewContainer<T, S>,\n sourceComponent?: any\n ): Observable<ActionTriggerResult<T, S, IDataProvider<T, S>>> {\n if (action.activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n const baseUrl = this.router.url.split('?')[0];\n const parsedUrl: UrlTree = this.router.parseUrl(this.router.url);\n let actionUrl = action.routeUrl ?? '';\n // TODO: dont strip '/', but use it accordingly with Angular's router patterns (/, ./, ../)\n if (actionUrl.startsWith('/')) {\n actionUrl = actionUrl.substring(1);\n }\n\n const actionUrlSegments = this.linkFormatter.transform(actionUrl, itemId, item, action.model, actionData);\n\n return of(\n new ActionTriggerResult<T, S, IDataProvider<T, S>>(\n undefined,\n from(this.router.navigate([baseUrl, ...actionUrlSegments], {relativeTo: route, queryParams: parsedUrl.queryParams}))\n )\n );\n } else {\n return this.activateAction(action, itemId, item, actionData, viewContainer, sourceComponent).pipe(map(res => new ActionTriggerResult<T, S, IDataProvider<T, S>>(res)));\n }\n }\n\n public deactivateAction<T>(action: ActionDescriptor<T>) {\n if (this.navigationService.getPreviousLocation()) {\n // there are internal history records, so back can be normally called\n this.navigationService.back();\n } else {\n // there is no internal history records, figure out the base url by eliminating action specific url\n let url = this.navigationService.getCurrentLocation();\n if (!url) {\n this.navigationService.back();\n } else {\n if (url.startsWith('/')) {\n url = url.substring(1);\n }\n const urlPathSegments = url.split('?')[0].split('#')[0].split('/');\n let actionUrl = action?.routeUrl ?? '';\n if (actionUrl.startsWith('/')) {\n actionUrl = actionUrl.substring(1);\n }\n const actionUrlSegments = actionUrl.split('/');\n const redirectUrl = urlPathSegments.slice(0, urlPathSegments.length - actionUrlSegments.length).join('/');\n this.router.navigateByUrl(`/${redirectUrl}`, {replaceUrl: true});\n }\n }\n }\n\n public toMngActionError(error?: any): MngError {\n const actionError: MngError = {\n name: error?.name ?? 'UnknownError',\n message: error?.message ?? 'Unknown error',\n cause: error\n };\n if (error instanceof HttpErrorResponse) {\n actionError.status = error.status;\n actionError.statusDescription = error.statusText;\n actionError.url = error.url ?? undefined;\n }\n return this.errorMapper.toMngError(error, actionError);\n }\n}\n","import {HttpClient, HttpErrorResponse} from '@angular/common/http';\n\nimport {Observable, combineLatest, of, tap, throwError} from 'rxjs';\nimport {catchError, map} from 'rxjs/operators';\n\nexport class MngConfigurationService {\n private static _instance: MngConfigurationService | null = null;\n\n public static init(httpClient: HttpClient): MngConfigurationService {\n if (!this._instance) {\n MngConfigurationService._instance = new MngConfigurationService(httpClient);\n }\n return MngConfigurationService.get();\n }\n\n public static get(): MngConfigurationService {\n if (!MngConfigurationService._instance) {\n throw new Error('Configuration service instance not set. Call init first.');\n }\n return MngConfigurationService._instance;\n }\n\n private projectEnvironment?: any;\n private jsonSources: Array<JsonSourceLoadInfo> = [];\n\n private configuration = {...this.projectEnvironment};\n\n private constructor(private http: HttpClient) {}\n\n /**\n * Add project environment source.\n * @param environemnt Environment.\n */\n public addEnvironmentSource(environment: any): void {\n this.projectEnvironment = environment;\n this.mergeConfigs();\n }\n\n /**\n * Adds new config source from JSON file.\n * @param url Url to JSON file.\n */\n public addJsonSource(url: string = this.projectEnvironment.configurationJsonSource, load = false): Observable<boolean> {\n if (!url) {\n console.debug('No path to configuration file specified. Setting default.');\n url = 'assets/config/env{{environment}}.json';\n }\n\n const sourceInfo: JsonSourceLoadInfo = {\n url: url,\n isEnvironment: false,\n isLoaded: false\n };\n this.jsonSources.push(sourceInfo);\n\n console.debug(`Added JSON source: ${url}`);\n\n if (load) {\n return this.loadJsonSources();\n } else {\n return of(true);\n }\n }\n\n public loadJsonSources(): Observable<boolean> {\n return combineLatest(\n this.jsonSources\n .filter(source => !source.isLoaded)\n .map(sourceInfo => {\n let url = sourceInfo.url;\n if (url.indexOf('{{environment}}') >= 0) {\n sourceInfo.isEnvironment = true;\n sourceInfo.environment = this.projectEnvironment.name || (this.projectEnvironment.production ? 'prod' : 'dev');\n url = url.replace('{{environment}}', '.' + sourceInfo.environment);\n }\n\n console.debug(`Loading JSON source: ${sourceInfo.url} with env ${sourceInfo.environment ?? '/'}`);\n\n return this.http.get<object>(url).pipe(\n catchError((err: HttpErrorResponse) => {\n if (sourceInfo.isEnvironment) {\n const noEnvUrl = sourceInfo.url.replace('{{environment}}', '');\n sourceInfo.environment = null;\n\n console.debug(`Reloading JSON source: ${sourceInfo.url} with env ${sourceInfo.environment ?? '/'}`);\n\n return this.http.get<object>(noEnvUrl);\n } else {\n const message = `Configuration file ${url} not loaded (${err.status}): ${err.message}.`;\n console.error(message);\n return throwError(() => new Error(message));\n }\n }),\n map(configuration => {\n sourceInfo.configuration = configuration;\n sourceInfo.isLoaded = true;\n\n console.debug(`JSON source loaded: ${sourceInfo.url}`);\n\n return true;\n })\n );\n })\n ).pipe(\n map(sourceResults => sourceResults.every(sr => sr)),\n tap(sourceResults => this.mergeConfigs())\n );\n }\n\n /**\n * Get configuration.\n */\n public getConfig() {\n return this.configuration;\n }\n\n /**\n * Get configuration value for key.\n * @param key Configuration key.\n */\n public getConfigValue(key: string) {\n return this.configuration[key] ? this.configuration[key] : null;\n }\n\n /**\n * Merges configuration from multiple sources with\n */\n private mergeConfigs() {\n let config = {...this.projectEnvironment};\n const jsonConfigs = this.jsonSources.filter(source => source.isLoaded && typeof source.configuration === 'object').map(source => source.configuration);\n if (jsonConfigs.length) {\n for (const jsonConfig of jsonConfigs) {\n config = {...config, ...jsonConfig};\n }\n }\n this.configuration = config;\n }\n}\n\ninterface JsonSourceLoadInfo {\n url: string;\n isLoaded: boolean;\n isEnvironment: boolean;\n environment?: string | null;\n configuration?: object;\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {Title} from '@angular/platform-browser';\nimport {ActivatedRouteSnapshot, NavigationEnd, Router} from '@angular/router';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {PrimeNGConfig} from 'primeng/api';\nimport {BehaviorSubject, Observable, ReplaySubject, Subject, Subscription} from 'rxjs';\nimport {filter, map} from 'rxjs/operators';\n\nimport {MngModuleConfig} from '../config/models';\nimport {FilterDescriptor} from '../descriptors';\nimport {IUser, MngMenuItem} from '../models';\nimport {MngBreadcrumbMenuItem, MngRouterData} from '../router/models';\nimport {MNG_BROWSER_STORAGE_IT, MNG_MODULE_CONFIG_IT} from './tokens';\n\n@Injectable()\nexport class MngCommonsService {\n // internal\n private routerEventsSubscription?: Subscription;\n private translateLangChangeSubscription?: Subscription;\n\n // menu\n private _menuMode: 'static' | 'sidebar' | 'slim' | 'overlay' = 'sidebar';\n private _menuModeSubject: Subject<'static' | 'sidebar' | 'slim' | 'overlay'> = new BehaviorSubject(this._menuMode);\n private _menuItems: MngMenuItem[] = [];\n private _menuPinEnabled = false;\n private _menuActiveKeySubject = new Subject<string>();\n private _menuResetSubject = new Subject();\n\n // breadcrumbs\n private readonly breadcrumbHomeSubject = new BehaviorSubject<MngMenuItem | null>({\n icon: 'pi pi-home',\n routerLink: '/'\n });\n private readonly breadcrumbsSubject = new BehaviorSubject<MngMenuItem[]>([]);\n private breadcrumbsTranslateSubscription?: Subscription;\n private breadcrumbHomeTranslateSubscription?: Subscription;\n\n // visual\n private _colorScheme: 'light' | 'dark' = 'light';\n\n // user\n private _user?: IUser;\n private userSubject: Subject<IUser | undefined> = new ReplaySubject(1);\n\n constructor(\n private router: Router,\n private primengConfig: PrimeNGConfig,\n private translate: TranslateService,\n private titleService: Title,\n @Inject(MNG_MODULE_CONFIG_IT) private moduleConfig: MngModuleConfig,\n @Inject(MNG_BROWSER_STORAGE_IT) private localStorage: Storage\n ) {}\n\n // APP section\n\n public get appName() {\n return this.moduleConfig?.app?.name ?? 'app.name';\n }\n\n public get appOwner() {\n return this.moduleConfig?.app?.owner ?? 'app.owner';\n }\n\n public get appLogoLight() {\n return this.moduleConfig?.app?.logoPathLight ? this.moduleConfig.app.logoPathLight : this.moduleConfig?.app?.logoPath ?? 'assets/layout/images/logo.png';\n }\n\n public get appLogoDark() {\n return this.moduleConfig?.app?.logoPathDark ? this.moduleConfig.app.logoPathDark : this.moduleConfig?.app?.logoPath ?? 'assets/layout/images/logo.png';\n }\n\n public get appLogoNameLight() {\n return this.moduleConfig?.app?.logoNamePathLight\n ? this.moduleConfig.app.logoNamePathLight\n : this.moduleConfig?.app?.logoNamePath ?? 'assets/layout/images/logo-appname.png';\n }\n\n public get appLogoNameDark() {\n return this.moduleConfig?.app?.logoNamePathDark ? this.moduleConfig.app.logoNamePathDark : this.moduleConfig?.app?.logoNamePath ?? 'assets/layout/images/logo-appname.png';\n }\n\n public get appLanguages() {\n return this.moduleConfig?.app?.languages ?? ['en'];\n }\n\n public get appLanguage(): string {\n const lang = this.localStorage.getItem('lang');\n if (lang) {\n return lang;\n }\n const browserLang = this.translate.getBrowserLang();\n if (browserLang && this.appLanguages.some(l => l === browserLang)) {\n this.appLanguage = browserLang;\n return browserLang;\n }\n const defaultLanguage = this.appLanguages?.length > 0 ? this.appLanguages[0] : 'en';\n this.appLanguage = defaultLanguage;\n return defaultLanguage;\n }\n\n public set appLanguage(language: string) {\n if (this.appLanguages.some(l => l === language)) {\n this.localStorage.setItem('lang', language);\n this.translate.use(language);\n }\n }\n\n // MENU section\n\n public get menuModeIsStatic() {\n return this._menuMode === 'static';\n }\n\n public get menuModeIsStatic$(): Observable<boolean> {\n return this._menuModeSubject.pipe(map(e => e === 'static'));\n }\n\n public get menuModeIsOverlay() {\n return this._menuMode === 'overlay';\n }\n\n public get menuModeIsOverlay$(): Observable<boolean> {\n return this._menuModeSubject.pipe(map(e => e === 'overlay'));\n }\n\n public get menuModeIsSlim() {\n return this._menuMode === 'slim';\n }\n\n public get menuModeIsSlim$(): Observable<boolean> {\n return this._menuModeSubject.pipe(map(e => e === 'slim'));\n }\n\n public get menuModeIsSidebar() {\n return this._menuMode === 'sidebar';\n }\n\n public get menuModeIsSidebar$(): Observable<boolean> {\n return this._menuModeSubject.pipe(map(e => e === 'sidebar'));\n }\n\n public get menuActiveKey$(): Observable<string> {\n return this._menuActiveKeySubject.asObservable();\n }\n\n public get menuReset$(): Observable<any> {\n return this._menuResetSubject.asObservable();\n }\n\n public get menuItems() {\n return this._menuItems;\n }\n\n public set menuItems(menuItems: MngMenuItem[]) {\n this._menuItems = menuItems;\n }\n\n public get menuPinEnabled() {\n return this._menuPinEnabled;\n }\n\n // BREADCRUMB section\n public get breadcrumbHome$() {\n return this.breadcrumbHomeSubject.asObservable();\n }\n\n public get breadcrumbs$() {\n return this.breadcrumbsSubject.asObservable();\n }\n\n // VISUAL section\n\n public get colorSchemeIsLight() {\n return this._colorScheme === 'light';\n }\n\n public get colorSchemeIsDark() {\n return this._colorScheme === 'dark';\n }\n\n // USER section\n\n public get user() {\n return this._user;\n }\n\n public set user(user: IUser | undefined) {\n this._user = user;\n this.userSubject.next(user);\n }\n\n public get user$() {\n return this.userSubject.asObservable();\n }\n\n public reset() {\n this._menuMode = this.moduleConfig?.menu?.mode ?? 'sidebar';\n this._menuModeSubject.next(this._menuMode);\n this._menuItems = this.moduleConfig?.menu?.menuItems ?? [];\n this._menuPinEnabled = this.moduleConfig?.menu?.pinEnabled ?? false;\n\n // visual\n this._colorScheme = this.moduleConfig?.app?.colorScheme ?? 'light';\n\n // ripple\n this.primengConfig.ripple = true;\n this.primengConfig.filterMatchModeOptions = {\n text: [\n FilterDescriptor.MatchModeEnum.Contains,\n FilterDescriptor.MatchModeEnum.Equals,\n FilterDescriptor.MatchModeEnum.NotEquals,\n FilterDescriptor.MatchModeEnum.StartsWith,\n FilterDescriptor.MatchModeEnum.EndsWith\n ],\n numeric: [\n FilterDescriptor.MatchModeEnum.Equals,\n FilterDescriptor.MatchModeEnum.NotEquals,\n FilterDescriptor.MatchModeEnum.LessThanOrEqualTo,\n FilterDescriptor.MatchModeEnum.GreaterThanOrEqualTo\n ],\n date: [\n FilterDescriptor.MatchModeEnum.DateIs,\n FilterDescriptor.MatchModeEnum.DateIsNot,\n FilterDescriptor.MatchModeEnum.DateBefore,\n FilterDescriptor.MatchModeEnum.DateAfter\n ]\n };\n\n // translate\n this.translate.langs = this.appLanguages;\n this.translate.use(this.appLanguage);\n this.translate.get('mngPrime').subscribe(value => this.primengConfig.setTranslation(value));\n\n this.routerEventsSubscription?.unsubscribe();\n this.routerEventsSubscription = this.router.events\n .pipe(\n // Filter the NavigationEnd events as the breadcrumb is updated only when the route reaches its end\n filter(event => event instanceof NavigationEnd)\n )\n .subscribe(() => {\n this.updateBreadcrumbs();\n this.setPageTitle();\n });\n this.translateLangChangeSubscription?.unsubscribe();\n this.translateLangChangeSubscription = this.translate.onLangChange.subscribe(() => {\n this.updateBreadcrumbs();\n this.setPageTitle();\n });\n }\n\n // MENU actions\n\n menuChangeActiveKey(key: string) {\n this._menuActiveKeySubject.next(key);\n }\n\n menuReset() {\n this._menuResetSubject.next(null);\n }\n\n // BREADCRUMB actions\n\n private updateBreadcrumbs() {\n if (this.breadcrumbsTranslateSubscription) {\n this.breadcrumbsTranslateSubscription.unsubscribe();\n this.breadcrumbsTranslateSubscription = undefined;\n }\n if (this.breadcrumbHomeTranslateSubscription) {\n this.breadcrumbHomeTranslateSubscription.unsubscribe();\n this.breadcrumbHomeTranslateSubscription = undefined;\n }\n\n const rootRoute = this.router.routerState.snapshot.root;\n\n const homeBreadcrumb = this.generateHomeBreadcrumb(rootRoute);\n if (homeBreadcrumb) {\n if (homeBreadcrumb.label) {\n this.breadcrumbHomeTranslateSubscription = this.translate.get(homeBreadcrumb.label).subscribe(i18n => {\n homeBreadcrumb.label = i18n;\n this.breadcrumbHomeSubject.next(homeBreadcrumb);\n });\n } else {\n this.breadcrumbHomeSubject.next(homeBreadcrumb);\n }\n }\n\n const breadcrumbs: MngMenuItem[] = [];\n this.generateBreadcrumbs(rootRoute, [], breadcrumbs);\n\n const i18nKeys: Array<string> = breadcrumbs.filter(b => typeof b.label === 'string').map(b => b.label!);\n if (i18nKeys.length > 0) {\n this.breadcrumbsTranslateSubscription = this.translate.get(i18nKeys).subscribe(i18n => {\n // Construct the breadcrumb hierarchy\n breadcrumbs.forEach(b => {\n if (b.label && i18n[b.label]) {\n b.label = i18n[b.label];\n }\n });\n\n // Emit the new breadcrumbs\n this.breadcrumbsSubject.next(breadcrumbs);\n });\n } else {\n this.breadcrumbsSubject.next(breadcrumbs);\n }\n }\n\n private generateHomeBreadcrumb(route: ActivatedRouteSnapshot | null): MngMenuItem | null {\n if (!route) {\n return null;\n }\n\n const routeData = route.data as MngRouterData;\n const breadcrumbRouteData = routeData?.breadcrumb;\n if (breadcrumbRouteData && typeof breadcrumbRouteData === 'object' && 'isHome' in breadcrumbRouteData) {\n if (breadcrumbRouteData.isHome === false) {\n return null;\n }\n const breadcrumb = this.createBreadcrumb('/', breadcrumbRouteData, true);\n if (breadcrumb) {\n if (typeof breadcrumb.icon === 'undefined') {\n breadcrumb.icon = 'pi pi-home';\n }\n return breadcrumb;\n }\n } else {\n return this.generateHomeBreadcrumb(route.firstChild);\n }\n return null;\n }\n\n private generateBreadcrumbs(route: ActivatedRouteSnapshot | null, parentUrlSegments: string[], breadcrumbs: MngMenuItem[]) {\n if (!route) {\n return;\n }\n\n const routeData = route.data as MngRouterData;\n const routeUrlSegments = parentUrlSegments.concat(route.url.map(url => url.path));\n const routeUrl = `/${routeUrlSegments.join('/')}`;\n if (routeData?.breadcrumb) {\n const breadcrumbRouteData = routeData.breadcrumb;\n\n if (Array.isArray(breadcrumbRouteData)) {\n for (const breadcrumbRouteDataItem of breadcrumbRouteData) {\n const breadcrumb = this.createBreadcrumb(routeUrl, breadcrumbRouteDataItem);\n if (breadcrumb) {\n breadcrumbs.push(breadcrumb);\n }\n }\n } else if (typeof breadcrumbRouteData === 'function') {\n breadcrumbs.push(...breadcrumbRouteData(routeUrl, route));\n } else {\n const breadcrumb = this.createBreadcrumb(routeUrl, breadcrumbRouteData);\n if (breadcrumb) {\n breadcrumbs.push(breadcrumb);\n }\n }\n }\n this.generateBreadcrumbs(route.firstChild, routeUrlSegments, breadcrumbs);\n }\n\n private createBreadcrumb(routeUrl: string, routeBreadcrumb: string | MngBreadcrumbMenuItem, includeHome = false): MngMenuItem | null {\n if (typeof routeBreadcrumb === 'string') {\n return {\n label: routeBreadcrumb,\n routerLink: routeUrl\n };\n } else {\n if (!includeHome && typeof routeBreadcrumb.isHome !== 'undefined') {\n // home should not be included\n return null;\n }\n if (typeof routeBreadcrumb.routerLink === 'undefined') {\n routeBreadcrumb.routerLink = routeUrl;\n }\n return routeBreadcrumb;\n }\n }\n\n // TITLE section\n\n public setPageTitle(title?: string) {\n let currentRoute = this.router.routerState.snapshot.root;\n while (currentRoute.firstChild) {\n currentRoute = currentRoute.firstChild;\n }\n\n const routeData = currentRoute.data as MngRouterData;\n const pageTitle = title ?? routeData.pageTitle;\n\n this.titleService.setTitle(this.formatPageTitle(pageTitle));\n }\n\n private formatPageTitle(titlePrefix?: string) {\n const titlePieces = [];\n\n if (titlePrefix) {\n titlePieces.push(this.translate.instant(titlePrefix));\n }\n\n titlePieces.push(this.translate.instant('app.name'));\n\n return titlePieces.join(' - ');\n }\n}\n","import {Injectable} from '@angular/core';\n\nimport {MessageService} from 'primeng/api';\nimport {Subject} from 'rxjs';\n\nimport {IDataProvider} from '../data-providers';\nimport {ActionDescriptor} from '../descriptors';\nimport {IViewContainer} from '../models';\n\n/**\n * Should be used with providers defined within component.\n */\n@Injectable()\nexport class MngViewContainerComponentService<T, S> implements IViewContainer<T, S> {\n private _dataProvider?: IDataProvider<T, S>;\n public actions: Array<ActionDescriptor<T>> = [];\n\n private _reloadTableSubject: Subject<any> = new Subject();\n\n constructor(private messageService: MessageService) {}\n\n public set dataProvider(dataProvider: IDataProvider<T, S>) {\n this._dataProvider = dataProvider;\n }\n\n public get reloadTable() {\n return this._reloadTableSubject.asObservable();\n }\n\n public triggerTableReload(event: any) {\n this._reloadTableSubject.next(event);\n }\n\n public getMessageService(): MessageService {\n return this.messageService;\n }\n\n public getDataProvider(): IDataProvider<T, S> | undefined {\n return this._dataProvider;\n }\n}\n","import {ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, OnChanges, OnDestroy, OnInit, Optional, Output, SimpleChanges} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {ConfirmationService} from 'primeng/api';\nimport {Observable, ReplaySubject, Subscription, distinctUntilChanged, of} from 'rxjs';\nimport {first} from 'rxjs/operators';\n\nimport {IDataProvider} from '../../data-providers';\nimport {ActionDescriptor, ActionLevelEnum, ActionLinkDescriptor} from '../../descriptors';\nimport {IViewContainer} from '../../models';\nimport {MngActionExecutorService, MngViewContainerComponentService} from '../../services';\nimport {IdType} from '../../types';\nimport {I18nUtils} from '../../utils';\nimport {ActionData, ActionTriggerResult, IActionConfirmationService} from './models';\n\n@Component({\n selector: 'mng-action',\n templateUrl: './action.component.html',\n styleUrls: ['./action.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [ConfirmationService]\n})\nexport class MngActionComponent<T, S> implements OnInit, OnChanges, OnDestroy, IActionConfirmationService {\n public readonly levelDefault = ActionLevelEnum.Default;\n public readonly levelPrimary = ActionLevelEnum.Primary;\n public readonly levelSecondary = ActionLevelEnum.Secondary;\n public readonly levelInfo = ActionLevelEnum.Info;\n public readonly levelHelp = ActionLevelEnum.Help;\n public readonly levelSuccess = ActionLevelEnum.Success;\n public readonly levelWarning = ActionLevelEnum.Warning;\n public readonly levelDanger = ActionLevelEnum.Danger;\n\n @HostBinding('class') hostClass = 'mng-action-button';\n\n // metadata and editor mode input\n @Input() public action!: ActionDescriptor<T>;\n @Input() public item?: T;\n @Input() public itemId?: IdType;\n @Input() public actionData?: ActionData;\n @Input() public dataProvider?: IDataProvider<T, S>;\n @Input('disabled') public inputDisabled: Observable<boolean> = of(false);\n @Input('loading') public inputLoading: Observable<boolean> = of(false);\n @Input('viewContainer') public viewContainerInit?: IViewContainer<T, S>;\n\n @Output('trigger') public triggerEventEmitter = new EventEmitter<ActionTriggerResult<T, S, IDataProvider<T, S>>>();\n\n private loadingSubject = new ReplaySubject<boolean>(1);\n public $loading: Observable<boolean> = this.loadingSubject.asObservable();\n\n public cmpId: string = Math.random().toString(36).substring(2);\n private isVisibleSubject = new ReplaySubject<boolean>(1);\n private isVisibleSubscription?: Subscription;\n public $isVisible = this.isVisibleSubject.asObservable().pipe(distinctUntilChanged());\n private isEnabledSubject = new ReplaySubject<boolean>(1);\n private isEnabledSubscription?: Subscription;\n public $isEnabled = this.isEnabledSubject.asObservable().pipe(distinctUntilChanged());\n private labelSubject = new ReplaySubject<string | null>(1);\n private labelSubscription?: Subscription;\n public $label = this.labelSubject.asObservable().pipe(distinctUntilChanged());\n private tooltipSubject = new ReplaySubject<string | null>(1);\n private tooltipSubscription?: Subscription;\n public $tooltip = this.tooltipSubject.asObservable().pipe(distinctUntilChanged());\n\n private viewContainer?: IViewContainer<T, S>;\n\n public actionLink?: ActionLinkDescriptor<T>;\n public hasNoTitle = false;\n\n constructor(\n private route: ActivatedRoute,\n private translate: TranslateService,\n private actionExecutor: MngActionExecutorService,\n private confirmationService: ConfirmationService,\n @Optional() private viewContainerService: MngViewContainerComponentService<T, S> | null\n ) {\n this.loadingSubject.next(false);\n }\n\n public ngOnInit() {\n this.viewContainer = this.viewContainerInit ?? this.viewContainerService ?? undefined;\n\n this.hasNoTitle = this.action.title === null;\n this.isEnabledSubject.next(true);\n this.isVisibleSubject.next(true);\n this.labelSubject.next(null);\n this.tooltipSubject.next(null);\n this.processSubscriptions();\n\n if (this.action instanceof ActionLinkDescriptor) {\n this.actionLink = this.action;\n }\n\n if (this.action.className) {\n this.hostClass = this.action.className;\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!(changes['item']?.firstChange ?? true) || !(changes['itemId']?.firstChange ?? true) || !(changes['actionData']?.firstChange ?? true)) {\n this.processSubscriptions();\n }\n }\n\n ngOnDestroy(): void {\n this.isVisibleSubscription?.unsubscribe();\n this.isEnabledSubscription?.unsubscribe();\n this.labelSubscription?.unsubscribe();\n this.tooltipSubscription?.unsubscribe();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public triggerAction(event: Event) {\n this.loadingSubject.next(true);\n\n const actionData = this.actionData ? this.actionData : {};\n actionData['cmpId'] = this.cmpId;\n\n this.actionExecutor\n .triggerAction(this.action, this.itemId, this.item, actionData, this.route, this.viewContainer, this)\n .pipe(first())\n .subscribe({\n next: atr => {\n this.triggerEventEmitter.next(atr);\n this.loadingSubject.next(false);\n },\n error: err => {\n this.loadingSubject.next(false);\n console.warn(`Error occurred while executing action ${this.action.actionName}.`, err);\n }\n });\n }\n\n public getConfirmationService() {\n return this.confirmationService;\n }\n\n public getConfirmationServiceInstanceKey(action: ActionDescriptor<any>) {\n return `${action.actionName}_${this.cmpId}`;\n }\n\n private processSubscriptions() {\n const context = this.actionExecutor.prepareActionExecContext(\n this.action,\n this.itemId,\n this.item,\n this.dataProvider,\n this.viewContainer ?? undefined,\n this,\n this.actionData\n );\n\n if (typeof this.action.isVisibleFunction === 'function') {\n this.isVisibleSubscription?.unsubscribe();\n this.isVisibleSubscription = this.action.isVisibleFunction(context).subscribe({\n next: res => this.isVisibleSubject.next(res)\n });\n }\n if (typeof this.action.isEnabledFunction === 'function') {\n this.isEnabledSubscription?.unsubscribe();\n this.isEnabledSubscription = this.action.isEnabledFunction(context).subscribe({\n next: res => this.isEnabledSubject.next(res)\n });\n }\n\n if (!this.hasNoTitle) {\n this.labelSubscription?.unsubscribe();\n this.labelSubscription = I18nUtils.Action.getAsync(this.translate, this.action, 'title', this.action?.title ?? undefined, this.item).subscribe({\n next: i18n => this.labelSubject.next(i18n)\n });\n }\n\n this.tooltipSubscription?.unsubscribe();\n this.tooltipSubscription = I18nUtils.Action.getAsync(this.translate, this.action, 'tooltip', this.action?.tooltip ?? undefined, this.item).subscribe({\n next: i18n => this.tooltipSubject.next(i18n)\n });\n }\n}\n","<ng-container *ngIf=\"$isVisible | async\">\n <a\n *ngIf=\"actionLink && actionLink.url !== ''; else routerLink\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : actionLink.url\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-link]=\"actionLink.isStyleLink\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"\n >{{ ($label | async) ?? '' }}</a\n >\n <ng-template #routerLink>\n <a\n *ngIf=\"actionLink; else button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"\n ($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.pathSegments | linkFormatter: itemId:item:action.model:actionData)\n \"\n [queryParams]=\"actionLink.queryParams\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-link]=\"actionLink.isStyleLink\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"\n >{{ ($label | async) ?? '' }}</a\n >\n </ng-template>\n <ng-template #button>\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"$any($tooltip | async)\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction($event)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"></button>\n </ng-template>\n <p-confirmDialog *ngIf=\"action.hasRunConfirmation\" [key]=\"action.actionName + '_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n</ng-container>\n","import {ChangeDetectionStrategy, Component, OnDestroy, OnInit, Optional} from '@angular/core';\nimport {ActivatedRoute, Params, Router} from '@angular/router';\n\nimport {ConfirmationService, MessageService} from 'primeng/api';\nimport {DynamicDialogRef} from 'primeng/dynamicdialog';\nimport {Subscription} from 'rxjs';\nimport {first} from 'rxjs/operators';\n\nimport {ActionActivationTriggerEnum, ActionDescriptor} from '../../../descriptors';\nimport {MngActionExecutorService, MngNavigationService, MngViewContainerComponentService} from '../../../services';\nimport {ActionData, ActionRunResult, IActionConfirmationService} from '../models';\n\n@Component({\n selector: 'mng-action-route',\n templateUrl: './action-route.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MessageService, ConfirmationService]\n})\nexport class MngActionRouteComponent<T, S> implements OnInit, OnDestroy, IActionConfirmationService {\n public cmpId: string = Math.random().toString(36).substring(2);\n private actions: Array<ActionDescriptor<T>> = [];\n private activeAction?: ActionDescriptor<T>;\n private dialogRef?: DynamicDialogRef;\n private dialogCloseSubscription?: Subscription;\n private subscriptions: Array<Subscription> = [];\n\n constructor(\n private router: Router,\n private route: ActivatedRoute,\n private confirmationService: ConfirmationService,\n private navigationService: MngNavigationService,\n private actionExecutor: MngActionExecutorService,\n @Optional() private viewContainerService: MngViewContainerComponentService<T, S> | null\n ) {}\n\n public ngOnInit() {\n this.actions = this.viewContainerService?.actions.filter(a => a.activationTrigger === ActionActivationTriggerEnum.OnRoute) ?? [];\n const subscription = this.route.params.subscribe(p => {\n const action = this.findActiveAction(p);\n if (action) {\n this.activateAction(action, p, this.route.snapshot.queryParams);\n }\n });\n this.subscriptions.push(subscription);\n }\n\n public ngOnDestroy() {\n this.subscriptions.forEach(s => s.unsubscribe());\n if (this.dialogRef) {\n this.dialogRef.close();\n }\n }\n\n public getConfirmationService() {\n return this.confirmationService;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public getConfirmationServiceInstanceKey(action: ActionDescriptor<any>) {\n return `actionRoute_${this.cmpId}`;\n }\n\n private activateAction(action: ActionDescriptor<T>, p: Params, qp: Params) {\n this.activeAction = action;\n const itemId = p['itemId'];\n const actionData: ActionData = {};\n for (const key in p) {\n if (key === 'itemId') {\n continue;\n }\n actionData[key] = p[key];\n }\n for (const key in qp) {\n actionData[key] = p[key];\n }\n this.actionExecutor\n .activateAction(action, itemId, undefined, actionData, this.viewContainerService ?? undefined, this)\n .pipe(first())\n .subscribe(res => {\n if (res.dialogRef) {\n this.dialogRef = res.dialogRef;\n this.dialogCloseSubscription = this.dialogRef?.onClose.subscribe(e => {\n const actionEv = e as ActionRunResult<T, S, any>;\n if (!actionEv?.error || !actionEv?.error?.dismissed) {\n if (!this.viewContainerService) {\n console.warn(`View container service could not be found, table reload will not be triggered.`);\n }\n this.viewContainerService?.triggerTableReload(actionEv); // reload only if no error in action and\n }\n this.deactivateAction();\n });\n }\n });\n }\n\n private deactivateAction() {\n if (this.dialogCloseSubscription) {\n this.dialogCloseSubscription.unsubscribe();\n this.dialogCloseSubscription = undefined;\n }\n this.actionExecutor.deactivateAction(this.activeAction!);\n this.activeAction = undefined;\n this.dialogRef = undefined;\n }\n\n private findActiveAction(params: Params): ActionDescriptor<T> | null {\n const urlSegments = this.route.snapshot.url;\n for (const action of this.actions) {\n let actionUrl = action.routeUrl ?? '';\n // TODO: dont strip '/', but use it accordingly with Angular's router patterns (/, ./, ../)\n if (actionUrl.startsWith('/')) {\n actionUrl = actionUrl.substring(1);\n }\n const actionUrlSegments = actionUrl.split('/');\n if (actionUrlSegments.length !== urlSegments.length) {\n continue;\n }\n let isMatch = true;\n for (let i = 0; i < actionUrlSegments.length; i++) {\n if (actionUrlSegments[i].startsWith(':')) {\n const paramName = actionUrlSegments[i].substring(1);\n if (!params[paramName]) {\n isMatch = false;\n break;\n }\n } else if (actionUrlSegments[i] !== urlSegments[i].path) {\n isMatch = false;\n break;\n }\n }\n if (isMatch) {\n return action;\n }\n }\n return null;\n }\n}\n","<p-confirmDialog [key]=\"'actionRoute_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n","import {ComponentRef, Directive, EventEmitter, Input, OnInit, Output, Type, ViewContainerRef} from '@angular/core';\n\nimport {IColumnValueComponent} from '../models';\n\n@Directive({\n selector: '[mngComponent]'\n})\nexport class MngComponentDirective<C> implements OnInit {\n @Input('mngComponent') component!: Type<C>;\n @Input() inputs?: {[key: string]: any};\n @Output('instanceCreated') private componentInstanceEventEmitter = new EventEmitter<C>();\n\n public componentRef!: ComponentRef<C>;\n\n constructor(public viewContainerRef: ViewContainerRef) {}\n\n ngOnInit() {\n this.viewContainerRef.clear();\n this.componentRef = this.viewContainerRef.createComponent<any>(this.component);\n\n if (this.inputs) {\n if (this.isCmpInstanceOfColumnValue(this.componentRef.instance)) {\n this.componentRef.instance.setColumnValue(this.inputs['value'], this.inputs['item'], this.inputs['descriptor']);\n } else {\n const instanceAny = this.componentRef as any;\n for (const input in this.inputs) {\n instanceAny[input as keyof object] = this.inputs[input];\n }\n }\n }\n\n this.componentInstanceEventEmitter.next(this.componentRef.instance);\n }\n\n private isCmpInstanceOfColumnValue(cmp: any): cmp is IColumnValueComponent<any> {\n return typeof cmp.setColumnValue === 'function';\n }\n}\n","import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';\n\n@Directive({\n selector: '[mngTemplate]'\n})\nexport class MngTemplateDirective {\n @Input() type!: string;\n @Input('mngTemplate') name!: string;\n\n constructor(public template: TemplateRef<any>, private viewContainerRef: ViewContainerRef) {}\n\n public getType(): string {\n return this.name;\n }\n\n public getViewContainerRef(): ViewContainerRef {\n return this.viewContainerRef;\n }\n}\n","import {ChangeDetectionStrategy, Component, ContentChildren, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, QueryList, ViewChild} from '@angular/core';\nimport {AbstractControl, FormArray, FormGroup} from '@angular/forms';\n\nimport {FormlyFieldConfig, FormlyFormOptions} from '@ngx-formly/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {Message} from 'primeng/api';\nimport {Observable, Subscription, of} from 'rxjs';\n\nimport {EditorDescriptor} from '../../../descriptors';\nimport {MngTemplateDirective} from '../../../directives';\nimport {EditorFormlyUtil, NotificationUtil} from '../../../utils';\nimport {MngFormEditorSubmitEvent} from '../models';\n\n@Component({\n selector: 'mng-form-editor',\n templateUrl: './form-editor.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormEditorComponent<T> implements OnInit, OnDestroy {\n // metadata and editor mode input\n @Input() public descriptor!: EditorDescriptor<T>;\n @Input() public submitLoading: Observable<boolean> | boolean = false;\n\n // data source inputs;\n @Input() public item?: T;\n\n // extra features input\n @Input() public isSubmitButtonVisible = false;\n @Input() public isFormDisabled = null;\n\n // event outputs\n @Output('formSubmit') public formSubmitEventEmitter = new EventEmitter<MngFormEditorSubmitEvent<T>>();\n\n // content and view queries\n @ContentChildren(MngTemplateDirective) public templates!: QueryList<MngTemplateDirective>;\n @ViewChild('submitButton') public submitButtonElementRef?: ElementRef;\n\n public form: FormGroup = new FormGroup({});\n public formOptions: FormlyFormOptions = {\n formState: {\n add: false,\n edit: false,\n disabled: false\n }\n };\n public formFields!: FormlyFieldConfig[];\n public formOrigItem?: T;\n public formModel: any = {};\n public formMessages: Message[] = [];\n public submitLoading$!: Observable<boolean>;\n\n private subscriptions: Subscription[] = [];\n\n constructor(private translateService: TranslateService) {}\n\n public ngOnInit() {\n this.resetFormModel(this.item);\n this.submitLoading$ = this.submitLoading instanceof Observable ? this.submitLoading : of(this.submitLoading);\n\n // init fields for formly\n this.formFields = EditorFormlyUtil.createFormlyConfigFromDescriptor(this.descriptor);\n this.updateFormState();\n }\n\n public ngOnDestroy() {\n this.subscriptions.forEach(s => s.unsubscribe());\n }\n\n public submit() {\n this.submitButtonElementRef?.nativeElement.click();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public onSubmit(event: Event) {\n this.formOptions.formState.submittedOn = Date.now();\n this.formMessages = [];\n\n const formSubmitItem = this.getFormValue();\n if (this.form.valid) {\n this.formSubmitEventEmitter.next(new MngFormEditorSubmitEvent(formSubmitItem));\n } else {\n // find and mark invalid tabs\n if (this.formFields[0].type === 'tabs' && this.formFields[0].fieldGroup) {\n for (const tab of this.formFields[0].fieldGroup) {\n const isInvalid = this.isAnyFieldInvalid(tab.fieldGroup);\n this.formOptions.formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label) + '_invalid'] = isInvalid;\n }\n }\n const event = new MngFormEditorSubmitEvent(formSubmitItem);\n event.success = false;\n this.formMessages.push(NotificationUtil.getFormEditorWarningMessage(this.translateService, 'mngEditor.invalidFormToastTitle', 'mngEditor.invalidFormToastMessage'));\n this.formSubmitEventEmitter.next(event);\n }\n }\n\n public getFormValue(): T {\n const formValue = this.form.getRawValue() as T;\n this.descriptor.fields.forEach(field => {\n if (field && field.setter) {\n field.setter(formValue, this.form.value[field.property]);\n }\n });\n return formValue;\n }\n\n public getFormField(key: string) {\n return this.findFormField(this.form, key.split('.'));\n }\n\n public setFormFieldValue(key: string, value: any) {\n const control = this.getFormField(key);\n if (control) {\n control.setValue(value);\n } else {\n console.warn(`Value was not set, because field ${key} was not found.`);\n }\n }\n\n public patchFormFieldValue(key: string, value: any) {\n const control = this.getFormField(key);\n if (control) {\n control.patchValue(value);\n } else {\n console.warn(`Value was not set, because field ${key} was not found.`);\n }\n }\n\n public resetFormFieldValue(key: string, value?: any) {\n const control = this.getFormField(key);\n if (control) {\n control.reset(value);\n } else {\n console.warn(`Value was not set, because field ${key} was not found.`);\n }\n }\n\n private findFormField(control: AbstractControl, keyPath: string[]): AbstractControl | null {\n if (keyPath.length === 0) {\n return control;\n }\n if (keyPath.length === 1) {\n return control.get(keyPath[0]);\n }\n let nextControl: AbstractControl | null = null;\n if (control instanceof FormGroup) {\n nextControl = control.get(keyPath[0]);\n } else if (control instanceof FormArray) {\n const idx = +keyPath[0];\n if (!isNaN(idx)) {\n nextControl = control.at(idx);\n }\n }\n\n if (!control) {\n return null;\n }\n return this.findFormField(nextControl!, keyPath.slice(1));\n }\n\n private isAnyFieldInvalid(fields: FormlyFieldConfig[] = []): boolean {\n for (const field of fields) {\n let fieldInvalid = false;\n if (Array.isArray(field.fieldGroup)) {\n fieldInvalid = this.isAnyFieldInvalid(field.fieldGroup);\n } else if (typeof field.type !== 'undefined') {\n fieldInvalid = !field.formControl?.valid;\n }\n if (fieldInvalid) {\n return true;\n }\n }\n return false;\n }\n\n private resetFormModel(item?: T) {\n this.formOrigItem = item;\n // TODO: to check if this is ok, could be problems with dates, if so, try lodash\n const formModel = JSON.parse(JSON.stringify(item ?? {}));\n\n this.descriptor.fields.forEach(field => {\n if (field.getter && item) {\n formModel[field.property] = field.getter(item);\n }\n });\n if (typeof this.formOptions.resetModel === 'function') {\n // could not be initiated yet\n this.formOptions.resetModel(this.formModel);\n }\n this.formModel = formModel;\n }\n\n private updateFormState() {\n this.formOptions.formState.disabled = this.isFormDisabled !== null ? this.isFormDisabled === true : this.descriptor.disabled;\n }\n}\n","<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" [class.hidden]=\"!isSubmitButtonVisible\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n","import {ChangeDetectionStrategy, Component, EventEmitter, ExistingProvider, Injector, Input, OnDestroy, OnInit, Output, ViewChild, forwardRef} from '@angular/core';\nimport {ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR} from '@angular/forms';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {AutoComplete} from 'primeng/autocomplete';\nimport {BehaviorSubject, Observable, Subscription, of, switchMap} from 'rxjs';\nimport {first, map} from 'rxjs/operators';\n\nimport {MediusFilterMatchType, MediusQueryParam, MediusQueryParamBuilder} from '../../../api/models';\nimport {ILookupDataProvider} from '../../../data-providers';\n\nexport const MNG_AUTOCOMPLETE_VALUE_ACCESSOR: ExistingProvider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MngAutocompleteComponent),\n multi: true\n};\n\n@Component({\n selector: 'mng-autocomplete',\n templateUrl: './autocomplete.component.html',\n providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngAutocompleteComponent implements OnInit, OnDestroy, ControlValueAccessor {\n @Input() public dataProvider?: ILookupDataProvider<any, any>;\n @Input() public dataKeyProperty?: string;\n @Input('itemsValueProperty') public itemsValuePropertyInit?: string;\n @Input('itemsLabelProperty') public itemsLabelPropertyInit?: string;\n @Input() public itemsLabelTranslate = false;\n @Input() public inlineSearch = false;\n @Input() public openOnFocus = false;\n @Input() public multiselect = false;\n @Input() public placeholder?: string;\n @Input() public className: string | null = null;\n @Input() public dropdownClassName: string | null = null;\n\n @Output('valueChange') public valueChangeEventEmitter = new EventEmitter();\n\n @ViewChild(AutoComplete) public primeAutocomplete?: AutoComplete;\n\n private isInited = false;\n private suggestionsSubject: BehaviorSubject<Array<any>> = new BehaviorSubject<Array<any>>([]);\n private searchSubscription: Subscription | null = null;\n private dataProviderService: any = null;\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChangeFn: any = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouchedFn: any = () => {};\n\n public itemsLabelProperty?: string;\n public itemsValueProperty?: string;\n public autocompleteFormControl: FormControl = new FormControl();\n public suggestions$: Observable<Array<any>> = this.suggestionsSubject.asObservable();\n\n constructor(private injector: Injector, private translate: TranslateService) {}\n\n ngOnInit() {\n this.setItemsAndDataProvider();\n }\n\n ngOnDestroy() {\n this.searchSubscription?.unsubscribe();\n }\n\n onSearch(event: any) {\n this.searchSubscription?.unsubscribe();\n\n if (this.dataProvider) {\n const queryParamBuilder = MediusQueryParamBuilder.create();\n if (this.itemsLabelProperty) {\n queryParamBuilder.withSort(this.itemsLabelProperty);\n }\n if (event.query && event.query.length > 0 && this.itemsLabelProperty) {\n queryParamBuilder.withFilter(this.itemsLabelProperty, event.query, undefined, MediusFilterMatchType.StartsWith);\n }\n this.searchSubscription = this.getLookup(queryParamBuilder.build(), event.query).subscribe({\n next: items => {\n this.setSuggestionsFromItems(items, event.query);\n }\n });\n }\n }\n\n onSelect(value: any) {\n let outputValue = value;\n if (this.itemsValueProperty && typeof value === 'object') {\n outputValue = value[this.itemsValueProperty];\n }\n this.onChangeFn(outputValue);\n this.valueChangeEventEmitter.next(outputValue);\n }\n\n onFocus(event: Event) {\n if (this.openOnFocus) {\n this.primeAutocomplete?.show();\n }\n }\n\n registerOnChange(fn: any): void {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouchedFn = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n if (isDisabled) {\n this.autocompleteFormControl.disable();\n } else {\n this.autocompleteFormControl.enable();\n }\n }\n\n writeValue(value: any): void {\n this.setItemsAndDataProvider();\n\n if (this.itemsValuePropertyInit && value != null && typeof value !== 'object') {\n const defaultItem: any = {[this.itemsValuePropertyInit]: value};\n if (this.itemsLabelProperty) {\n defaultItem[this.itemsLabelProperty] = value;\n }\n\n const matchedItem = this.suggestionsSubject.value.find(i => i[this.itemsValuePropertyInit!] === value);\n if (matchedItem) {\n this.autocompleteFormControl.setValue(matchedItem, {emitEvent: false});\n } else if (this.dataProvider) {\n const queryParamBuilder = MediusQueryParamBuilder.create();\n queryParamBuilder.withFilter(this.itemsValuePropertyInit, value, undefined, MediusFilterMatchType.Equals);\n\n this.getLookup(queryParamBuilder.build())\n .pipe(first())\n .subscribe({\n next: items => {\n let isMatch = false;\n if (items.length === 1) {\n this.autocompleteFormControl.setValue(items[0]);\n isMatch = true;\n } else if (items.length > 1) {\n // for lookup data providers not using query params\n const matchedItem = items.find(i => i[this.itemsValuePropertyInit!] === value);\n if (matchedItem) {\n this.setAutocompleteValueFromWrite(matchedItem);\n isMatch = true;\n }\n }\n\n if (!isMatch) {\n this.setAutocompleteValueFromWrite(defaultItem);\n }\n },\n error: () => {\n this.setAutocompleteValueFromWrite(defaultItem);\n }\n });\n } else {\n this.setAutocompleteValueFromWrite(defaultItem);\n }\n } else {\n this.setAutocompleteValueFromWrite(value);\n }\n }\n\n private setItemsAndDataProvider() {\n if (this.isInited) {\n return;\n }\n\n this.itemsLabelProperty = this.itemsLabelPropertyInit;\n this.itemsValueProperty = this.itemsValuePropertyInit;\n\n if (this.dataProvider) {\n this.dataProviderService = this.dataProvider.serviceType ? this.injector.get<any>(this.dataProvider.serviceType) : null;\n\n if (this.itemsLabelTranslate) {\n // setup translation properties\n if (this.itemsLabelPropertyInit) {\n this.itemsLabelProperty = `${this.itemsLabelPropertyInit}_i18n`;\n } else if (!this.itemsLabelProperty && !this.itemsValuePropertyInit) {\n this.itemsLabelProperty = 'title_i18n';\n this.itemsValueProperty = 'value';\n } else {\n throw new Error(`Invalid use with value (${this.itemsLabelPropertyInit}) and label (${this.itemsLabelPropertyInit}) property setup.`);\n }\n }\n } else {\n console.warn(`Data provider should be provided for MngAutocompleteComponent.`);\n }\n\n if (this.openOnFocus) {\n this.onSearch({query: ''});\n }\n\n this.isInited = true;\n }\n\n private setAutocompleteValueFromWrite(value: any) {\n if (value && this.itemsLabelTranslate) {\n value = this.i18nPopulateItems([value], this.translate.instant(this.i18nGetItemsKeys([value])))[0];\n }\n this.autocompleteFormControl.setValue(value, {emitEvent: false});\n }\n\n private getLookup(qp: MediusQueryParam, query?: string): Observable<Array<any>> {\n if (this.dataProvider) {\n return this.dataProvider.lookup(qp, this.dataProviderService, query).pipe(\n switchMap(items => {\n if (this.itemsLabelTranslate) {\n return this.translate.stream(this.i18nGetItemsKeys(items)).pipe(map(translations => this.i18nPopulateItems(items, translations)));\n } else {\n return of(items);\n }\n })\n );\n } else {\n return of([]);\n }\n }\n\n private i18nGetItemsKeys(items: Array<any>): Array<string> {\n return items.map(item => (typeof item === 'object' && this.itemsLabelPropertyInit ? (item[this.itemsLabelPropertyInit as keyof object] as string) : item) as string);\n }\n\n private i18nPopulateItems(items: Array<any>, i18nMap: any): Array<any> {\n return items.map(item => {\n if (typeof item === 'object' && this.itemsLabelPropertyInit) {\n const label = item[this.itemsLabelPropertyInit as keyof object] as string;\n const translation: string | undefined = i18nMap[label];\n if (translation) {\n return {...item, [this.itemsLabelProperty!]: translation};\n }\n return {...item};\n } else {\n const translation = i18nMap[item];\n return {\n [this.itemsLabelProperty!]: translation ?? item,\n [this.itemsValueProperty!]: item\n };\n }\n });\n }\n\n private setSuggestionsFromItems(items: Array<any>, query?: string) {\n if (this.inlineSearch) {\n const queryLowerCase = query?.toLowerCase() ?? '';\n const filteredItems = items.filter(i => {\n let itemLabel = i;\n if (this.itemsLabelProperty && typeof i === 'object') {\n itemLabel = i[this.itemsLabelProperty];\n }\n if (itemLabel == null) {\n return queryLowerCase == null || !queryLowerCase.length;\n }\n if (typeof itemLabel !== 'string') {\n itemLabel = itemLabel.toString();\n }\n return itemLabel.toLowerCase().startsWith(queryLowerCase);\n });\n this.suggestionsSubject.next([...filteredItems]);\n } else {\n this.suggestionsSubject.next([...items]);\n }\n }\n}\n","<p-autoComplete\n (onFocus)=\"onFocus($event)\"\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dropdown]=\"true\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [field]=\"$any(itemsLabelProperty)\"\n [suggestions]=\"(suggestions$ | async) ?? []\"\n [multiple]=\"multiselect\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [minLength]=\"openOnFocus ? 0 : 1\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n","import {ChangeDetectionStrategy, Component, EventEmitter, ExistingProvider, Injector, Input, OnDestroy, OnInit, Output, ViewChild, forwardRef} from '@angular/core';\nimport {ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR} from '@angular/forms';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {Dropdown} from 'primeng/dropdown';\nimport {Observable, ReplaySubject, Subject, Subscription, of, switchMap} from 'rxjs';\nimport {first, map} from 'rxjs/operators';\n\nimport {MediusQueryParamBuilder} from '../../../api/models';\nimport {ILookupDataProvider} from '../../../data-providers';\n\nexport const MNG_DROPDOWN_VALUE_ACCESSOR: ExistingProvider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MngDropdownComponent),\n multi: true\n};\n\n@Component({\n selector: 'mng-dropdown',\n templateUrl: './dropdown.component.html',\n providers: [MNG_DROPDOWN_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngDropdownComponent implements OnInit, OnDestroy, ControlValueAccessor {\n @Input() public dataProvider?: ILookupDataProvider<any, any>;\n @Input() public dataKeyProperty?: string;\n @Input('itemsLabelProperty') public itemsLabelPropertyInit?: string;\n @Input() public itemsLabelTranslate = false;\n @Input('itemsValueProperty') public itemsValuePropertyInit?: string;\n @Input() public itemsDisabledProperty?: string;\n @Input() public multiselect = false;\n @Input() public placeholder?: string;\n @Input() public showClear = true;\n @Input() public selectFirstItem = false;\n @Input() public className: string | null = null;\n @Input() public dropdownClassName: string | null = null;\n\n @Output('valueChange') public valueChangeEventEmitter = new EventEmitter();\n\n @ViewChild(Dropdown) public primeDropdown?: Dropdown;\n\n public itemsLabelProperty?: string;\n public itemsValueProperty?: string;\n private itemsSubject: Subject<Array<any>> = new ReplaySubject<Array<any>>(1);\n private dataProviderService: any = null;\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChangeFn: any = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouchedFn: any = () => {};\n\n public dropdownFormControl: FormControl = new FormControl();\n public items$: Observable<Array<any>> = this.itemsSubject.asObservable();\n private itemsSubscription?: Subscription;\n\n constructor(private injector: Injector, private translate: TranslateService) {}\n\n ngOnInit(): void {\n this.dropdownFormControl.valueChanges.subscribe(v => {\n this.onChangeFn(v);\n this.valueChangeEventEmitter.next(v);\n });\n\n this.itemsLabelProperty = this.itemsLabelPropertyInit;\n this.itemsValueProperty = this.itemsValuePropertyInit;\n\n if (this.dataProvider) {\n this.dataProviderService = this.dataProvider.serviceType ? this.injector.get<any>(this.dataProvider.serviceType) : null;\n\n const queryParamBuilder = MediusQueryParamBuilder.create();\n\n if (this.itemsLabelTranslate) {\n // setup translation properties\n if (this.itemsLabelPropertyInit) {\n this.itemsLabelProperty = `${this.itemsLabelPropertyInit}_i18n`;\n } else if (!this.itemsLabelProperty && !this.itemsValuePropertyInit) {\n this.itemsLabelProperty = 'title_i18n';\n this.itemsValueProperty = 'value';\n } else {\n throw new Error(`Invalid use with value (${this.itemsLabelPropertyInit}) and label (${this.itemsLabelPropertyInit}) property setup.`);\n }\n }\n\n this.itemsSubscription = this.dataProvider\n .lookup(queryParamBuilder.build(), this.dataProviderService)\n .pipe(\n switchMap(items => {\n if (this.itemsLabelTranslate) {\n const translationKeys: string[] = items.map(\n item => (typeof item === 'object' && this.itemsLabelPropertyInit ? (item[this.itemsLabelPropertyInit as keyof object] as string) : item) as string\n );\n return this.translate.stream(translationKeys).pipe(\n map(translations =>\n items.map(item => {\n if (typeof item === 'object' && this.itemsLabelPropertyInit) {\n const label = item[this.itemsLabelPropertyInit as keyof object] as string;\n const translation: string | undefined = translations[label];\n if (translation) {\n return {...item, [this.itemsLabelProperty!]: translation};\n }\n return {...item};\n } else {\n const translation = translations[item];\n return {\n [this.itemsLabelProperty!]: translation ?? item,\n [this.itemsValueProperty!]: item\n };\n }\n })\n )\n );\n } else {\n return of(items);\n }\n })\n )\n .subscribe(res => {\n this.itemsSubject.next(res);\n });\n\n if (this.selectFirstItem && !this.dropdownFormControl?.value) {\n this.items$.pipe(first()).subscribe(res => {\n const value = this.itemsValueProperty ? res[0][this.itemsValueProperty] : res[0];\n this.dropdownFormControl?.setValue(value);\n });\n }\n } else {\n console.warn(`Data provider should be provided for MngDropdownComponent.`);\n }\n }\n\n ngOnDestroy() {\n this.itemsSubscription?.unsubscribe();\n }\n\n registerOnChange(fn: any): void {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouchedFn = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n if (isDisabled) {\n this.dropdownFormControl.disable();\n } else {\n this.dropdownFormControl.enable();\n }\n }\n\n writeValue(obj: any): void {\n this.dropdownFormControl.setValue(obj, {emitEvent: false});\n }\n}\n","<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n display=\"chip\"\n [formControl]=\"dropdownFormControl\"\n [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [filter]=\"false\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n ViewChild\n} from '@angular/core';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';\nimport {Observable, ReplaySubject, Subscription, of, throwError} from 'rxjs';\nimport {catchError, finalize, first} from 'rxjs/operators';\n\nimport {IDataProvider, IEditorDataProvider} from '../../../data-providers';\nimport {ActionDescriptor, ActionEditorDescriptor, ActionEditorSubmitDescriptor, ActionPositionEnum} from '../../../descriptors';\nimport {MngTemplateDirective} from '../../../directives';\nimport {IViewContainer} from '../../../models';\nimport {MngActionExecutorService, MngCommonsService, MngNavigationService, MngViewContainerComponentService} from '../../../services';\nimport {IdType} from '../../../types';\nimport {I18nUtils, NotificationUtil} from '../../../utils';\nimport {MngFormEditorComponent} from '../../form';\nimport {MngFormEditorSubmitEvent} from '../../form/models';\nimport {ActionData, ActionError, ActionRunResult} from '../models';\n\n@Component({\n selector: 'mng-action-editor',\n templateUrl: './action-editor.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngActionEditorComponent<T, S> implements OnInit, OnDestroy {\n // metadata and editor mode input\n @Input() public action!: ActionEditorDescriptor<T>;\n\n // data source inputs\n @Input() public itemId?: IdType;\n @Input() public item?: T;\n @Input() public actionData?: ActionData;\n @Input() public dataProvider?: IEditorDataProvider<T, S>;\n @Input('viewContainer') public viewContainerInit?: IViewContainer<T, S>;\n\n @Output('actionSubmit') public actionRunEventEmitter = new EventEmitter<ActionRunResult<T, S, IDataProvider<T, S>>>();\n\n // content and view queries\n @ContentChildren(MngTemplateDirective) public templates!: QueryList<MngTemplateDirective>;\n @ViewChild('submitButton') public submitButtonElementRef!: ElementRef;\n @ViewChild(MngFormEditorComponent) public editorComponent!: MngFormEditorComponent<T>;\n\n public cmpId: string = Math.random().toString(36).substring(2);\n public title?: string;\n public isDialog = true;\n public isSaveButton = true;\n\n // actions\n public toolbarLeftActions: ActionDescriptor<T>[] = [];\n public toolbarRightActions: ActionDescriptor<T>[] = [];\n public footerLeftActions: ActionDescriptor<T>[] = [];\n public footerRightActions: ActionDescriptor<T>[] = [];\n\n private loadingSubject = new ReplaySubject<boolean>(1);\n public loading$: Observable<boolean> = this.loadingSubject.asObservable();\n private submitLoadingSubject = new ReplaySubject<boolean>(1);\n public submitLoading$: Observable<boolean> = this.submitLoadingSubject.asObservable();\n public viewContainer?: IViewContainer<T, S>;\n private sourceComponent: any = this;\n private subscriptions: Array<Subscription> = [];\n\n constructor(\n private injector: Injector,\n private translate: TranslateService,\n private actionExecutor: MngActionExecutorService,\n private mngCommonsService: MngCommonsService,\n private navigationService: MngNavigationService,\n @Optional() private dialogRef: DynamicDialogRef | null,\n @Optional() private dialogConfig: DynamicDialogConfig | null,\n @Optional() private viewContainerService: MngViewContainerComponentService<T, S> | null\n ) {}\n\n public ngOnInit() {\n if (this.dialogConfig?.data) {\n if (this.dialogConfig.data.action) {\n this.action = this.dialogConfig.data.action;\n }\n if (this.dialogConfig.data.item) {\n this.item = this.dialogConfig.data.item;\n }\n if (this.dialogConfig.data.itemId) {\n this.itemId = this.dialogConfig.data.itemId;\n }\n if (this.dialogConfig.data.actionData) {\n this.actionData = this.dialogConfig.data.actionData;\n }\n if (this.dialogConfig.data.viewContainer) {\n this.viewContainer = this.dialogConfig.data.viewContainer;\n if (!this.dataProvider && this.viewContainer) {\n const dataProvider = this.viewContainer.getDataProvider();\n if (dataProvider && typeof dataProvider['fetch' as keyof object] === 'function') {\n this.dataProvider = dataProvider as IEditorDataProvider<T, S>;\n }\n }\n }\n if (this.dialogConfig.data.sourceComponent) {\n this.sourceComponent = this.dialogConfig.data.sourceComponent;\n }\n } else {\n this.isDialog = false;\n this.viewContainer = this.viewContainerInit ?? this.viewContainerService ?? undefined;\n }\n\n this.isSaveButton = typeof this.action.submitFunction === 'function';\n this.setTitle();\n\n for (const action of this.action.editorActions) {\n if (action instanceof ActionEditorSubmitDescriptor) {\n if (typeof action.icon === 'undefined') {\n action.withIcon(action.submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit ? 'pi pi-check' : 'pi pi-times');\n }\n if (typeof action.title === 'undefined') {\n action.withTitle(action.submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit ? 'general.save' : this.isDialog ? 'general.close' : 'general.cancel');\n }\n\n // assign run operations\n action.withRunNotificationSuccess(undefined, undefined, false);\n if (action.submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit) {\n action.withRunFunction(() => {\n this.triggerSubmit();\n return of(undefined);\n });\n } else {\n action.withRunFunction(() => {\n this.cancel();\n return of(undefined);\n });\n }\n }\n switch (action.position) {\n case ActionPositionEnum.ToolbarLeft:\n this.toolbarLeftActions.push(action);\n break;\n case ActionPositionEnum.ToolbarRight:\n this.toolbarRightActions.push(action);\n break;\n case ActionPositionEnum.FooterLeft:\n this.footerLeftActions.push(action);\n break;\n case ActionPositionEnum.FooterRight:\n this.footerRightActions.push(action);\n break;\n }\n }\n\n this.toolbarRightActions = this.toolbarRightActions.reverse();\n this.footerRightActions = this.footerRightActions.reverse();\n\n this.loadItemWithDataProvider();\n }\n\n public ngOnDestroy() {\n this.subscriptions.forEach(s => s.unsubscribe());\n }\n\n public onSubmit(event: MngFormEditorSubmitEvent<T>) {\n if (event.success) {\n if (typeof this.action.submitFunction !== 'function') {\n return;\n }\n this.submitLoadingSubject.next(true);\n this.actionExecutor\n .runEditorSave(this.action, this.itemId, event.formItem, this.dataProvider, this.sourceComponent, this.viewContainer, this.actionData)\n .pipe(first())\n .subscribe({\n next: res => {\n this.submitLoadingSubject.next(false);\n this.cancel(res);\n },\n error: () => {\n this.submitLoadingSubject.next(false);\n }\n });\n }\n }\n\n public cancel(result?: ActionRunResult<T, S, IDataProvider<T, S>>) {\n if (!result) {\n result = new ActionRunResult<T, S, IDataProvider<T, S>>(undefined, undefined, new ActionError(null, true));\n }\n if (this.isDialog) {\n this.dialogRef?.close(result);\n }\n this.actionRunEventEmitter.next(result);\n }\n\n public triggerSubmit() {\n this.editorComponent.submit();\n }\n\n private loadItemWithDataProvider() {\n if (typeof this.action.fetchFunction !== 'function') {\n return;\n }\n this.loadingSubject.next(true);\n this.actionExecutor\n .runEditorFetch(this.action, this.item, this.itemId, this.dataProvider, this.sourceComponent, this.viewContainer)\n .pipe(\n first(),\n catchError(err => {\n const actionError = this.actionExecutor.toMngActionError(err);\n if (this.action.hasRunNotificationError) {\n NotificationUtil.actionNotificationError(this.translate, this.action, actionError, 'fetch', this.viewContainer, this.item);\n }\n return throwError(() => actionError);\n }),\n finalize(() => this.loadingSubject.next(false))\n )\n .subscribe(res => {\n this.item = res.result;\n if (this.action.hasFetchNotificationSuccess) {\n NotificationUtil.actionNotificationSuccess(\n this.translate,\n this.action,\n 'fetch',\n this.action.fetchNotificationSuccessTitle,\n this.action.fetchNotificationSuccessMessage,\n this.viewContainer,\n this.item\n );\n }\n this.setTitle();\n });\n }\n\n private setTitle() {\n if (this.action.editorTitle === null) {\n this.title = undefined;\n if (this.dialogConfig) {\n requestAnimationFrame(() => {\n this.dialogConfig!.header = undefined;\n });\n }\n return;\n }\n const subscription = I18nUtils.Action.getEditorTitleAsync(this.translate, this.action, this.item).subscribe(t => {\n this.title = t ?? undefined;\n if (this.dialogConfig) {\n requestAnimationFrame(() => {\n this.dialogConfig!.header = t ?? undefined;\n this.mngCommonsService.setPageTitle(t ?? undefined);\n });\n }\n });\n this.subscriptions.push(subscription);\n }\n}\n","<h5 *ngIf=\"!isDialog && title\">{{ title }}</h5>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor *ngIf=\"action.editorDescriptor && (loading$ | async) === false\" [descriptor]=\"action.editorDescriptor\" [item]=\"item\" (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between\">\n <div>\n <mng-action *ngFor=\"let action of footerLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n <div>\n <mng-action *ngFor=\"let action of footerRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n </div>\n</div>\n","import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';\nimport {FormControl} from '@angular/forms';\n\nimport {FieldType} from '@ngx-formly/core';\n\nimport {FieldLookupDescriptor} from '../../../../../descriptors';\n\n@Component({\n selector: 'mng-formly-field-autocomplete',\n templateUrl: './formly-field-autocomplete.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldAutocompleteComponent<T> extends FieldType implements OnInit {\n public aFormControl!: FormControl;\n public descriptor!: FieldLookupDescriptor<T, any>;\n\n public ngOnInit() {\n this.aFormControl = this.formControl as FormControl;\n this.descriptor = this.to['descriptor'];\n }\n}\n","<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n","import {ChangeDetectionStrategy, Component, OnDestroy, OnInit} from '@angular/core';\nimport {FormControl} from '@angular/forms';\n\nimport {FieldType} from '@ngx-formly/core';\nimport {Subscription, distinctUntilChanged} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\n\nimport {FieldInputDescriptor} from '../../../../../descriptors';\nimport {MngFormFieldEventComponentSubtype, MngFormFieldEventTypeEnum} from '../../../models';\n\n@Component({\n selector: 'mng-formly-field-input',\n templateUrl: './formly-field-input.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldInputComponent extends FieldType implements OnInit, OnDestroy {\n public iFormControl!: FormControl;\n public descriptor!: FieldInputDescriptor<any>;\n\n private subscriptions: Subscription[] = [];\n\n ngOnInit(): void {\n this.iFormControl = this.formControl as FormControl;\n this.descriptor = this.to['descriptor'];\n\n // emit lifecycle event\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldInputComponent, this, {\n eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT\n });\n\n // init values\n if (this.to.type === 'datepicker' && typeof this.iFormControl.value === 'string') {\n const dateObject = new Date(this.iFormControl.value);\n this.iFormControl.setValue(dateObject);\n }\n\n const subscription = this.formControl!.valueChanges.pipe(startWith(this.formControl!.value), distinctUntilChanged()).subscribe(v => {\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldInputComponent, this, {\n value: v\n });\n });\n this.subscriptions.push(subscription);\n }\n\n ngOnDestroy(): void {\n this.subscriptions.forEach(s => s.unsubscribe());\n\n // emit lifecycle event\n this.descriptor?.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldInputComponent, this, {\n eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY\n });\n }\n}\n","<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n","import {ChangeDetectionStrategy, Component, HostBinding} from '@angular/core';\n\n@Component({\n selector: 'mng-formly-field-label',\n templateUrl: './formly-field-label.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldLabelComponent {\n @HostBinding('class') public className = 'hidden';\n}\n","","import {ChangeDetectionStrategy, Component, OnDestroy, OnInit} from '@angular/core';\nimport {FormControl} from '@angular/forms';\n\nimport {FieldType} from '@ngx-formly/core';\nimport {Subscription, distinctUntilChanged} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\n\nimport {FieldLookupDescriptor} from '../../../../../descriptors';\nimport {MngFormFieldEventComponentSubtype, MngFormFieldEventTypeEnum} from '../../../models';\n\n@Component({\n selector: 'mng-formly-field-dropdown',\n templateUrl: './formly-field-dropdown.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldDropdownComponent<T> extends FieldType implements OnInit, OnDestroy {\n public dFormControl!: FormControl;\n public descriptor!: FieldLookupDescriptor<T, any>;\n\n private subscriptions: Subscription[] = [];\n\n public ngOnInit() {\n this.dFormControl = this.formControl as FormControl;\n this.descriptor = this.to['descriptor'];\n\n // emit lifecycle event\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldDropdownComponent, this, {\n eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT\n });\n\n const subscription = this.formControl!.valueChanges.pipe(startWith(this.formControl!.value), distinctUntilChanged()).subscribe(v => {\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldDropdownComponent, this, {\n value: v\n });\n });\n this.subscriptions.push(subscription);\n }\n\n ngOnDestroy(): void {\n this.subscriptions.forEach(s => s.unsubscribe());\n\n // emit lifecycle event\n this.descriptor?.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldDropdownComponent, this, {\n eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY\n });\n }\n}\n","<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"descriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"descriptor.itemsLabelTranslate\"\n [itemsValueProperty]=\"descriptor.itemsValueProperty\"\n [itemsDisabledProperty]=\"descriptor.itemsDisabledProperty\"\n [dataKeyProperty]=\"descriptor.dataKeyProperty\"\n [showClear]=\"!to.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n","import {LazyLoadEvent} from 'primeng/api';\n\nimport {MediusQueryParam} from '../../../api/models';\nimport {ColumnDescriptor} from '../../../descriptors';\n\nexport class MngTableLoadEvent {\n public queryParam?: MediusQueryParam;\n public originalEvent?: LazyLoadEvent;\n}\n\nexport class MngTableCellClickEvent<T> {\n constructor(public readonly column: ColumnDescriptor<any, T>, public readonly rowItem: T, public readonly rowIndex: number) {}\n}\n\nexport class MngTableReloadEvent {\n public resetParams = false;\n public emitEvent = false;\n}\n","import {Component, Input, OnInit} from '@angular/core';\n\nimport {FilterMatchMode, PrimeNGConfig, SelectItem} from 'primeng/api';\n\nimport {FilterDescriptor, FilterLookupDescriptor, TableDescriptor} from '../../../../descriptors';\n\n/**\n * Cannot be on push change detection strategy because of filter updates triggered from route which causes to force update values in force metadata\n * and these must be propagated through to this component and beyond to primeNG.\n */\n@Component({\n selector: 'mng-table-column-filter',\n templateUrl: './column-filter.component.html'\n})\nexport class MngTableColumnFilterComponent<T> implements OnInit {\n public readonly lookupTypeDropdown: FilterLookupDescriptor.LookupTypeEnum = FilterLookupDescriptor.LookupTypeEnum.Dropdown;\n public readonly lookupTypeAutocomplete: FilterLookupDescriptor.LookupTypeEnum = FilterLookupDescriptor.LookupTypeEnum.Autocomplete;\n\n @Input() descriptor!: FilterDescriptor<T>;\n @Input() display!: TableDescriptor.FilterDisplayEnum;\n\n public lookupDescriptor?: FilterLookupDescriptor<T>;\n\n public primeField!: string;\n public primeType = 'text';\n public primeShowMatchMode = true;\n public primeDefaultMatchMode: string = FilterMatchMode.EQUALS;\n public primeDisplay = 'row';\n public primeMatchModes: SelectItem[] | null = null;\n\n constructor(private primeConfig: PrimeNGConfig) {}\n\n ngOnInit() {\n switch (this.descriptor.filterType) {\n case FilterDescriptor.TypeEnum.Boolean:\n this.primeType = 'boolean';\n this.primeShowMatchMode = false;\n break;\n case FilterDescriptor.TypeEnum.Number:\n this.primeType = 'numeric';\n break;\n case FilterDescriptor.TypeEnum.Date:\n this.primeType = 'date';\n break;\n case FilterDescriptor.TypeEnum.Lookup:\n this.primeType = 'lookup';\n this.primeShowMatchMode = false;\n this.lookupDescriptor = this.descriptor as FilterLookupDescriptor<T>;\n this.primeField = `${this.descriptor.property}${this.lookupDescriptor.itemsValueProperty ? `.${this.lookupDescriptor.itemsValueProperty}` : ''}`;\n this.primeMatchModes = [{value: FilterDescriptor.MatchModeEnum.Equals, label: this.primeConfig.getTranslation(FilterDescriptor.MatchModeEnum.Equals)}];\n break;\n case FilterDescriptor.TypeEnum.String:\n this.primeType = 'text';\n this.primeDefaultMatchMode = FilterMatchMode.CONTAINS;\n break;\n }\n\n if (this.descriptor.matchModes) {\n this.primeMatchModes = this.descriptor.matchModes.map(mm => <SelectItem>{value: mm, label: this.primeConfig.getTranslation(mm)});\n this.primeDefaultMatchMode = this.descriptor.matchModes[0];\n this.primeShowMatchMode = this.primeMatchModes?.length > 1;\n }\n\n switch (this.display) {\n case TableDescriptor.FilterDisplayEnum.Menu:\n this.primeDisplay = 'menu';\n break;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n autocompleteFilter(value: T, filterCallback: Function) {\n filterCallback(value);\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n dropdownFilter(value: T, filterCallback: Function) {\n filterCallback(value);\n }\n\n toLookupFilterValue(value?: any) {\n console.log(this.descriptor.property, value);\n return this.lookupDescriptor!.dataKeyProperty && value ? {[this.lookupDescriptor!.dataKeyProperty]: value} : value;\n }\n}\n","<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n matchMode=\"equals\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"$any(primeMatchModes)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\">\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [openOnFocus]=\"lookupDescriptor.autocompleteOpenOnFocus\"\n [inlineSearch]=\"lookupDescriptor.autocompleteInlineSearch\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (valueChange)=\"dropdownFilter($event, filterCallback)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n","import {ChangeDetectionStrategy, Component, Input, OnInit} from '@angular/core';\n\nimport {ColumnDescriptor} from '../../../../descriptors';\n\n@Component({\n selector: 'mng-table-column-value',\n templateUrl: './column-value.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngTableColumnValueComponent<T, TT> implements OnInit {\n public readonly columnTypeString: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.String;\n public readonly columnTypeNumber: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.Number;\n public readonly columnTypeBoolean: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.Boolean;\n public readonly columnTypeDate: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.Date;\n public readonly columnTypeEnum: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.Enum;\n public readonly columnTypeCustom: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.Custom;\n\n @Input() descriptor!: ColumnDescriptor<T, TT>;\n @Input() item!: any;\n\n public jsonPath = '$';\n\n public ngOnInit() {\n if (this.descriptor.jsonPath) {\n this.jsonPath = this.descriptor.jsonPath;\n } else {\n this.jsonPath = `$.${this.descriptor.property}`;\n if (this.descriptor.objectModelType) {\n this.jsonPath = `$.${this.descriptor.property}.${this.descriptor.objectTitleProperty}`;\n }\n }\n }\n}\n","<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ item | jsonPath: jsonPath }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ item | jsonPath: jsonPath | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ item | jsonPath: jsonPath | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\"></ng-container>\n <i [class]=\"item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo:true\"></i>\n <ng-template #booleanText>\n {{ item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{ item | jsonPath: jsonPath | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeCustom\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: item | jsonPath: jsonPath,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n EventEmitter,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n TemplateRef,\n Type,\n ViewChild,\n ViewChildren\n} from '@angular/core';\nimport {ActivatedRoute, Params, Router} from '@angular/router';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {LazyLoadEvent, SortMeta} from 'primeng/api';\nimport {FilterMetadata} from 'primeng/api/filtermetadata';\nimport {Table} from 'primeng/table';\nimport {Observable, ReplaySubject, Subscription, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult} from '../../../api/models';\nimport {MediusRestUtil} from '../../../api/utils';\nimport {ITableDataProvider} from '../../../data-providers';\nimport {ColumnDescriptor, FilterDescriptor, TableDescriptor} from '../../../descriptors';\nimport {MngComponentDirective, MngTemplateDirective} from '../../../directives';\nimport {IViewContainer} from '../../../models';\nimport {MngViewContainerComponentService} from '../../../services';\nimport {NotificationUtil} from '../../../utils';\nimport {MngTableCellClickEvent, MngTableLoadEvent} from '../models';\n\nimport TypeEnum = FilterDescriptor.TypeEnum;\nimport PaginationModeEnum = TableDescriptor.PaginationModeEnum;\n\n@Component({\n selector: 'mng-table',\n templateUrl: './table.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngTableComponent<T, S> implements OnInit, AfterContentInit, OnDestroy {\n public readonly filterDisplayRow: TableDescriptor.FilterDisplayEnum = TableDescriptor.FilterDisplayEnum.Row;\n public readonly filterDisplayMenu: TableDescriptor.FilterDisplayEnum = TableDescriptor.FilterDisplayEnum.Menu;\n\n // metadata input\n @Input() public descriptor!: TableDescriptor<T>;\n\n // data source inputs\n @Input() public items?: Observable<Array<T>> | Array<T>;\n @Input() public queryResult?: Observable<MediusQueryResult<T>> | MediusQueryResult<T>;\n @Input() public loading?: Observable<boolean> | boolean;\n @Input() public dataProvider?: ITableDataProvider<T, any>;\n @Input() public useQueryParams = false;\n\n // extra features input\n @Input() public selectionMode = 'multiple';\n @Input() public selectionEnabled = false;\n\n // visual\n @Input() public isColumnClickable = true;\n\n // component inputs\n @Input('viewContainer') public viewContainerInit?: IViewContainer<T, S>;\n @Input() public captionComponent?: Type<any>;\n @Input() public columnActionComponent?: Type<any>;\n\n // event outputs\n @Output('tableLoad') public loadEventEmitter = new EventEmitter<MngTableLoadEvent>();\n @Output('cellClick') public cellClickEventEmitter = new EventEmitter<MngTableCellClickEvent<T>>();\n @Output('selectionChange') public selectionChangeEventEmitter = new EventEmitter<Array<T>>();\n @Output('captionComponentInstance') public captionCmpInstEventEmitter = new EventEmitter<any>();\n @Output('columnActionComponentInstance') public columnActionCmpInstEventEmitter = new EventEmitter<any>();\n\n // content and view queries\n @ContentChildren(MngTemplateDirective) public templates!: QueryList<MngTemplateDirective>;\n @ViewChildren(MngComponentDirective) public components!: QueryList<MngComponentDirective<any>>;\n @ViewChild(Table) public primeTable!: Table;\n\n // templates\n public captionTemplate?: TemplateRef<any>;\n public columnActionTemplate?: TemplateRef<any>;\n\n // data provider and items\n public useDataProvider = false;\n public useQueryParamsInitialized = false;\n public queryResult$?: Observable<MediusQueryResult<T>>;\n public loading$?: Observable<boolean>;\n public dataProviderInfiniteScrollItems: Array<T> = [];\n\n // pagination, sort and filters\n public readonly rowsPerPageOptions = [25, 50, 100];\n public rows = this.rowsPerPageOptions[0];\n public offset = 0;\n public multiSortMeta: SortMeta[] | null = null;\n public filterMetadata: {[s: string]: FilterMetadata | FilterMetadata[]} = {};\n\n // infinite scroll\n public infiniteScroll = false;\n public scrollHeight: 'flex' | null = null;\n public rowHeight: number | null = null;\n\n // selection\n public selection: Array<T> = [];\n\n // data provider\n private dataProviderService: any = null;\n private dataProviderQueryResultSubject = new ReplaySubject<MediusQueryResult<T>>(1);\n private dataProviderLoadingSubject = new ReplaySubject<boolean>(1);\n private dataProviderLatestLazyLoadEvent?: LazyLoadEvent;\n private dataProviderLatestLazyLoadEventVersion = 0;\n private dataProviderLatestQueryParam?: MediusQueryParam;\n private dataProviderLatestQueryParamVersion = 0;\n private dataProviderSubscription?: Subscription;\n\n // filter, sort\n private isFilterChanged = false;\n private isSortChanged = false;\n private filterDescriptors: Array<FilterDescriptor<any>> = [];\n\n private viewContainer?: IViewContainer<T, S>;\n private subscriptions: Subscription[] = [];\n\n constructor(\n private injector: Injector,\n private router: Router,\n private activatedRoute: ActivatedRoute,\n private translate: TranslateService,\n @Optional() private viewContainerService: MngViewContainerComponentService<T, S> | null\n ) {}\n\n public ngOnInit() {\n this.viewContainer = this.viewContainerInit ?? this.viewContainerService ?? undefined;\n this.filterDescriptors = this.descriptor.columns.filter(c => typeof c.filterDescriptor !== 'undefined').map(c => c.filterDescriptor!);\n\n if (this.descriptor.paginationMode === PaginationModeEnum.InfiniteScroll) {\n this.infiniteScroll = true;\n this.scrollHeight = 'flex';\n this.rowHeight = this.descriptor.rowHeight;\n this.useQueryParams = false;\n }\n\n // check if data provider is supplied, if is, use it primarily\n if (this.dataProvider) {\n // map subjects to observables and initiate data\n this.useDataProvider = true;\n this.queryResult$ = this.dataProviderQueryResultSubject.asObservable();\n this.loading$ = this.dataProviderLoadingSubject.asObservable();\n const emptyQueryResult = new MediusQueryResult<T>();\n emptyQueryResult.pageData = [];\n emptyQueryResult.allDataCount = 0;\n this.dataProviderLoadingSubject.next(false);\n this.dataProviderQueryResultSubject.next(emptyQueryResult);\n\n // inject service\n if (this.dataProvider.serviceType) {\n this.dataProviderService = this.injector.get<any>(this.dataProvider.serviceType);\n }\n } else {\n // if query result is provided, use it as secondary source or else try to use items\n if (this.queryResult) {\n this.queryResult$ = this.queryResult instanceof Observable ? this.queryResult : of(this.queryResult);\n } else if (!this.queryResult && this.items) {\n this.queryResult$ = (this.items instanceof Observable ? this.items : of(this.items)).pipe(\n // distinctUntilChanged((v1, v2) => v1.length === v2.length &&\n // v1.every((v1i, idx) => v1i[this.descriptor.dataKeyProperty] === v2[idx][this.descriptor.dataKeyProperty])),\n map(items => {\n const queryResult = new MediusQueryResult<T>();\n queryResult.pageData = items;\n queryResult.allDataCount = items.length;\n return queryResult;\n })\n );\n }\n if (typeof this.loading !== 'undefined') {\n this.loading$ = this.loading instanceof Observable ? this.loading : of(this.loading);\n }\n }\n\n if (this.useQueryParams) {\n const subscription = this.activatedRoute.queryParams.subscribe(qp => {\n this.loadTableFromRouteUpdate(qp);\n });\n this.subscriptions.push(subscription);\n } else {\n // initialize default sort if present\n const defaultSort = this.getDefaultSortMeta();\n if (defaultSort.length > 0) {\n this.multiSortMeta = defaultSort;\n }\n }\n }\n\n public ngAfterContentInit() {\n this.templates.forEach(template => {\n switch (template.getType()) {\n case 'caption':\n this.captionTemplate = template.template;\n break;\n case 'columnAction':\n this.columnActionTemplate = template.template;\n break;\n }\n });\n }\n\n public ngOnDestroy() {\n this.dataProviderSubscription?.unsubscribe();\n this.subscriptions.forEach(s => s.unsubscribe());\n }\n\n public reload(emitEvent = false, resetParams = false) {\n this.loadTableWithDataProvider(\n resetParams ? MediusQueryParamBuilder.create(this.rowsPerPageOptions[0], 0).build() : this.dataProviderLatestQueryParam ?? new MediusQueryParam(),\n emitEvent\n );\n }\n\n public onTableLazyLoad(event: LazyLoadEvent) {\n this.dataProviderLatestLazyLoadEvent = event;\n this.dataProviderLatestLazyLoadEventVersion++;\n\n if (this.useQueryParams) {\n if (!event.multiSortMeta || event.multiSortMeta.length === 0) {\n // add default sort meta to event if not multisort meta is present\n event.multiSortMeta = this.getDefaultSortMeta();\n }\n this.router.navigate([], {\n relativeTo: this.activatedRoute,\n replaceUrl: true,\n queryParams: MediusRestUtil.fromPrimeLazyLoadEventToAngularQueryParams(event, this.rowsPerPageOptions[0])\n });\n } else {\n const mediusQueryParams = event ? MediusRestUtil.fromPrimeLazyLoadEventToMediusQueryParams(event) : new MediusQueryParam();\n this.loadTableWithDataProvider(mediusQueryParams);\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public onTableSort(event: any) {\n this.isSortChanged = true;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public onTableFilter(event: any) {\n this.isFilterChanged = true;\n }\n\n public onCellClick(col: ColumnDescriptor<any, T>, item: T, idx: number) {\n const mngEvent = new MngTableCellClickEvent<T>(col, item, idx);\n this.cellClickEventEmitter.next(mngEvent);\n }\n\n public onSelectionChange(event: Array<T>) {\n this.selectionChangeEventEmitter.emit(event);\n }\n\n public onCaptionCmpInst<C>(instance: C) {\n this.captionCmpInstEventEmitter.next(instance);\n }\n\n public onColumnActionCmpInst<C>(instance: C) {\n this.columnActionCmpInstEventEmitter.next(instance);\n }\n\n private loadTableWithDataProvider(queryParam: MediusQueryParam | null = null, emitEvent = true) {\n if (!this.useDataProvider) {\n return;\n }\n\n this.dataProviderSubscription?.unsubscribe();\n this.dataProviderLoadingSubject.next(true);\n\n if (!queryParam) {\n queryParam = MediusQueryParamBuilder.create(this.rowsPerPageOptions[0]).build();\n }\n this.dataProviderLatestQueryParam = queryParam;\n this.dataProviderLatestQueryParamVersion++;\n\n this.dataProviderSubscription = this.dataProvider?.getAll(queryParam, this.dataProviderService).subscribe(\n res => {\n if (this.infiniteScroll) {\n if (this.isFilterChanged || this.isSortChanged) {\n this.dataProviderInfiniteScrollItems = [];\n }\n this.dataProviderInfiniteScrollItems.splice(queryParam!.itemsOffset ?? 0, queryParam!.itemsPerPage ?? this.rows, ...(res.pageData ?? []));\n this.dataProviderInfiniteScrollItems = [...this.dataProviderInfiniteScrollItems];\n } else {\n this.dataProviderQueryResultSubject.next(res);\n }\n this.isFilterChanged = false;\n this.isSortChanged = false;\n this.dataProviderLoadingSubject.next(false);\n },\n err => {\n NotificationUtil.tableNotificationError(this.translate, this.descriptor, err, this.viewContainer);\n const emptyQueryResult = new MediusQueryResult<T>();\n emptyQueryResult.pageData = [];\n emptyQueryResult.allDataCount = 0;\n this.dataProviderQueryResultSubject.next(emptyQueryResult);\n this.dataProviderLoadingSubject.next(false);\n }\n );\n\n if (emitEvent) {\n const mngEvent = new MngTableLoadEvent();\n mngEvent.originalEvent = this.dataProviderLatestLazyLoadEvent ?? undefined;\n mngEvent.queryParam = queryParam;\n this.loadEventEmitter.next(mngEvent);\n }\n }\n\n private loadTableFromRouteUpdate(params: Params) {\n const mediusQueryParam = MediusRestUtil.fromAngularQueryParamsToMediusQueryParams(params, this.filterDescriptors, this.rowsPerPageOptions[0]);\n if (this.dataProviderLatestLazyLoadEventVersion < this.dataProviderLatestQueryParamVersion + 1) {\n // update only if new version from query params will be higher\n this.updatePrimeSortAndFilter(mediusQueryParam);\n }\n this.useQueryParamsInitialized = true;\n this.loadTableWithDataProvider(mediusQueryParam);\n }\n\n private updatePrimeSortAndFilter(mediusQueryParam: MediusQueryParam) {\n const primeSortMeta: SortMeta[] = [];\n const primeFilterMeta: {[s: string]: FilterMetadata | FilterMetadata[]} = {};\n\n this.filterDescriptors.forEach(f => {\n primeFilterMeta[f.property] = {\n value: null,\n matchMode: f.filterType === TypeEnum.String ? 'contains' : 'equals'\n };\n });\n\n mediusQueryParam?.sortProperty?.forEach((s, idx) => {\n primeSortMeta.push({\n field: s,\n order: mediusQueryParam?.sortAsc?.[idx] ?? true ? 1 : -1\n });\n });\n\n mediusQueryParam?.filterParams?.forEach(f => {\n const descriptor = this.filterDescriptors.find(fd => fd.filterProperty === f.property || fd.property === f.property);\n const operator = MediusRestUtil.matchModeMapping.find(mapping => mapping[2] === f.filterMatchType);\n if (descriptor && operator) {\n primeFilterMeta[descriptor.property] = {\n value: f.filterValue,\n matchMode: operator[0]\n };\n }\n });\n\n this.multiSortMeta = primeSortMeta;\n this.filterMetadata = primeFilterMeta;\n this.rows = mediusQueryParam?.itemsPerPage ?? this.rowsPerPageOptions[0];\n this.offset = mediusQueryParam?.itemsOffset ?? 0;\n }\n\n private getDefaultSortMeta(): SortMeta[] {\n if (this.descriptor.hasDefaultSort) {\n return this.descriptor.defaultSortProperty.map(\n (p, idx) =>\n <SortMeta>{\n field: p,\n order: this.descriptor.defaultSortAsc[idx] ? 1 : -1\n }\n );\n } else {\n return [];\n }\n }\n}\n","<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + descriptor.tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [rowHover]=\"true\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n [selectionMode]=\"selectionMode\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor.hideHeader\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (col.property | i18nProperty: descriptor.model) | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.title ?? (col.property | i18nProperty: descriptor.model) | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"columnActionTemplate || columnActionComponent\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td *ngFor=\"let col of descriptor.columns\" (click)=\"onCellClick(col, item, idx)\" [class.clickable]=\"isColumnClickable\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"columnActionTemplate || columnActionComponent\" class=\"text-right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponent\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponent>\n <span [mngComponent]=\"columnActionComponent!\" (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"descriptor.rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (columnActionTemplate || columnActionComponent ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n","import {Component, Input, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {ConfirmationService, MessageService} from 'primeng/api';\nimport {DialogService} from 'primeng/dynamicdialog';\nimport {Subscription} from 'rxjs';\n\nimport {IDataProvider, ITableviewDataProvider} from '../../data-providers';\nimport {ActionDescriptor, ActionPositionEnum, TableviewDescriptor} from '../../descriptors';\nimport {IViewContainer} from '../../models';\nimport {MngActionExecutorService, MngViewContainerComponentService} from '../../services';\nimport {MngTableCellClickEvent} from './models';\nimport {MngTableComponent} from './table/table.component';\n\n@Component({\n selector: 'mng-tableview',\n templateUrl: './tableview.component.html',\n providers: [MessageService, ConfirmationService, MngViewContainerComponentService]\n})\nexport class MngTableviewComponent<T, S> implements OnInit, OnDestroy, IViewContainer<T, S> {\n @Input() public descriptor!: TableviewDescriptor<T>;\n @Input() public dataProvider?: ITableviewDataProvider<T, S>;\n @Input() public actions: Array<ActionDescriptor<T>> = [];\n\n @ViewChild(MngTableComponent) public tableComponent: MngTableComponent<T, S> | null = null;\n\n public rowClickActions: ActionDescriptor<T>[] = [];\n public rowInlineActions: ActionDescriptor<T>[] = [];\n public toolbarLeftActions: ActionDescriptor<T>[] = [];\n public toolbarRightActions: ActionDescriptor<T>[] = [];\n\n private subscriptions: Subscription[] = [];\n\n constructor(\n private route: ActivatedRoute,\n private messageService: MessageService,\n private translateService: TranslateService,\n private dialogService: DialogService,\n private confirmationService: ConfirmationService,\n private actionExecutor: MngActionExecutorService,\n private viewContainerService: MngViewContainerComponentService<T, S>\n ) {}\n\n ngOnInit() {\n this.viewContainerService.actions = this.actions;\n\n if (this.dataProvider) {\n this.viewContainerService.dataProvider = this.dataProvider;\n }\n const reloadTableSubscription = this.viewContainerService.reloadTable.subscribe(() => {\n this.reloadTable();\n });\n this.subscriptions.push(reloadTableSubscription);\n\n for (const action of this.actions) {\n switch (action.position) {\n case ActionPositionEnum.RowClick:\n this.rowClickActions.push(action);\n break;\n case ActionPositionEnum.RowInline:\n this.rowInlineActions.push(action);\n break;\n case ActionPositionEnum.ToolbarLeft:\n this.toolbarLeftActions.push(action);\n break;\n case ActionPositionEnum.ToolbarRight:\n this.toolbarRightActions.push(action);\n break;\n }\n }\n\n this.toolbarRightActions = this.toolbarRightActions.reverse();\n }\n\n ngOnDestroy() {\n this.subscriptions.forEach(s => s.unsubscribe());\n }\n\n getMessageService(): MessageService {\n return this.messageService;\n }\n\n getDataProvider(): IDataProvider<T, S> | undefined {\n return this.dataProvider;\n }\n\n public reloadTable() {\n this.tableComponent?.reload();\n }\n\n public onTableCellClick(event: MngTableCellClickEvent<T>) {\n if (this.rowClickActions.length) {\n for (const action of this.rowClickActions) {\n this.actionExecutor.triggerRowClickAction(action, event, this.route, this.descriptor.table);\n }\n }\n }\n}\n","<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n (cellClick)=\"onTableCellClick($event)\"\n [isColumnClickable]=\"rowClickActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle | translate }}</h5>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.model.idPropertyName ? item[descriptor.model.idPropertyName] : null\">\n </mng-action>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n","import {Directive, OnInit} from '@angular/core';\n\nimport {ITableviewDataProvider} from '../../../data-providers';\nimport {\n ActionDeleteDescriptor,\n ActionDescriptor,\n ActionEditorAddDescriptor,\n ActionEditorDetailsDescriptor,\n ActionEditorEditDescriptor,\n EditorDescriptor,\n ModelDescriptor,\n TableviewDescriptor\n} from '../../../descriptors';\n\n@Directive()\nexport abstract class AMngTableviewRouteComponent<T, S> implements OnInit {\n public descriptor!: TableviewDescriptor<T>;\n public dataProvider!: ITableviewDataProvider<T, S>;\n public actions!: Array<ActionDescriptor<T>>;\n\n public ngOnInit() {\n this.descriptor = this.createTableviewDescriptor();\n this.dataProvider = this.createTableviewDataProvider();\n this.actions = this.createActionDescriptors();\n }\n\n protected abstract createTableviewDescriptor(): TableviewDescriptor<T>;\n\n protected abstract createTableviewDataProvider(): ITableviewDataProvider<T, S>;\n\n protected createActionDescriptors(): Array<ActionDescriptor<T>> {\n const actions: Array<ActionDescriptor<T>> = [];\n actions.push(this.createActionDescriptorForDetails());\n actions.push(this.createActionDescriptorForAdd());\n actions.push(this.createActionDescriptorForEdit());\n actions.push(this.createActionDescriptorForDelete());\n return actions;\n }\n\n protected createActionDescriptorForDetails(descriptor: EditorDescriptor<T> = this.descriptor.viewEditor): ActionEditorDetailsDescriptor<T> {\n return new ActionEditorDetailsDescriptor(descriptor);\n }\n\n protected createActionDescriptorForAdd(descriptor: EditorDescriptor<T> = this.descriptor.addEditor): ActionEditorAddDescriptor<T> {\n return new ActionEditorAddDescriptor(descriptor);\n }\n\n protected createActionDescriptorForEdit(descriptor: EditorDescriptor<T> = this.descriptor.editEditor): ActionEditorEditDescriptor<T> {\n return new ActionEditorEditDescriptor(descriptor);\n }\n\n protected createActionDescriptorForDelete(descriptor: ModelDescriptor<T> = this.descriptor.model): ActionDeleteDescriptor<T> {\n return new ActionDeleteDescriptor(descriptor);\n }\n}\n","import {Component, Input, OnInit} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\n\nimport {ITableviewDataProvider} from '../../../data-providers';\nimport {ActionDescriptor, TableviewDescriptor} from '../../../descriptors';\nimport {MngRouterData} from '../../../router/models';\nimport {AMngTableviewRouteComponent} from './tableview-route.abstract.component';\n\n@Component({\n selector: 'mng-tableview-route',\n templateUrl: '../../../../../templates/tableview-route.component.html'\n})\nexport class MngTableviewRouteComponent<T, S> extends AMngTableviewRouteComponent<T, S> implements OnInit {\n @Input('descriptor') public descriptorInit?: TableviewDescriptor<T>;\n @Input('dataProvider') public dataProviderInit?: ITableviewDataProvider<T, S>;\n @Input('actions') public actionsInit?: Array<ActionDescriptor<T>>;\n\n constructor(private route: ActivatedRoute) {\n super();\n }\n\n protected createTableviewDescriptor(): TableviewDescriptor<T> {\n if (this.descriptorInit) {\n return this.descriptorInit;\n }\n const routeData = this.route.snapshot.data as MngRouterData;\n if (!routeData?.tableview?.descriptor) {\n throw Error('Tableview requires a descriptor.');\n }\n return routeData.tableview.descriptor;\n }\n\n protected createTableviewDataProvider(): ITableviewDataProvider<T, S> {\n if (this.dataProviderInit) {\n return this.dataProviderInit;\n }\n const routeData = this.route.snapshot.data as MngRouterData;\n if (!routeData?.tableview?.dataProvider) {\n throw Error('Tableview requires a data provider.');\n }\n return routeData.tableview.dataProvider;\n }\n\n protected override createActionDescriptors(): Array<ActionDescriptor<T>> {\n if (this.actionsInit) {\n return this.actionsInit;\n }\n const routeData = this.route.snapshot.data as MngRouterData;\n return routeData?.tableview?.actions ?? super.createActionDescriptors();\n }\n}\n","<div class=\"grid\">\n <div class=\"col-12\">\n <mng-tableview [descriptor]=\"descriptor\" [dataProvider]=\"dataProvider\" [actions]=\"actions\"></mng-tableview>\n </div>\n</div>\n","import {AfterViewInit, ChangeDetectionStrategy, Component, Injector, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {FormControl} from '@angular/forms';\n\nimport {FieldType} from '@ngx-formly/core';\nimport {Message} from 'primeng/api';\nimport {Observable, ReplaySubject, Subject, Subscription, distinctUntilChanged} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\n\nimport {MediusQueryParamBuilder, MediusQueryResult} from '../../../../../api/models';\nimport {FieldLookupConfig, FieldLookupDescriptor} from '../../../../../descriptors';\nimport {MngTableComponent} from '../../../../tableview';\nimport {MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum} from '../../../models';\n\n@Component({\n selector: 'mng-formly-field-lookup-dialog',\n templateUrl: 'formly-field-lookup-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldLookupDialogComponent<T, ET> extends FieldType implements OnInit, AfterViewInit, OnDestroy {\n @ViewChild(MngTableComponent) public mngTable?: MngTableComponent<any, any>;\n\n public descriptor!: FieldLookupDescriptor<T, ET>;\n public config!: FieldLookupConfig;\n public fieldLabelFormControl: FormControl = new FormControl();\n\n public itemsSubject: Subject<T> = new ReplaySubject(1);\n public itemsAsync: Observable<T> = this.itemsSubject.asObservable();\n public addItemsSubject: Subject<MediusQueryResult<T>> = new ReplaySubject(1);\n public addItemsAsync: Observable<MediusQueryResult<T>> = this.addItemsSubject.asObservable();\n\n public dialogUseDataProvider = false;\n private dialogDataProviderService: any = null;\n private dialogIsLoadingSubject = new ReplaySubject<boolean>(1);\n\n public isDialogVisible = false;\n public dialogAreItemsLoaded = false;\n public dialogSelectedItem: any = null;\n public dialogMessages: Message[] = [];\n public dialogIsLoading$ = this.dialogIsLoadingSubject.asObservable();\n\n private lookupDataProviderSubscription?: Subscription;\n private subscriptions: Subscription[] = [];\n\n constructor(private injector: Injector) {\n super();\n }\n\n ngOnInit(): void {\n this.descriptor = this.to['descriptor'];\n\n // emit lifecycle event\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT\n });\n\n this.config = this.descriptor.config as FieldLookupConfig;\n if (!this.descriptor.dialogTableDataProvider && this.descriptor.dataProvider?.serviceType) {\n this.dialogUseDataProvider = true;\n this.dialogDataProviderService = this.injector.get<any>(this.descriptor.dataProvider.serviceType);\n }\n\n // init values\n this.setFieldLabelValue(this.formControl!.value);\n const subscription = this.formControl!.valueChanges.pipe(\n startWith(this.formControl!.value),\n distinctUntilChanged((prev, curr) => {\n const compareProp = this.descriptor.dialogTableDescriptor!.dataKeyProperty ?? this.descriptor.dialogTableDescriptor!.model.idPropertyName;\n if (compareProp && typeof prev === 'object' && typeof curr === 'object') {\n return prev[compareProp] === curr[compareProp];\n } else {\n return prev === curr;\n }\n })\n ).subscribe(v => {\n this.setFieldLabelValue(v);\n this.itemsSubject.next(v);\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldLookupDialogComponent, this, {\n value: v\n });\n });\n this.subscriptions.push(subscription);\n }\n\n ngAfterViewInit() {\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: MngFormFieldEventComponentSubtype.ON_VIEW_INIT\n });\n }\n\n ngOnDestroy(): void {\n this.lookupDataProviderSubscription?.unsubscribe();\n this.subscriptions.forEach(s => s.unsubscribe());\n\n // emit lifecycle event\n this.descriptor?.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY\n });\n }\n\n openSelectDialog() {\n if (!this.dialogAreItemsLoaded && this.dialogUseDataProvider) {\n this.dialogIsLoadingSubject.next(true);\n const queryParamBuilder = MediusQueryParamBuilder.create(50);\n if (this.descriptor.dialogTableDescriptor!.hasDefaultSort) {\n this.descriptor.dialogTableDescriptor!.defaultSortProperty.forEach((p, idx) =>\n queryParamBuilder.withSort(p, this.descriptor.dialogTableDescriptor!.defaultSortAsc[idx])\n );\n }\n this.lookupDataProviderSubscription = this.descriptor.dataProvider?.lookup(queryParamBuilder.build(), this.dialogDataProviderService).subscribe({\n next: res => {\n const mqr = new MediusQueryResult<T>();\n mqr.pageData = res;\n mqr.allDataCount = res.length;\n this.addItemsSubject.next(mqr);\n this.dialogAreItemsLoaded = true;\n this.dialogIsLoadingSubject.next(false);\n\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.DataProvider, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: 'LookupNext',\n queryResult: mqr\n });\n },\n error: err => {\n this.dialogIsLoadingSubject.next(false);\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.DataProvider, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: 'LookupError',\n queryResult: err\n });\n }\n });\n }\n this.dialogSelectedItem = null;\n this.isDialogVisible = true;\n\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Dialog, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: MngFormFieldEventDialogSubtype.VISIBILITY,\n dialogVisible: true\n });\n }\n\n onSelectionChange(item: any) {\n this.dialogSelectedItem = item;\n }\n\n onCaptionCmpInst(instance: any) {\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Dialog, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: MngFormFieldEventDialogSubtype.TABLE_CAPTION_COMPONENT_INSTANCE,\n captionComponentInstance: instance\n });\n }\n\n onColumnActionCmpInst(instance: any) {\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Dialog, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: MngFormFieldEventDialogSubtype.TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE,\n captionComponentInstance: instance\n });\n }\n\n clear() {\n this.formControl!.setValue(undefined);\n this.dialogSelectedItem = null;\n this.dialogAreItemsLoaded = false;\n this.hideDialog();\n }\n\n hideDialog() {\n this.isDialogVisible = false;\n\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Dialog, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: MngFormFieldEventDialogSubtype.VISIBILITY,\n dialogVisible: false\n });\n }\n\n addItem() {\n this.formControl!.setValue(this.dialogSelectedItem);\n this.dialogSelectedItem = null;\n this.dialogAreItemsLoaded = false;\n this.hideDialog();\n }\n\n private setFieldLabelValue(value: T) {\n if (!value) {\n this.fieldLabelFormControl.setValue('');\n return;\n }\n if (typeof value === 'object') {\n const labelProperty = this.descriptor.itemsLabelProperty ?? this.descriptor.dialogTableDescriptor?.model.titlePropertyName;\n if (!labelProperty) {\n throw new Error('Could not determine label property.');\n }\n this.fieldLabelFormControl.setValue(value[labelProperty as keyof object]);\n } else {\n this.fieldLabelFormControl.setValue(value);\n }\n }\n}\n","<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!to.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate: {item: ''}\"\n [disabled]=\"formControl?.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config?.table?.captionComponent\"\n [columnActionComponent]=\"config?.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n","import {ChangeDetectionStrategy, Component, OnDestroy, OnInit} from '@angular/core';\n\nimport {FieldType} from '@ngx-formly/core';\nimport {BehaviorSubject, Observable, ReplaySubject, Subject, Subscription, distinctUntilChanged, of} from 'rxjs';\nimport {map, startWith} from 'rxjs/operators';\n\nimport {ActionDescriptor, ActionEditorDescriptor, ActionEditorSubmitDescriptor, ActionLevelEnum, ActionPositionEnum, FieldManyEditorDescriptor} from '../../../../../descriptors';\nimport {MngActionExecutorService} from '../../../../../services';\nimport {MngTableCellClickEvent} from '../../../../tableview/models';\n\nimport SizeEnum = ActionDescriptor.SizeEnum;\nimport DialogSizeEnum = ActionEditorDescriptor.DialogSizeEnum;\n\n@Component({\n selector: 'mng-formly-table-dialog-form-field',\n templateUrl: './formly-field-table-dialog-form.component.html',\n styleUrls: ['./formly-field-table-dialog-form.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldTableDialogFormComponent<T, ET> extends FieldType implements OnInit, OnDestroy {\n public descriptor!: FieldManyEditorDescriptor<T, ET>;\n\n public itemsSubject: Subject<Array<T>> = new ReplaySubject(1);\n public items$: Observable<Array<T>> = this.itemsSubject.asObservable();\n\n public toolbarRightActions: Array<ActionDescriptor<T>> = [];\n public rowClickActions: Array<ActionDescriptor<T>> = [];\n public rowInlineActions: Array<ActionDescriptor<T>> = [];\n\n private subscriptions: Subscription[] = [];\n private isDisabledSubject = new BehaviorSubject<boolean>(false);\n private isEnabled$ = this.isDisabledSubject.asObservable().pipe(\n distinctUntilChanged(),\n map(e => !e)\n );\n\n constructor(private actionExecutor: MngActionExecutorService) {\n super();\n }\n\n public ngOnInit() {\n this.descriptor = this.to['descriptor'];\n const hasViewAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.View);\n const hasAddAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Add);\n const hasEditAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Edit);\n const hasDeleteAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Delete);\n\n if (hasViewAction) {\n const viewAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.viewEditor, 'details', this.descriptor.editor.model.type, this.descriptor.property)\n .withPosition(ActionPositionEnum.RowClick)\n .withTitle(null)\n .withDialogClassName('mng-field-dialog mng-action-editor-dialog')\n .withDialogSize(DialogSizeEnum.Small);\n viewAction.withEditorActions([new ActionEditorSubmitDescriptor(viewAction, ActionEditorSubmitDescriptor.TypeEnum.Cancel)]);\n this.rowClickActions.push(viewAction as ActionDescriptor<T>);\n }\n\n if (hasAddAction) {\n const addAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.addEditor, 'add', this.descriptor.editor.model.type, this.descriptor.property)\n .withPosition(ActionPositionEnum.ToolbarRight)\n .withTitle(null)\n .withIcon('pi pi-plus')\n .withDialogClassName('mng-field-dialog mng-action-editor-dialog')\n .withDialogSize(DialogSizeEnum.Small)\n .withSize(SizeEnum.ExtraSmall)\n .withSubmitFunction(ctx => {\n if (!ctx.data?.item) {\n throw new Error(`No item was provided in context, edit cannot be done.`);\n }\n this.formState.submittedOn = Date.now();\n let value = this.formControl!.value;\n value = [...value, ctx.data.item];\n this.formControl!.patchValue(value);\n return of(ctx.data.item);\n })\n .withIsVisibleFunction(() => of(!this.options?.formState.disabled))\n .withIsEnabledFunction(() => this.isEnabled$);\n this.toolbarRightActions.push(addAction as ActionDescriptor<T>);\n }\n if (hasEditAction) {\n const editAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.editEditor, 'edit', this.descriptor.editor.model.type, this.descriptor.property)\n .withTitle(null)\n .withIcon('pi pi-pencil')\n .withDialogClassName('mng-field-dialog mng-action-editor-dialog')\n .withDialogSize(DialogSizeEnum.Small)\n .withSize(SizeEnum.ExtraSmall)\n .withSubmitFunction(ctx => {\n if (!ctx.data?.item) {\n throw new Error(`No item was provided in context, edit cannot be done.`);\n }\n this.formState.submittedOn = Date.now();\n const formControlValue = this.formControl!.value;\n formControlValue[ctx.data.actionData?.['itemIndex']] = ctx.data.item;\n this.formControl!.patchValue(formControlValue);\n return of(ctx.data.item);\n })\n .withIsVisibleFunction(() => of(!this.formControl?.disabled))\n .withIsEnabledFunction(() => this.isEnabled$);\n this.rowInlineActions.push(editAction as ActionDescriptor<T>);\n }\n if (hasDeleteAction) {\n const deleteAction = new ActionDescriptor(this.descriptor.tableviewDescriptor.model, 'delete', this.descriptor.editor.model.type, this.descriptor.property)\n .withLevel(ActionLevelEnum.Danger)\n .withTitle(null)\n .withIcon('pi pi-trash')\n .withSize(SizeEnum.ExtraSmall)\n .withRunFunction(ctx => {\n if (!ctx.data?.item) {\n throw new Error(`No item was provided in context, delete cannot be done.`);\n }\n let formControlValue = this.formControl!.value;\n const compareProperty = this.descriptor.tableDescriptor.dataKeyProperty\n ? this.descriptor.tableDescriptor.dataKeyProperty\n : this.descriptor.tableDescriptor.model.idPropertyName;\n if (!compareProperty) {\n throw new Error('Cannot compare items, please provide main table data key property or model id property.');\n }\n const ctxItem: any = ctx.data.item;\n if (!ctxItem?.[compareProperty]) {\n return formControlValue;\n }\n formControlValue = formControlValue.filter((i: any) => i[compareProperty] !== ctxItem[compareProperty]);\n this.formControl!.patchValue(formControlValue);\n return of(ctx.data.item);\n })\n .withIsVisibleFunction(() => of(!this.options?.formState.disabled))\n .withIsEnabledFunction(() => this.isEnabled$);\n this.rowInlineActions.push(deleteAction);\n }\n\n for (const action of this.descriptor.actions) {\n switch (action.position) {\n case ActionPositionEnum.ToolbarRight:\n this.toolbarRightActions.push(action);\n break;\n case ActionPositionEnum.RowInline:\n this.rowInlineActions.push(action);\n break;\n case ActionPositionEnum.RowClick:\n // this.footerRightActions.push(action);\n break;\n }\n }\n\n // init values\n if (typeof this.formControl!.value === 'undefined' || this.formControl!.value === null) {\n this.formControl!.patchValue([]);\n }\n let subscription = this.formControl!.valueChanges.pipe(startWith(this.formControl!.value)).subscribe(v => {\n this.itemsSubject.next(v);\n });\n this.subscriptions.push(subscription);\n\n this.isDisabledSubject.next(this.formControl!.disabled);\n subscription = this.formControl!.statusChanges.pipe().subscribe(status => {\n if (status === 'DISABLED' && !this.isDisabledSubject.value) {\n this.isDisabledSubject.next(true);\n } else if (status !== 'DISABLED' && this.isDisabledSubject.value) {\n this.isDisabledSubject.next(false);\n }\n });\n this.subscriptions.push(subscription);\n }\n\n public ngOnDestroy() {\n this.subscriptions.forEach(s => s.unsubscribe());\n }\n\n public onTableCellClick(event: MngTableCellClickEvent<T>) {\n console.log(event);\n if (this.rowClickActions.length) {\n for (const action of this.rowClickActions) {\n this.actionExecutor.triggerRowClickAction(action, event);\n }\n }\n }\n}\n","<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" (cellClick)=\"onTableCellClick($event)\" [isColumnClickable]=\"rowInlineActions.length > 0\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\" let-idx=\"rowIndex\">\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.tableviewDescriptor.model.idPropertyName ? item[descriptor.tableviewDescriptor.model.idPropertyName] : undefined\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n</mng-table>\n","import {ChangeDetectionStrategy, Component, Injector, OnDestroy, OnInit} from '@angular/core';\n\nimport {FieldType} from '@ngx-formly/core';\nimport {Message} from 'primeng/api';\nimport {Observable, ReplaySubject, Subject, Subscription} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\n\nimport {MediusFilterMatchType, MediusQueryParamBuilder, MediusQueryResult} from '../../../../../api/models';\nimport {FieldManyToManyEditorDescriptor} from '../../../../../descriptors';\n\n@Component({\n selector: 'mng-formly-table-multiselect-add-field',\n templateUrl: './formly-field-table-dialog-multiselect.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldTableDialogMultiselectComponent<T, ET> extends FieldType implements OnInit, OnDestroy {\n public descriptor!: FieldManyToManyEditorDescriptor<T, ET>;\n\n public itemsSubject: Subject<Array<T>> = new ReplaySubject(1);\n public itemsAsync: Observable<Array<T>> = this.itemsSubject.asObservable();\n public addItemsSubject: Subject<MediusQueryResult<T>> = new ReplaySubject(1);\n public addItemsAsync: Observable<MediusQueryResult<T>> = this.addItemsSubject.asObservable();\n\n public dialogUseDataProvider = false;\n private dialogDataProviderService: any = null;\n private dialogIsLoadingSubject = new ReplaySubject<boolean>(1);\n\n public isDialogVisible = false;\n public dialogAreItemsLoaded = false;\n public dialogSelectedAddItems: Array<any> = [];\n public dialogMessages: Message[] = [];\n public dialogIsLoading$ = this.dialogIsLoadingSubject.asObservable();\n\n public hasAddAction = false;\n public hasDeleteAction = false;\n\n private lookupDataProviderSubscription?: Subscription;\n private subscriptions: Subscription[] = [];\n\n constructor(private injector: Injector) {\n super();\n }\n\n public ngOnInit() {\n this.descriptor = this.to['descriptor'];\n if (this.descriptor.lookupTableDataProvider?.serviceType) {\n this.dialogUseDataProvider = true;\n this.dialogDataProviderService = this.injector.get<any>(this.descriptor.lookupTableDataProvider.serviceType);\n }\n this.hasAddAction = this.descriptor.actions.some(a => a === FieldManyToManyEditorDescriptor.ActionEnum.Add);\n this.hasDeleteAction = this.descriptor.actions.some(a => a === FieldManyToManyEditorDescriptor.ActionEnum.Delete);\n\n // init values\n if (typeof this.formControl!.value === 'undefined' || this.formControl!.value === null) {\n this.formControl!.patchValue([]);\n }\n const subscription = this.formControl!.valueChanges.pipe(startWith(this.formControl!.value)).subscribe(v => {\n this.itemsSubject.next(v);\n });\n this.subscriptions.push(subscription);\n }\n\n public ngOnDestroy() {\n this.lookupDataProviderSubscription?.unsubscribe();\n this.subscriptions.forEach(s => s.unsubscribe());\n }\n\n openAddDialog() {\n if (!this.dialogAreItemsLoaded && this.dialogUseDataProvider) {\n this.dialogIsLoadingSubject.next(true);\n const queryParamBuilder = MediusQueryParamBuilder.create(50);\n if (this.descriptor.lookupTableDescriptor.hasDefaultSort) {\n this.descriptor.lookupTableDescriptor.defaultSortProperty.forEach((p, idx) =>\n queryParamBuilder.withSort(p, this.descriptor.lookupTableDescriptor.defaultSortAsc[idx])\n );\n }\n if (this.descriptor.hasLookupExcludeValues) {\n const filterValues = this.formControl!.value.map((i: any) => i[this.descriptor.excludeValueProperty]);\n queryParamBuilder.withFilter(this.descriptor.excludeFilterProperty, filterValues, undefined, MediusFilterMatchType.NotIn);\n }\n this.lookupDataProviderSubscription = this.descriptor.lookupTableDataProvider?.getAll(queryParamBuilder.build(), this.dialogDataProviderService).subscribe({\n next: res => {\n this.addItemsSubject.next(res);\n this.dialogAreItemsLoaded = true;\n this.dialogIsLoadingSubject.next(false);\n },\n error: () => {\n this.dialogIsLoadingSubject.next(false);\n }\n });\n }\n this.dialogSelectedAddItems = [];\n this.isDialogVisible = true;\n }\n\n onSelectionChange(items: Array<any>) {\n this.dialogSelectedAddItems = items;\n }\n\n hideDialog() {\n this.isDialogVisible = false;\n }\n\n addItems() {\n let value = this.formControl!.value;\n if (Array.isArray(value)) {\n value = [...value, ...this.dialogSelectedAddItems];\n this.formControl!.patchValue(value);\n this.dialogSelectedAddItems = [];\n this.dialogAreItemsLoaded = false;\n this.hideDialog();\n } else {\n console.error('Values are not an valid array, cannot add selected items to array');\n this.dialogMessages = [{severity: 'error', summary: 'Error', detail: 'Selected items could not be added'}];\n }\n }\n\n removeItem(item: any) {\n let value = this.formControl!.value;\n if (Array.isArray(value)) {\n const compareProperty = this.descriptor.mainTableDescriptor.dataKeyProperty\n ? this.descriptor.mainTableDescriptor.dataKeyProperty\n : this.descriptor.mainTableDescriptor.model.idPropertyName;\n if (!compareProperty) {\n throw new Error('Cannot compare items, please provide main table data key property or model id property.');\n }\n value = value.filter(i => i[compareProperty] !== item[compareProperty]);\n this.formControl!.patchValue(value);\n this.dialogAreItemsLoaded = false;\n } else {\n console.error('Values are not an valid array, cannot delete selected item from array');\n }\n }\n}\n","<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-field-dialog mng-action-editor-dialog mng-action-editor-dialog-sm\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\nimport {FieldType} from '@ngx-formly/core';\n\n@Component({\n selector: 'mng-formly-field-tabs',\n templateUrl: './formly-field-tabs.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldTabsComponent extends FieldType {}\n","<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label! | translate\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n","import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';\n\nimport {FieldType} from '@ngx-formly/core';\n\nimport {FieldGroupDescriptor} from '../../../../../descriptors';\n\n@Component({\n selector: 'mng-formly-field-fieldset',\n templateUrl: './formly-field-fieldset.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldFieldsetComponent extends FieldType implements OnInit {\n public readonly typeFieldset = FieldGroupDescriptor.TypeEnum.Fieldset;\n public readonly typeLogical = FieldGroupDescriptor.TypeEnum.Logical;\n public descriptor?: FieldGroupDescriptor<any>;\n\n ngOnInit() {\n this.descriptor = this.to['descriptor'];\n }\n}\n","<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <ng-container [ngSwitch]=\"descriptor?.type\">\n <p-fieldset *ngSwitchCase=\"typeFieldset\" [legend]=\"group.templateOptions?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n <formly-field *ngSwitchDefault [field]=\"group\"></formly-field>\n </ng-container>\n</ng-container>\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\nimport {FieldWrapper} from '@ngx-formly/core';\n\n@Component({\n selector: 'mng-formly-field-wrapper',\n templateUrl: './formly-field-wrapper.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldWrapperComponent extends FieldWrapper {}\n","<div [class]=\"to?.['descriptor']?.['fieldClassName'] ?? 'field'\">\n <label [for]=\"key\" [class]=\"to?.['descriptor']?.['labelClassName'] ?? ''\"\n >{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label\n >\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\nimport {FieldWrapper} from '@ngx-formly/core';\n\n@Component({\n selector: 'mng-formly-table-wrapper',\n templateUrl: './formly-table-wrapper.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyTableWrapperComponent extends FieldWrapper {}\n","<div [class]=\"to?.['descriptor']?.['fieldClassName'] ?? 'field table'\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\nimport {MngCommonsService} from '../../services';\n\n@Component({\n selector: 'mng-breadcrumb',\n templateUrl: './breadcrumb.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngBreadcrumbComponent {\n constructor(public mngCommons: MngCommonsService) {}\n}\n","<div class=\"layout-breadcrumb-container\">\n <div class=\"layout-breadcrumb\">\n <p-breadcrumb [home]=\"$any(mngCommons.breadcrumbHome$ | async)\" [model]=\"$any(mngCommons.breadcrumbs$ | async)\" styleClass=\"layout-breadcrumb py-2\"></p-breadcrumb>\n </div>\n</div>\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\nimport {MngCommonsService} from '../../services';\n\n@Component({\n selector: 'mng-footer',\n templateUrl: './footer.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFooterComponent {\n public currentYear = new Date().getFullYear();\n\n constructor(public mngCommons: MngCommonsService) {}\n}\n","<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">&#169; {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n","import {Injectable} from '@angular/core';\n\nimport {BehaviorSubject, Observable, Subject} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {MngCommonsService} from '../../../services';\n\n@Injectable()\nexport class MngMainLayoutComponentService {\n private _overlayMenuActive = false;\n private _overlayMenuActiveSubject: Subject<boolean> = new BehaviorSubject(this._overlayMenuActive);\n private _staticMenuDesktopInactive = false;\n private _staticMenuDesktopInactiveSubject: Subject<boolean> = new BehaviorSubject(this._staticMenuDesktopInactive);\n private _staticMenuMobileActive = false;\n private _staticMenuMobileActiveSubject: Subject<boolean> = new BehaviorSubject(this._staticMenuMobileActive);\n\n private _sidebarActive = true;\n private _sidebarActiveSubject: Subject<boolean> = new BehaviorSubject(this._sidebarActive);\n private _sidebarStatic = true;\n private _sidebarStaticSubject: Subject<boolean> = new BehaviorSubject(this._sidebarStatic);\n\n private _menuClick = false;\n private _menuHoverActive = false;\n private _topbarItemClick = false;\n\n private _activeTopbarItem: any = null;\n private _activeTopbarItemSubject: Subject<any> = new BehaviorSubject(this._activeTopbarItem);\n\n private _pinActive = true;\n private _pinActiveSubject: Subject<boolean> = new BehaviorSubject(this._pinActive);\n\n private _innerWidth = 1920;\n private _innerWidthSubject: Subject<number> = new BehaviorSubject(this._innerWidth);\n\n constructor(private mngCommons: MngCommonsService) {}\n\n get overlayMenuActive$(): Observable<boolean> {\n return this._overlayMenuActiveSubject.asObservable();\n }\n\n set overlayMenuActive(value: boolean) {\n this._overlayMenuActive = value;\n this._overlayMenuActiveSubject.next(value);\n }\n\n get staticMenuDesktopInactive$(): Observable<boolean> {\n return this._staticMenuDesktopInactiveSubject.asObservable();\n }\n\n set staticMenuDesktopInactive(value: boolean) {\n this._staticMenuDesktopInactive = value;\n this._staticMenuDesktopInactiveSubject.next(value);\n }\n\n get staticMenuMobileActive$(): Observable<boolean> {\n return this._staticMenuMobileActiveSubject.asObservable();\n }\n\n set staticMenuMobileActive(value: boolean) {\n this._staticMenuMobileActive = value;\n this._staticMenuMobileActiveSubject.next(value);\n }\n\n get sidebarActive$(): Observable<boolean> {\n return this._sidebarActiveSubject.asObservable();\n }\n\n set sidebarActive(value: boolean) {\n this._sidebarActive = value;\n this._sidebarActiveSubject.next(value);\n }\n\n get sidebarStatic$(): Observable<boolean> {\n return this._sidebarStaticSubject.asObservable();\n }\n\n set sidebarStatic(value: boolean) {\n this._sidebarStatic = value;\n this._sidebarStaticSubject.next(value);\n }\n\n set menuHoverActive(value: boolean) {\n this._menuHoverActive = value;\n }\n\n set topbarItemClick(value: boolean) {\n this._topbarItemClick = value;\n }\n\n get activeTopbarItem$(): Observable<any> {\n return this._activeTopbarItemSubject.asObservable();\n }\n\n set activeTopbarItem(value: any) {\n this._activeTopbarItem = value;\n this._activeTopbarItemSubject.next(value);\n }\n\n get pinActive$(): Observable<boolean> {\n return this._pinActiveSubject.asObservable();\n }\n\n set pinActive(value: boolean) {\n this._pinActive = value;\n this._pinActiveSubject.next(value);\n }\n\n get isDesktop$() {\n return this._innerWidthSubject.asObservable().pipe(map(e => this.isWidthDesktop(e)));\n }\n\n get isMobile$() {\n return this._innerWidthSubject.asObservable().pipe(map(e => this.isWidthMobile(e)));\n }\n\n set innerWidth(value: number) {\n this._innerWidth = value;\n this._innerWidthSubject.next(value);\n }\n\n onLayoutClick() {\n if (!this._topbarItemClick) {\n this.activeTopbarItem = null;\n }\n\n if (!this._menuClick) {\n if (this.mngCommons.menuModeIsSlim && !this.isMobile()) {\n this.mngCommons.menuReset();\n this.menuHoverActive = false;\n }\n\n if (this._overlayMenuActive || this._staticMenuMobileActive) {\n this.overlayMenuActive = false;\n this.staticMenuMobileActive = false;\n }\n }\n\n this._menuClick = false;\n this.topbarItemClick = false;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onSidebarClick(event: any) {\n this._menuClick = true;\n }\n\n onToggleMenu(event: any) {\n this._menuClick = true;\n\n if (this._overlayMenuActive) {\n this.overlayMenuActive = false;\n }\n\n if (this._sidebarActive) {\n this.sidebarStatic = !this._sidebarStatic;\n }\n\n event.preventDefault();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onSidebarMouseOver(event: any) {\n if (this.mngCommons.menuModeIsSidebar && !this._sidebarStatic) {\n this.sidebarActive = this.isDesktop();\n setTimeout(() => {\n this.pinActive = this.isDesktop();\n }, 200);\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onSidebarMouseLeave(event: any) {\n if (this.mngCommons.menuModeIsSidebar && !this._sidebarStatic) {\n setTimeout(() => {\n this.sidebarActive = false;\n this.pinActive = false;\n }, 250);\n }\n }\n\n onMenuButtonClick(event: any) {\n this._menuClick = true;\n\n if (this.mngCommons.menuModeIsOverlay) {\n this.overlayMenuActive = !this._overlayMenuActive;\n }\n\n if (this.isDesktop()) {\n this.staticMenuDesktopInactive = !this._staticMenuDesktopInactive;\n } else {\n this.staticMenuMobileActive = !this._staticMenuMobileActive;\n }\n\n event.preventDefault();\n }\n\n onTopbarItemClick(event: any, item: any) {\n this._topbarItemClick = true;\n\n if (this._activeTopbarItem === item) {\n this.activeTopbarItem = null;\n } else {\n this.activeTopbarItem = item;\n }\n\n event.preventDefault();\n }\n\n onTopbarSubItemClick(event: any) {\n event.preventDefault();\n }\n\n /**\n * Checks if is desktop width, DO NOT use within HTML templates or within functions called by HTML templates\n */\n public isDesktop() {\n return this.isWidthDesktop(this._innerWidth);\n }\n\n /**\n * Checks if is mobile width, DO NOT use within HTML templates or within functions called by HTML templates\n */\n public isMobile() {\n return this.isWidthMobile(this._innerWidth);\n }\n\n private isWidthDesktop(width: number) {\n return width > 991;\n }\n\n private isWidthMobile(width: number) {\n return width <= 991;\n }\n}\n","import {animate, state, style, transition, trigger} from '@angular/animations';\nimport {Component, Injector, Input, OnDestroy, OnInit} from '@angular/core';\nimport {ActivatedRoute, CanActivate, GuardsCheckEnd, NavigationEnd, Router, RouterStateSnapshot, UrlTree} from '@angular/router';\n\nimport {BehaviorSubject, Observable, Subscription, combineLatest, distinctUntilChanged, from, of} from 'rxjs';\nimport {first, map} from 'rxjs/operators';\n\nimport {MngMenuItem} from '../../models';\nimport {MngCommonsService} from '../../services';\nimport {MngMainLayoutComponentService} from './services';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[mng-menuitem]',\n templateUrl: './menu-item.component.html',\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n '[class.layout-root-menuitem]': 'root',\n '[class.active-menuitem]': 'active'\n },\n animations: [\n trigger('children', [\n state(\n 'void',\n style({\n height: '0px'\n })\n ),\n state(\n 'hiddenAnimated',\n style({\n height: '0px'\n })\n ),\n state(\n 'visibleAnimated',\n style({\n height: '*'\n })\n ),\n state(\n 'visible',\n style({\n height: '*',\n 'z-index': 100\n })\n ),\n state(\n 'hidden',\n style({\n height: '0px',\n 'z-index': '*'\n })\n ),\n transition('visibleAnimated => hiddenAnimated', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)')),\n transition('hiddenAnimated => visibleAnimated', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)')),\n transition('void => visibleAnimated, visibleAnimated => void', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))\n ])\n ]\n // changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngMenuItemComponent implements OnInit, OnDestroy {\n @Input() item!: MngMenuItem;\n @Input() index = 0;\n @Input() root = false;\n @Input() parentKey: string | null = null;\n\n public key = '';\n public active = false;\n public hover = false;\n\n private isAllowedSubject = new BehaviorSubject(true);\n public isAllowed$: Observable<boolean>;\n\n private itemUrl?: string | UrlTree;\n private menuSourceSubscription?: Subscription;\n private menuResetSubscription?: Subscription;\n private routerEventsSubscription?: Subscription;\n private guardsSubscription?: Subscription;\n\n constructor(\n private injector: Injector,\n private router: Router,\n private route: ActivatedRoute,\n public mngCommons: MngCommonsService,\n public mainLayoutService: MngMainLayoutComponentService\n ) {\n this.isAllowed$ = this.isAllowedSubject.asObservable().pipe(distinctUntilChanged());\n }\n\n ngOnInit() {\n if (!this.mngCommons.menuModeIsSlim && this.item.routerLink) {\n this.updateActiveStateFromRoute();\n }\n\n this.key = this.parentKey ? this.parentKey + '-' + this.index : String(this.index);\n if (this.item.routerLink) {\n if (typeof this.item.routerLink === 'string') {\n this.itemUrl = this.item.routerLink;\n } else {\n this.itemUrl = this.router.parseUrl(this.item.routerLink.join('/'));\n }\n }\n\n this.menuSourceSubscription = this.mngCommons.menuActiveKey$.subscribe(key => {\n // deactivate current active menu\n if (this.active && this.key !== key && key.indexOf(this.key) !== 0) {\n this.active = false;\n }\n });\n\n this.menuResetSubscription = this.mngCommons.menuReset$.subscribe(() => {\n this.active = false;\n });\n\n this.routerEventsSubscription = this.router.events.subscribe(next => {\n if (next instanceof GuardsCheckEnd && next.shouldActivate) {\n this.checkIfMenuItemIsAllowedFromGuard(next.state);\n } else if (next instanceof NavigationEnd) {\n if (this.mngCommons.menuModeIsSlim && !this.mainLayoutService.isMobile()) {\n this.active = false;\n } else {\n this.updateActiveStateFromRoute();\n }\n }\n });\n\n this.checkIfMenuItemIsAllowedFromGuard(this.router.routerState.snapshot);\n }\n\n updateActiveStateFromRoute() {\n if (this.itemUrl) {\n this.active = this.router.isActive(this.itemUrl, this.item.items ? false : true);\n } else {\n this.active = false;\n }\n }\n\n itemClick(event: Event) {\n // avoid processing disabled items\n if (this.item.disabled) {\n event.preventDefault();\n return;\n }\n\n // navigate with hover in horizontal mode\n if (this.root) {\n this.mainLayoutService.menuHoverActive = !this.mainLayoutService.menuHoverActive;\n }\n\n // notify other items\n this.mngCommons.menuChangeActiveKey(this.key);\n\n // toggle active state\n if (this.item.items) {\n this.active = !this.active;\n } else {\n // activate item\n this.active = true;\n\n if (this.mainLayoutService.isMobile()) {\n this.mainLayoutService.staticMenuMobileActive = false;\n }\n\n if (this.mngCommons.menuModeIsOverlay) {\n this.mainLayoutService.overlayMenuActive = false;\n }\n\n // reset horizontal menu\n if (this.mngCommons.menuModeIsSlim && !this.mainLayoutService.isMobile()) {\n this.mngCommons.menuReset();\n this.mainLayoutService.menuHoverActive = false;\n }\n }\n }\n\n onMouseEnter() {\n // activate item on hover\n if (this.root && this.mainLayoutService.menuHoverActive && this.mngCommons.menuModeIsSlim && this.mainLayoutService.isDesktop()) {\n this.mngCommons.menuChangeActiveKey(this.key);\n this.active = true;\n }\n }\n\n ngOnDestroy() {\n this.menuSourceSubscription?.unsubscribe();\n this.menuResetSubscription?.unsubscribe();\n this.routerEventsSubscription?.unsubscribe();\n this.guardsSubscription?.unsubscribe();\n }\n\n private checkIfMenuItemIsAllowedFromGuard(routerState: RouterStateSnapshot) {\n this.guardsSubscription?.unsubscribe();\n if (this.item.guards?.length) {\n const obs = [];\n for (const guard of this.item.guards) {\n const tokenInjectedInstance = this.injector.get(guard);\n if (tokenInjectedInstance && 'canActivate' in tokenInjectedInstance) {\n const guardInstance = tokenInjectedInstance as CanActivate;\n const canActivateRes = guardInstance.canActivate(this.route.snapshot, routerState);\n\n let canActivateObs: Observable<boolean | UrlTree>;\n if (canActivateRes instanceof Observable) {\n canActivateObs = canActivateRes;\n } else if (canActivateRes instanceof Promise) {\n canActivateObs = from(canActivateRes);\n } else {\n canActivateObs = of(canActivateRes);\n }\n obs.push(\n canActivateObs.pipe(\n first(),\n map(res => res === true) // if url tree is present, that means redirect and implies not allowed\n )\n );\n }\n }\n this.guardsSubscription = combineLatest(obs)\n .pipe(first())\n .subscribe(next => {\n const result = next.every(n => n === true);\n this.isAllowedSubject.next(result);\n });\n } else {\n this.isAllowedSubject.next(true);\n }\n }\n}\n","<ng-container>\n <div *ngIf=\"root && item.visible !== false && (isAllowed$ | async) === true\" class=\"layout-menuitem-root-text\">{{ item.label! | translate }}</div>\n <a\n *ngIf=\"(!item.routerLink || item.items) && item.visible !== false && (isAllowed$ | async) === true\"\n [attr.href]=\"item.href\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"onMouseEnter()\"\n (keydown.enter)=\"itemClick($event)\"\n [routerLink]=\"item.routerLink\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"item.routerLink && !item.items && item.visible !== false && (isAllowed$ | async) === true\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"hover = true\"\n (mouseleave)=\"hover = false\"\n [routerLink]=\"item.routerLink\"\n routerLinkActive=\"active-menuitem-routerlink\"\n [routerLinkActiveOptions]=\"{exact: true}\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <ul\n *ngIf=\"((item.items && active) || (item.items && (mngCommons.menuModeIsStatic$ | async) && (root || active))) && item.visible !== false && (isAllowed$ | async) === true\"\n [@children]=\"\n (mngCommons.menuModeIsSlim$ | async) && (mainLayoutService.isMobile$ | async) === false && root\n ? active\n ? 'visible'\n : 'hidden'\n : (mngCommons.menuModeIsStatic$ | async) && root && (mainLayoutService.isMobile$ | async) === false\n ? 'visible'\n : active\n ? 'visibleAnimated'\n : 'hiddenAnimated'\n \">\n <ng-template ngFor let-child let-i=\"index\" [ngForOf]=\"item.items\">\n <li mng-menuitem [item]=\"child\" [index]=\"i\" [parentKey]=\"key\" [class]=\"child.badgeClassName\"></li>\n </ng-template>\n </ul>\n</ng-container>\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\nimport {MngCommonsService} from '../../services';\nimport {MngMainLayoutComponentService} from './services';\n\n@Component({\n selector: 'mng-menu',\n templateUrl: './menu.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngMenuComponent {\n constructor(public mngCommons: MngCommonsService, public mainLayoutService: MngMainLayoutComponentService) {}\n}\n","<div\n class=\"layout-menu-wrapper\"\n [ngClass]=\"{'layout-sidebar-active': (mainLayoutService.sidebarActive$ | async)}\"\n (click)=\"mainLayoutService.onSidebarClick($event)\"\n (mouseover)=\"mainLayoutService.onSidebarMouseOver($event)\"\n (mouseleave)=\"mainLayoutService.onSidebarMouseLeave($event)\">\n <div class=\"menu-logo\">\n <a routerLink=\"/\" class=\"logo\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" />\n </a>\n\n <a routerLink=\"/\" class=\"app-name\" *ngIf=\"(mngCommons.menuModeIsSlim$ | async) === false || (mainLayoutService.isMobile$ | async)\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" />\n </a>\n <a *ngIf=\"mngCommons.menuPinEnabled\" class=\"menu-pin\" (click)=\"mainLayoutService.onToggleMenu($event)\">\n <span *ngIf=\"mngCommons.menuModeIsOverlay$ | async\" class=\"pi pi-times\"></span>\n <span\n *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) === false && (mainLayoutService.pinActive$ | async)\"\n class=\"pi pi-unlock\"></span>\n <span *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) && (mainLayoutService.pinActive$ | async)\" class=\"pi pi-lock\"></span>\n </a>\n </div>\n\n <div class=\"layout-menu-container\">\n <ul class=\"layout-menu\">\n <ng-container *ngFor=\"let item of mngCommons.menuItems; let i = index\">\n <li mng-menuitem *ngIf=\"!item.separator\" [item]=\"item\" [index]=\"i\" [root]=\"true\"></li>\n <li *ngIf=\"item.separator\" class=\"menu-separator\"></li>\n </ng-container>\n </ul>\n </div>\n</div>\n","import {ChangeDetectionStrategy, Component, OnInit, QueryList, Type, ViewChildren} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\n\nimport {MngTemplateDirective} from '../../directives';\nimport {IUser} from '../../models';\nimport {MngRouterData} from '../../router/models';\nimport {MngCommonsService} from '../../services';\nimport {MngBreadcrumbComponent} from './breadcrumb.component';\nimport {MngMenuComponent} from './menu.component';\nimport {MngMainLayoutComponentService} from './services';\n\n@Component({\n selector: 'mng-topbar',\n templateUrl: './topbar.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngTopbarComponent implements OnInit {\n @ViewChildren(MngTemplateDirective) templates!: QueryList<MngTemplateDirective>;\n\n public breadcrumbComponent: Type<any> = MngBreadcrumbComponent;\n public menuComponent: Type<any> = MngMenuComponent;\n\n public languages: Array<string> = ['en'];\n public selectedLanguage = 'en';\n public user?: IUser;\n\n constructor(private route: ActivatedRoute, public mngCommons: MngCommonsService, public mainLayoutService: MngMainLayoutComponentService) {}\n\n ngOnInit(): void {\n const routeData = this.route.snapshot.data as MngRouterData;\n if (routeData?.breadcrumbComponent) {\n this.breadcrumbComponent = routeData.breadcrumbComponent;\n }\n if (routeData?.menuComponent) {\n this.menuComponent = routeData.menuComponent;\n }\n\n this.languages = this.mngCommons.appLanguages;\n this.selectedLanguage = this.mngCommons.appLanguage;\n this.mngCommons.user$.subscribe(u => {\n this.user = u;\n });\n\n this.mainLayoutService.innerWidth = window.innerWidth;\n }\n\n public switchLanguage(language: string) {\n this.mngCommons.appLanguage = language;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public logout(user: IUser, event: Event) {\n if (typeof user.logout === 'function') {\n user.logout();\n }\n }\n}\n","<div class=\"layout-topbar\">\n <div class=\"layout-topbar-left\">\n <a\n href=\"#\"\n class=\"topbar-menu-button\"\n (click)=\"mainLayoutService.onMenuButtonClick($event)\"\n *ngIf=\"(mngCommons.menuModeIsOverlay$ | async) || (mainLayoutService.isMobile$ | async)\">\n <i class=\"pi pi-bars\"></i>\n </a>\n\n <ng-container [mngComponent]=\"breadcrumbComponent\"></ng-container>\n </div>\n\n <ng-container [mngComponent]=\"menuComponent\"></ng-container>\n\n <div class=\"layout-topbar-right\">\n <ul class=\"layout-topbar-right-items\">\n <li #profile class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <a href=\"#\" (click)=\"mainLayoutService.onTopbarItemClick($event, profile)\">\n <i class=\"pi pi-fw pi-user\"></i>\n </a>\n <ul class=\"fadeInDown\" *ngIf=\"user\">\n <li role=\"menuitem\">\n <a>\n {{ user?.displayName ?? user?.username }}\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a [href]=\"user?.logoutUrl\" (click)=\"logout(user, $event)\">\n <i class=\"pi pi-fw pi-sign-out\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n </ul>\n </li>\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n </ul>\n </div>\n</div>\n","import {ChangeDetectionStrategy, Component, HostListener, OnInit, QueryList, Type, ViewChildren} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\n\nimport {MngTemplateDirective} from '../../directives';\nimport {MngRouterData} from '../../router/models';\nimport {MngCommonsService} from '../../services';\nimport {MngFooterComponent} from './footer.component';\nimport {MngMenuComponent} from './menu.component';\nimport {MngMainLayoutComponentService} from './services';\nimport {MngTopbarComponent} from './topbar.component';\n\n@Component({\n selector: 'mng-main-layout',\n templateUrl: './main-layout.component.html',\n providers: [MngMainLayoutComponentService],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngMainLayoutComponent implements OnInit {\n @ViewChildren(MngTemplateDirective) templates!: QueryList<MngTemplateDirective>;\n\n public topbarComponent: Type<any> = MngTopbarComponent;\n public menuComponent: Type<any> = MngMenuComponent;\n public footerComponent: Type<any> = MngFooterComponent;\n\n constructor(private route: ActivatedRoute, public mngCommons: MngCommonsService, public mainLayoutService: MngMainLayoutComponentService) {}\n\n ngOnInit() {\n const routeData = this.route.snapshot.data as MngRouterData;\n if (routeData?.topbarComponent) {\n this.topbarComponent = routeData.topbarComponent;\n }\n if (routeData?.menuComponent) {\n this.menuComponent = routeData.menuComponent;\n }\n if (routeData?.footerComponent) {\n this.footerComponent = routeData.footerComponent;\n }\n\n this.mainLayoutService.innerWidth = window.innerWidth;\n }\n\n @HostListener('window:resize', ['$event'])\n onWindowResize(event: UIEvent) {\n const target: any = event.target;\n this.mainLayoutService.innerWidth = target?.innerWidth ?? window.innerWidth;\n }\n}\n","<div\n class=\"layout-wrapper\"\n (click)=\"mainLayoutService.onLayoutClick()\"\n [ngClass]=\"{\n 'layout-static': mngCommons.menuModeIsStatic$ | async,\n 'layout-overlay': mngCommons.menuModeIsOverlay$ | async,\n 'layout-slim': mngCommons.menuModeIsSlim$ | async,\n 'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,\n 'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),\n 'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,\n 'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,\n 'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async)\n }\">\n <div class=\"layout-main\">\n <ng-container [mngComponent]=\"topbarComponent\"></ng-container>\n\n <ng-container\n *ngIf=\"\n (mainLayoutService.isMobile$ | async) === false &&\n ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))\n \"\n [mngComponent]=\"menuComponent\">\n </ng-container>\n\n <div class=\"layout-main-content\">\n <router-outlet></router-outlet>\n </div>\n\n <ng-container [mngComponent]=\"footerComponent\"></ng-container>\n </div>\n</div>\n","import {Observable} from 'rxjs';\n\nimport {MngCommonsInitService} from './commons-init.service';\n\nexport function mngCommonsInitializerProvider(mngCommonsInit: MngCommonsInitService): () => Observable<void> {\n return () => mngCommonsInit.initialize();\n}\n","import {Inject, Injectable, Optional} from '@angular/core';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {Observable, combineLatest, mergeMap, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {MngCommonsService} from '../commons.service';\nimport {MngConfigurationService} from '../configuration.service';\nimport {MNG_COMMONS_INITIALIZER_IT} from '../tokens';\n\n@Injectable()\nexport class MngCommonsInitService {\n private isInitialized = false;\n\n constructor(\n private translate: TranslateService,\n private configurationService: MngConfigurationService,\n private mngCommons: MngCommonsService,\n @Inject(MNG_COMMONS_INITIALIZER_IT) @Optional() private readonly commonsInitializers: ReadonlyArray<() => Observable<unknown>>\n ) {}\n\n public initialize(): Observable<void> {\n if (this.isInitialized) {\n return of(void 0);\n }\n\n console.debug(`Initializing @mediusinc/mng-commons.`);\n\n return this.configurationService.loadJsonSources().pipe(\n mergeMap(() => {\n if (this.commonsInitializers) {\n console.debug(`Module initializers for @mediusinc/mng-commons.`);\n return combineLatest(this.commonsInitializers.map(ci => ci())).pipe(map(res => res));\n } else {\n return of(true);\n }\n }),\n map(() => this.mngCommons.reset())\n );\n\n this.isInitialized = true;\n }\n}\n","import {HttpClient} from '@angular/common/http';\n\nimport {Observable, combineLatest, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {MngModuleConfig} from '../../config/models';\nimport {MngConfigurationService} from '../configuration.service';\n\nexport const mngConfigurationServiceProvider = (httpClient: HttpClient, moduleConfig: MngModuleConfig): MngConfigurationService => {\n const service = MngConfigurationService.init(httpClient);\n if (moduleConfig?.configuration?.projectEnvironment) {\n service.addEnvironmentSource(moduleConfig.configuration.projectEnvironment);\n }\n return service;\n};\n\nexport function mngConfigJsonAppInitializerProvider(configService: MngConfigurationService, moduleConfig: MngModuleConfig): () => Observable<boolean> {\n return () => {\n if (moduleConfig?.configuration?.skipJsonSourceInit) {\n return of(false);\n } else {\n const jsonSource = moduleConfig?.configuration?.jsonSource;\n if (!jsonSource) {\n return configService.addJsonSource();\n } else if (Array.isArray(jsonSource)) {\n return combineLatest(jsonSource.map(source => configService.addJsonSource(source))).pipe(map(sourcesRes => sourcesRes.every(s => s)));\n } else {\n return configService.addJsonSource(jsonSource);\n }\n }\n };\n}\n","import {FormlyFieldConfig} from '@ngx-formly/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {Observable} from 'rxjs';\n\nimport {\n MngFormlyFieldAutocompleteComponent,\n MngFormlyFieldDropdownComponent,\n MngFormlyFieldFieldsetComponent,\n MngFormlyFieldInputComponent,\n MngFormlyFieldLabelComponent,\n MngFormlyFieldLookupDialogComponent,\n MngFormlyFieldTableDialogFormComponent,\n MngFormlyFieldTableDialogMultiselectComponent,\n MngFormlyFieldTabsComponent\n} from '../components/form/formly/fields';\nimport {MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent} from '../components/form/formly/wrappers';\n\nexport const formlyWrappersConfig = [\n {name: 'field', component: MngFormlyFieldWrapperComponent},\n {name: 'field-table', component: MngFormlyTableWrapperComponent}\n];\n\nexport const formlyTypesConfig: any[] = [\n {\n name: 'label',\n component: MngFormlyFieldLabelComponent,\n wrappers: ['field']\n },\n {\n name: 'input',\n component: MngFormlyFieldInputComponent,\n wrappers: ['field']\n },\n {name: 'string', extends: 'input'},\n {\n name: 'number',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'number'\n }\n }\n },\n {\n name: 'integer',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'number'\n }\n }\n },\n {\n name: 'textarea',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'textarea'\n }\n }\n },\n {\n name: 'switch',\n component: MngFormlyFieldInputComponent,\n defaultOptions: {\n templateOptions: {\n type: 'switch'\n }\n }\n },\n {\n name: 'radio',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'radio'\n }\n }\n },\n {\n name: 'datepicker',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'datepicker'\n }\n }\n },\n {\n name: 'mask',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'mask'\n }\n }\n },\n {\n name: 'dropdown',\n component: MngFormlyFieldDropdownComponent,\n wrappers: ['field']\n },\n {name: 'enum', extends: 'dropdown'},\n {\n name: 'autocomplete',\n component: MngFormlyFieldAutocompleteComponent,\n wrappers: ['field']\n },\n {\n name: 'dialog',\n component: MngFormlyFieldLookupDialogComponent,\n wrappers: ['field']\n },\n {\n name: 'table-dialog-multiselect',\n component: MngFormlyFieldTableDialogMultiselectComponent,\n wrappers: ['field-table']\n },\n {\n name: 'table-dialog-form',\n component: MngFormlyFieldTableDialogFormComponent,\n wrappers: ['field-table']\n },\n {\n name: 'tabs',\n component: MngFormlyFieldTabsComponent,\n wrappers: []\n },\n {\n name: 'fieldset',\n component: MngFormlyFieldFieldsetComponent,\n wrappers: []\n }\n];\n\nexport function getRequiredValidationMessage(translate: TranslateService): (error: any, field: FormlyFieldConfig) => Observable<string> {\n return (error: any, field: FormlyFieldConfig) => {\n const fieldLabel = field.templateOptions?.label || 'field';\n const fieldName = translate.instant(fieldLabel);\n return translate.instant('mngEditor.validation.required', {field: fieldName});\n };\n}\n\nexport function getMinLengthValidationMessage(translate: TranslateService): (error: any, field: FormlyFieldConfig) => Observable<string> | undefined {\n return (error: any, field: FormlyFieldConfig) => {\n const fieldLabel = field.templateOptions?.label || 'field';\n const fieldName = translate.instant(fieldLabel);\n return translate.instant('mngEditor.validation.minLength', {field: fieldName, min: field.templateOptions?.min});\n };\n}\n\nexport function getMaxLengthValidationMessage(translate: TranslateService): (error: any, field: FormlyFieldConfig) => Observable<string> | undefined {\n return (error: any, field: FormlyFieldConfig) => {\n const fieldLabel = field.templateOptions?.label || 'field';\n const fieldName = translate.instant(fieldLabel);\n return translate.instant('mngEditor.validation.maxLength', {field: fieldName, max: field.templateOptions?.max});\n };\n}\n\nexport function getTextPatternValidationMessage(translate: TranslateService): (error: any, field: FormlyFieldConfig) => Observable<string> | undefined {\n return (error: any, field: FormlyFieldConfig) => {\n const fieldLabel = field.templateOptions?.label || 'field';\n const fieldName = translate.instant(fieldLabel);\n return translate.instant('mngEditor.validation.pattern', {field: fieldName, pattern: field.templateOptions?.pattern});\n };\n}\n\nexport function getEmailValidationMessage(translate: TranslateService): (error: any, field: FormlyFieldConfig) => Observable<string> | undefined {\n return (error: any, field: FormlyFieldConfig) => {\n const fieldLabel = field.templateOptions?.label || 'field';\n const fieldName = translate.instant(fieldLabel);\n return translate.instant('mngEditor.validation.email', {field: fieldName});\n };\n}\n\nexport const getFormlyValidationMessages = (translate: TranslateService): any[] => {\n return [\n {name: 'required', message: getRequiredValidationMessage(translate)},\n {name: 'minlength', message: getMinLengthValidationMessage(translate)},\n {name: 'maxlength', message: getMaxLengthValidationMessage(translate)},\n {name: 'pattern', message: getTextPatternValidationMessage(translate)},\n {name: 'email', message: getEmailValidationMessage(translate)}\n ];\n};\n","import {ConfigOption} from '@ngx-formly/core';\nimport {TranslateService} from '@ngx-translate/core';\n\nimport {formlyTypesConfig, formlyWrappersConfig, getFormlyValidationMessages} from '../../config';\nimport {MngModuleConfig} from '../../config/models';\n\nexport function mngFormlyConfigProvider(translate: TranslateService, moduleConfig: MngModuleConfig = {}): ConfigOption {\n const merge = moduleConfig.formly?.merge ?? true;\n\n let types = formlyTypesConfig;\n if (moduleConfig.formly?.types) {\n if (!merge) {\n types = [];\n }\n types = [...types, ...moduleConfig.formly.types];\n }\n\n let wrappers = formlyWrappersConfig;\n if (moduleConfig.formly?.wrappers) {\n if (!merge) {\n wrappers = [];\n }\n wrappers = [...wrappers, ...moduleConfig.formly.wrappers];\n }\n\n let validationMessages = getFormlyValidationMessages(translate);\n if (typeof moduleConfig.formly?.getValidationMessages === 'function') {\n if (!merge) {\n validationMessages = [];\n }\n validationMessages = [...validationMessages, ...moduleConfig.formly.getValidationMessages(translate)];\n }\n\n return {\n types: types,\n wrappers: wrappers,\n validationMessages: validationMessages\n };\n}\n","import {CommonModule} from '@angular/common';\nimport {HttpClient, HttpClientModule} from '@angular/common/http';\nimport {APP_INITIALIZER, ModuleWithProviders, NgModule} from '@angular/core';\nimport {ReactiveFormsModule} from '@angular/forms';\nimport {RouterModule} from '@angular/router';\n\nimport {FORMLY_CONFIG, FormlyModule} from '@ngx-formly/core';\nimport {TranslateModule, TranslateService} from '@ngx-translate/core';\nimport {ConfirmationService, MessageService} from 'primeng/api';\nimport {AutoCompleteModule} from 'primeng/autocomplete';\nimport {BreadcrumbModule} from 'primeng/breadcrumb';\nimport {ButtonModule} from 'primeng/button';\nimport {CalendarModule} from 'primeng/calendar';\nimport {CardModule} from 'primeng/card';\nimport {CheckboxModule} from 'primeng/checkbox';\nimport {ChipModule} from 'primeng/chip';\nimport {ConfirmDialogModule} from 'primeng/confirmdialog';\nimport {ConfirmPopupModule} from 'primeng/confirmpopup';\nimport {DialogModule} from 'primeng/dialog';\nimport {DropdownModule} from 'primeng/dropdown';\nimport {DialogService, DynamicDialogModule} from 'primeng/dynamicdialog';\nimport {FieldsetModule} from 'primeng/fieldset';\nimport {FileUploadModule} from 'primeng/fileupload';\nimport {InputMaskModule} from 'primeng/inputmask';\nimport {InputNumberModule} from 'primeng/inputnumber';\nimport {InputSwitchModule} from 'primeng/inputswitch';\nimport {InputTextModule} from 'primeng/inputtext';\nimport {InputTextareaModule} from 'primeng/inputtextarea';\nimport {MessagesModule} from 'primeng/messages';\nimport {MultiSelectModule} from 'primeng/multiselect';\nimport {PaginatorModule} from 'primeng/paginator';\nimport {ProgressSpinnerModule} from 'primeng/progressspinner';\nimport {RadioButtonModule} from 'primeng/radiobutton';\nimport {RippleModule} from 'primeng/ripple';\nimport {SelectButtonModule} from 'primeng/selectbutton';\nimport {SkeletonModule} from 'primeng/skeleton';\nimport {TableModule} from 'primeng/table';\nimport {TabViewModule} from 'primeng/tabview';\nimport {TagModule} from 'primeng/tag';\nimport {ToastModule} from 'primeng/toast';\nimport {ToggleButtonModule} from 'primeng/togglebutton';\nimport {ToolbarModule} from 'primeng/toolbar';\nimport {TooltipModule} from 'primeng/tooltip';\n\nimport {ObjectSerializer} from './api/utils';\nimport {MngActionComponent, MngActionEditorComponent, MngActionRouteComponent} from './components/action';\nimport {MngAutocompleteComponent, MngDropdownComponent, MngFormEditorComponent} from './components/form';\nimport {\n MngFormlyFieldAutocompleteComponent,\n MngFormlyFieldDropdownComponent,\n MngFormlyFieldFieldsetComponent,\n MngFormlyFieldInputComponent,\n MngFormlyFieldLabelComponent,\n MngFormlyFieldLookupDialogComponent,\n MngFormlyFieldTableDialogFormComponent,\n MngFormlyFieldTableDialogMultiselectComponent,\n MngFormlyFieldTabsComponent\n} from './components/form/formly/fields';\nimport {MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent} from './components/form/formly/wrappers';\nimport {MngBreadcrumbComponent, MngFooterComponent, MngMainLayoutComponent, MngMenuComponent, MngMenuItemComponent, MngTopbarComponent} from './components/layout';\nimport {MngMainLayoutComponentService} from './components/layout/services';\nimport {MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableviewComponent, MngTableviewRouteComponent} from './components/tableview';\nimport {MngModuleConfig} from './config/models';\nimport {MngComponentDirective, MngTemplateDirective} from './directives';\nimport {JsonPathPipe, MngBooleanPipe, MngEnumPipe, MngI18nPropertyPipe, MngLinkFormatterPipe} from './pipes';\nimport {\n DefaultMngErrorMapperService,\n MngActionExecutorService,\n MngCommonsService,\n MngConfigurationService,\n MngErrorMapperService,\n MngNavigationService,\n MngViewContainerComponentService\n} from './services';\nimport {MngCommonsInitService, mngCommonsInitializerProvider} from './services/internal';\nimport {mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider} from './services/providers';\nimport {ACTION_EDITOR_DIALOG_COMPONENT_SETTING, MNG_MODULE_CONFIG_IT} from './services/tokens';\n\n// primeng modules\nexport const primeNgModules = [\n AutoCompleteModule,\n BreadcrumbModule,\n ButtonModule,\n CalendarModule,\n CardModule,\n CheckboxModule,\n ChipModule,\n ConfirmDialogModule,\n ConfirmPopupModule,\n DialogModule,\n DynamicDialogModule,\n DropdownModule,\n FileUploadModule,\n InputNumberModule,\n InputMaskModule,\n InputSwitchModule,\n InputTextModule,\n InputTextareaModule,\n PaginatorModule,\n RadioButtonModule,\n RippleModule,\n SelectButtonModule,\n TableModule,\n TagModule,\n ToastModule,\n ToggleButtonModule,\n ToolbarModule,\n TooltipModule,\n MessagesModule,\n ProgressSpinnerModule,\n TabViewModule,\n FieldsetModule,\n MultiSelectModule,\n SkeletonModule\n];\n\nconst declarations = [\n // directives\n MngComponentDirective,\n MngTemplateDirective,\n\n // pipes\n JsonPathPipe,\n MngEnumPipe,\n MngBooleanPipe,\n MngI18nPropertyPipe,\n MngLinkFormatterPipe,\n\n // layout components\n MngBreadcrumbComponent,\n MngFooterComponent,\n MngMainLayoutComponent,\n MngMenuComponent,\n MngMenuItemComponent,\n MngTopbarComponent,\n\n // mng fields\n MngAutocompleteComponent,\n MngDropdownComponent,\n\n // formly wrappers\n MngFormlyFieldWrapperComponent,\n MngFormlyTableWrapperComponent,\n\n // formly fields\n MngFormlyFieldInputComponent,\n MngFormlyFieldLabelComponent,\n MngFormlyFieldDropdownComponent,\n MngFormlyFieldAutocompleteComponent,\n MngFormlyFieldLookupDialogComponent,\n MngFormlyFieldTableDialogMultiselectComponent,\n MngFormlyFieldTableDialogFormComponent,\n MngFormlyFieldTabsComponent,\n MngFormlyFieldFieldsetComponent,\n\n // table components\n MngTableComponent,\n MngTableviewComponent,\n MngTableColumnValueComponent,\n MngTableColumnFilterComponent,\n MngTableviewRouteComponent,\n\n // editor components\n MngFormEditorComponent,\n MngActionComponent,\n MngActionEditorComponent,\n MngActionRouteComponent\n];\n\n@NgModule({\n imports: [\n // angular modules\n CommonModule,\n RouterModule,\n HttpClientModule,\n ReactiveFormsModule,\n\n // other modules\n TranslateModule.forChild({\n extend: true\n }),\n FormlyModule.forChild(),\n ...primeNgModules\n ],\n declarations: [...declarations],\n exports: [...primeNgModules, ...declarations]\n})\nexport class MngCommonsModule {\n static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule> {\n return {\n ngModule: MngCommonsModule,\n providers: [\n // primeng services\n DialogService,\n MessageService,\n ConfirmationService,\n\n MngCommonsInitService,\n MngActionExecutorService,\n MngNavigationService,\n MngCommonsService,\n MngLinkFormatterPipe,\n\n // component service\n MngMainLayoutComponentService,\n MngViewContainerComponentService,\n\n {\n provide: MNG_MODULE_CONFIG_IT,\n useValue: config\n },\n {\n provide: ObjectSerializer,\n useFactory: () => ObjectSerializer.get()\n },\n {\n provide: MngConfigurationService,\n useFactory: mngConfigurationServiceProvider,\n deps: [HttpClient, MNG_MODULE_CONFIG_IT]\n },\n {\n provide: APP_INITIALIZER,\n useFactory: mngConfigJsonAppInitializerProvider,\n deps: [MngConfigurationService, MNG_MODULE_CONFIG_IT],\n multi: true\n },\n {\n provide: APP_INITIALIZER,\n useFactory: mngCommonsInitializerProvider,\n deps: [MngCommonsInitService],\n multi: true\n },\n {\n provide: FORMLY_CONFIG,\n multi: true,\n useFactory: mngFormlyConfigProvider,\n deps: [TranslateService, MNG_MODULE_CONFIG_IT]\n },\n {\n provide: ACTION_EDITOR_DIALOG_COMPONENT_SETTING,\n useValue: MngActionEditorComponent\n },\n {\n provide: MngErrorMapperService,\n useClass: DefaultMngErrorMapperService\n }\n ]\n };\n }\n}\n","import {HttpClient} from '@angular/common/http';\n\nimport {ClassType} from '../../types';\nimport {MediusQueryParam} from '../models';\nimport {ObjectSerializer} from '../utils';\n\nexport abstract class AMngBaseApiService {\n protected readonly objectSerializer: ObjectSerializer = ObjectSerializer.get();\n\n protected constructor(protected http: HttpClient) {}\n\n protected abstract getBasePath(): string;\n\n protected abstract getServiceBasePath(): string | null;\n\n protected getUrl(...pathSegments: Array<string>): string {\n let baseUrl = this.getBasePath();\n if (baseUrl.endsWith('/')) {\n baseUrl = baseUrl.substring(0, baseUrl.length - 1);\n }\n const serviceBasePath = this.getServiceBasePath();\n let path = [serviceBasePath, ...pathSegments].filter(s => s && s.length).join('/');\n // omit first and last '/'\n if (path.startsWith('/')) {\n path = path.substring(1);\n }\n if (path.endsWith('/')) {\n path = path.substring(0, path.length - 1);\n }\n // replace any double '//' from path that could come from joining paths\n path = path.replace('//', '/');\n return `${baseUrl}/${path}`;\n }\n\n protected serializeQueryParam(queryParam: MediusQueryParam, type = 'QueryParam') {\n return this.objectSerializer.serialize(queryParam, type);\n }\n\n protected deserializeQueryResult<QR>(item: any, qrType: ClassType<QR>): QR {\n return this.deserializeClass(item, qrType);\n }\n\n protected deserializeClass<C>(item: any, type: ClassType<C>): C {\n return this.objectSerializer.deserializeClass(item, type);\n }\n\n protected deserializeClassArray<C>(item: any, type: ClassType<C>): Array<C> {\n return this.objectSerializer.deserializeClassArray(item, type);\n }\n\n protected serializeClass<C>(item: C, type: ClassType<C>): any {\n return this.objectSerializer.serializeClass(item, type);\n }\n\n protected serializeClassArray<C>(item: Array<C>, type: ClassType<C>): any {\n return this.objectSerializer.serializeClassArray(item, type);\n }\n}\n\nexport abstract class AMngApiService<T> extends AMngBaseApiService {\n protected constructor(protected type: ClassType<T>, http: HttpClient) {\n super(http);\n }\n\n protected deserialize(item: any): T {\n return this.deserializeClass(item, this.type);\n }\n\n protected serialize(item: T): any {\n return this.serializeClass(item, this.type);\n }\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\n\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {ClassType} from '../../types';\nimport {MediusQueryParam, MediusQueryResult} from '../models';\nimport {AMngApiService} from './api.abstract.service';\n\nexport abstract class AMngGetAllApiService<T, QRT extends MediusQueryResult<any>> extends AMngApiService<T> {\n protected constructor(type: ClassType<T>, protected queryResultType: ClassType<QRT>, http: HttpClient) {\n super(type, http);\n }\n\n public getAllPost(queryParamBody?: MediusQueryParam, params?: HttpParams): Observable<QRT> {\n const url = this.getUrl(this.getGetAllPostPath());\n return this.http\n .post<any>(url, queryParamBody ? this.serializeQueryParam(queryParamBody) : undefined, {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n params: params\n })\n .pipe(map(res => this.deserializeQueryResult(res, this.queryResultType)));\n }\n\n protected getGetAllPostPath(): string {\n return '/get-all';\n }\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\n\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {ClassType, IdType} from '../../types';\nimport {MediusQueryResult} from '../models';\nimport {AMngGetAllApiService} from './get-all-api.abstract.service';\n\nexport abstract class AMngCrudApiService<T, QRT extends MediusQueryResult<any>> extends AMngGetAllApiService<T, QRT> {\n protected constructor(type: ClassType<T>, queryResultType: ClassType<QRT>, http: HttpClient) {\n super(type, queryResultType, http);\n }\n\n public createPost(item: T, params?: HttpParams): Observable<T> {\n const url = this.getUrl(this.getCreatePostPath(item));\n return this.http\n .post<any>(url, this.serialize(item), {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n params: params\n })\n .pipe(map(res => this.deserialize(res)));\n }\n\n public getByIdGet(id: IdType, params?: HttpParams): Observable<T> {\n const url = this.getUrl(this.getGetByIdGetPath(id));\n return this.http\n .get<any>(url, {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n params: params\n })\n .pipe(map(res => this.deserialize(res)));\n }\n\n public updatePut(id: IdType, item: T, params?: HttpParams): Observable<T> {\n const url = this.getUrl(this.getUpdatePutPath(id, item));\n return this.http\n .put<any>(url, this.serialize(item), {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n params: params\n })\n .pipe(map(res => this.deserialize(res)));\n }\n\n public removeDelete(id: IdType, item?: T, params?: HttpParams): Observable<any> {\n const url = this.getUrl(this.getRemoveDeletePath(id, item));\n return this.http\n .request<any>('delete', url, {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n body: item ? this.serialize(item) : undefined,\n params: params\n })\n .pipe(map(res => this.deserialize(res)));\n }\n\n protected getCreatePostPath(item: T): string {\n return '';\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected getUpdatePutPath(id: IdType, item: T): string {\n return `/${id}`;\n }\n\n protected getGetByIdGetPath(id: IdType): string {\n return `/${id}`;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected getRemoveDeletePath(id: IdType, item?: T) {\n return `/${id}`;\n }\n}\n","export class RouteUtil {\n public static removeEmptyPathSegments(path: Array<string>) {\n const filteredPath = path.filter(ps => typeof ps === 'string' && ps.length > 0);\n return filteredPath.length > 0 ? filteredPath : [''];\n }\n\n public static appendPathToBasePath(basePath: Array<string>, path: Array<string>) {\n if (path.length > 0) {\n if (path[0].startsWith('/')) {\n return path;\n } else if (path[0].startsWith('../')) {\n // TODO: process multi upper folder\n throw new Error('Not implemented');\n } else {\n return RouteUtil.removeEmptyPathSegments([...basePath, ...path]);\n }\n } else {\n return basePath;\n }\n }\n}\n","import {Type} from '@angular/core';\nimport {Data, LoadChildren, Route, Routes} from '@angular/router';\n\nimport {MngActionRouteComponent} from '../components/action';\nimport {MngMainLayoutComponent} from '../components/layout';\nimport {MngTableviewRouteComponent} from '../components/tableview';\nimport {ITableviewDataProvider} from '../data-providers';\nimport {ActionDescriptor, TableviewDescriptor} from '../descriptors';\nimport {MngMenuItem} from '../models';\nimport {RouteUtil} from '../utils/route.util';\nimport {BreadcrumbType, MngRouterData} from './models';\n\nexport class RoutesBuilder {\n private readonly layoutRoute?: RouteBuilder;\n private routes: Array<RouteBuilder> = [];\n private currentRoute?: RouteBuilder;\n\n private constructor(layoutRoute?: RouteBuilder) {\n this.layoutRoute = layoutRoute?.withRoot(this);\n this.currentRoute = layoutRoute;\n }\n\n public static create(): RoutesBuilder {\n return new RoutesBuilder();\n }\n\n public static createWithLayout(\n layoutComponent = MngMainLayoutComponent,\n topbarComponent?: Type<any>,\n breadcrumbComponent?: Type<any>,\n menuComponent?: Type<any>,\n footerComponent?: Type<any>\n ): RoutesBuilder {\n const layoutRoute = RouteBuilder.createLayoutRoute('', layoutComponent, topbarComponent, breadcrumbComponent, menuComponent, footerComponent);\n return new RoutesBuilder(layoutRoute);\n }\n\n public addAngularRoute(route: Route): this {\n return this.addRouteBuilder(RouteBuilder.createFromRoute(route));\n }\n\n public addRouteRedirect(path: string, redirectTo: string, pathMatch: 'full' | 'prefix' = 'prefix'): this {\n return this.addRouteBuilder(RouteBuilder.createRedirect(path, redirectTo, pathMatch));\n }\n\n public addLazyRoute(path: string, loadChildren: LoadChildren, canLoad?: Array<any>): this {\n return this.addRouteBuilder(RouteBuilder.createLazyRoute(path, loadChildren, canLoad));\n }\n\n public addRoute(path: string, component: Type<any>): this {\n return this.addRouteBuilder(RouteBuilder.create(path, component));\n }\n\n public addTableviewRoutes<T, S>(\n path: string,\n descriptor: TableviewDescriptor<T>,\n tableviewDataProvider: ITableviewDataProvider<T, S>,\n actions?: Array<ActionDescriptor<T>>,\n hasDetails = true,\n hasEdit = true,\n hasAdd = true\n ): this {\n return this.addRouteBuilder(RouteBuilder.createTableviewRoutes(path, descriptor, tableviewDataProvider, actions, hasDetails, hasEdit, hasAdd));\n }\n\n public addTableviewRoutesFromComponent(path: string, component: Type<any>, hasDetails = true, hasEdit = true, hasAdd = true): this {\n return this.addRouteBuilder(RouteBuilder.createTableviewRoutesFromComponent(path, component, hasDetails, hasEdit, hasAdd));\n }\n\n public addRouteBuilder(routeBuilder: RouteBuilder): this {\n this.currentRoute = routeBuilder.withRoot(this);\n this.routes.push(routeBuilder);\n return this;\n }\n\n public toRoute(): RouteBuilder {\n if (!this.currentRoute) {\n throw new Error('No routes were added!');\n }\n return this.currentRoute;\n }\n\n public buildRoutes(): Routes {\n let angularRoutes: Routes = [];\n for (const route of this.routes) {\n angularRoutes.push(route.buildRoute());\n }\n\n if (this.layoutRoute) {\n const layoutAngularRoute = this.layoutRoute.buildRoute();\n if (angularRoutes.length > 0) {\n layoutAngularRoute.children = angularRoutes;\n }\n angularRoutes = [layoutAngularRoute];\n }\n\n return angularRoutes;\n }\n\n public buildMenu(): Array<MngMenuItem> {\n const menuItems: Array<MngMenuItem> = [];\n for (const route of this.routes) {\n menuItems.push(...route.buildMenu());\n }\n return menuItems.flat();\n }\n}\n\nexport class RouteBuilder {\n private readonly route: Route;\n private routePath: Array<string> = [];\n private root?: RoutesBuilder;\n private parent?: RouteBuilder;\n private children: Array<RouteBuilder> = [];\n private menuItem?: MngMenuItem;\n private menuItemChildren: Array<MngMenuItem> = [];\n\n private breadcrumb?: BreadcrumbType;\n private pageTitle?: string;\n\n private constructor(route: Route) {\n if (!route.data) {\n route.data = {};\n }\n if (!route.data['breadcrumb']) {\n route.data['breadcrumb'] = null;\n }\n this.route = route;\n if (this.route.path && this.route.path.length > 0) {\n this.routePath = [this.route.path];\n }\n }\n\n public static create(path: string, component: Type<any>): RouteBuilder {\n return new RouteBuilder({\n path: path,\n component: component\n });\n }\n\n public static createRedirect(path: string, redirectTo: string, pathMatch: 'full' | 'prefix' = 'prefix'): RouteBuilder {\n return new RouteBuilder({\n path: path,\n redirectTo: redirectTo,\n pathMatch: pathMatch\n });\n }\n\n public static createLazyRoute(path: string, loadChildren: LoadChildren, canLoad?: Array<any>): RouteBuilder {\n const route: Route = {path: path, loadChildren: loadChildren};\n if (canLoad?.length) {\n route.canLoad = canLoad;\n }\n return new RouteBuilder(route);\n }\n\n public static createFromRoute(route: Route): RouteBuilder {\n return new RouteBuilder(route);\n }\n\n public static createLayoutRoute(\n path: string,\n layoutComponent = MngMainLayoutComponent,\n topbarComponent?: Type<any>,\n breadcrumbComponent?: Type<any>,\n menuComponent?: Type<any>,\n footerComponent?: Type<any>\n ): RouteBuilder {\n const layoutRoute = RouteBuilder.create(path, layoutComponent);\n if (topbarComponent || breadcrumbComponent || menuComponent || footerComponent) {\n const dataBuilder = RouteDataBuilder.create();\n if (topbarComponent) {\n dataBuilder.withTopbarComponent(topbarComponent);\n }\n if (breadcrumbComponent) {\n dataBuilder.withBreadcrumbComponent(breadcrumbComponent);\n }\n if (menuComponent) {\n dataBuilder.withMenuComponent(menuComponent);\n }\n if (footerComponent) {\n dataBuilder.withFooterComponent(footerComponent);\n }\n layoutRoute.withDataBuilder(dataBuilder);\n }\n return layoutRoute;\n }\n\n public static createTableviewRoutes<T, S>(\n path: string,\n descriptor: TableviewDescriptor<T>,\n dataProvider: ITableviewDataProvider<T, S>,\n actions?: Array<ActionDescriptor<T>>,\n hasDetails = true,\n hasEdit = true,\n hasAdd = true\n ): RouteBuilder {\n const tableviewRoute = RouteBuilder.createFromRoute({\n data: RouteDataBuilder.create().withTableview(descriptor, dataProvider, actions).build(),\n path: path,\n component: MngTableviewRouteComponent\n });\n RouteBuilder.addActionsSubroutesToTableviewParent(tableviewRoute, hasDetails, hasEdit, hasAdd);\n return tableviewRoute;\n }\n\n public static createTableviewRoutesFromComponent(path: string, component: Type<any>, hasDetails = true, hasEdit = true, hasAdd = true): RouteBuilder {\n const actionCrudRoute = RouteBuilder.create(path, component);\n RouteBuilder.addActionsSubroutesToTableviewParent(actionCrudRoute, hasDetails, hasEdit, hasAdd);\n return actionCrudRoute;\n }\n\n private static addActionsSubroutesToTableviewParent(parentRoute: RouteBuilder, hasDetails: boolean, hasEdit: boolean, hasAdd: boolean) {\n parentRoute.addChild('', MngActionRouteComponent);\n\n if (hasAdd) {\n parentRoute.addChild('add', MngActionRouteComponent);\n }\n if (hasDetails) {\n parentRoute.addChild(':itemId', MngActionRouteComponent);\n }\n if (hasEdit) {\n parentRoute.addChild(':itemId/edit', MngActionRouteComponent);\n }\n }\n\n withRoot(routesBuilder: RoutesBuilder): this {\n this.root = routesBuilder;\n return this;\n }\n\n withParent(parent: RouteBuilder): this {\n this.parent = parent;\n this.routePath = RouteUtil.removeEmptyPathSegments([...this.parent.routePath, this.route.path ?? '']);\n return this;\n }\n\n withBreadcrumb(breadcrumb: BreadcrumbType): this {\n this.breadcrumb = breadcrumb;\n this.route.data!['breadcrumb'] = breadcrumb;\n return this;\n }\n\n withPageTitle(pageTitle: string): this {\n this.pageTitle = pageTitle;\n this.route.data!['pageTitle'] = pageTitle;\n return this;\n }\n\n withRedirectTo(redirectTo: string): this {\n this.route.redirectTo = redirectTo;\n return this;\n }\n\n withPathMatch(pathMatch: 'full' | 'prefix'): this {\n this.route.pathMatch = pathMatch;\n return this;\n }\n\n withTitle(title: string): this {\n this.withPageTitle(title);\n this.withBreadcrumb(title);\n return this;\n }\n\n withCanActivate(diToken: any): this {\n if (!this.route.canActivate) {\n this.route.canActivate = [];\n }\n this.route.canActivate.push(diToken);\n return this;\n }\n\n withCanDeactivate(diToken: any): this {\n if (!this.route.canDeactivate) {\n this.route.canDeactivate = [];\n }\n this.route.canDeactivate.push(diToken);\n return this;\n }\n\n withResolver(diToken: any, name: string): this {\n if (!this.route.resolve) {\n this.route.resolve = {};\n }\n this.route.resolve[name] = diToken;\n return this;\n }\n\n withData(data: any): this {\n this.route.data = data;\n return this;\n }\n\n withDataBuilder(dataBuilder: RouteDataBuilder): this {\n this.route.data = dataBuilder.build();\n return this;\n }\n\n withMngMenuItem(menuItem: MngMenuItem): this {\n this.menuItem = menuItem;\n return this;\n }\n\n withMenuItem(icon?: string, label?: string, routerLink?: Array<string>): this {\n this.menuItem = this.createMenuItem(icon, label, routerLink);\n return this;\n }\n\n withMenuItemChild(label: string, icon?: string, routerLink?: Array<string>): this {\n this.menuItemChildren.push(this.createMenuItem(icon, label, routerLink));\n return this;\n }\n\n withMenuItemChildren(routesBuilder: RoutesBuilder): this {\n const menu = routesBuilder.buildMenu();\n this.adjustMenuRouterLinksFromBuilder(menu);\n this.menuItemChildren.push(...menu);\n return this;\n }\n\n public addChild(path: string, component: Type<any>): RouteBuilder {\n const childRouteBuilder = RouteBuilder.create(path, component);\n this.addChildBuilder(childRouteBuilder);\n return childRouteBuilder;\n }\n\n public addChildBuilder(routeBuilder: RouteBuilder): this {\n routeBuilder.withParent(this);\n if (this.root) {\n routeBuilder.withRoot(this.root);\n }\n this.children.push(routeBuilder);\n return this;\n }\n\n public addTableviewRoutes<T, S>(\n path: string,\n descriptor: TableviewDescriptor<T>,\n tableviewDataProvider: ITableviewDataProvider<T, S>,\n actions?: Array<ActionDescriptor<T>>,\n hasDetails = true,\n hasEdit = true,\n hasAdd = true\n ): RouteBuilder {\n const routeBuilder = RouteBuilder.createTableviewRoutes(path, descriptor, tableviewDataProvider, actions, hasDetails, hasEdit, hasAdd);\n this.addChildBuilder(routeBuilder);\n return routeBuilder;\n }\n\n public addTableviewRoutesFromComponent(path: string, component: Type<any>, hasDetails = true, hasEdit = true, hasAdd = true): RouteBuilder {\n const routeBuilder = RouteBuilder.createTableviewRoutesFromComponent(path, component, hasDetails, hasEdit, hasAdd);\n this.addChildBuilder(routeBuilder);\n return routeBuilder;\n }\n\n public toParent(): RouteBuilder {\n if (!this.parent) {\n throw new Error('Parent was not provided.');\n }\n return this.parent;\n }\n\n public toRoot(): RoutesBuilder {\n if (!this.root) {\n throw new Error('Root was not provided.');\n }\n return this.root;\n }\n\n public finish(): RoutesBuilder {\n return this.toRoot();\n }\n\n public buildRoute(): Route {\n const angularRoute: Route = {\n ...this.route\n };\n\n if ((this.route.children?.length ?? 0) > 0 || this.children.length > 0) {\n // route has children\n angularRoute.children = [];\n if (this.route.children?.length) {\n angularRoute.children.push(...this.route.children);\n }\n if (this.children.length) {\n for (const childRoute of this.children) {\n angularRoute.children.push(childRoute.buildRoute());\n }\n }\n }\n\n if (this.route.canActivate) {\n angularRoute.canActivate = [...this.route.canActivate];\n }\n if (this.route.canActivateChild) {\n angularRoute.canActivateChild = [...this.route.canActivateChild];\n }\n if (this.route.canLoad) {\n angularRoute.canLoad = [...this.route.canLoad];\n }\n if (this.route.canDeactivate) {\n angularRoute.canDeactivate = [...this.route.canDeactivate];\n }\n if (this.route.resolve) {\n angularRoute.resolve = {...this.route.resolve};\n }\n\n return angularRoute;\n }\n\n public buildMenu(): Array<MngMenuItem> {\n const menuItemBuild: MngMenuItem | null = this.menuItem ? {...this.menuItem} : null;\n const routeChildrenMenuItems: Array<MngMenuItem> = this.children.flatMap(child => child.buildMenu());\n const menuItemChildren: Array<MngMenuItem> = [];\n const menuItemChildrenBuild: Array<MngMenuItem> = [];\n\n if (menuItemBuild?.items) {\n menuItemChildrenBuild.push(...menuItemBuild.items);\n }\n\n for (const menuItemChild of this.menuItemChildren) {\n const finalMenuItemChild: MngMenuItem = {...menuItemChild};\n if (!finalMenuItemChild.routerLink) {\n finalMenuItemChild.routerLink = this.routePath;\n }\n if (typeof finalMenuItemChild.routerLink === 'string') {\n finalMenuItemChild.routerLink = [finalMenuItemChild.routerLink];\n }\n finalMenuItemChild.routerLink = RouteUtil.removeEmptyPathSegments(finalMenuItemChild.routerLink);\n menuItemChildren.push(finalMenuItemChild);\n }\n\n menuItemChildrenBuild.push(...menuItemChildren, ...routeChildrenMenuItems);\n\n if (!menuItemBuild) {\n return menuItemChildrenBuild;\n }\n\n menuItemBuild.label = menuItemBuild.label ?? this.pageTitle;\n if (typeof menuItemBuild.routerLink === 'string') {\n menuItemBuild.routerLink = [menuItemBuild.routerLink];\n }\n menuItemBuild.routerLink = RouteUtil.removeEmptyPathSegments(menuItemBuild.routerLink ?? this.routePath);\n if (menuItemChildrenBuild.length > 0) {\n menuItemBuild.items = menuItemChildrenBuild;\n }\n\n if (!menuItemBuild.guards) {\n const guards = this.findMenuItemGuards();\n if (guards.length > 0) {\n menuItemBuild.guards = guards;\n }\n }\n\n return [menuItemBuild];\n }\n\n private createMenuItem(icon?: string, label?: string, routerLink?: Array<string>) {\n const menuItem: MngMenuItem = {};\n if (icon) {\n menuItem.icon = icon;\n }\n if (label) {\n menuItem.label = label;\n }\n if (routerLink) {\n menuItem.routerLink = routerLink;\n }\n return menuItem;\n }\n\n private adjustMenuRouterLinksFromBuilder(menuItems: Array<MngMenuItem>) {\n for (const menuItem of menuItems) {\n if (menuItem.routerLink) {\n menuItem.routerLink = RouteUtil.appendPathToBasePath(this.routePath, typeof menuItem.routerLink === 'string' ? [menuItem.routerLink] : menuItem.routerLink);\n }\n if (Array.isArray(menuItem.items)) {\n this.adjustMenuRouterLinksFromBuilder(menuItem.items);\n }\n }\n }\n\n private findMenuItemGuards(): Array<any> {\n const guards: Array<any> = [];\n if (this.route.canActivate?.length) {\n guards.push(...this.route.canActivate);\n }\n if (this.parent) {\n // Check for parent guards that should be included in decision to hide menu item!\n // Some parent routes might have guards, but no menu items, so this guards must be taken into account here,\n // because there is no parent menu item to hide.\n this.parent.findMenuItemGuards().forEach(g => {\n if (guards.indexOf(g) < 0) {\n guards.push(g);\n }\n });\n }\n return guards;\n }\n}\n\nexport class RouteDataBuilder {\n private data: MngRouterData;\n\n constructor(init?: Data) {\n this.data = init ?? {};\n if (!this.data.breadcrumb) {\n this.data.breadcrumb = null;\n }\n }\n\n public static create(data?: Data) {\n return new RouteDataBuilder(data);\n }\n\n withBreadcrumb(breadcrumb: BreadcrumbType): this {\n this.data.breadcrumb = breadcrumb;\n return this;\n }\n\n withPageTitle(pageTitle: string): this {\n this.data.pageTitle = pageTitle;\n return this;\n }\n\n withTableview(descriptor: TableviewDescriptor<any>, dataProvider: ITableviewDataProvider<any, any>, actions?: Array<ActionDescriptor<any>>): this {\n this.data.tableview = {\n descriptor: descriptor,\n dataProvider: dataProvider\n };\n if (actions) {\n this.data.tableview.actions = actions;\n }\n return this;\n }\n\n withTopbarComponent(component: Type<any>): this {\n this.data.topbarComponent = component;\n return this;\n }\n\n withBreadcrumbComponent(component: Type<any>): this {\n this.data.breadcrumbComponent = component;\n return this;\n }\n\n withMenuComponent(component: Type<any>): this {\n this.data.menuComponent = component;\n return this;\n }\n\n withFooterComponent(component: Type<any>): this {\n this.data.footerComponent = component;\n return this;\n }\n\n build(): MngRouterData {\n return this.data;\n }\n}\n","/*\n * Public API Surface of mng-commons\n */\n\n// module\nexport * from './lib/mng-commons.module';\n\n// services\nexport * from './lib/api/services';\nexport * from './lib/components/layout/services';\nexport * from './lib/services';\nexport * from './lib/services/providers';\n\n// injection tokens\nexport * from './lib/services/tokens';\n\n// utils\nexport * from './lib/api/utils';\nexport * from './lib/utils';\n\n// components\nexport * from './lib/components/action';\nexport * from './lib/components/form';\nexport * from './lib/components/form/formly/fields';\nexport * from './lib/components/form/formly/wrappers';\nexport * from './lib/components/layout';\nexport * from './lib/components/tableview';\n\n// directives\nexport * from './lib/directives';\n\n// pipes\nexport * from './lib/pipes';\n\n// models&other\nexport * from './lib/api/models';\nexport * from './lib/components/action/models';\nexport * from './lib/components/form/models';\nexport * from './lib/components/tableview/models';\nexport * from './lib/config/models';\nexport * from './lib/config';\nexport * from './lib/data-providers';\nexport * from './lib/descriptors';\nexport * from './lib/models';\nexport * from './lib/router';\nexport * from './lib/router/models';\nexport * from './lib/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["mergeMap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MASa,YAAY;IAIrB,YAAY,SAA8B,EAAE,WAAqB;QAC7D,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;KACnC;IAED,IAAW,WAAW;QAClB,OAAO,IAAI,CAAC,YAAY,CAAC;KAC5B;IAED,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;KAC1B;IAEM,eAAe,CAAC,IAAa;QAChC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,OAAO,IAAI,CAAC;KACf;;;MCfQ,2BAAiC,YAAkB;IAM5D,YAAY,SAAuB,EAAE,WAAqB;QACtD,KAAK,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QANxB,WAAM,GAA+C,EAAE,IAAI,UAAU,CAAC,qCAAqC,EAAE,GAAG,CAAC,CAAC;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AO,MAAM,CAAC,IAAW;QAC5B,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;KACrC;IAED,cAAc,CAAC,UAA0B;QACrC,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAClC,OAAO,IAAI,CAAC;KACf;IAED,aAAa,CAAC,SAAiB;QAC3B,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAChC,OAAO,IAAI,CAAC;KACf;IAED,aAAa,CAAC,UAAoC,EAAE,YAA8C,EAAE,OAAsC;QACtI,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG;YAClB,UAAU,EAAE,UAAU;YACtB,YAAY,EAAE,YAAY;SAC7B,CAAC;QACF,IAAI,OAAO,EAAE;YACT,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;SACzC;QACD,OAAO,IAAI,CAAC;KACf;IAED,mBAAmB,CAAC,SAAoB;QACpC,IAAI,CAAC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;QACtC,OAAO,IAAI,CAAC;KACf;IAED,uBAAuB,CAAC,SAAoB;QACxC,IAAI,CAAC,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC;QAC1C,OAAO,IAAI,CAAC;KACf;IAED,iBAAiB,CAAC,SAAoB;QAClC,IAAI,CAAC,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC;QACpC,OAAO,IAAI,CAAC;KACf;IAED,mBAAmB,CAAC,SAAoB;QACpC,IAAI,CAAC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;QACtC,OAAO,IAAI,CAAC;KACf;IAED,KAAK;QACD,OAAO,IAAI,CAAC,IAAI,CAAC;KACpB;;;AC/iBL;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"mediusinc-mng-commons.mjs","sources":["../../src/lib/utils/action-data-provider.util.ts","../../src/lib/data-providers/base.data-provider.ts","../../src/lib/data-providers/editor.data-provider.ts","../../src/lib/data-providers/lookup.data-provider.ts","../../src/lib/api/models/filter-match-type.model.ts","../../src/lib/api/models/filter-param.model.ts","../../src/lib/api/models/query-mode.model.ts","../../src/lib/api/models/query-param.model.ts","../../src/lib/api/models/query-result.model.ts","../../src/lib/api/models/builders/query-param.builder.ts","../../src/lib/api/models/mappers.ts","../../src/lib/data-providers/table.data-provider.ts","../../src/lib/data-providers/tableview.data-provider.ts","../../src/lib/descriptors/action.descriptor.ts","../../src/lib/descriptors/filter.descriptor.ts","../../src/lib/descriptors/column.descriptor.ts","../../src/lib/descriptors/editor.descriptor.ts","../../src/lib/components/form/models/form-editor.event.ts","../../src/lib/descriptors/field.descriptor.ts","../../src/lib/descriptors/field-validation.descriptor.ts","../../src/lib/descriptors/model.descriptor.ts","../../src/lib/descriptors/table.descriptor.ts","../../src/lib/descriptors/tableview.descriptor.ts","../../src/lib/utils/editor-formly.util.ts","../../src/lib/utils/enum.util.ts","../../src/lib/types/type.decorator.ts","../../src/lib/utils/type.util.ts","../../src/lib/utils/i18n.util.ts","../../src/lib/utils/model.util.ts","../../src/lib/utils/notification.util.ts","../../src/lib/api/utils/object-serializer.util.ts","../../src/lib/api/utils/medius-rest.util.ts","../../src/lib/components/action/models/action-execution.model.ts","../../src/lib/services/tokens/browser-storage.token.ts","../../src/lib/services/tokens/commons-init.token.ts","../../src/lib/services/tokens/default-setting.token.ts","../../src/lib/services/tokens/module-config.token.ts","../../src/lib/services/navigation.service.ts","../../src/lib/services/error-mapper.service.ts","../../src/lib/pipes/boolean.pipe.ts","../../src/lib/pipes/enum.pipe.ts","../../src/lib/pipes/i18n-property.pipe.ts","../../src/lib/pipes/link-formatter.pipe.ts","../../src/lib/pipes/json-path.pipe.ts","../../src/lib/services/action-executor.service.ts","../../src/lib/services/configuration.service.ts","../../src/lib/services/commons.service.ts","../../src/lib/services/view-container.component.service.ts","../../src/lib/components/action/action.component.ts","../../src/lib/components/action/action.component.html","../../src/lib/components/action/route/action-route.component.ts","../../src/lib/components/action/route/action-route.component.html","../../src/lib/directives/component.directive.ts","../../src/lib/directives/template.directive.ts","../../src/lib/components/form/editor/form-editor.component.ts","../../src/lib/components/form/editor/form-editor.component.html","../../src/lib/components/form/autocomplete/autocomplete.component.ts","../../src/lib/components/form/autocomplete/autocomplete.component.html","../../src/lib/components/form/dropdown/dropdown.component.ts","../../src/lib/components/form/dropdown/dropdown.component.html","../../src/lib/components/action/editor/action-editor.component.ts","../../src/lib/components/action/editor/action-editor.component.html","../../src/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.ts","../../src/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.html","../../src/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.ts","../../src/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.html","../../src/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.ts","../../src/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.html","../../src/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.ts","../../src/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.html","../../src/lib/utils/styles.util.ts","../../src/lib/components/tableview/models/table.event.ts","../../src/lib/components/tableview/table/column-filter/column-filter.component.ts","../../src/lib/components/tableview/table/column-filter/column-filter.component.html","../../src/lib/components/tableview/table/column-value/column-value.component.ts","../../src/lib/components/tableview/table/column-value/column-value.component.html","../../src/lib/components/tableview/table/table.component.ts","../../src/lib/components/tableview/table/table.component.html","../../src/lib/components/tableview/tableview.component.ts","../../src/lib/components/tableview/tableview.component.html","../../src/lib/components/tableview/route/tableview-route.abstract.component.ts","../../src/lib/components/tableview/route/tableview-route.component.ts","../../templates/tableview-route.component.html","../../src/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.ts","../../src/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.html","../../src/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.ts","../../src/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.html","../../src/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.ts","../../src/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.html","../../src/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.ts","../../src/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.html","../../src/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.ts","../../src/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.html","../../src/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.ts","../../src/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.html","../../src/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.ts","../../src/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.html","../../src/lib/components/layout/breadcrumb.component.ts","../../src/lib/components/layout/breadcrumb.component.html","../../src/lib/components/layout/footer.component.ts","../../src/lib/components/layout/footer.component.html","../../src/lib/components/layout/services/main-layout.component.service.ts","../../src/lib/components/layout/menu-item.component.ts","../../src/lib/components/layout/menu-item.component.html","../../src/lib/components/layout/menu.component.ts","../../src/lib/components/layout/menu.component.html","../../src/lib/components/layout/topbar.component.ts","../../src/lib/components/layout/topbar.component.html","../../src/lib/components/layout/main-layout.component.ts","../../src/lib/components/layout/main-layout.component.html","../../src/lib/services/internal/commons-init.provider.ts","../../src/lib/services/internal/commons-init.service.ts","../../src/lib/services/providers/config-service.provider.ts","../../src/lib/config/formly.config.ts","../../src/lib/services/providers/formly-config.provider.ts","../../src/lib/mng-commons.module.ts","../../src/lib/api/services/api.abstract.service.ts","../../src/lib/api/services/get-all-api.abstract.service.ts","../../src/lib/api/services/crud-api.abstract.service.ts","../../src/lib/utils/route.util.ts","../../src/lib/router/route-builder.ts","../../src/public-api.ts","../../src/mediusinc-mng-commons.ts"],"sourcesContent":["import {Observable, isObservable, throwError} from 'rxjs';\n\nimport {IMngCrudApiService} from '../api/services';\nimport {ActionExecContext} from '../components/action/models';\nimport {IDataProvider, IEditorDataProvider} from '../data-providers';\n\nexport class ActionDataProviderUtil {\n public static runFetchOrFail<T, S, DP extends IDataProvider<T, S>>(ctx: ActionExecContext<T, S, DP>): Observable<T> {\n const dataProviderExec = ActionDataProviderUtil.runFetchDataProvider(ctx);\n if (isObservable(dataProviderExec)) {\n return dataProviderExec;\n }\n const serviceExec = ActionDataProviderUtil.runGetByIdService(ctx);\n return isObservable(serviceExec)\n ? serviceExec\n : throwError(\n () =>\n new Error(\n `Data provider and service instance could not extract fetch function to execute in action ${ctx.action.actionName} (${ctx.action.model?.typeName}) for item id ${ctx.data?.itemId}.`\n )\n );\n }\n\n public static runCreateOrFail<T, S, DP extends IDataProvider<T, S>>(ctx: ActionExecContext<T, S, DP>): Observable<T> {\n const dataProviderExec = ActionDataProviderUtil.runCreateDataProvider(ctx);\n if (isObservable(dataProviderExec)) {\n return dataProviderExec;\n }\n const serviceExec = ActionDataProviderUtil.runCreateService(ctx);\n return isObservable(serviceExec)\n ? serviceExec\n : throwError(\n () =>\n new Error(\n `Data provider and service instance could not extract create function to execute in action ${ctx.action.actionName} (${ctx.action.model?.typeName}) for item ${ctx.data?.item}.`\n )\n );\n }\n\n public static runUpdateOrFail<T, S, DP extends IDataProvider<T, S>>(ctx: ActionExecContext<T, S, DP>): Observable<T> {\n const dataProviderExec = ActionDataProviderUtil.runUpdateDataProvider(ctx);\n if (isObservable(dataProviderExec)) {\n return dataProviderExec;\n }\n const serviceExec = ActionDataProviderUtil.runUpdateService(ctx);\n return isObservable(serviceExec)\n ? serviceExec\n : throwError(\n () =>\n new Error(\n `Data provider and service instance could not extract update function to execute in action ${ctx.action.actionName} (${ctx.action.model?.typeName}) for item id ${ctx.data?.itemId}.`\n )\n );\n }\n\n public static runDeleteOrFail<T, S, DP extends IDataProvider<T, S>>(ctx: ActionExecContext<T, S, DP>): Observable<T | null> {\n const dataProviderExec = ActionDataProviderUtil.runDeleteDataProvider(ctx);\n if (isObservable(dataProviderExec)) {\n return dataProviderExec;\n }\n const serviceExec = ActionDataProviderUtil.runDeleteService(ctx);\n return isObservable(serviceExec)\n ? serviceExec\n : throwError(\n () =>\n new Error(\n `Data provider and service instance could not extract delete function to execute in action ${ctx.action.actionName} (${ctx.action.model?.typeName}) for item id ${ctx.data?.itemId}.`\n )\n );\n }\n\n public static runGetByIdService<T, DP extends IDataProvider<T, unknown>>(ctx: ActionExecContext<T, unknown, DP>): Observable<T> | null {\n if (typeof ctx.serviceInstance !== 'undefined') {\n const crudServiceInstance = ctx.serviceInstance as IMngCrudApiService<T>;\n if (typeof crudServiceInstance.getByIdGet === 'function') {\n return ctx.data?.itemId ? crudServiceInstance.getByIdGet(ctx.data.itemId) : null;\n }\n }\n return null;\n }\n\n public static runCreateService<T, DP extends IDataProvider<T, unknown>>(ctx: ActionExecContext<T, unknown, DP>): Observable<T> | null {\n if (typeof ctx.serviceInstance !== 'undefined') {\n const crudServiceInstance = ctx.serviceInstance as IMngCrudApiService<T>;\n if (typeof crudServiceInstance.createPost === 'function') {\n return ctx.data?.item ? crudServiceInstance.createPost(ctx.data.item) : null;\n }\n }\n return null;\n }\n\n public static runUpdateService<T, DP extends IDataProvider<T, unknown>>(ctx: ActionExecContext<T, unknown, DP>): Observable<T> | null {\n if (typeof ctx.serviceInstance !== 'undefined') {\n const crudServiceInstance = ctx.serviceInstance as IMngCrudApiService<T>;\n if (typeof crudServiceInstance.updatePut === 'function') {\n return ctx.data?.itemId && ctx.data.item ? crudServiceInstance.updatePut(ctx.data.itemId, ctx.data.item) : null;\n }\n }\n return null;\n }\n\n public static runDeleteService<T, DP extends IDataProvider<T, unknown>>(ctx: ActionExecContext<T, unknown, DP>): Observable<T | null> | null {\n if (typeof ctx.serviceInstance !== 'undefined') {\n const crudServiceInstance = ctx.serviceInstance as IMngCrudApiService<T>;\n if (typeof crudServiceInstance.removeDelete === 'function') {\n return ctx.data?.itemId ? crudServiceInstance.removeDelete(ctx.data.itemId, ctx.data.item) : null;\n }\n }\n return null;\n }\n\n public static runFetchDataProvider<T, S>(ctx: ActionExecContext<T, S, IDataProvider<T, S>>): Observable<T> | null {\n if (typeof ctx.dataProvider !== 'undefined') {\n const editorDataProvider = ctx.dataProvider as IEditorDataProvider<T, any>;\n if (typeof editorDataProvider.fetch === 'function') {\n return ctx.data?.itemId ? editorDataProvider.fetch(ctx.data.itemId, ctx.serviceInstance) : null;\n }\n }\n return null;\n }\n\n public static runCreateDataProvider<T, S>(ctx: ActionExecContext<T, S, IDataProvider<T, S>>): Observable<T> | null {\n if (typeof ctx.dataProvider !== 'undefined') {\n const editorDataProvider = ctx.dataProvider as IEditorDataProvider<T, any>;\n if (typeof editorDataProvider.create === 'function') {\n return ctx.data?.item ? editorDataProvider.create(ctx.data.item, ctx.serviceInstance) : null;\n }\n }\n return null;\n }\n\n public static runUpdateDataProvider<T, S>(ctx: ActionExecContext<T, S, IDataProvider<T, S>>): Observable<T> | null {\n if (typeof ctx.dataProvider !== 'undefined') {\n const editorDataProvider = ctx.dataProvider as IEditorDataProvider<T, any>;\n if (typeof editorDataProvider.update === 'function') {\n return ctx.data?.itemId ? editorDataProvider.update(ctx.data.itemId, ctx.data.item, ctx.serviceInstance) : null;\n }\n }\n return null;\n }\n\n public static runDeleteDataProvider<T, S>(ctx: ActionExecContext<T, S, IDataProvider<T, S>>): Observable<T | null> | null {\n if (typeof ctx.dataProvider !== 'undefined') {\n const editorDataProvider = ctx.dataProvider as IEditorDataProvider<T, any>;\n if (typeof editorDataProvider.delete === 'function') {\n return ctx.data?.itemId ? editorDataProvider.delete(ctx.data.itemId, ctx.data.item, ctx.serviceInstance) : null;\n }\n }\n return null;\n }\n}\n","import {Type} from '@angular/core';\n\nimport {ClassType} from '../types';\n\nexport interface IDataProvider<T, S> {\n modelType: ClassType<T> | null;\n serviceType?: Type<S>;\n}\n\nexport class DataProvider<T, S> {\n protected _modelType: ClassType<T> | null;\n protected _serviceType?: Type<S>;\n\n constructor(modelType: ClassType<T> | null, serviceType?: Type<S>) {\n this._modelType = modelType;\n this._serviceType = serviceType;\n }\n\n public get serviceType() {\n return this._serviceType;\n }\n\n public get modelType() {\n return this._modelType;\n }\n\n public withServiceType(type: Type<S>): this {\n this._serviceType = type;\n return this;\n }\n}\n","import {Type} from '@angular/core';\n\nimport {Observable, throwError} from 'rxjs';\n\nimport {ClassType, IdType} from '../types';\nimport {DataProvider, IDataProvider} from './base.data-provider';\n\nexport interface IEditorDataProvider<T, S> extends IDataProvider<T, S> {\n fetch: (id: IdType, service?: S) => Observable<T>;\n create?: (item?: T, service?: S) => Observable<T>;\n update?: (id: IdType, item?: T, service?: S) => Observable<T>;\n delete?: (id: IdType, item?: T, service?: S) => Observable<T | null>;\n}\n\nexport class EditorDataProvider<T, S> extends DataProvider<T, S> implements IEditorDataProvider<T, S> {\n protected _fetch: (id: IdType, service?: S) => Observable<T> = id => throwError(`No fetch function provided for id ${id}.`);\n protected _create?: (item?: T, service?: S) => Observable<T>;\n protected _update?: (id: IdType, item?: T, service?: S) => Observable<T>;\n protected _delete?: (id: IdType, item?: T, service?: S) => Observable<T | null>;\n\n constructor(modelType: ClassType<T>, serviceType?: Type<S>) {\n super(modelType, serviceType);\n }\n\n public get fetch() {\n return this._fetch;\n }\n\n public get create() {\n return this._create;\n }\n\n public get update() {\n return this._update;\n }\n\n public get delete() {\n return this._delete;\n }\n\n public withFetch(fetch: (id: IdType, service?: S) => Observable<T>): this {\n this._fetch = fetch;\n return this;\n }\n\n public withCreate(create: (item?: T, service?: S) => Observable<T>): this {\n this._create = create;\n return this;\n }\n\n public withUpdate(update: (id: IdType, item?: T, service?: S) => Observable<T>): this {\n this._update = update;\n return this;\n }\n\n public withDelete(deleteFn: (id: IdType, item?: T, service?: S) => Observable<T | null>): this {\n this._delete = deleteFn;\n return this;\n }\n}\n","import {Type} from '@angular/core';\n\nimport {Observable, of} from 'rxjs';\n\nimport {MediusQueryParam} from '../api/models';\nimport {ClassType} from '../types';\nimport {DataProvider, IDataProvider} from './base.data-provider';\n\nexport interface ILookupDataProvider<T, S> extends IDataProvider<T, S> {\n lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>;\n}\n\nexport class LookupDataProvider<T, S> extends DataProvider<T, S> implements ILookupDataProvider<T, S> {\n protected _lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>> = () => of([]);\n\n constructor(modelType: ClassType<T> | null, serviceType?: Type<S>) {\n super(modelType, serviceType);\n }\n\n public get lookup() {\n return this._lookup;\n }\n\n public withLookup(lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>): this {\n this._lookup = lookup;\n return this;\n }\n}\n","/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport enum MediusFilterMatchType {\n Equals = 'EQUALS',\n NotEquals = 'NOT_EQUALS',\n FromTo = 'FROM_TO',\n Contains = 'CONTAINS',\n StartsWith = 'STARTS_WITH',\n EndsWith = 'ENDS_WITH',\n In = 'IN',\n NotIn = 'NOT_IN',\n SmallerThan = 'SMALLER_THAN',\n GreaterThan = 'GREATER_THAN'\n}\n","/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {MediusFilterMatchType} from './filter-match-type.model';\nimport {AttributeDef} from './serialization.model';\n\nexport class MediusFilterParam {\n property?: string;\n filterValue?: object;\n filterValueTo?: object;\n filterMatchType?: MediusFilterMatchType;\n filterMatchCaseSensitive?: boolean;\n\n public static discriminator?: string;\n\n public static attributeTypeMap: Array<AttributeDef> = [\n {\n name: 'property',\n baseName: 'property',\n type: 'string'\n },\n {\n name: 'filterValue',\n baseName: 'filter_value',\n type: 'object'\n },\n {\n name: 'filterValueTo',\n baseName: 'filter_value_to',\n type: 'object'\n },\n {\n name: 'filterMatchType',\n baseName: 'filter_match_type',\n type: 'FilterMatchType'\n },\n {\n name: 'filterMatchCaseSensitive',\n baseName: 'filter_match_case_sensitive',\n type: 'boolean'\n }\n ];\n\n public static getAttributeTypeMap() {\n return MediusFilterParam.attributeTypeMap;\n }\n}\n","/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport enum MediusQueryMode {\n Count = 'COUNT',\n Data = 'DATA',\n All = 'ALL'\n}\n","/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {MediusFilterParam} from './filter-param.model';\nimport {MediusQueryMode} from './query-mode.model';\nimport {AttributeDef} from './serialization.model';\n\nexport class MediusQueryParam {\n sortProperty?: Array<string>;\n sortAsc?: Array<boolean>;\n itemsOffset?: number;\n itemsPerPage?: number;\n filterParams?: Array<MediusFilterParam>;\n filterAllParam?: string;\n filterAllProperties?: Array<string>;\n validateProperties?: Array<string>;\n selectInTwoSteps?: boolean;\n sortEnumByOrdinal?: boolean;\n groupByProperties?: Array<string>;\n queryMode?: MediusQueryMode;\n\n public static discriminator?: string;\n\n public static attributeTypeMap: Array<AttributeDef> = [\n {\n name: 'sortProperty',\n baseName: 'sort_property',\n type: 'Array<string>'\n },\n {\n name: 'sortAsc',\n baseName: 'sort_asc',\n type: 'Array<boolean>'\n },\n {\n name: 'itemsOffset',\n baseName: 'items_offset',\n type: 'number'\n },\n {\n name: 'itemsPerPage',\n baseName: 'items_per_page',\n type: 'number'\n },\n {\n name: 'filterParams',\n baseName: 'filter_params',\n type: 'Array<FilterParam>'\n },\n {\n name: 'filterAllParam',\n baseName: 'filter_all_param',\n type: 'string'\n },\n {\n name: 'filterAllProperties',\n baseName: 'filter_all_properties',\n type: 'Array<string>'\n },\n {\n name: 'validateProperties',\n baseName: 'validate_properties',\n type: 'Array<string>'\n },\n {\n name: 'selectInTwoSteps',\n baseName: 'select_in_two_steps',\n type: 'boolean'\n },\n {\n name: 'sortEnumByOrdinal',\n baseName: 'sort_enum_by_ordinal',\n type: 'boolean'\n },\n {\n name: 'groupByProperties',\n baseName: 'group_by_properties',\n type: 'Array<string>'\n },\n {\n name: 'queryMode',\n baseName: 'query_mode',\n type: 'QueryMode'\n }\n ];\n\n public static getAttributeTypeMap() {\n return MediusQueryParam.attributeTypeMap;\n }\n}\n","/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {AttributeDef} from './serialization.model';\n\nexport class MediusQueryResult<T> implements IMediusQueryResult<T> {\n allDataCount?: number;\n pageData?: Array<T>;\n\n static discriminator?: string;\n\n static attributeTypeMap: Array<AttributeDef> = [\n {\n name: 'allDataCount',\n baseName: 'all_data_count',\n type: 'number'\n },\n {\n name: 'pageData',\n baseName: 'page_data',\n type: 'Array<T>'\n }\n ];\n\n static getAttributeTypeMap() {\n return MediusQueryResult.attributeTypeMap;\n }\n}\n\nexport interface IMediusQueryResult<T> {\n allDataCount?: number;\n pageData?: Array<T>;\n}\n","import {MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam} from '../';\n\nexport class MediusQueryParamBuilder {\n private constructor(private queryParam: MediusQueryParam) {}\n\n public static create(itemsPerPage = 50, itemsOffset = 0): MediusQueryParamBuilder {\n const queryParam = new MediusQueryParam();\n queryParam.itemsPerPage = itemsPerPage;\n queryParam.itemsOffset = itemsOffset;\n queryParam.queryMode = MediusQueryMode.All;\n return new MediusQueryParamBuilder(queryParam);\n }\n\n public static createFromExisting(queryParam: MediusQueryParam, itemsPerPage?: number, itemsOffset?: number): MediusQueryParamBuilder {\n queryParam.itemsPerPage = itemsPerPage ?? queryParam.itemsPerPage ?? 50;\n queryParam.itemsOffset = itemsOffset ?? queryParam.itemsOffset ?? 0;\n queryParam.queryMode = queryParam.queryMode ?? MediusQueryMode.All;\n return new MediusQueryParamBuilder(queryParam);\n }\n\n public withItemsPerPage(itemsPerPage: number): MediusQueryParamBuilder {\n this.queryParam.itemsPerPage = itemsPerPage;\n return this;\n }\n\n public withItemsOffset(itemsOffset: number): MediusQueryParamBuilder {\n this.queryParam.itemsOffset = itemsOffset;\n return this;\n }\n\n public withQueryMode(queryMode: MediusQueryMode): MediusQueryParamBuilder {\n this.queryParam.queryMode = queryMode;\n return this;\n }\n\n public withSort(property: string, asc = true): MediusQueryParamBuilder {\n if (!this.queryParam.sortProperty || !this.queryParam.sortAsc) {\n this.queryParam.sortProperty = [];\n this.queryParam.sortAsc = [];\n }\n this.queryParam.sortProperty.push(property);\n this.queryParam.sortAsc.push(asc);\n return this;\n }\n\n public withFilter(\n property: string,\n value: any,\n valueTo: any = undefined,\n matchType: MediusFilterMatchType = MediusFilterMatchType.Contains,\n matchCaseSensitive = false\n ): MediusQueryParamBuilder {\n if (!this.queryParam.filterParams) {\n this.queryParam.filterParams = [];\n }\n const filterParam = new MediusFilterParam();\n filterParam.property = property;\n filterParam.filterValue = value;\n filterParam.filterValueTo = valueTo;\n filterParam.filterMatchType = matchType;\n filterParam.filterMatchCaseSensitive = matchCaseSensitive;\n this.queryParam.filterParams.push(filterParam);\n return this;\n }\n\n public build(): MediusQueryParam {\n const queryParam = this.queryParam;\n this.queryParam = new MediusQueryParam();\n return queryParam;\n }\n}\n","import {MediusFilterMatchType} from './filter-match-type.model';\nimport {MediusFilterParam} from './filter-param.model';\nimport {MediusQueryMode} from './query-mode.model';\nimport {MediusQueryParam} from './query-param.model';\n\nexport const enumsMapBase: {[index: string]: any} = {\n FilterMatchType: MediusFilterMatchType,\n QueryMode: MediusQueryMode\n};\n\nexport const typeMapBase: {[index: string]: any} = {\n FilterParam: MediusFilterParam,\n QueryParam: MediusQueryParam\n};\n","import {Type} from '@angular/core';\n\nimport {Observable, of} from 'rxjs';\n\nimport {MediusQueryParam, MediusQueryResult} from '../api/models';\nimport {ClassType} from '../types';\nimport {DataProvider, IDataProvider} from './base.data-provider';\n\nexport interface ITableDataProvider<T, S> extends IDataProvider<T, S> {\n getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>;\n}\n\nexport class TableDataProvider<T, S> extends DataProvider<T, S> implements ITableDataProvider<T, S> {\n protected _getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>> = () => of(new MediusQueryResult<T>());\n\n constructor(modelType: ClassType<T>, serviceType?: Type<S>) {\n super(modelType, serviceType);\n }\n\n public get getAll() {\n return this._getAll;\n }\n\n public withGetAll(getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>): this {\n this._getAll = getAll;\n return this;\n }\n}\n","import {Type} from '@angular/core';\n\nimport {Observable, of} from 'rxjs';\n\nimport {MediusQueryParam, MediusQueryResult} from '../api/models';\nimport {ClassType} from '../types';\nimport {EditorDataProvider, IEditorDataProvider} from './editor.data-provider';\nimport {ITableDataProvider} from './table.data-provider';\n\nexport interface ITableviewDataProvider<T, S> extends IEditorDataProvider<T, S> {\n getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>;\n}\n\nexport class TableviewDataProvider<T, S> extends EditorDataProvider<T, S> implements ITableviewDataProvider<T, S>, ITableDataProvider<T, S>, IEditorDataProvider<T, S> {\n protected _getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>> = () => of(new MediusQueryResult<T>());\n\n constructor(modelType: ClassType<T>, serviceType?: Type<S>) {\n super(modelType, serviceType);\n }\n\n public get getAll() {\n return this._getAll;\n }\n\n public withGetAll(getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>): this {\n this._getAll = getAll;\n return this;\n }\n}\n","import {Type} from '@angular/core';\nimport {Params, QueryParamsHandling} from '@angular/router';\n\nimport {Confirmation} from 'primeng/api';\nimport {Observable, of, throwError} from 'rxjs';\n\nimport {ActionExecContext} from '../components/action/models';\nimport {DataProvider, EditorDataProvider, IDataProvider, IEditorDataProvider} from '../data-providers';\nimport {ClassType, IdType} from '../types';\nimport {ActionDataProviderUtil, TypeUtil} from '../utils';\nimport {EditorDescriptor, ModelDescriptor} from './';\n\nexport class ActionDescriptor<T> {\n protected readonly _model: ModelDescriptor<T> | null;\n protected readonly _actionName: string;\n protected readonly _parentType?: ClassType<any>;\n protected readonly _parentTypeName?: string;\n protected readonly _parentProperty?: string;\n protected readonly _i18nModelActionBaseKey?: string;\n\n protected _type: ActionTypeEnum = ActionTypeEnum.Direct;\n protected _activationTrigger: ActionActivationTriggerEnum = ActionActivationTriggerEnum.OnClick;\n protected _position: ActionPositionEnum = ActionPositionEnum.ToolbarRight;\n protected _level: ActionLevelEnum = ActionLevelEnum.Default;\n\n protected _routeUrl: string | null = null;\n\n protected _title?: string | null;\n protected _icon?: string | null;\n protected _tooltip?: string | null;\n protected _className = '';\n protected _size: ActionDescriptor.SizeEnum = ActionDescriptor.SizeEnum.Normal;\n protected _isStyleText = false;\n protected _isStyleOutlined = false;\n protected _isStyleRaised = false;\n\n protected _dataProvider?: IDataProvider<T, any>;\n protected _runFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T | undefined | null>;\n protected _isVisibleFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>;\n protected _isEnabledFunction?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<boolean>;\n\n private _hasRunConfirmation = false;\n private _runConfirmationIcon?: string;\n private _runConfirmationTitle?: string;\n private _runConfirmationMessage?: string;\n private _runConfirmationAcceptTitle?: string;\n private _runConfirmationRejectTitle?: string;\n private _runConfirmationConfigMapFn?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>, confirmConfig: Confirmation) => Confirmation;\n\n protected _hasRunNotificationSuccess = true;\n private _runNotificationSuccessTitle?: string;\n private _runNotificationSuccessMessage?: string;\n\n private _hasRunNotificationError = true;\n private _runNotificationErrorTitle?: string;\n private _runNotificationErrorMessage?: string;\n\n constructor(model: ModelDescriptor<T> | null, actionName: string, parentType?: ClassType<any>, parentProperty?: string) {\n this._model = model;\n this._actionName = actionName;\n\n if ((parentType && !parentProperty) || (!parentProperty && parentProperty)) {\n throw new Error(`Provide both the parent type and parent property or none: ${parentType}, ${parentProperty}.`);\n }\n this._parentType = parentType;\n this._parentTypeName = parentType ? TypeUtil.findTypeName(parentType) : undefined;\n this._parentProperty = parentProperty;\n\n if (this._parentTypeName || this._model) {\n this._i18nModelActionBaseKey = this._parentTypeName\n ? `${this._parentTypeName}.actions.${this._parentProperty}_${actionName}`\n : `${this._model!.typeName}.actions.${actionName}`;\n }\n }\n\n public get model() {\n return this._model;\n }\n\n public get parentTypeName() {\n return this._parentTypeName;\n }\n\n public get parentProperty() {\n return this._parentProperty;\n }\n\n public get i18nModelActionBaseKey() {\n return this._i18nModelActionBaseKey;\n }\n\n public get type() {\n return this._type;\n }\n\n public get activationTrigger() {\n return this._activationTrigger;\n }\n\n public get position() {\n return this._position;\n }\n\n public get level() {\n return this._level;\n }\n\n public get routeUrl() {\n return this._routeUrl;\n }\n\n public get title() {\n return this._title;\n }\n\n public get icon() {\n return this._icon;\n }\n\n public get tooltip() {\n return this._tooltip;\n }\n\n public get dataProvider() {\n return this._dataProvider;\n }\n\n public get hasRunFunction(): boolean {\n return typeof this._runFunction === 'function';\n }\n\n public get runFunction(): (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T | undefined | null> {\n if (!this._runFunction) {\n throw new Error('Run function is not defined and cannot be invoked');\n }\n return this._runFunction;\n }\n\n public get isVisibleFunction() {\n return this._isVisibleFunction;\n }\n\n public get isEnabledFunction() {\n return this._isEnabledFunction;\n }\n\n public get actionName() {\n return this._actionName;\n }\n\n public get className() {\n return this._className;\n }\n\n get isStyleText() {\n return this._isStyleText;\n }\n\n get isStyleOutlined() {\n return this._isStyleOutlined;\n }\n\n get isStyleRaised() {\n return this._isStyleRaised;\n }\n\n public get size() {\n return this._size;\n }\n\n public get isSizeExtraSmall() {\n return this._size === ActionDescriptor.SizeEnum.ExtraSmall;\n }\n\n public get isSizeSmall() {\n return this._size === ActionDescriptor.SizeEnum.Small;\n }\n\n public get isSizeLarge() {\n return this._size === ActionDescriptor.SizeEnum.Large;\n }\n\n public get isSizeExtraLarge() {\n return this._size === ActionDescriptor.SizeEnum.ExtraLarge;\n }\n\n get hasRunConfirmation() {\n return this._hasRunConfirmation;\n }\n\n get runConfirmationIcon() {\n return this._runConfirmationIcon;\n }\n\n get runConfirmationTitle() {\n return this._runConfirmationTitle;\n }\n\n get runConfirmationMessage() {\n return this._runConfirmationMessage;\n }\n\n get runConfirmationAcceptTitle() {\n return this._runConfirmationAcceptTitle;\n }\n\n get runConfirmationRejectTitle() {\n return this._runConfirmationRejectTitle;\n }\n\n get runConfirmationConfigMapFn() {\n return this._runConfirmationConfigMapFn;\n }\n\n get hasRunNotificationSuccess() {\n return this._hasRunNotificationSuccess;\n }\n\n get runNotificationSuccessTitle() {\n return this._runNotificationSuccessTitle;\n }\n\n get runNotificationSuccessMessage() {\n return this._runNotificationSuccessMessage;\n }\n\n get hasRunNotificationError() {\n return this._hasRunNotificationError;\n }\n\n get runNotificationErrorTitle() {\n return this._runNotificationErrorTitle;\n }\n\n get runNotificationErrorMessage() {\n return this._runNotificationErrorMessage;\n }\n\n public withDataProvider(dataProvider: IDataProvider<T, any>): this {\n this._dataProvider = dataProvider;\n return this;\n }\n\n public withServiceType<S>(serviceType: Type<S>): this {\n if (!this._model) {\n throw new Error(`Cannot set data provider if no model type is provided for action ${this._actionName}`);\n }\n this._dataProvider = new DataProvider(this._model.type, serviceType);\n return this;\n }\n\n public withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T | undefined | null>): this {\n this._runFunction = fn;\n return this;\n }\n\n public withIsVisibleFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<boolean>): this {\n this._isVisibleFunction = fn;\n return this;\n }\n\n public withIsEnabledFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<boolean>): this {\n this._isEnabledFunction = fn;\n return this;\n }\n\n public withRouteTrigger(routeUrl: string): this {\n this._activationTrigger = ActionActivationTriggerEnum.OnRoute;\n this._routeUrl = routeUrl;\n return this;\n }\n\n public withLevel(level: ActionLevelEnum): this {\n this._level = level;\n return this;\n }\n\n /**\n * Overrides default title key with model action key (${model.typeName}.actions.${actionName}). Not relevant if parentType name is provided.\n */\n public withModelTitle(): this {\n this._title = `${this._i18nModelActionBaseKey}.title`;\n return this;\n }\n\n /**\n * Overrides default title key (${actionName}.title). If null, no title will be shown.\n * @param title Title i18n key or title.\n */\n public withTitle(title: string | null): this {\n this._title = title;\n return this;\n }\n\n public withIcon(icon: string | null): this {\n this._icon = icon;\n return this;\n }\n\n public withTooltip(tooltip: string | null): this {\n this._title = tooltip;\n return this;\n }\n\n public withClassName(className: string): this {\n this._className = className;\n return this;\n }\n\n public withSize(size: ActionDescriptor.SizeEnum = ActionDescriptor.SizeEnum.Normal): this {\n this._size = size;\n return this;\n }\n\n public withStyle(styleText = false, styleOutlined = false, styleRaised = false): this {\n this._isStyleText = styleText;\n this._isStyleOutlined = styleOutlined;\n this._isStyleRaised = styleRaised;\n return this;\n }\n\n public withPosition(position: ActionPositionEnum): this {\n this._position = position;\n return this;\n }\n\n /**\n * Add a confirmation dialogue to the action\n * @param icon the icon to display on the confirmation dialogue\n * @param title the title of the confirmation dialogue\n * @param message the message on the confirmation dialogue\n * @param acceptTitle the title of the accepting button\n * @param rejectTitle the title of the rejecting button\n * @param runConfirmationConfigMapFn function used to generate the confirmation dialogue. **WARNING** changing the *accept* and *reject* methods of the *confirmConfig* parameter\n * may lead to unexpected behaviour\n */\n public withRunConfirmation(\n icon = 'pi pi-exclamation-triangle',\n title?: string,\n message?: string,\n acceptTitle?: string,\n rejectTitle?: string,\n runConfirmationConfigMapFn?: (ctx: ActionExecContext<T, any, IDataProvider<T, any>>, confirmConfig: Confirmation) => Confirmation\n ): this {\n this._hasRunConfirmation = true;\n this._runConfirmationIcon = icon;\n this._runConfirmationTitle = title;\n this._runConfirmationMessage = message;\n this._runConfirmationAcceptTitle = acceptTitle;\n this._runConfirmationRejectTitle = rejectTitle;\n this._runConfirmationConfigMapFn = runConfirmationConfigMapFn;\n return this;\n }\n\n public withRunNotificationSuccess(title?: string, message?: string, hasNotification = true) {\n this._hasRunNotificationSuccess = hasNotification;\n this._runNotificationSuccessTitle = title;\n this._runNotificationSuccessMessage = message;\n }\n\n public withRunNotificationError(title?: string, message?: string, hasNotification = true) {\n this._hasRunNotificationError = hasNotification;\n this._runNotificationErrorTitle = title;\n this._runNotificationErrorMessage = message;\n }\n}\n\nexport namespace ActionDescriptor {\n export enum SizeEnum {\n ExtraSmall,\n Small,\n Normal,\n Large,\n ExtraLarge\n }\n}\n\nexport class ActionSimpleDescriptor<T> extends ActionDescriptor<T> {\n constructor(actionName: string, modelType?: ClassType<T>, idProperty?: string, titleProperty?: string) {\n const model = modelType ? new ModelDescriptor<T>(modelType, idProperty, titleProperty) : null;\n super(model, actionName);\n }\n}\n\nexport class ActionEditorDescriptor<T> extends ActionDescriptor<T> {\n private readonly _editorDescriptor: EditorDescriptor<T>;\n\n protected _editorActions: ActionDescriptor<T>[] = [];\n protected _editorTitle?: string | null = undefined;\n\n protected _hasFetchNotificationSuccess = false;\n protected _fetchNotificationSuccessTitle?: string;\n protected _fetchNotificationSuccessMessage?: string;\n\n protected _dialogSize: ActionEditorDescriptor.DialogSizeEnum = ActionEditorDescriptor.DialogSizeEnum.Normal;\n protected _dialogClassName?: string;\n\n protected override _dataProvider?: IEditorDataProvider<T, any>;\n protected _fetchFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;\n protected _submitFunction?: (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T>;\n\n protected _editorComponent?: Type<any>;\n\n constructor(editorDescriptor: EditorDescriptor<T>, actionName: string, parentType?: ClassType<any>, parentProperty?: string) {\n super(editorDescriptor.model, actionName, parentType, parentProperty);\n this._type = ActionTypeEnum.Editor;\n this._editorDescriptor = editorDescriptor;\n this._editorActions.push(new ActionEditorSubmitDescriptor(this), new ActionEditorSubmitDescriptor(this, ActionEditorSubmitDescriptor.TypeEnum.Cancel));\n }\n\n public get editorTitle() {\n return this._editorTitle;\n }\n\n public get editorDescriptor() {\n return this._editorDescriptor;\n }\n\n public get dialogSize() {\n return this._dialogSize;\n }\n\n public get dialogClassName() {\n return this._dialogClassName;\n }\n\n public get hasFetchNotificationSuccess() {\n return this._hasFetchNotificationSuccess;\n }\n\n public get fetchNotificationSuccessTitle() {\n return this._fetchNotificationSuccessTitle;\n }\n\n public get fetchNotificationSuccessMessage() {\n return this._fetchNotificationSuccessMessage;\n }\n\n public override get dataProvider() {\n return this._dataProvider;\n }\n\n public override get runFunction(): (ctx: ActionExecContext<T, any, IDataProvider<T, any>>) => Observable<T> {\n throw new Error('Run function cannot be used in editor action. Use submit function instead!');\n }\n\n public get fetchFunction(): (ctx: ActionExecContext<T, any, IEditorDataProvider<T, any>>) => Observable<T> {\n if (!this._fetchFunction) {\n return ctx => {\n console.warn(`Fetch function is not provided for function ${this._actionName}, using default and returning context item`, ctx.data?.item);\n return of(ctx.data?.item ? ctx.data.item : ({} as T));\n };\n }\n return this._fetchFunction;\n }\n\n public get submitFunction() {\n return this._submitFunction;\n }\n\n public get editorActions() {\n return this._editorActions;\n }\n\n public get editorComponent() {\n return this._editorComponent;\n }\n\n public withEditorTitle(title: string | null): this {\n this._editorTitle = title;\n return this;\n }\n\n public override withDataProvider(dataProvider: IEditorDataProvider<T, any>): this {\n this._dataProvider = dataProvider;\n return this;\n }\n\n public override withServiceType<S>(serviceType: Type<S>): this {\n if (!this._model) {\n throw new Error(`Cannot set data provider if no model type is provided for action ${this._actionName}`);\n }\n this._dataProvider = new EditorDataProvider(this._model.type, serviceType);\n return this;\n }\n\n public withDialogSize(size = ActionEditorDescriptor.DialogSizeEnum.Normal): this {\n this._dialogSize = size;\n return this;\n }\n\n public withDialogClassName(className: string): this {\n this._dialogClassName = className;\n return this;\n }\n\n public override withRunFunction<S>(fn: (ctx: ActionExecContext<T, S, IDataProvider<T, S>>) => Observable<T>): this {\n return this.withSubmitFunction(fn as (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>);\n }\n\n public withFetchFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this {\n this._fetchFunction = fn;\n return this;\n }\n\n public withSubmitFunction<S>(fn: (ctx: ActionExecContext<T, S, IEditorDataProvider<T, S>>) => Observable<T>): this {\n this._submitFunction = fn;\n return this;\n }\n\n public withFetchNotificationError(title?: string, message?: string, hasNotification = true): this {\n this._hasFetchNotificationSuccess = hasNotification;\n this._fetchNotificationSuccessTitle = title;\n this._fetchNotificationSuccessMessage = message;\n return this;\n }\n\n public withEditorAction(action: ActionDescriptor<T>): this {\n this._editorActions.push(action);\n return this;\n }\n\n public withEditorActions(actions: ActionDescriptor<T>[]): this {\n this._editorActions = actions;\n return this;\n }\n\n public withEditorComponent(editorComponent: Type<any>): this {\n this._editorComponent = editorComponent;\n return this;\n }\n}\n\nexport namespace ActionEditorDescriptor {\n export enum DialogSizeEnum {\n ExtraSmall,\n Small,\n Normal,\n Large,\n ExtraLarge\n }\n}\n\nexport class ActionEditorSubmitDescriptor<T> extends ActionDescriptor<T> {\n private readonly _editorAction: ActionEditorDescriptor<T>;\n private readonly _submitType: ActionEditorSubmitDescriptor.TypeEnum;\n\n constructor(editorAction: ActionEditorDescriptor<T>, submitType = ActionEditorSubmitDescriptor.TypeEnum.Submit) {\n super(editorAction.model, submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit ? 'submit' : 'cancel');\n this._editorAction = editorAction;\n this._submitType = submitType;\n this._position = ActionPositionEnum.FooterRight;\n this._isStyleText = true;\n }\n\n public get submitType() {\n return this._submitType;\n }\n}\n\nexport namespace ActionEditorSubmitDescriptor {\n export enum TypeEnum {\n Submit,\n Cancel\n }\n}\n\nexport class ActionEditorDetailsDescriptor<T> extends ActionEditorDescriptor<T> {\n public static readonly ACTION_NAME = 'details';\n\n constructor(editorDescriptor: EditorDescriptor<T>) {\n super(editorDescriptor, ActionEditorDetailsDescriptor.ACTION_NAME);\n this.withPosition(ActionPositionEnum.RowClick);\n this.withRouteTrigger(':itemId');\n this.withFetchFunction(ctx =>\n ctx.dataProvider?.fetch && ctx.data?.itemId\n ? ctx.dataProvider.fetch(ctx.data?.itemId, ctx.serviceInstance)\n : throwError(new Error(`Data provider fetch function or item id ${ctx.data?.itemId} is missing.`))\n );\n this.withEditorActions([new ActionEditorSubmitDescriptor(this, ActionEditorSubmitDescriptor.TypeEnum.Cancel)]);\n }\n\n public override withServiceType<S>(serviceType: Type<S>): this {\n return this.withServiceFetchFunction(serviceType);\n }\n\n public withServiceFetchFunction<S>(serviceType: Type<S>, fetchFn?: (id: IdType, service?: S) => Observable<T>): this {\n const dataProvider = new EditorDataProvider(this._model!.type, serviceType);\n if (fetchFn) {\n dataProvider.withFetch(fetchFn);\n }\n this._dataProvider = dataProvider;\n return this;\n }\n}\n\nexport class ActionEditorAddDescriptor<T> extends ActionEditorDescriptor<T> {\n public static readonly ACTION_NAME = 'add';\n\n constructor(editorDescriptor: EditorDescriptor<T>) {\n super(editorDescriptor, ActionEditorAddDescriptor.ACTION_NAME);\n this.withPosition(ActionPositionEnum.ToolbarLeft);\n this.withRouteTrigger('add');\n this.withSubmitFunction(ActionDataProviderUtil.runCreateOrFail);\n this.withLevel(ActionLevelEnum.Success);\n this.withIcon('pi pi-plus');\n }\n\n public override withServiceType<S>(serviceType: Type<S>): this {\n return this.withServiceSubmitFunction(serviceType);\n }\n\n public withServiceSubmitFunction<S>(serviceType: Type<S>, createFn?: (item?: T, service?: S) => Observable<T>, fetchFn?: (id: IdType, service?: S) => Observable<T>): this {\n const dataProvider = new EditorDataProvider(this._model!.type, serviceType);\n if (createFn) {\n dataProvider.withCreate(createFn);\n }\n if (fetchFn) {\n dataProvider.withFetch(fetchFn);\n }\n this._dataProvider = dataProvider;\n return this;\n }\n}\n\nexport class ActionEditorEditDescriptor<T> extends ActionEditorDescriptor<T> {\n public static readonly ACTION_NAME = 'edit';\n\n constructor(editorDescriptor: EditorDescriptor<T>) {\n super(editorDescriptor, ActionEditorEditDescriptor.ACTION_NAME);\n this.withPosition(ActionPositionEnum.RowInline);\n this.withTitle(null);\n this.withRouteTrigger(':itemId/edit');\n this.withFetchFunction(ActionDataProviderUtil.runFetchOrFail);\n this.withSubmitFunction(ActionDataProviderUtil.runUpdateOrFail);\n this.withIcon('pi pi-pencil');\n }\n\n public override withServiceType<S>(serviceType: Type<S>): this {\n return this.withServiceSubmitFunction(serviceType);\n }\n\n public withServiceSubmitFunction<S>(\n serviceType: Type<S>,\n updateFn?: (id: IdType, item?: T, service?: S) => Observable<T>,\n fetchFn?: (id: IdType, service?: S) => Observable<T>\n ): this {\n const dataProvider = new EditorDataProvider(this._model!.type, serviceType);\n if (updateFn) {\n dataProvider.withUpdate(updateFn);\n }\n if (fetchFn) {\n dataProvider.withFetch(fetchFn);\n }\n this._dataProvider = dataProvider;\n return this;\n }\n}\n\nexport class ActionDeleteDescriptor<T> extends ActionDescriptor<T> {\n public static readonly ACTION_NAME = 'delete';\n\n constructor(model: ModelDescriptor<T>) {\n super(model, ActionDeleteDescriptor.ACTION_NAME);\n this.withPosition(ActionPositionEnum.RowInline);\n this.withTitle(null);\n this.withRunFunction(ActionDataProviderUtil.runDeleteOrFail);\n this.withLevel(ActionLevelEnum.Danger);\n this.withIcon('pi pi-trash');\n this.withRunConfirmation(undefined);\n }\n\n public override withServiceType<S>(serviceType: Type<S>): this {\n return this.withServiceDeleteFunction(serviceType);\n }\n\n public withServiceDeleteFunction<S>(serviceType: Type<S>, deleteFn?: (id: IdType, item?: T, service?: S) => Observable<T>): this {\n const dataProvider = new EditorDataProvider(this._model!.type, serviceType);\n if (deleteFn) {\n dataProvider.withDelete(deleteFn);\n }\n this._dataProvider = dataProvider;\n return this;\n }\n}\n\nexport class ActionLinkDescriptor<T> extends ActionDescriptor<T> {\n private _url = '';\n private _pathSegments: string[] = [];\n private _queryParams?: Params;\n private _queryParamsHandling?: QueryParamsHandling;\n private _replaceUrl = false;\n private _target = '_self';\n private _isStyleLink = false;\n\n constructor(model: ModelDescriptor<T> | null = null, actionName = 'link') {\n super(model, actionName);\n }\n\n public get url(): string {\n return this._url;\n }\n\n public get pathSegments(): string[] {\n return this._pathSegments;\n }\n\n public get queryParams(): Params | undefined {\n return this._queryParams;\n }\n\n public get queryParamsHandling(): QueryParamsHandling | undefined {\n return this._queryParamsHandling;\n }\n\n public get replaceUrl(): boolean {\n return this._replaceUrl;\n }\n\n public get target(): string {\n return this._target;\n }\n\n public get isStyleLink(): boolean {\n return this._isStyleLink;\n }\n\n public withHref(url: string): this {\n this._url = url;\n return this;\n }\n\n public withRouterLink(...pathSegments: string[]): this {\n this._pathSegments = pathSegments;\n return this;\n }\n\n public withQueryParams(queryParams: Params, queryParamsHandling?: QueryParamsHandling): this {\n this._queryParams = queryParams;\n this._queryParamsHandling = queryParamsHandling;\n return this;\n }\n\n public withReplaceUrl(replaceUrl = false): this {\n this._replaceUrl = replaceUrl;\n return this;\n }\n\n public withTarget(target: '_self' | '_blank' = '_self'): this {\n this._target = target;\n return this;\n }\n\n public withStyleLink(isStyleLink: boolean): this {\n this._isStyleLink = isStyleLink;\n return this;\n }\n}\n\nexport enum ActionPositionEnum {\n ToolbarLeft,\n ToolbarRight,\n TableHeader,\n RowInline,\n RowClick,\n FooterLeft,\n FooterRight\n}\n\nexport enum ActionActivationTriggerEnum {\n OnClick, // action is triggered for activation on click\n OnRoute // action is triggered for activation by route url\n}\n\nexport enum ActionTypeEnum {\n Direct, // action is directly activated and executed\n Event, // action is executed by outputting event, no additional activation is done\n Editor // editor providing middle step for activation\n}\n\nexport enum ActionLevelEnum {\n Default,\n Primary,\n Secondary,\n Info,\n Help,\n Success,\n Warning,\n Danger\n}\n","import {Type} from '@angular/core';\n\nimport {Observable, of} from 'rxjs';\n\nimport {MediusQueryParam} from '../api/models';\nimport {ILookupDataProvider, LookupDataProvider} from '../data-providers';\nimport {EnumValue} from '../models';\nimport {ClassType, EnumConstantType, EnumType} from '../types';\nimport {EnumUtil, ModelUtil, TypeUtil} from '../utils';\nimport {ILookupDescriptor} from './lookup.descriptor';\n\nexport class FilterDescriptor<T> {\n protected readonly _property: string;\n protected _filterType = FilterDescriptor.TypeEnum.String;\n protected _filterProperty?: string;\n\n protected _matchModes: string[] | null = null;\n\n protected _placeholder?: string;\n protected _className = '';\n\n constructor(property: string) {\n this._property = property;\n }\n\n public get filterType() {\n return this._filterType;\n }\n\n public get filterProperty() {\n return this._filterProperty;\n }\n\n public get matchModes() {\n return this._matchModes;\n }\n\n public get placeholder() {\n return this._placeholder;\n }\n\n public get className() {\n return this._className;\n }\n\n public get property() {\n return this._property;\n }\n\n public asFilterType(filterType: FilterDescriptor.TypeEnum) {\n this._filterType = filterType;\n return this;\n }\n\n /**\n * Sets different filter property name instead of default property. Use this if API requires different property provided to perform correct filter.\n * @param filterProperty\n */\n public withFilterProperty(filterProperty: string): this {\n this._filterProperty = filterProperty;\n return this;\n }\n\n public withPlaceholder(placeholder: string): this {\n this._placeholder = placeholder;\n return this;\n }\n\n public withClassName(className: string): this {\n this._className = className;\n return this;\n }\n\n public withMatchModes(matchModes: Array<FilterDescriptor.MatchModeEnum>): this {\n this._matchModes = matchModes;\n return this;\n }\n\n public copy(): FilterDescriptor<T> {\n const descriptor = new FilterDescriptor<T>(this._property);\n this.copyFieldsTo(descriptor);\n return descriptor;\n }\n\n protected copyFieldsTo(descriptor: FilterDescriptor<T>) {\n descriptor._filterType = this._filterType;\n descriptor._filterProperty = this._filterProperty;\n descriptor._placeholder = this._placeholder;\n descriptor._className = this._className;\n }\n}\n\nexport namespace FilterDescriptor {\n export enum TypeEnum {\n String,\n Number,\n Boolean,\n Date,\n Lookup,\n LookupEnum\n }\n\n export enum MatchModeEnum {\n StartsWith = 'startsWith',\n Contains = 'contains',\n EndsWith = 'endsWith',\n Equals = 'equals',\n NotEquals = 'notEquals',\n In = 'in',\n LessThan = 'lt',\n LessThanOrEqualTo = 'lte',\n GreaterThan = 'gt',\n GreaterThanOrEqualTo = 'gte',\n Between = 'between',\n DateIs = 'dateIs',\n DateIsNot = 'dateIsNot',\n DateBefore = 'dateBefore',\n DateAfter = 'dateAfter'\n }\n}\n\nexport class FilterLookupDescriptor<T> extends FilterDescriptor<T> implements ILookupDescriptor<T> {\n protected readonly _modelType: ClassType<T> | null = null;\n protected _lookupType?: FilterLookupDescriptor.LookupTypeEnum = FilterLookupDescriptor.LookupTypeEnum.Dropdown;\n\n protected _dataProvider?: ILookupDataProvider<T, any>;\n protected _itemsLabelProperty?: string;\n protected _itemsLabelTranslate = false;\n protected _itemsValueProperty?: string;\n protected _dataKeyProperty?: string;\n protected _multiselect = false;\n\n protected _dropdownClassName = 'mng-filter-lookup-dropdown';\n\n protected _autocompleteOpenOnFocus = false;\n protected _autocompleteInlineSearch = false;\n\n constructor(property: string, modelType: ClassType<T> | null) {\n super(property);\n this._modelType = modelType;\n this._filterType = FilterDescriptor.TypeEnum.Lookup;\n ModelUtil.trySetLookupItemsProperties(this);\n }\n\n public get lookupType() {\n return this._lookupType;\n }\n\n public get dataProvider() {\n return this._dataProvider;\n }\n\n public get itemsLabelProperty() {\n return this._itemsLabelProperty;\n }\n\n public get itemsLabelTranslate() {\n return this._itemsLabelTranslate;\n }\n\n public get itemsValueProperty() {\n return this._itemsValueProperty;\n }\n\n public get dataKeyProperty() {\n return this._dataKeyProperty;\n }\n\n public get multiselect() {\n return this._multiselect;\n }\n\n public get autocompleteOpenOnFocus() {\n return this._autocompleteOpenOnFocus;\n }\n\n public get autocompleteInlineSearch() {\n return this._autocompleteInlineSearch;\n }\n\n public get dropdownClassName() {\n return this._dropdownClassName;\n }\n\n public get modelType() {\n return this._modelType;\n }\n\n public withItemsLabelProperty(itemsLabelProperty: string, translate = false): this {\n this._itemsLabelProperty = itemsLabelProperty;\n this._itemsLabelTranslate = translate;\n return this;\n }\n\n public withItemsValueProperty(itemsValueProperty: string): this {\n this._itemsValueProperty = itemsValueProperty;\n this._dataKeyProperty = itemsValueProperty;\n return this;\n }\n\n public withDataKeyProperty(dataKeyProperty: string): this {\n this._dataKeyProperty = dataKeyProperty;\n this._itemsValueProperty = dataKeyProperty;\n return this;\n }\n\n public withLookup<S>(lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>, serviceType?: Type<S>): this {\n const dataProvider = new LookupDataProvider<T, S>(this._modelType);\n if (serviceType) {\n dataProvider.withServiceType(serviceType);\n }\n dataProvider.withLookup(lookup);\n this._dataProvider = dataProvider;\n return this;\n }\n\n public withLookupDataProvider(dataProvider: ILookupDataProvider<T, any>): this {\n this._dataProvider = dataProvider;\n return this;\n }\n\n public withMultiselect(multiselect = true) {\n this._multiselect = multiselect;\n return this;\n }\n\n public withDropdownClassName(dropdownClassName: string): this {\n this._dropdownClassName = dropdownClassName;\n return this;\n }\n\n public asAutocomplete(openOnFocus = false, inlineSearch = false): this {\n this._lookupType = FilterLookupDescriptor.LookupTypeEnum.Autocomplete;\n this._autocompleteOpenOnFocus = openOnFocus;\n this._autocompleteInlineSearch = inlineSearch;\n return this;\n }\n\n public override copy(): FilterLookupDescriptor<T> {\n const descriptor = new FilterLookupDescriptor<T>(this._property, this._modelType);\n this.copyFieldsTo(descriptor);\n return descriptor;\n }\n\n protected override copyFieldsTo(filter: FilterLookupDescriptor<T>) {\n super.copyFieldsTo(filter);\n filter._dataProvider = this._dataProvider;\n filter._lookupType = this._lookupType;\n filter._itemsLabelProperty = this._itemsLabelProperty;\n filter._itemsLabelTranslate = this._itemsLabelTranslate;\n filter._itemsValueProperty = this._itemsValueProperty;\n filter._dataKeyProperty = this._dataKeyProperty;\n filter._multiselect = this._multiselect;\n filter._dropdownClassName = this._dropdownClassName;\n filter._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;\n filter._autocompleteInlineSearch = this._autocompleteInlineSearch;\n }\n}\n\nexport class FilterLookupEnumDescriptor extends FilterLookupDescriptor<EnumValue<string | number>> {\n private readonly _enumType: EnumType;\n\n constructor(property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue = false, optionsTitlePath?: string | null) {\n super(property, null);\n this._enumType = enumType;\n if (typeof optionsTitlePath === 'undefined') {\n optionsTitlePath = TypeUtil.findEnumName(enumType);\n }\n const optionEnumValues = Array.isArray(options)\n ? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath ?? undefined)\n : EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath ?? undefined);\n const dataProvider = new LookupDataProvider<EnumValue<string | number>, any>(null).withLookup(() => of(optionEnumValues));\n this.withLookupDataProvider(dataProvider);\n this.withItemsLabelProperty('title', optionsTitlePath !== null);\n this.withItemsValueProperty('value');\n }\n\n public get enumType() {\n return this._enumType;\n }\n\n public override asAutocomplete(openOnFocus = true): this {\n super.asAutocomplete(openOnFocus, true);\n return this;\n }\n\n public override copy(): FilterLookupEnumDescriptor {\n const field = new FilterLookupEnumDescriptor(this._property, this._enumType, []);\n this.copyFieldsTo(field);\n return field;\n }\n}\n\nexport namespace FilterLookupDescriptor {\n export enum LookupTypeEnum {\n Dropdown,\n Autocomplete\n }\n}\n","import {Type} from '@angular/core';\n\nimport {IColumnValueComponent} from '../models';\nimport {ClassType, EnumConstantType, EnumType} from '../types';\nimport {ModelUtil, TypeUtil} from '../utils';\nimport {FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor} from './filter.descriptor';\nimport {TableDescriptor} from './table.descriptor';\n\nexport class ColumnDescriptor<T, TT> {\n private readonly _table: TableDescriptor<TT>;\n private readonly _property: string;\n private _columnType: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.String;\n private _title?: string;\n private _jsonPath?: string;\n private _isSortEnabled = false;\n private _filterDescriptor?: FilterDescriptor<T>;\n private _displayFormat?: string;\n\n // styling\n private _headerClassName = '';\n private _className = '';\n private _width: number | null = null;\n private _minWidth: number | null = null;\n\n // enum specifics\n private _enumType?: EnumType;\n private _enumTitlePath?: string | null;\n private _enumNameAsValue = false;\n\n // boolean specifics\n private _booleanAsIcon = false;\n private _booleanYes?: string;\n private _booleanNo?: string;\n\n // model specifics\n private _objectModelType?: ClassType<any>;\n private _objectTitleProperty?: string;\n\n // custom specifics\n private _customComponentType?: Type<IColumnValueComponent<TT>>;\n\n constructor(table: TableDescriptor<TT>, property: string) {\n this._table = table;\n this._property = property;\n }\n\n public get columnType() {\n return this._columnType;\n }\n\n public get title() {\n return this._title;\n }\n\n public get jsonPath() {\n return this._jsonPath;\n }\n\n public get isSortEnabled() {\n return this._isSortEnabled;\n }\n\n public get filterDescriptor() {\n return this._filterDescriptor;\n }\n\n public get displayFormat() {\n return this._displayFormat;\n }\n\n public get table() {\n return this._table;\n }\n\n public get property() {\n return this._property;\n }\n\n public get headerClassName() {\n return this._headerClassName;\n }\n\n public get className() {\n return this._className;\n }\n\n public get width() {\n return this._width;\n }\n\n public get minWidth() {\n return this._minWidth;\n }\n\n public get enumType() {\n return this._enumType;\n }\n\n public get enumTitlePath() {\n return this._enumTitlePath;\n }\n\n public get enumNameAsValue() {\n return this._enumNameAsValue;\n }\n\n public get booleanAsIcon() {\n return this._booleanAsIcon;\n }\n\n public get booleanYes() {\n return this._booleanYes;\n }\n\n public get booleanNo() {\n return this._booleanNo;\n }\n\n public get objectModelType() {\n return this._objectModelType;\n }\n\n public get objectTitleProperty() {\n return this._objectTitleProperty;\n }\n\n public get customComponentType() {\n return this._customComponentType;\n }\n\n public asType(type: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.String): this {\n this._columnType = type;\n return this;\n }\n\n public asNumber(displayFormat = '1.0-0'): this {\n this._columnType = ColumnDescriptor.TypeEnum.Number;\n this._displayFormat = displayFormat;\n return this;\n }\n\n public asDate(displayFormat = 'dd.MM.yyyy'): this {\n this._columnType = ColumnDescriptor.TypeEnum.Date;\n this._displayFormat = displayFormat;\n return this;\n }\n\n public asBoolean(yes?: string, no?: string, asIcon = false): this {\n this._columnType = ColumnDescriptor.TypeEnum.Boolean;\n this._booleanAsIcon = asIcon;\n this._booleanYes = yes;\n this._booleanNo = no;\n return this;\n }\n\n public asEnum(enumType: EnumType, nameAsValue = false, titlePath?: string | null): this {\n this._columnType = ColumnDescriptor.TypeEnum.Enum;\n this._enumType = enumType;\n this._enumNameAsValue = nameAsValue;\n if (typeof titlePath === 'undefined') {\n titlePath = TypeUtil.findEnumName(enumType);\n }\n this._enumTitlePath = titlePath;\n return this;\n }\n\n public asCustomComponent(customComponentType: Type<IColumnValueComponent<TT>>): this {\n this._columnType = ColumnDescriptor.TypeEnum.Custom;\n this._customComponentType = customComponentType;\n return this;\n }\n\n public withClassName(className?: string, headerClassName?: string): this {\n this._className = className ?? '';\n this._headerClassName = headerClassName ?? '';\n return this;\n }\n\n public withWidth(width?: number, minWidth?: number): this {\n this._width = width ?? null;\n this._minWidth = minWidth ?? null;\n return this;\n }\n\n public withObjectProperty<MT>(modelType: ClassType<MT>, titleProperty?: string): this {\n this._objectModelType = modelType;\n if (!titleProperty) {\n this._objectTitleProperty = ModelUtil.findTitleAttribute(modelType) ?? undefined;\n } else {\n this._objectTitleProperty = titleProperty;\n }\n return this;\n }\n\n public withTitle(title: string): this {\n this._title = title;\n return this;\n }\n\n public withJsonPath(path: string): this {\n this._jsonPath = path;\n return this;\n }\n\n public withFilter(forceSimple = false): FilterDescriptor<T> {\n this._filterDescriptor = new FilterDescriptor<any>(this._property);\n let filterType: FilterDescriptor.TypeEnum;\n\n if (!forceSimple && this._objectModelType) {\n return this.withFilterLookup();\n }\n switch (this._columnType) {\n case ColumnDescriptor.TypeEnum.Number:\n filterType = FilterDescriptor.TypeEnum.Number;\n break;\n case ColumnDescriptor.TypeEnum.Boolean:\n filterType = FilterDescriptor.TypeEnum.Boolean;\n break;\n case ColumnDescriptor.TypeEnum.Date:\n filterType = FilterDescriptor.TypeEnum.Date;\n break;\n case ColumnDescriptor.TypeEnum.Enum:\n if (!forceSimple) {\n return this.withFilterLookupEnum();\n } else {\n filterType = FilterDescriptor.TypeEnum.String;\n break;\n }\n case ColumnDescriptor.TypeEnum.String:\n case ColumnDescriptor.TypeEnum.Custom:\n default:\n filterType = FilterDescriptor.TypeEnum.String;\n break;\n }\n this._filterDescriptor.asFilterType(filterType);\n return this._filterDescriptor;\n }\n\n public withFilterLookup(): FilterLookupDescriptor<T> {\n const filterDescriptor = new FilterLookupDescriptor<any>(this._property, this._objectModelType ?? null);\n this._filterDescriptor = filterDescriptor;\n return filterDescriptor;\n }\n\n public withFilterLookupEnum(options?: Array<EnumConstantType>): FilterLookupEnumDescriptor {\n if (this._columnType !== ColumnDescriptor.TypeEnum.Enum || !this._enumType) {\n throw new Error(`Column ${this._property} is not of type enum or enum type is undefined.`);\n }\n const filterDescriptor = new FilterLookupEnumDescriptor(this._property, this._enumType, options, this._enumNameAsValue, this._enumTitlePath);\n this._filterDescriptor = filterDescriptor;\n return filterDescriptor;\n }\n\n public withSort(isEnabled = true): this {\n this._isSortEnabled = isEnabled;\n return this;\n }\n\n public copy(): ColumnDescriptor<T, TT> {\n const descriptor = new ColumnDescriptor<T, TT>(this._table, this._property);\n descriptor._jsonPath = this._jsonPath;\n descriptor._title = this._title;\n descriptor._isSortEnabled = this._isSortEnabled;\n descriptor._columnType = this._columnType;\n descriptor._filterDescriptor = this._filterDescriptor?.copy();\n descriptor._enumType = this._enumType;\n descriptor._enumTitlePath = this._enumTitlePath;\n descriptor._enumNameAsValue = this._enumNameAsValue;\n descriptor._booleanAsIcon = this._booleanAsIcon;\n descriptor._booleanYes = this._booleanYes;\n descriptor._booleanNo = this._booleanNo;\n descriptor._objectModelType = this._objectModelType;\n descriptor._objectTitleProperty = this._objectTitleProperty;\n descriptor._headerClassName = this._headerClassName;\n descriptor._className = this._className;\n descriptor._width = this._width;\n descriptor._minWidth = this._minWidth;\n return descriptor;\n }\n}\n\nexport namespace ColumnDescriptor {\n export enum TypeEnum {\n String,\n Number,\n Boolean,\n Date,\n Enum,\n Custom\n }\n}\n","import {ClassType, EnumConstantType, EnumType, MngFieldValidationMessage, MngFieldValidator} from '../types';\nimport {I18nUtils} from '../utils';\nimport {\n AFieldDescriptor,\n FieldGroupDescriptor,\n FieldInputDescriptor,\n FieldLookupDescriptor,\n FieldLookupEnumDescriptor,\n FieldManyEditorDescriptor,\n FieldManyToManyEditorDescriptor,\n FieldTabGroupDescriptor,\n ModelDescriptor,\n TableDescriptor,\n TableviewDescriptor\n} from './';\n\nexport class EditorDescriptor<T> {\n public static readonly defaultGroupName = '_default';\n\n private readonly _model: ModelDescriptor<T>;\n private readonly _tableviewEditorType: EditorDescriptor.TableviewEditorTypeEnum;\n private readonly _tabs: Array<FieldTabGroupDescriptor<T>> = [];\n private readonly _groups: Array<FieldGroupDescriptor<T>> = [];\n private readonly _fields: Array<AFieldDescriptor<any, T>> = [];\n private _currentTabGroup?: FieldTabGroupDescriptor<T>;\n private _currentGroup?: FieldGroupDescriptor<T>;\n\n private _disabled = false;\n\n constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string, tableviewEditorType = EditorDescriptor.TableviewEditorTypeEnum.None) {\n this._model = new ModelDescriptor<T>(modelType, idProperty, titleProperty);\n this._tableviewEditorType = tableviewEditorType;\n }\n\n public get model() {\n return this._model;\n }\n\n public get tabs() {\n return this._tabs;\n }\n\n public get fields() {\n return this._fields;\n }\n\n public get tableviewEditorType() {\n return this._disabled;\n }\n\n public get disabled() {\n return this._disabled;\n }\n\n public createTabGroup(name: string, title?: string): FieldTabGroupDescriptor<T> {\n const tabGroup = new FieldTabGroupDescriptor<T>(this, name);\n if (!title) {\n title = I18nUtils.Type.getTabKey(this.model.typeName, name);\n }\n tabGroup.withTitle(title);\n this.createTabGroupDescriptor(tabGroup);\n return tabGroup;\n }\n\n public createFieldGroup(name: string, title?: string | null): FieldGroupDescriptor<T> {\n const fieldGroup = new FieldGroupDescriptor<T>(this, name);\n if (title !== null) {\n if (!title) {\n title = I18nUtils.Type.getGroupKey(this.model.typeName, name);\n }\n fieldGroup.withTitle(title);\n }\n this.createFieldGroupDescriptor(fieldGroup);\n return fieldGroup;\n }\n\n public addFieldDescriptor<FT>(field: AFieldDescriptor<FT, T>): this {\n this.createDefaultGroup();\n this._fields.push(field);\n this._currentGroup?.addField(field);\n return this;\n }\n\n public addField(property: string): FieldInputDescriptor<T> {\n const field = new FieldInputDescriptor<T>(this, property);\n this.addFieldDescriptor(field);\n return field;\n }\n\n public removeField(property: string): this {\n const fieldIdx = this._fields.findIndex(f => f.property === property);\n if (fieldIdx < 0) {\n throw new Error(`Field ${property} does not exist.`);\n }\n const field = this._fields[fieldIdx];\n if (field.group) {\n const groupFieldIdx = field.group.fields.findIndex(f => f instanceof AFieldDescriptor && f.property === property);\n if (groupFieldIdx >= 0) {\n field.group.fields.splice(groupFieldIdx, 1);\n }\n }\n this._fields.splice(fieldIdx, 1);\n return this;\n }\n\n public getField(property: string): AFieldDescriptor<any, T> | null {\n return this._fields.find(f => f.property === property) ?? null;\n }\n\n public addFieldLookup<FT>(property: string, modelType: ClassType<FT>): FieldLookupDescriptor<FT, T> {\n const field = new FieldLookupDescriptor<FT, T>(this, property, modelType);\n this.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldLookupEnum(\n property: string,\n enumType: EnumType,\n options?: Array<EnumConstantType>,\n nameAsValue = false,\n optionsTitlePath?: string | null\n ): FieldLookupEnumDescriptor<T> {\n const field = new FieldLookupEnumDescriptor(this, property, enumType, options, nameAsValue, optionsTitlePath);\n this.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldManyEditor<FT>(property: string, tableviewDescriptor: TableviewDescriptor<FT>): FieldManyEditorDescriptor<FT, T> {\n const field = new FieldManyEditorDescriptor(this, property, tableviewDescriptor);\n this.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldManyToManyEditor<FT>(\n property: string,\n mainTableDescriptor: TableDescriptor<FT>,\n lookupTableDescriptor: TableDescriptor<FT>\n ): FieldManyToManyEditorDescriptor<FT, T> {\n const field = new FieldManyToManyEditorDescriptor(this, property, mainTableDescriptor, lookupTableDescriptor);\n this.addFieldDescriptor(field);\n return field;\n }\n\n public withDisabled(disabled = true): this {\n this._disabled = disabled;\n return this;\n }\n\n public addValidation(name: string, validator?: MngFieldValidator, message?: MngFieldValidationMessage) {\n if (this._currentGroup) {\n this._currentGroup.withValidation(name, validator, message);\n }\n }\n\n public copy(): EditorDescriptor<T> {\n const editor = new EditorDescriptor<T>(this.model.type, this.model.idPropertyName, this.model.titlePropertyName);\n for (const tabGroup of this._tabs) {\n editor.createTabGroupDescriptor(tabGroup.copy());\n }\n for (const tabGroup of editor._tabs) {\n for (const fieldGroup of tabGroup.fields) {\n editor._fields.push(...fieldGroup.fields);\n }\n editor._groups.push(...tabGroup.fields);\n }\n editor._currentTabGroup = editor._tabs[editor._tabs.length - 1];\n editor._currentGroup = editor._currentTabGroup.fields[editor._currentTabGroup.fields.length - 1];\n editor._disabled = this._disabled;\n return editor;\n }\n\n public createFieldGroupDescriptor(fieldGroup: FieldGroupDescriptor<T>): this {\n this.createDefaultTabGroup();\n this._currentGroup = fieldGroup;\n this._groups.push(fieldGroup);\n this._currentTabGroup?.addField(fieldGroup);\n return this;\n }\n\n private createTabGroupDescriptor(tabGroup: FieldTabGroupDescriptor<T>): this {\n this._currentTabGroup = tabGroup;\n this._tabs.push(tabGroup);\n return this;\n }\n\n private createDefaultGroup() {\n this.createDefaultTabGroup();\n if (this._currentTabGroup?.fields.length === 0) {\n this.createFieldGroup(EditorDescriptor.defaultGroupName, null);\n }\n }\n\n private createDefaultTabGroup() {\n if (this._tabs.length === 0) {\n this.createTabGroup(EditorDescriptor.defaultGroupName, 'general.general');\n }\n }\n}\n\nexport namespace EditorDescriptor {\n export enum TableviewEditorTypeEnum {\n None,\n View,\n Edit,\n Add\n }\n}\n","import {Type} from '@angular/core';\n\nexport class MngFormEditorSubmitEvent<T> {\n public success = true;\n\n constructor(public readonly formItem: T) {}\n}\n\nexport enum MngFormFieldEventTypeEnum {\n Component,\n ValueChange,\n DataProvider,\n Dialog,\n Other\n}\n\nexport class MngFormFieldEventComponentSubtype {\n public static readonly ON_INIT = 'Component.OnInit';\n public static readonly ON_VIEW_INIT = 'Component.OnViewInit';\n public static readonly ON_CONTENT_INIT = 'Component.OnContentInit';\n public static readonly ON_DESTROY = 'Component.OnDestroy';\n}\n\nexport class MngFormFieldEventDialogSubtype {\n public static readonly VISIBILITY = 'Dialog.Visibility';\n public static readonly TABLE_CAPTION_COMPONENT_INSTANCE = 'Dialog.MngTable.CaptionComponentInstance';\n public static readonly TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE = 'Dialog.MngTable.ColumnActionsComponentInstance';\n}\n\nexport interface MngFormFieldEventData<T, ET> {\n eventSubtype?: string;\n value?: T;\n formValue?: ET;\n\n [key: string]: any;\n}\n\nexport class MngFormFieldEvent<T, ET> {\n constructor(\n public readonly type: MngFormFieldEventTypeEnum,\n public readonly componentType: Type<any>,\n public readonly componentInstance: any,\n public readonly data: MngFormFieldEventData<T, ET> = {}\n ) {}\n}\n","import {Type} from '@angular/core';\nimport {Validators} from '@angular/forms';\n\nimport {FormlyFieldConfig} from '@ngx-formly/core';\nimport {Observable, Subject, of} from 'rxjs';\n\nimport {MediusQueryParam, MediusQueryResult} from '../api/models';\nimport {MngFormFieldEvent, MngFormFieldEventData, MngFormFieldEventTypeEnum} from '../components/form/models';\nimport {ILookupDataProvider, ITableDataProvider, LookupDataProvider, TableviewDataProvider} from '../data-providers';\nimport {EnumValue} from '../models';\nimport {ClassType, EnumConstantType, EnumType, MngFieldValidationMessage, MngFieldValidator} from '../types';\nimport {EnumUtil, I18nUtils, ModelUtil, TypeUtil} from '../utils';\nimport {ActionDescriptor, EditorDescriptor, FieldValidationDescriptor, FilterLookupDescriptor, ILookupDescriptor, TableDescriptor, TableviewDescriptor} from './';\nimport {FieldConfig, FieldLookupConfig} from './field.descriptor.interface';\n\nexport abstract class AGenericFieldDescriptor<ET> {\n protected readonly _editor: EditorDescriptor<ET>;\n protected _config: FieldConfig = {};\n\n protected constructor(editor: EditorDescriptor<ET>) {\n this._editor = editor;\n }\n\n public get editor() {\n return this._editor;\n }\n\n public get config() {\n return this._config;\n }\n\n public withConfig(config: FieldConfig): this {\n this._config = config;\n return this;\n }\n}\n\nexport abstract class AFieldDescriptor<T, ET> extends AGenericFieldDescriptor<ET> {\n protected readonly _property: string;\n protected _group?: AFieldGroupDescriptor<ET>;\n protected _label?: string | null;\n\n protected _placeholder?: string;\n protected _helpText?: string;\n\n protected _required = false;\n protected _disabled = false;\n protected _defaultValue?: T;\n protected _getter?: (item: ET) => T;\n protected _setter?: (item: ET, value: T) => void;\n protected _validations: Array<FieldValidationDescriptor> = [];\n protected _requiredExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;\n protected _disabledExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;\n protected _hiddenExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>;\n\n protected _className = '';\n protected _fieldClassName?: string;\n protected _labelClassName = '';\n protected _inputClassName = '';\n protected _size: FieldDescriptor.SizeEnum = FieldDescriptor.SizeEnum.Normal;\n\n protected readonly _eventsSubject = new Subject<MngFormFieldEvent<T, ET>>();\n\n protected constructor(editor: EditorDescriptor<ET>, property: string) {\n super(editor);\n this._property = property;\n this._label = I18nUtils.Type.getPropertyKey(this._editor.model.typeName, property);\n }\n\n public get property() {\n return this._property;\n }\n\n public get group() {\n return this._group;\n }\n\n public get label() {\n return this._label;\n }\n\n public get placeholder() {\n return this._placeholder;\n }\n\n public get helpText() {\n return this._helpText;\n }\n\n public get required() {\n return this._required;\n }\n\n public get disabled() {\n return this._disabled;\n }\n\n public get defaultValue() {\n return this._defaultValue;\n }\n\n public get getter() {\n return this._getter;\n }\n\n public get setter() {\n return this._setter;\n }\n\n public get validations() {\n return this._validations;\n }\n\n public get requiredExpression() {\n return this._requiredExpression;\n }\n\n public get disabledExpression() {\n return this._disabledExpression;\n }\n\n public get hiddenExpression() {\n return this._hiddenExpression;\n }\n\n public get className() {\n return this._className;\n }\n\n public get fieldClassName() {\n return this._fieldClassName;\n }\n\n public get labelClassName() {\n return this._labelClassName;\n }\n\n public get inputClassName() {\n return this._inputClassName;\n }\n\n public get size() {\n return this._size;\n }\n\n public get isSizeSmall() {\n return this._size === FieldDescriptor.SizeEnum.Small;\n }\n\n public get isSizeLarge() {\n return this._size === FieldDescriptor.SizeEnum.Large;\n }\n\n public abstract copy(): AFieldDescriptor<T, ET>;\n\n public withLabel(label: string | null): this {\n this._label = label;\n return this;\n }\n\n public withPlaceholder(placeholder: string): this {\n this._placeholder = placeholder;\n return this;\n }\n\n public withHelpText(helpText: string): this {\n this._helpText = helpText;\n return this;\n }\n\n public withRequired(required = true, requiredExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this {\n this._required = required;\n if (requiredExpression) {\n this._requiredExpression = requiredExpression;\n }\n return this;\n }\n\n public withDisabled(disabled = true, disabledExpression?: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this {\n this._disabled = disabled;\n if (disabledExpression) {\n this._disabledExpression = disabledExpression;\n }\n return this;\n }\n\n public withHidden(hiddenExpression: string | ((model: any, formState?: any, field?: FormlyFieldConfig) => boolean) | Observable<boolean>): this {\n this._hiddenExpression = hiddenExpression;\n return this;\n }\n\n public withDefaultValue(defaultValue: T): this {\n this._defaultValue = defaultValue;\n return this;\n }\n\n public withGetter(getter: (item: ET) => T): this {\n this._getter = getter;\n return this;\n }\n\n public withSetter(setter: (item: ET, value: T) => void): this {\n this._setter = setter;\n return this;\n }\n\n public withValidation(name: string, validator?: MngFieldValidator, message?: MngFieldValidationMessage): this {\n this._validations.push(new FieldValidationDescriptor(name, validator, message));\n return this;\n }\n\n public withClassName(className: string, labelClassName = '', inputClassName = '', fieldClassName?: string): this {\n this._className = className;\n this._labelClassName = labelClassName;\n this._inputClassName = inputClassName;\n this._fieldClassName = fieldClassName;\n return this;\n }\n\n public withSize(size: FieldDescriptor.SizeEnum = FieldDescriptor.SizeEnum.Normal): this {\n this._size = size;\n return this;\n }\n\n public nextEvent(type: MngFormFieldEventTypeEnum, cmpType: Type<any>, cmpInstance: any, data?: MngFormFieldEventData<T, ET>) {\n this._eventsSubject.next(new MngFormFieldEvent(type, cmpType, cmpInstance, data));\n }\n\n public get events$() {\n return this._eventsSubject.asObservable();\n }\n\n protected copyFieldsTo(obj: AFieldDescriptor<T, ET>) {\n obj._label = this._label;\n obj._placeholder = this._placeholder;\n obj._helpText = this._helpText;\n obj._required = this._required;\n obj._disabled = this._disabled;\n obj._defaultValue = this._defaultValue;\n obj._requiredExpression = this._requiredExpression;\n obj._hiddenExpression = this._hiddenExpression;\n obj._disabledExpression = this._disabledExpression;\n obj._className = this._className;\n obj._size = this.size;\n obj._getter = this._getter;\n obj._setter = this._setter;\n obj._validations = this._validations;\n }\n}\n\nexport namespace FieldDescriptor {\n export enum SizeEnum {\n Small,\n Normal,\n Large\n }\n}\n\nexport class FieldInputDescriptor<ET> extends AFieldDescriptor<string | number | boolean | Date, ET> {\n private _fieldType: FieldInputDescriptor.TypeEnum = FieldInputDescriptor.TypeEnum.Text;\n\n // textarea specific properties\n private _rows?: number;\n\n // number specific properties\n private _numberMin?: number;\n private _numberMax?: number;\n private _numberStep?: number;\n private _numberMinFractionDigits?: number;\n private _numberMaxFractionDigits?: number;\n private _numberUseGrouping = true;\n\n // radio specific properties\n private _radioOptions: Array<EnumValue<string | number | boolean | Date>> = [];\n\n // datepicker specific properties\n private _datePickerFormat?: string;\n private _datePickerMin?: Date;\n private _datePickerMax?: Date;\n private _datePickerShowTime = false;\n\n // input specific properties\n private _maxLength?: number;\n private _minLength?: number;\n private _pattern?: string | RegExp;\n\n // mask specific properties\n private _mask?: string;\n private _slotChar?: string;\n\n // custom component properties\n private _customComponentName?: string;\n\n constructor(editor: EditorDescriptor<ET>, property: string) {\n super(editor, property);\n }\n\n public get fieldType() {\n return this._fieldType;\n }\n\n public get rows() {\n return this._rows;\n }\n\n public get numberMin() {\n return this._numberMin;\n }\n\n public get numberMax() {\n return this._numberMax;\n }\n\n public get numberStep() {\n return this._numberStep;\n }\n\n public get numberMinFractionDigits() {\n return this._numberMinFractionDigits;\n }\n\n public get numberMaxFractionDigits() {\n return this._numberMaxFractionDigits;\n }\n\n public get numberUseGrouping() {\n return this._numberUseGrouping;\n }\n\n public get radioOptions() {\n return this._radioOptions;\n }\n\n public get datePickerFormat() {\n return this._datePickerFormat;\n }\n\n public get datePickerMin() {\n return this._datePickerMin;\n }\n\n public get datePickerMax() {\n return this._datePickerMax;\n }\n\n public get datePickerShowTime() {\n return this._datePickerShowTime;\n }\n\n public get maxLength() {\n return this._maxLength;\n }\n\n public get minLength() {\n return this._minLength;\n }\n\n public get pattern() {\n return this._pattern;\n }\n\n public get mask() {\n return this._mask;\n }\n\n public get slotChar() {\n return this._slotChar;\n }\n\n public get customComponentName() {\n return this._customComponentName;\n }\n\n public asHidden(): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Hidden;\n return this;\n }\n\n public asLabel(): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Label;\n return this;\n }\n\n public asText(minLength?: number, maxLength?: number, pattern?: string | RegExp, isEmail?: boolean): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Text;\n this._minLength = minLength;\n this._maxLength = maxLength;\n this._pattern = pattern;\n if (isEmail) {\n this.withValidation('email', control => Validators.email(control));\n }\n return this;\n }\n\n public asTextarea(rows = 3, minLength?: number, maxLength?: number, pattern?: string | RegExp): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Textarea;\n this._rows = rows;\n this._minLength = minLength;\n this._maxLength = maxLength;\n this._pattern = pattern;\n return this;\n }\n\n public asNumber(step?: number, min?: number, max?: number, minFractionDigits?: number, maxFractionDigits?: number, numberUseGrouping = true): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Number;\n this._numberStep = step;\n this._numberMinFractionDigits = minFractionDigits;\n this._numberMaxFractionDigits = maxFractionDigits;\n this._numberMin = min ?? Number.MIN_SAFE_INTEGER;\n this._numberMax = max ?? Number.MAX_SAFE_INTEGER;\n this._numberUseGrouping = numberUseGrouping;\n\n return this;\n }\n\n public asSwitch(): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Switch;\n return this;\n }\n\n public asRadio(options: Array<string | number>, optionsTitlePath?: string): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Radio;\n this._radioOptions = options.map(o => <EnumValue<string | number>>{value: o, title: `${optionsTitlePath ? `${optionsTitlePath}.` : ''}${o}`});\n return this;\n }\n\n public asRadioFromEnum(enumType: EnumType, optionsTitlePath?: string | null, values?: Array<EnumConstantType>, nameAsValue = false): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Radio;\n if (typeof optionsTitlePath === 'undefined') {\n optionsTitlePath = TypeUtil.findEnumName(enumType);\n }\n this._radioOptions = Array.isArray(values)\n ? EnumUtil.fromValuesAsEnumValueArray(enumType, values, nameAsValue, optionsTitlePath ?? undefined)\n : EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath ?? undefined);\n return this;\n }\n\n public asDatePicker(format?: string, min?: Date, max?: Date, showTime?: boolean): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Datepicker;\n this._datePickerFormat = format ? format : 'dd.mm.yy';\n this._datePickerMin = min;\n this._datePickerMax = max;\n this._datePickerShowTime = showTime ?? false;\n return this;\n }\n\n public asMask(mask: string, slotChar: string): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Mask;\n this._mask = mask;\n this._slotChar = slotChar;\n return this;\n }\n\n public asCustomComponent(customComponentName: string): this {\n this._fieldType = FieldInputDescriptor.TypeEnum.Custom;\n this._customComponentName = customComponentName;\n return this;\n }\n\n public copy(): FieldInputDescriptor<ET> {\n const field = new FieldInputDescriptor<ET>(this._editor, this._property);\n this.copyFieldsTo(field);\n field._fieldType = this._fieldType;\n field._rows = this._rows;\n field._numberMin = this._numberMin;\n field._numberMax = this._numberMax;\n field._numberStep = this._numberStep;\n field._numberMinFractionDigits = this._numberMinFractionDigits;\n field._numberMaxFractionDigits = this._numberMaxFractionDigits;\n field._numberUseGrouping = this._numberUseGrouping;\n field._radioOptions = [...this._radioOptions];\n field._datePickerFormat = this._datePickerFormat;\n field._datePickerMin = this._datePickerMin;\n field._datePickerMax = this._datePickerMax;\n field._datePickerShowTime = this._datePickerShowTime;\n field._maxLength = this._maxLength;\n field._minLength = this._minLength;\n field._pattern = this._pattern;\n field._mask = this._mask;\n field._slotChar = this._slotChar;\n field._customComponentName = this._customComponentName;\n return field;\n }\n}\n\nexport namespace FieldInputDescriptor {\n export enum TypeEnum {\n Hidden,\n Label,\n Text,\n Textarea,\n Number,\n Switch,\n Radio,\n Datepicker,\n Mask,\n Custom\n }\n}\n\nexport class FieldLookupDescriptor<T, ET> extends AFieldDescriptor<T, ET> implements ILookupDescriptor<T> {\n protected readonly _modelType: ClassType<T> | null;\n protected _lookupType: FieldLookupDescriptor.LookupTypeEnum = FieldLookupDescriptor.LookupTypeEnum.Dropdown;\n protected _itemsLabelProperty?: string;\n protected _itemsLabelTranslate = false;\n protected _itemsValueProperty?: string;\n protected _itemsDisabledProperty?: string;\n protected _dataKeyProperty?: string;\n protected _dataProvider?: ILookupDataProvider<T, any>;\n\n protected _dropdownClassName = 'mng-filter-lookup-dropdown';\n\n protected _autocompleteOpenOnFocus = false;\n protected _autocompleteInlineSearch = false;\n\n protected _dialogTableDescriptor?: TableDescriptor<T>;\n protected _dialogTableDataProvider?: ITableDataProvider<T, any>;\n\n constructor(editor: EditorDescriptor<ET>, property: string, modelType: ClassType<T> | null) {\n super(editor, property);\n this._modelType = modelType;\n ModelUtil.trySetLookupItemsProperties(this);\n }\n\n public get lookupType() {\n return this._lookupType;\n }\n\n public get itemsLabelProperty() {\n return this._itemsLabelProperty;\n }\n\n public get itemsLabelTranslate() {\n return this._itemsLabelTranslate;\n }\n\n public get itemsValueProperty() {\n return this._itemsValueProperty;\n }\n\n public get itemsDisabledProperty() {\n return this._itemsDisabledProperty;\n }\n\n public get dataKeyProperty() {\n return this._dataKeyProperty;\n }\n\n public get dataProvider() {\n return this._dataProvider;\n }\n\n public get autocompleteOpenOnFocus() {\n return this._autocompleteOpenOnFocus;\n }\n\n public get autocompleteInlineSearch() {\n return this._autocompleteInlineSearch;\n }\n\n public get dropdownClassName() {\n return this._dropdownClassName;\n }\n\n public get modelType() {\n return this._modelType;\n }\n\n public get dialogTableDescriptor() {\n return this._dialogTableDescriptor;\n }\n\n public get dialogTableDataProvider() {\n return this._dialogTableDataProvider;\n }\n\n public withItemsLabelProperty(itemsLabelProperty: string, translate = false): this {\n this._itemsLabelProperty = itemsLabelProperty;\n this._itemsLabelTranslate = translate;\n return this;\n }\n\n public withItemsValueProperty(itemsValueProperty: string): this {\n this._itemsValueProperty = itemsValueProperty;\n this._dataKeyProperty = undefined;\n return this;\n }\n\n public withItemsDisabledProperty(itemsDisabledProperty: string): this {\n this._itemsDisabledProperty = itemsDisabledProperty;\n return this;\n }\n\n public withDataKeyProperty(property: string): this {\n this._dataKeyProperty = property;\n this._itemsValueProperty = undefined;\n return this;\n }\n\n public withLookup<S>(lookup: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<T>>, serviceType?: Type<S>): this {\n const dataProvider = new LookupDataProvider<T, S>(this._modelType);\n if (serviceType) {\n dataProvider.withServiceType(serviceType);\n }\n dataProvider.withLookup(lookup);\n this._dataProvider = dataProvider;\n return this;\n }\n\n public withLookupDataProvider(dataProvider: ILookupDataProvider<T, any>): this {\n this._dataProvider = dataProvider;\n return this;\n }\n\n public override withConfig(config: FieldLookupConfig): this {\n return super.withConfig(config);\n }\n\n public asAutocomplete(openOnFocus = false, inlineSearch = false): this {\n this._lookupType = FilterLookupDescriptor.LookupTypeEnum.Autocomplete;\n this._autocompleteOpenOnFocus = openOnFocus;\n this._autocompleteInlineSearch = inlineSearch;\n return this;\n }\n\n public asDialog(lookupTableDescriptor: TableDescriptor<T>, tableDataProvider?: ITableDataProvider<T, any>): this {\n this._lookupType = FieldLookupDescriptor.LookupTypeEnum.Dialog;\n this._dialogTableDescriptor = lookupTableDescriptor;\n this._dialogTableDataProvider = tableDataProvider;\n return this;\n }\n\n public copy(): FieldLookupDescriptor<T, ET> {\n const field = new FieldLookupDescriptor(this._editor, this._property, this._modelType);\n this.copyFieldsTo(field);\n field._lookupType = this._lookupType;\n field._itemsLabelProperty = this._itemsLabelProperty;\n field._itemsLabelTranslate = this._itemsLabelTranslate;\n field._itemsValueProperty = this._itemsValueProperty;\n field._itemsDisabledProperty = this._itemsDisabledProperty;\n field._dataKeyProperty = this._dataKeyProperty;\n field._dataProvider = this._dataProvider;\n field._dropdownClassName = this._dropdownClassName;\n field._autocompleteOpenOnFocus = this._autocompleteOpenOnFocus;\n field._autocompleteInlineSearch = this._autocompleteInlineSearch;\n field._dialogTableDescriptor = this._dialogTableDescriptor;\n return field;\n }\n}\n\nexport namespace FieldLookupDescriptor {\n export enum LookupTypeEnum {\n Dropdown,\n Autocomplete,\n Dialog\n }\n}\n\nexport class FieldLookupEnumDescriptor<ET> extends FieldLookupDescriptor<EnumValue<string | number>, ET> {\n private readonly _enumType: EnumType;\n private readonly _optionEnumValues: EnumValue<string | number>[];\n private readonly _nameAsValue: boolean = false;\n\n constructor(editor: EditorDescriptor<ET>, property: string, enumType: EnumType, options?: Array<EnumConstantType>, nameAsValue = false, optionsTitlePath?: string | null) {\n super(editor, property, null);\n this._enumType = enumType;\n this._nameAsValue = nameAsValue;\n if (typeof optionsTitlePath === 'undefined') {\n optionsTitlePath = TypeUtil.findEnumName(enumType);\n }\n this._optionEnumValues = Array.isArray(options)\n ? EnumUtil.fromValuesAsEnumValueArray(enumType, options, nameAsValue, optionsTitlePath ?? undefined)\n : EnumUtil.fromConstantsAsEnumValueArray(enumType, nameAsValue, optionsTitlePath ?? undefined);\n const dataProvider = new LookupDataProvider<EnumValue<string | number>, any>(null).withLookup(() => of(this._optionEnumValues));\n this.withLookupDataProvider(dataProvider);\n this.withItemsLabelProperty('title', optionsTitlePath !== null);\n this.withItemsValueProperty('value');\n this.withItemsDisabledProperty('disabled');\n }\n\n public get enumType() {\n return this._enumType;\n }\n\n public withDisabledOptions(...disabledOptions: Array<EnumConstantType>): this {\n for (const disabledOption of disabledOptions) {\n const disabledOptionValue = this._nameAsValue ? EnumUtil.getConstantName(this._enumType, disabledOption) : disabledOption;\n if (disabledOptionValue) {\n const option = this._optionEnumValues.find(o => o.value === disabledOptionValue);\n if (option) {\n option.disabled = true;\n }\n }\n }\n return this;\n }\n\n public withDefaultValueEnum(defaultValue: EnumConstantType): this {\n const defaultOptionValue = this._nameAsValue ? EnumUtil.getConstantName(this._enumType, defaultValue) : defaultValue;\n if (defaultOptionValue) {\n const option = this._optionEnumValues.find(o => o.value === defaultOptionValue);\n if (option) {\n this.withDefaultValue(option);\n }\n }\n return this;\n }\n\n public override asAutocomplete(openOnFocus = true): this {\n super.asAutocomplete(openOnFocus, true);\n return this;\n }\n\n public override copy(): FieldLookupEnumDescriptor<ET> {\n const field = new FieldLookupEnumDescriptor<ET>(this._editor, this._property, this._enumType, []);\n this.copyFieldsTo(field);\n field._lookupType = this._lookupType;\n field._itemsLabelProperty = this._itemsLabelProperty;\n field._itemsValueProperty = this._itemsValueProperty;\n field._itemsDisabledProperty = this._itemsDisabledProperty;\n field._dataKeyProperty = this._dataKeyProperty;\n field._dataProvider = this._dataProvider;\n return field;\n }\n}\n\nexport class FieldManyToManyEditorDescriptor<T, ET> extends AFieldDescriptor<T, ET> {\n private readonly _mainTableDescriptor: TableDescriptor<T>; // table descriptor for main table component\n private readonly _lookupTableDescriptor: TableDescriptor<T>; // table descriptor for where select will be applied\n private _fieldType: FieldManyToManyEditorDescriptor.TypeEnum = FieldManyToManyEditorDescriptor.TypeEnum.DialogTableMultiselect;\n private _lookupTableDataProvider: ITableDataProvider<T, any> | null = null;\n private _actions: Array<FieldManyToManyEditorDescriptor.ActionEnum> = [];\n private _hasLookupExcludeValues = false;\n private _excludeFilterProperty = '';\n private _excludeValueProperty = '';\n\n constructor(editor: EditorDescriptor<ET>, property: string, mainTableDescriptor: TableDescriptor<T>, lookupTableDescriptor: TableDescriptor<T>) {\n super(editor, property);\n this._mainTableDescriptor = mainTableDescriptor;\n this._lookupTableDescriptor = lookupTableDescriptor;\n this._actions.push(FieldManyToManyEditorDescriptor.ActionEnum.Add, FieldManyToManyEditorDescriptor.ActionEnum.Delete);\n }\n\n public get fieldType() {\n return this._fieldType;\n }\n\n public get lookupTableDataProvider() {\n return this._lookupTableDataProvider;\n }\n\n public get actions() {\n return this._actions;\n }\n\n public get hasLookupExcludeValues() {\n return this._hasLookupExcludeValues;\n }\n\n public get excludeFilterProperty() {\n return this._excludeFilterProperty;\n }\n\n public get excludeValueProperty() {\n return this._excludeValueProperty;\n }\n\n public get mainTableDescriptor() {\n return this._mainTableDescriptor;\n }\n\n public get lookupTableDescriptor() {\n return this._lookupTableDescriptor;\n }\n\n public withLookup<S>(getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>, serviceType?: Type<S>): this {\n const dataProvider = new TableviewDataProvider<T, S>(this._mainTableDescriptor.model.type);\n if (serviceType) {\n dataProvider.withServiceType(serviceType);\n }\n dataProvider.withGetAll(getAll);\n this._lookupTableDataProvider = dataProvider;\n return this;\n }\n\n public withLookupDataProvider(dataProvider: ITableDataProvider<T, any>): this {\n this._lookupTableDataProvider = dataProvider;\n return this;\n }\n\n public withActions(actions: Array<FieldManyToManyEditorDescriptor.ActionEnum> = []): this {\n this.actions.push(...actions);\n return this;\n }\n\n public withLookupExclude(filterProperty: string, valueProperty: string, hasLookupExclude = true): this {\n this._hasLookupExcludeValues = hasLookupExclude;\n this._excludeFilterProperty = filterProperty;\n this._excludeValueProperty = valueProperty;\n return this;\n }\n\n public copy(): FieldManyToManyEditorDescriptor<T, ET> {\n const field = new FieldManyToManyEditorDescriptor(this._editor, this._property, this._mainTableDescriptor.copy(), this._lookupTableDescriptor.copy());\n this.copyFieldsTo(field);\n field._fieldType = this._fieldType;\n field._actions = this._actions.map(a => a);\n field._lookupTableDataProvider = this._lookupTableDataProvider;\n field._hasLookupExcludeValues = this._hasLookupExcludeValues;\n field._excludeFilterProperty = this._excludeFilterProperty;\n field._excludeValueProperty = this._excludeValueProperty;\n return field;\n }\n}\n\nexport namespace FieldManyToManyEditorDescriptor {\n export enum TypeEnum {\n DialogTableMultiselect\n }\n\n export enum ActionEnum {\n Add,\n Delete\n }\n}\n\nexport class FieldManyEditorDescriptor<T, ET> extends AFieldDescriptor<T, ET> {\n private readonly _tableviewDescriptor: TableviewDescriptor<T>;\n private _fieldType: FieldManyEditorDescriptor.TypeEnum = FieldManyEditorDescriptor.TypeEnum.DialogEditor;\n private _fieldActions: Array<FieldManyEditorDescriptor.ActionEnum> = [];\n private _actions: Array<ActionDescriptor<T>> = [];\n\n constructor(editor: EditorDescriptor<ET>, property: string, tableviewDescriptor: TableviewDescriptor<T>) {\n super(editor, property);\n // this._modelType = modelType;\n this._tableviewDescriptor = tableviewDescriptor;\n this._fieldActions.push(\n FieldManyEditorDescriptor.ActionEnum.View,\n FieldManyEditorDescriptor.ActionEnum.Add,\n FieldManyEditorDescriptor.ActionEnum.Edit,\n FieldManyEditorDescriptor.ActionEnum.Delete\n );\n }\n\n public get fieldType() {\n return this._fieldType;\n }\n\n public get fieldActions() {\n return this._fieldActions;\n }\n\n public get actions() {\n return this._actions;\n }\n\n public get tableviewDescriptor() {\n return this._tableviewDescriptor;\n }\n\n public get tableDescriptor() {\n return this._tableviewDescriptor.table;\n }\n\n public get editorForCreate() {\n return this._tableviewDescriptor.addEditor;\n }\n\n public get editorForRead() {\n return this._tableviewDescriptor.viewEditor;\n }\n\n public get editorForUpdate() {\n return this._tableviewDescriptor.editEditor;\n }\n\n public withFieldAction(action: FieldManyEditorDescriptor.ActionEnum): this {\n this._fieldActions.push(action);\n return this;\n }\n\n public withFieldActions(actions: FieldManyEditorDescriptor.ActionEnum[]): this {\n this._fieldActions = actions;\n return this;\n }\n\n public withAction(action: ActionDescriptor<T>): this {\n this._actions.push(action);\n return this;\n }\n\n public copy(): FieldManyEditorDescriptor<T, ET> {\n const field = new FieldManyEditorDescriptor(this._editor, this._property, this._tableviewDescriptor.copy());\n this.copyFieldsTo(field);\n field._fieldType = this._fieldType;\n field._fieldActions = this._fieldActions.map(a => a);\n return field;\n }\n}\n\nexport namespace FieldManyEditorDescriptor {\n export enum TypeEnum {\n DialogEditor\n }\n\n export enum ActionEnum {\n View,\n Add,\n Edit,\n Delete\n }\n}\n\nexport abstract class AFieldGroupDescriptor<ET> extends AGenericFieldDescriptor<ET> {\n protected readonly _name: string;\n protected readonly _default: boolean;\n protected _title?: string;\n protected _fields: AGenericFieldDescriptor<ET>[] = [];\n protected _validations: Array<FieldValidationDescriptor> = [];\n\n protected constructor(editor: EditorDescriptor<ET>, name: string) {\n super(editor);\n this._name = `${this.baseName}${name}`;\n this._default = name === EditorDescriptor.defaultGroupName;\n }\n\n public get title() {\n return this._title;\n }\n\n abstract get fields(): AGenericFieldDescriptor<ET>[];\n\n public get validations() {\n return this._validations;\n }\n\n public get baseName() {\n return `${this.groupName()}_`;\n }\n\n public get name() {\n return this._name;\n }\n\n public get default() {\n return this._default;\n }\n\n abstract groupName(): string;\n\n abstract addField(field: AGenericFieldDescriptor<ET>): this;\n\n abstract copy(): AFieldGroupDescriptor<ET>;\n\n public withTitle(title: string): this {\n this._title = title;\n return this;\n }\n\n public withValidation(name: string, validator?: MngFieldValidator, message?: MngFieldValidationMessage) {\n this._validations.push(new FieldValidationDescriptor(name, validator, message));\n return this;\n }\n}\n\nexport class FieldTabGroupDescriptor<ET> extends AFieldGroupDescriptor<ET> {\n constructor(editor: EditorDescriptor<ET>, name: string) {\n super(editor, name);\n }\n\n public get fields(): Array<FieldGroupDescriptor<ET>> {\n return this._fields as Array<FieldGroupDescriptor<ET>>;\n }\n\n public groupName(): string {\n return 'tab';\n }\n\n public addField(field: FieldGroupDescriptor<ET>): this {\n this._fields.push(field);\n return this;\n }\n\n public copy(): FieldTabGroupDescriptor<ET> {\n const tab = new FieldTabGroupDescriptor<ET>(this._editor, this.name.substring(this.baseName.length));\n tab._title = this._title;\n tab._fields = this.fields.map(f => f.copy());\n return tab;\n }\n}\n\nexport class FieldGroupDescriptor<ET> extends AFieldGroupDescriptor<ET> {\n private _type = FieldGroupDescriptor.TypeEnum.Fieldset;\n\n constructor(editor: EditorDescriptor<ET>, name: string) {\n super(editor, name);\n if (this._default) {\n this.asLogical();\n }\n }\n\n public get type() {\n return this._type;\n }\n\n public get fields(): Array<AFieldDescriptor<any, ET>> {\n return this._fields as Array<AFieldDescriptor<any, ET>>;\n }\n\n public groupName(): string {\n return 'group';\n }\n\n public addField(field: AFieldDescriptor<any, ET>): this {\n this._fields.push(field);\n return this;\n }\n\n public asLogical(): this {\n this._type = FieldGroupDescriptor.TypeEnum.Logical;\n return this;\n }\n\n public copy(): FieldGroupDescriptor<ET> {\n const group = new FieldGroupDescriptor<ET>(this._editor, this.name.substring(this.baseName.length));\n group._type = this._type;\n group._title = this._title;\n group._fields = this.fields.map(f => f.copy());\n return group;\n }\n}\n\nexport namespace FieldGroupDescriptor {\n export enum TypeEnum {\n Fieldset,\n Logical\n }\n}\n","import {FormlyFieldConfig} from '@ngx-formly/core';\nimport {Observable} from 'rxjs';\n\nimport {MngFieldValidationMessage, MngFieldValidator} from '../types';\n\nexport class FieldValidationDescriptor {\n private readonly _name: string;\n private readonly _validator?: MngFieldValidator;\n private readonly _message?: MngFieldValidationMessage;\n private readonly _options?: {errorPath: string};\n\n constructor(\n name: string,\n validator?: MngFieldValidator,\n message?: string | ((error: any, field: FormlyFieldConfig) => string | Observable<string>),\n options?: {errorPath: string}\n ) {\n this._name = name;\n this._validator = validator;\n this._message = message;\n this._options = options;\n }\n\n public get name(): string {\n return this._name;\n }\n\n public get validator() {\n return this._validator;\n }\n\n public get message() {\n return this._message;\n }\n\n public get options() {\n return this._options;\n }\n}\n","import {ClassType} from '../types';\nimport {ModelUtil, TypeUtil} from '../utils';\n\nexport class ModelDescriptor<T> {\n private readonly _type: ClassType<T>;\n private readonly _typeName: string;\n private _idPropertyName?: string;\n private _titlePropertyName?: string;\n\n constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string) {\n this._type = modelType;\n this._idPropertyName = idProperty ?? ModelUtil.findIdAttribute(modelType) ?? undefined;\n this._titlePropertyName = titleProperty ?? ModelUtil.findTitleAttribute(modelType) ?? undefined;\n this._typeName = TypeUtil.findTypeName(this._type);\n }\n\n public get type() {\n return this._type;\n }\n\n public get typeName() {\n return this._typeName;\n }\n\n public get idPropertyName() {\n return this._idPropertyName;\n }\n\n public get titlePropertyName() {\n return this._titlePropertyName;\n }\n\n public withIdPropertyName(idProperty: string): this {\n this._idPropertyName = idProperty;\n return this;\n }\n\n public withTitlePropertyName(titleProperty: string): this {\n this._titlePropertyName = titleProperty;\n return this;\n }\n\n public copy(): ModelDescriptor<T> {\n const model = new ModelDescriptor(this._type, this._idPropertyName, this._titlePropertyName);\n return model;\n }\n}\n","import {Type} from '@angular/core';\n\nimport {IColumnValueComponent} from '../models';\nimport {ClassType, EnumType} from '../types';\nimport {ModelUtil} from '../utils';\nimport {ColumnDescriptor} from './column.descriptor';\nimport {ModelDescriptor} from './model.descriptor';\n\nexport class TableDescriptor<T> {\n private readonly _model: ModelDescriptor<T>;\n private _filterDisplay: TableDescriptor.FilterDisplayEnum = TableDescriptor.FilterDisplayEnum.Menu;\n private _paginationMode: TableDescriptor.PaginationModeEnum = TableDescriptor.PaginationModeEnum.Pagination;\n private _rowsPerPageOptions = [25, 50, 100];\n private _defaultNumRows = this._rowsPerPageOptions[0];\n private _columns: Array<ColumnDescriptor<any, T>> = [];\n private _title?: string;\n private _hideHeader = false;\n private _dataKeyProperty?: string;\n private _hasDefaultSort = false;\n private _defaultSortProperty: string[] = [];\n private _defaultSortAsc: boolean[] = [];\n\n // visual\n private _className = '';\n private _size: TableDescriptor.SizeEnum = TableDescriptor.SizeEnum.Large;\n private _tableFullHeightOffset?: number;\n private _rowHeight?: number;\n private _hasHover = true;\n private _hasGridlines = false;\n\n constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string) {\n this._model = new ModelDescriptor<T>(modelType, idProperty, titleProperty);\n this._dataKeyProperty = idProperty ?? ModelUtil.findIdAttribute(modelType) ?? undefined;\n }\n\n public get filterDisplay() {\n return this._filterDisplay;\n }\n\n public get paginationMode() {\n return this._paginationMode;\n }\n\n get rowsPerPageOptions(): number[] {\n return this._rowsPerPageOptions;\n }\n\n get defaultNumRows(): number {\n return this._defaultNumRows;\n }\n\n public get columns() {\n return this._columns;\n }\n\n public get title() {\n return this._title;\n }\n\n public get hideHeader() {\n return this._hideHeader;\n }\n\n public get dataKeyProperty() {\n return this._dataKeyProperty;\n }\n\n public get hasDefaultSort() {\n return this._hasDefaultSort;\n }\n\n public get defaultSortProperty() {\n return this._defaultSortProperty;\n }\n\n public get defaultSortAsc() {\n return this._defaultSortAsc;\n }\n\n public get model() {\n return this._model;\n }\n\n public get className() {\n return this._className;\n }\n\n public get size() {\n return this._size;\n }\n\n public get tableFullHeightOffset() {\n return this._tableFullHeightOffset;\n }\n\n public get rowHeight() {\n return this._rowHeight;\n }\n\n public get hasHover() {\n return this._hasHover;\n }\n\n public get hasGridlines() {\n return this._hasGridlines;\n }\n\n public addColumnDescriptor<CT>(column: ColumnDescriptor<CT, T>): TableDescriptor<T> {\n this._columns.push(column);\n return this;\n }\n\n public addColumn(property: string): ColumnDescriptor<string, T> {\n const column = new ColumnDescriptor<string, T>(this, property);\n this._columns.push(column);\n return column;\n }\n\n public addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T> {\n const column = new ColumnDescriptor<number, T>(this, property);\n column.asNumber(displayFormat);\n this._columns.push(column);\n return column;\n }\n\n public addColumnDate(property: string, displayFormat?: string): ColumnDescriptor<Date, T> {\n const column = new ColumnDescriptor<Date, T>(this, property);\n column.asDate(displayFormat);\n this._columns.push(column);\n return column;\n }\n\n public addColumnBoolean(property: string, yes?: string, no?: string, asIcon = false): ColumnDescriptor<boolean, T> {\n const column = new ColumnDescriptor<boolean, T>(this, property);\n column.asBoolean(yes, no, asIcon);\n this._columns.push(column);\n return column;\n }\n\n public addColumnEnum(property: string, enumType: EnumType, nameAsValue = false, titlePath?: string | null): ColumnDescriptor<EnumType, T> {\n const column = new ColumnDescriptor<EnumType, T>(this, property);\n column.asEnum(enumType, nameAsValue, titlePath);\n this._columns.push(column);\n return column;\n }\n\n public addColumnCustomComponent(property: string, customComponentType: Type<IColumnValueComponent<T>>): ColumnDescriptor<any, T> {\n const column = new ColumnDescriptor<any, T>(this, property);\n column.asCustomComponent(customComponentType);\n this._columns.push(column);\n return column;\n }\n\n public withFilterDisplay(filterDisplayType: TableDescriptor.FilterDisplayEnum): this {\n this._filterDisplay = filterDisplayType;\n return this;\n }\n\n public withPaginationMode(paginationMode: TableDescriptor.PaginationModeEnum): this {\n this._paginationMode = paginationMode;\n return this;\n }\n\n public withRowsPerPage(rows: number, options?: Array<number>) {\n if (options) {\n this._rowsPerPageOptions = options;\n }\n if (!this._rowsPerPageOptions.includes(rows)) {\n this._defaultNumRows = this._rowsPerPageOptions[0];\n } else {\n this._defaultNumRows = rows;\n }\n return this;\n }\n\n public withTitle(title: string): TableDescriptor<T> {\n this._title = title;\n return this;\n }\n\n public withHideHeader(hideHeader = true) {\n this._hideHeader = hideHeader;\n return this;\n }\n\n public withDataKeyProperty(property: string): TableDescriptor<T> {\n this._dataKeyProperty = property;\n return this;\n }\n\n public withDefaultSort(property: string, asc = true): TableDescriptor<T> {\n this._hasDefaultSort = true;\n this._defaultSortProperty.push(property);\n this._defaultSortAsc.push(asc);\n return this;\n }\n\n public withClassName(className: string): this {\n this._className = className;\n return this;\n }\n\n public withSize(size: TableDescriptor.SizeEnum = TableDescriptor.SizeEnum.Normal): this {\n this._size = size;\n return this;\n }\n\n public withTableFullHeightOffset(tableFullHeightOffset: number): TableDescriptor<T> {\n this._tableFullHeightOffset = tableFullHeightOffset;\n return this;\n }\n\n public withRowHeight(rowHeight: number): TableDescriptor<T> {\n this._rowHeight = rowHeight;\n return this;\n }\n\n public withHover(hover: boolean): this {\n this._hasHover = hover;\n return this;\n }\n\n public withGridlines(gridlines: boolean): this {\n this._hasGridlines = gridlines;\n return this;\n }\n\n public copy(): TableDescriptor<T> {\n const descriptor = new TableDescriptor(this.model.type, this.model.idPropertyName, this.model.titlePropertyName);\n descriptor._columns = this.columns.map(c => c.copy());\n descriptor._title = this._title;\n descriptor._hideHeader = this._hideHeader;\n descriptor._dataKeyProperty = this._dataKeyProperty;\n descriptor._defaultSortProperty = this._defaultSortProperty.map(p => p);\n descriptor._defaultSortAsc = this._defaultSortAsc.map(p => p);\n descriptor._filterDisplay = this._filterDisplay;\n descriptor._className = this._className;\n descriptor._size = this._size;\n descriptor._tableFullHeightOffset = this._tableFullHeightOffset;\n descriptor._rowHeight = this._rowHeight;\n descriptor._hasHover = this._hasHover;\n descriptor._hasGridlines = this._hasGridlines;\n return descriptor;\n }\n}\n\nexport namespace TableDescriptor {\n export enum PaginationModeEnum {\n Pagination,\n InfiniteScroll\n }\n\n export enum FilterDisplayEnum {\n Row,\n Menu\n }\n\n export enum SizeEnum {\n Small,\n Normal,\n Large\n }\n}\n","import {Type} from '@angular/core';\n\nimport {FieldValidatorFn} from '@ngx-formly/core/lib/models/config';\n\nimport {IColumnValueComponent} from '../models';\nimport {ClassType, EnumConstantType, EnumType} from '../types';\nimport {\n AFieldDescriptor,\n ColumnDescriptor,\n EditorDescriptor,\n FieldInputDescriptor,\n FieldLookupDescriptor,\n FieldLookupEnumDescriptor,\n FieldManyEditorDescriptor,\n FieldManyToManyEditorDescriptor,\n ModelDescriptor,\n TableDescriptor\n} from './';\n\nimport TableviewEditorTypeEnum = EditorDescriptor.TableviewEditorTypeEnum;\n\nexport class TableviewDescriptor<T> {\n private readonly _model: ModelDescriptor<T>;\n\n constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string) {\n this._model = new ModelDescriptor<T>(modelType, idProperty, titleProperty);\n this._table = new TableDescriptor<T>(modelType, idProperty, titleProperty);\n this._viewEditor = new EditorDescriptor<T>(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.View);\n this._viewEditor.withDisabled();\n this._addEditor = new EditorDescriptor<T>(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Add);\n this._editEditor = new EditorDescriptor<T>(modelType, idProperty, titleProperty, TableviewEditorTypeEnum.Edit);\n this._tableTitle = `${this._model.typeName}.name`;\n }\n\n private _table: TableDescriptor<T>;\n\n public get table() {\n return this._table;\n }\n\n private _viewEditor: EditorDescriptor<T>;\n\n public get viewEditor() {\n return this._viewEditor;\n }\n\n private _addEditor: EditorDescriptor<T>;\n\n public get addEditor() {\n return this._addEditor;\n }\n\n private _editEditor: EditorDescriptor<T>;\n\n public get editEditor() {\n return this._editEditor;\n }\n\n private _tableTitle: string;\n\n public get tableTitle() {\n return this._tableTitle;\n }\n\n public get model() {\n return this._model;\n }\n\n public withTableDescriptor(descriptor: TableDescriptor<T>): this {\n this._table = descriptor;\n return this;\n }\n\n public withViewDescriptor(descriptor: EditorDescriptor<T>): this {\n this._viewEditor = descriptor;\n return this;\n }\n\n public withAddDescriptor(descriptor: EditorDescriptor<T>): this {\n this._addEditor = descriptor;\n return this;\n }\n\n public withEditDescriptor(descriptor: EditorDescriptor<T>): this {\n this._editEditor = descriptor;\n return this;\n }\n\n public withTableTitle(title: string): this {\n this._tableTitle = title;\n return this;\n }\n\n public withValidator(name: string, expression: FieldValidatorFn): this {\n this._viewEditor.addValidation(name, expression);\n this._addEditor.addValidation(name, expression);\n this._editEditor.addValidation(name, expression);\n return this;\n }\n\n public addColumnDescriptor<CT>(column: ColumnDescriptor<CT, T>): TableDescriptor<T> {\n return this._table.addColumnDescriptor<CT>(column);\n }\n\n public addColumn(property: string): ColumnDescriptor<string, T> {\n return this._table.addColumn(property);\n }\n\n public addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T> {\n return this._table.addColumnNumber(property, displayFormat);\n }\n\n public addColumnDate(property: string, displayFormat?: string): ColumnDescriptor<Date, T> {\n return this._table.addColumnDate(property, displayFormat);\n }\n\n public addColumnBoolean(property: string, yes?: string, no?: string, asIcon = false): ColumnDescriptor<boolean, T> {\n return this._table.addColumnBoolean(property, yes, no, asIcon);\n }\n\n public addColumnEnum(property: string, enumType: EnumType, nameAsValue = false, titlePath?: string | null): ColumnDescriptor<EnumType, T> {\n return this._table.addColumnEnum(property, enumType, nameAsValue, titlePath);\n }\n\n public addColumnCustomComponent(property: string, customComponentType: Type<IColumnValueComponent<T>>): ColumnDescriptor<any, T> {\n return this._table.addColumnCustomComponent(property, customComponentType);\n }\n\n public createTabGroup(name: string, title?: string): this {\n this._viewEditor.createTabGroup(name, title);\n this._addEditor.createTabGroup(name, title);\n this._editEditor.createTabGroup(name, title);\n return this;\n }\n\n public createFieldGroup(name: string, title?: string): this {\n this._viewEditor.createFieldGroup(name, title);\n this._addEditor.createFieldGroup(name, title);\n this._editEditor.createFieldGroup(name, title);\n return this;\n }\n\n public addFieldDescriptor<FT>(field: AFieldDescriptor<FT, T>): this {\n this._viewEditor.addFieldDescriptor(field);\n this._addEditor.addFieldDescriptor(field);\n this._editEditor.addFieldDescriptor(field);\n return this;\n }\n\n public addField(property: string): FieldInputDescriptor<T> {\n const field = this._viewEditor.addField(property);\n this._addEditor.addFieldDescriptor(field);\n this._editEditor.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldLookup<FT>(property: string, modelType: ClassType<FT>): FieldLookupDescriptor<FT, T> {\n const field = this._viewEditor.addFieldLookup(property, modelType);\n this._addEditor.addFieldDescriptor(field);\n this._editEditor.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldLookupEnum(\n property: string,\n enumType: EnumType,\n options?: Array<EnumConstantType>,\n nameAsValue = false,\n optionsTitlePath?: string | null\n ): FieldLookupEnumDescriptor<T> {\n const field = this._viewEditor.addFieldLookupEnum(property, enumType, options, nameAsValue, optionsTitlePath);\n this._addEditor.addFieldDescriptor(field);\n this._editEditor.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldManyEditor<FT>(property: string, tableviewDescriptor: TableviewDescriptor<FT>): FieldManyEditorDescriptor<FT, T> {\n const field = this._viewEditor.addFieldManyEditor(property, tableviewDescriptor);\n this._addEditor.addFieldDescriptor(field);\n this._editEditor.addFieldDescriptor(field);\n return field;\n }\n\n public addFieldManyToManyEditor<FT>(\n property: string,\n mainTableDescriptor: TableDescriptor<FT>,\n lookupTableDescriptor: TableDescriptor<FT>\n ): FieldManyToManyEditorDescriptor<FT, T> {\n const field = this._viewEditor.addFieldManyToManyEditor(property, mainTableDescriptor, lookupTableDescriptor);\n this._addEditor.addFieldDescriptor(field);\n this._editEditor.addFieldDescriptor(field);\n return field;\n }\n\n public copy(): TableviewDescriptor<T> {\n const tableview = new TableviewDescriptor(this._model.type, this._model.idPropertyName, this._model.titlePropertyName);\n tableview._table = this._table.copy();\n tableview._viewEditor = this._viewEditor.copy();\n tableview._addEditor = this._addEditor.copy();\n tableview._editEditor = this._editEditor.copy();\n return tableview;\n }\n}\n","import {AbstractControl} from '@angular/forms';\n\nimport {FormlyFieldConfig} from '@ngx-formly/core';\n\nimport {\n AFieldDescriptor,\n EditorDescriptor,\n FieldGroupDescriptor,\n FieldInputDescriptor,\n FieldLookupDescriptor,\n FieldLookupEnumDescriptor,\n FieldManyEditorDescriptor,\n FieldManyToManyEditorDescriptor,\n FieldTabGroupDescriptor,\n FieldValidationDescriptor\n} from '../descriptors';\n\nexport class EditorFormlyUtil {\n public static createFormlyConfigFromDescriptor(descriptor: EditorDescriptor<any>): FormlyFieldConfig[] {\n const fields: FormlyFieldConfig[] = [];\n\n if (descriptor.tabs.length === 1 && descriptor.tabs[0].default) {\n // dont use tabs\n fields.push(...EditorFormlyUtil.createFormlyGroupType(descriptor.tabs[0].fields));\n } else {\n fields.push(...EditorFormlyUtil.createFormlyTabType(descriptor.tabs));\n }\n\n return fields;\n }\n\n public static createFormlyTabType(tabGroups: FieldTabGroupDescriptor<any>[]): FormlyFieldConfig[] {\n const tabsField: FormlyFieldConfig = {\n type: 'tabs',\n fieldGroup: []\n };\n for (const tab of tabGroups) {\n const tabField: FormlyFieldConfig = {\n id: tab.name,\n templateOptions: {},\n fieldGroup: []\n };\n if (tab.title) {\n tabField.templateOptions!.label = tab.title;\n }\n tabField.fieldGroup!.push(...EditorFormlyUtil.createFormlyGroupType(tab.fields));\n tabsField.fieldGroup!.push(tabField);\n }\n return [tabsField];\n }\n\n public static createFormlyGroupType(groups: FieldGroupDescriptor<any>[]): FormlyFieldConfig[] {\n if (groups.length === 1 && groups[0].default) {\n // dont use fieldset, just create fields\n return EditorFormlyUtil.createFormlyFields(groups[0]);\n } else {\n const groupsField: FormlyFieldConfig = {\n type: 'fieldset',\n fieldGroup: []\n };\n for (const group of groups) {\n const groupField: FormlyFieldConfig = {\n id: group.name,\n templateOptions: {\n descriptor: group\n },\n fieldGroup: []\n };\n if (group.title) {\n groupField.templateOptions!.label = group.title;\n }\n groupField.fieldGroup!.push(...EditorFormlyUtil.createFormlyFields(group));\n groupsField.fieldGroup!.push(groupField);\n }\n return [groupsField];\n }\n }\n\n public static createFormlyFields(descriptor: FieldGroupDescriptor<any>): FormlyFieldConfig[] {\n const fields: FormlyFieldConfig[] = [];\n for (const descriptorField of descriptor.fields) {\n fields.push(EditorFormlyUtil.createFormlyField(descriptorField));\n }\n // wrap in group to be able to use flex grid\n const wrapperGroup: FormlyFieldConfig = {\n fieldGroupClassName: 'p-fluid formgrid grid',\n fieldGroup: fields\n };\n\n EditorFormlyUtil.addValidationsToFormlyField(wrapperGroup, descriptor.validations);\n\n return [wrapperGroup];\n }\n\n public static createFormlyField(descriptor: AFieldDescriptor<any, any>): FormlyFieldConfig {\n const field: FormlyFieldConfig = {\n key: descriptor.property,\n expressionProperties: {},\n templateOptions: {}\n };\n\n let className = descriptor.className;\n if (!className) {\n // assign default field width through entire row\n className = 'col-12';\n }\n field.className = className;\n\n field.templateOptions!['descriptor'] = descriptor;\n if (descriptor instanceof FieldInputDescriptor) {\n switch (descriptor.fieldType) {\n case FieldInputDescriptor.TypeEnum.Hidden:\n break;\n case FieldInputDescriptor.TypeEnum.Label:\n field.type = 'label';\n delete field.key;\n break;\n case FieldInputDescriptor.TypeEnum.Textarea:\n field.type = 'textarea';\n break;\n case FieldInputDescriptor.TypeEnum.Number:\n field.type = 'number';\n field.templateOptions!.min = descriptor.numberMin;\n field.templateOptions!.max = descriptor.numberMax;\n break;\n case FieldInputDescriptor.TypeEnum.Switch:\n field.type = 'switch';\n break;\n case FieldInputDescriptor.TypeEnum.Radio:\n field.type = 'radio';\n break;\n case FieldInputDescriptor.TypeEnum.Datepicker:\n field.type = 'datepicker';\n break;\n case FieldInputDescriptor.TypeEnum.Mask:\n field.type = 'mask';\n break;\n case FieldInputDescriptor.TypeEnum.Custom:\n field.type = descriptor.customComponentName;\n break;\n default:\n field.type = 'input';\n field.templateOptions!.minLength = descriptor.minLength;\n field.templateOptions!.maxLength = descriptor.maxLength;\n field.templateOptions!.pattern = descriptor.pattern;\n break;\n }\n } else if (descriptor instanceof FieldLookupEnumDescriptor) {\n field.type = 'enum';\n } else if (descriptor instanceof FieldLookupDescriptor) {\n switch (descriptor.lookupType) {\n case FieldLookupDescriptor.LookupTypeEnum.Autocomplete:\n field.type = 'autocomplete';\n break;\n case FieldLookupDescriptor.LookupTypeEnum.Dialog:\n field.type = 'dialog';\n break;\n case FieldLookupDescriptor.LookupTypeEnum.Dropdown:\n default:\n field.type = 'dropdown';\n break;\n }\n } else if (descriptor instanceof FieldManyToManyEditorDescriptor) {\n field.type = 'table-dialog-multiselect';\n } else if (descriptor instanceof FieldManyEditorDescriptor) {\n field.type = 'table-dialog-form';\n }\n\n if (descriptor.label) {\n field.templateOptions!.label = descriptor.label;\n }\n\n if (descriptor.requiredExpression) {\n field.expressionProperties!['templateOptions.required'] = descriptor.requiredExpression;\n }\n if (descriptor.required) {\n field.templateOptions!.required = true;\n }\n\n if (descriptor.hiddenExpression) {\n field.expressionProperties!['hide'] = descriptor.hiddenExpression;\n }\n\n if (descriptor.disabledExpression) {\n field.expressionProperties!['templateOptions.disabled'] = descriptor.disabledExpression;\n } else if (descriptor.disabled) {\n field.templateOptions!.disabled = true;\n } else {\n field.expressionProperties!['templateOptions.disabled'] = 'formState.disabled';\n }\n\n if (typeof descriptor.defaultValue !== 'undefined') {\n field.defaultValue = descriptor.defaultValue;\n }\n\n EditorFormlyUtil.addValidationsToFormlyField(field, descriptor.validations);\n\n return field;\n }\n\n public static addValidationsToFormlyField(config: FormlyFieldConfig, validations: Array<FieldValidationDescriptor>) {\n if (!config.validators) {\n config.validators = {};\n }\n\n for (const validation of validations) {\n if (typeof validation.validator === 'function') {\n config.validators[validation.name] = {\n expression: (\n control: AbstractControl,\n field: FormlyFieldConfig,\n options?: {\n [id: string]: any;\n }\n ) => {\n const validatorRes = validation.validator!(control, field, options);\n // formly validator only excepts true/false for validation\n // map possible angular validator result to true/false\n return typeof validatorRes === 'boolean' ? validatorRes : validatorRes === null;\n }\n };\n if (typeof validation.message === 'function') {\n config.validators[validation.name].message = validation.message;\n }\n } else {\n if (!Array.isArray(config.validators.validation)) {\n config.validators.validation = [];\n }\n config.validators.validation.push(validation.name);\n }\n }\n }\n}\n","import {EnumValue} from '../models';\nimport {EnumConstantType, EnumType} from '../types';\n\nexport class EnumUtil {\n /**\n * Returns array of names for constants in enum.\n * @param enumType Enum object.\n */\n public static getConstantNames(enumType: EnumType): Array<string> {\n return EnumUtil.getConstantNamesFromEnumObject(enumType);\n }\n\n /**\n * Returns array of names for constants in enum.\n * @param enumObj Enum object.\n */\n public static getConstantNamesFromEnumObject(enumObj: object): Array<string> {\n // in number enum, the numbers are also represented in objects and should be filtered out\n return Object.keys(enumObj).filter(v => isNaN(+v));\n }\n\n /**\n * Returns array of string values for constants in enum.\n * @param enumType Enum object.\n */\n public static getConstantValuesAsString(enumType: EnumType): Array<string> {\n return Object.keys(enumType).map(v => enumType[v as keyof object] as string);\n }\n\n /**\n * Returns array of number values for constants in enum.\n * @param enumType Enum object.\n */\n public static getConstantValuesAsNumber(enumType: EnumType): Array<number> {\n return Object.keys(enumType)\n .filter(v => !isNaN(+v))\n .map(v => +v);\n }\n\n /**\n * Returns array of type EnumValue for all constants in enum.\n * @param enumType Enum object.\n * @param nameAsValue If use name of constant as value (optional, default: false).\n * @param titlePath Base path for title to use as translation (optional).\n */\n public static fromConstantsAsEnumValueArray(enumType: EnumType, nameAsValue = false, titlePath?: string) {\n return EnumUtil.getConstantNames(enumType).map(\n n => <EnumValue<string | number>>{name: n, title: `${titlePath ? `${titlePath}.` : ''}${n}`, value: nameAsValue ? n : enumType[n]}\n );\n }\n\n /**\n * Returns array of type EnumValue for provided values in enum.\n * @param enumType Enum object.\n * @param nameAsValue If use name of constant as value (optional, default: false).\n * @param titlePath Base path for title to use as translation (optional).\n */\n public static fromValuesAsEnumValueArray(enumType: EnumType, values: Array<EnumConstantType>, nameAsValue = false, titlePath?: string) {\n return values.map(v => {\n const k = EnumUtil.getConstantName(enumType, v);\n return {name: k, title: `${titlePath ? `${titlePath}.` : ''}${k}`, value: nameAsValue ? k : v} as EnumValue<string | number>;\n });\n }\n\n /**\n * Gets constant name for value.\n * @param enumType Enum object.\n * @param value Value of enum constant.\n */\n public static getConstantName(enumType: EnumType, value: EnumConstantType): string | null {\n if (typeof value === 'string') {\n return this.getConstantNames(enumType).find(c => enumType[c] === value) ?? null;\n } else {\n return typeof enumType[value] !== 'undefined' ? (enumType[value] as string) : null;\n }\n }\n\n /**\n * Gets constant name for value.\n * @param enumObj Enum object.\n * @param value Value of enum constant.\n */\n public static getConstantNameFromEnumObject(enumObj: object, value: EnumConstantType): string | null {\n const enumObjAny = enumObj as any;\n if (typeof value === 'string') {\n return this.getConstantNamesFromEnumObject(enumObj).find(c => enumObjAny[c] === value) ?? null;\n } else {\n return typeof enumObjAny[value] !== 'undefined' ? (enumObjAny[value] as string) : null;\n }\n }\n}\n","export const typeNameDecoratorPropertyName = 'typeName';\n\nexport function TypeName(typeName: string): ClassDecorator {\n return function (target: any) {\n target[typeNameDecoratorPropertyName] = typeName;\n };\n}\n\nexport const enumNameDecoratorPropertyName = 'enumName';\n\nexport function EnumName(typeName: string): ClassDecorator {\n return function (target: any) {\n target[enumNameDecoratorPropertyName] = typeName;\n };\n}\n","import 'reflect-metadata';\n\nimport {ClassType, EnumType, enumNameDecoratorPropertyName, typeNameDecoratorPropertyName} from '../types';\n\nexport class TypeUtil {\n /**\n * Defines type name decorator.\n * @param targetType class.\n * @param typeName Name of the type.\n */\n public static defineReflectTypeName(targetType: ClassType<any>, typeName?: string) {\n if (!typeName) {\n typeName = TypeUtil.getDecoratorTypeName(targetType);\n if (!typeName) {\n console.warn(`Type name not provided for target ${targetType}, nor could be retrieved from decorator. Type name was not registered to reflect.`);\n return;\n }\n }\n\n if (!Reflect.hasOwnMetadata(typeNameDecoratorPropertyName, targetType)) {\n Reflect.defineMetadata(typeNameDecoratorPropertyName, typeName, targetType);\n }\n }\n\n /**\n * Defines enum name decorator.\n * @param targetType enum object.\n * @param enumName Name of the enum.\n */\n public static defineReflectEnumName(targetType: EnumType, enumName: string) {\n if (!Reflect.hasOwnMetadata(enumNameDecoratorPropertyName, targetType)) {\n Reflect.defineMetadata(enumNameDecoratorPropertyName, enumName, targetType);\n }\n }\n\n /**\n * Gets type name from either decorator or reflect metadata.\n * @param type Class.\n */\n public static findTypeName(type: ClassType<any>): string {\n let decoratorName = TypeUtil.getDecoratorTypeName(type);\n if (decoratorName) {\n return decoratorName;\n }\n decoratorName = Reflect.getMetadata(typeNameDecoratorPropertyName, type);\n if (decoratorName) {\n return decoratorName;\n }\n return type.name;\n }\n\n /**\n * Gets enum name from either decorator or reflect metadata.\n * @param enumType Class.\n */\n public static findEnumName(enumType: EnumType): string {\n let decoratorName = TypeUtil.getDecoratorEnumName(enumType);\n if (decoratorName) {\n return decoratorName;\n }\n decoratorName = Reflect.getMetadata(enumNameDecoratorPropertyName, enumType);\n if (decoratorName) {\n return decoratorName;\n }\n throw new Error('Could not fined enum name');\n }\n\n /**\n * Get value from decorator defined property name\n * @param type Class.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n public static getDecoratorTypeName(type: Function): string | undefined {\n return (type as any)[typeNameDecoratorPropertyName];\n }\n\n /**\n * Get value from decorator defined property name\n * @param type Enum object.\n */\n public static getDecoratorEnumName(type: EnumType): string | undefined {\n return (type as any)[enumNameDecoratorPropertyName];\n }\n}\n","import {TranslateService} from '@ngx-translate/core';\nimport {Observable, of} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {ActionDescriptor, ActionEditorDescriptor, ModelDescriptor} from '../descriptors';\nimport {MngError} from '../models';\nimport {ClassType} from '../types';\nimport {TypeUtil} from './type.util';\n\nexport namespace I18nUtils {\n export class Common {\n public static getAsync(translate: TranslateService, params?: any, ...keys: Array<string>): Observable<string | null> {\n return translate.stream(keys, params).pipe(map(i18n => I18nUtils.Common.selectI18n(keys, i18n)));\n }\n\n public static get(translate: TranslateService, params?: any, ...keys: Array<string>): string | null {\n const i18n = translate.instant(keys, params);\n return I18nUtils.Common.selectI18n(keys, i18n);\n }\n\n public static populateParams(item?: any, params: any = {}) {\n const paramsRes = {...params};\n if (item) {\n paramsRes.item = item;\n }\n return paramsRes;\n }\n\n public static selectI18n(keys: string[], i18n: any): string | null {\n for (const key of keys) {\n if (key !== i18n[key]) {\n return i18n[key];\n }\n }\n return null;\n }\n }\n\n export class Type {\n public static getClassNameAsync(translate: TranslateService, classType: ClassType<any>, singular?: boolean): Observable<string | null> {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getNameAsync(translate, typeName, singular);\n }\n\n public static getClassName(translate: TranslateService, classType: ClassType<any>, singular?: boolean): string | null {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getName(translate, typeName, singular);\n }\n\n public static getNameAsync(translate: TranslateService, typeName: string, singular?: boolean): Observable<string | null> {\n const keys = I18nUtils.Type.getNameKeys(typeName, singular);\n return I18nUtils.Common.getAsync(translate, undefined, ...keys);\n }\n\n public static getName(translate: TranslateService, typeName: string, singular?: boolean): string | null {\n const keys = I18nUtils.Type.getNameKeys(typeName, singular);\n return I18nUtils.Common.get(translate, undefined, ...keys);\n }\n\n public static getClassTabKey(classType: ClassType<any>, tab: string): string {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getTabKey(typeName, tab);\n }\n\n public static getTabKey(typeName: string, tab: string): string {\n return I18nUtils.Type.getPath(typeName, 'tabs', tab);\n }\n\n public static getClassGroupKey(classType: ClassType<any>, group: string): string {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getGroupKey(typeName, group);\n }\n\n public static getGroupKey(typeName: string, group: string): string {\n return I18nUtils.Type.getPath(typeName, 'groups', group);\n }\n\n public static getClassPropertyKey(classType: ClassType<any>, property: string): string {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getPropertyKey(typeName, property);\n }\n\n public static getPropertyKey(typeName: string, property: string): string {\n return I18nUtils.Type.getPath(typeName, 'properties', property);\n }\n\n public static getClassPath(classType: ClassType<any>, ...path: Array<string>): string {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getPath(typeName, ...path);\n }\n\n public static getPath(typeName: string, ...path: Array<string>): string {\n return `${typeName}.${path.join('.')}`;\n }\n\n public static getClassParams(translate: TranslateService, classType: ClassType<any>, item: any, params: any = {}): any {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getParams(translate, typeName, item, params);\n }\n\n public static getParams(translate: TranslateService, typeName?: string, item?: any, params: any = {}): any {\n const i18nTypeName = typeName ? I18nUtils.Type.getName(translate, typeName, true) : null;\n return I18nUtils.Type.populateParams(i18nTypeName ?? undefined, item, params);\n }\n\n public static getClassParamsAsync(translate: TranslateService, classType: ClassType<any>, item?: any, params: any = {}): Observable<any> {\n const typeName = TypeUtil.findTypeName(classType);\n return I18nUtils.Type.getParamsAsync(translate, typeName, item, params);\n }\n\n public static getParamsAsync(translate: TranslateService, typeName?: string, item?: any, params: any = {}): Observable<any> {\n return (typeName ? I18nUtils.Type.getNameAsync(translate, typeName, true) : of(null)).pipe(\n map(i18nTypeName => I18nUtils.Type.populateParams(i18nTypeName ?? undefined, item, params))\n );\n }\n\n public static populateParams(i18nTypeName?: string, item?: any, params: any = {}): any {\n const paramsRes = {...params};\n if (i18nTypeName) {\n paramsRes.typeName = i18nTypeName;\n }\n return I18nUtils.Common.populateParams(item, paramsRes);\n }\n\n private static getNameKeys(typeName: string, singular?: boolean): Array<string> {\n const keys = [];\n if (typeof singular !== 'undefined') {\n keys.push(singular ? `${typeName}.nameSingular` : `${typeName}.namePlural`);\n }\n keys.push(`${typeName}.name`);\n return keys;\n }\n }\n\n export class Model {\n public static get(\n translate: TranslateService,\n model: ModelDescriptor<any>,\n keyPath: string,\n customKey?: string,\n item?: any,\n fallbackKey?: string,\n params?: any\n ): string | null {\n const keys = I18nUtils.Model.getKeysByPriority(model, keyPath, customKey, fallbackKey);\n const i18nParams = I18nUtils.Model.getParams(translate, model, item, params);\n return I18nUtils.Common.get(translate, i18nParams, ...keys);\n }\n\n public static getName(translate: TranslateService, model: ModelDescriptor<any>, singular?: boolean): string | null {\n return I18nUtils.Type.getName(translate, model.typeName, singular);\n }\n\n public static getNameAsync(translate: TranslateService, model: ModelDescriptor<any>, singular?: boolean): Observable<string | null> {\n return I18nUtils.Type.getNameAsync(translate, model.typeName, singular);\n }\n\n public static getParams(translate: TranslateService, model?: ModelDescriptor<any>, item?: any, params: any = {}): any {\n const i18nParams = I18nUtils.Type.getParams(translate, model?.typeName, item, params);\n return I18nUtils.Model.populateParams(model?.idPropertyName, model?.titlePropertyName, item, i18nParams);\n }\n\n public static getParamsAsync(translate: TranslateService, model?: ModelDescriptor<any>, item?: any, params: any = {}): Observable<any> {\n return I18nUtils.Type.getParamsAsync(translate, model?.typeName, item, params).pipe(\n map(i18nParams => I18nUtils.Model.populateParams(model?.idPropertyName, model?.titlePropertyName, item, i18nParams))\n );\n }\n\n public static populateParams(idProperty?: string, titleProperty?: string, item?: any, params: any = {}): any {\n const paramsRes = {...params, itemId: '', itemTitle: ''};\n if (item) {\n if (idProperty && item[idProperty]) {\n paramsRes.itemId = item[idProperty];\n }\n if (titleProperty && item[titleProperty]) {\n paramsRes.itemTitle = item[titleProperty];\n }\n }\n return paramsRes;\n }\n\n private static getKeysByPriority(model: ModelDescriptor<any>, keyPath: string, customKey?: string, fallbackKey?: string) {\n const keys = [];\n if (customKey) {\n keys.push(customKey);\n }\n const modelActionKey = I18nUtils.Type.getPath(model.typeName, ...keyPath);\n keys.push(modelActionKey);\n if (fallbackKey) {\n keys.push(fallbackKey);\n }\n return keys;\n }\n }\n\n export class Action {\n public static get(\n translate: TranslateService,\n action: ActionDescriptor<any>,\n actionPathKeys: string | Array<string>,\n customKey?: string,\n item?: any,\n fallbackKey?: string,\n params?: any\n ): string | null {\n const keys = I18nUtils.Action.getKeysByPriority(action, actionPathKeys, customKey, fallbackKey);\n const i18nParams = I18nUtils.Action.getParams(translate, action, item, params);\n return I18nUtils.Common.get(translate, i18nParams, ...keys);\n }\n\n public static getAsync(\n translate: TranslateService,\n action: ActionDescriptor<any>,\n actionPathKeys: string | Array<string>,\n customKey?: string,\n item?: any,\n fallbackKey?: string,\n params?: any\n ): Observable<string | null> {\n return I18nUtils.Action.getParamsAsync(translate, action, item, params).pipe(\n mergeMap(i18nParams => {\n const keys = I18nUtils.Action.getKeysByPriority(action, actionPathKeys, customKey, fallbackKey);\n return I18nUtils.Common.getAsync(translate, i18nParams, ...keys);\n })\n );\n }\n\n public static getTitleAsync(translate: TranslateService, action: ActionDescriptor<any>, item?: any): Observable<string | null> {\n return I18nUtils.Action.getAsync(translate, action, 'title', undefined, item);\n }\n\n public static getEditorTitleAsync(translate: TranslateService, action: ActionEditorDescriptor<any>, item?: any): Observable<string | null> {\n return I18nUtils.Action.getAsync(translate, action, ['editor.title', 'title'], action.editorTitle ?? undefined, item);\n }\n\n public static getParams(translate: TranslateService, action: ActionDescriptor<any>, item?: any, params: any = {}): any {\n const i18nParams = I18nUtils.Model.getParams(translate, action.model ?? undefined, item, params);\n return I18nUtils.Action.populateParams(i18nParams);\n }\n\n public static getParamsAsync(translate: TranslateService, action: ActionDescriptor<any>, item?: any, params: any = {}): Observable<any> {\n return I18nUtils.Model.getParamsAsync(translate, action.model ?? undefined, item, params).pipe(map(i18nParams => I18nUtils.Action.populateParams(i18nParams)));\n }\n\n public static populateParams(params: any = {}): any {\n params = {...params};\n return params;\n }\n\n private static getKeysByPriority(action: ActionDescriptor<any>, actionPathKeys: string | Array<string>, customKey?: string, fallbackKey?: string) {\n const keys = [];\n if (customKey) {\n keys.push(customKey);\n }\n if (!Array.isArray(actionPathKeys)) {\n actionPathKeys = [actionPathKeys];\n }\n actionPathKeys.forEach(k => {\n const modelActionKey = `${action.i18nModelActionBaseKey}.${k}`;\n const actionKey = `${action.actionName}.${k}`;\n keys.push(modelActionKey, actionKey);\n });\n if (fallbackKey) {\n keys.push(fallbackKey);\n }\n return keys;\n }\n }\n\n export class Error {\n public static get(translate: TranslateService, error: MngError, params: any = {}): string | null {\n const i18nParams = I18nUtils.Error.getParams(error, params);\n if (error.messageCode) {\n const keys = [`errors.${error.messageCode}`, `messages.${error.messageCode}`];\n const i18n = I18nUtils.Common.get(translate, i18nParams, ...keys);\n if (i18n) {\n return i18n;\n }\n }\n return I18nUtils.Common.get(translate, i18nParams, error.message);\n }\n\n public static getParams(error: MngError, params: any = {}) {\n const paramsRes = {...params};\n paramsRes.errorStatus = '';\n paramsRes.errorMessage = '';\n\n if (error.status) {\n paramsRes.errorStatus = error.status;\n }\n if (error.message) {\n paramsRes.errorMessage = error.message;\n }\n if (error.statusDescription) {\n paramsRes.errorStatusDescription = error.statusDescription;\n }\n paramsRes.error = error;\n return paramsRes;\n }\n }\n}\n","import {AttributeDef} from '../api/models';\nimport {ObjectSerializer} from '../api/utils';\nimport {ILookupDescriptor} from '../descriptors';\nimport {ClassType} from '../types';\n\nexport class ModelUtil {\n public static findIdAttribute<T>(classType: ClassType<T>): string | null {\n const objSerializer = ObjectSerializer.get();\n const attributes = objSerializer.findAttributesDefinitionByClassType(classType);\n if (!attributes) {\n return null;\n }\n\n let idAttribute = ModelUtil.findAttributeByTypeAndName(attributes, 'string', 'id', 'uuid', 'code', 'sifra');\n if (!idAttribute) {\n // if no id or code, take the first attribute\n idAttribute = attributes[0];\n }\n\n return idAttribute?.name ?? null;\n }\n\n public static findTitleAttribute<T>(classType: ClassType<T>): string | null {\n const objSerializer = ObjectSerializer.get();\n const attributes = objSerializer.findAttributesDefinitionByClassType(classType);\n if (!attributes) {\n return null;\n }\n\n let titleAttribute = ModelUtil.findAttributeByTypeAndName(attributes, 'string', 'name', 'ime', 'title', 'naziv');\n if (!titleAttribute) {\n // if no name or title, take the first attribute\n titleAttribute = attributes[0];\n }\n\n return titleAttribute?.name ?? null;\n }\n\n private static findAttributeByTypeAndName(attributes: AttributeDef[], type: string, ...names: string[]): AttributeDef | null {\n for (const name of names) {\n const attribute = attributes.find(a => a.type === type && a.name === name);\n if (attribute) {\n return attribute;\n }\n }\n return null;\n }\n\n public static trySetLookupItemsProperties<T>(lookup: ILookupDescriptor<T>, idAsDataKey = true) {\n if (lookup.modelType) {\n if (!lookup.itemsValueProperty || !lookup.dataKeyProperty) {\n const idProperty = ModelUtil.findIdAttribute(lookup.modelType) ?? undefined;\n if (idProperty && !lookup.itemsValueProperty && !lookup.dataKeyProperty) {\n if (idAsDataKey) {\n lookup.withDataKeyProperty(idProperty);\n } else {\n lookup.withItemsValueProperty(idProperty);\n }\n }\n }\n if (!lookup.itemsLabelProperty) {\n const labelProperty = ModelUtil.findTitleAttribute(lookup.modelType);\n if (labelProperty) {\n lookup.withItemsLabelProperty(labelProperty);\n }\n }\n }\n }\n}\n","import {TranslateService} from '@ngx-translate/core';\nimport {Message} from 'primeng/api';\n\nimport {ActionDescriptor, TableDescriptor} from '../descriptors';\nimport {IViewContainer, MngError} from '../models';\nimport {I18nUtils} from './i18n.util';\n\nexport class NotificationUtil {\n public static notification(viewContainer?: IViewContainer<any, any>, title?: string, message?: string, severity: 'success' | 'warn' | 'error' = 'success'): Message {\n const messageService = viewContainer?.getMessageService();\n const notification: Message = {severity: severity, summary: title, detail: message, life: severity === 'error' ? 10000 : 5000};\n if (messageService) {\n messageService.add(notification);\n } else {\n console.warn(`No message service was provided through view container, message will not be displayed.`);\n }\n return notification;\n }\n\n public static tableNotificationError(translate: TranslateService, table: TableDescriptor<any>, error: any, viewContainer?: IViewContainer<any, any>): Message {\n const params: any = {};\n if (error?.message) {\n params.errorMessage = `: ${error.message}`;\n } else {\n params.errorMessage = '.';\n }\n const tableErrorTitle = I18nUtils.Model.get(translate, table.model, 'table.error.title', undefined, undefined, 'general.error', params) ?? undefined;\n const tableErrorMessage = I18nUtils.Model.get(translate, table.model, 'table.error.message', undefined, undefined, 'general.errorMessage', params) ?? undefined;\n return NotificationUtil.notification(viewContainer, tableErrorTitle, tableErrorMessage, 'error');\n }\n\n public static actionNotificationSuccess(\n translate: TranslateService,\n action: ActionDescriptor<any>,\n functionName: string,\n customTitleKey?: string,\n customMessageKey?: string,\n viewContainer?: IViewContainer<any, any>,\n item?: any\n ): Message {\n const actionSuccessTitle = I18nUtils.Action.get(translate, action, 'success.title', customTitleKey, item, 'general.success', functionName) ?? undefined;\n const actionSuccessMessage = I18nUtils.Action.get(translate, action, 'success.message', customMessageKey, item, 'general.successMessage', functionName) ?? undefined;\n return NotificationUtil.notification(viewContainer, actionSuccessTitle, actionSuccessMessage);\n }\n\n public static actionNotificationError(\n translate: TranslateService,\n action: ActionDescriptor<any>,\n error: MngError,\n functionName: string,\n viewContainer?: IViewContainer<any, any>,\n item?: any,\n severity: 'warn' | 'error' = 'error'\n ): Message {\n const params = {\n errorMessage: I18nUtils.Error.get(translate, error) ?? error.message\n };\n const actionErrorTitle =\n I18nUtils.Action.get(translate, action, [`error.${functionName}.title`, 'error.title'], action.runNotificationErrorTitle, item, 'general.error', params) ?? undefined;\n const actionErrorMessage =\n I18nUtils.Action.get(translate, action, [`error.${functionName}.message`, 'error.message'], action.runNotificationErrorMessage, item, 'general.errorMessage', params) ??\n undefined;\n return NotificationUtil.notification(viewContainer, actionErrorTitle, actionErrorMessage, severity);\n }\n\n public static getFormEditorWarningMessage(translate: TranslateService, title: string, message: string): Message {\n const actionErrorTitle = translate.instant(title) ?? undefined;\n const actionErrorMessage = translate.instant(message) ?? undefined;\n return {severity: 'warn', summary: actionErrorTitle, detail: actionErrorMessage};\n }\n}\n","import {ClassType} from '../../types';\nimport {TypeUtil} from '../../utils';\nimport {AttributeDef, SerializableTypeMap, enumsMapBase, typeMapBase} from '../models';\n\nexport class ObjectSerializer {\n private static _instance: ObjectSerializer = new ObjectSerializer();\n private readonly _primitives: string[] = ['string', 'boolean', 'double', 'integer', 'long', 'float', 'number', 'any'];\n private readonly _typeMap: SerializableTypeMap = {\n ...typeMapBase\n };\n private readonly _enumMap: SerializableTypeMap = {\n ...enumsMapBase\n };\n\n public get primitives() {\n return this._primitives;\n }\n\n public get typeMap() {\n return this._typeMap;\n }\n\n public get enumMap() {\n return this._enumMap;\n }\n\n /**\n * Only use one instance of object (out of Angular context)\n */\n public static get(): ObjectSerializer {\n return ObjectSerializer._instance;\n }\n\n public findAttributeDefinitionByClassType(type: ClassType<any>, attributeName: string): AttributeDef | null {\n return this.findAttributeDefinition(TypeUtil.findTypeName(type), attributeName);\n }\n\n public findAttributeDefinition(typeName: string, attributeName: string): AttributeDef | null {\n const attributeDefs = this.findAttributesDefinition(typeName);\n if (!attributeDefs) {\n return null;\n }\n for (const attribute of attributeDefs) {\n if (attribute.name === attributeName) {\n return attribute;\n }\n }\n return null;\n }\n\n public findAttributesDefinitionByClassType(type: ClassType<any>): Array<AttributeDef> | null {\n return this.findAttributesDefinition(TypeUtil.findTypeName(type));\n }\n\n public findAttributesDefinition(typeName: string): Array<AttributeDef> | null {\n const typeDef = this.findType(typeName);\n if (!typeDef) {\n return null;\n }\n return typeDef.getAttributeTypeMap() as Array<AttributeDef>;\n }\n\n public findByClassType(type: ClassType<any>): any {\n return this.findType(TypeUtil.findTypeName(type));\n }\n\n public findType(typeName: string): any {\n return this._typeMap[typeName];\n }\n\n public findEnum(enumName: string): any {\n return this._enumMap[enumName];\n }\n\n public registerTypes(types: SerializableTypeMap) {\n for (const key in types) {\n this.registerType(types[key], key);\n }\n }\n\n public registerType(type: ClassType<any>, optTypeName?: string) {\n // try to find name from decorator\n let typeName = TypeUtil.getDecoratorTypeName(type);\n if (!typeName) {\n // defined name from optional type name\n typeName = optTypeName;\n if (!typeName) {\n console.warn(`Registering type ${type} failed, because typeName could not be determined and optional name was not provided.`);\n return;\n }\n }\n if (typeof this._typeMap[typeName] !== 'undefined') {\n console.warn(`Registering type ${type} under key ${typeName} skipped, because type already exists for this key.`);\n } else {\n TypeUtil.defineReflectTypeName(type, typeName);\n this._typeMap[typeName] = type;\n }\n }\n\n public registerEnums(enums: SerializableTypeMap) {\n for (const key in enums) {\n this.registerEnum(enums[key], key);\n }\n }\n\n public registerEnum(enumType: any, enumName: string) {\n // try to find name from decorator\n if (typeof this._enumMap[enumName] !== 'undefined') {\n console.warn(`Registering enum ${enumName} skipped, because enum already exists.`);\n } else {\n TypeUtil.defineReflectEnumName(enumType, enumName);\n this._enumMap[enumName] = enumType;\n }\n }\n\n public findCorrectType(data: any, expectedType: string) {\n if (data == undefined) {\n return expectedType;\n } else if (this._primitives.indexOf(expectedType.toLowerCase()) !== -1) {\n return expectedType;\n } else if (expectedType === 'Date') {\n return expectedType;\n } else {\n if (this._enumMap[expectedType]) {\n return expectedType;\n }\n\n if (!this._typeMap[expectedType]) {\n return expectedType; // w/e we don't know the type\n }\n\n // Check the discriminator\n const discriminatorProperty = this._typeMap[expectedType].discriminator;\n if (discriminatorProperty == null) {\n return expectedType; // the type does not have a discriminator. use it.\n } else {\n if (data[discriminatorProperty]) {\n const discriminatorType = data[discriminatorProperty];\n if (this._typeMap[discriminatorType]) {\n return discriminatorType; // use the type given in the discriminator\n } else {\n return expectedType; // discriminator did not map to a type\n }\n } else {\n return expectedType; // discriminator was not present (or an empty string)\n }\n }\n }\n }\n\n public serializeClass<T>(data: T, type: ClassType<T>) {\n return this.serialize(data, TypeUtil.findTypeName(type));\n }\n\n public serializeClassArray<T>(data: Array<T>, type: ClassType<T>) {\n return this.serialize(data, `Array<${TypeUtil.findTypeName(type)}>`);\n }\n\n public serialize(data: any, type: string) {\n if (data == undefined) {\n return data;\n } else if (this._primitives.indexOf(type.toLowerCase()) !== -1) {\n return data;\n } else if (type.lastIndexOf('Array<', 0) === 0) {\n // string.startsWith pre es6\n let subType: string = type.replace('Array<', ''); // Array<Type> => Type>\n subType = subType.substring(0, subType.length - 1); // Type> => Type\n const transformedData: any[] = [];\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < data.length; index++) {\n const datum = data[index];\n transformedData.push(this.serialize(datum, subType));\n }\n return transformedData;\n } else if (type === 'Date') {\n if (data instanceof Date) {\n return data.toISOString();\n } else {\n return new Date(data).toISOString();\n }\n } else {\n if (this._enumMap[type]) {\n return data;\n }\n if (!this._typeMap[type]) {\n // in case we dont know the type\n return data;\n }\n\n // Get the actual type of this object\n type = this.findCorrectType(data, type);\n\n // get the map for the correct type.\n const attributeTypes = this._typeMap[type].getAttributeTypeMap() as Array<AttributeDef>;\n const instance: {[index: string]: any} = {};\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < attributeTypes.length; index++) {\n const attributeType = attributeTypes[index];\n instance[attributeType.baseName] = this.serialize(data[attributeType.name], attributeType.type);\n }\n return instance;\n }\n }\n\n public deserializeClass<T>(data: any, type: ClassType<T>): T {\n return this.deserialize(data, TypeUtil.findTypeName(type));\n }\n\n public deserializeClassArray<T>(data: any, type: ClassType<T>): Array<T> {\n return this.deserialize(data, `Array<${TypeUtil.findTypeName(type)}>`);\n }\n\n public deserialize(data: any, type: string) {\n // polymorphism may change the actual type.\n type = this.findCorrectType(data, type);\n if (data == undefined) {\n return data;\n } else if (this._primitives.indexOf(type.toLowerCase()) !== -1) {\n return data;\n } else if (type.lastIndexOf('Array<', 0) === 0) {\n // string.startsWith pre es6\n let subType: string = type.replace('Array<', ''); // Array<Type> => Type>\n subType = subType.substring(0, subType.length - 1); // Type> => Type\n const transformedData: any[] = [];\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < data.length; index++) {\n const datum = data[index];\n transformedData.push(this.deserialize(datum, subType));\n }\n return transformedData;\n } else if (type === 'Date') {\n return new Date(data);\n } else {\n if (this._enumMap[type]) {\n // is Enum\n return data;\n }\n\n if (!this._typeMap[type]) {\n // dont know the type\n return data;\n }\n const instance = new this._typeMap[type]();\n const attributeTypes = this._typeMap[type].getAttributeTypeMap() as Array<AttributeDef>;\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < attributeTypes.length; index++) {\n const attributeType = attributeTypes[index];\n instance[attributeType.name] = this.deserialize(data[attributeType.baseName], attributeType.type);\n }\n return instance;\n }\n }\n}\n","import {Params} from '@angular/router';\n\nimport {FilterMetadata, LazyLoadEvent} from 'primeng/api';\n\nimport {FilterDescriptor} from '../../descriptors';\nimport {MediusFilterMatchType, MediusQueryParam, MediusQueryParamBuilder} from '../models';\n\nexport class MediusRestUtil {\n // first value is from primeNG, second is for use in query params\n public static readonly matchModeMapping: Array<[string, string, MediusFilterMatchType]> = [\n ['contains', 'c', MediusFilterMatchType.Contains],\n ['endsWith', 'ew', MediusFilterMatchType.EndsWith],\n ['equals', 'eq', MediusFilterMatchType.Equals],\n ['gte', 'gte', MediusFilterMatchType.GreaterThan],\n ['leq', 'leq', MediusFilterMatchType.SmallerThan],\n ['startsWith', 'sw', MediusFilterMatchType.StartsWith],\n ['in', 'in', MediusFilterMatchType.In],\n ['notEquals', 'neq', MediusFilterMatchType.NotEquals]\n ];\n\n public static fromAngularQueryParamsToMediusQueryParams(\n params: Params,\n filterDescriptors: Array<FilterDescriptor<any>>,\n defaultItemsPerPage = 10,\n defaultOffset = 0\n ): MediusQueryParam {\n const offset = params['first'] ? parseInt(params['first']) : defaultOffset;\n const itemsPerPage = params['rows'] ? parseInt(params['rows']) : defaultItemsPerPage;\n\n const mediusParamsBuilder = MediusQueryParamBuilder.create(itemsPerPage, offset);\n\n if (params['sort']) {\n for (const sort of params['sort'].split(',')) {\n const qpSortSplit = sort.split(':');\n const field = qpSortSplit[0];\n const asc = qpSortSplit.length > 1 ? qpSortSplit[1] === 'asc' : true;\n mediusParamsBuilder.withSort(field, asc);\n }\n }\n if (params['filter']) {\n const filterSplit = params['filter'].split(',');\n for (const filterField of filterSplit) {\n const filterFieldSplit = filterField.split(':');\n const field = filterFieldSplit[0];\n const operator = filterFieldSplit.length > 1 ? filterFieldSplit[1] : 'eq';\n\n // prepare value\n let value: any = filterFieldSplit.length > 2 ? filterFieldSplit[2] : '';\n const valueTo: any = undefined;\n if (value.startsWith(\"'\")) {\n value = value.substring(1, value.length - 1);\n }\n if (value.startsWith('[') && value.endsWith(']')) {\n value = value\n .substring(1, value.length - 1)\n .split(',')\n .map((v: string) => (v.startsWith(\"'\") ? v.substring(1, v.length - 1) : v));\n }\n\n const operatorMapping = MediusRestUtil.matchModeMapping.find(mapping => mapping[1] === operator);\n const filterDescriptor = filterDescriptors.find(f => f.property === field);\n if (operatorMapping && filterDescriptor) {\n const fieldFilterProperty = filterDescriptor.filterProperty ?? filterDescriptor.property;\n mediusParamsBuilder.withFilter(fieldFilterProperty, value, valueTo, MediusRestUtil.getMediusFilterMatchTypeFromPrimeMatchMode(operatorMapping[0]));\n }\n }\n }\n\n return mediusParamsBuilder.build();\n }\n\n public static fromPrimeLazyLoadEventToAngularQueryParams(event: LazyLoadEvent, defaultItemsPerPage = 10, defaultOffset = 0): Params {\n const params: Params = {\n first: null,\n rows: null,\n sort: null,\n filter: null\n };\n\n if (event.first && event.first !== defaultOffset && event.first > 0) {\n params['first'] = event.first;\n }\n if (event.rows && event.rows !== defaultItemsPerPage && event.rows > 0) {\n params['rows'] = event.rows;\n }\n\n if (event.multiSortMeta?.length ?? 0 > 0) {\n params['sort'] = event.multiSortMeta?.map(s => `${s.field}${s.order === 1 ? '' : ':desc'}`).join(',');\n }\n\n if (event.filters) {\n const filters = [];\n for (const field in event.filters) {\n const primeOperator = event.filters[field].matchMode;\n let value = event.filters[field].value;\n const operatorMapping = MediusRestUtil.matchModeMapping.find(mapping => mapping[0] === primeOperator);\n if (\n operatorMapping &&\n typeof value !== 'undefined' &&\n value !== null &&\n ((typeof value === 'string' && value.length > 0) || (Array.isArray(value) && value.length > 0))\n ) {\n if (Array.isArray(value)) {\n value = `[${value.map(v => `'${v}'`).join(',')}]`;\n } else {\n value = `'${value}'`;\n }\n\n filters.push(`${field}:${operatorMapping[1]}:${value}`);\n }\n }\n if (filters.length > 0) {\n params['filter'] = filters.join(',');\n }\n }\n\n return params;\n }\n\n public static fromPrimeLazyLoadEventToMediusQueryParams(event: LazyLoadEvent): MediusQueryParam {\n const queryParamBuilder = MediusQueryParamBuilder.create(event.rows, event.first);\n\n // apply sorting\n if (event.multiSortMeta) {\n event.multiSortMeta.forEach(msm => queryParamBuilder.withSort(msm.field, msm.order === 1));\n }\n\n // apply filtering\n if (event.filters) {\n for (const key of Object.keys(event.filters)) {\n const filterEvent = event.filters[key];\n if (Array.isArray(filterEvent)) {\n (filterEvent as FilterMetadata[]).filter(e => e.value).forEach(e => MediusRestUtil.addMediusFilterFromPrimeFilterMetadata(queryParamBuilder, key, e));\n } else if (typeof filterEvent === 'object') {\n if (filterEvent.value) {\n MediusRestUtil.addMediusFilterFromPrimeFilterMetadata(queryParamBuilder, key, filterEvent);\n }\n }\n }\n }\n\n return queryParamBuilder.build();\n }\n\n public static addMediusFilterFromPrimeFilterMetadata(queryParamBuilder: MediusQueryParamBuilder, property: string, filterMetadata: FilterMetadata) {\n const matchType: MediusFilterMatchType = MediusRestUtil.getMediusFilterMatchTypeFromPrimeMatchMode(filterMetadata.matchMode ?? 'contains');\n queryParamBuilder.withFilter(property, filterMetadata.value, undefined, matchType);\n }\n\n public static getMediusFilterMatchTypeFromPrimeMatchMode(matchMode: string): MediusFilterMatchType {\n const mapping = MediusRestUtil.matchModeMapping.find(m => m[0] === matchMode);\n return mapping?.[2] ?? MediusFilterMatchType.Contains;\n }\n}\n","import {Message} from 'primeng/api';\nimport {DynamicDialogRef} from 'primeng/dynamicdialog';\nimport {Observable} from 'rxjs';\n\nimport {IDataProvider} from '../../../data-providers';\nimport {ActionDescriptor} from '../../../descriptors';\nimport {IViewContainer} from '../../../models';\nimport {IdType} from '../../../types';\n\nexport class ActionExecContext<T, S, DP extends IDataProvider<T, S>> {\n constructor(\n public readonly action: ActionDescriptor<T>,\n public readonly dataProvider?: DP,\n public readonly serviceInstance?: S,\n public readonly data?: {\n item?: T;\n itemId?: IdType;\n actionData?: ActionData;\n },\n public readonly sourceComponent: any = null,\n public readonly viewContainer: IViewContainer<T, S> | null = null\n ) {}\n}\n\nexport class ActionError {\n constructor(\n public readonly error: any, // error details\n public readonly dismissed: boolean = false // by user\n ) {}\n}\n\nexport class ActionRunResult<T, S, DP extends IDataProvider<T, S>> {\n public notification?: Message;\n constructor(public readonly context?: ActionExecContext<T, S, DP>, public readonly result?: T | null, public readonly error?: ActionError) {}\n}\n\nexport class ActionActivationResult<T, S, DP extends IDataProvider<T, S>> {\n constructor(public readonly runResult?: ActionRunResult<T, S, DP>, public readonly dialogRef?: DynamicDialogRef) {}\n\n public get runContext() {\n return this.runResult ? this.runResult.context : null;\n }\n\n public get result() {\n return this.runResult ? this.runResult.result : null;\n }\n\n public get error() {\n return this.runResult ? this.runResult.error : null;\n }\n}\n\nexport class ActionTriggerResult<T, S, DP extends IDataProvider<T, S>> {\n constructor(public readonly activationResult?: ActionActivationResult<T, S, DP>, public readonly routerNavigation?: Observable<boolean>) {}\n\n public get runContext() {\n return this.activationResult ? this.activationResult.runResult : null;\n }\n\n public get result() {\n return this.activationResult ? this.activationResult.result : null;\n }\n\n public get error() {\n return this.activationResult ? this.activationResult.error : null;\n }\n\n public get dialogRef() {\n return this.activationResult ? this.activationResult.dialogRef : null;\n }\n}\n\nexport type ActionData = {\n [key: string]: any;\n};\n","import {InjectionToken} from '@angular/core';\n\nexport const MNG_BROWSER_STORAGE_IT = new InjectionToken<Storage>('Browser storage', {\n providedIn: 'root',\n factory: () => localStorage\n});\n","import {InjectionToken} from '@angular/core';\n\nimport {Observable} from 'rxjs';\n\nexport const MNG_COMMONS_INITIALIZER_IT = new InjectionToken<ReadonlyArray<() => Observable<unknown>>>('MNG Commons Initializer');\n","import {InjectionToken, Type} from '@angular/core';\n\nexport const ACTION_EDITOR_DIALOG_COMPONENT_SETTING: InjectionToken<Type<any>> = new InjectionToken<Type<any>>('ACTION_EDITOR_DIALOG_COMPONENT_SETTING');\n","import {InjectionToken} from '@angular/core';\n\nimport {MngModuleConfig} from '../../config/models';\n\nexport const MNG_MODULE_CONFIG_IT = new InjectionToken<MngModuleConfig>('MngModuleConfig');\n","import {Location} from '@angular/common';\nimport {Injectable} from '@angular/core';\nimport {NavigationEnd, Router} from '@angular/router';\n\n@Injectable()\nexport class MngNavigationService {\n private history: Array<string> = [];\n\n constructor(private router: Router, private location: Location) {\n this.router.events.subscribe(event => {\n if (event instanceof NavigationEnd) {\n this.history.push(event.urlAfterRedirects);\n }\n });\n }\n\n public getCurrentLocation(): string | null {\n if (this.history.length > 0) {\n return this.history[this.history.length - 1];\n } else {\n return null;\n }\n }\n\n public getPreviousLocation(): string | null {\n if (this.history.length > 1) {\n return this.history[this.history.length - 2];\n } else {\n return null;\n }\n }\n\n public back(): void {\n this.history.pop();\n if (this.history.length > 0) {\n this.location.back();\n } else {\n this.router.navigateByUrl('/');\n }\n }\n}\n","import {MngError} from '../models';\n\nexport abstract class MngErrorMapperService {\n abstract toMngError(error?: any, mngError?: MngError): MngError;\n}\n\nexport class DefaultMngErrorMapperService extends MngErrorMapperService {\n toMngError(error?: any, mngError?: MngError): MngError {\n if (!mngError) {\n mngError = {\n name: error?.name ?? 'UnknownError',\n message: error.message ?? 'Unknown error'\n };\n }\n return mngError;\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({\n name: 'boolean',\n pure: true\n})\nexport class MngBooleanPipe implements PipeTransform {\n transform(value: any, yes?: string, no?: string, icon = false): any {\n if (typeof value === 'boolean') {\n if (icon) {\n return value ? yes ?? 'pi pi-check' : no ?? 'pi pi-times';\n } else {\n return value ? yes ?? 'general.yes' : no ?? 'general.no';\n }\n } else {\n return value;\n }\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nimport {EnumType} from '../types';\nimport {EnumUtil, TypeUtil} from '../utils';\n\n@Pipe({\n name: 'enum',\n pure: true\n})\nexport class MngEnumPipe implements PipeTransform {\n transform(value: unknown, enumObj: EnumType | undefined, i18nPath?: string | null, nameAsValue = false): any {\n if (!value || (typeof value !== 'number' && typeof value !== 'string') || !enumObj) {\n return value;\n }\n const enumConstantName = nameAsValue ? value : EnumUtil.getConstantNameFromEnumObject(enumObj, value);\n if (typeof i18nPath === 'undefined') {\n i18nPath = TypeUtil.findEnumName(enumObj as EnumType);\n }\n return i18nPath ? `${i18nPath}.${enumConstantName}` : enumConstantName;\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nimport {ModelDescriptor} from '../descriptors';\nimport {I18nUtils} from '../utils';\n\n@Pipe({\n name: 'i18nProperty',\n pure: true\n})\nexport class MngI18nPropertyPipe implements PipeTransform {\n transform(property: string, model: ModelDescriptor<any>): any {\n return I18nUtils.Type.getPropertyKey(model.typeName, property);\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\nimport {ActionData} from '../components/action/models';\nimport {ModelDescriptor} from '../descriptors';\nimport {IdType} from '../types';\n\n@Pipe({\n name: 'linkFormatter',\n pure: true\n})\nexport class MngLinkFormatterPipe implements PipeTransform {\n private parseUrl(s: string, itemId?: IdType, itemAny?: any, model?: ModelDescriptor<any> | null, actionData?: ActionData): any {\n if (s === ':itemId') {\n return itemId!;\n } else if (model && s.startsWith(`:${model.typeName}.`)) {\n return itemAny[s.substring(model.typeName.length + 2)] ?? '';\n } else if (s.startsWith(':')) {\n return actionData?.[s.substring(1)] ?? '';\n } else {\n return s;\n }\n }\n\n transform(value: string | string[], itemId?: IdType, item?: any, model?: ModelDescriptor<any> | null, actionData?: ActionData): any {\n const itemAny = (item ?? {}) as any;\n if (typeof value === 'string') {\n return value.split('/').map(s => this.parseUrl(s, itemId, itemAny, model, actionData));\n } else {\n const transformedItems: string[] = [];\n value.forEach(val => transformedItems.push(...val.split('/').map(s => this.parseUrl(s, itemId, itemAny, model, actionData))));\n return transformedItems;\n }\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\n/**\n * Imitation of JSONPath Syntax. Supports:\n * - Root object notation with '$'\n * - Dot notation (e.g.: $.foo.bar), no bracket notation for properties\n * - Array notation (e.g.: [0])\n */\n@Pipe({\n name: 'jsonPath',\n pure: true\n})\nexport class JsonPathPipe implements PipeTransform {\n transform(value: any, path = ''): any {\n if (path === '$') {\n // only return the root\n return value;\n }\n\n // Check for leading root object notation\n if (path.startsWith('$')) {\n path = path.substring(1);\n }\n\n // Check for leading .\n if (path.startsWith('.')) {\n path = path.substring(1);\n }\n\n if (path.indexOf('.') >= 0) {\n const pathSplit = path.split('.');\n let currValue = value;\n for (const p of pathSplit) {\n if (typeof currValue === 'undefined' || currValue === null) {\n return currValue;\n }\n\n if (!p.length) {\n // empty path, return current value\n return currValue;\n }\n\n const leftBracketIdx = p.indexOf('[');\n if (leftBracketIdx >= 0 && p.endsWith(']')) {\n // should be reference to array\n const arrayPath = p.substring(0, leftBracketIdx);\n const arrayIdx = +p.substring(leftBracketIdx + 1, p.length - 1);\n const array = currValue[arrayPath];\n console.log(arrayPath, arrayIdx, array);\n if (Array.isArray(array)) {\n if (arrayIdx >= 0 && arrayIdx < array.length) {\n // valid index, continue on the path\n currValue = array[arrayIdx];\n continue;\n } else {\n console.warn(`Path ${path} array index at ${p} is not within valid array range`, value);\n }\n } else {\n console.warn(`Path ${path} array at ${p} is not a valid array`, value);\n }\n\n return undefined;\n } else if (typeof currValue === 'object') {\n currValue = currValue[p];\n } else {\n console.warn(`Path ${path} is not valid for object`, value);\n return currValue;\n }\n }\n return currValue;\n } else {\n return value[path];\n }\n }\n}\n","import {HttpErrorResponse} from '@angular/common/http';\nimport {Inject, Injectable, Injector, Type} from '@angular/core';\nimport {ActivatedRoute, Router, UrlTree} from '@angular/router';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {Confirmation, ConfirmationService} from 'primeng/api';\nimport {DialogService, DynamicDialogConfig} from 'primeng/dynamicdialog';\nimport {Observable, from, of, throwError} from 'rxjs';\nimport {catchError, first, map} from 'rxjs/operators';\n\nimport {ActionActivationResult, ActionData, ActionError, ActionExecContext, ActionRunResult, ActionTriggerResult, IActionConfirmationService} from '../components/action/models';\nimport {MngTableCellClickEvent} from '../components/tableview/models';\nimport {IDataProvider, IEditorDataProvider} from '../data-providers';\nimport {ActionActivationTriggerEnum, ActionDescriptor, ActionEditorDescriptor, ActionTypeEnum, TableDescriptor} from '../descriptors';\nimport {IViewContainer, MngError} from '../models';\nimport {MngLinkFormatterPipe} from '../pipes';\nimport {IdType} from '../types';\nimport {I18nUtils, NotificationUtil} from '../utils';\nimport {MngErrorMapperService} from './error-mapper.service';\nimport {MngNavigationService} from './navigation.service';\nimport {ACTION_EDITOR_DIALOG_COMPONENT_SETTING} from './tokens';\n\n@Injectable()\nexport class MngActionExecutorService {\n constructor(\n private injector: Injector,\n private router: Router,\n private dialogService: DialogService,\n private confirmationService: ConfirmationService,\n private translate: TranslateService,\n private navigationService: MngNavigationService,\n private errorMapper: MngErrorMapperService,\n private linkFormatter: MngLinkFormatterPipe,\n @Inject(ACTION_EDITOR_DIALOG_COMPONENT_SETTING) private defaultEditorDialogComponent: Type<any>\n ) {}\n\n public prepareActionExecContext<T, S>(\n action: ActionDescriptor<T>,\n itemId?: IdType,\n item?: T,\n dataProvider?: IDataProvider<T, S>,\n viewContainer?: IViewContainer<T, S>,\n sourceComponent?: any,\n actionData?: ActionData\n ): ActionExecContext<T, S, IDataProvider<T, S>> {\n const ctxDataProvider = dataProvider ?? action.dataProvider ?? viewContainer?.getDataProvider();\n return new ActionExecContext<T, S, IDataProvider<T, S>>(\n action,\n ctxDataProvider,\n this.getDataProviderService(ctxDataProvider) ?? undefined,\n {\n item,\n itemId,\n actionData\n },\n sourceComponent,\n viewContainer\n );\n }\n\n public runAction<T, S>(\n action: ActionDescriptor<T>,\n itemId?: IdType,\n item?: T,\n dataProvider?: IDataProvider<T, S>,\n sourceComponent?: any,\n viewContainer?: IViewContainer<T, S>,\n actionData?: ActionData\n ): Observable<ActionRunResult<T, S, IDataProvider<T, S>>> {\n const context = this.prepareActionExecContext(action, itemId, item, dataProvider, viewContainer, sourceComponent, actionData);\n if (action.hasRunConfirmation) {\n if (typeof sourceComponent?.getConfirmationService !== 'function' || typeof sourceComponent?.getConfirmationServiceInstanceKey !== 'function') {\n throw Error(`Source component ${sourceComponent} should be implementing IConfirmationService interface to be able to provide confirmation functionality.`);\n }\n\n const srcConfirmComponent = sourceComponent as IActionConfirmationService;\n let confirmParams: Confirmation = {\n key: srcConfirmComponent.getConfirmationServiceInstanceKey(action),\n acceptVisible: false,\n rejectVisible: false\n };\n\n if (action.runConfirmationTitle !== null) {\n confirmParams.header = I18nUtils.Action.get(this.translate, action, 'confirm.title', action.runConfirmationTitle, item, 'general.confirmation') ?? undefined;\n }\n if (action.runConfirmationMessage !== null) {\n confirmParams.message = I18nUtils.Action.get(this.translate, action, 'confirm.message', action.runConfirmationMessage, item, 'general.confirmation') ?? undefined;\n }\n if (action.runConfirmationIcon !== null) {\n confirmParams.icon = action.runConfirmationIcon === undefined ? 'pi pi-exclamation-triangle' : action.runConfirmationIcon;\n }\n if (action.runConfirmationAcceptTitle !== null) {\n confirmParams.acceptLabel = I18nUtils.Action.get(this.translate, action, 'confirm.accept', action.runConfirmationAcceptTitle, item, 'general.yes') ?? undefined;\n confirmParams.acceptVisible = true;\n }\n if (action.runConfirmationRejectTitle !== null) {\n confirmParams.rejectLabel = I18nUtils.Action.get(this.translate, action, 'confirm.reject', action.runConfirmationRejectTitle, item, 'general.no') ?? undefined;\n confirmParams.rejectVisible = true;\n }\n\n const observable = new Observable<ActionRunResult<T, S, IDataProvider<T, S>>>(observer => {\n confirmParams.accept = () => {\n action\n .runFunction(context)\n .pipe(\n first(),\n map(res => new ActionRunResult(context, res)),\n map(runResult => {\n if (action.hasRunNotificationSuccess) {\n runResult.notification = NotificationUtil.actionNotificationSuccess(\n this.translate,\n action,\n 'run',\n action.runNotificationSuccessTitle,\n action.runNotificationSuccessMessage,\n viewContainer,\n item\n );\n }\n return runResult;\n }),\n catchError(err => {\n const actionError = this.toMngActionError(err);\n if (action.hasRunNotificationError) {\n actionError.notification = NotificationUtil.actionNotificationError(this.translate, action, actionError, 'run', viewContainer, item);\n }\n return throwError(() => actionError);\n })\n )\n .subscribe(res => {\n observer.next(res);\n observer.complete();\n });\n };\n\n confirmParams.reject = () => {\n observer.error(new ActionRunResult(context, undefined, new ActionError(null, true)));\n };\n\n if (action.runConfirmationConfigMapFn) {\n confirmParams = action.runConfirmationConfigMapFn(context, confirmParams);\n }\n\n srcConfirmComponent.getConfirmationService().confirm(confirmParams);\n });\n return observable;\n } else {\n return action.runFunction(context).pipe(\n map(res => new ActionRunResult(context, res)),\n map(runResult => {\n if (action.hasRunNotificationSuccess) {\n runResult.notification = NotificationUtil.actionNotificationSuccess(\n this.translate,\n action,\n 'run',\n action.runNotificationSuccessTitle,\n action.runNotificationSuccessMessage,\n viewContainer,\n item\n );\n }\n return runResult;\n }),\n catchError(err => {\n const actionError = this.toMngActionError(err);\n if (action.hasRunNotificationError) {\n actionError.notification = NotificationUtil.actionNotificationError(this.translate, action, actionError, 'run', viewContainer, item);\n }\n return throwError(() => actionError);\n })\n );\n }\n }\n\n /**\n * Runs editor action save function usually triggered on form submit.\n *\n * @param action Action descriptor.\n * @param itemId Item id (if exists).\n * @param formItem Item instance (from form).\n * @param dataProvider Data provider\n * @param sourceComponent Source component from where the fetch function was called.\n * @param viewContainer View container/service.\n * @param actionData Additional action data.\n */\n public runEditorSave<T, S>(\n action: ActionEditorDescriptor<T>,\n itemId?: IdType,\n formItem?: T,\n dataProvider?: IEditorDataProvider<T, S>,\n sourceComponent?: any,\n viewContainer?: IViewContainer<T, S>,\n actionData?: ActionData\n ): Observable<ActionRunResult<T, S, IEditorDataProvider<T, S>>> {\n const context = this.prepareExecContextForEditor(action, formItem, itemId, dataProvider, sourceComponent, viewContainer, actionData);\n if (typeof action.submitFunction !== 'function') {\n throw new Error(`Submit function for action ${action.actionName} cannot be invoked.`);\n }\n return action.submitFunction(context).pipe(\n map(res => new ActionRunResult(context, res)),\n map(runResult => {\n if (action.hasRunNotificationSuccess) {\n runResult.notification = NotificationUtil.actionNotificationSuccess(\n this.translate,\n action,\n 'submit',\n action.runNotificationSuccessTitle,\n action.runNotificationSuccessMessage,\n viewContainer,\n formItem\n );\n }\n return runResult;\n }),\n catchError(err => {\n const actionError = this.toMngActionError(err);\n if (action.hasRunNotificationError) {\n actionError.notification = NotificationUtil.actionNotificationError(this.translate, action, actionError, 'submit', viewContainer, formItem);\n }\n return throwError(() => actionError);\n })\n );\n }\n\n /**\n * Runs editor action fetch function.\n *\n * @param action Action descriptor.\n * @param item Item instance (if exists).\n * @param itemId Item id.\n * @param dataProvider Data provider\n * @param sourceComponent Source component from where the fetch function was called.\n * @param viewContainer View container/service. Tableview component.\n * @param actionData Additional action data.\n */\n public runEditorFetch<T, S>(\n action: ActionEditorDescriptor<T>,\n item?: T,\n itemId?: IdType,\n dataProvider?: IEditorDataProvider<T, S>,\n sourceComponent?: any,\n viewContainer?: IViewContainer<T, S>,\n actionData?: ActionData\n ): Observable<ActionRunResult<T, S, IEditorDataProvider<T, S>>> {\n const context = this.prepareExecContextForEditor(action, item, itemId, dataProvider, sourceComponent, viewContainer, actionData);\n return action.fetchFunction(context).pipe(map(res => new ActionRunResult(context, res)));\n // TODO: error handling\n }\n\n /**\n * Prepares action exec context for action of type editor.\n *\n * @param item Item instance (if exists).\n * @param itemId Item id (if exists).\n * @param dataProvider Data provider.\n * @param sourceComponent Source component from where the context preparation was called.\n * @param viewContainer View container/service.\n * @param actionData Additional action data.\n */\n private prepareExecContextForEditor<T, S>(\n action: ActionEditorDescriptor<T>,\n item?: T,\n itemId?: IdType,\n dataProvider?: IEditorDataProvider<T, S>,\n sourceComponent?: any,\n viewContainer?: IViewContainer<T, S>,\n actionData?: ActionData\n ): ActionExecContext<T, S, IEditorDataProvider<T, S>> {\n let ctxDataProvider = dataProvider;\n if (!ctxDataProvider && action.dataProvider) {\n ctxDataProvider = action.dataProvider;\n }\n if (!ctxDataProvider) {\n const viewContainerDataProvider = viewContainer?.getDataProvider();\n if (viewContainerDataProvider) {\n ctxDataProvider = viewContainerDataProvider as IEditorDataProvider<T, S>;\n }\n }\n const context = new ActionExecContext<T, S, IEditorDataProvider<T, S>>(\n action,\n ctxDataProvider,\n this.getDataProviderService(ctxDataProvider) ?? undefined,\n {\n item,\n itemId,\n actionData\n },\n sourceComponent,\n viewContainer\n );\n return context;\n }\n\n /**\n * Gets service instance of data provider.\n *\n * @param dataProvider Data provider instance.\n */\n private getDataProviderService<T, S>(dataProvider?: IDataProvider<T, S>): S | null {\n if (dataProvider?.serviceType) {\n return this.injector.get<S>(dataProvider.serviceType);\n } else {\n return null;\n }\n }\n\n /**\n * Activates action.\n *\n * @param action Action descriptor.\n * @param item Item instance (if exists).\n * @param itemId Item id (if exists).\n * @param actionData Optional additional action data.\n * @param viewContainer View container component/service.\n * @param sourceComponent Source activation component.\n */\n public activateAction<T, S>(\n action: ActionDescriptor<T>,\n itemId?: IdType,\n item?: T,\n actionData?: ActionData,\n viewContainer?: IViewContainer<T, S>,\n sourceComponent?: any\n ): Observable<ActionActivationResult<T, S, IDataProvider<T, S>>> {\n if (action.type === ActionTypeEnum.Editor) {\n let dialogComponent = this.defaultEditorDialogComponent;\n let dialogClassName = '';\n if (action instanceof ActionEditorDescriptor) {\n dialogClassName = action.dialogClassName ?? 'mng-action-editor-dialog';\n let dialogSizeClassName = '';\n switch (action.dialogSize) {\n case ActionEditorDescriptor.DialogSizeEnum.ExtraSmall:\n dialogSizeClassName = 'mng-action-editor-dialog-xs';\n break;\n case ActionEditorDescriptor.DialogSizeEnum.Small:\n dialogSizeClassName = 'mng-action-editor-dialog-sm';\n break;\n case ActionEditorDescriptor.DialogSizeEnum.Large:\n dialogSizeClassName = 'mng-action-editor-dialog-lg';\n break;\n case ActionEditorDescriptor.DialogSizeEnum.ExtraLarge:\n dialogSizeClassName = 'mng-action-editor-dialog-xl';\n break;\n case ActionEditorDescriptor.DialogSizeEnum.Normal:\n default:\n break;\n }\n if (dialogSizeClassName.length) {\n dialogClassName += ` ${dialogSizeClassName}`;\n }\n if (action.editorComponent) {\n dialogComponent = action.editorComponent;\n }\n }\n console.log(dialogClassName);\n const dialogConfig: DynamicDialogConfig = {\n data: {\n action\n },\n styleClass: dialogClassName\n };\n if (itemId) {\n dialogConfig.data.itemId = itemId;\n }\n if (item) {\n dialogConfig.data.item = item;\n }\n if (actionData) {\n dialogConfig.data.actionData = actionData;\n }\n if (viewContainer) {\n dialogConfig.data.viewContainer = viewContainer;\n }\n if (sourceComponent) {\n dialogConfig.data.sourceComponent = sourceComponent;\n }\n const dialogRef = this.dialogService.open(dialogComponent, dialogConfig);\n return of(new ActionActivationResult<T, S, IDataProvider<T, S>>(undefined, dialogRef));\n } else if (action.type === ActionTypeEnum.Event) {\n // just emit event\n return of(new ActionActivationResult<T, S, IDataProvider<T, S>>(undefined));\n } else {\n // directly execute action\n return this.runAction<T, S>(action, itemId, item, undefined, sourceComponent, viewContainer, actionData).pipe(\n map(res => new ActionActivationResult<T, S, IDataProvider<T, S>>(res))\n );\n }\n }\n\n /**\n * Triggers action from table row click position.\n *\n * @param action Action descriptor.\n * @param event Target table click event.\n * @param route Currently activate route.\n * @param tableDescriptor Table descriptor.\n * @param dataKeyProperty Data key property.\n */\n public triggerRowClickAction<T>(\n action: ActionDescriptor<T>,\n event: MngTableCellClickEvent<T>,\n route?: ActivatedRoute,\n tableDescriptor?: TableDescriptor<T>,\n dataKeyProperty?: string\n ) {\n const idProperty = dataKeyProperty ?? tableDescriptor?.dataKeyProperty ?? action?.model?.idPropertyName ?? dataKeyProperty;\n if (!idProperty) {\n throw new Error(`Row click action ${action.actionName} can not be triggered, because id property could not be found.`);\n }\n const rowItem = event?.rowItem as any;\n return this.triggerAction(action, rowItem[idProperty], event.rowItem, undefined, route);\n }\n\n /**\n * Triggers action with optional data (item, itemId, ...) and currently activated route.\n *\n * @param action Action.\n * @param actionData Optional action data.\n * @param route Optional activated route.\n */\n public triggerAction<T, S>(\n action: ActionDescriptor<T>,\n itemId?: IdType,\n item?: T,\n actionData?: ActionData,\n route?: ActivatedRoute,\n viewContainer?: IViewContainer<T, S>,\n sourceComponent?: any\n ): Observable<ActionTriggerResult<T, S, IDataProvider<T, S>>> {\n if (action.activationTrigger === ActionActivationTriggerEnum.OnRoute) {\n const baseUrl = this.router.url.split('?')[0];\n const parsedUrl: UrlTree = this.router.parseUrl(this.router.url);\n let actionUrl = action.routeUrl ?? '';\n // TODO: dont strip '/', but use it accordingly with Angular's router patterns (/, ./, ../)\n if (actionUrl.startsWith('/')) {\n actionUrl = actionUrl.substring(1);\n }\n\n const actionUrlSegments = this.linkFormatter.transform(actionUrl, itemId, item, action.model, actionData);\n\n return of(\n new ActionTriggerResult<T, S, IDataProvider<T, S>>(\n undefined,\n from(this.router.navigate([baseUrl, ...actionUrlSegments], {relativeTo: route, queryParams: parsedUrl.queryParams}))\n )\n );\n } else {\n return this.activateAction(action, itemId, item, actionData, viewContainer, sourceComponent).pipe(map(res => new ActionTriggerResult<T, S, IDataProvider<T, S>>(res)));\n }\n }\n\n public deactivateAction<T>(action: ActionDescriptor<T>) {\n if (this.navigationService.getPreviousLocation()) {\n // there are internal history records, so back can be normally called\n this.navigationService.back();\n } else {\n // there is no internal history records, figure out the base url by eliminating action specific url\n let url = this.navigationService.getCurrentLocation();\n if (!url) {\n this.navigationService.back();\n } else {\n if (url.startsWith('/')) {\n url = url.substring(1);\n }\n const urlPathSegments = url.split('?')[0].split('#')[0].split('/');\n let actionUrl = action?.routeUrl ?? '';\n if (actionUrl.startsWith('/')) {\n actionUrl = actionUrl.substring(1);\n }\n const actionUrlSegments = actionUrl.split('/');\n const redirectUrl = urlPathSegments.slice(0, urlPathSegments.length - actionUrlSegments.length).join('/');\n this.router.navigateByUrl(`/${redirectUrl}`, {replaceUrl: true});\n }\n }\n }\n\n public toMngActionError(error?: any): MngError {\n const actionError: MngError = {\n name: error?.name ?? 'UnknownError',\n message: error?.message ?? 'Unknown error',\n cause: error\n };\n if (error instanceof HttpErrorResponse) {\n actionError.status = error.status;\n actionError.statusDescription = error.statusText;\n actionError.url = error.url ?? undefined;\n }\n return this.errorMapper.toMngError(error, actionError);\n }\n}\n","import {HttpClient, HttpErrorResponse} from '@angular/common/http';\n\nimport {Observable, combineLatest, of, tap, throwError} from 'rxjs';\nimport {catchError, map} from 'rxjs/operators';\n\nexport class MngConfigurationService {\n private static _instance: MngConfigurationService | null = null;\n\n public static init(httpClient: HttpClient): MngConfigurationService {\n if (!this._instance) {\n MngConfigurationService._instance = new MngConfigurationService(httpClient);\n }\n return MngConfigurationService.get();\n }\n\n public static get(): MngConfigurationService {\n if (!MngConfigurationService._instance) {\n throw new Error('Configuration service instance not set. Call init first.');\n }\n return MngConfigurationService._instance;\n }\n\n private projectEnvironment?: any;\n private jsonSources: Array<JsonSourceLoadInfo> = [];\n\n private configuration = {...this.projectEnvironment};\n\n private constructor(private http: HttpClient) {}\n\n /**\n * Add project environment source.\n * @param environemnt Environment.\n */\n public addEnvironmentSource(environment: any): void {\n this.projectEnvironment = environment;\n this.mergeConfigs();\n }\n\n /**\n * Adds new config source from JSON file.\n * @param url Url to JSON file.\n */\n public addJsonSource(url: string = this.projectEnvironment.configurationJsonSource, load = false): Observable<boolean> {\n if (!url) {\n console.debug('No path to configuration file specified. Setting default.');\n url = 'assets/config/env{{environment}}.json';\n }\n\n const sourceInfo: JsonSourceLoadInfo = {\n url: url,\n isEnvironment: false,\n isLoaded: false\n };\n this.jsonSources.push(sourceInfo);\n\n console.debug(`Added JSON source: ${url}`);\n\n if (load) {\n return this.loadJsonSources();\n } else {\n return of(true);\n }\n }\n\n public loadJsonSources(): Observable<boolean> {\n return combineLatest(\n this.jsonSources\n .filter(source => !source.isLoaded)\n .map(sourceInfo => {\n let url = sourceInfo.url;\n if (url.indexOf('{{environment}}') >= 0) {\n sourceInfo.isEnvironment = true;\n sourceInfo.environment = this.projectEnvironment.name || (this.projectEnvironment.production ? 'prod' : 'dev');\n url = url.replace('{{environment}}', '.' + sourceInfo.environment);\n }\n\n console.debug(`Loading JSON source: ${sourceInfo.url} with env ${sourceInfo.environment ?? '/'}`);\n\n return this.http.get<object>(url).pipe(\n catchError((err: HttpErrorResponse) => {\n if (sourceInfo.isEnvironment) {\n const noEnvUrl = sourceInfo.url.replace('{{environment}}', '');\n sourceInfo.environment = null;\n\n console.debug(`Reloading JSON source: ${sourceInfo.url} with env ${sourceInfo.environment ?? '/'}`);\n\n return this.http.get<object>(noEnvUrl);\n } else {\n const message = `Configuration file ${url} not loaded (${err.status}): ${err.message}.`;\n console.error(message);\n return throwError(() => new Error(message));\n }\n }),\n map(configuration => {\n sourceInfo.configuration = configuration;\n sourceInfo.isLoaded = true;\n\n console.debug(`JSON source loaded: ${sourceInfo.url}`);\n\n return true;\n })\n );\n })\n ).pipe(\n map(sourceResults => sourceResults.every(sr => sr)),\n tap(sourceResults => this.mergeConfigs())\n );\n }\n\n /**\n * Get configuration.\n */\n public getConfig() {\n return this.configuration;\n }\n\n /**\n * Get configuration value for key.\n * @param key Configuration key.\n */\n public getConfigValue(key: string) {\n return this.configuration[key] ? this.configuration[key] : null;\n }\n\n /**\n * Merges configuration from multiple sources with\n */\n private mergeConfigs() {\n let config = {...this.projectEnvironment};\n const jsonConfigs = this.jsonSources.filter(source => source.isLoaded && typeof source.configuration === 'object').map(source => source.configuration);\n if (jsonConfigs.length) {\n for (const jsonConfig of jsonConfigs) {\n config = {...config, ...jsonConfig};\n }\n }\n this.configuration = config;\n }\n}\n\ninterface JsonSourceLoadInfo {\n url: string;\n isLoaded: boolean;\n isEnvironment: boolean;\n environment?: string | null;\n configuration?: object;\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {Title} from '@angular/platform-browser';\nimport {ActivatedRouteSnapshot, NavigationEnd, Router} from '@angular/router';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {PrimeNGConfig} from 'primeng/api';\nimport {BehaviorSubject, Observable, ReplaySubject, Subject, Subscription} from 'rxjs';\nimport {filter, map} from 'rxjs/operators';\n\nimport {MngModuleConfig} from '../config/models';\nimport {FilterDescriptor} from '../descriptors';\nimport {IUser, MngMenuItem} from '../models';\nimport {MngBreadcrumbMenuItem, MngRouterData} from '../router/models';\nimport {MNG_BROWSER_STORAGE_IT, MNG_MODULE_CONFIG_IT} from './tokens';\n\n@Injectable()\nexport class MngCommonsService {\n // internal\n private routerEventsSubscription?: Subscription;\n private translateLangChangeSubscription?: Subscription;\n\n // menu\n private _menuMode: 'static' | 'sidebar' | 'slim' | 'overlay' = 'sidebar';\n private _menuModeSubject: Subject<'static' | 'sidebar' | 'slim' | 'overlay'> = new BehaviorSubject(this._menuMode);\n private _menuItems: MngMenuItem[] = [];\n private _menuPinEnabled = false;\n private _menuActiveKeySubject = new Subject<string>();\n private _menuResetSubject = new Subject();\n\n // breadcrumbs\n private readonly breadcrumbHomeSubject = new BehaviorSubject<MngMenuItem | null>({\n icon: 'pi pi-home',\n routerLink: '/'\n });\n private readonly breadcrumbsSubject = new BehaviorSubject<MngMenuItem[]>([]);\n private breadcrumbsTranslateSubscription?: Subscription;\n private breadcrumbHomeTranslateSubscription?: Subscription;\n\n // visual\n private _colorScheme: 'light' | 'dark' = 'light';\n\n // user\n private _user?: IUser;\n private userSubject: Subject<IUser | undefined> = new ReplaySubject(1);\n\n constructor(\n private router: Router,\n private primengConfig: PrimeNGConfig,\n private translate: TranslateService,\n private titleService: Title,\n @Inject(MNG_MODULE_CONFIG_IT) private moduleConfig: MngModuleConfig,\n @Inject(MNG_BROWSER_STORAGE_IT) private localStorage: Storage\n ) {}\n\n // APP section\n\n public get appName() {\n return this.moduleConfig?.app?.name ?? 'app.name';\n }\n\n public get appOwner() {\n return this.moduleConfig?.app?.owner ?? 'app.owner';\n }\n\n public get appLogoLight() {\n return this.moduleConfig?.app?.logoPathLight ? this.moduleConfig.app.logoPathLight : this.moduleConfig?.app?.logoPath ?? 'assets/layout/images/logo.png';\n }\n\n public get appLogoDark() {\n return this.moduleConfig?.app?.logoPathDark ? this.moduleConfig.app.logoPathDark : this.moduleConfig?.app?.logoPath ?? 'assets/layout/images/logo.png';\n }\n\n public get appLogoNameLight() {\n return this.moduleConfig?.app?.logoNamePathLight\n ? this.moduleConfig.app.logoNamePathLight\n : this.moduleConfig?.app?.logoNamePath ?? 'assets/layout/images/logo-appname.png';\n }\n\n public get appLogoNameDark() {\n return this.moduleConfig?.app?.logoNamePathDark ? this.moduleConfig.app.logoNamePathDark : this.moduleConfig?.app?.logoNamePath ?? 'assets/layout/images/logo-appname.png';\n }\n\n public get appLanguages() {\n return this.moduleConfig?.app?.languages ?? ['en'];\n }\n\n public get appLanguage(): string {\n const lang = this.localStorage.getItem('lang');\n if (lang) {\n return lang;\n }\n const browserLang = this.translate.getBrowserLang();\n if (browserLang && this.appLanguages.some(l => l === browserLang)) {\n this.appLanguage = browserLang;\n return browserLang;\n }\n const defaultLanguage = this.appLanguages?.length > 0 ? this.appLanguages[0] : 'en';\n this.appLanguage = defaultLanguage;\n return defaultLanguage;\n }\n\n public set appLanguage(language: string) {\n if (this.appLanguages.some(l => l === language)) {\n this.localStorage.setItem('lang', language);\n this.translate.use(language);\n }\n }\n\n // MENU section\n\n public get menuModeIsStatic() {\n return this._menuMode === 'static';\n }\n\n public get menuModeIsStatic$(): Observable<boolean> {\n return this._menuModeSubject.pipe(map(e => e === 'static'));\n }\n\n public get menuModeIsOverlay() {\n return this._menuMode === 'overlay';\n }\n\n public get menuModeIsOverlay$(): Observable<boolean> {\n return this._menuModeSubject.pipe(map(e => e === 'overlay'));\n }\n\n public get menuModeIsSlim() {\n return this._menuMode === 'slim';\n }\n\n public get menuModeIsSlim$(): Observable<boolean> {\n return this._menuModeSubject.pipe(map(e => e === 'slim'));\n }\n\n public get menuModeIsSidebar() {\n return this._menuMode === 'sidebar';\n }\n\n public get menuModeIsSidebar$(): Observable<boolean> {\n return this._menuModeSubject.pipe(map(e => e === 'sidebar'));\n }\n\n public get menuActiveKey$(): Observable<string> {\n return this._menuActiveKeySubject.asObservable();\n }\n\n public get menuReset$(): Observable<any> {\n return this._menuResetSubject.asObservable();\n }\n\n public get menuItems() {\n return this._menuItems;\n }\n\n public set menuItems(menuItems: MngMenuItem[]) {\n this._menuItems = menuItems;\n }\n\n public get menuPinEnabled() {\n return this._menuPinEnabled;\n }\n\n // BREADCRUMB section\n public get breadcrumbHome$() {\n return this.breadcrumbHomeSubject.asObservable();\n }\n\n public get breadcrumbs$() {\n return this.breadcrumbsSubject.asObservable();\n }\n\n // VISUAL section\n\n public get colorSchemeIsLight() {\n return this._colorScheme === 'light';\n }\n\n public get colorSchemeIsDark() {\n return this._colorScheme === 'dark';\n }\n\n // USER section\n\n public get user() {\n return this._user;\n }\n\n public set user(user: IUser | undefined) {\n this._user = user;\n this.userSubject.next(user);\n }\n\n public get user$() {\n return this.userSubject.asObservable();\n }\n\n public reset() {\n this._menuMode = this.moduleConfig?.menu?.mode ?? 'sidebar';\n this._menuModeSubject.next(this._menuMode);\n this._menuItems = this.moduleConfig?.menu?.menuItems ?? [];\n this._menuPinEnabled = this.moduleConfig?.menu?.pinEnabled ?? false;\n\n // visual\n this._colorScheme = this.moduleConfig?.app?.colorScheme ?? 'light';\n\n // ripple\n this.primengConfig.ripple = true;\n this.primengConfig.filterMatchModeOptions = {\n text: [\n FilterDescriptor.MatchModeEnum.Contains,\n FilterDescriptor.MatchModeEnum.Equals,\n FilterDescriptor.MatchModeEnum.NotEquals,\n FilterDescriptor.MatchModeEnum.StartsWith,\n FilterDescriptor.MatchModeEnum.EndsWith\n ],\n numeric: [\n FilterDescriptor.MatchModeEnum.Equals,\n FilterDescriptor.MatchModeEnum.NotEquals,\n FilterDescriptor.MatchModeEnum.LessThanOrEqualTo,\n FilterDescriptor.MatchModeEnum.GreaterThanOrEqualTo\n ],\n date: [\n FilterDescriptor.MatchModeEnum.DateIs,\n FilterDescriptor.MatchModeEnum.DateIsNot,\n FilterDescriptor.MatchModeEnum.DateBefore,\n FilterDescriptor.MatchModeEnum.DateAfter\n ]\n };\n\n // translate\n this.translate.langs = this.appLanguages;\n this.translate.use(this.appLanguage);\n this.translate.get('mngPrime').subscribe(value => this.primengConfig.setTranslation(value));\n\n this.routerEventsSubscription?.unsubscribe();\n this.routerEventsSubscription = this.router.events\n .pipe(\n // Filter the NavigationEnd events as the breadcrumb is updated only when the route reaches its end\n filter(event => event instanceof NavigationEnd)\n )\n .subscribe(() => {\n this.updateBreadcrumbs();\n this.setPageTitle();\n });\n this.translateLangChangeSubscription?.unsubscribe();\n this.translateLangChangeSubscription = this.translate.onLangChange.subscribe(() => {\n this.updateBreadcrumbs();\n this.setPageTitle();\n });\n }\n\n // MENU actions\n\n menuChangeActiveKey(key: string) {\n this._menuActiveKeySubject.next(key);\n }\n\n menuReset() {\n this._menuResetSubject.next(null);\n }\n\n // BREADCRUMB actions\n\n private updateBreadcrumbs() {\n if (this.breadcrumbsTranslateSubscription) {\n this.breadcrumbsTranslateSubscription.unsubscribe();\n this.breadcrumbsTranslateSubscription = undefined;\n }\n if (this.breadcrumbHomeTranslateSubscription) {\n this.breadcrumbHomeTranslateSubscription.unsubscribe();\n this.breadcrumbHomeTranslateSubscription = undefined;\n }\n\n const rootRoute = this.router.routerState.snapshot.root;\n\n const homeBreadcrumb = this.generateHomeBreadcrumb(rootRoute);\n if (homeBreadcrumb) {\n if (homeBreadcrumb.label) {\n this.breadcrumbHomeTranslateSubscription = this.translate.get(homeBreadcrumb.label).subscribe(i18n => {\n homeBreadcrumb.label = i18n;\n this.breadcrumbHomeSubject.next(homeBreadcrumb);\n });\n } else {\n this.breadcrumbHomeSubject.next(homeBreadcrumb);\n }\n }\n\n const breadcrumbs: MngMenuItem[] = [];\n this.generateBreadcrumbs(rootRoute, [], breadcrumbs);\n\n const i18nKeys: Array<string> = breadcrumbs.filter(b => typeof b.label === 'string').map(b => b.label!);\n if (i18nKeys.length > 0) {\n this.breadcrumbsTranslateSubscription = this.translate.get(i18nKeys).subscribe(i18n => {\n // Construct the breadcrumb hierarchy\n breadcrumbs.forEach(b => {\n if (b.label && i18n[b.label]) {\n b.label = i18n[b.label];\n }\n });\n\n // Emit the new breadcrumbs\n this.breadcrumbsSubject.next(breadcrumbs);\n });\n } else {\n this.breadcrumbsSubject.next(breadcrumbs);\n }\n }\n\n private generateHomeBreadcrumb(route: ActivatedRouteSnapshot | null): MngMenuItem | null {\n if (!route) {\n return null;\n }\n\n const routeData = route.data as MngRouterData;\n const breadcrumbRouteData = routeData?.breadcrumb;\n if (breadcrumbRouteData && typeof breadcrumbRouteData === 'object' && 'isHome' in breadcrumbRouteData) {\n if (breadcrumbRouteData.isHome === false) {\n return null;\n }\n const breadcrumb = this.createBreadcrumb('/', breadcrumbRouteData, true);\n if (breadcrumb) {\n if (typeof breadcrumb.icon === 'undefined') {\n breadcrumb.icon = 'pi pi-home';\n }\n return breadcrumb;\n }\n } else {\n return this.generateHomeBreadcrumb(route.firstChild);\n }\n return null;\n }\n\n private generateBreadcrumbs(route: ActivatedRouteSnapshot | null, parentUrlSegments: string[], breadcrumbs: MngMenuItem[]) {\n if (!route) {\n return;\n }\n\n const routeData = route.data as MngRouterData;\n const routeUrlSegments = parentUrlSegments.concat(route.url.map(url => url.path));\n const routeUrl = `/${routeUrlSegments.join('/')}`;\n if (routeData?.breadcrumb) {\n const breadcrumbRouteData = routeData.breadcrumb;\n\n if (Array.isArray(breadcrumbRouteData)) {\n for (const breadcrumbRouteDataItem of breadcrumbRouteData) {\n const breadcrumb = this.createBreadcrumb(routeUrl, breadcrumbRouteDataItem);\n if (breadcrumb) {\n breadcrumbs.push(breadcrumb);\n }\n }\n } else if (typeof breadcrumbRouteData === 'function') {\n breadcrumbs.push(...breadcrumbRouteData(routeUrl, route));\n } else {\n const breadcrumb = this.createBreadcrumb(routeUrl, breadcrumbRouteData);\n if (breadcrumb) {\n breadcrumbs.push(breadcrumb);\n }\n }\n }\n this.generateBreadcrumbs(route.firstChild, routeUrlSegments, breadcrumbs);\n }\n\n private createBreadcrumb(routeUrl: string, routeBreadcrumb: string | MngBreadcrumbMenuItem, includeHome = false): MngMenuItem | null {\n if (typeof routeBreadcrumb === 'string') {\n return {\n label: routeBreadcrumb,\n routerLink: routeUrl\n };\n } else {\n if (!includeHome && typeof routeBreadcrumb.isHome !== 'undefined') {\n // home should not be included\n return null;\n }\n if (typeof routeBreadcrumb.routerLink === 'undefined') {\n routeBreadcrumb.routerLink = routeUrl;\n }\n return routeBreadcrumb;\n }\n }\n\n // TITLE section\n\n public setPageTitle(title?: string) {\n let currentRoute = this.router.routerState.snapshot.root;\n while (currentRoute.firstChild) {\n currentRoute = currentRoute.firstChild;\n }\n\n const routeData = currentRoute.data as MngRouterData;\n const pageTitle = title ?? routeData.pageTitle;\n\n this.titleService.setTitle(this.formatPageTitle(pageTitle));\n }\n\n private formatPageTitle(titlePrefix?: string) {\n const titlePieces = [];\n\n if (titlePrefix) {\n titlePieces.push(this.translate.instant(titlePrefix));\n }\n\n titlePieces.push(this.translate.instant('app.name'));\n\n return titlePieces.join(' - ');\n }\n}\n","import {Injectable} from '@angular/core';\n\nimport {MessageService} from 'primeng/api';\nimport {Subject} from 'rxjs';\n\nimport {IDataProvider} from '../data-providers';\nimport {ActionDescriptor} from '../descriptors';\nimport {IViewContainer} from '../models';\n\n/**\n * Should be used with providers defined within component.\n */\n@Injectable()\nexport class MngViewContainerComponentService<T, S> implements IViewContainer<T, S> {\n private _dataProvider?: IDataProvider<T, S>;\n public actions: Array<ActionDescriptor<T>> = [];\n\n private _reloadTableSubject: Subject<any> = new Subject();\n\n constructor(private messageService: MessageService) {}\n\n public set dataProvider(dataProvider: IDataProvider<T, S>) {\n this._dataProvider = dataProvider;\n }\n\n public get reloadTable() {\n return this._reloadTableSubject.asObservable();\n }\n\n public triggerTableReload(event: any) {\n this._reloadTableSubject.next(event);\n }\n\n public getMessageService(): MessageService {\n return this.messageService;\n }\n\n public getDataProvider(): IDataProvider<T, S> | undefined {\n return this._dataProvider;\n }\n}\n","import {ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, OnChanges, OnDestroy, OnInit, Optional, Output, SimpleChanges} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {ConfirmationService} from 'primeng/api';\nimport {Observable, ReplaySubject, Subscription, distinctUntilChanged, of} from 'rxjs';\nimport {first} from 'rxjs/operators';\n\nimport {IDataProvider} from '../../data-providers';\nimport {ActionDescriptor, ActionLevelEnum, ActionLinkDescriptor} from '../../descriptors';\nimport {IViewContainer} from '../../models';\nimport {MngActionExecutorService, MngViewContainerComponentService} from '../../services';\nimport {IdType} from '../../types';\nimport {I18nUtils} from '../../utils';\nimport {ActionData, ActionTriggerResult, IActionConfirmationService} from './models';\n\n@Component({\n selector: 'mng-action',\n templateUrl: './action.component.html',\n styleUrls: ['./action.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [ConfirmationService]\n})\nexport class MngActionComponent<T, S> implements OnInit, OnChanges, OnDestroy, IActionConfirmationService {\n public readonly levelDefault = ActionLevelEnum.Default;\n public readonly levelPrimary = ActionLevelEnum.Primary;\n public readonly levelSecondary = ActionLevelEnum.Secondary;\n public readonly levelInfo = ActionLevelEnum.Info;\n public readonly levelHelp = ActionLevelEnum.Help;\n public readonly levelSuccess = ActionLevelEnum.Success;\n public readonly levelWarning = ActionLevelEnum.Warning;\n public readonly levelDanger = ActionLevelEnum.Danger;\n\n @HostBinding('class') hostClass = 'mng-action-button';\n\n // metadata and editor mode input\n @Input() public action!: ActionDescriptor<T>;\n @Input() public item?: T;\n @Input() public itemId?: IdType;\n @Input() public actionData?: ActionData;\n @Input() public dataProvider?: IDataProvider<T, S>;\n @Input('disabled') public inputDisabled: Observable<boolean> = of(false);\n @Input('loading') public inputLoading: Observable<boolean> = of(false);\n @Input('viewContainer') public viewContainerInit?: IViewContainer<T, S>;\n\n @Output('trigger') public triggerEventEmitter = new EventEmitter<ActionTriggerResult<T, S, IDataProvider<T, S>>>();\n\n private loadingSubject = new ReplaySubject<boolean>(1);\n public $loading: Observable<boolean> = this.loadingSubject.asObservable();\n\n public cmpId: string = Math.random().toString(36).substring(2);\n private isVisibleSubject = new ReplaySubject<boolean>(1);\n private isVisibleSubscription?: Subscription;\n public $isVisible = this.isVisibleSubject.asObservable().pipe(distinctUntilChanged());\n private isEnabledSubject = new ReplaySubject<boolean>(1);\n private isEnabledSubscription?: Subscription;\n public $isEnabled = this.isEnabledSubject.asObservable().pipe(distinctUntilChanged());\n private labelSubject = new ReplaySubject<string | null>(1);\n private labelSubscription?: Subscription;\n public $label = this.labelSubject.asObservable().pipe(distinctUntilChanged());\n private tooltipSubject = new ReplaySubject<string | null>(1);\n private tooltipSubscription?: Subscription;\n public $tooltip = this.tooltipSubject.asObservable().pipe(distinctUntilChanged());\n\n private viewContainer?: IViewContainer<T, S>;\n\n public actionLink?: ActionLinkDescriptor<T>;\n public hasNoTitle = false;\n\n constructor(\n private route: ActivatedRoute,\n private translate: TranslateService,\n private actionExecutor: MngActionExecutorService,\n private confirmationService: ConfirmationService,\n @Optional() private viewContainerService: MngViewContainerComponentService<T, S> | null\n ) {\n this.loadingSubject.next(false);\n }\n\n public ngOnInit() {\n this.viewContainer = this.viewContainerInit ?? this.viewContainerService ?? undefined;\n\n this.hasNoTitle = this.action.title === null;\n this.isEnabledSubject.next(true);\n this.isVisibleSubject.next(true);\n this.labelSubject.next(null);\n this.tooltipSubject.next(null);\n this.processSubscriptions();\n\n if (this.action instanceof ActionLinkDescriptor) {\n this.actionLink = this.action;\n }\n\n if (this.action.className) {\n this.hostClass = this.action.className;\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!(changes['item']?.firstChange ?? true) || !(changes['itemId']?.firstChange ?? true) || !(changes['actionData']?.firstChange ?? true)) {\n this.processSubscriptions();\n }\n }\n\n ngOnDestroy(): void {\n this.isVisibleSubscription?.unsubscribe();\n this.isEnabledSubscription?.unsubscribe();\n this.labelSubscription?.unsubscribe();\n this.tooltipSubscription?.unsubscribe();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public triggerAction(event: Event) {\n this.loadingSubject.next(true);\n\n const actionData = this.actionData ? this.actionData : {};\n actionData['cmpId'] = this.cmpId;\n\n this.actionExecutor\n .triggerAction(this.action, this.itemId, this.item, actionData, this.route, this.viewContainer, this)\n .pipe(first())\n .subscribe({\n next: atr => {\n this.triggerEventEmitter.next(atr);\n this.loadingSubject.next(false);\n },\n error: err => {\n this.loadingSubject.next(false);\n console.warn(`Error occurred while executing action ${this.action.actionName}.`, err);\n }\n });\n }\n\n public getConfirmationService() {\n return this.confirmationService;\n }\n\n public getConfirmationServiceInstanceKey(action: ActionDescriptor<any>) {\n return `${action.actionName}_${this.cmpId}`;\n }\n\n private processSubscriptions() {\n const context = this.actionExecutor.prepareActionExecContext(\n this.action,\n this.itemId,\n this.item,\n this.dataProvider,\n this.viewContainer ?? undefined,\n this,\n this.actionData\n );\n\n if (typeof this.action.isVisibleFunction === 'function') {\n this.isVisibleSubscription?.unsubscribe();\n this.isVisibleSubscription = this.action.isVisibleFunction(context).subscribe({\n next: res => this.isVisibleSubject.next(res)\n });\n }\n if (typeof this.action.isEnabledFunction === 'function') {\n this.isEnabledSubscription?.unsubscribe();\n this.isEnabledSubscription = this.action.isEnabledFunction(context).subscribe({\n next: res => this.isEnabledSubject.next(res)\n });\n }\n\n if (!this.hasNoTitle) {\n this.labelSubscription?.unsubscribe();\n this.labelSubscription = I18nUtils.Action.getAsync(this.translate, this.action, 'title', this.action?.title ?? undefined, this.item).subscribe({\n next: i18n => this.labelSubject.next(i18n)\n });\n }\n\n this.tooltipSubscription?.unsubscribe();\n this.tooltipSubscription = I18nUtils.Action.getAsync(this.translate, this.action, 'tooltip', this.action?.tooltip ?? undefined, this.item).subscribe({\n next: i18n => this.tooltipSubject.next(i18n)\n });\n }\n}\n","<ng-container *ngIf=\"$isVisible | async\">\n <a\n *ngIf=\"actionLink && actionLink.url !== ''; else routerLink\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : actionLink.url\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-link]=\"actionLink.isStyleLink\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"\n >{{ ($label | async) ?? '' }}</a\n >\n <ng-template #routerLink>\n <a\n *ngIf=\"actionLink; else button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"\n ($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.pathSegments | linkFormatter: itemId:item:action.model:actionData)\n \"\n [queryParams]=\"actionLink.queryParams\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-link]=\"actionLink.isStyleLink\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"\n >{{ ($label | async) ?? '' }}</a\n >\n </ng-template>\n <ng-template #button>\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(action.icon)\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"$any($tooltip | async)\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction($event)\"\n [class.p-button-rounded]=\"hasNoTitle\"\n [class.mng-action-button-icon]=\"hasNoTitle\"\n [class.p-button-text]=\"action.isStyleText\"\n [class.p-button-raised]=\"action.isStyleRaised\"\n [class.p-button-outlined]=\"action.isStyleOutlined\"\n [class.mng-button-xs]=\"action.isSizeExtraSmall\"\n [class.mng-button-sm]=\"action.isSizeSmall\"\n [class.mng-button-lg]=\"action.isSizeLarge\"\n [class.mng-button-xl]=\"action.isSizeExtraLarge\"\n [class.p-button-default]=\"action.level === levelDefault\"\n [class.p-button-primary]=\"action.level === levelPrimary\"\n [class.p-button-secondary]=\"action.level === levelSecondary\"\n [class.p-button-info]=\"action.level === levelInfo\"\n [class.p-button-help]=\"action.level === levelHelp\"\n [class.p-button-success]=\"action.level === levelSuccess\"\n [class.p-button-warning]=\"action.level === levelWarning\"\n [class.p-button-danger]=\"action.level === levelDanger\"></button>\n </ng-template>\n <p-confirmDialog *ngIf=\"action.hasRunConfirmation\" [key]=\"action.actionName + '_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n</ng-container>\n","import {ChangeDetectionStrategy, Component, OnDestroy, OnInit, Optional} from '@angular/core';\nimport {ActivatedRoute, Params, Router} from '@angular/router';\n\nimport {ConfirmationService, MessageService} from 'primeng/api';\nimport {DynamicDialogRef} from 'primeng/dynamicdialog';\nimport {Subscription} from 'rxjs';\nimport {first} from 'rxjs/operators';\n\nimport {ActionActivationTriggerEnum, ActionDescriptor} from '../../../descriptors';\nimport {MngActionExecutorService, MngNavigationService, MngViewContainerComponentService} from '../../../services';\nimport {ActionData, ActionRunResult, IActionConfirmationService} from '../models';\n\n@Component({\n selector: 'mng-action-route',\n templateUrl: './action-route.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MessageService, ConfirmationService]\n})\nexport class MngActionRouteComponent<T, S> implements OnInit, OnDestroy, IActionConfirmationService {\n public cmpId: string = Math.random().toString(36).substring(2);\n private actions: Array<ActionDescriptor<T>> = [];\n private activeAction?: ActionDescriptor<T>;\n private dialogRef?: DynamicDialogRef;\n private dialogCloseSubscription?: Subscription;\n private subscriptions: Array<Subscription> = [];\n\n constructor(\n private router: Router,\n private route: ActivatedRoute,\n private confirmationService: ConfirmationService,\n private navigationService: MngNavigationService,\n private actionExecutor: MngActionExecutorService,\n @Optional() private viewContainerService: MngViewContainerComponentService<T, S> | null\n ) {}\n\n public ngOnInit() {\n this.actions = this.viewContainerService?.actions.filter(a => a.activationTrigger === ActionActivationTriggerEnum.OnRoute) ?? [];\n const subscription = this.route.params.subscribe(p => {\n const action = this.findActiveAction(p);\n if (action) {\n this.activateAction(action, p, this.route.snapshot.queryParams);\n }\n });\n this.subscriptions.push(subscription);\n }\n\n public ngOnDestroy() {\n this.subscriptions.forEach(s => s.unsubscribe());\n if (this.dialogRef) {\n this.dialogRef.close();\n }\n }\n\n public getConfirmationService() {\n return this.confirmationService;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public getConfirmationServiceInstanceKey(action: ActionDescriptor<any>) {\n return `actionRoute_${this.cmpId}`;\n }\n\n private activateAction(action: ActionDescriptor<T>, p: Params, qp: Params) {\n this.activeAction = action;\n const itemId = p['itemId'];\n const actionData: ActionData = {};\n for (const key in p) {\n if (key === 'itemId') {\n continue;\n }\n actionData[key] = p[key];\n }\n for (const key in qp) {\n actionData[key] = p[key];\n }\n this.actionExecutor\n .activateAction(action, itemId, undefined, actionData, this.viewContainerService ?? undefined, this)\n .pipe(first())\n .subscribe(res => {\n if (res.dialogRef) {\n this.dialogRef = res.dialogRef;\n this.dialogCloseSubscription = this.dialogRef?.onClose.subscribe(e => {\n const actionEv = e as ActionRunResult<T, S, any>;\n if (!actionEv?.error || !actionEv?.error?.dismissed) {\n if (!this.viewContainerService) {\n console.warn(`View container service could not be found, table reload will not be triggered.`);\n }\n this.viewContainerService?.triggerTableReload(actionEv); // reload only if no error in action and\n }\n this.deactivateAction();\n });\n }\n });\n }\n\n private deactivateAction() {\n if (this.dialogCloseSubscription) {\n this.dialogCloseSubscription.unsubscribe();\n this.dialogCloseSubscription = undefined;\n }\n this.actionExecutor.deactivateAction(this.activeAction!);\n this.activeAction = undefined;\n this.dialogRef = undefined;\n }\n\n private findActiveAction(params: Params): ActionDescriptor<T> | null {\n const urlSegments = this.route.snapshot.url;\n for (const action of this.actions) {\n let actionUrl = action.routeUrl ?? '';\n // TODO: dont strip '/', but use it accordingly with Angular's router patterns (/, ./, ../)\n if (actionUrl.startsWith('/')) {\n actionUrl = actionUrl.substring(1);\n }\n const actionUrlSegments = actionUrl.split('/');\n if (actionUrlSegments.length !== urlSegments.length) {\n continue;\n }\n let isMatch = true;\n for (let i = 0; i < actionUrlSegments.length; i++) {\n if (actionUrlSegments[i].startsWith(':')) {\n const paramName = actionUrlSegments[i].substring(1);\n if (!params[paramName]) {\n isMatch = false;\n break;\n }\n } else if (actionUrlSegments[i] !== urlSegments[i].path) {\n isMatch = false;\n break;\n }\n }\n if (isMatch) {\n return action;\n }\n }\n return null;\n }\n}\n","<p-confirmDialog [key]=\"'actionRoute_' + cmpId\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n","import {ComponentRef, Directive, EventEmitter, Input, OnInit, Output, Type, ViewContainerRef} from '@angular/core';\n\nimport {IColumnValueComponent} from '../models';\n\n@Directive({\n selector: '[mngComponent]'\n})\nexport class MngComponentDirective<C> implements OnInit {\n @Input('mngComponent') component!: Type<C>;\n @Input() inputs?: {[key: string]: any};\n @Output('instanceCreated') private componentInstanceEventEmitter = new EventEmitter<C>();\n\n public componentRef!: ComponentRef<C>;\n\n constructor(public viewContainerRef: ViewContainerRef) {}\n\n ngOnInit() {\n this.viewContainerRef.clear();\n this.componentRef = this.viewContainerRef.createComponent<any>(this.component);\n\n if (this.inputs) {\n if (this.isCmpInstanceOfColumnValue(this.componentRef.instance)) {\n this.componentRef.instance.setColumnValue(this.inputs['value'], this.inputs['item'], this.inputs['descriptor']);\n } else {\n const instanceAny = this.componentRef as any;\n for (const input in this.inputs) {\n instanceAny[input as keyof object] = this.inputs[input];\n }\n }\n }\n\n this.componentInstanceEventEmitter.next(this.componentRef.instance);\n }\n\n private isCmpInstanceOfColumnValue(cmp: any): cmp is IColumnValueComponent<any> {\n return typeof cmp.setColumnValue === 'function';\n }\n}\n","import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core';\n\n@Directive({\n selector: '[mngTemplate]'\n})\nexport class MngTemplateDirective {\n @Input() type!: string;\n @Input('mngTemplate') name!: string;\n\n constructor(public template: TemplateRef<any>, private viewContainerRef: ViewContainerRef) {}\n\n public getType(): string {\n return this.name;\n }\n\n public getViewContainerRef(): ViewContainerRef {\n return this.viewContainerRef;\n }\n}\n","import {ChangeDetectionStrategy, Component, ContentChildren, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, QueryList, ViewChild} from '@angular/core';\nimport {AbstractControl, FormArray, FormGroup} from '@angular/forms';\n\nimport {FormlyFieldConfig, FormlyFormOptions} from '@ngx-formly/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {Message} from 'primeng/api';\nimport {Observable, Subscription, of} from 'rxjs';\n\nimport {EditorDescriptor} from '../../../descriptors';\nimport {MngTemplateDirective} from '../../../directives';\nimport {EditorFormlyUtil, NotificationUtil} from '../../../utils';\nimport {MngFormEditorSubmitEvent} from '../models';\n\n@Component({\n selector: 'mng-form-editor',\n templateUrl: './form-editor.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormEditorComponent<T> implements OnInit, OnDestroy {\n // metadata and editor mode input\n @Input() public descriptor!: EditorDescriptor<T>;\n @Input() public submitLoading: Observable<boolean> | boolean = false;\n\n // data source inputs;\n @Input() public item?: T;\n\n // extra features input\n @Input() public isSubmitButtonVisible = false;\n @Input() public isFormDisabled = null;\n\n // event outputs\n @Output('formSubmit') public formSubmitEventEmitter = new EventEmitter<MngFormEditorSubmitEvent<T>>();\n\n // content and view queries\n @ContentChildren(MngTemplateDirective) public templates!: QueryList<MngTemplateDirective>;\n @ViewChild('submitButton') public submitButtonElementRef?: ElementRef;\n\n public form: FormGroup = new FormGroup({});\n public formOptions: FormlyFormOptions = {\n formState: {\n add: false,\n edit: false,\n disabled: false\n }\n };\n public formFields!: FormlyFieldConfig[];\n public formOrigItem?: T;\n public formModel: any = {};\n public formMessages: Message[] = [];\n public submitLoading$!: Observable<boolean>;\n\n private subscriptions: Subscription[] = [];\n\n constructor(private translateService: TranslateService) {}\n\n public ngOnInit() {\n this.resetFormModel(this.item);\n this.submitLoading$ = this.submitLoading instanceof Observable ? this.submitLoading : of(this.submitLoading);\n\n // init fields for formly\n this.formFields = EditorFormlyUtil.createFormlyConfigFromDescriptor(this.descriptor);\n this.updateFormState();\n }\n\n public ngOnDestroy() {\n this.subscriptions.forEach(s => s.unsubscribe());\n }\n\n public submit() {\n this.submitButtonElementRef?.nativeElement.click();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public onSubmit(event: Event) {\n this.formOptions.formState.submittedOn = Date.now();\n this.formMessages = [];\n\n const formSubmitItem = this.getFormValue();\n if (this.form.valid) {\n this.formSubmitEventEmitter.next(new MngFormEditorSubmitEvent(formSubmitItem));\n } else {\n // find and mark invalid tabs\n if (this.formFields[0].type === 'tabs' && this.formFields[0].fieldGroup) {\n for (const tab of this.formFields[0].fieldGroup) {\n const isInvalid = this.isAnyFieldInvalid(tab.fieldGroup);\n this.formOptions.formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label) + '_invalid'] = isInvalid;\n }\n }\n const event = new MngFormEditorSubmitEvent(formSubmitItem);\n event.success = false;\n this.formMessages.push(NotificationUtil.getFormEditorWarningMessage(this.translateService, 'mngEditor.invalidFormToastTitle', 'mngEditor.invalidFormToastMessage'));\n this.formSubmitEventEmitter.next(event);\n }\n }\n\n public getFormValue(): T {\n const formValue = this.form.getRawValue() as T;\n this.descriptor.fields.forEach(field => {\n if (field && field.setter) {\n field.setter(formValue, this.form.value[field.property]);\n }\n });\n return formValue;\n }\n\n public getFormField(key: string) {\n return this.findFormField(this.form, key.split('.'));\n }\n\n public setFormFieldValue(key: string, value: any) {\n const control = this.getFormField(key);\n if (control) {\n control.setValue(value);\n } else {\n console.warn(`Value was not set, because field ${key} was not found.`);\n }\n }\n\n public patchFormFieldValue(key: string, value: any) {\n const control = this.getFormField(key);\n if (control) {\n control.patchValue(value);\n } else {\n console.warn(`Value was not set, because field ${key} was not found.`);\n }\n }\n\n public resetFormFieldValue(key: string, value?: any) {\n const control = this.getFormField(key);\n if (control) {\n control.reset(value);\n } else {\n console.warn(`Value was not set, because field ${key} was not found.`);\n }\n }\n\n private findFormField(control: AbstractControl, keyPath: string[]): AbstractControl | null {\n if (keyPath.length === 0) {\n return control;\n }\n if (keyPath.length === 1) {\n return control.get(keyPath[0]);\n }\n let nextControl: AbstractControl | null = null;\n if (control instanceof FormGroup) {\n nextControl = control.get(keyPath[0]);\n } else if (control instanceof FormArray) {\n const idx = +keyPath[0];\n if (!isNaN(idx)) {\n nextControl = control.at(idx);\n }\n }\n\n if (!control) {\n return null;\n }\n return this.findFormField(nextControl!, keyPath.slice(1));\n }\n\n private isAnyFieldInvalid(fields: FormlyFieldConfig[] = []): boolean {\n for (const field of fields) {\n let fieldInvalid = false;\n if (Array.isArray(field.fieldGroup)) {\n fieldInvalid = this.isAnyFieldInvalid(field.fieldGroup);\n } else if (typeof field.type !== 'undefined') {\n fieldInvalid = !field.formControl?.valid;\n }\n if (fieldInvalid) {\n return true;\n }\n }\n return false;\n }\n\n private resetFormModel(item?: T) {\n this.formOrigItem = item;\n // TODO: to check if this is ok, could be problems with dates, if so, try lodash\n const formModel = JSON.parse(JSON.stringify(item ?? {}));\n\n this.descriptor.fields.forEach(field => {\n if (field.getter && item) {\n formModel[field.property] = field.getter(item);\n }\n });\n if (typeof this.formOptions.resetModel === 'function') {\n // could not be initiated yet\n this.formOptions.resetModel(this.formModel);\n }\n this.formModel = formModel;\n }\n\n private updateFormState() {\n this.formOptions.formState.disabled = this.isFormDisabled !== null ? this.isFormDisabled === true : this.descriptor.disabled;\n }\n}\n","<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" [class.hidden]=\"!isSubmitButtonVisible\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n","import {ChangeDetectionStrategy, Component, EventEmitter, ExistingProvider, Injector, Input, OnDestroy, OnInit, Output, ViewChild, forwardRef} from '@angular/core';\nimport {ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR} from '@angular/forms';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {AutoComplete} from 'primeng/autocomplete';\nimport {BehaviorSubject, Observable, Subscription, of, switchMap} from 'rxjs';\nimport {first, map} from 'rxjs/operators';\n\nimport {MediusFilterMatchType, MediusQueryParam, MediusQueryParamBuilder} from '../../../api/models';\nimport {ILookupDataProvider} from '../../../data-providers';\n\nexport const MNG_AUTOCOMPLETE_VALUE_ACCESSOR: ExistingProvider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MngAutocompleteComponent),\n multi: true\n};\n\n@Component({\n selector: 'mng-autocomplete',\n templateUrl: './autocomplete.component.html',\n providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngAutocompleteComponent implements OnInit, OnDestroy, ControlValueAccessor {\n @Input() public dataProvider?: ILookupDataProvider<any, any>;\n @Input() public dataKeyProperty?: string;\n @Input('itemsValueProperty') public itemsValuePropertyInit?: string;\n @Input('itemsLabelProperty') public itemsLabelPropertyInit?: string;\n @Input() public itemsLabelTranslate = false;\n @Input() public inlineSearch = false;\n @Input() public openOnFocus = false;\n @Input() public multiselect = false;\n @Input() public placeholder?: string;\n @Input() public className: string | null = null;\n @Input() public dropdownClassName: string | null = null;\n\n @Output('valueChange') public valueChangeEventEmitter = new EventEmitter();\n\n @ViewChild(AutoComplete) public primeAutocomplete?: AutoComplete;\n\n private isInited = false;\n private suggestionsSubject: BehaviorSubject<Array<any>> = new BehaviorSubject<Array<any>>([]);\n private searchSubscription: Subscription | null = null;\n private dataProviderService: any = null;\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChangeFn: any = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouchedFn: any = () => {};\n\n public itemsLabelProperty?: string;\n public itemsValueProperty?: string;\n public autocompleteFormControl: FormControl = new FormControl();\n public suggestions$: Observable<Array<any>> = this.suggestionsSubject.asObservable();\n\n constructor(private injector: Injector, private translate: TranslateService) {}\n\n ngOnInit() {\n this.setItemsAndDataProvider();\n }\n\n ngOnDestroy() {\n this.searchSubscription?.unsubscribe();\n }\n\n onSearch(event: any) {\n this.searchSubscription?.unsubscribe();\n\n if (this.dataProvider) {\n const queryParamBuilder = MediusQueryParamBuilder.create();\n if (this.itemsLabelProperty) {\n queryParamBuilder.withSort(this.itemsLabelProperty);\n }\n if (event.query && event.query.length > 0 && this.itemsLabelProperty) {\n queryParamBuilder.withFilter(this.itemsLabelProperty, event.query, undefined, MediusFilterMatchType.StartsWith);\n }\n this.searchSubscription = this.getLookup(queryParamBuilder.build(), event.query).subscribe({\n next: items => {\n this.setSuggestionsFromItems(items, event.query);\n }\n });\n }\n }\n\n onSelect(value: any) {\n let outputValue = value;\n if (this.itemsValueProperty && typeof value === 'object') {\n outputValue = value[this.itemsValueProperty];\n }\n this.onChangeFn(outputValue);\n this.valueChangeEventEmitter.next(outputValue);\n }\n\n onFocus(event: Event) {\n if (this.openOnFocus) {\n this.primeAutocomplete?.show();\n }\n }\n\n registerOnChange(fn: any): void {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouchedFn = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n if (isDisabled) {\n this.autocompleteFormControl.disable();\n } else {\n this.autocompleteFormControl.enable();\n }\n }\n\n writeValue(value: any): void {\n this.setItemsAndDataProvider();\n\n if (this.itemsValuePropertyInit && value != null && typeof value !== 'object') {\n const defaultItem: any = {[this.itemsValuePropertyInit]: value};\n if (this.itemsLabelProperty) {\n defaultItem[this.itemsLabelProperty] = value;\n }\n\n const matchedItem = this.suggestionsSubject.value.find(i => i[this.itemsValuePropertyInit!] === value);\n if (matchedItem) {\n this.autocompleteFormControl.setValue(matchedItem, {emitEvent: false});\n } else if (this.dataProvider) {\n const queryParamBuilder = MediusQueryParamBuilder.create();\n queryParamBuilder.withFilter(this.itemsValuePropertyInit, value, undefined, MediusFilterMatchType.Equals);\n\n this.getLookup(queryParamBuilder.build())\n .pipe(first())\n .subscribe({\n next: items => {\n let isMatch = false;\n if (items.length === 1) {\n this.autocompleteFormControl.setValue(items[0]);\n isMatch = true;\n } else if (items.length > 1) {\n // for lookup data providers not using query params\n const matchedItem = items.find(i => i[this.itemsValuePropertyInit!] === value);\n if (matchedItem) {\n this.setAutocompleteValueFromWrite(matchedItem);\n isMatch = true;\n }\n }\n\n if (!isMatch) {\n this.setAutocompleteValueFromWrite(defaultItem);\n }\n },\n error: () => {\n this.setAutocompleteValueFromWrite(defaultItem);\n }\n });\n } else {\n this.setAutocompleteValueFromWrite(defaultItem);\n }\n } else {\n this.setAutocompleteValueFromWrite(value);\n }\n }\n\n private setItemsAndDataProvider() {\n if (this.isInited) {\n return;\n }\n\n this.itemsLabelProperty = this.itemsLabelPropertyInit;\n this.itemsValueProperty = this.itemsValuePropertyInit;\n\n if (this.dataProvider) {\n this.dataProviderService = this.dataProvider.serviceType ? this.injector.get<any>(this.dataProvider.serviceType) : null;\n\n if (this.itemsLabelTranslate) {\n // setup translation properties\n if (this.itemsLabelPropertyInit) {\n this.itemsLabelProperty = `${this.itemsLabelPropertyInit}_i18n`;\n } else if (!this.itemsLabelProperty && !this.itemsValuePropertyInit) {\n this.itemsLabelProperty = 'title_i18n';\n this.itemsValueProperty = 'value';\n } else {\n throw new Error(`Invalid use with value (${this.itemsLabelPropertyInit}) and label (${this.itemsLabelPropertyInit}) property setup.`);\n }\n }\n } else {\n console.warn(`Data provider should be provided for MngAutocompleteComponent.`);\n }\n\n if (this.openOnFocus) {\n this.onSearch({query: ''});\n }\n\n this.isInited = true;\n }\n\n private setAutocompleteValueFromWrite(value: any) {\n if (value && this.itemsLabelTranslate) {\n value = this.i18nPopulateItems([value], this.translate.instant(this.i18nGetItemsKeys([value])))[0];\n }\n this.autocompleteFormControl.setValue(value, {emitEvent: false});\n }\n\n private getLookup(qp: MediusQueryParam, query?: string): Observable<Array<any>> {\n if (this.dataProvider) {\n return this.dataProvider.lookup(qp, this.dataProviderService, query).pipe(\n switchMap(items => {\n if (this.itemsLabelTranslate) {\n return this.translate.stream(this.i18nGetItemsKeys(items)).pipe(map(translations => this.i18nPopulateItems(items, translations)));\n } else {\n return of(items);\n }\n })\n );\n } else {\n return of([]);\n }\n }\n\n private i18nGetItemsKeys(items: Array<any>): Array<string> {\n return items.map(item => (typeof item === 'object' && this.itemsLabelPropertyInit ? (item[this.itemsLabelPropertyInit as keyof object] as string) : item) as string);\n }\n\n private i18nPopulateItems(items: Array<any>, i18nMap: any): Array<any> {\n return items.map(item => {\n if (typeof item === 'object' && this.itemsLabelPropertyInit) {\n const label = item[this.itemsLabelPropertyInit as keyof object] as string;\n const translation: string | undefined = i18nMap[label];\n if (translation) {\n return {...item, [this.itemsLabelProperty!]: translation};\n }\n return {...item};\n } else {\n const translation = i18nMap[item];\n return {\n [this.itemsLabelProperty!]: translation ?? item,\n [this.itemsValueProperty!]: item\n };\n }\n });\n }\n\n private setSuggestionsFromItems(items: Array<any>, query?: string) {\n if (this.inlineSearch) {\n const queryLowerCase = query?.toLowerCase() ?? '';\n const filteredItems = items.filter(i => {\n let itemLabel = i;\n if (this.itemsLabelProperty && typeof i === 'object') {\n itemLabel = i[this.itemsLabelProperty];\n }\n if (itemLabel == null) {\n return queryLowerCase == null || !queryLowerCase.length;\n }\n if (typeof itemLabel !== 'string') {\n itemLabel = itemLabel.toString();\n }\n return itemLabel.toLowerCase().startsWith(queryLowerCase);\n });\n this.suggestionsSubject.next([...filteredItems]);\n } else {\n this.suggestionsSubject.next([...items]);\n }\n }\n}\n","<p-autoComplete\n (onFocus)=\"onFocus($event)\"\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dropdown]=\"true\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [field]=\"$any(itemsLabelProperty)\"\n [suggestions]=\"(suggestions$ | async) ?? []\"\n [multiple]=\"multiselect\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [minLength]=\"openOnFocus ? 0 : 1\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n","import {ChangeDetectionStrategy, Component, EventEmitter, ExistingProvider, Injector, Input, OnDestroy, OnInit, Output, ViewChild, forwardRef} from '@angular/core';\nimport {ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR} from '@angular/forms';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {Dropdown} from 'primeng/dropdown';\nimport {Observable, ReplaySubject, Subject, Subscription, of, switchMap} from 'rxjs';\nimport {first, map} from 'rxjs/operators';\n\nimport {MediusQueryParamBuilder} from '../../../api/models';\nimport {ILookupDataProvider} from '../../../data-providers';\n\nexport const MNG_DROPDOWN_VALUE_ACCESSOR: ExistingProvider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MngDropdownComponent),\n multi: true\n};\n\n@Component({\n selector: 'mng-dropdown',\n templateUrl: './dropdown.component.html',\n providers: [MNG_DROPDOWN_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngDropdownComponent implements OnInit, OnDestroy, ControlValueAccessor {\n @Input() public dataProvider?: ILookupDataProvider<any, any>;\n @Input() public dataKeyProperty?: string;\n @Input('itemsLabelProperty') public itemsLabelPropertyInit?: string;\n @Input() public itemsLabelTranslate = false;\n @Input('itemsValueProperty') public itemsValuePropertyInit?: string;\n @Input() public itemsDisabledProperty?: string;\n @Input() public multiselect = false;\n @Input() public placeholder?: string;\n @Input() public showClear = true;\n @Input() public selectFirstItem = false;\n @Input() public className: string | null = null;\n @Input() public dropdownClassName: string | null = null;\n\n @Output('valueChange') public valueChangeEventEmitter = new EventEmitter();\n\n @ViewChild(Dropdown) public primeDropdown?: Dropdown;\n\n public itemsLabelProperty?: string;\n public itemsValueProperty?: string;\n private itemsSubject: Subject<Array<any>> = new ReplaySubject<Array<any>>(1);\n private dataProviderService: any = null;\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChangeFn: any = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouchedFn: any = () => {};\n\n public dropdownFormControl: FormControl = new FormControl();\n public items$: Observable<Array<any>> = this.itemsSubject.asObservable();\n private itemsSubscription?: Subscription;\n\n constructor(private injector: Injector, private translate: TranslateService) {}\n\n ngOnInit(): void {\n this.dropdownFormControl.valueChanges.subscribe(v => {\n this.onChangeFn(v);\n this.valueChangeEventEmitter.next(v);\n });\n\n this.itemsLabelProperty = this.itemsLabelPropertyInit;\n this.itemsValueProperty = this.itemsValuePropertyInit;\n\n if (this.dataProvider) {\n this.dataProviderService = this.dataProvider.serviceType ? this.injector.get<any>(this.dataProvider.serviceType) : null;\n\n const queryParamBuilder = MediusQueryParamBuilder.create();\n\n if (this.itemsLabelTranslate) {\n // setup translation properties\n if (this.itemsLabelPropertyInit) {\n this.itemsLabelProperty = `${this.itemsLabelPropertyInit}_i18n`;\n } else if (!this.itemsLabelProperty && !this.itemsValuePropertyInit) {\n this.itemsLabelProperty = 'title_i18n';\n this.itemsValueProperty = 'value';\n } else {\n throw new Error(`Invalid use with value (${this.itemsLabelPropertyInit}) and label (${this.itemsLabelPropertyInit}) property setup.`);\n }\n }\n\n this.itemsSubscription = this.dataProvider\n .lookup(queryParamBuilder.build(), this.dataProviderService)\n .pipe(\n switchMap(items => {\n if (this.itemsLabelTranslate) {\n const translationKeys: string[] = items.map(\n item => (typeof item === 'object' && this.itemsLabelPropertyInit ? (item[this.itemsLabelPropertyInit as keyof object] as string) : item) as string\n );\n return this.translate.stream(translationKeys).pipe(\n map(translations =>\n items.map(item => {\n if (typeof item === 'object' && this.itemsLabelPropertyInit) {\n const label = item[this.itemsLabelPropertyInit as keyof object] as string;\n const translation: string | undefined = translations[label];\n if (translation) {\n return {...item, [this.itemsLabelProperty!]: translation};\n }\n return {...item};\n } else {\n const translation = translations[item];\n return {\n [this.itemsLabelProperty!]: translation ?? item,\n [this.itemsValueProperty!]: item\n };\n }\n })\n )\n );\n } else {\n return of(items);\n }\n })\n )\n .subscribe(res => {\n this.itemsSubject.next(res);\n });\n\n if (this.selectFirstItem && !this.dropdownFormControl?.value) {\n this.items$.pipe(first()).subscribe(res => {\n const value = this.itemsValueProperty ? res[0][this.itemsValueProperty] : res[0];\n this.dropdownFormControl?.setValue(value);\n });\n }\n } else {\n console.warn(`Data provider should be provided for MngDropdownComponent.`);\n }\n }\n\n ngOnDestroy() {\n this.itemsSubscription?.unsubscribe();\n }\n\n registerOnChange(fn: any): void {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouchedFn = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n if (isDisabled) {\n this.dropdownFormControl.disable();\n } else {\n this.dropdownFormControl.enable();\n }\n }\n\n writeValue(obj: any): void {\n this.dropdownFormControl.setValue(obj, {emitEvent: false});\n }\n}\n","<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n display=\"chip\"\n [formControl]=\"dropdownFormControl\"\n [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [filter]=\"false\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n ViewChild\n} from '@angular/core';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {DynamicDialogConfig, DynamicDialogRef} from 'primeng/dynamicdialog';\nimport {Observable, ReplaySubject, Subscription, of, throwError} from 'rxjs';\nimport {catchError, finalize, first} from 'rxjs/operators';\n\nimport {IDataProvider, IEditorDataProvider} from '../../../data-providers';\nimport {ActionDescriptor, ActionEditorDescriptor, ActionEditorSubmitDescriptor, ActionPositionEnum} from '../../../descriptors';\nimport {MngTemplateDirective} from '../../../directives';\nimport {IViewContainer} from '../../../models';\nimport {MngActionExecutorService, MngCommonsService, MngNavigationService, MngViewContainerComponentService} from '../../../services';\nimport {IdType} from '../../../types';\nimport {I18nUtils, NotificationUtil} from '../../../utils';\nimport {MngFormEditorComponent} from '../../form';\nimport {MngFormEditorSubmitEvent} from '../../form/models';\nimport {ActionData, ActionError, ActionRunResult} from '../models';\n\n@Component({\n selector: 'mng-action-editor',\n templateUrl: './action-editor.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngActionEditorComponent<T, S> implements OnInit, OnDestroy {\n // metadata and editor mode input\n @Input() public action!: ActionEditorDescriptor<T>;\n\n // data source inputs\n @Input() public itemId?: IdType;\n @Input() public item?: T;\n @Input() public actionData?: ActionData;\n @Input() public dataProvider?: IEditorDataProvider<T, S>;\n @Input('viewContainer') public viewContainerInit?: IViewContainer<T, S>;\n\n @Output('actionSubmit') public actionRunEventEmitter = new EventEmitter<ActionRunResult<T, S, IDataProvider<T, S>>>();\n\n // content and view queries\n @ContentChildren(MngTemplateDirective) public templates!: QueryList<MngTemplateDirective>;\n @ViewChild('submitButton') public submitButtonElementRef!: ElementRef;\n @ViewChild(MngFormEditorComponent) public editorComponent!: MngFormEditorComponent<T>;\n\n public cmpId: string = Math.random().toString(36).substring(2);\n public title?: string;\n public isDialog = true;\n public isSaveButton = true;\n\n // actions\n public toolbarLeftActions: ActionDescriptor<T>[] = [];\n public toolbarRightActions: ActionDescriptor<T>[] = [];\n public footerLeftActions: ActionDescriptor<T>[] = [];\n public footerRightActions: ActionDescriptor<T>[] = [];\n\n private loadingSubject = new ReplaySubject<boolean>(1);\n public loading$: Observable<boolean> = this.loadingSubject.asObservable();\n private submitLoadingSubject = new ReplaySubject<boolean>(1);\n public submitLoading$: Observable<boolean> = this.submitLoadingSubject.asObservable();\n public viewContainer?: IViewContainer<T, S>;\n private sourceComponent: any = this;\n private subscriptions: Array<Subscription> = [];\n\n constructor(\n private injector: Injector,\n private translate: TranslateService,\n private actionExecutor: MngActionExecutorService,\n private mngCommonsService: MngCommonsService,\n private navigationService: MngNavigationService,\n @Optional() private dialogRef: DynamicDialogRef | null,\n @Optional() private dialogConfig: DynamicDialogConfig | null,\n @Optional() private viewContainerService: MngViewContainerComponentService<T, S> | null\n ) {}\n\n public ngOnInit() {\n if (this.dialogConfig?.data) {\n if (this.dialogConfig.data.action) {\n this.action = this.dialogConfig.data.action;\n }\n if (this.dialogConfig.data.item) {\n this.item = this.dialogConfig.data.item;\n }\n if (this.dialogConfig.data.itemId) {\n this.itemId = this.dialogConfig.data.itemId;\n }\n if (this.dialogConfig.data.actionData) {\n this.actionData = this.dialogConfig.data.actionData;\n }\n if (this.dialogConfig.data.viewContainer) {\n this.viewContainer = this.dialogConfig.data.viewContainer;\n if (!this.dataProvider && this.viewContainer) {\n const dataProvider = this.viewContainer.getDataProvider();\n if (dataProvider && typeof dataProvider['fetch' as keyof object] === 'function') {\n this.dataProvider = dataProvider as IEditorDataProvider<T, S>;\n }\n }\n }\n if (this.dialogConfig.data.sourceComponent) {\n this.sourceComponent = this.dialogConfig.data.sourceComponent;\n }\n } else {\n this.isDialog = false;\n this.viewContainer = this.viewContainerInit ?? this.viewContainerService ?? undefined;\n }\n\n this.isSaveButton = typeof this.action.submitFunction === 'function';\n this.setTitle();\n\n for (const action of this.action.editorActions) {\n if (action instanceof ActionEditorSubmitDescriptor) {\n if (typeof action.icon === 'undefined') {\n action.withIcon(action.submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit ? 'pi pi-check' : 'pi pi-times');\n }\n if (typeof action.title === 'undefined') {\n action.withTitle(action.submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit ? 'general.save' : this.isDialog ? 'general.close' : 'general.cancel');\n }\n\n // assign run operations\n action.withRunNotificationSuccess(undefined, undefined, false);\n if (action.submitType === ActionEditorSubmitDescriptor.TypeEnum.Submit) {\n action.withRunFunction(() => {\n this.triggerSubmit();\n return of(undefined);\n });\n } else {\n action.withRunFunction(() => {\n this.cancel();\n return of(undefined);\n });\n }\n }\n switch (action.position) {\n case ActionPositionEnum.ToolbarLeft:\n this.toolbarLeftActions.push(action);\n break;\n case ActionPositionEnum.ToolbarRight:\n this.toolbarRightActions.push(action);\n break;\n case ActionPositionEnum.FooterLeft:\n this.footerLeftActions.push(action);\n break;\n case ActionPositionEnum.FooterRight:\n this.footerRightActions.push(action);\n break;\n }\n }\n\n this.toolbarRightActions = this.toolbarRightActions.reverse();\n this.footerRightActions = this.footerRightActions.reverse();\n\n this.loadItemWithDataProvider();\n }\n\n public ngOnDestroy() {\n this.subscriptions.forEach(s => s.unsubscribe());\n }\n\n public onSubmit(event: MngFormEditorSubmitEvent<T>) {\n if (event.success) {\n if (typeof this.action.submitFunction !== 'function') {\n return;\n }\n this.submitLoadingSubject.next(true);\n this.actionExecutor\n .runEditorSave(this.action, this.itemId, event.formItem, this.dataProvider, this.sourceComponent, this.viewContainer, this.actionData)\n .pipe(first())\n .subscribe({\n next: res => {\n this.submitLoadingSubject.next(false);\n this.cancel(res);\n },\n error: () => {\n this.submitLoadingSubject.next(false);\n }\n });\n }\n }\n\n public cancel(result?: ActionRunResult<T, S, IDataProvider<T, S>>) {\n if (!result) {\n result = new ActionRunResult<T, S, IDataProvider<T, S>>(undefined, undefined, new ActionError(null, true));\n }\n if (this.isDialog) {\n this.dialogRef?.close(result);\n }\n this.actionRunEventEmitter.next(result);\n }\n\n public triggerSubmit() {\n this.editorComponent.submit();\n }\n\n private loadItemWithDataProvider() {\n if (typeof this.action.fetchFunction !== 'function') {\n return;\n }\n this.loadingSubject.next(true);\n this.actionExecutor\n .runEditorFetch(this.action, this.item, this.itemId, this.dataProvider, this.sourceComponent, this.viewContainer)\n .pipe(\n first(),\n catchError(err => {\n const actionError = this.actionExecutor.toMngActionError(err);\n if (this.action.hasRunNotificationError) {\n NotificationUtil.actionNotificationError(this.translate, this.action, actionError, 'fetch', this.viewContainer, this.item);\n }\n return throwError(() => actionError);\n }),\n finalize(() => this.loadingSubject.next(false))\n )\n .subscribe(res => {\n this.item = res?.result ?? undefined;\n if (this.action.hasFetchNotificationSuccess) {\n NotificationUtil.actionNotificationSuccess(\n this.translate,\n this.action,\n 'fetch',\n this.action.fetchNotificationSuccessTitle,\n this.action.fetchNotificationSuccessMessage,\n this.viewContainer,\n this.item\n );\n }\n this.setTitle();\n });\n }\n\n private setTitle() {\n if (this.action.editorTitle === null) {\n this.title = undefined;\n if (this.dialogConfig) {\n requestAnimationFrame(() => {\n this.dialogConfig!.header = undefined;\n });\n }\n return;\n }\n const subscription = I18nUtils.Action.getEditorTitleAsync(this.translate, this.action, this.item).subscribe(t => {\n this.title = t ?? undefined;\n if (this.dialogConfig) {\n requestAnimationFrame(() => {\n this.dialogConfig!.header = t ?? undefined;\n this.mngCommonsService.setPageTitle(t ?? undefined);\n });\n }\n });\n this.subscriptions.push(subscription);\n }\n}\n","<h5 *ngIf=\"!isDialog && title\">{{ title }}</h5>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor *ngIf=\"action.editorDescriptor && (loading$ | async) === false\" [descriptor]=\"action.editorDescriptor\" [item]=\"item\" (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between\">\n <div>\n <mng-action *ngFor=\"let action of footerLeftActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n <div>\n <mng-action *ngFor=\"let action of footerRightActions\" [action]=\"action\" [disabled]=\"submitLoading$\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n </div>\n</div>\n","import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';\nimport {FormControl} from '@angular/forms';\n\nimport {FieldType} from '@ngx-formly/core';\n\nimport {FieldLookupDescriptor} from '../../../../../descriptors';\n\n@Component({\n selector: 'mng-formly-field-autocomplete',\n templateUrl: './formly-field-autocomplete.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldAutocompleteComponent<T> extends FieldType implements OnInit {\n public aFormControl!: FormControl;\n public descriptor!: FieldLookupDescriptor<T, any>;\n\n public ngOnInit() {\n this.aFormControl = this.formControl as FormControl;\n this.descriptor = this.to['descriptor'];\n }\n}\n","<mng-autocomplete\n [id]=\"$any(key)\"\n [formControl]=\"aFormControl\"\n [formlyAttributes]=\"field\"\n [dataProvider]=\"$any(descriptor.dataProvider)\"\n [dataKeyProperty]=\"$any(descriptor.dataKeyProperty)\"\n [itemsLabelProperty]=\"$any(descriptor.itemsLabelProperty)\"\n [className]=\"descriptor.inputClassName\">\n</mng-autocomplete>\n","import {ChangeDetectionStrategy, Component, OnDestroy, OnInit} from '@angular/core';\nimport {FormControl} from '@angular/forms';\n\nimport {FieldType} from '@ngx-formly/core';\nimport {Subscription, distinctUntilChanged} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\n\nimport {FieldInputDescriptor} from '../../../../../descriptors';\nimport {MngFormFieldEventComponentSubtype, MngFormFieldEventTypeEnum} from '../../../models';\n\n@Component({\n selector: 'mng-formly-field-input',\n templateUrl: './formly-field-input.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldInputComponent extends FieldType implements OnInit, OnDestroy {\n public iFormControl!: FormControl;\n public descriptor!: FieldInputDescriptor<any>;\n\n private subscriptions: Subscription[] = [];\n\n ngOnInit(): void {\n this.iFormControl = this.formControl as FormControl;\n this.descriptor = this.to['descriptor'];\n\n // emit lifecycle event\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldInputComponent, this, {\n eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT\n });\n\n // init values\n if (this.to.type === 'datepicker' && typeof this.iFormControl.value === 'string') {\n const dateObject = new Date(this.iFormControl.value);\n this.iFormControl.setValue(dateObject);\n }\n\n const subscription = this.formControl!.valueChanges.pipe(startWith(this.formControl!.value), distinctUntilChanged()).subscribe(v => {\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldInputComponent, this, {\n value: v\n });\n });\n this.subscriptions.push(subscription);\n }\n\n ngOnDestroy(): void {\n this.subscriptions.forEach(s => s.unsubscribe());\n\n // emit lifecycle event\n this.descriptor?.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldInputComponent, this, {\n eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY\n });\n }\n}\n","<ng-container [ngSwitch]=\"to.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"$any(descriptor.numberMin)\"\n [max]=\"$any(descriptor.numberMax)\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"$any(descriptor.numberUseGrouping)\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"$any(descriptor.datePickerFormat)\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"$any(descriptor.mask)\"\n [placeholder]=\"$any(descriptor.placeholder)\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"to.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n","import {ChangeDetectionStrategy, Component, HostBinding} from '@angular/core';\n\n@Component({\n selector: 'mng-formly-field-label',\n templateUrl: './formly-field-label.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldLabelComponent {\n @HostBinding('class') public className = 'hidden';\n}\n","","import {ChangeDetectionStrategy, Component, OnDestroy, OnInit} from '@angular/core';\nimport {FormControl} from '@angular/forms';\n\nimport {FieldType} from '@ngx-formly/core';\nimport {Subscription, distinctUntilChanged} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\n\nimport {FieldLookupDescriptor} from '../../../../../descriptors';\nimport {MngFormFieldEventComponentSubtype, MngFormFieldEventTypeEnum} from '../../../models';\n\n@Component({\n selector: 'mng-formly-field-dropdown',\n templateUrl: './formly-field-dropdown.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldDropdownComponent<T> extends FieldType implements OnInit, OnDestroy {\n public dFormControl!: FormControl;\n public descriptor!: FieldLookupDescriptor<T, any>;\n\n private subscriptions: Subscription[] = [];\n\n public ngOnInit() {\n this.dFormControl = this.formControl as FormControl;\n this.descriptor = this.to['descriptor'];\n\n // emit lifecycle event\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldDropdownComponent, this, {\n eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT\n });\n\n const subscription = this.formControl!.valueChanges.pipe(startWith(this.formControl!.value), distinctUntilChanged()).subscribe(v => {\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldDropdownComponent, this, {\n value: v\n });\n });\n this.subscriptions.push(subscription);\n }\n\n ngOnDestroy(): void {\n this.subscriptions.forEach(s => s.unsubscribe());\n\n // emit lifecycle event\n this.descriptor?.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldDropdownComponent, this, {\n eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY\n });\n }\n}\n","<mng-dropdown\n [id]=\"$any(key)\"\n [formControl]=\"dFormControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"descriptor.placeholder\"\n [dataProvider]=\"descriptor.dataProvider\"\n [itemsLabelProperty]=\"descriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"descriptor.itemsLabelTranslate\"\n [itemsValueProperty]=\"descriptor.itemsValueProperty\"\n [itemsDisabledProperty]=\"descriptor.itemsDisabledProperty\"\n [dataKeyProperty]=\"descriptor.dataKeyProperty\"\n [showClear]=\"!to.required\"\n [className]=\"descriptor.inputClassName\">\n</mng-dropdown>\n","import {ActionDescriptor, TableDescriptor} from '../descriptors';\n\nexport class StylesUtil {\n public static readonly BUTTON_ROUNDED_WIDTH_XS = 26;\n public static readonly BUTTON_ROUNDED_WIDTH_SM = 28;\n public static readonly BUTTON_ROUNDED_WIDTH = 32;\n public static readonly BUTTON_ROUNDED_WIDTH_LG = 45;\n\n public static readonly ACTION_BUTTON_MARGIN_X = 2;\n\n public static readonly TABLE_CELL_PADDING_X = 8; // left and right paddings are same\n public static readonly TABLE_CELL_PADDING_X_SM = 4;\n public static readonly TABLE_CELL_PADDING_X_LG = 12;\n\n public static calculateTableColumnActionWidth(table: TableDescriptor<unknown>, actions: Array<ActionDescriptor<unknown>>): number {\n const buttonsWidth = actions.reduce((acc, action) => acc + StylesUtil.getActionButtonRoundedWidth(action) + 2 * StylesUtil.ACTION_BUTTON_MARGIN_X, 0);\n const tablePadding = StylesUtil.getTableCellPaddingX(table);\n return buttonsWidth + 2 * tablePadding;\n }\n\n public static getTableCellPaddingX(table: TableDescriptor<unknown>): number {\n switch (table.size) {\n case TableDescriptor.SizeEnum.Small:\n return StylesUtil.TABLE_CELL_PADDING_X_SM;\n case TableDescriptor.SizeEnum.Large:\n return StylesUtil.TABLE_CELL_PADDING_X_LG;\n default:\n return StylesUtil.TABLE_CELL_PADDING_X;\n }\n }\n\n public static getActionButtonRoundedWidth(action: ActionDescriptor<unknown>): number {\n switch (action.size) {\n case ActionDescriptor.SizeEnum.ExtraSmall:\n return StylesUtil.BUTTON_ROUNDED_WIDTH_XS;\n case ActionDescriptor.SizeEnum.Small:\n return StylesUtil.BUTTON_ROUNDED_WIDTH_SM;\n case ActionDescriptor.SizeEnum.Large:\n case ActionDescriptor.SizeEnum.ExtraLarge:\n return StylesUtil.BUTTON_ROUNDED_WIDTH_LG;\n case ActionDescriptor.SizeEnum.Normal:\n default:\n return StylesUtil.BUTTON_ROUNDED_WIDTH;\n }\n }\n}\n","import {LazyLoadEvent} from 'primeng/api';\n\nimport {MediusQueryParam} from '../../../api/models';\nimport {ColumnDescriptor} from '../../../descriptors';\n\nexport class MngTableLoadEvent {\n public queryParam?: MediusQueryParam;\n public originalEvent?: LazyLoadEvent;\n}\n\nexport class MngTableCellClickEvent<T> {\n constructor(public readonly column: ColumnDescriptor<any, T>, public readonly rowItem: T, public readonly rowIndex: number) {}\n}\n\nexport class MngTableReloadEvent {\n public resetParams = false;\n public emitEvent = false;\n}\n","import {Component, Input, OnInit} from '@angular/core';\n\nimport {FilterMatchMode, PrimeNGConfig, SelectItem} from 'primeng/api';\n\nimport {FilterDescriptor, FilterLookupDescriptor, TableDescriptor} from '../../../../descriptors';\n\n/**\n * Cannot be on push change detection strategy because of filter updates triggered from route which causes to force update values in force metadata\n * and these must be propagated through to this component and beyond to primeNG.\n */\n@Component({\n selector: 'mng-table-column-filter',\n templateUrl: './column-filter.component.html'\n})\nexport class MngTableColumnFilterComponent<T> implements OnInit {\n public readonly lookupTypeDropdown: FilterLookupDescriptor.LookupTypeEnum = FilterLookupDescriptor.LookupTypeEnum.Dropdown;\n public readonly lookupTypeAutocomplete: FilterLookupDescriptor.LookupTypeEnum = FilterLookupDescriptor.LookupTypeEnum.Autocomplete;\n\n @Input() descriptor!: FilterDescriptor<T>;\n @Input() display!: TableDescriptor.FilterDisplayEnum;\n\n public lookupDescriptor?: FilterLookupDescriptor<T>;\n\n public primeField!: string;\n public primeType = 'text';\n public primeShowMatchMode = true;\n public primeDefaultMatchMode: string = FilterMatchMode.EQUALS;\n public primeDisplay = 'row';\n public primeMatchModes: SelectItem[] | null = null;\n\n constructor(private primeConfig: PrimeNGConfig) {}\n\n ngOnInit() {\n switch (this.descriptor.filterType) {\n case FilterDescriptor.TypeEnum.Boolean:\n this.primeType = 'boolean';\n this.primeShowMatchMode = false;\n break;\n case FilterDescriptor.TypeEnum.Number:\n this.primeType = 'numeric';\n break;\n case FilterDescriptor.TypeEnum.Date:\n this.primeType = 'date';\n break;\n case FilterDescriptor.TypeEnum.Lookup:\n this.primeType = 'lookup';\n this.primeShowMatchMode = false;\n this.lookupDescriptor = this.descriptor as FilterLookupDescriptor<T>;\n this.primeField = `${this.descriptor.property}${this.lookupDescriptor.itemsValueProperty ? `.${this.lookupDescriptor.itemsValueProperty}` : ''}`;\n this.primeMatchModes = [{value: FilterDescriptor.MatchModeEnum.Equals, label: this.primeConfig.getTranslation(FilterDescriptor.MatchModeEnum.Equals)}];\n break;\n case FilterDescriptor.TypeEnum.String:\n this.primeType = 'text';\n this.primeDefaultMatchMode = FilterMatchMode.CONTAINS;\n break;\n }\n\n if (this.descriptor.matchModes) {\n this.primeMatchModes = this.descriptor.matchModes.map(mm => <SelectItem>{value: mm, label: this.primeConfig.getTranslation(mm)});\n this.primeDefaultMatchMode = this.descriptor.matchModes[0];\n this.primeShowMatchMode = this.primeMatchModes?.length > 1;\n }\n\n switch (this.display) {\n case TableDescriptor.FilterDisplayEnum.Menu:\n this.primeDisplay = 'menu';\n break;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n autocompleteFilter(value: T, filterCallback: Function) {\n filterCallback(value);\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n dropdownFilter(value: T, filterCallback: Function) {\n filterCallback(value);\n }\n\n toLookupFilterValue(value?: any) {\n console.log(this.descriptor.property, value);\n return this.lookupDescriptor!.dataKeyProperty && value ? {[this.lookupDescriptor!.dataKeyProperty]: value} : value;\n }\n}\n","<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n matchMode=\"equals\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"$any(primeMatchModes)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\">\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.dataKeyProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [openOnFocus]=\"lookupDescriptor.autocompleteOpenOnFocus\"\n [inlineSearch]=\"lookupDescriptor.autocompleteInlineSearch\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"true\"\n (valueChange)=\"dropdownFilter($event, filterCallback)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n","import {ChangeDetectionStrategy, Component, Input, OnInit} from '@angular/core';\n\nimport {ColumnDescriptor} from '../../../../descriptors';\n\n@Component({\n selector: 'mng-table-column-value',\n templateUrl: './column-value.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngTableColumnValueComponent<T, TT> implements OnInit {\n public readonly columnTypeString: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.String;\n public readonly columnTypeNumber: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.Number;\n public readonly columnTypeBoolean: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.Boolean;\n public readonly columnTypeDate: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.Date;\n public readonly columnTypeEnum: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.Enum;\n public readonly columnTypeCustom: ColumnDescriptor.TypeEnum = ColumnDescriptor.TypeEnum.Custom;\n\n @Input() descriptor!: ColumnDescriptor<T, TT>;\n @Input() item!: any;\n\n public jsonPath = '$';\n\n public ngOnInit() {\n if (this.descriptor.jsonPath) {\n this.jsonPath = this.descriptor.jsonPath;\n } else {\n this.jsonPath = `$.${this.descriptor.property}`;\n if (this.descriptor.objectModelType) {\n this.jsonPath = `$.${this.descriptor.property}.${this.descriptor.objectTitleProperty}`;\n }\n }\n }\n}\n","<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ item | jsonPath: jsonPath }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ item | jsonPath: jsonPath | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ item | jsonPath: jsonPath | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\"></ng-container>\n <i [class]=\"item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo:true\"></i>\n <ng-template #booleanText>\n {{ item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{ item | jsonPath: jsonPath | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeCustom\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: item | jsonPath: jsonPath,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n EventEmitter,\n Injector,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n SimpleChanges,\n TemplateRef,\n Type,\n ViewChild,\n ViewChildren\n} from '@angular/core';\nimport {ActivatedRoute, Params, Router} from '@angular/router';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {LazyLoadEvent, SortMeta} from 'primeng/api';\nimport {FilterMetadata} from 'primeng/api/filtermetadata';\nimport {Table} from 'primeng/table';\nimport {Observable, ReplaySubject, Subscription, isObservable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult} from '../../../api/models';\nimport {MediusRestUtil} from '../../../api/utils';\nimport {ITableDataProvider} from '../../../data-providers';\nimport {ActionDescriptor, ActionPositionEnum, ColumnDescriptor, FilterDescriptor, TableDescriptor} from '../../../descriptors';\nimport {MngComponentDirective, MngTemplateDirective} from '../../../directives';\nimport {IViewContainer} from '../../../models';\nimport {MngActionExecutorService, MngViewContainerComponentService} from '../../../services';\nimport {NotificationUtil} from '../../../utils';\nimport {StylesUtil} from '../../../utils/styles.util';\nimport {MngTableCellClickEvent, MngTableLoadEvent} from '../models';\n\nimport TypeEnum = FilterDescriptor.TypeEnum;\nimport PaginationModeEnum = TableDescriptor.PaginationModeEnum;\n\n@Component({\n selector: 'mng-table',\n templateUrl: './table.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngTableComponent<T, S> implements OnInit, OnChanges, AfterContentInit, OnDestroy {\n public readonly filterDisplayRow: TableDescriptor.FilterDisplayEnum = TableDescriptor.FilterDisplayEnum.Row;\n public readonly filterDisplayMenu: TableDescriptor.FilterDisplayEnum = TableDescriptor.FilterDisplayEnum.Menu;\n\n // metadata input\n @Input() public descriptor!: TableDescriptor<T>;\n\n // data source inputs\n @Input() public items?: Observable<Array<T>> | Array<T>;\n @Input() public queryResult?: Observable<MediusQueryResult<T>> | MediusQueryResult<T>;\n @Input() public loading?: Observable<boolean> | boolean;\n @Input() public dataProvider?: ITableDataProvider<T, any>;\n @Input() public useQueryParams = false;\n\n // extra features input\n @Input() public selectionMode = 'multiple';\n @Input() public selectionEnabled = false;\n\n // actions\n @Input() public actions: Array<ActionDescriptor<T>> = [];\n\n // visual\n @Input() public isColumnClickable?: boolean;\n\n // component inputs\n @Input('viewContainer') public viewContainerInit?: IViewContainer<T, S>;\n @Input() public captionComponent?: Type<any>;\n @Input() public columnActionComponent?: Type<any>;\n @Input() public columnActionMinWidth: number | null = null;\n\n // event outputs\n @Output('tableLoad') public loadEventEmitter = new EventEmitter<MngTableLoadEvent>();\n @Output('cellClick') public cellClickEventEmitter = new EventEmitter<MngTableCellClickEvent<T>>();\n @Output('selectionChange') public selectionChangeEventEmitter = new EventEmitter<Array<T>>();\n @Output('captionComponentInstance') public captionCmpInstEventEmitter = new EventEmitter<any>();\n @Output('columnActionComponentInstance') public columnActionCmpInstEventEmitter = new EventEmitter<any>();\n\n // content and view queries\n @ContentChildren(MngTemplateDirective) public templates!: QueryList<MngTemplateDirective>;\n @ViewChildren(MngComponentDirective) public components!: QueryList<MngComponentDirective<any>>;\n @ViewChild(Table) public primeTable!: Table;\n\n // templates\n public captionTemplate?: TemplateRef<any>;\n public columnActionTemplate?: TemplateRef<any>;\n\n // data provider and items\n public useDataProvider = false;\n public useQueryParamsInitialized = false;\n public queryResult$?: Observable<MediusQueryResult<T>>;\n public loading$?: Observable<boolean>;\n public dataProviderInfiniteScrollItems: Array<T> = [];\n private itemsSubject = new ReplaySubject<Array<T>>(1);\n\n // pagination, sort and filters\n public rowsPerPageOptions!: Array<number>;\n public rows!: number;\n public offset = 0;\n public multiSortMeta: SortMeta[] | null = null;\n public filterMetadata: {[s: string]: FilterMetadata | FilterMetadata[]} = {};\n\n // infinite scroll\n public infiniteScroll = false;\n public scrollHeight: 'flex' | null = null;\n\n // visual\n public className!: string;\n public tableFullHeightOffset: number | null = null;\n public rowHeight: number | null = null;\n\n // selection\n public selection: Array<T> = [];\n\n // data provider\n private dataProviderService: any = null;\n private dataProviderQueryResultSubject = new ReplaySubject<MediusQueryResult<T>>(1);\n private dataProviderLoadingSubject = new ReplaySubject<boolean>(1);\n private dataProviderLatestLazyLoadEvent?: LazyLoadEvent;\n private dataProviderLatestLazyLoadEventVersion = 0;\n private dataProviderLatestQueryParam?: MediusQueryParam;\n private dataProviderLatestQueryParamVersion = 0;\n private dataProviderSubscription?: Subscription;\n\n // filter, sort\n private isFilterChanged = false;\n private isSortChanged = false;\n private filterDescriptors: Array<FilterDescriptor<any>> = [];\n\n // actions\n public showInlineActionsColumn = false;\n public rowClickActions: ActionDescriptor<T>[] = [];\n public rowInlineActions: ActionDescriptor<T>[] = [];\n\n // other\n private viewContainer?: IViewContainer<T, S>;\n private subscriptions: Subscription[] = [];\n\n constructor(\n private injector: Injector,\n private router: Router,\n private route: ActivatedRoute,\n private translate: TranslateService,\n private actionExecutor: MngActionExecutorService,\n @Optional() private viewContainerService: MngViewContainerComponentService<T, S> | null\n ) {}\n\n public ngOnInit() {\n this.viewContainer = this.viewContainerInit ?? this.viewContainerService ?? undefined;\n this.filterDescriptors = this.descriptor.columns.filter(c => typeof c.filterDescriptor !== 'undefined').map(c => c.filterDescriptor!);\n\n // map row settings\n this.rows = this.descriptor.defaultNumRows;\n this.rowsPerPageOptions = this.descriptor.rowsPerPageOptions;\n\n // process actions\n for (const action of this.actions) {\n switch (action.position) {\n case ActionPositionEnum.RowClick:\n this.rowClickActions.push(action);\n break;\n case ActionPositionEnum.RowInline:\n this.rowInlineActions.push(action);\n break;\n }\n }\n this.showInlineActionsColumn = typeof this.columnActionComponent !== 'undefined' || this.rowInlineActions.length > 0;\n console.log(this.showInlineActionsColumn, this.rowInlineActions);\n\n // define all styles\n this.className = this.descriptor.className;\n this.tableFullHeightOffset = this.descriptor.tableFullHeightOffset ?? null;\n this.rowHeight = this.descriptor.rowHeight ?? null;\n if (typeof this.isColumnClickable === 'undefined') {\n // define if cell click is being observed via output\n this.isColumnClickable = this.rowClickActions.length > 0 || this.cellClickEventEmitter.observed;\n }\n switch (this.descriptor.size) {\n case TableDescriptor.SizeEnum.Small:\n this.className += ' p-datatable-sm';\n break;\n case TableDescriptor.SizeEnum.Large:\n this.className += ' p-datatable-lg';\n break;\n }\n if (this.descriptor.hasGridlines) {\n this.className += ' p-datatable-gridlines';\n }\n if (!this.columnActionMinWidth) {\n this.columnActionMinWidth = StylesUtil.calculateTableColumnActionWidth(this.descriptor, this.rowInlineActions as Array<ActionDescriptor<unknown>>);\n }\n\n // check if infinite scroll\n if (this.descriptor.paginationMode === PaginationModeEnum.InfiniteScroll) {\n this.infiniteScroll = true;\n this.scrollHeight = 'flex';\n this.tableFullHeightOffset = this.descriptor.tableFullHeightOffset ?? 315;\n this.rowHeight = this.descriptor.rowHeight ?? 45;\n this.useQueryParams = false;\n }\n\n // check if data provider is supplied, if is, use it primarily\n if (this.dataProvider) {\n // map subjects to observables and initiate data\n this.useDataProvider = true;\n this.queryResult$ = this.dataProviderQueryResultSubject.asObservable();\n this.loading$ = this.dataProviderLoadingSubject.asObservable();\n const emptyQueryResult = new MediusQueryResult<T>();\n emptyQueryResult.pageData = [];\n emptyQueryResult.allDataCount = 0;\n this.dataProviderLoadingSubject.next(false);\n this.dataProviderQueryResultSubject.next(emptyQueryResult);\n\n // inject service\n if (this.dataProvider.serviceType) {\n this.dataProviderService = this.injector.get<any>(this.dataProvider.serviceType);\n }\n } else {\n // if query result is provided, use it as secondary source or else try to use items\n if (this.queryResult) {\n this.queryResult$ = this.queryResult instanceof Observable ? this.queryResult : of(this.queryResult);\n } else {\n this.queryResult$ = (isObservable(this.items) ? this.items : this.itemsSubject.asObservable()).pipe(\n // distinctUntilChanged((v1, v2) => v1.length === v2.length &&\n // v1.every((v1i, idx) => v1i[this.descriptor.dataKeyProperty] === v2[idx][this.descriptor.dataKeyProperty])),\n map(items => {\n const queryResult = new MediusQueryResult<T>();\n queryResult.pageData = items;\n queryResult.allDataCount = items.length;\n return queryResult;\n })\n );\n if (!isObservable(this.items)) {\n this.itemsSubject.next(this.items ?? []);\n }\n }\n if (typeof this.loading !== 'undefined') {\n this.loading$ = this.loading instanceof Observable ? this.loading : of(this.loading);\n }\n }\n\n if (this.useQueryParams) {\n const subscription = this.route.queryParams.subscribe(qp => {\n this.loadTableFromRouteUpdate(qp);\n });\n this.subscriptions.push(subscription);\n } else {\n // initialize default sort if present\n const defaultSort = this.getDefaultSortMeta();\n if (defaultSort.length > 0) {\n this.multiSortMeta = defaultSort;\n }\n }\n }\n\n public ngAfterContentInit() {\n this.templates.forEach(template => {\n switch (template.getType()) {\n case 'caption':\n this.captionTemplate = template.template;\n break;\n case 'columnAction':\n this.columnActionTemplate = template.template;\n if (!this.showInlineActionsColumn) {\n this.showInlineActionsColumn = true;\n }\n break;\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['items'] && !changes['items'].firstChange && Array.isArray(changes['items'].currentValue)) {\n this.itemsSubject.next(changes['items'].currentValue);\n }\n }\n\n public ngOnDestroy() {\n this.dataProviderSubscription?.unsubscribe();\n this.subscriptions.forEach(s => s.unsubscribe());\n }\n\n public reload(emitEvent = false, resetParams = false) {\n this.loadTableWithDataProvider(\n resetParams ? MediusQueryParamBuilder.create(this.rowsPerPageOptions[0], 0).build() : this.dataProviderLatestQueryParam ?? new MediusQueryParam(),\n emitEvent\n );\n }\n\n public onTableLazyLoad(event: LazyLoadEvent) {\n this.dataProviderLatestLazyLoadEvent = event;\n this.dataProviderLatestLazyLoadEventVersion++;\n\n if (this.useQueryParams) {\n if (!event.multiSortMeta || event.multiSortMeta.length === 0) {\n // add default sort meta to event if not multisort meta is present\n event.multiSortMeta = this.getDefaultSortMeta();\n }\n this.router.navigate([], {\n relativeTo: this.route,\n replaceUrl: true,\n queryParams: MediusRestUtil.fromPrimeLazyLoadEventToAngularQueryParams(event, this.rowsPerPageOptions[0])\n });\n } else {\n const mediusQueryParams = event ? MediusRestUtil.fromPrimeLazyLoadEventToMediusQueryParams(event) : new MediusQueryParam();\n this.loadTableWithDataProvider(mediusQueryParams);\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public onTableSort(event: any) {\n this.isSortChanged = true;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public onTableFilter(event: any) {\n this.isFilterChanged = true;\n }\n\n public onCellClick(event: Event, col: ColumnDescriptor<any, T>, item: T, idx: number) {\n console.log(event);\n const mngEvent = new MngTableCellClickEvent<T>(col, item, idx);\n this.cellClickEventEmitter.next(mngEvent);\n if (this.rowClickActions.length) {\n for (const action of this.rowClickActions) {\n this.actionExecutor.triggerRowClickAction(action, mngEvent, this.route, this.descriptor);\n }\n }\n }\n\n public onSelectionChange(event: Array<T>) {\n this.selectionChangeEventEmitter.emit(event);\n }\n\n public onCaptionCmpInst<C>(instance: C) {\n this.captionCmpInstEventEmitter.next(instance);\n }\n\n public onColumnActionCmpInst<C>(instance: C) {\n this.columnActionCmpInstEventEmitter.next(instance);\n }\n\n private loadTableWithDataProvider(queryParam: MediusQueryParam | null = null, emitEvent = true) {\n if (!this.useDataProvider) {\n return;\n }\n\n this.dataProviderSubscription?.unsubscribe();\n this.dataProviderLoadingSubject.next(true);\n\n if (!queryParam) {\n queryParam = MediusQueryParamBuilder.create(this.rowsPerPageOptions[0]).build();\n }\n this.dataProviderLatestQueryParam = queryParam;\n this.dataProviderLatestQueryParamVersion++;\n\n this.dataProviderSubscription = this.dataProvider?.getAll(queryParam, this.dataProviderService).subscribe(\n res => {\n if (this.infiniteScroll) {\n if (this.isFilterChanged || this.isSortChanged) {\n this.dataProviderInfiniteScrollItems = [];\n }\n this.dataProviderInfiniteScrollItems.splice(queryParam!.itemsOffset ?? 0, queryParam!.itemsPerPage ?? this.rows, ...(res.pageData ?? []));\n this.dataProviderInfiniteScrollItems = [...this.dataProviderInfiniteScrollItems];\n } else {\n this.dataProviderQueryResultSubject.next(res);\n }\n this.isFilterChanged = false;\n this.isSortChanged = false;\n this.dataProviderLoadingSubject.next(false);\n },\n err => {\n NotificationUtil.tableNotificationError(this.translate, this.descriptor, err, this.viewContainer);\n const emptyQueryResult = new MediusQueryResult<T>();\n emptyQueryResult.pageData = [];\n emptyQueryResult.allDataCount = 0;\n this.dataProviderQueryResultSubject.next(emptyQueryResult);\n this.dataProviderLoadingSubject.next(false);\n }\n );\n\n if (emitEvent) {\n const mngEvent = new MngTableLoadEvent();\n mngEvent.originalEvent = this.dataProviderLatestLazyLoadEvent ?? undefined;\n mngEvent.queryParam = queryParam;\n this.loadEventEmitter.next(mngEvent);\n }\n }\n\n private loadTableFromRouteUpdate(params: Params) {\n const mediusQueryParam = MediusRestUtil.fromAngularQueryParamsToMediusQueryParams(params, this.filterDescriptors, this.rowsPerPageOptions[0]);\n if (this.dataProviderLatestLazyLoadEventVersion < this.dataProviderLatestQueryParamVersion + 1) {\n // update only if new version from query params will be higher\n this.updatePrimeSortAndFilter(mediusQueryParam);\n }\n this.useQueryParamsInitialized = true;\n this.loadTableWithDataProvider(mediusQueryParam);\n }\n\n private updatePrimeSortAndFilter(mediusQueryParam: MediusQueryParam) {\n const primeSortMeta: SortMeta[] = [];\n const primeFilterMeta: {[s: string]: FilterMetadata | FilterMetadata[]} = {};\n\n this.filterDescriptors.forEach(f => {\n primeFilterMeta[f.property] = {\n value: null,\n matchMode: f.filterType === TypeEnum.String ? 'contains' : 'equals'\n };\n });\n\n mediusQueryParam?.sortProperty?.forEach((s, idx) => {\n primeSortMeta.push({\n field: s,\n order: mediusQueryParam?.sortAsc?.[idx] ?? true ? 1 : -1\n });\n });\n\n mediusQueryParam?.filterParams?.forEach(f => {\n const descriptor = this.filterDescriptors.find(fd => fd.filterProperty === f.property || fd.property === f.property);\n const operator = MediusRestUtil.matchModeMapping.find(mapping => mapping[2] === f.filterMatchType);\n if (descriptor && operator) {\n primeFilterMeta[descriptor.property] = {\n value: f.filterValue,\n matchMode: operator[0]\n };\n }\n });\n\n this.multiSortMeta = primeSortMeta;\n this.filterMetadata = primeFilterMeta;\n this.rows = mediusQueryParam?.itemsPerPage ?? this.rowsPerPageOptions[0];\n this.offset = mediusQueryParam?.itemsOffset ?? 0;\n }\n\n private getDefaultSortMeta(): SortMeta[] {\n if (this.descriptor.hasDefaultSort) {\n return this.descriptor.defaultSortProperty.map(\n (p, idx) =>\n <SortMeta>{\n field: p,\n order: this.descriptor.defaultSortAsc[idx] ? 1 : -1\n }\n );\n } else {\n return [];\n }\n }\n}\n","<div [style.height]=\"scrollHeight === 'flex' ? 'calc(100vh - ' + tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || useQueryParamsInitialized\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor.dataKeyProperty)\"\n [lazy]=\"useDataProvider\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"useDataProvider && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [scrollable]=\"infiniteScroll\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualRowHeight]=\"$any(rowHeight)\"\n [scrollHeight]=\"$any(scrollHeight)\"\n [selectionMode]=\"$any(selectionEnabled ? selectionMode : null)\"\n [rowHover]=\"descriptor.hasHover\"\n [styleClass]=\"className\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\"\n sortMode=\"multiple\"\n responsiveLayout=\"scroll\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor.hideHeader\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\"></th>\n <ng-container *ngFor=\"let col of descriptor.columns\">\n <th *ngIf=\"col.isSortEnabled\" [pSortableColumn]=\"col.property\" [class]=\"col.headerClassName\" [style.width.%]=\"col.width\" [style.min-width.px]=\"col.minWidth\">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (col.property | i18nProperty: descriptor.model) | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"!col.isSortEnabled\">\n {{ col.title ?? (col.property | i18nProperty: descriptor.model) | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"showInlineActionsColumn\"></th>\n </tr>\n <tr *ngIf=\"descriptor.filterDisplay === filterDisplayRow\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"width: 2.25em\"></th>\n <th *ngFor=\"let col of descriptor.columns\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"showInlineActionsColumn\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr [style.height.px]=\"rowHeight\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td\n *ngFor=\"let col of descriptor.columns\"\n (click)=\"onCellClick($event, col, item, idx)\"\n [class]=\"col.className\"\n [class.clickable]=\"isColumnClickable\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\">\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td *ngIf=\"showInlineActionsColumn\" class=\"column-action text-right\" [style.min-width.px]=\"columnActionMinWidth\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponentOrDefault\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponentOrDefault>\n <span\n *ngIf=\"columnActionComponent; else defaultColumnActions\"\n [mngComponent]=\"columnActionComponent!\"\n (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n <ng-template #defaultColumnActions>\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [itemId]=\"descriptor.model.idPropertyName ? item[descriptor.model.idPropertyName] : null\"\n [actionData]=\"{itemIndex: idx}\">\n </mng-action>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"descriptor.columns.length + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n","import {Component, Input, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {ConfirmationService, MessageService} from 'primeng/api';\nimport {DialogService} from 'primeng/dynamicdialog';\nimport {Subscription} from 'rxjs';\n\nimport {IDataProvider, ITableviewDataProvider} from '../../data-providers';\nimport {ActionDescriptor, ActionPositionEnum, TableviewDescriptor} from '../../descriptors';\nimport {IViewContainer} from '../../models';\nimport {MngActionExecutorService, MngViewContainerComponentService} from '../../services';\nimport {MngTableComponent} from './table/table.component';\n\n@Component({\n selector: 'mng-tableview',\n templateUrl: './tableview.component.html',\n providers: [MessageService, ConfirmationService, MngViewContainerComponentService]\n})\nexport class MngTableviewComponent<T, S> implements OnInit, OnDestroy, IViewContainer<T, S> {\n @Input() public descriptor!: TableviewDescriptor<T>;\n @Input() public dataProvider?: ITableviewDataProvider<T, S>;\n @Input() public actions: Array<ActionDescriptor<T>> = [];\n\n @ViewChild(MngTableComponent) public tableComponent?: MngTableComponent<T, S>;\n\n public rowClickActions: ActionDescriptor<T>[] = [];\n public rowInlineActions: ActionDescriptor<T>[] = [];\n public toolbarLeftActions: ActionDescriptor<T>[] = [];\n public toolbarRightActions: ActionDescriptor<T>[] = [];\n\n private subscriptions: Subscription[] = [];\n\n constructor(\n private route: ActivatedRoute,\n private messageService: MessageService,\n private translateService: TranslateService,\n private dialogService: DialogService,\n private confirmationService: ConfirmationService,\n private actionExecutor: MngActionExecutorService,\n private viewContainerService: MngViewContainerComponentService<T, S>\n ) {}\n\n ngOnInit() {\n this.viewContainerService.actions = this.actions;\n\n if (this.dataProvider) {\n this.viewContainerService.dataProvider = this.dataProvider;\n }\n const reloadTableSubscription = this.viewContainerService.reloadTable.subscribe(() => {\n this.reloadTable();\n });\n this.subscriptions.push(reloadTableSubscription);\n\n for (const action of this.actions) {\n switch (action.position) {\n case ActionPositionEnum.RowClick:\n this.rowClickActions.push(action);\n break;\n case ActionPositionEnum.RowInline:\n this.rowInlineActions.push(action);\n break;\n case ActionPositionEnum.ToolbarLeft:\n this.toolbarLeftActions.push(action);\n break;\n case ActionPositionEnum.ToolbarRight:\n this.toolbarRightActions.push(action);\n break;\n }\n }\n\n this.toolbarRightActions = this.toolbarRightActions.reverse();\n }\n\n ngOnDestroy() {\n this.subscriptions.forEach(s => s.unsubscribe());\n }\n\n getMessageService(): MessageService {\n return this.messageService;\n }\n\n getDataProvider(): IDataProvider<T, S> | undefined {\n return this.dataProvider;\n }\n\n public reloadTable() {\n this.tableComponent?.reload();\n }\n}\n","<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action *ngFor=\"let action of toolbarLeftActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"> </mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table [descriptor]=\"descriptor.table\" [dataProvider]=\"dataProvider\" [useQueryParams]=\"true\" [actions]=\"actions\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle | translate }}</h5>\n </div>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n","import {Directive, OnInit} from '@angular/core';\n\nimport {ITableviewDataProvider} from '../../../data-providers';\nimport {\n ActionDeleteDescriptor,\n ActionDescriptor,\n ActionEditorAddDescriptor,\n ActionEditorDetailsDescriptor,\n ActionEditorEditDescriptor,\n EditorDescriptor,\n ModelDescriptor,\n TableviewDescriptor\n} from '../../../descriptors';\n\n@Directive()\nexport abstract class AMngTableviewRouteComponent<T, S> implements OnInit {\n public descriptor!: TableviewDescriptor<T>;\n public dataProvider!: ITableviewDataProvider<T, S>;\n public actions!: Array<ActionDescriptor<T>>;\n\n public ngOnInit() {\n this.descriptor = this.createTableviewDescriptor();\n this.dataProvider = this.createTableviewDataProvider();\n this.actions = this.createActionDescriptors();\n }\n\n protected abstract createTableviewDescriptor(): TableviewDescriptor<T>;\n\n protected abstract createTableviewDataProvider(): ITableviewDataProvider<T, S>;\n\n protected createActionDescriptors(): Array<ActionDescriptor<T>> {\n const actions: Array<ActionDescriptor<T>> = [];\n actions.push(this.createActionDescriptorForDetails());\n actions.push(this.createActionDescriptorForAdd());\n actions.push(this.createActionDescriptorForEdit());\n actions.push(this.createActionDescriptorForDelete());\n return actions;\n }\n\n protected createActionDescriptorForDetails(descriptor: EditorDescriptor<T> = this.descriptor.viewEditor): ActionEditorDetailsDescriptor<T> {\n return new ActionEditorDetailsDescriptor(descriptor);\n }\n\n protected createActionDescriptorForAdd(descriptor: EditorDescriptor<T> = this.descriptor.addEditor): ActionEditorAddDescriptor<T> {\n return new ActionEditorAddDescriptor(descriptor);\n }\n\n protected createActionDescriptorForEdit(descriptor: EditorDescriptor<T> = this.descriptor.editEditor): ActionEditorEditDescriptor<T> {\n return new ActionEditorEditDescriptor(descriptor);\n }\n\n protected createActionDescriptorForDelete(descriptor: ModelDescriptor<T> = this.descriptor.model): ActionDeleteDescriptor<T> {\n return new ActionDeleteDescriptor(descriptor);\n }\n}\n","import {Component, Input, OnInit} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\n\nimport {ITableviewDataProvider} from '../../../data-providers';\nimport {ActionDescriptor, TableviewDescriptor} from '../../../descriptors';\nimport {MngRouterData} from '../../../router/models';\nimport {AMngTableviewRouteComponent} from './tableview-route.abstract.component';\n\n@Component({\n selector: 'mng-tableview-route',\n templateUrl: '../../../../../templates/tableview-route.component.html'\n})\nexport class MngTableviewRouteComponent<T, S> extends AMngTableviewRouteComponent<T, S> implements OnInit {\n @Input('descriptor') public descriptorInit?: TableviewDescriptor<T>;\n @Input('dataProvider') public dataProviderInit?: ITableviewDataProvider<T, S>;\n @Input('actions') public actionsInit?: Array<ActionDescriptor<T>>;\n\n constructor(private route: ActivatedRoute) {\n super();\n }\n\n protected createTableviewDescriptor(): TableviewDescriptor<T> {\n if (this.descriptorInit) {\n return this.descriptorInit;\n }\n const routeData = this.route.snapshot.data as MngRouterData;\n if (!routeData?.tableview?.descriptor) {\n throw Error('Tableview requires a descriptor.');\n }\n return routeData.tableview.descriptor;\n }\n\n protected createTableviewDataProvider(): ITableviewDataProvider<T, S> {\n if (this.dataProviderInit) {\n return this.dataProviderInit;\n }\n const routeData = this.route.snapshot.data as MngRouterData;\n if (!routeData?.tableview?.dataProvider) {\n throw Error('Tableview requires a data provider.');\n }\n return routeData.tableview.dataProvider;\n }\n\n protected override createActionDescriptors(): Array<ActionDescriptor<T>> {\n if (this.actionsInit) {\n return this.actionsInit;\n }\n const routeData = this.route.snapshot.data as MngRouterData;\n return routeData?.tableview?.actions ?? super.createActionDescriptors();\n }\n}\n","<div class=\"grid\">\n <div class=\"col-12\">\n <mng-tableview [descriptor]=\"descriptor\" [dataProvider]=\"dataProvider\" [actions]=\"actions\"></mng-tableview>\n </div>\n</div>\n","import {AfterViewInit, ChangeDetectionStrategy, Component, Injector, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {FormControl} from '@angular/forms';\n\nimport {FieldType} from '@ngx-formly/core';\nimport {Message} from 'primeng/api';\nimport {Observable, ReplaySubject, Subject, Subscription, distinctUntilChanged} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\n\nimport {MediusQueryParamBuilder, MediusQueryResult} from '../../../../../api/models';\nimport {FieldLookupConfig, FieldLookupDescriptor} from '../../../../../descriptors';\nimport {MngTableComponent} from '../../../../tableview';\nimport {MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum} from '../../../models';\n\n@Component({\n selector: 'mng-formly-field-lookup-dialog',\n templateUrl: 'formly-field-lookup-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldLookupDialogComponent<T, ET> extends FieldType implements OnInit, AfterViewInit, OnDestroy {\n @ViewChild(MngTableComponent) public mngTable?: MngTableComponent<any, any>;\n\n public descriptor!: FieldLookupDescriptor<T, ET>;\n public config!: FieldLookupConfig;\n public fieldLabelFormControl: FormControl = new FormControl();\n\n public itemsSubject: Subject<T> = new ReplaySubject(1);\n public itemsAsync: Observable<T> = this.itemsSubject.asObservable();\n public addItemsSubject: Subject<MediusQueryResult<T>> = new ReplaySubject(1);\n public addItemsAsync: Observable<MediusQueryResult<T>> = this.addItemsSubject.asObservable();\n\n public dialogUseDataProvider = false;\n private dialogDataProviderService: any = null;\n private dialogIsLoadingSubject = new ReplaySubject<boolean>(1);\n\n public isDialogVisible = false;\n public dialogAreItemsLoaded = false;\n public dialogSelectedItem: any = null;\n public dialogMessages: Message[] = [];\n public dialogIsLoading$ = this.dialogIsLoadingSubject.asObservable();\n\n private lookupDataProviderSubscription?: Subscription;\n private subscriptions: Subscription[] = [];\n\n constructor(private injector: Injector) {\n super();\n }\n\n ngOnInit(): void {\n this.descriptor = this.to['descriptor'];\n\n // emit lifecycle event\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: MngFormFieldEventComponentSubtype.ON_INIT\n });\n\n this.config = this.descriptor.config as FieldLookupConfig;\n if (!this.descriptor.dialogTableDataProvider && this.descriptor.dataProvider?.serviceType) {\n this.dialogUseDataProvider = true;\n this.dialogDataProviderService = this.injector.get<any>(this.descriptor.dataProvider.serviceType);\n }\n\n // init values\n this.setFieldLabelValue(this.formControl!.value);\n const subscription = this.formControl!.valueChanges.pipe(\n startWith(this.formControl!.value),\n distinctUntilChanged((prev, curr) => {\n const compareProp = this.descriptor.dialogTableDescriptor!.dataKeyProperty ?? this.descriptor.dialogTableDescriptor!.model.idPropertyName;\n if (compareProp && typeof prev === 'object' && typeof curr === 'object') {\n return prev[compareProp] === curr[compareProp];\n } else {\n return prev === curr;\n }\n })\n ).subscribe(v => {\n this.setFieldLabelValue(v);\n this.itemsSubject.next(v);\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.ValueChange, MngFormlyFieldLookupDialogComponent, this, {\n value: v\n });\n });\n this.subscriptions.push(subscription);\n }\n\n ngAfterViewInit() {\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: MngFormFieldEventComponentSubtype.ON_VIEW_INIT\n });\n }\n\n ngOnDestroy(): void {\n this.lookupDataProviderSubscription?.unsubscribe();\n this.subscriptions.forEach(s => s.unsubscribe());\n\n // emit lifecycle event\n this.descriptor?.nextEvent(MngFormFieldEventTypeEnum.Component, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: MngFormFieldEventComponentSubtype.ON_DESTROY\n });\n }\n\n openSelectDialog() {\n if (!this.dialogAreItemsLoaded && this.dialogUseDataProvider) {\n this.dialogIsLoadingSubject.next(true);\n const queryParamBuilder = MediusQueryParamBuilder.create(50);\n if (this.descriptor.dialogTableDescriptor!.hasDefaultSort) {\n this.descriptor.dialogTableDescriptor!.defaultSortProperty.forEach((p, idx) =>\n queryParamBuilder.withSort(p, this.descriptor.dialogTableDescriptor!.defaultSortAsc[idx])\n );\n }\n this.lookupDataProviderSubscription = this.descriptor.dataProvider?.lookup(queryParamBuilder.build(), this.dialogDataProviderService).subscribe({\n next: res => {\n const mqr = new MediusQueryResult<T>();\n mqr.pageData = res;\n mqr.allDataCount = res.length;\n this.addItemsSubject.next(mqr);\n this.dialogAreItemsLoaded = true;\n this.dialogIsLoadingSubject.next(false);\n\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.DataProvider, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: 'LookupNext',\n queryResult: mqr\n });\n },\n error: err => {\n this.dialogIsLoadingSubject.next(false);\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.DataProvider, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: 'LookupError',\n queryResult: err\n });\n }\n });\n }\n this.dialogSelectedItem = null;\n this.isDialogVisible = true;\n\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Dialog, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: MngFormFieldEventDialogSubtype.VISIBILITY,\n dialogVisible: true\n });\n }\n\n onSelectionChange(item: any) {\n this.dialogSelectedItem = item;\n }\n\n onCaptionCmpInst(instance: any) {\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Dialog, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: MngFormFieldEventDialogSubtype.TABLE_CAPTION_COMPONENT_INSTANCE,\n captionComponentInstance: instance\n });\n }\n\n onColumnActionCmpInst(instance: any) {\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Dialog, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: MngFormFieldEventDialogSubtype.TABLE_COLUMN_ACTIONS_COMPONENT_INSTANCE,\n captionComponentInstance: instance\n });\n }\n\n clear() {\n this.formControl!.setValue(undefined);\n this.dialogSelectedItem = null;\n this.dialogAreItemsLoaded = false;\n this.hideDialog();\n }\n\n hideDialog() {\n this.isDialogVisible = false;\n\n this.descriptor.nextEvent(MngFormFieldEventTypeEnum.Dialog, MngFormlyFieldLookupDialogComponent, this, {\n eventSubtype: MngFormFieldEventDialogSubtype.VISIBILITY,\n dialogVisible: false\n });\n }\n\n addItem() {\n this.formControl!.setValue(this.dialogSelectedItem);\n this.dialogSelectedItem = null;\n this.dialogAreItemsLoaded = false;\n this.hideDialog();\n }\n\n private setFieldLabelValue(value: T) {\n if (!value) {\n this.fieldLabelFormControl.setValue('');\n return;\n }\n if (typeof value === 'object') {\n const labelProperty = this.descriptor.itemsLabelProperty ?? this.descriptor.dialogTableDescriptor?.model.titlePropertyName;\n if (!labelProperty) {\n throw new Error('Could not determine label property.');\n }\n this.fieldLabelFormControl.setValue(value[labelProperty as keyof object]);\n } else {\n this.fieldLabelFormControl.setValue(value);\n }\n }\n}\n","<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!to.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate: {item: ''}\"\n [disabled]=\"formControl?.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config?.table?.captionComponent\"\n [columnActionComponent]=\"config?.table?.columnActionComponent\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n","import {ChangeDetectionStrategy, Component, OnDestroy, OnInit} from '@angular/core';\n\nimport {FieldType} from '@ngx-formly/core';\nimport {BehaviorSubject, Observable, ReplaySubject, Subject, Subscription, distinctUntilChanged, of, throwError} from 'rxjs';\nimport {map, startWith} from 'rxjs/operators';\n\nimport {ActionDescriptor, ActionEditorDescriptor, ActionEditorSubmitDescriptor, ActionLevelEnum, ActionPositionEnum, FieldManyEditorDescriptor} from '../../../../../descriptors';\nimport {MngActionExecutorService} from '../../../../../services';\n\nimport SizeEnum = ActionDescriptor.SizeEnum;\nimport DialogSizeEnum = ActionEditorDescriptor.DialogSizeEnum;\n\n@Component({\n selector: 'mng-formly-table-dialog-form-field',\n templateUrl: './formly-field-table-dialog-form.component.html',\n styleUrls: ['./formly-field-table-dialog-form.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldTableDialogFormComponent<T, ET> extends FieldType implements OnInit, OnDestroy {\n public descriptor!: FieldManyEditorDescriptor<T, ET>;\n\n public itemsSubject: Subject<Array<T>> = new ReplaySubject(1);\n public items$: Observable<Array<T>> = this.itemsSubject.asObservable();\n\n public actions: Array<ActionDescriptor<T>> = [];\n public toolbarRightActions: Array<ActionDescriptor<T>> = [];\n\n private subscriptions: Subscription[] = [];\n private isDisabledSubject = new BehaviorSubject<boolean>(false);\n private isEnabled$ = this.isDisabledSubject.asObservable().pipe(\n distinctUntilChanged(),\n map(e => !e)\n );\n\n constructor(private actionExecutor: MngActionExecutorService) {\n super();\n }\n\n public ngOnInit() {\n this.descriptor = this.to['descriptor'];\n const hasViewAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.View);\n const hasAddAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Add);\n const hasEditAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Edit);\n const hasDeleteAction = this.descriptor.fieldActions.some(a => a === FieldManyEditorDescriptor.ActionEnum.Delete);\n\n if (hasViewAction) {\n const viewAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.viewEditor, 'details', this.descriptor.editor.model.type, this.descriptor.property)\n .withPosition(ActionPositionEnum.RowClick)\n .withTitle(null)\n .withDialogClassName('mng-field-dialog mng-action-editor-dialog')\n .withDialogSize(DialogSizeEnum.Small);\n viewAction.withEditorActions([new ActionEditorSubmitDescriptor(viewAction, ActionEditorSubmitDescriptor.TypeEnum.Cancel)]);\n this.actions.push(viewAction as ActionDescriptor<T>);\n }\n\n if (hasAddAction) {\n const addAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.addEditor, 'add', this.descriptor.editor.model.type, this.descriptor.property)\n .withPosition(ActionPositionEnum.ToolbarRight)\n .withTitle(null)\n .withIcon('pi pi-plus')\n .withDialogClassName('mng-field-dialog mng-action-editor-dialog')\n .withDialogSize(DialogSizeEnum.Small)\n .withSize(SizeEnum.ExtraSmall)\n .withSubmitFunction(ctx => {\n if (!ctx.data?.item) {\n throw new Error(`No item was provided in context, edit cannot be done.`);\n }\n this.formState.submittedOn = Date.now();\n let value = this.formControl!.value;\n value = [...value, ctx.data.item];\n this.formControl!.patchValue(value);\n return of(ctx.data.item);\n })\n .withIsVisibleFunction(() => of(!this.options?.formState.disabled))\n .withIsEnabledFunction(() => this.isEnabled$);\n this.actions.push(addAction as ActionDescriptor<T>);\n }\n if (hasEditAction) {\n const editAction = new ActionEditorDescriptor(this.descriptor.tableviewDescriptor.editEditor, 'edit', this.descriptor.editor.model.type, this.descriptor.property)\n .withPosition(ActionPositionEnum.RowInline)\n .withTitle(null)\n .withIcon('pi pi-pencil')\n .withDialogClassName('mng-field-dialog mng-action-editor-dialog')\n .withDialogSize(DialogSizeEnum.Small)\n .withSize(SizeEnum.ExtraSmall)\n .withSubmitFunction(ctx => {\n if (!ctx.data?.item) {\n throw new Error(`No item was provided in context, edit cannot be done.`);\n }\n this.formState.submittedOn = Date.now();\n const formControlValue = this.formControl!.value;\n formControlValue[ctx.data.actionData?.['itemIndex']] = ctx.data.item;\n this.formControl!.patchValue(formControlValue);\n return of(ctx.data.item);\n })\n .withIsVisibleFunction(() => of(!this.formControl?.disabled))\n .withIsEnabledFunction(() => this.isEnabled$);\n this.actions.push(editAction as ActionDescriptor<T>);\n }\n if (hasDeleteAction) {\n const deleteAction = new ActionDescriptor(this.descriptor.tableviewDescriptor.model, 'delete', this.descriptor.editor.model.type, this.descriptor.property)\n .withPosition(ActionPositionEnum.RowInline)\n .withLevel(ActionLevelEnum.Danger)\n .withTitle(null)\n .withIcon('pi pi-trash')\n .withSize(SizeEnum.ExtraSmall)\n .withRunFunction(ctx => {\n if (!ctx.data?.item) {\n return throwError(() => new Error(`No item was provided in context, delete cannot be done.`));\n }\n let formControlValue = this.formControl!.value as Array<T>;\n const compareProperty = this.descriptor.tableDescriptor.dataKeyProperty\n ? this.descriptor.tableDescriptor.dataKeyProperty\n : this.descriptor.tableDescriptor.model.idPropertyName;\n const ctxItem: any = ctx.data!.item;\n if (compareProperty && ctxItem?.[compareProperty]) {\n formControlValue = formControlValue.filter((i: any) => i[compareProperty] !== ctxItem[compareProperty]);\n this.formControl!.patchValue(formControlValue);\n } else if (typeof ctx.data.actionData?.['itemIndex'] === 'number') {\n formControlValue.splice(ctx.data.actionData['itemIndex'], 1);\n this.formControl!.patchValue([...formControlValue]);\n } else {\n return throwError(() => new Error('Cannot compare items, please provide main table data key property or model id property.'));\n }\n return of(ctxItem);\n })\n .withIsVisibleFunction(() => of(!this.options?.formState.disabled))\n .withIsEnabledFunction(() => this.isEnabled$);\n this.actions.push(deleteAction);\n }\n\n this.actions.push(...this.descriptor.actions);\n for (const action of this.actions) {\n switch (action.position) {\n case ActionPositionEnum.ToolbarRight:\n this.toolbarRightActions.push(action);\n break;\n }\n }\n\n // init values\n if (typeof this.formControl!.value === 'undefined' || this.formControl!.value === null) {\n this.formControl!.patchValue([]);\n }\n let subscription = this.formControl!.valueChanges.pipe(startWith(this.formControl!.value)).subscribe(v => {\n this.itemsSubject.next(v);\n });\n this.subscriptions.push(subscription);\n\n this.isDisabledSubject.next(this.formControl!.disabled);\n subscription = this.formControl!.statusChanges.pipe().subscribe(status => {\n if (status === 'DISABLED' && !this.isDisabledSubject.value) {\n this.isDisabledSubject.next(true);\n } else if (status !== 'DISABLED' && this.isDisabledSubject.value) {\n this.isDisabledSubject.next(false);\n }\n });\n this.subscriptions.push(subscription);\n }\n\n public ngOnDestroy() {\n this.subscriptions.forEach(s => s.unsubscribe());\n }\n}\n","<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" [actions]=\"actions\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\"></mng-action>\n </div>\n </ng-template>\n</mng-table>\n","import {ChangeDetectionStrategy, Component, Injector, OnDestroy, OnInit} from '@angular/core';\n\nimport {FieldType} from '@ngx-formly/core';\nimport {Message} from 'primeng/api';\nimport {Observable, ReplaySubject, Subject, Subscription} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\n\nimport {MediusFilterMatchType, MediusQueryParamBuilder, MediusQueryResult} from '../../../../../api/models';\nimport {FieldManyToManyEditorDescriptor} from '../../../../../descriptors';\n\n@Component({\n selector: 'mng-formly-table-multiselect-add-field',\n templateUrl: './formly-field-table-dialog-multiselect.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldTableDialogMultiselectComponent<T, ET> extends FieldType implements OnInit, OnDestroy {\n public descriptor!: FieldManyToManyEditorDescriptor<T, ET>;\n\n public itemsSubject: Subject<Array<T>> = new ReplaySubject(1);\n public itemsAsync: Observable<Array<T>> = this.itemsSubject.asObservable();\n public addItemsSubject: Subject<MediusQueryResult<T>> = new ReplaySubject(1);\n public addItemsAsync: Observable<MediusQueryResult<T>> = this.addItemsSubject.asObservable();\n\n public dialogUseDataProvider = false;\n private dialogDataProviderService: any = null;\n private dialogIsLoadingSubject = new ReplaySubject<boolean>(1);\n\n public isDialogVisible = false;\n public dialogAreItemsLoaded = false;\n public dialogSelectedAddItems: Array<any> = [];\n public dialogMessages: Message[] = [];\n public dialogIsLoading$ = this.dialogIsLoadingSubject.asObservable();\n\n public hasAddAction = false;\n public hasDeleteAction = false;\n\n private lookupDataProviderSubscription?: Subscription;\n private subscriptions: Subscription[] = [];\n\n constructor(private injector: Injector) {\n super();\n }\n\n public ngOnInit() {\n this.descriptor = this.to['descriptor'];\n if (this.descriptor.lookupTableDataProvider?.serviceType) {\n this.dialogUseDataProvider = true;\n this.dialogDataProviderService = this.injector.get<any>(this.descriptor.lookupTableDataProvider.serviceType);\n }\n this.hasAddAction = this.descriptor.actions.some(a => a === FieldManyToManyEditorDescriptor.ActionEnum.Add);\n this.hasDeleteAction = this.descriptor.actions.some(a => a === FieldManyToManyEditorDescriptor.ActionEnum.Delete);\n\n // init values\n if (typeof this.formControl!.value === 'undefined' || this.formControl!.value === null) {\n this.formControl!.patchValue([]);\n }\n const subscription = this.formControl!.valueChanges.pipe(startWith(this.formControl!.value)).subscribe(v => {\n this.itemsSubject.next(v);\n });\n this.subscriptions.push(subscription);\n }\n\n public ngOnDestroy() {\n this.lookupDataProviderSubscription?.unsubscribe();\n this.subscriptions.forEach(s => s.unsubscribe());\n }\n\n openAddDialog() {\n if (!this.dialogAreItemsLoaded && this.dialogUseDataProvider) {\n this.dialogIsLoadingSubject.next(true);\n const queryParamBuilder = MediusQueryParamBuilder.create(50);\n if (this.descriptor.lookupTableDescriptor.hasDefaultSort) {\n this.descriptor.lookupTableDescriptor.defaultSortProperty.forEach((p, idx) =>\n queryParamBuilder.withSort(p, this.descriptor.lookupTableDescriptor.defaultSortAsc[idx])\n );\n }\n if (this.descriptor.hasLookupExcludeValues) {\n const filterValues = this.formControl!.value.map((i: any) => i[this.descriptor.excludeValueProperty]);\n queryParamBuilder.withFilter(this.descriptor.excludeFilterProperty, filterValues, undefined, MediusFilterMatchType.NotIn);\n }\n this.lookupDataProviderSubscription = this.descriptor.lookupTableDataProvider?.getAll(queryParamBuilder.build(), this.dialogDataProviderService).subscribe({\n next: res => {\n this.addItemsSubject.next(res);\n this.dialogAreItemsLoaded = true;\n this.dialogIsLoadingSubject.next(false);\n },\n error: () => {\n this.dialogIsLoadingSubject.next(false);\n }\n });\n }\n this.dialogSelectedAddItems = [];\n this.isDialogVisible = true;\n }\n\n onSelectionChange(items: Array<any>) {\n this.dialogSelectedAddItems = items;\n }\n\n hideDialog() {\n this.isDialogVisible = false;\n }\n\n addItems() {\n let value = this.formControl!.value;\n if (Array.isArray(value)) {\n value = [...value, ...this.dialogSelectedAddItems];\n this.formControl!.patchValue(value);\n this.dialogSelectedAddItems = [];\n this.dialogAreItemsLoaded = false;\n this.hideDialog();\n } else {\n console.error('Values are not an valid array, cannot add selected items to array');\n this.dialogMessages = [{severity: 'error', summary: 'Error', detail: 'Selected items could not be added'}];\n }\n }\n\n removeItem(item: any) {\n let value = this.formControl!.value;\n if (Array.isArray(value)) {\n const compareProperty = this.descriptor.mainTableDescriptor.dataKeyProperty\n ? this.descriptor.mainTableDescriptor.dataKeyProperty\n : this.descriptor.mainTableDescriptor.model.idPropertyName;\n if (!compareProperty) {\n throw new Error('Cannot compare items, please provide main table data key property or model id property.');\n }\n value = value.filter(i => i[compareProperty] !== item[compareProperty]);\n this.formControl!.patchValue(value);\n this.dialogAreItemsLoaded = false;\n } else {\n console.error('Values are not an valid array, cannot delete selected item from array');\n }\n }\n}\n","<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\">{{ to?.label! | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label>\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded p-button-success mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate: {item: to?.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-field-dialog mng-action-editor-dialog mng-action-editor-dialog-sm\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\nimport {FieldType} from '@ngx-formly/core';\n\n@Component({\n selector: 'mng-formly-field-tabs',\n templateUrl: './formly-field-tabs.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldTabsComponent extends FieldType {}\n","<p-tabView>\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.templateOptions?.label! | translate\"\n [headerStyleClass]=\"$any(formControl!.valid ? 'p-tabview-title' : null)\">\n <ng-template pTemplate=\"header\">\n <span\n class=\"p-tabview-title\"\n [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.templateOptions?.label!) + '_invalid']\"\n >{{ tab.templateOptions?.label! | translate }}</span\n >\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n","import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';\n\nimport {FieldType} from '@ngx-formly/core';\n\nimport {FieldGroupDescriptor} from '../../../../../descriptors';\n\n@Component({\n selector: 'mng-formly-field-fieldset',\n templateUrl: './formly-field-fieldset.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldFieldsetComponent extends FieldType implements OnInit {\n public readonly typeFieldset = FieldGroupDescriptor.TypeEnum.Fieldset;\n public readonly typeLogical = FieldGroupDescriptor.TypeEnum.Logical;\n public descriptor?: FieldGroupDescriptor<any>;\n\n ngOnInit() {\n this.descriptor = this.to['descriptor'];\n }\n}\n","<ng-container *ngFor=\"let group of field.fieldGroup; let i = index; let last = last\">\n <ng-container [ngSwitch]=\"group?.templateOptions?.['descriptor']?.type\">\n <p-fieldset *ngSwitchCase=\"typeFieldset\" [legend]=\"group.templateOptions?.label! | translate\">\n <formly-field [field]=\"group\"></formly-field>\n </p-fieldset>\n <formly-field *ngSwitchDefault [field]=\"group\"></formly-field>\n </ng-container>\n</ng-container>\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\nimport {FieldWrapper} from '@ngx-formly/core';\n\n@Component({\n selector: 'mng-formly-field-wrapper',\n templateUrl: './formly-field-wrapper.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyFieldWrapperComponent extends FieldWrapper {}\n","<div [class]=\"to?.['descriptor']?.['fieldClassName'] ?? 'field'\">\n <label [for]=\"key\" [class]=\"to?.['descriptor']?.['labelClassName'] ?? ''\"\n >{{ $any(to?.label) | translate }} <span *ngIf=\"to.required && to['hideRequiredMarker'] !== true\">*</span></label\n >\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\nimport {FieldWrapper} from '@ngx-formly/core';\n\n@Component({\n selector: 'mng-formly-table-wrapper',\n templateUrl: './formly-table-wrapper.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFormlyTableWrapperComponent extends FieldWrapper {}\n","<div [class]=\"to?.['descriptor']?.['fieldClassName'] ?? 'field table'\">\n <ng-container #fieldComponent></ng-container>\n <small *ngIf=\"to?.['descriptor']?.['helpText']\">{{ to?.['descriptor']?.['helpText'] | translate }}</small>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n</div>\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\nimport {MngCommonsService} from '../../services';\n\n@Component({\n selector: 'mng-breadcrumb',\n templateUrl: './breadcrumb.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngBreadcrumbComponent {\n constructor(public mngCommons: MngCommonsService) {}\n}\n","<div class=\"layout-breadcrumb-container\">\n <div class=\"layout-breadcrumb\">\n <p-breadcrumb [home]=\"$any(mngCommons.breadcrumbHome$ | async)\" [model]=\"$any(mngCommons.breadcrumbs$ | async)\" styleClass=\"layout-breadcrumb py-2\"></p-breadcrumb>\n </div>\n</div>\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\nimport {MngCommonsService} from '../../services';\n\n@Component({\n selector: 'mng-footer',\n templateUrl: './footer.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngFooterComponent {\n public currentYear = new Date().getFullYear();\n\n constructor(public mngCommons: MngCommonsService) {}\n}\n","<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">&#169; {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n","import {Injectable} from '@angular/core';\n\nimport {BehaviorSubject, Observable, Subject} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {MngCommonsService} from '../../../services';\n\n@Injectable()\nexport class MngMainLayoutComponentService {\n private _overlayMenuActive = false;\n private _overlayMenuActiveSubject: Subject<boolean> = new BehaviorSubject(this._overlayMenuActive);\n private _staticMenuDesktopInactive = false;\n private _staticMenuDesktopInactiveSubject: Subject<boolean> = new BehaviorSubject(this._staticMenuDesktopInactive);\n private _staticMenuMobileActive = false;\n private _staticMenuMobileActiveSubject: Subject<boolean> = new BehaviorSubject(this._staticMenuMobileActive);\n\n private _sidebarActive = true;\n private _sidebarActiveSubject: Subject<boolean> = new BehaviorSubject(this._sidebarActive);\n private _sidebarStatic = true;\n private _sidebarStaticSubject: Subject<boolean> = new BehaviorSubject(this._sidebarStatic);\n\n private _menuClick = false;\n private _menuHoverActive = false;\n private _topbarItemClick = false;\n\n private _activeTopbarItem: any = null;\n private _activeTopbarItemSubject: Subject<any> = new BehaviorSubject(this._activeTopbarItem);\n\n private _pinActive = true;\n private _pinActiveSubject: Subject<boolean> = new BehaviorSubject(this._pinActive);\n\n private _innerWidth = 1920;\n private _innerWidthSubject: Subject<number> = new BehaviorSubject(this._innerWidth);\n\n constructor(private mngCommons: MngCommonsService) {}\n\n get overlayMenuActive$(): Observable<boolean> {\n return this._overlayMenuActiveSubject.asObservable();\n }\n\n set overlayMenuActive(value: boolean) {\n this._overlayMenuActive = value;\n this._overlayMenuActiveSubject.next(value);\n }\n\n get staticMenuDesktopInactive$(): Observable<boolean> {\n return this._staticMenuDesktopInactiveSubject.asObservable();\n }\n\n set staticMenuDesktopInactive(value: boolean) {\n this._staticMenuDesktopInactive = value;\n this._staticMenuDesktopInactiveSubject.next(value);\n }\n\n get staticMenuMobileActive$(): Observable<boolean> {\n return this._staticMenuMobileActiveSubject.asObservable();\n }\n\n set staticMenuMobileActive(value: boolean) {\n this._staticMenuMobileActive = value;\n this._staticMenuMobileActiveSubject.next(value);\n }\n\n get sidebarActive$(): Observable<boolean> {\n return this._sidebarActiveSubject.asObservable();\n }\n\n set sidebarActive(value: boolean) {\n this._sidebarActive = value;\n this._sidebarActiveSubject.next(value);\n }\n\n get sidebarStatic$(): Observable<boolean> {\n return this._sidebarStaticSubject.asObservable();\n }\n\n set sidebarStatic(value: boolean) {\n this._sidebarStatic = value;\n this._sidebarStaticSubject.next(value);\n }\n\n set menuHoverActive(value: boolean) {\n this._menuHoverActive = value;\n }\n\n set topbarItemClick(value: boolean) {\n this._topbarItemClick = value;\n }\n\n get activeTopbarItem$(): Observable<any> {\n return this._activeTopbarItemSubject.asObservable();\n }\n\n set activeTopbarItem(value: any) {\n this._activeTopbarItem = value;\n this._activeTopbarItemSubject.next(value);\n }\n\n get pinActive$(): Observable<boolean> {\n return this._pinActiveSubject.asObservable();\n }\n\n set pinActive(value: boolean) {\n this._pinActive = value;\n this._pinActiveSubject.next(value);\n }\n\n get isDesktop$() {\n return this._innerWidthSubject.asObservable().pipe(map(e => this.isWidthDesktop(e)));\n }\n\n get isMobile$() {\n return this._innerWidthSubject.asObservable().pipe(map(e => this.isWidthMobile(e)));\n }\n\n set innerWidth(value: number) {\n this._innerWidth = value;\n this._innerWidthSubject.next(value);\n }\n\n onLayoutClick() {\n if (!this._topbarItemClick) {\n this.activeTopbarItem = null;\n }\n\n if (!this._menuClick) {\n if (this.mngCommons.menuModeIsSlim && !this.isMobile()) {\n this.mngCommons.menuReset();\n this.menuHoverActive = false;\n }\n\n if (this._overlayMenuActive || this._staticMenuMobileActive) {\n this.overlayMenuActive = false;\n this.staticMenuMobileActive = false;\n }\n }\n\n this._menuClick = false;\n this.topbarItemClick = false;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onSidebarClick(event: any) {\n this._menuClick = true;\n }\n\n onToggleMenu(event: any) {\n this._menuClick = true;\n\n if (this._overlayMenuActive) {\n this.overlayMenuActive = false;\n }\n\n if (this._sidebarActive) {\n this.sidebarStatic = !this._sidebarStatic;\n }\n\n event.preventDefault();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onSidebarMouseOver(event: any) {\n if (this.mngCommons.menuModeIsSidebar && !this._sidebarStatic) {\n this.sidebarActive = this.isDesktop();\n setTimeout(() => {\n this.pinActive = this.isDesktop();\n }, 200);\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onSidebarMouseLeave(event: any) {\n if (this.mngCommons.menuModeIsSidebar && !this._sidebarStatic) {\n setTimeout(() => {\n this.sidebarActive = false;\n this.pinActive = false;\n }, 250);\n }\n }\n\n onMenuButtonClick(event: any) {\n this._menuClick = true;\n\n if (this.mngCommons.menuModeIsOverlay) {\n this.overlayMenuActive = !this._overlayMenuActive;\n }\n\n if (this.isDesktop()) {\n this.staticMenuDesktopInactive = !this._staticMenuDesktopInactive;\n } else {\n this.staticMenuMobileActive = !this._staticMenuMobileActive;\n }\n\n event.preventDefault();\n }\n\n onTopbarItemClick(event: any, item: any) {\n this._topbarItemClick = true;\n\n if (this._activeTopbarItem === item) {\n this.activeTopbarItem = null;\n } else {\n this.activeTopbarItem = item;\n }\n\n event.preventDefault();\n }\n\n onTopbarSubItemClick(event: any) {\n event.preventDefault();\n }\n\n /**\n * Checks if is desktop width, DO NOT use within HTML templates or within functions called by HTML templates\n */\n public isDesktop() {\n return this.isWidthDesktop(this._innerWidth);\n }\n\n /**\n * Checks if is mobile width, DO NOT use within HTML templates or within functions called by HTML templates\n */\n public isMobile() {\n return this.isWidthMobile(this._innerWidth);\n }\n\n private isWidthDesktop(width: number) {\n return width > 991;\n }\n\n private isWidthMobile(width: number) {\n return width <= 991;\n }\n}\n","import {animate, state, style, transition, trigger} from '@angular/animations';\nimport {Component, Injector, Input, OnDestroy, OnInit} from '@angular/core';\nimport {ActivatedRoute, CanActivate, GuardsCheckEnd, NavigationEnd, Router, RouterStateSnapshot, UrlTree} from '@angular/router';\n\nimport {BehaviorSubject, Observable, Subscription, combineLatest, distinctUntilChanged, from, of} from 'rxjs';\nimport {first, map} from 'rxjs/operators';\n\nimport {MngMenuItem} from '../../models';\nimport {MngCommonsService} from '../../services';\nimport {MngMainLayoutComponentService} from './services';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[mng-menuitem]',\n templateUrl: './menu-item.component.html',\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n '[class.layout-root-menuitem]': 'root',\n '[class.active-menuitem]': 'active'\n },\n animations: [\n trigger('children', [\n state(\n 'void',\n style({\n height: '0px'\n })\n ),\n state(\n 'hiddenAnimated',\n style({\n height: '0px'\n })\n ),\n state(\n 'visibleAnimated',\n style({\n height: '*'\n })\n ),\n state(\n 'visible',\n style({\n height: '*',\n 'z-index': 100\n })\n ),\n state(\n 'hidden',\n style({\n height: '0px',\n 'z-index': '*'\n })\n ),\n transition('visibleAnimated => hiddenAnimated', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)')),\n transition('hiddenAnimated => visibleAnimated', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)')),\n transition('void => visibleAnimated, visibleAnimated => void', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))\n ])\n ]\n // changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngMenuItemComponent implements OnInit, OnDestroy {\n @Input() item!: MngMenuItem;\n @Input() index = 0;\n @Input() root = false;\n @Input() parentKey: string | null = null;\n\n public key = '';\n public active = false;\n public hover = false;\n\n private isAllowedSubject = new BehaviorSubject(true);\n public isAllowed$: Observable<boolean>;\n\n private itemUrl?: string | UrlTree;\n private menuSourceSubscription?: Subscription;\n private menuResetSubscription?: Subscription;\n private routerEventsSubscription?: Subscription;\n private guardsSubscription?: Subscription;\n\n constructor(\n private injector: Injector,\n private router: Router,\n private route: ActivatedRoute,\n public mngCommons: MngCommonsService,\n public mainLayoutService: MngMainLayoutComponentService\n ) {\n this.isAllowed$ = this.isAllowedSubject.asObservable().pipe(distinctUntilChanged());\n }\n\n ngOnInit() {\n if (!this.mngCommons.menuModeIsSlim && this.item.routerLink) {\n this.updateActiveStateFromRoute();\n }\n\n this.key = this.parentKey ? this.parentKey + '-' + this.index : String(this.index);\n if (this.item.routerLink) {\n if (typeof this.item.routerLink === 'string') {\n this.itemUrl = this.item.routerLink;\n } else {\n this.itemUrl = this.router.parseUrl(this.item.routerLink.join('/'));\n }\n }\n\n this.menuSourceSubscription = this.mngCommons.menuActiveKey$.subscribe(key => {\n // deactivate current active menu\n if (this.active && this.key !== key && key.indexOf(this.key) !== 0) {\n this.active = false;\n }\n });\n\n this.menuResetSubscription = this.mngCommons.menuReset$.subscribe(() => {\n this.active = false;\n });\n\n this.routerEventsSubscription = this.router.events.subscribe(next => {\n if (next instanceof GuardsCheckEnd && next.shouldActivate) {\n this.checkIfMenuItemIsAllowedFromGuard(next.state);\n } else if (next instanceof NavigationEnd) {\n if (this.mngCommons.menuModeIsSlim && !this.mainLayoutService.isMobile()) {\n this.active = false;\n } else {\n this.updateActiveStateFromRoute();\n }\n }\n });\n\n this.checkIfMenuItemIsAllowedFromGuard(this.router.routerState.snapshot);\n }\n\n updateActiveStateFromRoute() {\n if (this.itemUrl) {\n this.active = this.router.isActive(this.itemUrl, this.item.items ? false : true);\n } else {\n this.active = false;\n }\n }\n\n itemClick(event: Event) {\n // avoid processing disabled items\n if (this.item.disabled) {\n event.preventDefault();\n return;\n }\n\n // navigate with hover in horizontal mode\n if (this.root) {\n this.mainLayoutService.menuHoverActive = !this.mainLayoutService.menuHoverActive;\n }\n\n // notify other items\n this.mngCommons.menuChangeActiveKey(this.key);\n\n // toggle active state\n if (this.item.items) {\n this.active = !this.active;\n } else {\n // activate item\n this.active = true;\n\n if (this.mainLayoutService.isMobile()) {\n this.mainLayoutService.staticMenuMobileActive = false;\n }\n\n if (this.mngCommons.menuModeIsOverlay) {\n this.mainLayoutService.overlayMenuActive = false;\n }\n\n // reset horizontal menu\n if (this.mngCommons.menuModeIsSlim && !this.mainLayoutService.isMobile()) {\n this.mngCommons.menuReset();\n this.mainLayoutService.menuHoverActive = false;\n }\n }\n }\n\n onMouseEnter() {\n // activate item on hover\n if (this.root && this.mainLayoutService.menuHoverActive && this.mngCommons.menuModeIsSlim && this.mainLayoutService.isDesktop()) {\n this.mngCommons.menuChangeActiveKey(this.key);\n this.active = true;\n }\n }\n\n ngOnDestroy() {\n this.menuSourceSubscription?.unsubscribe();\n this.menuResetSubscription?.unsubscribe();\n this.routerEventsSubscription?.unsubscribe();\n this.guardsSubscription?.unsubscribe();\n }\n\n private checkIfMenuItemIsAllowedFromGuard(routerState: RouterStateSnapshot) {\n this.guardsSubscription?.unsubscribe();\n if (this.item.guards?.length) {\n const obs = [];\n for (const guard of this.item.guards) {\n const tokenInjectedInstance = this.injector.get(guard);\n if (tokenInjectedInstance && 'canActivate' in tokenInjectedInstance) {\n const guardInstance = tokenInjectedInstance as CanActivate;\n const canActivateRes = guardInstance.canActivate(this.route.snapshot, routerState);\n\n let canActivateObs: Observable<boolean | UrlTree>;\n if (canActivateRes instanceof Observable) {\n canActivateObs = canActivateRes;\n } else if (canActivateRes instanceof Promise) {\n canActivateObs = from(canActivateRes);\n } else {\n canActivateObs = of(canActivateRes);\n }\n obs.push(\n canActivateObs.pipe(\n first(),\n map(res => res === true) // if url tree is present, that means redirect and implies not allowed\n )\n );\n }\n }\n this.guardsSubscription = combineLatest(obs)\n .pipe(first())\n .subscribe(next => {\n const result = next.every(n => n === true);\n this.isAllowedSubject.next(result);\n });\n } else {\n this.isAllowedSubject.next(true);\n }\n }\n}\n","<ng-container>\n <div *ngIf=\"root && item.visible !== false && (isAllowed$ | async) === true\" class=\"layout-menuitem-root-text\">{{ item.label! | translate }}</div>\n <a\n *ngIf=\"(!item.routerLink || item.items) && item.visible !== false && (isAllowed$ | async) === true\"\n [attr.href]=\"item.href\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"onMouseEnter()\"\n (keydown.enter)=\"itemClick($event)\"\n [routerLink]=\"item.routerLink\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"item.routerLink && !item.items && item.visible !== false && (isAllowed$ | async) === true\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"hover = true\"\n (mouseleave)=\"hover = false\"\n [routerLink]=\"item.routerLink\"\n routerLinkActive=\"active-menuitem-routerlink\"\n [routerLinkActiveOptions]=\"{exact: true}\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <ul\n *ngIf=\"((item.items && active) || (item.items && (mngCommons.menuModeIsStatic$ | async) && (root || active))) && item.visible !== false && (isAllowed$ | async) === true\"\n [@children]=\"\n (mngCommons.menuModeIsSlim$ | async) && (mainLayoutService.isMobile$ | async) === false && root\n ? active\n ? 'visible'\n : 'hidden'\n : (mngCommons.menuModeIsStatic$ | async) && root && (mainLayoutService.isMobile$ | async) === false\n ? 'visible'\n : active\n ? 'visibleAnimated'\n : 'hiddenAnimated'\n \">\n <ng-template ngFor let-child let-i=\"index\" [ngForOf]=\"item.items\">\n <li mng-menuitem [item]=\"child\" [index]=\"i\" [parentKey]=\"key\" [class]=\"child.badgeClassName\"></li>\n </ng-template>\n </ul>\n</ng-container>\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\n\nimport {MngCommonsService} from '../../services';\nimport {MngMainLayoutComponentService} from './services';\n\n@Component({\n selector: 'mng-menu',\n templateUrl: './menu.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngMenuComponent {\n constructor(public mngCommons: MngCommonsService, public mainLayoutService: MngMainLayoutComponentService) {}\n}\n","<div\n class=\"layout-menu-wrapper\"\n [ngClass]=\"{'layout-sidebar-active': (mainLayoutService.sidebarActive$ | async)}\"\n (click)=\"mainLayoutService.onSidebarClick($event)\"\n (mouseover)=\"mainLayoutService.onSidebarMouseOver($event)\"\n (mouseleave)=\"mainLayoutService.onSidebarMouseLeave($event)\">\n <div class=\"menu-logo\">\n <a routerLink=\"/\" class=\"logo\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" />\n </a>\n\n <a routerLink=\"/\" class=\"app-name\" *ngIf=\"(mngCommons.menuModeIsSlim$ | async) === false || (mainLayoutService.isMobile$ | async)\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" />\n </a>\n <a *ngIf=\"mngCommons.menuPinEnabled\" class=\"menu-pin\" (click)=\"mainLayoutService.onToggleMenu($event)\">\n <span *ngIf=\"mngCommons.menuModeIsOverlay$ | async\" class=\"pi pi-times\"></span>\n <span\n *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) === false && (mainLayoutService.pinActive$ | async)\"\n class=\"pi pi-unlock\"></span>\n <span *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) && (mainLayoutService.pinActive$ | async)\" class=\"pi pi-lock\"></span>\n </a>\n </div>\n\n <div class=\"layout-menu-container\">\n <ul class=\"layout-menu\">\n <ng-container *ngFor=\"let item of mngCommons.menuItems; let i = index\">\n <li mng-menuitem *ngIf=\"!item.separator\" [item]=\"item\" [index]=\"i\" [root]=\"true\"></li>\n <li *ngIf=\"item.separator\" class=\"menu-separator\"></li>\n </ng-container>\n </ul>\n </div>\n</div>\n","import {ChangeDetectionStrategy, Component, OnInit, QueryList, Type, ViewChildren} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\n\nimport {MngTemplateDirective} from '../../directives';\nimport {IUser} from '../../models';\nimport {MngRouterData} from '../../router/models';\nimport {MngCommonsService} from '../../services';\nimport {MngBreadcrumbComponent} from './breadcrumb.component';\nimport {MngMenuComponent} from './menu.component';\nimport {MngMainLayoutComponentService} from './services';\n\n@Component({\n selector: 'mng-topbar',\n templateUrl: './topbar.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngTopbarComponent implements OnInit {\n @ViewChildren(MngTemplateDirective) templates!: QueryList<MngTemplateDirective>;\n\n public breadcrumbComponent: Type<any> = MngBreadcrumbComponent;\n public menuComponent: Type<any> = MngMenuComponent;\n\n public languages: Array<string> = ['en'];\n public selectedLanguage = 'en';\n public user?: IUser;\n\n constructor(private route: ActivatedRoute, public mngCommons: MngCommonsService, public mainLayoutService: MngMainLayoutComponentService) {}\n\n ngOnInit(): void {\n const routeData = this.route.snapshot.data as MngRouterData;\n if (routeData?.breadcrumbComponent) {\n this.breadcrumbComponent = routeData.breadcrumbComponent;\n }\n if (routeData?.menuComponent) {\n this.menuComponent = routeData.menuComponent;\n }\n\n this.languages = this.mngCommons.appLanguages;\n this.selectedLanguage = this.mngCommons.appLanguage;\n this.mngCommons.user$.subscribe(u => {\n this.user = u;\n });\n\n this.mainLayoutService.innerWidth = window.innerWidth;\n }\n\n public switchLanguage(language: string) {\n this.mngCommons.appLanguage = language;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public logout(user: IUser, event: Event) {\n if (typeof user.logout === 'function') {\n user.logout();\n }\n }\n}\n","<div class=\"layout-topbar\">\n <div class=\"layout-topbar-left\">\n <a\n href=\"#\"\n class=\"topbar-menu-button\"\n (click)=\"mainLayoutService.onMenuButtonClick($event)\"\n *ngIf=\"(mngCommons.menuModeIsOverlay$ | async) || (mainLayoutService.isMobile$ | async)\">\n <i class=\"pi pi-bars\"></i>\n </a>\n\n <ng-container [mngComponent]=\"breadcrumbComponent\"></ng-container>\n </div>\n\n <ng-container [mngComponent]=\"menuComponent\"></ng-container>\n\n <div class=\"layout-topbar-right\">\n <ul class=\"layout-topbar-right-items\">\n <li #profile class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <a href=\"#\" (click)=\"mainLayoutService.onTopbarItemClick($event, profile)\">\n <i class=\"pi pi-fw pi-user\"></i>\n </a>\n <ul class=\"fadeInDown\" *ngIf=\"user\">\n <li role=\"menuitem\">\n <a>\n {{ user?.displayName ?? user?.username }}\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a [href]=\"user?.logoutUrl\" (click)=\"logout(user, $event)\">\n <i class=\"pi pi-fw pi-sign-out\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n </ul>\n </li>\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\" [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === profile}\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n </ul>\n </div>\n</div>\n","import {ChangeDetectionStrategy, Component, HostListener, OnInit, QueryList, Type, ViewChildren} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\n\nimport {MngTemplateDirective} from '../../directives';\nimport {MngRouterData} from '../../router/models';\nimport {MngCommonsService} from '../../services';\nimport {MngFooterComponent} from './footer.component';\nimport {MngMenuComponent} from './menu.component';\nimport {MngMainLayoutComponentService} from './services';\nimport {MngTopbarComponent} from './topbar.component';\n\n@Component({\n selector: 'mng-main-layout',\n templateUrl: './main-layout.component.html',\n providers: [MngMainLayoutComponentService],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MngMainLayoutComponent implements OnInit {\n @ViewChildren(MngTemplateDirective) templates!: QueryList<MngTemplateDirective>;\n\n public topbarComponent: Type<any> = MngTopbarComponent;\n public menuComponent: Type<any> = MngMenuComponent;\n public footerComponent: Type<any> = MngFooterComponent;\n\n constructor(private route: ActivatedRoute, public mngCommons: MngCommonsService, public mainLayoutService: MngMainLayoutComponentService) {}\n\n ngOnInit() {\n const routeData = this.route.snapshot.data as MngRouterData;\n if (routeData?.topbarComponent) {\n this.topbarComponent = routeData.topbarComponent;\n }\n if (routeData?.menuComponent) {\n this.menuComponent = routeData.menuComponent;\n }\n if (routeData?.footerComponent) {\n this.footerComponent = routeData.footerComponent;\n }\n\n this.mainLayoutService.innerWidth = window.innerWidth;\n }\n\n @HostListener('window:resize', ['$event'])\n onWindowResize(event: UIEvent) {\n const target: any = event.target;\n this.mainLayoutService.innerWidth = target?.innerWidth ?? window.innerWidth;\n }\n}\n","<div\n class=\"layout-wrapper\"\n (click)=\"mainLayoutService.onLayoutClick()\"\n [ngClass]=\"{\n 'layout-static': mngCommons.menuModeIsStatic$ | async,\n 'layout-overlay': mngCommons.menuModeIsOverlay$ | async,\n 'layout-slim': mngCommons.menuModeIsSlim$ | async,\n 'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,\n 'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),\n 'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,\n 'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,\n 'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async)\n }\">\n <div class=\"layout-main\">\n <ng-container [mngComponent]=\"topbarComponent\"></ng-container>\n\n <ng-container\n *ngIf=\"\n (mainLayoutService.isMobile$ | async) === false &&\n ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))\n \"\n [mngComponent]=\"menuComponent\">\n </ng-container>\n\n <div class=\"layout-main-content\">\n <router-outlet></router-outlet>\n </div>\n\n <ng-container [mngComponent]=\"footerComponent\"></ng-container>\n </div>\n</div>\n","import {Observable} from 'rxjs';\n\nimport {MngCommonsInitService} from './commons-init.service';\n\nexport function mngCommonsInitializerProvider(mngCommonsInit: MngCommonsInitService): () => Observable<void> {\n return () => mngCommonsInit.initialize();\n}\n","import {Inject, Injectable, Optional} from '@angular/core';\n\nimport {TranslateService} from '@ngx-translate/core';\nimport {Observable, combineLatest, mergeMap, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {MngCommonsService} from '../commons.service';\nimport {MngConfigurationService} from '../configuration.service';\nimport {MNG_COMMONS_INITIALIZER_IT} from '../tokens';\n\n@Injectable()\nexport class MngCommonsInitService {\n private isInitialized = false;\n\n constructor(\n private translate: TranslateService,\n private configurationService: MngConfigurationService,\n private mngCommons: MngCommonsService,\n @Inject(MNG_COMMONS_INITIALIZER_IT) @Optional() private readonly commonsInitializers: ReadonlyArray<() => Observable<unknown>>\n ) {}\n\n public initialize(): Observable<void> {\n if (this.isInitialized) {\n return of(void 0);\n }\n\n console.debug(`Initializing @mediusinc/mng-commons.`);\n\n return this.configurationService.loadJsonSources().pipe(\n mergeMap(() => {\n if (this.commonsInitializers) {\n console.debug(`Module initializers for @mediusinc/mng-commons.`);\n return combineLatest(this.commonsInitializers.map(ci => ci())).pipe(map(res => res));\n } else {\n return of(true);\n }\n }),\n map(() => this.mngCommons.reset())\n );\n\n this.isInitialized = true;\n }\n}\n","import {HttpClient} from '@angular/common/http';\n\nimport {Observable, combineLatest, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {MngModuleConfig} from '../../config/models';\nimport {MngConfigurationService} from '../configuration.service';\n\nexport const mngConfigurationServiceProvider = (httpClient: HttpClient, moduleConfig: MngModuleConfig): MngConfigurationService => {\n const service = MngConfigurationService.init(httpClient);\n if (moduleConfig?.configuration?.projectEnvironment) {\n service.addEnvironmentSource(moduleConfig.configuration.projectEnvironment);\n }\n return service;\n};\n\nexport function mngConfigJsonAppInitializerProvider(configService: MngConfigurationService, moduleConfig: MngModuleConfig): () => Observable<boolean> {\n return () => {\n if (moduleConfig?.configuration?.skipJsonSourceInit) {\n return of(false);\n } else {\n const jsonSource = moduleConfig?.configuration?.jsonSource;\n if (!jsonSource) {\n return configService.addJsonSource();\n } else if (Array.isArray(jsonSource)) {\n return combineLatest(jsonSource.map(source => configService.addJsonSource(source))).pipe(map(sourcesRes => sourcesRes.every(s => s)));\n } else {\n return configService.addJsonSource(jsonSource);\n }\n }\n };\n}\n","import {FormlyFieldConfig} from '@ngx-formly/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {Observable} from 'rxjs';\n\nimport {\n MngFormlyFieldAutocompleteComponent,\n MngFormlyFieldDropdownComponent,\n MngFormlyFieldFieldsetComponent,\n MngFormlyFieldInputComponent,\n MngFormlyFieldLabelComponent,\n MngFormlyFieldLookupDialogComponent,\n MngFormlyFieldTableDialogFormComponent,\n MngFormlyFieldTableDialogMultiselectComponent,\n MngFormlyFieldTabsComponent\n} from '../components/form/formly/fields';\nimport {MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent} from '../components/form/formly/wrappers';\n\nexport const formlyWrappersConfig = [\n {name: 'field', component: MngFormlyFieldWrapperComponent},\n {name: 'field-table', component: MngFormlyTableWrapperComponent}\n];\n\nexport const formlyTypesConfig: any[] = [\n {\n name: 'label',\n component: MngFormlyFieldLabelComponent,\n wrappers: ['field']\n },\n {\n name: 'input',\n component: MngFormlyFieldInputComponent,\n wrappers: ['field']\n },\n {name: 'string', extends: 'input'},\n {\n name: 'number',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'number'\n }\n }\n },\n {\n name: 'integer',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'number'\n }\n }\n },\n {\n name: 'textarea',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'textarea'\n }\n }\n },\n {\n name: 'switch',\n component: MngFormlyFieldInputComponent,\n defaultOptions: {\n templateOptions: {\n type: 'switch'\n }\n }\n },\n {\n name: 'radio',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'radio'\n }\n }\n },\n {\n name: 'datepicker',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'datepicker'\n }\n }\n },\n {\n name: 'mask',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'mask'\n }\n }\n },\n {\n name: 'dropdown',\n component: MngFormlyFieldDropdownComponent,\n wrappers: ['field']\n },\n {name: 'enum', extends: 'dropdown'},\n {\n name: 'autocomplete',\n component: MngFormlyFieldAutocompleteComponent,\n wrappers: ['field']\n },\n {\n name: 'dialog',\n component: MngFormlyFieldLookupDialogComponent,\n wrappers: ['field']\n },\n {\n name: 'table-dialog-multiselect',\n component: MngFormlyFieldTableDialogMultiselectComponent,\n wrappers: ['field-table']\n },\n {\n name: 'table-dialog-form',\n component: MngFormlyFieldTableDialogFormComponent,\n wrappers: ['field-table']\n },\n {\n name: 'tabs',\n component: MngFormlyFieldTabsComponent,\n wrappers: []\n },\n {\n name: 'fieldset',\n component: MngFormlyFieldFieldsetComponent,\n wrappers: []\n }\n];\n\nexport function getRequiredValidationMessage(translate: TranslateService): (error: any, field: FormlyFieldConfig) => Observable<string> {\n return (error: any, field: FormlyFieldConfig) => {\n const fieldLabel = field.templateOptions?.label || 'field';\n const fieldName = translate.instant(fieldLabel);\n return translate.instant('mngEditor.validation.required', {field: fieldName});\n };\n}\n\nexport function getMinLengthValidationMessage(translate: TranslateService): (error: any, field: FormlyFieldConfig) => Observable<string> | undefined {\n return (error: any, field: FormlyFieldConfig) => {\n const fieldLabel = field.templateOptions?.label || 'field';\n const fieldName = translate.instant(fieldLabel);\n return translate.instant('mngEditor.validation.minLength', {field: fieldName, minLength: field.templateOptions?.minLength});\n };\n}\n\nexport function getMaxLengthValidationMessage(translate: TranslateService): (error: any, field: FormlyFieldConfig) => Observable<string> | undefined {\n return (error: any, field: FormlyFieldConfig) => {\n const fieldLabel = field.templateOptions?.label || 'field';\n const fieldName = translate.instant(fieldLabel);\n return translate.instant('mngEditor.validation.maxLength', {field: fieldName, maxLength: field.templateOptions?.maxLength});\n };\n}\n\nexport function getTextPatternValidationMessage(translate: TranslateService): (error: any, field: FormlyFieldConfig) => Observable<string> | undefined {\n return (error: any, field: FormlyFieldConfig) => {\n const fieldLabel = field.templateOptions?.label || 'field';\n const fieldName = translate.instant(fieldLabel);\n return translate.instant('mngEditor.validation.pattern', {field: fieldName, pattern: field.templateOptions?.pattern});\n };\n}\n\nexport function getEmailValidationMessage(translate: TranslateService): (error: any, field: FormlyFieldConfig) => Observable<string> | undefined {\n return (error: any, field: FormlyFieldConfig) => {\n const fieldLabel = field.templateOptions?.label || 'field';\n const fieldName = translate.instant(fieldLabel);\n return translate.instant('mngEditor.validation.email', {field: fieldName});\n };\n}\n\nexport const getFormlyValidationMessages = (translate: TranslateService): any[] => {\n return [\n {name: 'required', message: getRequiredValidationMessage(translate)},\n {name: 'minLength', message: getMinLengthValidationMessage(translate)},\n {name: 'maxLength', message: getMaxLengthValidationMessage(translate)},\n {name: 'pattern', message: getTextPatternValidationMessage(translate)},\n {name: 'email', message: getEmailValidationMessage(translate)}\n ];\n};\n","import {ConfigOption} from '@ngx-formly/core';\nimport {TranslateService} from '@ngx-translate/core';\n\nimport {formlyTypesConfig, formlyWrappersConfig, getFormlyValidationMessages} from '../../config';\nimport {MngModuleConfig} from '../../config/models';\n\nexport function mngFormlyConfigProvider(translate: TranslateService, moduleConfig: MngModuleConfig = {}): ConfigOption {\n const merge = moduleConfig.formly?.merge ?? true;\n\n let types = formlyTypesConfig;\n if (moduleConfig.formly?.types) {\n if (!merge) {\n types = [];\n }\n types = [...types, ...moduleConfig.formly.types];\n }\n\n let wrappers = formlyWrappersConfig;\n if (moduleConfig.formly?.wrappers) {\n if (!merge) {\n wrappers = [];\n }\n wrappers = [...wrappers, ...moduleConfig.formly.wrappers];\n }\n\n let validationMessages = getFormlyValidationMessages(translate);\n if (typeof moduleConfig.formly?.getValidationMessages === 'function') {\n if (!merge) {\n validationMessages = [];\n }\n validationMessages = [...validationMessages, ...moduleConfig.formly.getValidationMessages(translate)];\n }\n\n return {\n types: types,\n wrappers: wrappers,\n validationMessages: validationMessages\n };\n}\n","import {CommonModule} from '@angular/common';\nimport {HttpClient, HttpClientModule} from '@angular/common/http';\nimport {APP_INITIALIZER, ModuleWithProviders, NgModule} from '@angular/core';\nimport {ReactiveFormsModule} from '@angular/forms';\nimport {RouterModule} from '@angular/router';\n\nimport {FORMLY_CONFIG, FormlyModule} from '@ngx-formly/core';\nimport {TranslateModule, TranslateService} from '@ngx-translate/core';\nimport {ConfirmationService, MessageService} from 'primeng/api';\nimport {AutoCompleteModule} from 'primeng/autocomplete';\nimport {BreadcrumbModule} from 'primeng/breadcrumb';\nimport {ButtonModule} from 'primeng/button';\nimport {CalendarModule} from 'primeng/calendar';\nimport {CardModule} from 'primeng/card';\nimport {CheckboxModule} from 'primeng/checkbox';\nimport {ChipModule} from 'primeng/chip';\nimport {ConfirmDialogModule} from 'primeng/confirmdialog';\nimport {ConfirmPopupModule} from 'primeng/confirmpopup';\nimport {DialogModule} from 'primeng/dialog';\nimport {DropdownModule} from 'primeng/dropdown';\nimport {DialogService, DynamicDialogModule} from 'primeng/dynamicdialog';\nimport {FieldsetModule} from 'primeng/fieldset';\nimport {FileUploadModule} from 'primeng/fileupload';\nimport {InputMaskModule} from 'primeng/inputmask';\nimport {InputNumberModule} from 'primeng/inputnumber';\nimport {InputSwitchModule} from 'primeng/inputswitch';\nimport {InputTextModule} from 'primeng/inputtext';\nimport {InputTextareaModule} from 'primeng/inputtextarea';\nimport {MessagesModule} from 'primeng/messages';\nimport {MultiSelectModule} from 'primeng/multiselect';\nimport {PaginatorModule} from 'primeng/paginator';\nimport {ProgressSpinnerModule} from 'primeng/progressspinner';\nimport {RadioButtonModule} from 'primeng/radiobutton';\nimport {RippleModule} from 'primeng/ripple';\nimport {SelectButtonModule} from 'primeng/selectbutton';\nimport {SkeletonModule} from 'primeng/skeleton';\nimport {TableModule} from 'primeng/table';\nimport {TabViewModule} from 'primeng/tabview';\nimport {TagModule} from 'primeng/tag';\nimport {ToastModule} from 'primeng/toast';\nimport {ToggleButtonModule} from 'primeng/togglebutton';\nimport {ToolbarModule} from 'primeng/toolbar';\nimport {TooltipModule} from 'primeng/tooltip';\n\nimport {ObjectSerializer} from './api/utils';\nimport {MngActionComponent, MngActionEditorComponent, MngActionRouteComponent} from './components/action';\nimport {MngAutocompleteComponent, MngDropdownComponent, MngFormEditorComponent} from './components/form';\nimport {\n MngFormlyFieldAutocompleteComponent,\n MngFormlyFieldDropdownComponent,\n MngFormlyFieldFieldsetComponent,\n MngFormlyFieldInputComponent,\n MngFormlyFieldLabelComponent,\n MngFormlyFieldLookupDialogComponent,\n MngFormlyFieldTableDialogFormComponent,\n MngFormlyFieldTableDialogMultiselectComponent,\n MngFormlyFieldTabsComponent\n} from './components/form/formly/fields';\nimport {MngFormlyFieldWrapperComponent, MngFormlyTableWrapperComponent} from './components/form/formly/wrappers';\nimport {MngBreadcrumbComponent, MngFooterComponent, MngMainLayoutComponent, MngMenuComponent, MngMenuItemComponent, MngTopbarComponent} from './components/layout';\nimport {MngMainLayoutComponentService} from './components/layout/services';\nimport {MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableviewComponent, MngTableviewRouteComponent} from './components/tableview';\nimport {MngModuleConfig} from './config/models';\nimport {MngComponentDirective, MngTemplateDirective} from './directives';\nimport {JsonPathPipe, MngBooleanPipe, MngEnumPipe, MngI18nPropertyPipe, MngLinkFormatterPipe} from './pipes';\nimport {\n DefaultMngErrorMapperService,\n MngActionExecutorService,\n MngCommonsService,\n MngConfigurationService,\n MngErrorMapperService,\n MngNavigationService,\n MngViewContainerComponentService\n} from './services';\nimport {MngCommonsInitService, mngCommonsInitializerProvider} from './services/internal';\nimport {mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider} from './services/providers';\nimport {ACTION_EDITOR_DIALOG_COMPONENT_SETTING, MNG_MODULE_CONFIG_IT} from './services/tokens';\n\n// primeng modules\nexport const primeNgModules = [\n AutoCompleteModule,\n BreadcrumbModule,\n ButtonModule,\n CalendarModule,\n CardModule,\n CheckboxModule,\n ChipModule,\n ConfirmDialogModule,\n ConfirmPopupModule,\n DialogModule,\n DynamicDialogModule,\n DropdownModule,\n FileUploadModule,\n InputNumberModule,\n InputMaskModule,\n InputSwitchModule,\n InputTextModule,\n InputTextareaModule,\n PaginatorModule,\n RadioButtonModule,\n RippleModule,\n SelectButtonModule,\n TableModule,\n TagModule,\n ToastModule,\n ToggleButtonModule,\n ToolbarModule,\n TooltipModule,\n MessagesModule,\n ProgressSpinnerModule,\n TabViewModule,\n FieldsetModule,\n MultiSelectModule,\n SkeletonModule\n];\n\nconst declarations = [\n // directives\n MngComponentDirective,\n MngTemplateDirective,\n\n // pipes\n JsonPathPipe,\n MngEnumPipe,\n MngBooleanPipe,\n MngI18nPropertyPipe,\n MngLinkFormatterPipe,\n\n // layout components\n MngBreadcrumbComponent,\n MngFooterComponent,\n MngMainLayoutComponent,\n MngMenuComponent,\n MngMenuItemComponent,\n MngTopbarComponent,\n\n // mng fields\n MngAutocompleteComponent,\n MngDropdownComponent,\n\n // formly wrappers\n MngFormlyFieldWrapperComponent,\n MngFormlyTableWrapperComponent,\n\n // formly fields\n MngFormlyFieldInputComponent,\n MngFormlyFieldLabelComponent,\n MngFormlyFieldDropdownComponent,\n MngFormlyFieldAutocompleteComponent,\n MngFormlyFieldLookupDialogComponent,\n MngFormlyFieldTableDialogMultiselectComponent,\n MngFormlyFieldTableDialogFormComponent,\n MngFormlyFieldTabsComponent,\n MngFormlyFieldFieldsetComponent,\n\n // table components\n MngTableComponent,\n MngTableviewComponent,\n MngTableColumnValueComponent,\n MngTableColumnFilterComponent,\n MngTableviewRouteComponent,\n\n // editor components\n MngFormEditorComponent,\n MngActionComponent,\n MngActionEditorComponent,\n MngActionRouteComponent\n];\n\n@NgModule({\n imports: [\n // angular modules\n CommonModule,\n RouterModule,\n HttpClientModule,\n ReactiveFormsModule,\n\n // other modules\n TranslateModule.forChild({\n extend: true\n }),\n FormlyModule.forChild(),\n ...primeNgModules\n ],\n declarations: [...declarations],\n exports: [...primeNgModules, ...declarations]\n})\nexport class MngCommonsModule {\n static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule> {\n return {\n ngModule: MngCommonsModule,\n providers: [\n // primeng services\n DialogService,\n MessageService,\n ConfirmationService,\n\n MngCommonsInitService,\n MngActionExecutorService,\n MngNavigationService,\n MngCommonsService,\n MngLinkFormatterPipe,\n\n // component service\n MngMainLayoutComponentService,\n MngViewContainerComponentService,\n\n {\n provide: MNG_MODULE_CONFIG_IT,\n useValue: config\n },\n {\n provide: ObjectSerializer,\n useFactory: () => ObjectSerializer.get()\n },\n {\n provide: MngConfigurationService,\n useFactory: mngConfigurationServiceProvider,\n deps: [HttpClient, MNG_MODULE_CONFIG_IT]\n },\n {\n provide: APP_INITIALIZER,\n useFactory: mngConfigJsonAppInitializerProvider,\n deps: [MngConfigurationService, MNG_MODULE_CONFIG_IT],\n multi: true\n },\n {\n provide: APP_INITIALIZER,\n useFactory: mngCommonsInitializerProvider,\n deps: [MngCommonsInitService],\n multi: true\n },\n {\n provide: FORMLY_CONFIG,\n multi: true,\n useFactory: mngFormlyConfigProvider,\n deps: [TranslateService, MNG_MODULE_CONFIG_IT]\n },\n {\n provide: ACTION_EDITOR_DIALOG_COMPONENT_SETTING,\n useValue: MngActionEditorComponent\n },\n {\n provide: MngErrorMapperService,\n useClass: DefaultMngErrorMapperService\n }\n ]\n };\n }\n}\n","import {HttpClient} from '@angular/common/http';\n\nimport {ClassType} from '../../types';\nimport {MediusQueryParam} from '../models';\nimport {ObjectSerializer} from '../utils';\n\nexport abstract class AMngBaseApiService {\n protected readonly objectSerializer: ObjectSerializer = ObjectSerializer.get();\n\n protected constructor(protected http: HttpClient) {}\n\n protected abstract getBasePath(): string;\n\n protected abstract getServiceBasePath(): string | null;\n\n protected getUrl(...pathSegments: Array<string>): string {\n let baseUrl = this.getBasePath();\n if (baseUrl.endsWith('/')) {\n baseUrl = baseUrl.substring(0, baseUrl.length - 1);\n }\n const serviceBasePath = this.getServiceBasePath();\n let path = [serviceBasePath, ...pathSegments].filter(s => s && s.length).join('/');\n // omit first and last '/'\n if (path.startsWith('/')) {\n path = path.substring(1);\n }\n if (path.endsWith('/')) {\n path = path.substring(0, path.length - 1);\n }\n // replace any double '//' from path that could come from joining paths\n path = path.replace('//', '/');\n return `${baseUrl}/${path}`;\n }\n\n protected serializeQueryParam(queryParam: MediusQueryParam, type = 'QueryParam') {\n return this.objectSerializer.serialize(queryParam, type);\n }\n\n protected deserializeQueryResult<QR>(item: any, qrType: ClassType<QR>): QR {\n return this.deserializeClass(item, qrType);\n }\n\n protected deserializeClass<C>(item: any, type: ClassType<C>): C {\n return this.objectSerializer.deserializeClass(item, type);\n }\n\n protected deserializeClassArray<C>(item: any, type: ClassType<C>): Array<C> {\n return this.objectSerializer.deserializeClassArray(item, type);\n }\n\n protected serializeClass<C>(item: C, type: ClassType<C>): any {\n return this.objectSerializer.serializeClass(item, type);\n }\n\n protected serializeClassArray<C>(item: Array<C>, type: ClassType<C>): any {\n return this.objectSerializer.serializeClassArray(item, type);\n }\n}\n\nexport abstract class AMngApiService<T> extends AMngBaseApiService {\n protected constructor(protected type: ClassType<T>, http: HttpClient) {\n super(http);\n }\n\n protected deserialize(item: any): T {\n return this.deserializeClass(item, this.type);\n }\n\n protected serialize(item: T): any {\n return this.serializeClass(item, this.type);\n }\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\n\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {ClassType} from '../../types';\nimport {MediusQueryParam, MediusQueryResult} from '../models';\nimport {AMngApiService} from './api.abstract.service';\n\nexport abstract class AMngGetAllApiService<T, QRT extends MediusQueryResult<any>> extends AMngApiService<T> {\n protected constructor(type: ClassType<T>, protected queryResultType: ClassType<QRT>, http: HttpClient) {\n super(type, http);\n }\n\n public getAllPost(queryParamBody?: MediusQueryParam, params?: HttpParams): Observable<QRT> {\n const url = this.getUrl(this.getGetAllPostPath());\n return this.http\n .post<any>(url, queryParamBody ? this.serializeQueryParam(queryParamBody) : undefined, {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n params: params\n })\n .pipe(map(res => this.deserializeQueryResult(res, this.queryResultType)));\n }\n\n protected getGetAllPostPath(): string {\n return '/get-all';\n }\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\n\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {ClassType, IdType} from '../../types';\nimport {MediusQueryResult} from '../models';\nimport {AMngGetAllApiService} from './get-all-api.abstract.service';\n\nexport interface IMngCrudApiService<T> {\n createPost?(item: T, params?: HttpParams): Observable<T>;\n\n getByIdGet?(id: IdType, params?: HttpParams): Observable<T>;\n\n updatePut?(id: IdType, item: T, params?: HttpParams): Observable<T>;\n\n removeDelete?(id: IdType, item?: T, params?: HttpParams): Observable<T | null>;\n}\n\nexport abstract class AMngCrudApiService<T, QRT extends MediusQueryResult<any>> extends AMngGetAllApiService<T, QRT> implements IMngCrudApiService<T> {\n protected constructor(type: ClassType<T>, queryResultType: ClassType<QRT>, http: HttpClient) {\n super(type, queryResultType, http);\n }\n\n public createPost(item: T, params?: HttpParams): Observable<T> {\n const url = this.getUrl(this.getCreatePostPath(item));\n return this.http\n .post<any>(url, this.serialize(item), {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n params: params\n })\n .pipe(map(res => this.deserialize(res)));\n }\n\n public getByIdGet(id: IdType, params?: HttpParams): Observable<T> {\n const url = this.getUrl(this.getGetByIdGetPath(id));\n return this.http\n .get<any>(url, {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n params: params\n })\n .pipe(map(res => this.deserialize(res)));\n }\n\n public updatePut(id: IdType, item: T, params?: HttpParams): Observable<T> {\n const url = this.getUrl(this.getUpdatePutPath(id, item));\n return this.http\n .put<any>(url, this.serialize(item), {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n params: params\n })\n .pipe(map(res => this.deserialize(res)));\n }\n\n public removeDelete(id: IdType, item?: T, params?: HttpParams): Observable<T | null> {\n const url = this.getUrl(this.getRemoveDeletePath(id, item));\n return this.http\n .request<any>('delete', url, {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n body: item ? this.serialize(item) : undefined,\n params: params\n })\n .pipe(map(res => (res ? this.deserialize(res) : null)));\n }\n\n protected getCreatePostPath(item: T): string {\n return '';\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected getUpdatePutPath(id: IdType, item: T): string {\n return `/${id}`;\n }\n\n protected getGetByIdGetPath(id: IdType): string {\n return `/${id}`;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected getRemoveDeletePath(id: IdType, item?: T) {\n return `/${id}`;\n }\n}\n","export class RouteUtil {\n public static removeEmptyPathSegments(path: Array<string>) {\n const filteredPath = path.filter(ps => typeof ps === 'string' && ps.length > 0);\n return filteredPath.length > 0 ? filteredPath : [''];\n }\n\n public static appendPathToBasePath(basePath: Array<string>, path: Array<string>) {\n if (path.length > 0) {\n if (path[0].startsWith('/')) {\n return path;\n } else if (path[0].startsWith('../')) {\n // TODO: process multi upper folder\n throw new Error('Not implemented');\n } else {\n return RouteUtil.removeEmptyPathSegments([...basePath, ...path]);\n }\n } else {\n return basePath;\n }\n }\n}\n","import {Type} from '@angular/core';\nimport {Data, LoadChildren, Route, Routes} from '@angular/router';\n\nimport {MngActionRouteComponent} from '../components/action';\nimport {MngMainLayoutComponent} from '../components/layout';\nimport {MngTableviewRouteComponent} from '../components/tableview';\nimport {ITableviewDataProvider} from '../data-providers';\nimport {ActionDescriptor, TableviewDescriptor} from '../descriptors';\nimport {MngMenuItem} from '../models';\nimport {RouteUtil} from '../utils/route.util';\nimport {BreadcrumbType, MngRouterData} from './models';\n\nexport class RoutesBuilder {\n private readonly layoutRoute?: RouteBuilder;\n private routes: Array<RouteBuilder> = [];\n private currentRoute?: RouteBuilder;\n\n private constructor(layoutRoute?: RouteBuilder) {\n this.layoutRoute = layoutRoute?.withRoot(this);\n this.currentRoute = layoutRoute;\n }\n\n public static create(): RoutesBuilder {\n return new RoutesBuilder();\n }\n\n public static createWithLayout(\n layoutComponent = MngMainLayoutComponent,\n topbarComponent?: Type<any>,\n breadcrumbComponent?: Type<any>,\n menuComponent?: Type<any>,\n footerComponent?: Type<any>\n ): RoutesBuilder {\n const layoutRoute = RouteBuilder.createLayoutRoute('', layoutComponent, topbarComponent, breadcrumbComponent, menuComponent, footerComponent);\n return new RoutesBuilder(layoutRoute);\n }\n\n public addAngularRoute(route: Route): this {\n return this.addRouteBuilder(RouteBuilder.createFromRoute(route));\n }\n\n public addRouteRedirect(path: string, redirectTo: string, pathMatch: 'full' | 'prefix' = 'prefix'): this {\n return this.addRouteBuilder(RouteBuilder.createRedirect(path, redirectTo, pathMatch));\n }\n\n public addLazyRoute(path: string, loadChildren: LoadChildren, canLoad?: Array<any>): this {\n return this.addRouteBuilder(RouteBuilder.createLazyRoute(path, loadChildren, canLoad));\n }\n\n public addRoute(path: string, component: Type<any>): this {\n return this.addRouteBuilder(RouteBuilder.create(path, component));\n }\n\n public addTableviewRoutes<T, S>(\n path: string,\n descriptor: TableviewDescriptor<T>,\n tableviewDataProvider: ITableviewDataProvider<T, S>,\n actions?: Array<ActionDescriptor<T>>,\n hasDetails = true,\n hasEdit = true,\n hasAdd = true\n ): this {\n return this.addRouteBuilder(RouteBuilder.createTableviewRoutes(path, descriptor, tableviewDataProvider, actions, hasDetails, hasEdit, hasAdd));\n }\n\n public addTableviewRoutesFromComponent(path: string, component: Type<any>, hasDetails = true, hasEdit = true, hasAdd = true): this {\n return this.addRouteBuilder(RouteBuilder.createTableviewRoutesFromComponent(path, component, hasDetails, hasEdit, hasAdd));\n }\n\n public addRouteBuilder(routeBuilder: RouteBuilder): this {\n this.currentRoute = routeBuilder.withRoot(this);\n this.routes.push(routeBuilder);\n return this;\n }\n\n public toRoute(): RouteBuilder {\n if (!this.currentRoute) {\n throw new Error('No routes were added!');\n }\n return this.currentRoute;\n }\n\n public buildRoutes(): Routes {\n let angularRoutes: Routes = [];\n for (const route of this.routes) {\n angularRoutes.push(route.buildRoute());\n }\n\n if (this.layoutRoute) {\n const layoutAngularRoute = this.layoutRoute.buildRoute();\n if (angularRoutes.length > 0) {\n layoutAngularRoute.children = angularRoutes;\n }\n angularRoutes = [layoutAngularRoute];\n }\n\n return angularRoutes;\n }\n\n public buildMenu(): Array<MngMenuItem> {\n const menuItems: Array<MngMenuItem> = [];\n for (const route of this.routes) {\n menuItems.push(...route.buildMenu());\n }\n return menuItems.flat();\n }\n}\n\nexport class RouteBuilder {\n private readonly route: Route;\n private routePath: Array<string> = [];\n private root?: RoutesBuilder;\n private parent?: RouteBuilder;\n private children: Array<RouteBuilder> = [];\n private menuItem?: MngMenuItem;\n private menuItemChildren: Array<MngMenuItem> = [];\n\n private breadcrumb?: BreadcrumbType;\n private pageTitle?: string;\n\n private constructor(route: Route) {\n if (!route.data) {\n route.data = {};\n }\n if (!route.data['breadcrumb']) {\n route.data['breadcrumb'] = null;\n }\n this.route = route;\n if (this.route.path && this.route.path.length > 0) {\n this.routePath = [this.route.path];\n }\n }\n\n public static create(path: string, component: Type<any>): RouteBuilder {\n return new RouteBuilder({\n path: path,\n component: component\n });\n }\n\n public static createRedirect(path: string, redirectTo: string, pathMatch: 'full' | 'prefix' = 'prefix'): RouteBuilder {\n return new RouteBuilder({\n path: path,\n redirectTo: redirectTo,\n pathMatch: pathMatch\n });\n }\n\n public static createLazyRoute(path: string, loadChildren: LoadChildren, canLoad?: Array<any>): RouteBuilder {\n const route: Route = {path: path, loadChildren: loadChildren};\n if (canLoad?.length) {\n route.canLoad = canLoad;\n }\n return new RouteBuilder(route);\n }\n\n public static createFromRoute(route: Route): RouteBuilder {\n return new RouteBuilder(route);\n }\n\n public static createLayoutRoute(\n path: string,\n layoutComponent = MngMainLayoutComponent,\n topbarComponent?: Type<any>,\n breadcrumbComponent?: Type<any>,\n menuComponent?: Type<any>,\n footerComponent?: Type<any>\n ): RouteBuilder {\n const layoutRoute = RouteBuilder.create(path, layoutComponent);\n if (topbarComponent || breadcrumbComponent || menuComponent || footerComponent) {\n const dataBuilder = RouteDataBuilder.create();\n if (topbarComponent) {\n dataBuilder.withTopbarComponent(topbarComponent);\n }\n if (breadcrumbComponent) {\n dataBuilder.withBreadcrumbComponent(breadcrumbComponent);\n }\n if (menuComponent) {\n dataBuilder.withMenuComponent(menuComponent);\n }\n if (footerComponent) {\n dataBuilder.withFooterComponent(footerComponent);\n }\n layoutRoute.withDataBuilder(dataBuilder);\n }\n return layoutRoute;\n }\n\n public static createTableviewRoutes<T, S>(\n path: string,\n descriptor: TableviewDescriptor<T>,\n dataProvider: ITableviewDataProvider<T, S>,\n actions?: Array<ActionDescriptor<T>>,\n hasDetails = true,\n hasEdit = true,\n hasAdd = true\n ): RouteBuilder {\n const tableviewRoute = RouteBuilder.createFromRoute({\n data: RouteDataBuilder.create().withTableview(descriptor, dataProvider, actions).build(),\n path: path,\n component: MngTableviewRouteComponent\n });\n RouteBuilder.addActionsSubroutesToTableviewParent(tableviewRoute, hasDetails, hasEdit, hasAdd);\n return tableviewRoute;\n }\n\n public static createTableviewRoutesFromComponent(path: string, component: Type<any>, hasDetails = true, hasEdit = true, hasAdd = true): RouteBuilder {\n const actionCrudRoute = RouteBuilder.create(path, component);\n RouteBuilder.addActionsSubroutesToTableviewParent(actionCrudRoute, hasDetails, hasEdit, hasAdd);\n return actionCrudRoute;\n }\n\n private static addActionsSubroutesToTableviewParent(parentRoute: RouteBuilder, hasDetails: boolean, hasEdit: boolean, hasAdd: boolean) {\n parentRoute.addChild('', MngActionRouteComponent);\n\n if (hasAdd) {\n parentRoute.addChild('add', MngActionRouteComponent);\n }\n if (hasDetails) {\n parentRoute.addChild(':itemId', MngActionRouteComponent);\n }\n if (hasEdit) {\n parentRoute.addChild(':itemId/edit', MngActionRouteComponent);\n }\n }\n\n withRoot(routesBuilder: RoutesBuilder): this {\n this.root = routesBuilder;\n return this;\n }\n\n withParent(parent: RouteBuilder): this {\n this.parent = parent;\n this.routePath = RouteUtil.removeEmptyPathSegments([...this.parent.routePath, this.route.path ?? '']);\n return this;\n }\n\n withBreadcrumb(breadcrumb: BreadcrumbType): this {\n this.breadcrumb = breadcrumb;\n this.route.data!['breadcrumb'] = breadcrumb;\n return this;\n }\n\n withPageTitle(pageTitle: string): this {\n this.pageTitle = pageTitle;\n this.route.data!['pageTitle'] = pageTitle;\n return this;\n }\n\n withRedirectTo(redirectTo: string): this {\n this.route.redirectTo = redirectTo;\n return this;\n }\n\n withPathMatch(pathMatch: 'full' | 'prefix'): this {\n this.route.pathMatch = pathMatch;\n return this;\n }\n\n withTitle(title: string): this {\n this.withPageTitle(title);\n this.withBreadcrumb(title);\n return this;\n }\n\n withCanActivate(diToken: any): this {\n if (!this.route.canActivate) {\n this.route.canActivate = [];\n }\n this.route.canActivate.push(diToken);\n return this;\n }\n\n withCanDeactivate(diToken: any): this {\n if (!this.route.canDeactivate) {\n this.route.canDeactivate = [];\n }\n this.route.canDeactivate.push(diToken);\n return this;\n }\n\n withResolver(diToken: any, name: string): this {\n if (!this.route.resolve) {\n this.route.resolve = {};\n }\n this.route.resolve[name] = diToken;\n return this;\n }\n\n withData(data: any): this {\n this.route.data = data;\n return this;\n }\n\n withDataBuilder(dataBuilder: RouteDataBuilder): this {\n this.route.data = dataBuilder.build();\n return this;\n }\n\n withMngMenuItem(menuItem: MngMenuItem): this {\n this.menuItem = menuItem;\n return this;\n }\n\n withMenuItem(icon?: string, label?: string, routerLink?: Array<string>): this {\n this.menuItem = this.createMenuItem(icon, label, routerLink);\n return this;\n }\n\n withMenuItemChild(label: string, icon?: string, routerLink?: Array<string>): this {\n this.menuItemChildren.push(this.createMenuItem(icon, label, routerLink));\n return this;\n }\n\n withMenuItemChildren(routesBuilder: RoutesBuilder): this {\n const menu = routesBuilder.buildMenu();\n this.adjustMenuRouterLinksFromBuilder(menu);\n this.menuItemChildren.push(...menu);\n return this;\n }\n\n public addChild(path: string, component: Type<any>): RouteBuilder {\n const childRouteBuilder = RouteBuilder.create(path, component);\n this.addChildBuilder(childRouteBuilder);\n return childRouteBuilder;\n }\n\n public addChildBuilder(routeBuilder: RouteBuilder): this {\n routeBuilder.withParent(this);\n if (this.root) {\n routeBuilder.withRoot(this.root);\n }\n this.children.push(routeBuilder);\n return this;\n }\n\n public addTableviewRoutes<T, S>(\n path: string,\n descriptor: TableviewDescriptor<T>,\n tableviewDataProvider: ITableviewDataProvider<T, S>,\n actions?: Array<ActionDescriptor<T>>,\n hasDetails = true,\n hasEdit = true,\n hasAdd = true\n ): RouteBuilder {\n const routeBuilder = RouteBuilder.createTableviewRoutes(path, descriptor, tableviewDataProvider, actions, hasDetails, hasEdit, hasAdd);\n this.addChildBuilder(routeBuilder);\n return routeBuilder;\n }\n\n public addTableviewRoutesFromComponent(path: string, component: Type<any>, hasDetails = true, hasEdit = true, hasAdd = true): RouteBuilder {\n const routeBuilder = RouteBuilder.createTableviewRoutesFromComponent(path, component, hasDetails, hasEdit, hasAdd);\n this.addChildBuilder(routeBuilder);\n return routeBuilder;\n }\n\n public toParent(): RouteBuilder {\n if (!this.parent) {\n throw new Error('Parent was not provided.');\n }\n return this.parent;\n }\n\n public toRoot(): RoutesBuilder {\n if (!this.root) {\n throw new Error('Root was not provided.');\n }\n return this.root;\n }\n\n public finish(): RoutesBuilder {\n return this.toRoot();\n }\n\n public buildRoute(): Route {\n const angularRoute: Route = {\n ...this.route\n };\n\n if ((this.route.children?.length ?? 0) > 0 || this.children.length > 0) {\n // route has children\n angularRoute.children = [];\n if (this.route.children?.length) {\n angularRoute.children.push(...this.route.children);\n }\n if (this.children.length) {\n for (const childRoute of this.children) {\n angularRoute.children.push(childRoute.buildRoute());\n }\n }\n }\n\n if (this.route.canActivate) {\n angularRoute.canActivate = [...this.route.canActivate];\n }\n if (this.route.canActivateChild) {\n angularRoute.canActivateChild = [...this.route.canActivateChild];\n }\n if (this.route.canLoad) {\n angularRoute.canLoad = [...this.route.canLoad];\n }\n if (this.route.canDeactivate) {\n angularRoute.canDeactivate = [...this.route.canDeactivate];\n }\n if (this.route.resolve) {\n angularRoute.resolve = {...this.route.resolve};\n }\n\n return angularRoute;\n }\n\n public buildMenu(): Array<MngMenuItem> {\n const menuItemBuild: MngMenuItem | null = this.menuItem ? {...this.menuItem} : null;\n const routeChildrenMenuItems: Array<MngMenuItem> = this.children.flatMap(child => child.buildMenu());\n const menuItemChildren: Array<MngMenuItem> = [];\n const menuItemChildrenBuild: Array<MngMenuItem> = [];\n\n if (menuItemBuild?.items) {\n menuItemChildrenBuild.push(...menuItemBuild.items);\n }\n\n for (const menuItemChild of this.menuItemChildren) {\n const finalMenuItemChild: MngMenuItem = {...menuItemChild};\n if (!finalMenuItemChild.routerLink) {\n finalMenuItemChild.routerLink = this.routePath;\n }\n if (typeof finalMenuItemChild.routerLink === 'string') {\n finalMenuItemChild.routerLink = [finalMenuItemChild.routerLink];\n }\n finalMenuItemChild.routerLink = RouteUtil.removeEmptyPathSegments(finalMenuItemChild.routerLink);\n menuItemChildren.push(finalMenuItemChild);\n }\n\n menuItemChildrenBuild.push(...menuItemChildren, ...routeChildrenMenuItems);\n\n if (!menuItemBuild) {\n return menuItemChildrenBuild;\n }\n\n menuItemBuild.label = menuItemBuild.label ?? this.pageTitle;\n if (typeof menuItemBuild.routerLink === 'string') {\n menuItemBuild.routerLink = [menuItemBuild.routerLink];\n }\n menuItemBuild.routerLink = RouteUtil.removeEmptyPathSegments(menuItemBuild.routerLink ?? this.routePath);\n if (menuItemChildrenBuild.length > 0) {\n menuItemBuild.items = menuItemChildrenBuild;\n }\n\n if (!menuItemBuild.guards) {\n const guards = this.findMenuItemGuards();\n if (guards.length > 0) {\n menuItemBuild.guards = guards;\n }\n }\n\n return [menuItemBuild];\n }\n\n private createMenuItem(icon?: string, label?: string, routerLink?: Array<string>) {\n const menuItem: MngMenuItem = {};\n if (icon) {\n menuItem.icon = icon;\n }\n if (label) {\n menuItem.label = label;\n }\n if (routerLink) {\n menuItem.routerLink = routerLink;\n }\n return menuItem;\n }\n\n private adjustMenuRouterLinksFromBuilder(menuItems: Array<MngMenuItem>) {\n for (const menuItem of menuItems) {\n if (menuItem.routerLink) {\n menuItem.routerLink = RouteUtil.appendPathToBasePath(this.routePath, typeof menuItem.routerLink === 'string' ? [menuItem.routerLink] : menuItem.routerLink);\n }\n if (Array.isArray(menuItem.items)) {\n this.adjustMenuRouterLinksFromBuilder(menuItem.items);\n }\n }\n }\n\n private findMenuItemGuards(): Array<any> {\n const guards: Array<any> = [];\n if (this.route.canActivate?.length) {\n guards.push(...this.route.canActivate);\n }\n if (this.parent) {\n // Check for parent guards that should be included in decision to hide menu item!\n // Some parent routes might have guards, but no menu items, so this guards must be taken into account here,\n // because there is no parent menu item to hide.\n this.parent.findMenuItemGuards().forEach(g => {\n if (guards.indexOf(g) < 0) {\n guards.push(g);\n }\n });\n }\n return guards;\n }\n}\n\nexport class RouteDataBuilder {\n private data: MngRouterData;\n\n constructor(init?: Data) {\n this.data = init ?? {};\n if (!this.data.breadcrumb) {\n this.data.breadcrumb = null;\n }\n }\n\n public static create(data?: Data) {\n return new RouteDataBuilder(data);\n }\n\n withBreadcrumb(breadcrumb: BreadcrumbType): this {\n this.data.breadcrumb = breadcrumb;\n return this;\n }\n\n withPageTitle(pageTitle: string): this {\n this.data.pageTitle = pageTitle;\n return this;\n }\n\n withTableview(descriptor: TableviewDescriptor<any>, dataProvider: ITableviewDataProvider<any, any>, actions?: Array<ActionDescriptor<any>>): this {\n this.data.tableview = {\n descriptor: descriptor,\n dataProvider: dataProvider\n };\n if (actions) {\n this.data.tableview.actions = actions;\n }\n return this;\n }\n\n withTopbarComponent(component: Type<any>): this {\n this.data.topbarComponent = component;\n return this;\n }\n\n withBreadcrumbComponent(component: Type<any>): this {\n this.data.breadcrumbComponent = component;\n return this;\n }\n\n withMenuComponent(component: Type<any>): this {\n this.data.menuComponent = component;\n return this;\n }\n\n withFooterComponent(component: Type<any>): this {\n this.data.footerComponent = component;\n return this;\n }\n\n build(): MngRouterData {\n return this.data;\n }\n}\n","/*\n * Public API Surface of mng-commons\n */\n\n// module\nexport * from './lib/mng-commons.module';\n\n// services\nexport * from './lib/api/services';\nexport * from './lib/components/layout/services';\nexport * from './lib/services';\nexport * from './lib/services/providers';\n\n// injection tokens\nexport * from './lib/services/tokens';\n\n// utils\nexport * from './lib/api/utils';\nexport * from './lib/utils';\n\n// components\nexport * from './lib/components/action';\nexport * from './lib/components/form';\nexport * from './lib/components/form/formly/fields';\nexport * from './lib/components/form/formly/wrappers';\nexport * from './lib/components/layout';\nexport * from './lib/components/tableview';\n\n// directives\nexport * from './lib/directives';\n\n// pipes\nexport * from './lib/pipes';\n\n// models&other\nexport * from './lib/api/models';\nexport * from './lib/components/action/models';\nexport * from './lib/components/form/models';\nexport * from './lib/components/tableview/models';\nexport * from './lib/config/models';\nexport * from './lib/config';\nexport * from './lib/data-providers';\nexport * from './lib/descriptors';\nexport * from './lib/models';\nexport * from './lib/router';\nexport * from './lib/router/models';\nexport * from './lib/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["mergeMap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAMa,sBAAsB;IACxB,OAAO,cAAc,CAAuC,GAAgC;QAC/F,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAC1E,IAAI,YAAY,CAAC,gBAAgB,CAAC,EAAE;YAChC,OAAO,gBAAgB,CAAC;SAC3B;QACD,MAAM,WAAW,GAAG,sBAAsB,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAClE,OAAO,YAAY,CAAC,WAAW,CAAC;cAC1B,WAAW;cACX,UAAU,CACN,oBACI,OAAA,IAAI,KAAK,CACL,4FAA4F,GAAG,CAAC,MAAM,CAAC,UAAU,KAAK,MAAA,GAAG,CAAC,MAAM,CAAC,KAAK,0CAAE,QAAQ,iBAAiB,MAAA,GAAG,CAAC,IAAI,0CAAE,MAAM,GAAG,CACvL,CAAA,EAAA,CACR,CAAC;KACX;IAEM,OAAO,eAAe,CAAuC,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