@stemy/ngx-utils 17.2.1 → 17.3.1

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 (29) hide show
  1. package/esm2022/ngx-utils/common-types.mjs +1 -1
  2. package/esm2022/ngx-utils/components/dropdown-box/dropdown-box.component.mjs +59 -0
  3. package/esm2022/ngx-utils/components/dynamic-table/dynamic-table.component.mjs +88 -35
  4. package/esm2022/ngx-utils/components/pagination-menu/pagination-menu.component.mjs +7 -28
  5. package/esm2022/ngx-utils/directives/async-method.base.mjs +5 -6
  6. package/esm2022/ngx-utils/directives/dropdown-content.directive.mjs +176 -0
  7. package/esm2022/ngx-utils/directives/dropdown-toggle.directive.mjs +46 -0
  8. package/esm2022/ngx-utils/directives/dropdown.directive.mjs +157 -0
  9. package/esm2022/ngx-utils/ngx-utils.imports.mjs +11 -1
  10. package/esm2022/ngx-utils/ngx-utils.module.mjs +42 -37
  11. package/esm2022/ngx-utils/pipes/includes.pipe.mjs +21 -0
  12. package/esm2022/ngx-utils/utils/misc.mjs +21 -0
  13. package/esm2022/public_api.mjs +7 -1
  14. package/fesm2022/stemy-ngx-utils.mjs +554 -64
  15. package/fesm2022/stemy-ngx-utils.mjs.map +1 -1
  16. package/ngx-utils/common-types.d.ts +3 -2
  17. package/ngx-utils/components/dropdown-box/dropdown-box.component.d.ts +56 -0
  18. package/ngx-utils/components/dynamic-table/dynamic-table.component.d.ts +31 -12
  19. package/ngx-utils/components/pagination-menu/pagination-menu.component.d.ts +1 -8
  20. package/ngx-utils/directives/async-method.base.d.ts +1 -1
  21. package/ngx-utils/directives/dropdown-content.directive.d.ts +25 -0
  22. package/ngx-utils/directives/dropdown-toggle.directive.d.ts +16 -0
  23. package/ngx-utils/directives/dropdown.directive.d.ts +57 -0
  24. package/ngx-utils/ngx-utils.imports.d.ts +9 -4
  25. package/ngx-utils/ngx-utils.module.d.ts +42 -37
  26. package/ngx-utils/pipes/includes.pipe.d.ts +8 -0
  27. package/ngx-utils/utils/misc.d.ts +1 -0
  28. package/package.json +2 -1
  29. package/public_api.d.ts +7 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, PLATFORM_ID, Inject, Injectable, Optional, Injector, EventEmitter, isDevMode, ErrorHandler, NgZone, Pipe, HostListener, HostBinding, Output, Input, Directive, ViewChild, ContentChildren, Component, ContentChild, APP_INITIALIZER, makeEnvironmentProviders, NgModule } from '@angular/core';
2
+ import { InjectionToken, PLATFORM_ID, Inject, Injectable, Optional, Injector, EventEmitter, isDevMode, ErrorHandler, NgZone, Pipe, HostListener, HostBinding, Output, Input, Directive, ElementRef, ViewChild, ContentChildren, Component, ViewEncapsulation, ContentChild, APP_INITIALIZER, makeEnvironmentProviders, NgModule } from '@angular/core';
3
3
  import 'reflect-metadata';
4
4
  import * as i2 from '@angular/router';
5
5
  import { ActivatedRouteSnapshot, Scroll, NavigationEnd, DefaultUrlSerializer, UrlTree, UrlSegmentGroup, UrlSegment, UrlSerializer } from '@angular/router';
@@ -17,6 +17,7 @@ import JSON5 from 'json5';
17
17
  import * as i1$2 from '@angular/platform-browser';
18
18
  import { ɵDomEventsPlugin as _DomEventsPlugin, EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';
19
19
  import elementResizeDetectorMaker from 'element-resize-detector';
20
+ import { arrow, autoPlacement, autoUpdate, computePosition } from '@floating-ui/dom';
20
21
  import * as i2$1 from '@angular/forms';
21
22
  import { FormsModule } from '@angular/forms';
22
23
 
@@ -1946,6 +1947,27 @@ class MathUtils {
1946
1947
  }
1947
1948
  }
1948
1949
 
1950
+ function getCssVariables(elem) {
1951
+ if ("computedStyleMap" in elem) {
1952
+ const styles = Array.from(elem.computedStyleMap());
1953
+ return styles.reduce((res, [prop, val]) => {
1954
+ if (prop.startsWith("--")) {
1955
+ res[prop] = val.toString();
1956
+ }
1957
+ return res;
1958
+ }, {});
1959
+ }
1960
+ const res = {};
1961
+ const styles = getComputedStyle(elem);
1962
+ for (let i = 0; i < styles.length; i++) {
1963
+ const propertyName = styles[i];
1964
+ if (propertyName.startsWith("--")) {
1965
+ res[propertyName] = styles.getPropertyValue(propertyName);
1966
+ }
1967
+ }
1968
+ return res;
1969
+ }
1970
+
1949
1971
  class TimerUtils {
1950
1972
  static createTimeout(func, time) {
1951
1973
  // @dynamic
@@ -3879,11 +3901,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3879
3901
  }]
3880
3902
  }] });
3881
3903
 
3882
- function defaultFilter$1() {
3904
+ function defaultFilter$2() {
3883
3905
  return true;
3884
3906
  }
3885
3907
  class FilterPipe {
3886
- transform(values, filter = defaultFilter$1, params = {}) {
3908
+ transform(values, filter = defaultFilter$2, params = {}) {
3887
3909
  const isObject = ObjectUtils.isObject(values);
3888
3910
  if (!isObject && !ObjectUtils.isArray(values))
3889
3911
  return [];
@@ -3913,11 +3935,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3913
3935
  }]
3914
3936
  }] });
3915
3937
 
3916
- function defaultFilter() {
3938
+ function defaultFilter$1() {
3917
3939
  return true;
3918
3940
  }
3919
3941
  class FindPipe {
3920
- transform(values, filter = defaultFilter, params) {
3942
+ transform(values, filter = defaultFilter$1, params) {
3921
3943
  if (!ObjectUtils.isArray(values))
3922
3944
  return [];
3923
3945
  params = params || {};
@@ -4057,6 +4079,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
4057
4079
  }]
4058
4080
  }] });
4059
4081
 
4082
+ function defaultFilter() {
4083
+ return true;
4084
+ }
4085
+ class IncludesPipe {
4086
+ transform(array, ...values) {
4087
+ return ObjectUtils.isArray(array) && values.some(v => array.includes(v));
4088
+ }
4089
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: IncludesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4090
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: IncludesPipe, name: "includes" }); }
4091
+ }
4092
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: IncludesPipe, decorators: [{
4093
+ type: Pipe,
4094
+ args: [{
4095
+ standalone: false,
4096
+ name: "includes"
4097
+ }]
4098
+ }] });
4099
+
4060
4100
  class IsTypePipe {
4061
4101
  transform(value, type) {
4062
4102
  return (typeof value) === type;
@@ -4477,13 +4517,11 @@ class AsyncMethodBase {
4477
4517
  this.cdr.detectChanges();
4478
4518
  }
4479
4519
  click(ev) {
4480
- if (ev) {
4481
- ev.preventDefault();
4482
- ev.stopPropagation();
4483
- }
4520
+ ev?.preventDefault();
4484
4521
  if (this.disabled)
4485
- return;
4522
+ return true;
4486
4523
  this.callMethod();
4524
+ return true;
4487
4525
  }
4488
4526
  callMethod() {
4489
4527
  if (this.loading)
@@ -4520,6 +4558,7 @@ class AsyncMethodBase {
4520
4558
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AsyncMethodBase, decorators: [{
4521
4559
  type: Directive,
4522
4560
  args: [{
4561
+ standalone: false,
4523
4562
  selector: "[__asmb__]"
4524
4563
  }]
4525
4564
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -4606,6 +4645,369 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
4606
4645
  type: Input
4607
4646
  }] } });
4608
4647
 
4648
+ class DropdownDirective {
4649
+ static { this.active = null; }
4650
+ get nativeElement() {
4651
+ return this.element.nativeElement;
4652
+ }
4653
+ get isOpened() {
4654
+ return this.opened;
4655
+ }
4656
+ get getDisabled() {
4657
+ return this.disabled;
4658
+ }
4659
+ set isDisabled(value) {
4660
+ this.disabled = value;
4661
+ if (!value)
4662
+ return;
4663
+ this.hide();
4664
+ }
4665
+ constructor(element) {
4666
+ this.element = element;
4667
+ this.opened = false;
4668
+ this.disabled = false;
4669
+ this.closeInside = true;
4670
+ this.attachTo = null;
4671
+ this.mobileViewUnder = 0;
4672
+ this.keyboardHandler = true;
4673
+ this.onShown = new EventEmitter();
4674
+ this.onHidden = new EventEmitter();
4675
+ this.onKeyboard = new EventEmitter();
4676
+ this.onClick = (event) => {
4677
+ // We don't care about clicks with right/center mouse buttons
4678
+ if (event.button)
4679
+ return;
4680
+ const target = (event.composedPath()?.shift() || event.target);
4681
+ // If blocked closing inside we only consider inside if the target is not directly the contentElement
4682
+ // We only have a contentElement in case when we are using *dropdownContent directive
4683
+ if (!this.closeInside && (!this.contentElement || target !== this.contentElement)) {
4684
+ // Try to determine if we are inside by collecting the possible parent elements to check
4685
+ const parents = !this.contentElement ? [] : Array.from(this.contentElement.childNodes);
4686
+ if (this.nativeElement) {
4687
+ parents.push(this.nativeElement);
4688
+ }
4689
+ // If one of the parents contains the target then we clicked inside
4690
+ if (parents.some(child => child.contains(target)))
4691
+ return;
4692
+ }
4693
+ setTimeout(() => this.hide(), event.type == "touchend" ? 250 : 100);
4694
+ };
4695
+ this.onKeyDown = (event) => {
4696
+ const input = event.target;
4697
+ const notInput = input && input.tagName !== "INPUT" && input.tagName !== "TEXTAREA";
4698
+ if ("Tab" === event.key || !input || notInput) {
4699
+ event.stopPropagation();
4700
+ event.preventDefault();
4701
+ }
4702
+ if ("Esc" === event.key || "Escape" === event.key) {
4703
+ this.hide();
4704
+ return;
4705
+ }
4706
+ this.onKeyboard.emit(event);
4707
+ };
4708
+ }
4709
+ ngOnDestroy() {
4710
+ if (DropdownDirective.active === this) {
4711
+ DropdownDirective.active = null;
4712
+ this.onHidden.emit(this);
4713
+ }
4714
+ }
4715
+ showEvent() {
4716
+ this.onShown.emit(this);
4717
+ }
4718
+ hideEvent() {
4719
+ this.onHidden.emit(this);
4720
+ }
4721
+ show($event) {
4722
+ if (this.opened)
4723
+ return;
4724
+ if ($event) {
4725
+ if (!this.keyboardHandler)
4726
+ return true;
4727
+ $event.preventDefault();
4728
+ }
4729
+ if (this.disabled)
4730
+ return true;
4731
+ this.opened = true;
4732
+ this.showEvent();
4733
+ DropdownDirective.active = this;
4734
+ // Prevent toggle from selecting an item right after it is shown
4735
+ setTimeout(() => {
4736
+ if (!this.opened)
4737
+ return;
4738
+ document.addEventListener("click", this.onClick);
4739
+ document.addEventListener("keydown", this.onKeyDown);
4740
+ }, 10);
4741
+ return true;
4742
+ }
4743
+ hide() {
4744
+ if (!this.opened)
4745
+ return true;
4746
+ this.opened = false;
4747
+ this.hideEvent();
4748
+ document.removeEventListener("click", this.onClick);
4749
+ document.removeEventListener("keydown", this.onKeyDown);
4750
+ // Prevent toggle from refocus itself after it is hidden because of another toggle
4751
+ setTimeout(() => {
4752
+ if (DropdownDirective.active === this) {
4753
+ DropdownDirective.active = null;
4754
+ this.nativeElement?.focus();
4755
+ }
4756
+ }, 10);
4757
+ return true;
4758
+ }
4759
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
4760
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: DropdownDirective, selector: "[dd],[drop-down]", inputs: { closeInside: "closeInside", attachTo: "attachTo", placement: "placement", autoPlacement: "autoPlacement", mobileViewUnder: "mobileViewUnder", keyboardHandler: "keyboardHandler", isDisabled: "isDisabled" }, outputs: { onShown: "onShown", onHidden: "onHidden", onKeyboard: "onKeyboard" }, host: { listeners: { "keydown.enter": "show($event)", "keydown.space": "show($event)" }, properties: { "class.open": "this.isOpened", "class.disabled": "this.getDisabled" } }, exportAs: ["dropdown"], ngImport: i0 }); }
4761
+ }
4762
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownDirective, decorators: [{
4763
+ type: Directive,
4764
+ args: [{
4765
+ standalone: false,
4766
+ selector: "[dd],[drop-down]",
4767
+ exportAs: "dropdown"
4768
+ }]
4769
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { closeInside: [{
4770
+ type: Input
4771
+ }], attachTo: [{
4772
+ type: Input
4773
+ }], placement: [{
4774
+ type: Input
4775
+ }], autoPlacement: [{
4776
+ type: Input
4777
+ }], mobileViewUnder: [{
4778
+ type: Input
4779
+ }], keyboardHandler: [{
4780
+ type: Input
4781
+ }], onShown: [{
4782
+ type: Output
4783
+ }], onHidden: [{
4784
+ type: Output
4785
+ }], onKeyboard: [{
4786
+ type: Output
4787
+ }], isOpened: [{
4788
+ type: HostBinding,
4789
+ args: ["class.open"]
4790
+ }], getDisabled: [{
4791
+ type: HostBinding,
4792
+ args: ["class.disabled"]
4793
+ }], isDisabled: [{
4794
+ type: Input
4795
+ }], show: [{
4796
+ type: HostListener,
4797
+ args: ["keydown.enter", ["$event"]]
4798
+ }, {
4799
+ type: HostListener,
4800
+ args: ["keydown.space", ["$event"]]
4801
+ }] } });
4802
+
4803
+ const rectProps = ["x", "y", "width", "height"];
4804
+ class DropdownContentDirective {
4805
+ constructor(vcr, rootElem, dropdown, templateRef) {
4806
+ this.vcr = vcr;
4807
+ this.rootElem = rootElem;
4808
+ this.dropdown = dropdown;
4809
+ this.templateRef = templateRef;
4810
+ if (!this.dropdown) {
4811
+ throw new Error("DropdownDirective is required! Please use it inside a dd, drop-down directive attribute");
4812
+ }
4813
+ if (!this.templateRef) {
4814
+ throw new Error("TemplateRef is required! Please use with *dropdownContent");
4815
+ }
4816
+ this.lastPlacement = null;
4817
+ }
4818
+ ngOnInit() {
4819
+ this.subscription = ObservableUtils.multiSubscription(this.dropdown.onShown.subscribe(() => this.createView()), this.dropdown.onHidden.subscribe(() => this.destroyView()));
4820
+ }
4821
+ ngOnDestroy() {
4822
+ // this.observer?.unobserve(this.element.nativeElement);
4823
+ this.subscription?.unsubscribe();
4824
+ this.destroyView();
4825
+ }
4826
+ createView(init = false) {
4827
+ const mobileWidth = this.dropdown.mobileViewUnder || 0;
4828
+ const ref = this.dropdown.nativeElement;
4829
+ const [content, arrowEl] = this.createWrapper();
4830
+ this.dropdown.contentElement = content;
4831
+ // Set up floating UI positioning settings
4832
+ const placement = this.dropdown.placement || "bottom";
4833
+ const strategy = this.attachOutside ? "fixed" : "absolute";
4834
+ const middleware = [
4835
+ arrow({ element: arrowEl })
4836
+ ];
4837
+ if (this.dropdown.autoPlacement) {
4838
+ middleware.push(autoPlacement(this.dropdown.autoPlacement));
4839
+ }
4840
+ // Set up floating UI auto update
4841
+ this.cleanUp = autoUpdate(ref, content, () => {
4842
+ computePosition(ref, content, {
4843
+ strategy,
4844
+ placement,
4845
+ middleware
4846
+ }).then(({ x, y, placement, middlewareData }) => {
4847
+ if (middlewareData.arrow) {
4848
+ const { x, y } = middlewareData.arrow;
4849
+ Object.assign(arrowEl.style, {
4850
+ left: x != null ? `${x}px` : ``,
4851
+ top: y != null ? `${y}px` : ``,
4852
+ });
4853
+ }
4854
+ const isMobileView = window.innerWidth <= mobileWidth;
4855
+ Object.assign(content.style, {
4856
+ opacity: init ? "0" : "1",
4857
+ position: isMobileView ? "fixed" : strategy,
4858
+ left: isMobileView ? `0px` : `${x}px`,
4859
+ right: isMobileView ? `0px` : undefined,
4860
+ top: isMobileView ? `0px` : `${y}px`,
4861
+ bottom: isMobileView ? `0px` : undefined,
4862
+ zIndex: `var(--dd-z-index, 100)`
4863
+ });
4864
+ const refRect = ref.getBoundingClientRect();
4865
+ const contentRect = content.getBoundingClientRect();
4866
+ const lastPlacement = this.lastPlacement;
4867
+ const newPlacement = `dropdown-placement-${placement}`;
4868
+ if (lastPlacement) {
4869
+ ref.classList.replace(lastPlacement, newPlacement);
4870
+ content.classList.replace(lastPlacement, newPlacement);
4871
+ }
4872
+ else {
4873
+ ref.classList.add(newPlacement);
4874
+ content.classList.add(newPlacement);
4875
+ }
4876
+ if (isMobileView) {
4877
+ content.classList.add(`dropdown-content-mobile`);
4878
+ }
4879
+ else {
4880
+ content.classList.remove(`dropdown-content-mobile`);
4881
+ }
4882
+ rectProps.forEach(prop => {
4883
+ content.style.setProperty(`--toggle-${prop}`, `${refRect[prop]}px`);
4884
+ ref.style.setProperty(`--content-${prop}`, `${contentRect[prop]}px`);
4885
+ });
4886
+ this.lastPlacement = newPlacement;
4887
+ });
4888
+ });
4889
+ }
4890
+ destroyView() {
4891
+ this.vcr.clear();
4892
+ this.dropdown.contentElement?.remove();
4893
+ this.cleanUp?.();
4894
+ }
4895
+ whereToAttach() {
4896
+ const target = this.dropdown.attachTo;
4897
+ if (target === "root" && this.rootElem) {
4898
+ return this.rootElem;
4899
+ }
4900
+ if (target instanceof ElementRef) {
4901
+ return target.nativeElement;
4902
+ }
4903
+ if (target instanceof HTMLElement) {
4904
+ return target;
4905
+ }
4906
+ const anchor = this.vcr.element.nativeElement;
4907
+ return anchor?.parentElement || this.rootElem;
4908
+ }
4909
+ createWrapper() {
4910
+ const wrapper = document.createElement("div");
4911
+ const arrow = document.createElement("div");
4912
+ arrow.classList.add(`dropdown-content-arrow`);
4913
+ const ref = this.vcr.createEmbeddedView(this.templateRef);
4914
+ ref.rootNodes.forEach(node => wrapper.appendChild(node));
4915
+ this.attachTo = this.whereToAttach();
4916
+ this.attachTo.appendChild(wrapper);
4917
+ this.attachOutside = !this.dropdown.nativeElement?.contains(this.attachTo);
4918
+ if (this.attachOutside) {
4919
+ const referenceStyles = getCssVariables(this.dropdown.nativeElement);
4920
+ const wrapperStyles = getCssVariables(wrapper);
4921
+ Object.keys(referenceStyles).forEach(key => {
4922
+ if (!wrapperStyles[key]) {
4923
+ wrapper.style.setProperty(key, referenceStyles[key]);
4924
+ }
4925
+ });
4926
+ }
4927
+ const autoPlacement = this.dropdown.autoPlacement;
4928
+ if (this.lastPlacement) {
4929
+ wrapper.classList.add(this.lastPlacement);
4930
+ }
4931
+ if (autoPlacement) {
4932
+ const vertical = autoPlacement.allowedPlacements.some(p => p.includes("top") || p.includes("bottom"));
4933
+ const horizontal = autoPlacement.allowedPlacements.some(p => p.includes("left") || p.includes("right"));
4934
+ if (vertical && horizontal) {
4935
+ wrapper.classList.add(`dropdown-content-axis-both`);
4936
+ }
4937
+ else {
4938
+ const axis = vertical ? "vertical" : "horizontal";
4939
+ wrapper.classList.add(`dropdown-content-axis-${axis}`);
4940
+ }
4941
+ }
4942
+ wrapper.classList.add("dropdown-content-wrap");
4943
+ wrapper.appendChild(arrow);
4944
+ return [wrapper, arrow];
4945
+ }
4946
+ initialize() {
4947
+ this.createView(true);
4948
+ setTimeout(() => this.destroyView());
4949
+ }
4950
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownContentDirective, deps: [{ token: i0.ViewContainerRef }, { token: ROOT_ELEMENT, optional: true }, { token: DropdownDirective, optional: true }, { token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
4951
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: DropdownContentDirective, selector: "[dropdownContent]", exportAs: ["dropdown-content"], ngImport: i0 }); }
4952
+ }
4953
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownContentDirective, decorators: [{
4954
+ type: Directive,
4955
+ args: [{
4956
+ standalone: false,
4957
+ selector: "[dropdownContent]",
4958
+ exportAs: "dropdown-content",
4959
+ }]
4960
+ }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: HTMLElement, decorators: [{
4961
+ type: Optional
4962
+ }, {
4963
+ type: Inject,
4964
+ args: [ROOT_ELEMENT]
4965
+ }] }, { type: DropdownDirective, decorators: [{
4966
+ type: Optional
4967
+ }] }, { type: i0.TemplateRef, decorators: [{
4968
+ type: Optional
4969
+ }] }] });
4970
+
4971
+ class DropdownToggleDirective extends AsyncMethodBase {
4972
+ constructor(element, dropdown, toaster, cdr) {
4973
+ super(toaster, cdr);
4974
+ this.element = element;
4975
+ this.dropdown = dropdown;
4976
+ this.switch = true;
4977
+ }
4978
+ getMethod() {
4979
+ return this.beforeOpen;
4980
+ }
4981
+ callMethod() {
4982
+ if (this.dropdown.isOpened) {
4983
+ if (!this.switch)
4984
+ return true;
4985
+ this.dropdown.hide();
4986
+ }
4987
+ else if (!super.callMethod()) {
4988
+ this.dropdown.show();
4989
+ }
4990
+ return true;
4991
+ }
4992
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownToggleDirective, deps: [{ token: i0.ElementRef }, { token: DropdownDirective }, { token: TOASTER_SERVICE }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
4993
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: DropdownToggleDirective, selector: "[dropdownToggle]", inputs: { beforeOpen: "beforeOpen", switch: "switch" }, exportAs: ["dropdown-toggle"], usesInheritance: true, ngImport: i0 }); }
4994
+ }
4995
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownToggleDirective, decorators: [{
4996
+ type: Directive,
4997
+ args: [{
4998
+ standalone: false,
4999
+ selector: "[dropdownToggle]",
5000
+ exportAs: "dropdown-toggle",
5001
+ }]
5002
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: DropdownDirective }, { type: undefined, decorators: [{
5003
+ type: Inject,
5004
+ args: [TOASTER_SERVICE]
5005
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { beforeOpen: [{
5006
+ type: Input
5007
+ }], switch: [{
5008
+ type: Input
5009
+ }] } });
5010
+
4609
5011
  class DynamicTableTemplateDirective {
4610
5012
  constructor(ref) {
4611
5013
  this.ref = ref;
@@ -5182,6 +5584,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
5182
5584
  args: ["defaultItemTemplate"]
5183
5585
  }] } });
5184
5586
 
5587
+ class DropdownBoxComponent {
5588
+ constructor() {
5589
+ this.closeInside = true;
5590
+ this.attachTo = "root";
5591
+ this.placement = "bottom";
5592
+ this.crossAxis = false;
5593
+ this.autoAlignment = true;
5594
+ this.allowedPlacements = ["top", "bottom"];
5595
+ this.componentClass = "drop";
5596
+ this.makeAutoPlacementOpts();
5597
+ }
5598
+ makeAutoPlacementOpts() {
5599
+ this.autoPlacement = {
5600
+ crossAxis: this.crossAxis,
5601
+ alignment: this.alignment,
5602
+ autoAlignment: this.autoAlignment,
5603
+ allowedPlacements: this.allowedPlacements,
5604
+ };
5605
+ }
5606
+ ngAfterViewInit() {
5607
+ this.content.initialize();
5608
+ }
5609
+ ngOnChanges() {
5610
+ this.makeAutoPlacementOpts();
5611
+ }
5612
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5613
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DropdownBoxComponent, selector: "dropdown-box", inputs: { closeInside: "closeInside", attachTo: "attachTo", placement: "placement", crossAxis: "crossAxis", alignment: "alignment", autoAlignment: "autoAlignment", allowedPlacements: "allowedPlacements", componentClass: "componentClass" }, viewQueries: [{ propertyName: "content", first: true, predicate: DropdownContentDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div dd class=\"dropdown-box\"\n [ngClass]=\"componentClass\"\n [closeInside]=\"closeInside\"\n [attachTo]=\"attachTo\"\n [placement]=\"placement\"\n [autoPlacement]=\"autoPlacement\">\n <div class=\"dropdown-box-toggle\" dropdownToggle>\n <a class=\"dropdown-box-toggle-link\">\n <ng-content select=\"[toggle-content]\"></ng-content>\n </a>\n </div>\n <div class=\"dropdown-box-content\" [ngClass]=\"componentClass + '-content-wrapper'\" *dropdownContent>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".dropdown-box{--dd-border-size: var(--border-size, 1px);--dd-border-radius: 5px;--dd-top-border-radius: var(--dd-border-radius) var(--dd-border-radius) 0 0;--dd-bottom-border-radius: 0 0 var(--dd-border-radius) var(--dd-border-radius);--dd-bg-color: var(--bg-color, #ffffff);--dd-border-color: var(--border-color, #ced4da);--dd-highlight-color: var(--highlight-color, var(--primary-color, #888888));--dd-highlight-text-color: var(--highlight-text-color, #ffffff);--dd-text-color: var(--text-color, #151515);--dd-arrow-size: var(--arrow-size, 6px);--dd-arrow-space: calc(var(--dd-arrow-size) * .5 + 1px);--dd-arrow-color: currentColor;--dd-arrow-rotation: 90;position:relative;z-index:2;display:inline-block;width:var(--content-width, 0);min-width:fit-content}.dropdown-box *{box-sizing:border-box}.dropdown-box a,.dropdown-box span{white-space:nowrap}.dropdown-box.table-sort-dropdown{display:none}.dropdown-box.table-sort-dropdown .table-toggle:hover,.dropdown-box li:hover,.dropdown-box li.active{background-color:var(--dd-highlight-color);color:var(--dd-highlight-text-color)}.dropdown-box.open{--dd-arrow-rotation: -90}.dropdown-box.open .dropdown-box-toggle{border-radius:var(--dd-top-border-radius)}.dropdown-box-toggle{min-width:fit-content;background:var(--dd-bg-color);color:var(--dd-text-color);cursor:pointer;border:var(--dd-border-size) solid var(--dd-border-color);border-radius:5px;padding:6px 12px;-webkit-user-select:none;user-select:none;font-weight:400;font-size:var(--table-input-font-size, 15px);line-height:var(--table-input-line-height, 18px);outline:none}.dropdown-box-toggle .toggle-placeholder{color:#495057}.dropdown-box-toggle a.dropdown-box-toggle-link{margin-right:calc(2 * var(--dd-arrow-size));padding-right:5px;min-width:fit-content;position:relative;display:block}.dropdown-box-toggle a.dropdown-box-toggle-link:after{content:\"\";position:absolute;left:calc(100% + var(--dd-arrow-size));top:calc(50% - var(--dd-arrow-size));border-top:var(--dd-arrow-size) solid transparent;border-bottom:var(--dd-arrow-size) solid transparent;border-left:var(--dd-arrow-size) solid var(--dd-arrow-color);transform:rotate(calc(var(--dd-arrow-rotation) * 1deg));transition:.2s ease}.dropdown-box-content{position:relative;z-index:1;min-width:var(--toggle-width, 0)}.dropdown-box-content *{box-sizing:border-box}.dropdown-box-content ul{margin:0;padding:0;list-style:none;border:var(--dd-border-size) solid var(--dd-border-color);border-top-width:0;z-index:1;background:var(--dd-bg-color);border-radius:var(--dd-bottom-border-radius);overflow:hidden;min-width:fit-content}.dropdown-box-content li{color:var(--dd-text-color);font-weight:400;text-align:left;min-width:fit-content;cursor:pointer;padding:6px 12px;-webkit-user-select:none;user-select:none}.dropdown-box-content li:hover,.dropdown-box-content li.active{background-color:var(--dd-highlight-color);color:var(--dd-highlight-text-color)}.dropdown-placement-top.open .dropdown-box-toggle{border-radius:var(--dd-bottom-border-radius)}.dropdown-placement-top .dropdown-box-content ul{border-top-width:var(--dd-border-size);border-bottom-width:0;border-radius:var(--dd-top-border-radius)}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: DropdownDirective, selector: "[dd],[drop-down]", inputs: ["closeInside", "attachTo", "placement", "autoPlacement", "mobileViewUnder", "keyboardHandler", "isDisabled"], outputs: ["onShown", "onHidden", "onKeyboard"], exportAs: ["dropdown"] }, { kind: "directive", type: DropdownContentDirective, selector: "[dropdownContent]", exportAs: ["dropdown-content"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[dropdownToggle]", inputs: ["beforeOpen", "switch"], exportAs: ["dropdown-toggle"] }], encapsulation: i0.ViewEncapsulation.None }); }
5614
+ }
5615
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownBoxComponent, decorators: [{
5616
+ type: Component,
5617
+ args: [{ standalone: false, encapsulation: ViewEncapsulation.None, selector: "dropdown-box", template: "<div dd class=\"dropdown-box\"\n [ngClass]=\"componentClass\"\n [closeInside]=\"closeInside\"\n [attachTo]=\"attachTo\"\n [placement]=\"placement\"\n [autoPlacement]=\"autoPlacement\">\n <div class=\"dropdown-box-toggle\" dropdownToggle>\n <a class=\"dropdown-box-toggle-link\">\n <ng-content select=\"[toggle-content]\"></ng-content>\n </a>\n </div>\n <div class=\"dropdown-box-content\" [ngClass]=\"componentClass + '-content-wrapper'\" *dropdownContent>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".dropdown-box{--dd-border-size: var(--border-size, 1px);--dd-border-radius: 5px;--dd-top-border-radius: var(--dd-border-radius) var(--dd-border-radius) 0 0;--dd-bottom-border-radius: 0 0 var(--dd-border-radius) var(--dd-border-radius);--dd-bg-color: var(--bg-color, #ffffff);--dd-border-color: var(--border-color, #ced4da);--dd-highlight-color: var(--highlight-color, var(--primary-color, #888888));--dd-highlight-text-color: var(--highlight-text-color, #ffffff);--dd-text-color: var(--text-color, #151515);--dd-arrow-size: var(--arrow-size, 6px);--dd-arrow-space: calc(var(--dd-arrow-size) * .5 + 1px);--dd-arrow-color: currentColor;--dd-arrow-rotation: 90;position:relative;z-index:2;display:inline-block;width:var(--content-width, 0);min-width:fit-content}.dropdown-box *{box-sizing:border-box}.dropdown-box a,.dropdown-box span{white-space:nowrap}.dropdown-box.table-sort-dropdown{display:none}.dropdown-box.table-sort-dropdown .table-toggle:hover,.dropdown-box li:hover,.dropdown-box li.active{background-color:var(--dd-highlight-color);color:var(--dd-highlight-text-color)}.dropdown-box.open{--dd-arrow-rotation: -90}.dropdown-box.open .dropdown-box-toggle{border-radius:var(--dd-top-border-radius)}.dropdown-box-toggle{min-width:fit-content;background:var(--dd-bg-color);color:var(--dd-text-color);cursor:pointer;border:var(--dd-border-size) solid var(--dd-border-color);border-radius:5px;padding:6px 12px;-webkit-user-select:none;user-select:none;font-weight:400;font-size:var(--table-input-font-size, 15px);line-height:var(--table-input-line-height, 18px);outline:none}.dropdown-box-toggle .toggle-placeholder{color:#495057}.dropdown-box-toggle a.dropdown-box-toggle-link{margin-right:calc(2 * var(--dd-arrow-size));padding-right:5px;min-width:fit-content;position:relative;display:block}.dropdown-box-toggle a.dropdown-box-toggle-link:after{content:\"\";position:absolute;left:calc(100% + var(--dd-arrow-size));top:calc(50% - var(--dd-arrow-size));border-top:var(--dd-arrow-size) solid transparent;border-bottom:var(--dd-arrow-size) solid transparent;border-left:var(--dd-arrow-size) solid var(--dd-arrow-color);transform:rotate(calc(var(--dd-arrow-rotation) * 1deg));transition:.2s ease}.dropdown-box-content{position:relative;z-index:1;min-width:var(--toggle-width, 0)}.dropdown-box-content *{box-sizing:border-box}.dropdown-box-content ul{margin:0;padding:0;list-style:none;border:var(--dd-border-size) solid var(--dd-border-color);border-top-width:0;z-index:1;background:var(--dd-bg-color);border-radius:var(--dd-bottom-border-radius);overflow:hidden;min-width:fit-content}.dropdown-box-content li{color:var(--dd-text-color);font-weight:400;text-align:left;min-width:fit-content;cursor:pointer;padding:6px 12px;-webkit-user-select:none;user-select:none}.dropdown-box-content li:hover,.dropdown-box-content li.active{background-color:var(--dd-highlight-color);color:var(--dd-highlight-text-color)}.dropdown-placement-top.open .dropdown-box-toggle{border-radius:var(--dd-bottom-border-radius)}.dropdown-placement-top .dropdown-box-content ul{border-top-width:var(--dd-border-size);border-bottom-width:0;border-radius:var(--dd-top-border-radius)}\n"] }]
5618
+ }], ctorParameters: () => [], propDecorators: { closeInside: [{
5619
+ type: Input
5620
+ }], attachTo: [{
5621
+ type: Input
5622
+ }], placement: [{
5623
+ type: Input
5624
+ }], crossAxis: [{
5625
+ type: Input
5626
+ }], alignment: [{
5627
+ type: Input
5628
+ }], autoAlignment: [{
5629
+ type: Input
5630
+ }], allowedPlacements: [{
5631
+ type: Input
5632
+ }], componentClass: [{
5633
+ type: Input
5634
+ }], content: [{
5635
+ type: ViewChild,
5636
+ args: [DropdownContentDirective]
5637
+ }] } });
5638
+
5185
5639
  class PaginationMenuComponent {
5186
5640
  get hasPrev() {
5187
5641
  return this.pagination.page > 1;
@@ -5189,24 +5643,15 @@ class PaginationMenuComponent {
5189
5643
  get hasNext() {
5190
5644
  return this.pagination.page < this.pagination.maxPage;
5191
5645
  }
5192
- constructor(state, pagination, icons) {
5646
+ constructor(state, pagination) {
5193
5647
  this.state = state;
5194
5648
  this.pagination = pagination;
5195
- this.icons = icons;
5196
5649
  this.maxSize = 5;
5197
5650
  this.directionLinks = true;
5198
5651
  this.boundaryLinks = true;
5199
- this.firstLabel = `<<`;
5200
- this.prevLabel = `<`;
5201
- this.nextLabel = `>`;
5202
- this.lastLabel = `>>`;
5203
5652
  }
5204
5653
  ngOnInit() {
5205
5654
  this.onRefresh = this.pagination.onRefresh.subscribe(() => this.setPages());
5206
- this.setIcon("firstLabel", "first-page");
5207
- this.setIcon("prevLabel", "prev-page");
5208
- this.setIcon("nextLabel", "next-page");
5209
- this.setIcon("lastLabel", "last-page");
5210
5655
  }
5211
5656
  ngOnDestroy() {
5212
5657
  if (!this.onRefresh)
@@ -5231,13 +5676,6 @@ class PaginationMenuComponent {
5231
5676
  const path = StateService.toPath(this.state.route, params);
5232
5677
  this.state.navigateByUrl(path);
5233
5678
  }
5234
- setIcon(labelName, icon) {
5235
- this.icons.getIcon(icon, icon, false).then(i => {
5236
- if (i == icon)
5237
- return;
5238
- this[labelName] = i;
5239
- });
5240
- }
5241
5679
  setPages() {
5242
5680
  if (!this.pagination)
5243
5681
  return;
@@ -5254,16 +5692,13 @@ class PaginationMenuComponent {
5254
5692
  }
5255
5693
  this.pages = pages;
5256
5694
  }
5257
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaginationMenuComponent, deps: [{ token: StateService }, { token: PaginationDirective }, { token: ICON_SERVICE }], target: i0.ɵɵFactoryTarget.Component }); }
5258
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PaginationMenuComponent, selector: "pagination-menu", inputs: { maxSize: "maxSize", urlParam: "urlParam", directionLinks: "directionLinks", boundaryLinks: "boundaryLinks" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"pagination-menu\" *ngIf=\"pagination.total > pagination.itemsPerPage\">\n <ul class=\"pagination\">\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasPrev}\" *ngIf=\"boundaryLinks\">\n <a class=\"page-link\" (click)=\"paginate(1)\" [innerHTML]=\"firstLabel | safe\"></a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasPrev}\" *ngIf=\"directionLinks\">\n <a class=\"page-link\" (click)=\"paginate(pagination.page - 1)\" [innerHTML]=\"prevLabel | safe\"></a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{active: pagination.page == page}\" *ngFor=\"let page of pages\">\n <a class=\"page-link\" [ngClass]=\"{active: pagination.page == page}\" (click)=\"paginate(page)\">{{ page }}</a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasNext}\" *ngIf=\"directionLinks\">\n <a class=\"page-link\" (click)=\"paginate(pagination.page + 1)\" [innerHTML]=\"nextLabel | safe\"></a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasNext}\" *ngIf=\"boundaryLinks\">\n <a class=\"page-link\" (click)=\"paginate(pagination.maxPage)\" [innerHTML]=\"lastLabel | safe\"></a>\n </li>\n </ul>\n</div>\n", dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safe" }] }); }
5695
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaginationMenuComponent, deps: [{ token: StateService }, { token: PaginationDirective }], target: i0.ɵɵFactoryTarget.Component }); }
5696
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PaginationMenuComponent, selector: "pagination-menu", inputs: { maxSize: "maxSize", urlParam: "urlParam", directionLinks: "directionLinks", boundaryLinks: "boundaryLinks" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"pagination-menu\" *ngIf=\"pagination.total > pagination.itemsPerPage\">\n <ul class=\"pagination\">\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasPrev}\" *ngIf=\"boundaryLinks\">\n <a class=\"page-link boundary-link previous\" (click)=\"paginate(1)\"></a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasPrev}\" *ngIf=\"directionLinks\">\n <a class=\"page-link direction-link previous\" (click)=\"paginate(pagination.page - 1)\"></a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{active: pagination.page == page}\" *ngFor=\"let page of pages\">\n <a class=\"page-link\" [ngClass]=\"{active: pagination.page == page}\" (click)=\"paginate(page)\">{{ page }}</a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasNext}\" *ngIf=\"directionLinks\">\n <a class=\"page-link direction-link\" (click)=\"paginate(pagination.page + 1)\"></a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasNext}\" *ngIf=\"boundaryLinks\">\n <a class=\"page-link boundary-link\" (click)=\"paginate(pagination.maxPage)\"></a>\n </li>\n </ul>\n</div>\n", styles: [".pagination-menu{--pg-border-size: var(--border-size, 1px);--pg-bg-color: var(--bg-color, #ffffff);--pg-border-color: var(--border-color, #ced4da);--pg-highlight-color: var(--highlight-color, var(--primary-color, #888888));--pg-highlight-text-color: var(--highlight-text-color, #ffffff);--pg-text-color: var(--text-color, #151515);--pg-arrow-size: var(--arrow-size, 6px);--pg-arrow-space: calc(var(--pg-arrow-size) * .5 + 1px);--pg-arrow-color: currentColor;display:flex;align-items:center;justify-content:center;min-width:fit-content;margin:10px}.pagination-menu *{box-sizing:border-box}.pagination-menu ul{margin:0;padding:0;list-style:none;border:var(--pg-border-size) solid var(--pg-border-color);background:var(--pg-bg-color);border-radius:5px;overflow:hidden;min-width:fit-content;display:flex}.pagination-menu li{color:var(--pg-text-color);font-weight:400;text-align:left;min-width:fit-content;cursor:pointer;border-right:var(--pg-border-size) solid var(--pg-border-color);display:flex;align-items:center}.pagination-menu li:last-child{border-right:none}.pagination-menu li:hover,.pagination-menu li.active{background-color:var(--pg-highlight-color);color:var(--pg-highlight-text-color)}.pagination-menu a{display:block;min-width:36px;height:auto;line-height:20px;text-align:center;vertical-align:top;padding:6px 12px;color:inherit}.pagination-menu a.boundary-link,.pagination-menu a.direction-link{position:relative}.pagination-menu a.boundary-link:before,.pagination-menu a.boundary-link:after,.pagination-menu a.direction-link:before,.pagination-menu a.direction-link:after{content:\"\";position:absolute;left:50%;top:calc(50% - var(--pg-arrow-size));border-top:var(--pg-arrow-size) solid transparent;border-bottom:var(--pg-arrow-size) solid transparent;border-left:var(--pg-arrow-size) solid var(--pg-arrow-color)}.pagination-menu a.direction-link:before{display:none}.pagination-menu a.direction-link:after{translate:-50% 0}.pagination-menu a.boundary-link:before{translate:-100% 0}.pagination-menu a.boundary-link.previous:before,.pagination-menu a.boundary-link.previous:after,.pagination-menu a.direction-link.previous:before,.pagination-menu a.direction-link.previous:after{rotate:180deg}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
5259
5697
  }
5260
5698
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaginationMenuComponent, decorators: [{
5261
5699
  type: Component,
5262
- args: [{ selector: "pagination-menu", template: "<div class=\"pagination-menu\" *ngIf=\"pagination.total > pagination.itemsPerPage\">\n <ul class=\"pagination\">\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasPrev}\" *ngIf=\"boundaryLinks\">\n <a class=\"page-link\" (click)=\"paginate(1)\" [innerHTML]=\"firstLabel | safe\"></a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasPrev}\" *ngIf=\"directionLinks\">\n <a class=\"page-link\" (click)=\"paginate(pagination.page - 1)\" [innerHTML]=\"prevLabel | safe\"></a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{active: pagination.page == page}\" *ngFor=\"let page of pages\">\n <a class=\"page-link\" [ngClass]=\"{active: pagination.page == page}\" (click)=\"paginate(page)\">{{ page }}</a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasNext}\" *ngIf=\"directionLinks\">\n <a class=\"page-link\" (click)=\"paginate(pagination.page + 1)\" [innerHTML]=\"nextLabel | safe\"></a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasNext}\" *ngIf=\"boundaryLinks\">\n <a class=\"page-link\" (click)=\"paginate(pagination.maxPage)\" [innerHTML]=\"lastLabel | safe\"></a>\n </li>\n </ul>\n</div>\n" }]
5263
- }], ctorParameters: () => [{ type: StateService }, { type: PaginationDirective }, { type: undefined, decorators: [{
5264
- type: Inject,
5265
- args: [ICON_SERVICE]
5266
- }] }], propDecorators: { maxSize: [{
5700
+ args: [{ standalone: false, encapsulation: ViewEncapsulation.None, selector: "pagination-menu", template: "<div class=\"pagination-menu\" *ngIf=\"pagination.total > pagination.itemsPerPage\">\n <ul class=\"pagination\">\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasPrev}\" *ngIf=\"boundaryLinks\">\n <a class=\"page-link boundary-link previous\" (click)=\"paginate(1)\"></a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasPrev}\" *ngIf=\"directionLinks\">\n <a class=\"page-link direction-link previous\" (click)=\"paginate(pagination.page - 1)\"></a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{active: pagination.page == page}\" *ngFor=\"let page of pages\">\n <a class=\"page-link\" [ngClass]=\"{active: pagination.page == page}\" (click)=\"paginate(page)\">{{ page }}</a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasNext}\" *ngIf=\"directionLinks\">\n <a class=\"page-link direction-link\" (click)=\"paginate(pagination.page + 1)\"></a>\n </li>\n <li class=\"page-item\" [ngClass]=\"{disabled: !hasNext}\" *ngIf=\"boundaryLinks\">\n <a class=\"page-link boundary-link\" (click)=\"paginate(pagination.maxPage)\"></a>\n </li>\n </ul>\n</div>\n", styles: [".pagination-menu{--pg-border-size: var(--border-size, 1px);--pg-bg-color: var(--bg-color, #ffffff);--pg-border-color: var(--border-color, #ced4da);--pg-highlight-color: var(--highlight-color, var(--primary-color, #888888));--pg-highlight-text-color: var(--highlight-text-color, #ffffff);--pg-text-color: var(--text-color, #151515);--pg-arrow-size: var(--arrow-size, 6px);--pg-arrow-space: calc(var(--pg-arrow-size) * .5 + 1px);--pg-arrow-color: currentColor;display:flex;align-items:center;justify-content:center;min-width:fit-content;margin:10px}.pagination-menu *{box-sizing:border-box}.pagination-menu ul{margin:0;padding:0;list-style:none;border:var(--pg-border-size) solid var(--pg-border-color);background:var(--pg-bg-color);border-radius:5px;overflow:hidden;min-width:fit-content;display:flex}.pagination-menu li{color:var(--pg-text-color);font-weight:400;text-align:left;min-width:fit-content;cursor:pointer;border-right:var(--pg-border-size) solid var(--pg-border-color);display:flex;align-items:center}.pagination-menu li:last-child{border-right:none}.pagination-menu li:hover,.pagination-menu li.active{background-color:var(--pg-highlight-color);color:var(--pg-highlight-text-color)}.pagination-menu a{display:block;min-width:36px;height:auto;line-height:20px;text-align:center;vertical-align:top;padding:6px 12px;color:inherit}.pagination-menu a.boundary-link,.pagination-menu a.direction-link{position:relative}.pagination-menu a.boundary-link:before,.pagination-menu a.boundary-link:after,.pagination-menu a.direction-link:before,.pagination-menu a.direction-link:after{content:\"\";position:absolute;left:50%;top:calc(50% - var(--pg-arrow-size));border-top:var(--pg-arrow-size) solid transparent;border-bottom:var(--pg-arrow-size) solid transparent;border-left:var(--pg-arrow-size) solid var(--pg-arrow-color)}.pagination-menu a.direction-link:before{display:none}.pagination-menu a.direction-link:after{translate:-50% 0}.pagination-menu a.boundary-link:before{translate:-100% 0}.pagination-menu a.boundary-link.previous:before,.pagination-menu a.boundary-link.previous:after,.pagination-menu a.direction-link.previous:before,.pagination-menu a.direction-link.previous:after{rotate:180deg}\n"] }]
5701
+ }], ctorParameters: () => [{ type: StateService }, { type: PaginationDirective }], propDecorators: { maxSize: [{
5267
5702
  type: Input
5268
5703
  }], urlParam: [{
5269
5704
  type: Input
@@ -5282,7 +5717,8 @@ class DynamicTableComponent {
5282
5717
  b = b.item ? b.item[orderBy] : null;
5283
5718
  return ObjectUtils.compare(a, b);
5284
5719
  }
5285
- constructor() {
5720
+ constructor(element) {
5721
+ this.element = element;
5286
5722
  this.loadData = (page, itemsPerPage) => {
5287
5723
  const orderBy = this.realColumns[this.orderBy]?.sort;
5288
5724
  return this.dataLoader(page, itemsPerPage, orderBy, this.orderDescending, this.filter, this.query);
@@ -5298,6 +5734,12 @@ class DynamicTableComponent {
5298
5734
  this.titlePrefix = "label";
5299
5735
  this.realColumns = {};
5300
5736
  }
5737
+ setProperty(name, value) {
5738
+ const elem = this.element.nativeElement;
5739
+ if (!elem)
5740
+ return;
5741
+ elem.style.setProperty(`--${name}`, value);
5742
+ }
5301
5743
  ngAfterContentInit() {
5302
5744
  this.templates = this.templateDirectives.reduce((result, directive) => {
5303
5745
  if (ObjectUtils.isArray(directive.column)) {
@@ -5314,7 +5756,6 @@ class DynamicTableComponent {
5314
5756
  }
5315
5757
  ngAfterViewInit() {
5316
5758
  this.rowTemplate = this.rowTemplate || this.defaultRowTemplate;
5317
- this.filterTemplate = this.filterTemplate || this.defaultFilterTemplate;
5318
5759
  }
5319
5760
  ngOnChanges(changes) {
5320
5761
  if (changes.columns) {
@@ -5332,13 +5773,24 @@ class DynamicTableComponent {
5332
5773
  return result;
5333
5774
  }, {});
5334
5775
  this.cols = Object.keys(this.realColumns);
5335
- this.orderBy = this.orderBy in this.realColumns ? this.orderBy : this.cols[0];
5776
+ const sortable = this.cols.filter(c => this.realColumns[c].sort);
5777
+ const query = this.query || {};
5778
+ this.orderBy = sortable.includes(this.orderBy) ? this.orderBy : sortable[0] || null;
5779
+ this.query = this.cols.reduce((res, col) => {
5780
+ const value = query[col];
5781
+ if (!value)
5782
+ return res;
5783
+ res[col] = value;
5784
+ return res;
5785
+ }, {});
5786
+ this.setProperty("cell-width", MathUtils.round(100 / this.cols.length, 4) + "%");
5336
5787
  }
5337
5788
  this.hasQuery = this.cols.some(col => this.realColumns[col].filter);
5338
- if (changes.orderBy && this.realColumns) {
5339
- this.orderBy = this.orderBy in this.realColumns ? this.orderBy : this.cols[0];
5789
+ if (changes.orderBy && this.realColumns && this.cols) {
5790
+ const sortable = this.cols.filter(c => this.realColumns[c].sort);
5791
+ this.orderBy = this.orderBy in sortable ? this.orderBy : sortable[0] || null;
5340
5792
  }
5341
- if (!changes.data && !changes.parallelData && !changes.itemsPerPage && !changes.orderBy && !changes.orderDescending)
5793
+ if (!changes.data && !changes.parallelData && !changes.dataLoader && !changes.itemsPerPage && !changes.orderBy && !changes.orderDescending)
5342
5794
  return;
5343
5795
  this.refresh();
5344
5796
  }
@@ -5351,20 +5803,55 @@ class DynamicTableComponent {
5351
5803
  this.filter = filter;
5352
5804
  this.refresh(this.filterTime ?? 300);
5353
5805
  }
5354
- setOrder(column) {
5806
+ setSorting(column, toggle) {
5807
+ if (toggle) {
5808
+ return;
5809
+ }
5355
5810
  this.orderDescending = column == this.orderBy && !this.orderDescending;
5356
5811
  this.orderBy = column;
5357
5812
  this.refresh();
5358
5813
  }
5359
- updateQuery(col, value) {
5360
- if (!value) {
5361
- delete this.query[col];
5362
- }
5363
- else {
5364
- this.query[col] = value;
5814
+ setQueryValue(c, value) {
5815
+ const col = this.realColumns[c];
5816
+ if (!col?.filter)
5817
+ return;
5818
+ switch (col.filterType) {
5819
+ case "enum":
5820
+ const set = new Set((this.query[c] || []));
5821
+ const val = `${value}`;
5822
+ if (set.has(val)) {
5823
+ set.delete(val);
5824
+ if (set.size === 0) {
5825
+ delete this.query[c];
5826
+ break;
5827
+ }
5828
+ }
5829
+ else {
5830
+ set.add(val);
5831
+ }
5832
+ this.query[c] = Array.from(set);
5833
+ break;
5834
+ case "checkbox":
5835
+ if (this.query[c]) {
5836
+ delete this.query[c];
5837
+ break;
5838
+ }
5839
+ this.query[c] = true;
5840
+ break;
5841
+ default:
5842
+ if (!value) {
5843
+ delete this.query[c];
5844
+ break;
5845
+ }
5846
+ this.query[c] = value;
5847
+ break;
5365
5848
  }
5366
5849
  this.refresh(this.filterTime ?? 300);
5367
5850
  }
5851
+ setItemsPerPage(count) {
5852
+ this.itemsPerPage = count;
5853
+ this.refresh();
5854
+ }
5368
5855
  loadLocalData(page, rowsPerPage, orderBy, orderDescending, filter) {
5369
5856
  if (!this.data) {
5370
5857
  return Promise.resolve({
@@ -5395,20 +5882,18 @@ class DynamicTableComponent {
5395
5882
  items: items
5396
5883
  });
5397
5884
  }
5398
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DynamicTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5399
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DynamicTableComponent, selector: "dynamic-table", inputs: { label: "label", placeholder: "placeholder", dataLoader: "dataLoader", data: "data", page: "page", urlParam: "urlParam", parallelData: "parallelData", columns: "columns", showFilter: "showFilter", itemsPerPage: "itemsPerPage", updateTime: "updateTime", filterTime: "filterTime", maxPages: "maxPages", directionLinks: "directionLinks", boundaryLinks: "boundaryLinks", orderBy: "orderBy", orderDescending: "orderDescending", testId: "testId", titlePrefix: "titlePrefix" }, queries: [{ propertyName: "rowTemplate", first: true, predicate: ["rowTemplate"], descendants: true, static: true }, { propertyName: "wrapperTemplate", first: true, predicate: ["wrapperTemplate"], descendants: true, static: true }, { propertyName: "filterTemplate", first: true, predicate: ["filterTemplate"], descendants: true, static: true }, { propertyName: "templateDirectives", predicate: DynamicTableTemplateDirective }], viewQueries: [{ propertyName: "columnsTemplate", first: true, predicate: ["columnsTemplate"], descendants: true, static: true }, { propertyName: "defaultRowTemplate", first: true, predicate: ["defaultRowTemplate"], descendants: true, static: true }, { propertyName: "defaultWrapperTemplate", first: true, predicate: ["defaultWrapperTemplate"], descendants: true, static: true }, { propertyName: "defaultFilterTemplate", first: true, predicate: ["defaultFilterTemplate"], descendants: true, static: true }, { propertyName: "pagination", first: true, predicate: ["pagination"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"dynamic-table\" #pagination=\"pagination\" [pagination]=\"loadData\" [page]=\"page\" [itemsPerPage]=\"itemsPerPage\" [updateTime]=\"updateTime\">\n <ng-template #defaultFilterTemplate let-table>\n <div class=\"table-search\" *ngIf=\"table.showFilter\">\n <label *ngIf=\"label\" [attr.for]=\"tableId\">{{ label | translate }}</label>\n <input type=\"text\"\n class=\"form-control\"\n [attr.id]=\"tableId\"\n [attr.data-testid]=\"testId + '-filter-input'\"\n [placeholder]=\"placeholder | translate\"\n [ngModel]=\"table.filter\"\n (ngModelChange)=\"table.setFilter($event)\"/>\n </div>\n </ng-template>\n <ng-container [ngxTemplateOutlet]=\"filterTemplate || defaultFilterTemplate\" [context]=\"this\"></ng-container>\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\" [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\n <div class=\"table-responsive\">\n <ng-template #columnTemplate let-context let-column=\"column\" let-template=\"template\">\n <ng-template #defaultTemplate let-column=\"column\" let-item=\"item\">\n <span>{{ item[column] == undefined || item[column] == null ? '-' : item[column] }}</span>\n </ng-template>\n <ng-template #pureTemplate>\n <ng-container [ngxTemplateOutlet]=\"template.ref\" [context]=\"context\"></ng-container>\n </ng-template>\n <td [ngClass]=\"'column-' + column\"\n [attr.data-testid]=\"testId + '-' + column + '-' + context.rowIndex\" *ngIf=\"!template || !template.pure; else pureTemplate\">\n <ng-container [ngxTemplateOutlet]=\"!template ? defaultTemplate : template.ref\" [context]=\"context\"></ng-container>\n </td>\n </ng-template>\n\n <ng-template #columnsTemplate let-context>\n <ng-container *ngFor=\"let column of cols\"\n [ngxTemplateOutlet]=\"columnTemplate\"\n [context]=\"context\"\n [additionalContext]=\"{\n template: templates[column],\n column: column\n }\"></ng-container>\n </ng-template>\n\n <ng-template #defaultRowTemplate let-context>\n <tr>\n <ng-container [ngxTemplateOutlet]=\"columnsTemplate\" [context]=\"context\"></ng-container>\n </tr>\n </ng-template>\n\n <ng-template #defaultWrapperTemplate>\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th *ngFor=\"let column of cols\" [ngClass]=\"'column-' + column\">\n <ng-template #defaultCol>\n <span>{{ realColumns[column].title | translate }}</span>\n </ng-template>\n <a *ngIf=\"realColumns[column].sort; else defaultCol\" (click)=\"setOrder(column)\">\n <span>{{ realColumns[column].title | translate }}</span>\n <i *ngIf=\"orderBy == column\"\n [icon]=\"orderDescending ? 'sort-desc' : 'sort-asc'\"\n [ngClass]=\"orderBy == column ? (orderDescending ? 'sort-desc': 'sort-asc') : ''\"></i>\n </a>\n </th>\n </tr>\n <tr *ngIf=\"hasQuery\">\n <th *ngFor=\"let column of cols\" [ngClass]=\"['column-' + column, 'filter-column']\">\n <ng-container *ngIf=\"realColumns[column].filter\">\n <input type=\"text\"\n class=\"form-control\"\n [attr.data-testid]=\"testId + '-filter-' + column\"\n [placeholder]=\"realColumns[column].title | translate\"\n [ngModel]=\"query[column]\"\n (ngModelChange)=\"updateQuery(column, $event)\"/>\n </ng-container>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *paginationItem=\"let context\"\n [ngxTemplateOutlet]=\"rowTemplate\"\n [context]=\"context\"\n [additionalContext]=\"this\"></ng-container>\n </tbody>\n </table>\n </ng-template>\n\n <ng-container [ngxTemplateOutlet]=\"wrapperTemplate || defaultWrapperTemplate\"\n [context]=\"this\"></ng-container>\n </div>\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\" [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\n</div>\n", dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: IconDirective, selector: "[icon]", inputs: ["icon", "activeIcon", "active"], outputs: ["activeChange"] }, { kind: "directive", type: NgxTemplateOutletDirective, selector: "[ngxTemplateOutlet]", inputs: ["context", "additionalContext", "ngxTemplateOutlet"] }, { kind: "directive", type: PaginationDirective, selector: "[pagination]", inputs: ["pagination", "page", "itemsPerPage", "updateTime", "waitFor"], outputs: ["pageChange", "onRefresh"], exportAs: ["pagination"] }, { kind: "directive", type: PaginationItemDirective, selector: "[paginationItem]" }, { kind: "component", type: PaginationMenuComponent, selector: "pagination-menu", inputs: ["maxSize", "urlParam", "directionLinks", "boundaryLinks"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
5885
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DynamicTableComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
5886
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DynamicTableComponent, selector: "dynamic-table", inputs: { dataLoader: "dataLoader", data: "data", selected: "selected", page: "page", urlParam: "urlParam", parallelData: "parallelData", columns: "columns", showFilter: "showFilter", filterLabel: "filterLabel", placeholder: "placeholder", showItems: "showItems", itemsPerPage: "itemsPerPage", updateTime: "updateTime", filterTime: "filterTime", maxPages: "maxPages", directionLinks: "directionLinks", boundaryLinks: "boundaryLinks", orderBy: "orderBy", orderDescending: "orderDescending", testId: "testId", titlePrefix: "titlePrefix" }, queries: [{ propertyName: "rowTemplate", first: true, predicate: ["rowTemplate"], descendants: true, static: true }, { propertyName: "wrapperTemplate", first: true, predicate: ["wrapperTemplate"], descendants: true, static: true }, { propertyName: "templateDirectives", predicate: DynamicTableTemplateDirective }], viewQueries: [{ propertyName: "columnsTemplate", first: true, predicate: ["columnsTemplate"], descendants: true, static: true }, { propertyName: "defaultRowTemplate", first: true, predicate: ["defaultRowTemplate"], descendants: true, static: true }, { propertyName: "defaultWrapperTemplate", first: true, predicate: ["defaultWrapperTemplate"], descendants: true, static: true }, { propertyName: "pagination", first: true, predicate: ["pagination"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-template #columnTemplate let-context let-column=\"column\" let-template=\"template\">\n <ng-template #defaultTemplate let-column=\"column\" let-item=\"item\">\n <span>{{ item[column] == undefined || item[column] == null ? '-' : item[column] }}</span>\n </ng-template>\n <ng-template #pureTemplate>\n <ng-container [ngxTemplateOutlet]=\"template.ref\" [context]=\"context\"></ng-container>\n </ng-template>\n <td [ngClass]=\"'column-' + column\"\n [attr.data-testid]=\"testId + '-' + column + '-' + context.rowIndex\"\n *ngIf=\"!template || !template.pure; else pureTemplate\">\n <ng-container [ngxTemplateOutlet]=\"!template ? defaultTemplate : template.ref\"\n [context]=\"context\"></ng-container>\n </td>\n</ng-template>\n\n<ng-template #columnsTemplate let-context>\n <ng-container *ngFor=\"let column of cols\"\n [ngxTemplateOutlet]=\"columnTemplate\"\n [context]=\"context\"\n [additionalContext]=\"{\n template: templates[column],\n column: column\n }\"></ng-container>\n</ng-template>\n\n<ng-template #defaultRowTemplate let-context>\n <tr draggable=\"true\"\n #elem\n [ngClass]=\"{active: selected === context.item}\">\n <ng-container [ngxTemplateOutlet]=\"columnsTemplate\" [context]=\"context\"></ng-container>\n </tr>\n</ng-template>\n\n<ng-template #headerTemplate let-column=\"column\" let-toggle=\"toggle\">\n <ng-template #defaultCol>\n <span>{{ realColumns[column].title | translate }}</span>\n </ng-template>\n <a *ngIf=\"realColumns[column].sort; else defaultCol\"\n [ngClass]=\"['sort', orderBy !== column ? '' : (orderDescending ? 'sort-desc' : 'sort-asc')]\"\n (click)=\"setSorting(column, toggle)\">\n <span>{{ realColumns[column].title | translate }}</span>\n </a>\n</ng-template>\n\n<div class=\"dynamic-table\" #pagination=\"pagination\" [pagination]=\"loadData\" [page]=\"page\" [itemsPerPage]=\"itemsPerPage\"\n [updateTime]=\"updateTime\">\n <div class=\"table-features-row\">\n <ng-content select=\"[table-features-before]\"></ng-content>\n <div class=\"table-input-wrap table-search-filter\" *ngIf=\"showFilter\">\n <label *ngIf=\"filterLabel\" [attr.for]=\"tableId\">\n {{ filterLabel | translate }}\n </label>\n <input type=\"text\"\n class=\"search-input\"\n [attr.id]=\"tableId\"\n [attr.data-testid]=\"testId + '-filter-input'\"\n [placeholder]=\"placeholder | translate\"\n [ngModel]=\"filter\"\n (ngModelChange)=\"setFilter($event)\"/>\n </div>\n <dropdown-box componentClass=\"sort-dropdown\" #sortDd>\n <ng-container toggle-content\n [ngTemplateOutlet]=\"headerTemplate\"\n [ngTemplateOutletContext]=\"{column: orderBy, toggle: sortDd}\"></ng-container>\n <ul>\n <ng-container *ngFor=\"let column of cols\">\n <li [ngClass]=\"'sort-column sort-' + column\" *ngIf=\"realColumns[column].sort\">\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\n </li>\n </ng-container>\n </ul>\n </dropdown-box>\n <div class=\"table-input-wrap table-items-count\" *ngIf=\"showItems\">\n <label>\n {{ 'label.items.before' | translate }}\n </label>\n <dropdown-box>\n <ng-container toggle-content>\n {{ itemsPerPage }}\n </ng-container>\n <ul>\n <ng-container *ngFor=\"let count of showItems\">\n <li [ngClass]=\"'item-count count-' + count\" (click)=\"setItemsPerPage(count)\">\n {{ count }}\n </li>\n </ng-container>\n </ul>\n </dropdown-box>\n <label>\n {{ 'label.items.after' | translate }}\n </label>\n </div>\n <ng-content select=\"[table-features-after]\"></ng-content>\n </div>\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\"\n [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\n <div class=\"table-responsive\">\n <ng-template #defaultWrapperTemplate>\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th *ngFor=\"let column of cols\" [ngClass]=\"'header-column column-' + column\">\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\n </th>\n </tr>\n <tr *ngIf=\"hasQuery\">\n <th *ngFor=\"let column of cols\" [ngClass]=\"['column-' + column, 'filter-column']\">\n <ng-container *ngIf=\"realColumns[column].filter\" [ngSwitch]=\"realColumns[column].filterType\">\n <ng-container *ngSwitchCase=\"'enum'\">\n <ng-template #optionItem let-option=\"option\">\n {{ (realColumns[column].enumPrefix ? realColumns[column].enumPrefix + '.' + option : option) | translate }}\n </ng-template>\n <dropdown-box componentClass=\"filter-box\"\n [ngClass]=\"'filter-box-' + column\" [closeInside]=\"false\">\n <ng-container toggle-content>\n <span class=\"toggle-placeholder\" *ngIf=\"!query[column]\">\n {{ realColumns[column].title | translate }}\n </span>\n <span [ngClass]=\"['option-' + option, column + '-option-' + option, option]\"\n *ngFor=\"let option of query[column] | values; let ix = index\">\n <ng-container *ngIf=\"ix > 0\">, </ng-container>\n <ng-container [ngTemplateOutlet]=\"optionItem\"\n [ngTemplateOutletContext]=\"{option: option}\"></ng-container>\n </span>\n </ng-container>\n <ul>\n <li [ngClass]=\"[column + '-option', 'option-' + option, option]\"\n (click)=\"setQueryValue(column, option)\"\n *ngFor=\"let option of realColumns[column].enum\">\n <a [ngClass]=\"'toggle-link-' + column\">\n <input type=\"checkbox\" [checked]=\"query[column] | includes: option\">\n <ng-container [ngTemplateOutlet]=\"optionItem\"\n [ngTemplateOutletContext]=\"{option: option}\"></ng-container>\n </a>\n </li>\n </ul>\n </dropdown-box>\n </ng-container>\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <input type=\"checkbox\"\n [attr.data-testid]=\"testId + '-filter-' + column\"\n [placeholder]=\"realColumns[column].title | translate\"\n [ngModel]=\"query[column]\"\n (ngModelChange)=\"setQueryValue(column, $event)\"/>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <input class=\"search-input\"\n type=\"text\"\n [attr.data-testid]=\"testId + '-filter-' + column\"\n [placeholder]=\"realColumns[column].title | translate\"\n [ngModel]=\"query[column]\"\n (ngModelChange)=\"setQueryValue(column, $event)\"/>\n </ng-container>\n </ng-container>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *paginationItem=\"let context\"\n [ngxTemplateOutlet]=\"rowTemplate\"\n [context]=\"context\"\n [additionalContext]=\"this\"></ng-container>\n </tbody>\n </table>\n </ng-template>\n\n <div class=\"table-wrapper\">\n <ng-content select=\"[table-top]\"></ng-content>\n <ng-container [ngxTemplateOutlet]=\"wrapperTemplate || defaultWrapperTemplate\"\n [context]=\"this\"></ng-container>\n <ng-content select=\"[table-bottom]\"></ng-content>\n </div>\n </div>\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\"\n [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\n</div>\n", styles: [".dynamic-table{--table-bg: transparent;--table-stripe-bg: rgba(210, 210, 210, .35);--border-size: 1px;--border-color: #ced4da;--bg-color: #ffffff;--text-color: #151515;--highlight-color: var(--primary-color, #888888);--highlight-text-color: #ffffff;--display-toggle: none;--arrow-size: 6px;--arrow-rotation: 90;--arrow-space: calc(var(--arrow-size) * .5 + 1px);--arrow-color: #c6c6c6}.dynamic-table *{box-sizing:border-box}.dynamic-table .search-input{background:var(--bg-color);color:var(--text-color);border:var(--border-size) solid var(--border-color);border-radius:5px;padding:6px 12px;-webkit-user-select:none;user-select:none;font-weight:400;font-size:var(--table-input-font-size, 15px);line-height:var(--table-input-line-height, 18px);outline:none}.dynamic-table .search-input .toggle-placeholder,.dynamic-table .search-input ::placeholder{color:#495057}.dynamic-table .table-responsive{border:1px solid var(--border-color);overflow:hidden;overflow-x:auto;margin-bottom:1rem}.dynamic-table .table-features-row:not(:empty){display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-bottom:20px}.dynamic-table .sort-dropdown{display:none}.dynamic-table .table-input-wrap{display:flex;align-items:center;justify-content:flex-end;gap:5px}.dynamic-table .table-input-wrap>label{margin:0;font-weight:700}.dynamic-table .table-input-wrap>input{max-width:400px}.dynamic-table .table-items-count{flex:1}.dynamic-table .table-wrapper{position:relative}.dynamic-table table.table{border-collapse:collapse;margin:0;width:100%;font-family:inherit;font-size:inherit}.dynamic-table table.table th{text-align:left}.dynamic-table table.table th,.dynamic-table table.table td{text-align:left;padding:6px 12px;border:1px solid var(--border-color);vertical-align:middle;white-space:nowrap;width:var(--cell-width, 25%);min-width:fit-content}.dynamic-table table.table-sm th,.dynamic-table table.table-sm td{font-size:var(--font-size-sm);padding:4px 6px}.dynamic-table table.table thead th{font-weight:500}.dynamic-table table.table thead th .dropdown-box{display:block;width:100%;text-align:left}.dynamic-table table.table thead th .search-input{width:100%}.dynamic-table table.table thead th span{display:inline-block;vertical-align:top}.dynamic-table table.table thead th a{cursor:pointer;text-align:left}.dynamic-table table.table thead th.filter-column{text-align:center}.dynamic-table table.table thead tr:first-child th{border-top-width:0}.dynamic-table table.table tbody tr:last-child td{border-bottom-width:0}.dynamic-table table.table thead tr th,.dynamic-table table.table tbody tr td{background-color:var(--table-bg)}.dynamic-table table.table thead tr th:first-child,.dynamic-table table.table tbody tr td:first-child{border-left-width:0}.dynamic-table table.table thead tr th:last-child,.dynamic-table table.table tbody tr td:last-child{border-right-width:0}.dynamic-table table.table tbody tr.active td{background-color:var(--highlight-color);color:var(--highlight-text-color)}.dynamic-table .table-striped>tbody>tr:nth-of-type(odd) td{background-color:var(--table-stripe-bg)}.dynamic-table .table-striped>tbody>tr:nth-of-type(odd).active td{background-color:var(--highlight-color);color:var(--highlight-text-color)}.sort-dropdown .dropdown-box-toggle a.dropdown-box-toggle-link{margin-right:0;padding-right:0}.sort-dropdown .dropdown-box-toggle a.dropdown-box-toggle-link:after{display:none}.sort-dropdown-content-wrapper a.sort,.dynamic-table a.sort{position:relative;display:block;margin-right:calc(var(--arrow-size) * 2);-webkit-user-select:none;user-select:none;padding-right:5px}.sort-dropdown-content-wrapper a.sort:before,.sort-dropdown-content-wrapper a.sort:after,.dynamic-table a.sort:before,.dynamic-table a.sort:after{content:\"\";position:absolute;transition:.2s ease;left:calc(100% + var(--arrow-size));top:calc(50% - var(--arrow-size));border-top:var(--arrow-size) solid transparent;border-bottom:var(--arrow-size) solid transparent;border-left:var(--arrow-size) solid var(--arrow-color);transform:rotate(calc(var(--arrow-rotation) * 1deg)) translate(var(--arrow-space))}.sort-dropdown-content-wrapper a.sort:before,.dynamic-table a.sort:before{--arrow-rotation: -90}.sort-dropdown-content-wrapper a.sort.sort-desc:before,.dynamic-table a.sort.sort-desc:before{--arrow-color: black}.sort-dropdown-content-wrapper a.sort.sort-asc:after,.dynamic-table a.sort.sort-asc:after{--arrow-color: black}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgxTemplateOutletDirective, selector: "[ngxTemplateOutlet]", inputs: ["context", "additionalContext", "ngxTemplateOutlet"] }, { kind: "directive", type: PaginationDirective, selector: "[pagination]", inputs: ["pagination", "page", "itemsPerPage", "updateTime", "waitFor"], outputs: ["pageChange", "onRefresh"], exportAs: ["pagination"] }, { kind: "directive", type: PaginationItemDirective, selector: "[paginationItem]" }, { kind: "component", type: DropdownBoxComponent, selector: "dropdown-box", inputs: ["closeInside", "attachTo", "placement", "crossAxis", "alignment", "autoAlignment", "allowedPlacements", "componentClass"] }, { kind: "component", type: PaginationMenuComponent, selector: "pagination-menu", inputs: ["maxSize", "urlParam", "directionLinks", "boundaryLinks"] }, { kind: "pipe", type: IncludesPipe, name: "includes" }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: ValuesPipe, name: "values" }], encapsulation: i0.ViewEncapsulation.None }); }
5400
5887
  }
5401
5888
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DynamicTableComponent, decorators: [{
5402
5889
  type: Component,
5403
- args: [{ selector: "dynamic-table", template: "<div class=\"dynamic-table\" #pagination=\"pagination\" [pagination]=\"loadData\" [page]=\"page\" [itemsPerPage]=\"itemsPerPage\" [updateTime]=\"updateTime\">\n <ng-template #defaultFilterTemplate let-table>\n <div class=\"table-search\" *ngIf=\"table.showFilter\">\n <label *ngIf=\"label\" [attr.for]=\"tableId\">{{ label | translate }}</label>\n <input type=\"text\"\n class=\"form-control\"\n [attr.id]=\"tableId\"\n [attr.data-testid]=\"testId + '-filter-input'\"\n [placeholder]=\"placeholder | translate\"\n [ngModel]=\"table.filter\"\n (ngModelChange)=\"table.setFilter($event)\"/>\n </div>\n </ng-template>\n <ng-container [ngxTemplateOutlet]=\"filterTemplate || defaultFilterTemplate\" [context]=\"this\"></ng-container>\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\" [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\n <div class=\"table-responsive\">\n <ng-template #columnTemplate let-context let-column=\"column\" let-template=\"template\">\n <ng-template #defaultTemplate let-column=\"column\" let-item=\"item\">\n <span>{{ item[column] == undefined || item[column] == null ? '-' : item[column] }}</span>\n </ng-template>\n <ng-template #pureTemplate>\n <ng-container [ngxTemplateOutlet]=\"template.ref\" [context]=\"context\"></ng-container>\n </ng-template>\n <td [ngClass]=\"'column-' + column\"\n [attr.data-testid]=\"testId + '-' + column + '-' + context.rowIndex\" *ngIf=\"!template || !template.pure; else pureTemplate\">\n <ng-container [ngxTemplateOutlet]=\"!template ? defaultTemplate : template.ref\" [context]=\"context\"></ng-container>\n </td>\n </ng-template>\n\n <ng-template #columnsTemplate let-context>\n <ng-container *ngFor=\"let column of cols\"\n [ngxTemplateOutlet]=\"columnTemplate\"\n [context]=\"context\"\n [additionalContext]=\"{\n template: templates[column],\n column: column\n }\"></ng-container>\n </ng-template>\n\n <ng-template #defaultRowTemplate let-context>\n <tr>\n <ng-container [ngxTemplateOutlet]=\"columnsTemplate\" [context]=\"context\"></ng-container>\n </tr>\n </ng-template>\n\n <ng-template #defaultWrapperTemplate>\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th *ngFor=\"let column of cols\" [ngClass]=\"'column-' + column\">\n <ng-template #defaultCol>\n <span>{{ realColumns[column].title | translate }}</span>\n </ng-template>\n <a *ngIf=\"realColumns[column].sort; else defaultCol\" (click)=\"setOrder(column)\">\n <span>{{ realColumns[column].title | translate }}</span>\n <i *ngIf=\"orderBy == column\"\n [icon]=\"orderDescending ? 'sort-desc' : 'sort-asc'\"\n [ngClass]=\"orderBy == column ? (orderDescending ? 'sort-desc': 'sort-asc') : ''\"></i>\n </a>\n </th>\n </tr>\n <tr *ngIf=\"hasQuery\">\n <th *ngFor=\"let column of cols\" [ngClass]=\"['column-' + column, 'filter-column']\">\n <ng-container *ngIf=\"realColumns[column].filter\">\n <input type=\"text\"\n class=\"form-control\"\n [attr.data-testid]=\"testId + '-filter-' + column\"\n [placeholder]=\"realColumns[column].title | translate\"\n [ngModel]=\"query[column]\"\n (ngModelChange)=\"updateQuery(column, $event)\"/>\n </ng-container>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *paginationItem=\"let context\"\n [ngxTemplateOutlet]=\"rowTemplate\"\n [context]=\"context\"\n [additionalContext]=\"this\"></ng-container>\n </tbody>\n </table>\n </ng-template>\n\n <ng-container [ngxTemplateOutlet]=\"wrapperTemplate || defaultWrapperTemplate\"\n [context]=\"this\"></ng-container>\n </div>\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\" [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\n</div>\n" }]
5404
- }], ctorParameters: () => [], propDecorators: { label: [{
5405
- type: Input
5406
- }], placeholder: [{
5407
- type: Input
5408
- }], dataLoader: [{
5890
+ args: [{ standalone: false, encapsulation: ViewEncapsulation.None, selector: "dynamic-table", template: "<ng-template #columnTemplate let-context let-column=\"column\" let-template=\"template\">\n <ng-template #defaultTemplate let-column=\"column\" let-item=\"item\">\n <span>{{ item[column] == undefined || item[column] == null ? '-' : item[column] }}</span>\n </ng-template>\n <ng-template #pureTemplate>\n <ng-container [ngxTemplateOutlet]=\"template.ref\" [context]=\"context\"></ng-container>\n </ng-template>\n <td [ngClass]=\"'column-' + column\"\n [attr.data-testid]=\"testId + '-' + column + '-' + context.rowIndex\"\n *ngIf=\"!template || !template.pure; else pureTemplate\">\n <ng-container [ngxTemplateOutlet]=\"!template ? defaultTemplate : template.ref\"\n [context]=\"context\"></ng-container>\n </td>\n</ng-template>\n\n<ng-template #columnsTemplate let-context>\n <ng-container *ngFor=\"let column of cols\"\n [ngxTemplateOutlet]=\"columnTemplate\"\n [context]=\"context\"\n [additionalContext]=\"{\n template: templates[column],\n column: column\n }\"></ng-container>\n</ng-template>\n\n<ng-template #defaultRowTemplate let-context>\n <tr draggable=\"true\"\n #elem\n [ngClass]=\"{active: selected === context.item}\">\n <ng-container [ngxTemplateOutlet]=\"columnsTemplate\" [context]=\"context\"></ng-container>\n </tr>\n</ng-template>\n\n<ng-template #headerTemplate let-column=\"column\" let-toggle=\"toggle\">\n <ng-template #defaultCol>\n <span>{{ realColumns[column].title | translate }}</span>\n </ng-template>\n <a *ngIf=\"realColumns[column].sort; else defaultCol\"\n [ngClass]=\"['sort', orderBy !== column ? '' : (orderDescending ? 'sort-desc' : 'sort-asc')]\"\n (click)=\"setSorting(column, toggle)\">\n <span>{{ realColumns[column].title | translate }}</span>\n </a>\n</ng-template>\n\n<div class=\"dynamic-table\" #pagination=\"pagination\" [pagination]=\"loadData\" [page]=\"page\" [itemsPerPage]=\"itemsPerPage\"\n [updateTime]=\"updateTime\">\n <div class=\"table-features-row\">\n <ng-content select=\"[table-features-before]\"></ng-content>\n <div class=\"table-input-wrap table-search-filter\" *ngIf=\"showFilter\">\n <label *ngIf=\"filterLabel\" [attr.for]=\"tableId\">\n {{ filterLabel | translate }}\n </label>\n <input type=\"text\"\n class=\"search-input\"\n [attr.id]=\"tableId\"\n [attr.data-testid]=\"testId + '-filter-input'\"\n [placeholder]=\"placeholder | translate\"\n [ngModel]=\"filter\"\n (ngModelChange)=\"setFilter($event)\"/>\n </div>\n <dropdown-box componentClass=\"sort-dropdown\" #sortDd>\n <ng-container toggle-content\n [ngTemplateOutlet]=\"headerTemplate\"\n [ngTemplateOutletContext]=\"{column: orderBy, toggle: sortDd}\"></ng-container>\n <ul>\n <ng-container *ngFor=\"let column of cols\">\n <li [ngClass]=\"'sort-column sort-' + column\" *ngIf=\"realColumns[column].sort\">\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\n </li>\n </ng-container>\n </ul>\n </dropdown-box>\n <div class=\"table-input-wrap table-items-count\" *ngIf=\"showItems\">\n <label>\n {{ 'label.items.before' | translate }}\n </label>\n <dropdown-box>\n <ng-container toggle-content>\n {{ itemsPerPage }}\n </ng-container>\n <ul>\n <ng-container *ngFor=\"let count of showItems\">\n <li [ngClass]=\"'item-count count-' + count\" (click)=\"setItemsPerPage(count)\">\n {{ count }}\n </li>\n </ng-container>\n </ul>\n </dropdown-box>\n <label>\n {{ 'label.items.after' | translate }}\n </label>\n </div>\n <ng-content select=\"[table-features-after]\"></ng-content>\n </div>\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\"\n [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\n <div class=\"table-responsive\">\n <ng-template #defaultWrapperTemplate>\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th *ngFor=\"let column of cols\" [ngClass]=\"'header-column column-' + column\">\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"\n [ngTemplateOutletContext]=\"{column: column}\"></ng-container>\n </th>\n </tr>\n <tr *ngIf=\"hasQuery\">\n <th *ngFor=\"let column of cols\" [ngClass]=\"['column-' + column, 'filter-column']\">\n <ng-container *ngIf=\"realColumns[column].filter\" [ngSwitch]=\"realColumns[column].filterType\">\n <ng-container *ngSwitchCase=\"'enum'\">\n <ng-template #optionItem let-option=\"option\">\n {{ (realColumns[column].enumPrefix ? realColumns[column].enumPrefix + '.' + option : option) | translate }}\n </ng-template>\n <dropdown-box componentClass=\"filter-box\"\n [ngClass]=\"'filter-box-' + column\" [closeInside]=\"false\">\n <ng-container toggle-content>\n <span class=\"toggle-placeholder\" *ngIf=\"!query[column]\">\n {{ realColumns[column].title | translate }}\n </span>\n <span [ngClass]=\"['option-' + option, column + '-option-' + option, option]\"\n *ngFor=\"let option of query[column] | values; let ix = index\">\n <ng-container *ngIf=\"ix > 0\">, </ng-container>\n <ng-container [ngTemplateOutlet]=\"optionItem\"\n [ngTemplateOutletContext]=\"{option: option}\"></ng-container>\n </span>\n </ng-container>\n <ul>\n <li [ngClass]=\"[column + '-option', 'option-' + option, option]\"\n (click)=\"setQueryValue(column, option)\"\n *ngFor=\"let option of realColumns[column].enum\">\n <a [ngClass]=\"'toggle-link-' + column\">\n <input type=\"checkbox\" [checked]=\"query[column] | includes: option\">\n <ng-container [ngTemplateOutlet]=\"optionItem\"\n [ngTemplateOutletContext]=\"{option: option}\"></ng-container>\n </a>\n </li>\n </ul>\n </dropdown-box>\n </ng-container>\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <input type=\"checkbox\"\n [attr.data-testid]=\"testId + '-filter-' + column\"\n [placeholder]=\"realColumns[column].title | translate\"\n [ngModel]=\"query[column]\"\n (ngModelChange)=\"setQueryValue(column, $event)\"/>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <input class=\"search-input\"\n type=\"text\"\n [attr.data-testid]=\"testId + '-filter-' + column\"\n [placeholder]=\"realColumns[column].title | translate\"\n [ngModel]=\"query[column]\"\n (ngModelChange)=\"setQueryValue(column, $event)\"/>\n </ng-container>\n </ng-container>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *paginationItem=\"let context\"\n [ngxTemplateOutlet]=\"rowTemplate\"\n [context]=\"context\"\n [additionalContext]=\"this\"></ng-container>\n </tbody>\n </table>\n </ng-template>\n\n <div class=\"table-wrapper\">\n <ng-content select=\"[table-top]\"></ng-content>\n <ng-container [ngxTemplateOutlet]=\"wrapperTemplate || defaultWrapperTemplate\"\n [context]=\"this\"></ng-container>\n <ng-content select=\"[table-bottom]\"></ng-content>\n </div>\n </div>\n <pagination-menu [urlParam]=\"urlParam\" [maxSize]=\"maxPages\" [directionLinks]=\"directionLinks\"\n [boundaryLinks]=\"boundaryLinks\"></pagination-menu>\n</div>\n", styles: [".dynamic-table{--table-bg: transparent;--table-stripe-bg: rgba(210, 210, 210, .35);--border-size: 1px;--border-color: #ced4da;--bg-color: #ffffff;--text-color: #151515;--highlight-color: var(--primary-color, #888888);--highlight-text-color: #ffffff;--display-toggle: none;--arrow-size: 6px;--arrow-rotation: 90;--arrow-space: calc(var(--arrow-size) * .5 + 1px);--arrow-color: #c6c6c6}.dynamic-table *{box-sizing:border-box}.dynamic-table .search-input{background:var(--bg-color);color:var(--text-color);border:var(--border-size) solid var(--border-color);border-radius:5px;padding:6px 12px;-webkit-user-select:none;user-select:none;font-weight:400;font-size:var(--table-input-font-size, 15px);line-height:var(--table-input-line-height, 18px);outline:none}.dynamic-table .search-input .toggle-placeholder,.dynamic-table .search-input ::placeholder{color:#495057}.dynamic-table .table-responsive{border:1px solid var(--border-color);overflow:hidden;overflow-x:auto;margin-bottom:1rem}.dynamic-table .table-features-row:not(:empty){display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-bottom:20px}.dynamic-table .sort-dropdown{display:none}.dynamic-table .table-input-wrap{display:flex;align-items:center;justify-content:flex-end;gap:5px}.dynamic-table .table-input-wrap>label{margin:0;font-weight:700}.dynamic-table .table-input-wrap>input{max-width:400px}.dynamic-table .table-items-count{flex:1}.dynamic-table .table-wrapper{position:relative}.dynamic-table table.table{border-collapse:collapse;margin:0;width:100%;font-family:inherit;font-size:inherit}.dynamic-table table.table th{text-align:left}.dynamic-table table.table th,.dynamic-table table.table td{text-align:left;padding:6px 12px;border:1px solid var(--border-color);vertical-align:middle;white-space:nowrap;width:var(--cell-width, 25%);min-width:fit-content}.dynamic-table table.table-sm th,.dynamic-table table.table-sm td{font-size:var(--font-size-sm);padding:4px 6px}.dynamic-table table.table thead th{font-weight:500}.dynamic-table table.table thead th .dropdown-box{display:block;width:100%;text-align:left}.dynamic-table table.table thead th .search-input{width:100%}.dynamic-table table.table thead th span{display:inline-block;vertical-align:top}.dynamic-table table.table thead th a{cursor:pointer;text-align:left}.dynamic-table table.table thead th.filter-column{text-align:center}.dynamic-table table.table thead tr:first-child th{border-top-width:0}.dynamic-table table.table tbody tr:last-child td{border-bottom-width:0}.dynamic-table table.table thead tr th,.dynamic-table table.table tbody tr td{background-color:var(--table-bg)}.dynamic-table table.table thead tr th:first-child,.dynamic-table table.table tbody tr td:first-child{border-left-width:0}.dynamic-table table.table thead tr th:last-child,.dynamic-table table.table tbody tr td:last-child{border-right-width:0}.dynamic-table table.table tbody tr.active td{background-color:var(--highlight-color);color:var(--highlight-text-color)}.dynamic-table .table-striped>tbody>tr:nth-of-type(odd) td{background-color:var(--table-stripe-bg)}.dynamic-table .table-striped>tbody>tr:nth-of-type(odd).active td{background-color:var(--highlight-color);color:var(--highlight-text-color)}.sort-dropdown .dropdown-box-toggle a.dropdown-box-toggle-link{margin-right:0;padding-right:0}.sort-dropdown .dropdown-box-toggle a.dropdown-box-toggle-link:after{display:none}.sort-dropdown-content-wrapper a.sort,.dynamic-table a.sort{position:relative;display:block;margin-right:calc(var(--arrow-size) * 2);-webkit-user-select:none;user-select:none;padding-right:5px}.sort-dropdown-content-wrapper a.sort:before,.sort-dropdown-content-wrapper a.sort:after,.dynamic-table a.sort:before,.dynamic-table a.sort:after{content:\"\";position:absolute;transition:.2s ease;left:calc(100% + var(--arrow-size));top:calc(50% - var(--arrow-size));border-top:var(--arrow-size) solid transparent;border-bottom:var(--arrow-size) solid transparent;border-left:var(--arrow-size) solid var(--arrow-color);transform:rotate(calc(var(--arrow-rotation) * 1deg)) translate(var(--arrow-space))}.sort-dropdown-content-wrapper a.sort:before,.dynamic-table a.sort:before{--arrow-rotation: -90}.sort-dropdown-content-wrapper a.sort.sort-desc:before,.dynamic-table a.sort.sort-desc:before{--arrow-color: black}.sort-dropdown-content-wrapper a.sort.sort-asc:after,.dynamic-table a.sort.sort-asc:after{--arrow-color: black}\n"] }]
5891
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { dataLoader: [{
5409
5892
  type: Input
5410
5893
  }], data: [{
5411
5894
  type: Input
5895
+ }], selected: [{
5896
+ type: Input
5412
5897
  }], page: [{
5413
5898
  type: Input
5414
5899
  }], urlParam: [{
@@ -5419,6 +5904,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
5419
5904
  type: Input
5420
5905
  }], showFilter: [{
5421
5906
  type: Input
5907
+ }], filterLabel: [{
5908
+ type: Input
5909
+ }], placeholder: [{
5910
+ type: Input
5911
+ }], showItems: [{
5912
+ type: Input
5422
5913
  }], itemsPerPage: [{
5423
5914
  type: Input
5424
5915
  }], updateTime: [{
@@ -5445,9 +5936,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
5445
5936
  }], wrapperTemplate: [{
5446
5937
  type: ContentChild,
5447
5938
  args: ["wrapperTemplate", { static: true }]
5448
- }], filterTemplate: [{
5449
- type: ContentChild,
5450
- args: ["filterTemplate", { static: true }]
5451
5939
  }], columnsTemplate: [{
5452
5940
  type: ViewChild,
5453
5941
  args: ["columnsTemplate", { static: true }]
@@ -5457,9 +5945,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
5457
5945
  }], defaultWrapperTemplate: [{
5458
5946
  type: ViewChild,
5459
5947
  args: ["defaultWrapperTemplate", { static: true }]
5460
- }], defaultFilterTemplate: [{
5461
- type: ViewChild,
5462
- args: ["defaultFilterTemplate", { static: true }]
5463
5948
  }], pagination: [{
5464
5949
  type: ViewChild,
5465
5950
  args: ["pagination"]
@@ -5481,6 +5966,7 @@ const pipes = [
5481
5966
  GetValuePipe,
5482
5967
  GlobalTemplatePipe,
5483
5968
  GroupByPipe,
5969
+ IncludesPipe,
5484
5970
  IsTypePipe,
5485
5971
  JoinPipe,
5486
5972
  KeysPipe,
@@ -5504,6 +5990,9 @@ const directives = [
5504
5990
  AsyncMethodBase,
5505
5991
  AsyncMethodDirective,
5506
5992
  BackgroundDirective,
5993
+ DropdownDirective,
5994
+ DropdownContentDirective,
5995
+ DropdownToggleDirective,
5507
5996
  DynamicTableTemplateDirective,
5508
5997
  GlobalTemplateDirective,
5509
5998
  IconDirective,
@@ -5518,6 +6007,7 @@ const directives = [
5518
6007
  ];
5519
6008
  // --- Components ---
5520
6009
  const components = [
6010
+ DropdownBoxComponent,
5521
6011
  DynamicTableComponent,
5522
6012
  PaginationMenuComponent,
5523
6013
  UnorderedListComponent
@@ -5847,8 +6337,8 @@ class NgxUtilsModule {
5847
6337
  constructor() {
5848
6338
  }
5849
6339
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgxUtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5850
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: NgxUtilsModule, declarations: [ChunkPipe, EntriesPipe, ExtraItemPropertiesPipe, FilterPipe, FindPipe, FormatNumberPipe, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplatePipe, GroupByPipe, IsTypePipe, JoinPipe, KeysPipe, MapPipe, MaxPipe, MinPipe, PopPipe, ReducePipe, RemapPipe, ReplacePipe, ReversePipe, RoundPipe, SafeHtmlPipe, ShiftPipe, SplitPipe, TranslatePipe, ValuesPipe, AsyncMethodBase, AsyncMethodDirective, BackgroundDirective, DynamicTableTemplateDirective, GlobalTemplateDirective, IconDirective, NgxTemplateOutletDirective, PaginationDirective, PaginationItemDirective, ResourceIfDirective, StickyDirective, StickyClassDirective, UnorderedListItemDirective, UnorderedListTemplateDirective, DynamicTableComponent, PaginationMenuComponent, UnorderedListComponent], imports: [CommonModule,
5851
- FormsModule], exports: [ChunkPipe, EntriesPipe, ExtraItemPropertiesPipe, FilterPipe, FindPipe, FormatNumberPipe, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplatePipe, GroupByPipe, IsTypePipe, JoinPipe, KeysPipe, MapPipe, MaxPipe, MinPipe, PopPipe, ReducePipe, RemapPipe, ReplacePipe, ReversePipe, RoundPipe, SafeHtmlPipe, ShiftPipe, SplitPipe, TranslatePipe, ValuesPipe, AsyncMethodBase, AsyncMethodDirective, BackgroundDirective, DynamicTableTemplateDirective, GlobalTemplateDirective, IconDirective, NgxTemplateOutletDirective, PaginationDirective, PaginationItemDirective, ResourceIfDirective, StickyDirective, StickyClassDirective, UnorderedListItemDirective, UnorderedListTemplateDirective, DynamicTableComponent, PaginationMenuComponent, UnorderedListComponent, FormsModule] }); }
6340
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: NgxUtilsModule, declarations: [ChunkPipe, EntriesPipe, ExtraItemPropertiesPipe, FilterPipe, FindPipe, FormatNumberPipe, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplatePipe, GroupByPipe, IncludesPipe, IsTypePipe, JoinPipe, KeysPipe, MapPipe, MaxPipe, MinPipe, PopPipe, ReducePipe, RemapPipe, ReplacePipe, ReversePipe, RoundPipe, SafeHtmlPipe, ShiftPipe, SplitPipe, TranslatePipe, ValuesPipe, AsyncMethodBase, AsyncMethodDirective, BackgroundDirective, DropdownDirective, DropdownContentDirective, DropdownToggleDirective, DynamicTableTemplateDirective, GlobalTemplateDirective, IconDirective, NgxTemplateOutletDirective, PaginationDirective, PaginationItemDirective, ResourceIfDirective, StickyDirective, StickyClassDirective, UnorderedListItemDirective, UnorderedListTemplateDirective, DropdownBoxComponent, DynamicTableComponent, PaginationMenuComponent, UnorderedListComponent], imports: [CommonModule,
6341
+ FormsModule], exports: [ChunkPipe, EntriesPipe, ExtraItemPropertiesPipe, FilterPipe, FindPipe, FormatNumberPipe, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplatePipe, GroupByPipe, IncludesPipe, IsTypePipe, JoinPipe, KeysPipe, MapPipe, MaxPipe, MinPipe, PopPipe, ReducePipe, RemapPipe, ReplacePipe, ReversePipe, RoundPipe, SafeHtmlPipe, ShiftPipe, SplitPipe, TranslatePipe, ValuesPipe, AsyncMethodBase, AsyncMethodDirective, BackgroundDirective, DropdownDirective, DropdownContentDirective, DropdownToggleDirective, DynamicTableTemplateDirective, GlobalTemplateDirective, IconDirective, NgxTemplateOutletDirective, PaginationDirective, PaginationItemDirective, ResourceIfDirective, StickyDirective, StickyClassDirective, UnorderedListItemDirective, UnorderedListTemplateDirective, DropdownBoxComponent, DynamicTableComponent, PaginationMenuComponent, UnorderedListComponent, FormsModule] }); }
5852
6342
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgxUtilsModule, providers: pipes, imports: [CommonModule,
5853
6343
  FormsModule, FormsModule] }); }
5854
6344
  }
@@ -5878,5 +6368,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
5878
6368
  * Generated bundle index. Do not edit.
5879
6369
  */
5880
6370
 
5881
- export { API_SERVICE, APP_BASE_URL, AUTH_SERVICE, AclService, AjaxRequestHandler, ApiService, ArrayUtils, AsyncMethodBase, AsyncMethodDirective, AuthGuard, BASE_CONFIG, BackgroundDirective, BaseHttpClient, BaseHttpService, CONFIG_SERVICE, CanvasColor, CanvasUtils, ChunkPipe, Circle, ConfigService, ConsoleToasterService, DateUtils, DynamicTableComponent, DynamicTableTemplateDirective, ERROR_HANDLER, EXPRESS_REQUEST, EntriesPipe, ErrorHandlerService, EventsService, ExtraItemPropertiesPipe, FactoryDependencies, FileSystemEntry, FileUtils, FilterPipe, FindPipe, FormatNumberPipe, FormatterService, GenericValue, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplateDirective, GlobalTemplatePipe, GlobalTemplateService, GroupByPipe, HttpPromise, ICON_SERVICE, IConfiguration, IconDirective, IconService, Initializer, IsTypePipe, JSONfn, JoinPipe, KeysPipe, LANGUAGE_SERVICE, LanguageService, LoaderUtils, LocalHttpService, MapPipe, MathUtils, MaxPipe, MinPipe, NgxTemplateOutletDirective, NgxUtilsModule, OPTIONS_TOKEN, ObjectType, ObjectUtils, ObservableUtils, OpenApiService, PROMISE_SERVICE, PaginationDirective, PaginationItemContext, PaginationItemDirective, PaginationMenuComponent, Point, PopPipe, PromiseService, RESIZE_DELAY, RESIZE_STRATEGY, ROOT_ELEMENT, Rect, ReducePipe, ReflectUtils, RemapPipe, ReplacePipe, ResizeEventPlugin, ResourceIfContext, ResourceIfDirective, ReversePipe, RoundPipe, SCRIPT_PARAMS, SafeHtmlPipe, ScrollEventPlugin, SetUtils, ShiftPipe, SplitPipe, StateService, StaticAuthService, StaticLanguageService, StickyClassDirective, StickyDirective, StorageMode, StorageService, StringUtils, TOASTER_SERVICE, TimerUtils, TranslatePipe, TranslatedUrlSerializer, UniqueUtils, UniversalService, UnorderedListComponent, UnorderedListItemDirective, UnorderedListTemplateDirective, ValuedPromise, ValuesPipe, Vector, WASI_IMPLEMENTATION, WasmService, cachedFactory, cancelablePromise, impatientPromise, provideWithOptions };
6371
+ export { API_SERVICE, APP_BASE_URL, AUTH_SERVICE, AclService, AjaxRequestHandler, ApiService, ArrayUtils, AsyncMethodBase, AsyncMethodDirective, AuthGuard, BASE_CONFIG, BackgroundDirective, BaseHttpClient, BaseHttpService, CONFIG_SERVICE, CanvasColor, CanvasUtils, ChunkPipe, Circle, ConfigService, ConsoleToasterService, DateUtils, DropdownBoxComponent, DropdownContentDirective, DropdownDirective, DropdownToggleDirective, DynamicTableComponent, DynamicTableTemplateDirective, ERROR_HANDLER, EXPRESS_REQUEST, EntriesPipe, ErrorHandlerService, EventsService, ExtraItemPropertiesPipe, FactoryDependencies, FileSystemEntry, FileUtils, FilterPipe, FindPipe, FormatNumberPipe, FormatterService, GenericValue, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplateDirective, GlobalTemplatePipe, GlobalTemplateService, GroupByPipe, HttpPromise, ICON_SERVICE, IConfiguration, IconDirective, IconService, IncludesPipe, Initializer, IsTypePipe, JSONfn, JoinPipe, KeysPipe, LANGUAGE_SERVICE, LanguageService, LoaderUtils, LocalHttpService, MapPipe, MathUtils, MaxPipe, MinPipe, NgxTemplateOutletDirective, NgxUtilsModule, OPTIONS_TOKEN, ObjectType, ObjectUtils, ObservableUtils, OpenApiService, PROMISE_SERVICE, PaginationDirective, PaginationItemContext, PaginationItemDirective, PaginationMenuComponent, Point, PopPipe, PromiseService, RESIZE_DELAY, RESIZE_STRATEGY, ROOT_ELEMENT, Rect, ReducePipe, ReflectUtils, RemapPipe, ReplacePipe, ResizeEventPlugin, ResourceIfContext, ResourceIfDirective, ReversePipe, RoundPipe, SCRIPT_PARAMS, SafeHtmlPipe, ScrollEventPlugin, SetUtils, ShiftPipe, SplitPipe, StateService, StaticAuthService, StaticLanguageService, StickyClassDirective, StickyDirective, StorageMode, StorageService, StringUtils, TOASTER_SERVICE, TimerUtils, TranslatePipe, TranslatedUrlSerializer, UniqueUtils, UniversalService, UnorderedListComponent, UnorderedListItemDirective, UnorderedListTemplateDirective, ValuedPromise, ValuesPipe, Vector, WASI_IMPLEMENTATION, WasmService, cachedFactory, cancelablePromise, getCssVariables, impatientPromise, provideWithOptions };
5882
6372
  //# sourceMappingURL=stemy-ngx-utils.mjs.map