@stemy/ngx-utils 17.2.0 → 17.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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/dropdown-content.directive.mjs +152 -0
  6. package/esm2022/ngx-utils/directives/dropdown-toggle.directive.mjs +46 -0
  7. package/esm2022/ngx-utils/directives/dropdown.directive.mjs +157 -0
  8. package/esm2022/ngx-utils/ngx-utils.imports.mjs +11 -1
  9. package/esm2022/ngx-utils/ngx-utils.module.mjs +42 -37
  10. package/esm2022/ngx-utils/pipes/includes.pipe.mjs +21 -0
  11. package/esm2022/ngx-utils/utils/file-system.mjs +19 -5
  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 +543 -63
  15. package/fesm2022/stemy-ngx-utils.mjs.map +1 -1
  16. package/ngx-utils/common-types.d.ts +1 -1
  17. package/ngx-utils/components/dropdown-box/dropdown-box.component.d.ts +55 -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/dropdown-content.directive.d.ts +22 -0
  21. package/ngx-utils/directives/dropdown-toggle.directive.d.ts +16 -0
  22. package/ngx-utils/directives/dropdown.directive.d.ts +56 -0
  23. package/ngx-utils/ngx-utils.imports.d.ts +9 -4
  24. package/ngx-utils/ngx-utils.module.d.ts +42 -37
  25. package/ngx-utils/pipes/includes.pipe.d.ts +8 -0
  26. package/ngx-utils/utils/file-system.d.ts +1 -1
  27. package/ngx-utils/utils/misc.d.ts +1 -0
  28. package/package.json +2 -1
  29. package/public_api.d.ts +6 -0
@@ -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, 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 { 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
 
@@ -1616,7 +1617,7 @@ class FileSystemEntry {
1616
1617
  get parent() {
1617
1618
  return this.level === 0 ? null : this.path[this.level - 1] || null;
1618
1619
  }
1619
- constructor(label, meta, image, data, openCb, parent = null) {
1620
+ constructor(label, meta, image, data, openCb, parent = null, classes) {
1620
1621
  this.label = label;
1621
1622
  this.meta = meta;
1622
1623
  this.image = image;
@@ -1624,9 +1625,22 @@ class FileSystemEntry {
1624
1625
  this.openCb = openCb;
1625
1626
  this.path = !parent ? [this] : parent.path.concat([this]);
1626
1627
  this.level = this.path.length - 1;
1627
- this.classes = this.path
1628
- .filter(t => typeof t.data === "string" && t.data.length > 0).map(t => t.data)
1629
- .concat([`level-${this.level}`]);
1628
+ this.classes = [`level-${this.level}`].concat(classes ?? this.path
1629
+ .map(t => {
1630
+ if (ObjectUtils.isString(t.data)) {
1631
+ return t.data;
1632
+ }
1633
+ if (ObjectUtils.isObject(t.data)) {
1634
+ const list = Object.keys(t.data).map(k => {
1635
+ const value = t.data[k];
1636
+ return ObjectUtils.isString(value) && value.length > 0 && value.length < 50
1637
+ ? `${k}-${value}`
1638
+ : null;
1639
+ });
1640
+ return list.filter(i => !!i).join(" ");
1641
+ }
1642
+ return null;
1643
+ }).filter(t => !!t));
1630
1644
  }
1631
1645
  open() {
1632
1646
  this.result = this.result || this.openCb(this);
@@ -1933,6 +1947,27 @@ class MathUtils {
1933
1947
  }
1934
1948
  }
1935
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
+
1936
1971
  class TimerUtils {
1937
1972
  static createTimeout(func, time) {
1938
1973
  // @dynamic
@@ -3866,11 +3901,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3866
3901
  }]
3867
3902
  }] });
3868
3903
 
3869
- function defaultFilter$1() {
3904
+ function defaultFilter$2() {
3870
3905
  return true;
3871
3906
  }
3872
3907
  class FilterPipe {
3873
- transform(values, filter = defaultFilter$1, params = {}) {
3908
+ transform(values, filter = defaultFilter$2, params = {}) {
3874
3909
  const isObject = ObjectUtils.isObject(values);
3875
3910
  if (!isObject && !ObjectUtils.isArray(values))
3876
3911
  return [];
@@ -3900,11 +3935,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3900
3935
  }]
3901
3936
  }] });
3902
3937
 
3903
- function defaultFilter() {
3938
+ function defaultFilter$1() {
3904
3939
  return true;
3905
3940
  }
3906
3941
  class FindPipe {
3907
- transform(values, filter = defaultFilter, params) {
3942
+ transform(values, filter = defaultFilter$1, params) {
3908
3943
  if (!ObjectUtils.isArray(values))
3909
3944
  return [];
3910
3945
  params = params || {};
@@ -4044,6 +4079,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
4044
4079
  }]
4045
4080
  }] });
4046
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
+
4047
4100
  class IsTypePipe {
4048
4101
  transform(value, type) {
4049
4102
  return (typeof value) === type;
@@ -4593,6 +4646,345 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
4593
4646
  type: Input
4594
4647
  }] } });
4595
4648
 
4649
+ class DropdownDirective {
4650
+ static { this.active = null; }
4651
+ get nativeElement() {
4652
+ return this.element.nativeElement;
4653
+ }
4654
+ get isOpened() {
4655
+ return this.opened;
4656
+ }
4657
+ get getDisabled() {
4658
+ return this.disabled;
4659
+ }
4660
+ set isDisabled(value) {
4661
+ this.disabled = value;
4662
+ if (!value)
4663
+ return;
4664
+ this.hide();
4665
+ }
4666
+ constructor(element) {
4667
+ this.element = element;
4668
+ this.opened = false;
4669
+ this.disabled = false;
4670
+ this.closeInside = true;
4671
+ this.attachToRoot = true;
4672
+ this.mobileViewUnder = 0;
4673
+ this.keyboardHandler = true;
4674
+ this.onShown = new EventEmitter();
4675
+ this.onHidden = new EventEmitter();
4676
+ this.onKeyboard = new EventEmitter();
4677
+ this.onClick = (event) => {
4678
+ // We don't care about clicks with right/center mouse buttons
4679
+ if (event.button)
4680
+ return;
4681
+ const target = (event.composedPath()?.shift() || event.target);
4682
+ // If blocked closing inside we only consider inside if the target is not directly the contentElement
4683
+ // We only have a contentElement in case when we are using *dropdownContent directive
4684
+ if (!this.closeInside && (!this.contentElement || target !== this.contentElement)) {
4685
+ // Try to determine if we are inside by collecting the possible parent elements to check
4686
+ const parents = !this.contentElement ? [] : Array.from(this.contentElement.childNodes);
4687
+ if (this.nativeElement) {
4688
+ parents.push(this.nativeElement);
4689
+ }
4690
+ // If one of the parents contains the target then we clicked inside
4691
+ if (parents.some(child => child.contains(target)))
4692
+ return;
4693
+ }
4694
+ setTimeout(() => this.hide(), event.type == "touchend" ? 250 : 100);
4695
+ };
4696
+ this.onKeyDown = (event) => {
4697
+ const input = event.target;
4698
+ const notInput = input && input.tagName !== "INPUT" && input.tagName !== "TEXTAREA";
4699
+ if ("Tab" === event.key || !input || notInput) {
4700
+ event.stopPropagation();
4701
+ event.preventDefault();
4702
+ }
4703
+ if ("Esc" === event.key || "Escape" === event.key) {
4704
+ this.hide();
4705
+ return;
4706
+ }
4707
+ this.onKeyboard.emit(event);
4708
+ };
4709
+ }
4710
+ ngOnDestroy() {
4711
+ if (DropdownDirective.active === this) {
4712
+ DropdownDirective.active = null;
4713
+ this.onHidden.emit(this);
4714
+ }
4715
+ }
4716
+ showEvent() {
4717
+ this.onShown.emit(this);
4718
+ }
4719
+ hideEvent() {
4720
+ this.onHidden.emit(this);
4721
+ }
4722
+ show($event) {
4723
+ if (this.opened)
4724
+ return;
4725
+ if ($event) {
4726
+ if (!this.keyboardHandler)
4727
+ return true;
4728
+ $event.preventDefault();
4729
+ }
4730
+ if (this.disabled)
4731
+ return true;
4732
+ this.opened = true;
4733
+ this.showEvent();
4734
+ DropdownDirective.active = this;
4735
+ // Prevent toggle from selecting an item right after it is shown
4736
+ setTimeout(() => {
4737
+ if (!this.opened)
4738
+ return;
4739
+ document.addEventListener("click", this.onClick);
4740
+ document.addEventListener("keydown", this.onKeyDown);
4741
+ }, 10);
4742
+ return true;
4743
+ }
4744
+ hide() {
4745
+ if (!this.opened)
4746
+ return true;
4747
+ this.opened = false;
4748
+ this.hideEvent();
4749
+ document.removeEventListener("click", this.onClick);
4750
+ document.removeEventListener("keydown", this.onKeyDown);
4751
+ // Prevent toggle from refocus itself after it is hidden because of another toggle
4752
+ setTimeout(() => {
4753
+ if (DropdownDirective.active === this) {
4754
+ DropdownDirective.active = null;
4755
+ this.nativeElement?.focus();
4756
+ }
4757
+ }, 10);
4758
+ return true;
4759
+ }
4760
+ 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 }); }
4761
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: DropdownDirective, selector: "[dd],[drop-down]", inputs: { closeInside: "closeInside", attachToRoot: "attachToRoot", 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 }); }
4762
+ }
4763
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownDirective, decorators: [{
4764
+ type: Directive,
4765
+ args: [{
4766
+ standalone: false,
4767
+ selector: "[dd],[drop-down]",
4768
+ exportAs: "dropdown"
4769
+ }]
4770
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { closeInside: [{
4771
+ type: Input
4772
+ }], attachToRoot: [{
4773
+ type: Input
4774
+ }], placement: [{
4775
+ type: Input
4776
+ }], autoPlacement: [{
4777
+ type: Input
4778
+ }], mobileViewUnder: [{
4779
+ type: Input
4780
+ }], keyboardHandler: [{
4781
+ type: Input
4782
+ }], onShown: [{
4783
+ type: Output
4784
+ }], onHidden: [{
4785
+ type: Output
4786
+ }], onKeyboard: [{
4787
+ type: Output
4788
+ }], isOpened: [{
4789
+ type: HostBinding,
4790
+ args: ["class.open"]
4791
+ }], getDisabled: [{
4792
+ type: HostBinding,
4793
+ args: ["class.disabled"]
4794
+ }], isDisabled: [{
4795
+ type: Input
4796
+ }], show: [{
4797
+ type: HostListener,
4798
+ args: ["keydown.enter", ["$event"]]
4799
+ }, {
4800
+ type: HostListener,
4801
+ args: ["keydown.space", ["$event"]]
4802
+ }] } });
4803
+
4804
+ const rectProps = ["x", "y", "width", "height"];
4805
+ class DropdownContentDirective {
4806
+ constructor(vcr, rootElem, dropdown, templateRef) {
4807
+ this.vcr = vcr;
4808
+ this.rootElem = rootElem;
4809
+ this.dropdown = dropdown;
4810
+ this.templateRef = templateRef;
4811
+ if (!this.dropdown) {
4812
+ throw new Error("DropdownDirective is required! Please use it inside a dd, drop-down directive attribute");
4813
+ }
4814
+ if (!this.templateRef) {
4815
+ throw new Error("TemplateRef is required! Please use with *dropdownContent");
4816
+ }
4817
+ this.lastPlacement = null;
4818
+ }
4819
+ ngOnInit() {
4820
+ this.subscription = ObservableUtils.multiSubscription(this.dropdown.onShown.subscribe(() => this.createView()), this.dropdown.onHidden.subscribe(() => this.destroyView()));
4821
+ }
4822
+ ngOnDestroy() {
4823
+ // this.observer?.unobserve(this.element.nativeElement);
4824
+ this.subscription?.unsubscribe();
4825
+ this.destroyView();
4826
+ }
4827
+ createView(init = false) {
4828
+ const mobileWidth = this.dropdown.mobileViewUnder || 0;
4829
+ const ref = this.dropdown.nativeElement;
4830
+ const content = this.createWrapper();
4831
+ this.dropdown.contentElement = content;
4832
+ // Set up floating UI positioning settings
4833
+ const placement = this.dropdown.placement || "bottom";
4834
+ const strategy = this.dropdown.attachToRoot && this.rootElem ? "fixed" : "absolute";
4835
+ const middleware = [];
4836
+ if (this.dropdown.autoPlacement) {
4837
+ middleware.push(autoPlacement(this.dropdown.autoPlacement));
4838
+ }
4839
+ // Set up floating UI auto update
4840
+ this.cleanUp = autoUpdate(ref, content, () => {
4841
+ computePosition(ref, content, {
4842
+ strategy,
4843
+ placement,
4844
+ middleware
4845
+ }).then(({ x, y, placement }) => {
4846
+ const isMobileView = window.innerWidth <= mobileWidth;
4847
+ Object.assign(content.style, {
4848
+ opacity: init ? "0" : "1",
4849
+ position: isMobileView ? "fixed" : strategy,
4850
+ left: isMobileView ? `0px` : `${x}px`,
4851
+ right: isMobileView ? `0px` : undefined,
4852
+ top: isMobileView ? `0px` : `${y}px`,
4853
+ bottom: isMobileView ? `0px` : undefined,
4854
+ zIndex: `var(--dd-z-index, 100)`
4855
+ });
4856
+ const refRect = ref.getBoundingClientRect();
4857
+ const contentRect = content.getBoundingClientRect();
4858
+ const lastPlacement = this.lastPlacement;
4859
+ const newPlacement = `dropdown-placement-${placement}`;
4860
+ if (lastPlacement) {
4861
+ ref.classList.replace(lastPlacement, newPlacement);
4862
+ content.classList.replace(lastPlacement, newPlacement);
4863
+ }
4864
+ else {
4865
+ ref.classList.add(newPlacement);
4866
+ content.classList.add(newPlacement);
4867
+ }
4868
+ if (isMobileView) {
4869
+ content.classList.add(`dropdown-content-mobile`);
4870
+ }
4871
+ else {
4872
+ content.classList.remove(`dropdown-content-mobile`);
4873
+ }
4874
+ rectProps.forEach(prop => {
4875
+ content.style.setProperty(`--toggle-${prop}`, `${refRect[prop]}px`);
4876
+ ref.style.setProperty(`--content-${prop}`, `${contentRect[prop]}px`);
4877
+ });
4878
+ this.lastPlacement = newPlacement;
4879
+ });
4880
+ });
4881
+ }
4882
+ destroyView() {
4883
+ this.vcr.clear();
4884
+ this.dropdown.contentElement?.remove();
4885
+ this.cleanUp?.();
4886
+ }
4887
+ createWrapper() {
4888
+ const wrapper = document.createElement("div");
4889
+ const ref = this.vcr.createEmbeddedView(this.templateRef);
4890
+ ref.rootNodes.forEach(node => wrapper.appendChild(node));
4891
+ if (this.dropdown.attachToRoot && this.rootElem) {
4892
+ this.rootElem.appendChild(wrapper);
4893
+ const referenceStyles = getCssVariables(this.dropdown.nativeElement);
4894
+ const wrapperStyles = getCssVariables(wrapper);
4895
+ Object.keys(referenceStyles).forEach(key => {
4896
+ if (!wrapperStyles[key]) {
4897
+ wrapper.style.setProperty(key, referenceStyles[key]);
4898
+ }
4899
+ });
4900
+ }
4901
+ else {
4902
+ const anchor = this.vcr.element.nativeElement;
4903
+ anchor?.parentElement?.appendChild(wrapper);
4904
+ }
4905
+ const autoPlacement = this.dropdown.autoPlacement;
4906
+ if (this.lastPlacement) {
4907
+ wrapper.classList.add(this.lastPlacement);
4908
+ }
4909
+ if (autoPlacement) {
4910
+ const vertical = autoPlacement.allowedPlacements.some(p => p.includes("top") || p.includes("bottom"));
4911
+ const horizontal = autoPlacement.allowedPlacements.some(p => p.includes("left") || p.includes("right"));
4912
+ if (vertical && horizontal) {
4913
+ wrapper.classList.add(`dropdown-content-axis-both`);
4914
+ }
4915
+ else {
4916
+ const axis = vertical ? "vertical" : "horizontal";
4917
+ wrapper.classList.add(`dropdown-content-axis-${axis}`);
4918
+ }
4919
+ }
4920
+ wrapper.classList.add("dropdown-content-wrap");
4921
+ return wrapper;
4922
+ }
4923
+ initialize() {
4924
+ this.createView(true);
4925
+ setTimeout(() => this.destroyView());
4926
+ }
4927
+ 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 }); }
4928
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: DropdownContentDirective, selector: "[dropdownContent]", exportAs: ["dropdown-content"], ngImport: i0 }); }
4929
+ }
4930
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownContentDirective, decorators: [{
4931
+ type: Directive,
4932
+ args: [{
4933
+ standalone: false,
4934
+ selector: "[dropdownContent]",
4935
+ exportAs: "dropdown-content",
4936
+ }]
4937
+ }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: HTMLElement, decorators: [{
4938
+ type: Optional
4939
+ }, {
4940
+ type: Inject,
4941
+ args: [ROOT_ELEMENT]
4942
+ }] }, { type: DropdownDirective, decorators: [{
4943
+ type: Optional
4944
+ }] }, { type: i0.TemplateRef, decorators: [{
4945
+ type: Optional
4946
+ }] }] });
4947
+
4948
+ class DropdownToggleDirective extends AsyncMethodBase {
4949
+ constructor(element, dropdown, toaster, cdr) {
4950
+ super(toaster, cdr);
4951
+ this.element = element;
4952
+ this.dropdown = dropdown;
4953
+ this.switch = true;
4954
+ }
4955
+ getMethod() {
4956
+ return this.beforeOpen;
4957
+ }
4958
+ callMethod() {
4959
+ if (this.dropdown.isOpened) {
4960
+ if (!this.switch)
4961
+ return true;
4962
+ this.dropdown.hide();
4963
+ }
4964
+ else if (!super.callMethod()) {
4965
+ this.dropdown.show();
4966
+ }
4967
+ return true;
4968
+ }
4969
+ 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 }); }
4970
+ 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 }); }
4971
+ }
4972
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownToggleDirective, decorators: [{
4973
+ type: Directive,
4974
+ args: [{
4975
+ standalone: false,
4976
+ selector: "[dropdownToggle]",
4977
+ exportAs: "dropdown-toggle",
4978
+ }]
4979
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: DropdownDirective }, { type: undefined, decorators: [{
4980
+ type: Inject,
4981
+ args: [TOASTER_SERVICE]
4982
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { beforeOpen: [{
4983
+ type: Input
4984
+ }], switch: [{
4985
+ type: Input
4986
+ }] } });
4987
+
4596
4988
  class DynamicTableTemplateDirective {
4597
4989
  constructor(ref) {
4598
4990
  this.ref = ref;
@@ -5169,6 +5561,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
5169
5561
  args: ["defaultItemTemplate"]
5170
5562
  }] } });
5171
5563
 
5564
+ class DropdownBoxComponent {
5565
+ constructor() {
5566
+ this.closeInside = true;
5567
+ this.attachToRoot = true;
5568
+ this.placement = "bottom";
5569
+ this.crossAxis = false;
5570
+ this.autoAlignment = true;
5571
+ this.allowedPlacements = ["top", "bottom"];
5572
+ this.componentClass = "drop";
5573
+ this.makeAutoPlacementOpts();
5574
+ }
5575
+ makeAutoPlacementOpts() {
5576
+ this.autoPlacement = {
5577
+ crossAxis: this.crossAxis,
5578
+ alignment: this.alignment,
5579
+ autoAlignment: this.autoAlignment,
5580
+ allowedPlacements: this.allowedPlacements,
5581
+ };
5582
+ }
5583
+ ngAfterViewInit() {
5584
+ this.content.initialize();
5585
+ }
5586
+ ngOnChanges() {
5587
+ this.makeAutoPlacementOpts();
5588
+ }
5589
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5590
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DropdownBoxComponent, selector: "dropdown-box", inputs: { closeInside: "closeInside", attachToRoot: "attachToRoot", 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 [attachToRoot]=\"attachToRoot\"\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", "attachToRoot", "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 }); }
5591
+ }
5592
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DropdownBoxComponent, decorators: [{
5593
+ type: Component,
5594
+ args: [{ standalone: false, encapsulation: ViewEncapsulation.None, selector: "dropdown-box", template: "<div dd class=\"dropdown-box\"\n [ngClass]=\"componentClass\"\n [closeInside]=\"closeInside\"\n [attachToRoot]=\"attachToRoot\"\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"] }]
5595
+ }], ctorParameters: () => [], propDecorators: { closeInside: [{
5596
+ type: Input
5597
+ }], attachToRoot: [{
5598
+ type: Input
5599
+ }], placement: [{
5600
+ type: Input
5601
+ }], crossAxis: [{
5602
+ type: Input
5603
+ }], alignment: [{
5604
+ type: Input
5605
+ }], autoAlignment: [{
5606
+ type: Input
5607
+ }], allowedPlacements: [{
5608
+ type: Input
5609
+ }], componentClass: [{
5610
+ type: Input
5611
+ }], content: [{
5612
+ type: ViewChild,
5613
+ args: [DropdownContentDirective]
5614
+ }] } });
5615
+
5172
5616
  class PaginationMenuComponent {
5173
5617
  get hasPrev() {
5174
5618
  return this.pagination.page > 1;
@@ -5176,24 +5620,15 @@ class PaginationMenuComponent {
5176
5620
  get hasNext() {
5177
5621
  return this.pagination.page < this.pagination.maxPage;
5178
5622
  }
5179
- constructor(state, pagination, icons) {
5623
+ constructor(state, pagination) {
5180
5624
  this.state = state;
5181
5625
  this.pagination = pagination;
5182
- this.icons = icons;
5183
5626
  this.maxSize = 5;
5184
5627
  this.directionLinks = true;
5185
5628
  this.boundaryLinks = true;
5186
- this.firstLabel = `<<`;
5187
- this.prevLabel = `<`;
5188
- this.nextLabel = `>`;
5189
- this.lastLabel = `>>`;
5190
5629
  }
5191
5630
  ngOnInit() {
5192
5631
  this.onRefresh = this.pagination.onRefresh.subscribe(() => this.setPages());
5193
- this.setIcon("firstLabel", "first-page");
5194
- this.setIcon("prevLabel", "prev-page");
5195
- this.setIcon("nextLabel", "next-page");
5196
- this.setIcon("lastLabel", "last-page");
5197
5632
  }
5198
5633
  ngOnDestroy() {
5199
5634
  if (!this.onRefresh)
@@ -5218,13 +5653,6 @@ class PaginationMenuComponent {
5218
5653
  const path = StateService.toPath(this.state.route, params);
5219
5654
  this.state.navigateByUrl(path);
5220
5655
  }
5221
- setIcon(labelName, icon) {
5222
- this.icons.getIcon(icon, icon, false).then(i => {
5223
- if (i == icon)
5224
- return;
5225
- this[labelName] = i;
5226
- });
5227
- }
5228
5656
  setPages() {
5229
5657
  if (!this.pagination)
5230
5658
  return;
@@ -5241,16 +5669,13 @@ class PaginationMenuComponent {
5241
5669
  }
5242
5670
  this.pages = pages;
5243
5671
  }
5244
- 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 }); }
5245
- 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" }] }); }
5672
+ 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 }); }
5673
+ 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 }); }
5246
5674
  }
5247
5675
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaginationMenuComponent, decorators: [{
5248
5676
  type: Component,
5249
- 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" }]
5250
- }], ctorParameters: () => [{ type: StateService }, { type: PaginationDirective }, { type: undefined, decorators: [{
5251
- type: Inject,
5252
- args: [ICON_SERVICE]
5253
- }] }], propDecorators: { maxSize: [{
5677
+ 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"] }]
5678
+ }], ctorParameters: () => [{ type: StateService }, { type: PaginationDirective }], propDecorators: { maxSize: [{
5254
5679
  type: Input
5255
5680
  }], urlParam: [{
5256
5681
  type: Input
@@ -5269,7 +5694,8 @@ class DynamicTableComponent {
5269
5694
  b = b.item ? b.item[orderBy] : null;
5270
5695
  return ObjectUtils.compare(a, b);
5271
5696
  }
5272
- constructor() {
5697
+ constructor(element) {
5698
+ this.element = element;
5273
5699
  this.loadData = (page, itemsPerPage) => {
5274
5700
  const orderBy = this.realColumns[this.orderBy]?.sort;
5275
5701
  return this.dataLoader(page, itemsPerPage, orderBy, this.orderDescending, this.filter, this.query);
@@ -5285,6 +5711,12 @@ class DynamicTableComponent {
5285
5711
  this.titlePrefix = "label";
5286
5712
  this.realColumns = {};
5287
5713
  }
5714
+ setProperty(name, value) {
5715
+ const elem = this.element.nativeElement;
5716
+ if (!elem)
5717
+ return;
5718
+ elem.style.setProperty(`--${name}`, value);
5719
+ }
5288
5720
  ngAfterContentInit() {
5289
5721
  this.templates = this.templateDirectives.reduce((result, directive) => {
5290
5722
  if (ObjectUtils.isArray(directive.column)) {
@@ -5301,7 +5733,6 @@ class DynamicTableComponent {
5301
5733
  }
5302
5734
  ngAfterViewInit() {
5303
5735
  this.rowTemplate = this.rowTemplate || this.defaultRowTemplate;
5304
- this.filterTemplate = this.filterTemplate || this.defaultFilterTemplate;
5305
5736
  }
5306
5737
  ngOnChanges(changes) {
5307
5738
  if (changes.columns) {
@@ -5319,13 +5750,24 @@ class DynamicTableComponent {
5319
5750
  return result;
5320
5751
  }, {});
5321
5752
  this.cols = Object.keys(this.realColumns);
5322
- this.orderBy = this.orderBy in this.realColumns ? this.orderBy : this.cols[0];
5753
+ const sortable = this.cols.filter(c => this.realColumns[c].sort);
5754
+ const query = this.query || {};
5755
+ this.orderBy = sortable.includes(this.orderBy) ? this.orderBy : sortable[0] || null;
5756
+ this.query = this.cols.reduce((res, col) => {
5757
+ const value = query[col];
5758
+ if (!value)
5759
+ return res;
5760
+ res[col] = value;
5761
+ return res;
5762
+ }, {});
5763
+ this.setProperty("cell-width", MathUtils.round(100 / this.cols.length, 4) + "%");
5323
5764
  }
5324
5765
  this.hasQuery = this.cols.some(col => this.realColumns[col].filter);
5325
- if (changes.orderBy && this.realColumns) {
5326
- this.orderBy = this.orderBy in this.realColumns ? this.orderBy : this.cols[0];
5766
+ if (changes.orderBy && this.realColumns && this.cols) {
5767
+ const sortable = this.cols.filter(c => this.realColumns[c].sort);
5768
+ this.orderBy = this.orderBy in sortable ? this.orderBy : sortable[0] || null;
5327
5769
  }
5328
- if (!changes.data && !changes.parallelData && !changes.itemsPerPage && !changes.orderBy && !changes.orderDescending)
5770
+ if (!changes.data && !changes.parallelData && !changes.dataLoader && !changes.itemsPerPage && !changes.orderBy && !changes.orderDescending)
5329
5771
  return;
5330
5772
  this.refresh();
5331
5773
  }
@@ -5338,20 +5780,55 @@ class DynamicTableComponent {
5338
5780
  this.filter = filter;
5339
5781
  this.refresh(this.filterTime ?? 300);
5340
5782
  }
5341
- setOrder(column) {
5783
+ setSorting(column, toggle) {
5784
+ if (toggle) {
5785
+ return;
5786
+ }
5342
5787
  this.orderDescending = column == this.orderBy && !this.orderDescending;
5343
5788
  this.orderBy = column;
5344
5789
  this.refresh();
5345
5790
  }
5346
- updateQuery(col, value) {
5347
- if (!value) {
5348
- delete this.query[col];
5349
- }
5350
- else {
5351
- this.query[col] = value;
5791
+ setQueryValue(c, value) {
5792
+ const col = this.realColumns[c];
5793
+ if (!col?.filter)
5794
+ return;
5795
+ switch (col.filterType) {
5796
+ case "enum":
5797
+ const set = new Set((this.query[c] || []));
5798
+ const val = `${value}`;
5799
+ if (set.has(val)) {
5800
+ set.delete(val);
5801
+ if (set.size === 0) {
5802
+ delete this.query[c];
5803
+ break;
5804
+ }
5805
+ }
5806
+ else {
5807
+ set.add(val);
5808
+ }
5809
+ this.query[c] = Array.from(set);
5810
+ break;
5811
+ case "checkbox":
5812
+ if (this.query[c]) {
5813
+ delete this.query[c];
5814
+ break;
5815
+ }
5816
+ this.query[c] = true;
5817
+ break;
5818
+ default:
5819
+ if (!value) {
5820
+ delete this.query[c];
5821
+ break;
5822
+ }
5823
+ this.query[c] = value;
5824
+ break;
5352
5825
  }
5353
5826
  this.refresh(this.filterTime ?? 300);
5354
5827
  }
5828
+ setItemsPerPage(count) {
5829
+ this.itemsPerPage = count;
5830
+ this.refresh();
5831
+ }
5355
5832
  loadLocalData(page, rowsPerPage, orderBy, orderDescending, filter) {
5356
5833
  if (!this.data) {
5357
5834
  return Promise.resolve({
@@ -5382,20 +5859,18 @@ class DynamicTableComponent {
5382
5859
  items: items
5383
5860
  });
5384
5861
  }
5385
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DynamicTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5386
- 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" }] }); }
5862
+ 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 }); }
5863
+ 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", "attachToRoot", "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 }); }
5387
5864
  }
5388
5865
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DynamicTableComponent, decorators: [{
5389
5866
  type: Component,
5390
- 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" }]
5391
- }], ctorParameters: () => [], propDecorators: { label: [{
5392
- type: Input
5393
- }], placeholder: [{
5394
- type: Input
5395
- }], dataLoader: [{
5867
+ 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"] }]
5868
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { dataLoader: [{
5396
5869
  type: Input
5397
5870
  }], data: [{
5398
5871
  type: Input
5872
+ }], selected: [{
5873
+ type: Input
5399
5874
  }], page: [{
5400
5875
  type: Input
5401
5876
  }], urlParam: [{
@@ -5406,6 +5881,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
5406
5881
  type: Input
5407
5882
  }], showFilter: [{
5408
5883
  type: Input
5884
+ }], filterLabel: [{
5885
+ type: Input
5886
+ }], placeholder: [{
5887
+ type: Input
5888
+ }], showItems: [{
5889
+ type: Input
5409
5890
  }], itemsPerPage: [{
5410
5891
  type: Input
5411
5892
  }], updateTime: [{
@@ -5432,9 +5913,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
5432
5913
  }], wrapperTemplate: [{
5433
5914
  type: ContentChild,
5434
5915
  args: ["wrapperTemplate", { static: true }]
5435
- }], filterTemplate: [{
5436
- type: ContentChild,
5437
- args: ["filterTemplate", { static: true }]
5438
5916
  }], columnsTemplate: [{
5439
5917
  type: ViewChild,
5440
5918
  args: ["columnsTemplate", { static: true }]
@@ -5444,9 +5922,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
5444
5922
  }], defaultWrapperTemplate: [{
5445
5923
  type: ViewChild,
5446
5924
  args: ["defaultWrapperTemplate", { static: true }]
5447
- }], defaultFilterTemplate: [{
5448
- type: ViewChild,
5449
- args: ["defaultFilterTemplate", { static: true }]
5450
5925
  }], pagination: [{
5451
5926
  type: ViewChild,
5452
5927
  args: ["pagination"]
@@ -5468,6 +5943,7 @@ const pipes = [
5468
5943
  GetValuePipe,
5469
5944
  GlobalTemplatePipe,
5470
5945
  GroupByPipe,
5946
+ IncludesPipe,
5471
5947
  IsTypePipe,
5472
5948
  JoinPipe,
5473
5949
  KeysPipe,
@@ -5491,6 +5967,9 @@ const directives = [
5491
5967
  AsyncMethodBase,
5492
5968
  AsyncMethodDirective,
5493
5969
  BackgroundDirective,
5970
+ DropdownDirective,
5971
+ DropdownContentDirective,
5972
+ DropdownToggleDirective,
5494
5973
  DynamicTableTemplateDirective,
5495
5974
  GlobalTemplateDirective,
5496
5975
  IconDirective,
@@ -5505,6 +5984,7 @@ const directives = [
5505
5984
  ];
5506
5985
  // --- Components ---
5507
5986
  const components = [
5987
+ DropdownBoxComponent,
5508
5988
  DynamicTableComponent,
5509
5989
  PaginationMenuComponent,
5510
5990
  UnorderedListComponent
@@ -5834,8 +6314,8 @@ class NgxUtilsModule {
5834
6314
  constructor() {
5835
6315
  }
5836
6316
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgxUtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5837
- 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,
5838
- 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] }); }
6317
+ 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,
6318
+ 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] }); }
5839
6319
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgxUtilsModule, providers: pipes, imports: [CommonModule,
5840
6320
  FormsModule, FormsModule] }); }
5841
6321
  }
@@ -5865,5 +6345,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
5865
6345
  * Generated bundle index. Do not edit.
5866
6346
  */
5867
6347
 
5868
- 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 };
6348
+ 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 };
5869
6349
  //# sourceMappingURL=stemy-ngx-utils.mjs.map