@mediusinc/mng-commons 7.0.0-rc.1 → 7.0.0-rc.2

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 (37) hide show
  1. package/core/index.d.ts +24 -4
  2. package/fesm2022/mediusinc-mng-commons-core.mjs +108 -72
  3. package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
  4. package/fesm2022/mediusinc-mng-commons-filter.mjs +16 -0
  5. package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
  6. package/fesm2022/mediusinc-mng-commons-form-api.mjs.map +1 -1
  7. package/fesm2022/mediusinc-mng-commons-form.mjs +406 -49
  8. package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
  9. package/fesm2022/mediusinc-mng-commons-model-class.mjs.map +1 -1
  10. package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
  11. package/fesm2022/mediusinc-mng-commons-table-api-class.mjs.map +1 -1
  12. package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
  13. package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-BQ99oqWO.mjs +30 -0
  14. package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-BQ99oqWO.mjs.map +1 -0
  15. package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-BLuM5Kpu.mjs +2700 -0
  16. package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-BLuM5Kpu.mjs.map +1 -0
  17. package/fesm2022/mediusinc-mng-commons-table.mjs +1 -1
  18. package/fesm2022/mediusinc-mng-commons-tableview-api-class.mjs.map +1 -1
  19. package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +31 -3
  20. package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
  21. package/fesm2022/mediusinc-mng-commons-tableview.mjs +155 -123
  22. package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
  23. package/fesm2022/mediusinc-mng-commons.mjs.map +1 -1
  24. package/filter/index.d.ts +13 -0
  25. package/form/index.d.ts +109 -22
  26. package/i18n/en.json +12 -1
  27. package/i18n/sl.json +12 -1
  28. package/package.json +24 -24
  29. package/table/api/index.d.ts +2 -2
  30. package/table/index.d.ts +97 -29
  31. package/tableview/api/index.d.ts +17 -2
  32. package/tableview/index.d.ts +7 -1
  33. package/version-info.json +6 -6
  34. package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-0Dtv48mq.mjs +0 -30
  35. package/fesm2022/mediusinc-mng-commons-table-column-toggle.component-0Dtv48mq.mjs.map +0 -1
  36. package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-BsAwyXiN.mjs +0 -2417
  37. package/fesm2022/mediusinc-mng-commons-table-mediusinc-mng-commons-table-BsAwyXiN.mjs.map +0 -1
@@ -0,0 +1,30 @@
1
+ import { NgClass } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import * as i1 from '@angular/forms';
5
+ import { FormsModule } from '@angular/forms';
6
+ import { TranslatePipe } from '@ngx-translate/core';
7
+ import { Button } from 'primeng/button';
8
+ import { MultiSelect } from 'primeng/multiselect';
9
+ import { Tooltip } from 'primeng/tooltip';
10
+ import { I18nPropertyPipe } from '@mediusinc/mng-commons/core';
11
+ import { T as TableMetadataService, a as TablePreferencesService } from './mediusinc-mng-commons-table-mediusinc-mng-commons-table-BLuM5Kpu.mjs';
12
+
13
+ class TableColumnToggleComponent {
14
+ constructor() {
15
+ this.metadata = inject(TableMetadataService);
16
+ this.prefs = inject(TablePreferencesService);
17
+ // data source inputs
18
+ this.columns = input.required(...(ngDevMode ? [{ debugName: "columns" }] : []));
19
+ this.anyColumnVisible = computed(() => this.columns().length > 0, ...(ngDevMode ? [{ debugName: "anyColumnVisible" }] : []));
20
+ }
21
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableColumnToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: TableColumnToggleComponent, isStandalone: true, selector: "mng-table-column-toggle", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<p-multiSelect\n #columnToggleMultiselect\n styleClass=\"p-button-primary mng-table-columns-multiselect\"\n appendTo=\"body\"\n dataKey=\"id\"\n tooltipPosition=\"left\"\n placeholder=\"\"\n dropdownIcon=\"pi pi-sliders-h\"\n [filter]=\"false\"\n [options]=\"prefs.columnsWithPrefs()\"\n [ngModel]=\"columns()\"\n [pTooltip]=\"'mngTable.adjustTable' | translate\"\n [displaySelectedLabel]=\"false\"\n (onChange)=\"prefs.onColumnToggle($event)\">\n <ng-template #filter>\n <div class=\"flex w-full justify-between items-center\">\n <div class=\"p-checkbox\">\n <div class=\"p-hidden-accessible\">\n <input type=\"checkbox\" readonly=\"readonly\" [checked]=\"columnToggleMultiselect.allSelected\" (keydown.space)=\"columnToggleMultiselect.onToggleAll($event)\" />\n </div>\n <div\n class=\"p-checkbox-box cursor-pointer\"\n role=\"checkbox\"\n [attr.aria-checked]=\"columnToggleMultiselect.allSelected\"\n [class.p-select-option-selected]=\"anyColumnVisible()\"\n (click)=\"prefs.onColumnToggleAll()\">\n <span class=\"p-checkbox-icon\" [ngClass]=\"{'pi pi-check': anyColumnVisible()}\"></span>\n </div>\n </div>\n <p-button\n icon=\"pi pi-replay\"\n severity=\"secondary\"\n text=\"true\"\n tooltipPosition=\"left\"\n [pTooltip]=\"'mngTable.resetLayout' | translate\"\n (click)=\"prefs.clearLayoutPreferences()\"></p-button>\n </div>\n </ng-template>\n <ng-template #item let-item>\n {{\n (item.descriptor.title && !item.descriptor.titleUseModelBase\n ? item.descriptor.title\n : (item.descriptor.title ?? item.descriptor.property | mngI18nProperty: metadata.descriptor().model)\n ) | translate\n }}\n </ng-template>\n</p-multiSelect>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: I18nPropertyPipe, name: "mngI18nProperty" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
23
+ }
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TableColumnToggleComponent, decorators: [{
25
+ type: Component,
26
+ args: [{ selector: 'mng-table-column-toggle', imports: [I18nPropertyPipe, NgClass, MultiSelect, FormsModule, TranslatePipe, Tooltip, Button], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-multiSelect\n #columnToggleMultiselect\n styleClass=\"p-button-primary mng-table-columns-multiselect\"\n appendTo=\"body\"\n dataKey=\"id\"\n tooltipPosition=\"left\"\n placeholder=\"\"\n dropdownIcon=\"pi pi-sliders-h\"\n [filter]=\"false\"\n [options]=\"prefs.columnsWithPrefs()\"\n [ngModel]=\"columns()\"\n [pTooltip]=\"'mngTable.adjustTable' | translate\"\n [displaySelectedLabel]=\"false\"\n (onChange)=\"prefs.onColumnToggle($event)\">\n <ng-template #filter>\n <div class=\"flex w-full justify-between items-center\">\n <div class=\"p-checkbox\">\n <div class=\"p-hidden-accessible\">\n <input type=\"checkbox\" readonly=\"readonly\" [checked]=\"columnToggleMultiselect.allSelected\" (keydown.space)=\"columnToggleMultiselect.onToggleAll($event)\" />\n </div>\n <div\n class=\"p-checkbox-box cursor-pointer\"\n role=\"checkbox\"\n [attr.aria-checked]=\"columnToggleMultiselect.allSelected\"\n [class.p-select-option-selected]=\"anyColumnVisible()\"\n (click)=\"prefs.onColumnToggleAll()\">\n <span class=\"p-checkbox-icon\" [ngClass]=\"{'pi pi-check': anyColumnVisible()}\"></span>\n </div>\n </div>\n <p-button\n icon=\"pi pi-replay\"\n severity=\"secondary\"\n text=\"true\"\n tooltipPosition=\"left\"\n [pTooltip]=\"'mngTable.resetLayout' | translate\"\n (click)=\"prefs.clearLayoutPreferences()\"></p-button>\n </div>\n </ng-template>\n <ng-template #item let-item>\n {{\n (item.descriptor.title && !item.descriptor.titleUseModelBase\n ? item.descriptor.title\n : (item.descriptor.title ?? item.descriptor.property | mngI18nProperty: metadata.descriptor().model)\n ) | translate\n }}\n </ng-template>\n</p-multiSelect>\n" }]
27
+ }], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }] } });
28
+
29
+ export { TableColumnToggleComponent };
30
+ //# sourceMappingURL=mediusinc-mng-commons-table-column-toggle.component-BQ99oqWO.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mediusinc-mng-commons-table-column-toggle.component-BQ99oqWO.mjs","sources":["../../table/src/components/column-toggle/column-toggle.component.ts","../../table/src/components/column-toggle/column-toggle.component.html"],"sourcesContent":["import {NgClass} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, computed, inject, input} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\n\nimport {TranslatePipe} from '@ngx-translate/core';\nimport {Button} from 'primeng/button';\nimport {MultiSelect} from 'primeng/multiselect';\nimport {Tooltip} from 'primeng/tooltip';\n\nimport {I18nPropertyPipe} from '@mediusinc/mng-commons/core';\n\nimport {ColumnWithPreferences} from '../../models/column-preferences.model';\nimport {TableMetadataService} from '../../services/table-metadata.service';\nimport {TablePreferencesService} from '../../services/table-preferences.service';\n\n@Component({\n selector: 'mng-table-column-toggle',\n templateUrl: './column-toggle.component.html',\n imports: [I18nPropertyPipe, NgClass, MultiSelect, FormsModule, TranslatePipe, Tooltip, Button],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TableColumnToggleComponent {\n protected readonly metadata = inject(TableMetadataService);\n protected readonly prefs = inject(TablePreferencesService);\n\n // data source inputs\n public readonly columns = input.required<ColumnWithPreferences[]>();\n\n protected anyColumnVisible = computed(() => this.columns().length > 0);\n}\n","<p-multiSelect\n #columnToggleMultiselect\n styleClass=\"p-button-primary mng-table-columns-multiselect\"\n appendTo=\"body\"\n dataKey=\"id\"\n tooltipPosition=\"left\"\n placeholder=\"\"\n dropdownIcon=\"pi pi-sliders-h\"\n [filter]=\"false\"\n [options]=\"prefs.columnsWithPrefs()\"\n [ngModel]=\"columns()\"\n [pTooltip]=\"'mngTable.adjustTable' | translate\"\n [displaySelectedLabel]=\"false\"\n (onChange)=\"prefs.onColumnToggle($event)\">\n <ng-template #filter>\n <div class=\"flex w-full justify-between items-center\">\n <div class=\"p-checkbox\">\n <div class=\"p-hidden-accessible\">\n <input type=\"checkbox\" readonly=\"readonly\" [checked]=\"columnToggleMultiselect.allSelected\" (keydown.space)=\"columnToggleMultiselect.onToggleAll($event)\" />\n </div>\n <div\n class=\"p-checkbox-box cursor-pointer\"\n role=\"checkbox\"\n [attr.aria-checked]=\"columnToggleMultiselect.allSelected\"\n [class.p-select-option-selected]=\"anyColumnVisible()\"\n (click)=\"prefs.onColumnToggleAll()\">\n <span class=\"p-checkbox-icon\" [ngClass]=\"{'pi pi-check': anyColumnVisible()}\"></span>\n </div>\n </div>\n <p-button\n icon=\"pi pi-replay\"\n severity=\"secondary\"\n text=\"true\"\n tooltipPosition=\"left\"\n [pTooltip]=\"'mngTable.resetLayout' | translate\"\n (click)=\"prefs.clearLayoutPreferences()\"></p-button>\n </div>\n </ng-template>\n <ng-template #item let-item>\n {{\n (item.descriptor.title && !item.descriptor.titleUseModelBase\n ? item.descriptor.title\n : (item.descriptor.title ?? item.descriptor.property | mngI18nProperty: metadata.descriptor().model)\n ) | translate\n }}\n </ng-template>\n</p-multiSelect>\n"],"names":[],"mappings":";;;;;;;;;;;;MAqBa,0BAA0B,CAAA;AANvC,IAAA,WAAA,GAAA;AAOuB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAA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