@masterteam/properties 0.0.16 → 0.0.18
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.
- package/assets/i18n/ar.json +74 -0
- package/assets/i18n/en.json +74 -0
- package/fesm2022/masterteam-properties.mjs +138 -78
- package/fesm2022/masterteam-properties.mjs.map +1 -1
- package/index.d.ts +10 -2
- package/package.json +5 -1
|
@@ -5,17 +5,19 @@ import { Table } from '@masterteam/components/table';
|
|
|
5
5
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
6
6
|
import { HttpClient, HttpContextToken } from '@angular/common/http';
|
|
7
7
|
import { Action, Selector, State, Store, select } from '@ngxs/store';
|
|
8
|
-
import { of, startWith, map, distinctUntilChanged, Subscription } from 'rxjs';
|
|
8
|
+
import { of, finalize as finalize$1, startWith, map, distinctUntilChanged, Subscription } from 'rxjs';
|
|
9
9
|
import { tap, catchError, finalize, switchMap } from 'rxjs/operators';
|
|
10
10
|
import { Breadcrumb } from '@masterteam/components/breadcrumb';
|
|
11
11
|
import { Card } from '@masterteam/components/card';
|
|
12
12
|
import { Avatar } from '@masterteam/components/avatar';
|
|
13
13
|
import { Divider } from 'primeng/divider';
|
|
14
14
|
import { Button } from '@masterteam/components/button';
|
|
15
|
+
import * as i1 from '@jsverse/transloco';
|
|
16
|
+
import { TranslocoService, TranslocoModule } from '@jsverse/transloco';
|
|
15
17
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
16
18
|
import { DynamicForm } from '@masterteam/forms/dynamic-form';
|
|
17
19
|
import { PickListFieldConfig, ValidatorConfig } from '@masterteam/components';
|
|
18
|
-
import * as i1 from '@angular/forms';
|
|
20
|
+
import * as i1$1 from '@angular/forms';
|
|
19
21
|
import { FormGroup, FormControl, FormArray, Validators, ReactiveFormsModule, NG_VALUE_ACCESSOR, ControlContainer, FormGroupDirective } from '@angular/forms';
|
|
20
22
|
import * as i2 from 'primeng/skeleton';
|
|
21
23
|
import { SkeletonModule } from 'primeng/skeleton';
|
|
@@ -759,49 +761,74 @@ class PropertiesList {
|
|
|
759
761
|
facade = inject(PropertiesFacade);
|
|
760
762
|
router = inject(Router);
|
|
761
763
|
route = inject(ActivatedRoute);
|
|
764
|
+
transloco = inject(TranslocoService);
|
|
762
765
|
defaultTab = 'all';
|
|
763
766
|
tab = input(...(ngDevMode ? [undefined, { debugName: "tab" }] : []));
|
|
764
767
|
tabs = signal([
|
|
765
|
-
{
|
|
766
|
-
|
|
767
|
-
|
|
768
|
+
{
|
|
769
|
+
label: this.transloco.translate('properties.list.tabAll'),
|
|
770
|
+
value: 'all',
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
label: this.transloco.translate('properties.list.tabSystem'),
|
|
774
|
+
value: 'system',
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
label: this.transloco.translate('properties.list.tabCustom'),
|
|
778
|
+
value: 'custom',
|
|
779
|
+
},
|
|
768
780
|
], ...(ngDevMode ? [{ debugName: "tabs" }] : []));
|
|
769
781
|
activeTab = linkedSignal(() => {
|
|
770
782
|
return this.tab() || this.defaultTab;
|
|
771
783
|
});
|
|
772
784
|
tableColumns = signal([
|
|
773
|
-
{
|
|
774
|
-
|
|
775
|
-
|
|
785
|
+
{
|
|
786
|
+
key: 'title',
|
|
787
|
+
label: this.transloco.translate('properties.list.columnName'),
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
key: 'viewType',
|
|
791
|
+
label: this.transloco.translate('properties.list.columnType'),
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
key: 'required',
|
|
795
|
+
label: this.transloco.translate('properties.list.columnRequired'),
|
|
796
|
+
type: 'boolean',
|
|
797
|
+
},
|
|
776
798
|
], ...(ngDevMode ? [{ debugName: "tableColumns" }] : []));
|
|
777
799
|
propertyTypes = signal([
|
|
778
800
|
{
|
|
779
|
-
label: '
|
|
801
|
+
label: this.transloco.translate('properties.list.typeShortText'),
|
|
780
802
|
icon: 'editor.type-square',
|
|
781
803
|
value: 'Text',
|
|
782
804
|
color: 'pink',
|
|
783
805
|
},
|
|
784
806
|
{
|
|
785
|
-
label: '
|
|
807
|
+
label: this.transloco.translate('properties.list.typeParagraph'),
|
|
786
808
|
icon: 'editor.line-height',
|
|
787
809
|
value: 'LongText',
|
|
788
810
|
color: 'sky',
|
|
789
811
|
},
|
|
790
|
-
{ label: 'User', icon: 'user.user-01', value: 'User', color: 'yellow' },
|
|
791
812
|
{
|
|
792
|
-
label: '
|
|
813
|
+
label: this.transloco.translate('properties.list.typeUser'),
|
|
814
|
+
icon: 'user.user-01',
|
|
815
|
+
value: 'User',
|
|
816
|
+
color: 'yellow',
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
label: this.transloco.translate('properties.list.typeNumber'),
|
|
793
820
|
icon: 'editor.letter-spacing-01',
|
|
794
821
|
value: 'Number',
|
|
795
822
|
color: 'violet',
|
|
796
823
|
},
|
|
797
824
|
{
|
|
798
|
-
label: '
|
|
825
|
+
label: this.transloco.translate('properties.list.typeCurrency'),
|
|
799
826
|
icon: 'finance.currency-dollar',
|
|
800
827
|
value: 'Currency',
|
|
801
828
|
color: 'indigo',
|
|
802
829
|
},
|
|
803
830
|
{
|
|
804
|
-
label: '
|
|
831
|
+
label: this.transloco.translate('properties.list.typeLookup'),
|
|
805
832
|
icon: 'custom.list-cards',
|
|
806
833
|
value: 'Lookup',
|
|
807
834
|
color: 'lime',
|
|
@@ -814,7 +841,7 @@ class PropertiesList {
|
|
|
814
841
|
return [
|
|
815
842
|
{
|
|
816
843
|
icon: 'general.plus',
|
|
817
|
-
label: '
|
|
844
|
+
label: this.transloco.translate('properties.list.createAction'),
|
|
818
845
|
color: 'primary',
|
|
819
846
|
action: () => {
|
|
820
847
|
this.createProperty();
|
|
@@ -822,16 +849,17 @@ class PropertiesList {
|
|
|
822
849
|
},
|
|
823
850
|
];
|
|
824
851
|
}, ...(ngDevMode ? [{ debugName: "tableActions" }] : []));
|
|
852
|
+
deletingRowIds = signal([], ...(ngDevMode ? [{ debugName: "deletingRowIds" }] : []));
|
|
825
853
|
rowActions = signal([
|
|
826
854
|
{
|
|
827
855
|
icon: 'custom.pencil',
|
|
828
|
-
tooltip: '
|
|
856
|
+
tooltip: this.transloco.translate('properties.list.editAction'),
|
|
829
857
|
color: 'primary',
|
|
830
858
|
action: (row) => this.editRow(row),
|
|
831
859
|
},
|
|
832
860
|
{
|
|
833
861
|
icon: 'general.trash-01',
|
|
834
|
-
tooltip: '
|
|
862
|
+
tooltip: this.transloco.translate('properties.list.deleteAction'),
|
|
835
863
|
color: 'danger',
|
|
836
864
|
variant: 'outlined',
|
|
837
865
|
action: (row) => this.deleteRow(row),
|
|
@@ -840,6 +868,7 @@ class PropertiesList {
|
|
|
840
868
|
type: 'popup',
|
|
841
869
|
confirmationType: 'delete',
|
|
842
870
|
},
|
|
871
|
+
loading: (row) => this.deletingRowIds().includes(row.id),
|
|
843
872
|
},
|
|
844
873
|
], ...(ngDevMode ? [{ debugName: "rowActions" }] : []));
|
|
845
874
|
loading = this.facade.isLoading('getAll');
|
|
@@ -867,7 +896,13 @@ class PropertiesList {
|
|
|
867
896
|
if (!row?.id) {
|
|
868
897
|
return;
|
|
869
898
|
}
|
|
870
|
-
this.
|
|
899
|
+
this.deletingRowIds.update((ids) => [...ids, row.id]);
|
|
900
|
+
this.facade
|
|
901
|
+
.delete(row.id)
|
|
902
|
+
.pipe(finalize$1(() => {
|
|
903
|
+
this.deletingRowIds.update((ids) => ids.filter((id) => id !== row.id));
|
|
904
|
+
}))
|
|
905
|
+
.subscribe();
|
|
871
906
|
}
|
|
872
907
|
createProperty() {
|
|
873
908
|
this.navigatePreservingTab(['../properties-form']);
|
|
@@ -898,16 +933,26 @@ class PropertiesList {
|
|
|
898
933
|
});
|
|
899
934
|
}
|
|
900
935
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PropertiesList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
901
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: PropertiesList, isStandalone: true, selector: "mt-properties-list", inputs: { tab: { classPropertyName: "tab", publicName: "tab", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"space-y-3\">\n <div class=\"flex items-center justify-between\">\n <div class=\"space-y-1\">\n <h1 class=\"text-xl font-semibold text-slate-900 tracking-tight\">\n All Properties\n </h1>\n <mt-breadcrumb\n [items]=\"breadcrumbItems()\"\n [styleClass]=\"'flex justify-center'\"\n >\n </mt-breadcrumb>\n </div>\n </div>\n <mt-table\n [tabs]=\"tabs()\"\n [(activeTab)]=\"activeTab\"\n (onTabChange)=\"onTabChange($event)\"\n [data]=\"tableData()\"\n [actions]=\"tableActions()\"\n [columns]=\"tableColumns()\"\n [rowActions]=\"rowActions()\"\n [generalSearch]=\"true\"\n [loading]=\"loading()\"\n >\n <ng-template #empty>\n <div headless class=\"flex-col justify-center items-center w-full p-5\">\n <div class=\"content flex flex-col gap-5 items-center text-center mb-5\">\n <svg\n width=\"152\"\n height=\"120\"\n viewBox=\"0 0 152 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"76\" cy=\"52\" r=\"52\" fill=\"#E9EAEB\" />\n <g filter=\"url(#filter0_ddd_2474_28277)\">\n <path\n d=\"M77.6 16C66.8273 16 57.2978 21.3233 51.4987 29.4829C49.605 29.0363 47.6301 28.8 45.6 28.8C31.4615 28.8 20 40.2615 20 54.4C20 68.5385 31.4615 80 45.6 80L109.6 80C121.971 80 132 69.9712 132 57.6C132 45.2288 121.971 35.2 109.6 35.2C108.721 35.2 107.854 35.2506 107.002 35.349C102.098 23.9677 90.7797 16 77.6 16Z\"\n fill=\"#FAFAFA\"\n />\n <ellipse\n cx=\"45.6\"\n cy=\"54.3998\"\n rx=\"25.6\"\n ry=\"25.6\"\n fill=\"url(#paint0_linear_2474_28277)\"\n />\n <circle\n cx=\"77.6016\"\n cy=\"48\"\n r=\"32\"\n fill=\"url(#paint1_linear_2474_28277)\"\n />\n <ellipse\n cx=\"109.599\"\n cy=\"57.6002\"\n rx=\"22.4\"\n ry=\"22.4\"\n fill=\"url(#paint2_linear_2474_28277)\"\n />\n </g>\n <circle cx=\"21\" cy=\"19\" r=\"5\" fill=\"#F5F5F5\" />\n <circle cx=\"18\" cy=\"109\" r=\"7\" fill=\"#F5F5F5\" />\n <circle cx=\"145\" cy=\"35\" r=\"7\" fill=\"#F5F5F5\" />\n <circle cx=\"134\" cy=\"8\" r=\"4\" fill=\"#F5F5F5\" />\n <foreignObject x=\"44\" y=\"54\" width=\"64\" height=\"64\">\n <div\n xmlns=\"http://www.w3.org/1999/xhtml\"\n style=\"\n backdrop-filter: blur(4px);\n clip-path: url(#bgblur_0_2474_28277_clip_path);\n height: 100%;\n width: 100%;\n \"\n ></div>\n </foreignObject>\n <g data-figma-bg-blur-radius=\"8\">\n <path\n d=\"M52 86C52 72.7452 62.7452 62 76 62C89.2548 62 100 72.7452 100 86C100 99.2548 89.2548 110 76 110C62.7452 110 52 99.2548 52 86Z\"\n fill=\"#344054\"\n fill-opacity=\"0.4\"\n />\n <path\n d=\"M85 95L81.5001 91.5M84 85.5C84 90.1944 80.1944 94 75.5 94C70.8056 94 67 90.1944 67 85.5C67 80.8056 70.8056 77 75.5 77C80.1944 77 84 80.8056 84 85.5Z\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </g>\n <defs>\n <filter\n id=\"filter0_ddd_2474_28277\"\n x=\"0\"\n y=\"16\"\n width=\"152\"\n height=\"104\"\n filterUnits=\"userSpaceOnUse\"\n color-interpolation-filters=\"sRGB\"\n >\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feMorphology\n radius=\"1.5\"\n operator=\"erode\"\n in=\"SourceAlpha\"\n result=\"effect1_dropShadow_2474_28277\"\n />\n <feOffset dy=\"3\" />\n <feGaussianBlur stdDeviation=\"1.5\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.04 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"BackgroundImageFix\"\n result=\"effect1_dropShadow_2474_28277\"\n />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feMorphology\n radius=\"4\"\n operator=\"erode\"\n in=\"SourceAlpha\"\n result=\"effect2_dropShadow_2474_28277\"\n />\n <feOffset dy=\"8\" />\n <feGaussianBlur stdDeviation=\"4\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.03 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"effect1_dropShadow_2474_28277\"\n result=\"effect2_dropShadow_2474_28277\"\n />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feMorphology\n radius=\"4\"\n operator=\"erode\"\n in=\"SourceAlpha\"\n result=\"effect3_dropShadow_2474_28277\"\n />\n <feOffset dy=\"20\" />\n <feGaussianBlur stdDeviation=\"12\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.08 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"effect2_dropShadow_2474_28277\"\n result=\"effect3_dropShadow_2474_28277\"\n />\n <feBlend\n mode=\"normal\"\n in=\"SourceGraphic\"\n in2=\"effect3_dropShadow_2474_28277\"\n result=\"shape\"\n />\n </filter>\n <clipPath\n id=\"bgblur_0_2474_28277_clip_path\"\n transform=\"translate(-44 -54)\"\n >\n <path\n d=\"M52 86C52 72.7452 62.7452 62 76 62C89.2548 62 100 72.7452 100 86C100 99.2548 89.2548 110 76 110C62.7452 110 52 99.2548 52 86Z\"\n />\n </clipPath>\n <linearGradient\n id=\"paint0_linear_2474_28277\"\n x1=\"25.9429\"\n y1=\"37.4855\"\n x2=\"71.2\"\n y2=\"79.9998\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#D0D5DD\" />\n <stop offset=\"0.350715\" stop-color=\"white\" stop-opacity=\"0\" />\n </linearGradient>\n <linearGradient\n id=\"paint1_linear_2474_28277\"\n x1=\"53.0301\"\n y1=\"26.8571\"\n x2=\"109.602\"\n y2=\"80\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#D0D5DD\" />\n <stop offset=\"0.350715\" stop-color=\"white\" stop-opacity=\"0\" />\n </linearGradient>\n <linearGradient\n id=\"paint2_linear_2474_28277\"\n x1=\"92.3992\"\n y1=\"42.8002\"\n x2=\"131.999\"\n y2=\"80.0002\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#D0D5DD\" />\n <stop offset=\"0.350715\" stop-color=\"white\" stop-opacity=\"0\" />\n </linearGradient>\n </defs>\n </svg>\n\n <div class=\"flex flex-col gap-1\">\n <div class=\"text-md text-surface-600\">{{ \"No data to show\" }}</div>\n </div>\n <div>\n <mt-button\n label=\"Add New Property\"\n icon=\"general.plus\"\n (click)=\"createProperty()\"\n />\n </div>\n </div>\n <p-divider type=\"solid\">\n <div class=\"text-lg text-surface-600\">Create from Type Template</div>\n </p-divider>\n <div class=\"flex gap-3 mt-5 justify-center\">\n @for (card of propertyTypes(); track card.label) {\n <mt-card\n headless\n class=\"w-25 tailwind-4 cursor-pointer\"\n style=\"background-color: #fafafa\"\n (click)=\"createPropertyWithType(card.value)\"\n >\n <div class=\"content flex flex-col gap-3 items-center text-center\">\n <mt-avatar\n [style.--p-avatar-background]=\"\n 'var(--p-' + card.color + '-100)'\n \"\n [style.--p-avatar-color]=\"'var(--p-' + card.color + '-600)'\"\n [icon]=\"card.icon\"\n shape=\"square\"\n ></mt-avatar>\n <div class=\"flex flex-col gap-1\">\n <div class=\"text-xs font-normal\">{{ card.label }}</div>\n </div>\n </div>\n </mt-card>\n }\n </div>\n </div>\n </ng-template>\n </mt-table>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Table, selector: "mt-table", inputs: ["data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "generalSearch", "showFilters", "loading", "updating", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "pageSize", "currentPage", "first", "filterTerm"], outputs: ["selectionChange", "cellChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange"] }, { kind: "component", type: Breadcrumb, selector: "mt-breadcrumb", inputs: ["items", "styleClass"], outputs: ["onItemClick"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "component", type: Divider, selector: "p-divider", inputs: ["styleClass", "layout", "type", "align"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }] });
|
|
936
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: PropertiesList, isStandalone: true, selector: "mt-properties-list", inputs: { tab: { classPropertyName: "tab", publicName: "tab", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"space-y-3\">\n <div class=\"flex items-center justify-between\">\n <div class=\"space-y-1\">\n <h1 class=\"text-xl font-semibold text-slate-900 tracking-tight\">\n {{ \"properties.list.pageTitle\" | transloco }}\n </h1>\n <mt-breadcrumb\n [items]=\"breadcrumbItems()\"\n [styleClass]=\"'flex justify-center'\"\n >\n </mt-breadcrumb>\n </div>\n </div>\n <mt-table\n [tabs]=\"tabs()\"\n [(activeTab)]=\"activeTab\"\n (onTabChange)=\"onTabChange($event)\"\n [data]=\"tableData()\"\n [actions]=\"tableActions()\"\n [columns]=\"tableColumns()\"\n [rowActions]=\"rowActions()\"\n [generalSearch]=\"true\"\n [loading]=\"loading()\"\n >\n <ng-template #empty>\n <div headless class=\"flex-col justify-center items-center w-full p-5\">\n <div class=\"content flex flex-col gap-5 items-center text-center mb-5\">\n <svg\n width=\"152\"\n height=\"120\"\n viewBox=\"0 0 152 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"76\" cy=\"52\" r=\"52\" fill=\"#E9EAEB\" />\n <g filter=\"url(#filter0_ddd_2474_28277)\">\n <path\n d=\"M77.6 16C66.8273 16 57.2978 21.3233 51.4987 29.4829C49.605 29.0363 47.6301 28.8 45.6 28.8C31.4615 28.8 20 40.2615 20 54.4C20 68.5385 31.4615 80 45.6 80L109.6 80C121.971 80 132 69.9712 132 57.6C132 45.2288 121.971 35.2 109.6 35.2C108.721 35.2 107.854 35.2506 107.002 35.349C102.098 23.9677 90.7797 16 77.6 16Z\"\n fill=\"#FAFAFA\"\n />\n <ellipse\n cx=\"45.6\"\n cy=\"54.3998\"\n rx=\"25.6\"\n ry=\"25.6\"\n fill=\"url(#paint0_linear_2474_28277)\"\n />\n <circle\n cx=\"77.6016\"\n cy=\"48\"\n r=\"32\"\n fill=\"url(#paint1_linear_2474_28277)\"\n />\n <ellipse\n cx=\"109.599\"\n cy=\"57.6002\"\n rx=\"22.4\"\n ry=\"22.4\"\n fill=\"url(#paint2_linear_2474_28277)\"\n />\n </g>\n <circle cx=\"21\" cy=\"19\" r=\"5\" fill=\"#F5F5F5\" />\n <circle cx=\"18\" cy=\"109\" r=\"7\" fill=\"#F5F5F5\" />\n <circle cx=\"145\" cy=\"35\" r=\"7\" fill=\"#F5F5F5\" />\n <circle cx=\"134\" cy=\"8\" r=\"4\" fill=\"#F5F5F5\" />\n <foreignObject x=\"44\" y=\"54\" width=\"64\" height=\"64\">\n <div\n xmlns=\"http://www.w3.org/1999/xhtml\"\n style=\"\n backdrop-filter: blur(4px);\n clip-path: url(#bgblur_0_2474_28277_clip_path);\n height: 100%;\n width: 100%;\n \"\n ></div>\n </foreignObject>\n <g data-figma-bg-blur-radius=\"8\">\n <path\n d=\"M52 86C52 72.7452 62.7452 62 76 62C89.2548 62 100 72.7452 100 86C100 99.2548 89.2548 110 76 110C62.7452 110 52 99.2548 52 86Z\"\n fill=\"#344054\"\n fill-opacity=\"0.4\"\n />\n <path\n d=\"M85 95L81.5001 91.5M84 85.5C84 90.1944 80.1944 94 75.5 94C70.8056 94 67 90.1944 67 85.5C67 80.8056 70.8056 77 75.5 77C80.1944 77 84 80.8056 84 85.5Z\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </g>\n <defs>\n <filter\n id=\"filter0_ddd_2474_28277\"\n x=\"0\"\n y=\"16\"\n width=\"152\"\n height=\"104\"\n filterUnits=\"userSpaceOnUse\"\n color-interpolation-filters=\"sRGB\"\n >\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feMorphology\n radius=\"1.5\"\n operator=\"erode\"\n in=\"SourceAlpha\"\n result=\"effect1_dropShadow_2474_28277\"\n />\n <feOffset dy=\"3\" />\n <feGaussianBlur stdDeviation=\"1.5\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.04 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"BackgroundImageFix\"\n result=\"effect1_dropShadow_2474_28277\"\n />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feMorphology\n radius=\"4\"\n operator=\"erode\"\n in=\"SourceAlpha\"\n result=\"effect2_dropShadow_2474_28277\"\n />\n <feOffset dy=\"8\" />\n <feGaussianBlur stdDeviation=\"4\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.03 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"effect1_dropShadow_2474_28277\"\n result=\"effect2_dropShadow_2474_28277\"\n />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feMorphology\n radius=\"4\"\n operator=\"erode\"\n in=\"SourceAlpha\"\n result=\"effect3_dropShadow_2474_28277\"\n />\n <feOffset dy=\"20\" />\n <feGaussianBlur stdDeviation=\"12\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.08 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"effect2_dropShadow_2474_28277\"\n result=\"effect3_dropShadow_2474_28277\"\n />\n <feBlend\n mode=\"normal\"\n in=\"SourceGraphic\"\n in2=\"effect3_dropShadow_2474_28277\"\n result=\"shape\"\n />\n </filter>\n <clipPath\n id=\"bgblur_0_2474_28277_clip_path\"\n transform=\"translate(-44 -54)\"\n >\n <path\n d=\"M52 86C52 72.7452 62.7452 62 76 62C89.2548 62 100 72.7452 100 86C100 99.2548 89.2548 110 76 110C62.7452 110 52 99.2548 52 86Z\"\n />\n </clipPath>\n <linearGradient\n id=\"paint0_linear_2474_28277\"\n x1=\"25.9429\"\n y1=\"37.4855\"\n x2=\"71.2\"\n y2=\"79.9998\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#D0D5DD\" />\n <stop offset=\"0.350715\" stop-color=\"white\" stop-opacity=\"0\" />\n </linearGradient>\n <linearGradient\n id=\"paint1_linear_2474_28277\"\n x1=\"53.0301\"\n y1=\"26.8571\"\n x2=\"109.602\"\n y2=\"80\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#D0D5DD\" />\n <stop offset=\"0.350715\" stop-color=\"white\" stop-opacity=\"0\" />\n </linearGradient>\n <linearGradient\n id=\"paint2_linear_2474_28277\"\n x1=\"92.3992\"\n y1=\"42.8002\"\n x2=\"131.999\"\n y2=\"80.0002\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#D0D5DD\" />\n <stop offset=\"0.350715\" stop-color=\"white\" stop-opacity=\"0\" />\n </linearGradient>\n </defs>\n </svg>\n\n <div class=\"flex flex-col gap-1\">\n <div class=\"text-md text-surface-600\">\n {{ \"properties.list.emptyStateNoData\" | transloco }}\n </div>\n </div>\n <div>\n <mt-button\n [label]=\"'properties.list.addNewProperty' | transloco\"\n icon=\"general.plus\"\n (click)=\"createProperty()\"\n />\n </div>\n </div>\n <p-divider type=\"solid\">\n <div class=\"text-lg text-surface-600\">\n {{ \"properties.list.emptyStateTemplate\" | transloco }}\n </div>\n </p-divider>\n <div class=\"flex gap-3 mt-5 justify-center\">\n @for (card of propertyTypes(); track card.label) {\n <mt-card\n headless\n class=\"w-25 tailwind-4 cursor-pointer\"\n style=\"background-color: #fafafa\"\n (click)=\"createPropertyWithType(card.value)\"\n >\n <div class=\"content flex flex-col gap-3 items-center text-center\">\n <mt-avatar\n [style.--p-avatar-background]=\"\n 'var(--p-' + card.color + '-100)'\n \"\n [style.--p-avatar-color]=\"'var(--p-' + card.color + '-600)'\"\n [icon]=\"card.icon\"\n shape=\"square\"\n ></mt-avatar>\n <div class=\"flex flex-col gap-1\">\n <div class=\"text-xs font-normal\">{{ card.label }}</div>\n </div>\n </div>\n </mt-card>\n }\n </div>\n </div>\n </ng-template>\n </mt-table>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Table, selector: "mt-table", inputs: ["data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "generalSearch", "showFilters", "loading", "updating", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "pageSize", "currentPage", "first", "filterTerm"], outputs: ["selectionChange", "cellChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange"] }, { kind: "component", type: Breadcrumb, selector: "mt-breadcrumb", inputs: ["items", "styleClass"], outputs: ["onItemClick"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "component", type: Divider, selector: "p-divider", inputs: ["styleClass", "layout", "type", "align"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i1.TranslocoPipe, name: "transloco" }] });
|
|
902
937
|
}
|
|
903
938
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PropertiesList, decorators: [{
|
|
904
939
|
type: Component,
|
|
905
|
-
args: [{ selector: 'mt-properties-list', standalone: true, imports: [CommonModule, Table, Breadcrumb, Card, Avatar, Divider, Button], template: "<div class=\"space-y-3\">\n <div class=\"flex items-center justify-between\">\n <div class=\"space-y-1\">\n <h1 class=\"text-xl font-semibold text-slate-900 tracking-tight\">\n All Properties\n </h1>\n <mt-breadcrumb\n [items]=\"breadcrumbItems()\"\n [styleClass]=\"'flex justify-center'\"\n >\n </mt-breadcrumb>\n </div>\n </div>\n <mt-table\n [tabs]=\"tabs()\"\n [(activeTab)]=\"activeTab\"\n (onTabChange)=\"onTabChange($event)\"\n [data]=\"tableData()\"\n [actions]=\"tableActions()\"\n [columns]=\"tableColumns()\"\n [rowActions]=\"rowActions()\"\n [generalSearch]=\"true\"\n [loading]=\"loading()\"\n >\n <ng-template #empty>\n <div headless class=\"flex-col justify-center items-center w-full p-5\">\n <div class=\"content flex flex-col gap-5 items-center text-center mb-5\">\n <svg\n width=\"152\"\n height=\"120\"\n viewBox=\"0 0 152 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"76\" cy=\"52\" r=\"52\" fill=\"#E9EAEB\" />\n <g filter=\"url(#filter0_ddd_2474_28277)\">\n <path\n d=\"M77.6 16C66.8273 16 57.2978 21.3233 51.4987 29.4829C49.605 29.0363 47.6301 28.8 45.6 28.8C31.4615 28.8 20 40.2615 20 54.4C20 68.5385 31.4615 80 45.6 80L109.6 80C121.971 80 132 69.9712 132 57.6C132 45.2288 121.971 35.2 109.6 35.2C108.721 35.2 107.854 35.2506 107.002 35.349C102.098 23.9677 90.7797 16 77.6 16Z\"\n fill=\"#FAFAFA\"\n />\n <ellipse\n cx=\"45.6\"\n cy=\"54.3998\"\n rx=\"25.6\"\n ry=\"25.6\"\n fill=\"url(#paint0_linear_2474_28277)\"\n />\n <circle\n cx=\"77.6016\"\n cy=\"48\"\n r=\"32\"\n fill=\"url(#paint1_linear_2474_28277)\"\n />\n <ellipse\n cx=\"109.599\"\n cy=\"57.6002\"\n rx=\"22.4\"\n ry=\"22.4\"\n fill=\"url(#paint2_linear_2474_28277)\"\n />\n </g>\n <circle cx=\"21\" cy=\"19\" r=\"5\" fill=\"#F5F5F5\" />\n <circle cx=\"18\" cy=\"109\" r=\"7\" fill=\"#F5F5F5\" />\n <circle cx=\"145\" cy=\"35\" r=\"7\" fill=\"#F5F5F5\" />\n <circle cx=\"134\" cy=\"8\" r=\"4\" fill=\"#F5F5F5\" />\n <foreignObject x=\"44\" y=\"54\" width=\"64\" height=\"64\">\n <div\n xmlns=\"http://www.w3.org/1999/xhtml\"\n style=\"\n backdrop-filter: blur(4px);\n clip-path: url(#bgblur_0_2474_28277_clip_path);\n height: 100%;\n width: 100%;\n \"\n ></div>\n </foreignObject>\n <g data-figma-bg-blur-radius=\"8\">\n <path\n d=\"M52 86C52 72.7452 62.7452 62 76 62C89.2548 62 100 72.7452 100 86C100 99.2548 89.2548 110 76 110C62.7452 110 52 99.2548 52 86Z\"\n fill=\"#344054\"\n fill-opacity=\"0.4\"\n />\n <path\n d=\"M85 95L81.5001 91.5M84 85.5C84 90.1944 80.1944 94 75.5 94C70.8056 94 67 90.1944 67 85.5C67 80.8056 70.8056 77 75.5 77C80.1944 77 84 80.8056 84 85.5Z\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </g>\n <defs>\n <filter\n id=\"filter0_ddd_2474_28277\"\n x=\"0\"\n y=\"16\"\n width=\"152\"\n height=\"104\"\n filterUnits=\"userSpaceOnUse\"\n color-interpolation-filters=\"sRGB\"\n >\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feMorphology\n radius=\"1.5\"\n operator=\"erode\"\n in=\"SourceAlpha\"\n result=\"effect1_dropShadow_2474_28277\"\n />\n <feOffset dy=\"3\" />\n <feGaussianBlur stdDeviation=\"1.5\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.04 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"BackgroundImageFix\"\n result=\"effect1_dropShadow_2474_28277\"\n />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feMorphology\n radius=\"4\"\n operator=\"erode\"\n in=\"SourceAlpha\"\n result=\"effect2_dropShadow_2474_28277\"\n />\n <feOffset dy=\"8\" />\n <feGaussianBlur stdDeviation=\"4\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.03 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"effect1_dropShadow_2474_28277\"\n result=\"effect2_dropShadow_2474_28277\"\n />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feMorphology\n radius=\"4\"\n operator=\"erode\"\n in=\"SourceAlpha\"\n result=\"effect3_dropShadow_2474_28277\"\n />\n <feOffset dy=\"20\" />\n <feGaussianBlur stdDeviation=\"12\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.08 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"effect2_dropShadow_2474_28277\"\n result=\"effect3_dropShadow_2474_28277\"\n />\n <feBlend\n mode=\"normal\"\n in=\"SourceGraphic\"\n in2=\"effect3_dropShadow_2474_28277\"\n result=\"shape\"\n />\n </filter>\n <clipPath\n id=\"bgblur_0_2474_28277_clip_path\"\n transform=\"translate(-44 -54)\"\n >\n <path\n d=\"M52 86C52 72.7452 62.7452 62 76 62C89.2548 62 100 72.7452 100 86C100 99.2548 89.2548 110 76 110C62.7452 110 52 99.2548 52 86Z\"\n />\n </clipPath>\n <linearGradient\n id=\"paint0_linear_2474_28277\"\n x1=\"25.9429\"\n y1=\"37.4855\"\n x2=\"71.2\"\n y2=\"79.9998\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#D0D5DD\" />\n <stop offset=\"0.350715\" stop-color=\"white\" stop-opacity=\"0\" />\n </linearGradient>\n <linearGradient\n id=\"paint1_linear_2474_28277\"\n x1=\"53.0301\"\n y1=\"26.8571\"\n x2=\"109.602\"\n y2=\"80\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#D0D5DD\" />\n <stop offset=\"0.350715\" stop-color=\"white\" stop-opacity=\"0\" />\n </linearGradient>\n <linearGradient\n id=\"paint2_linear_2474_28277\"\n x1=\"92.3992\"\n y1=\"42.8002\"\n x2=\"131.999\"\n y2=\"80.0002\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#D0D5DD\" />\n <stop offset=\"0.350715\" stop-color=\"white\" stop-opacity=\"0\" />\n </linearGradient>\n </defs>\n </svg>\n\n <div class=\"flex flex-col gap-1\">\n <div class=\"text-md text-surface-600\">{{ \"No data to show\" }}</div>\n </div>\n <div>\n <mt-button\n label=\"Add New Property\"\n icon=\"general.plus\"\n (click)=\"createProperty()\"\n />\n </div>\n </div>\n <p-divider type=\"solid\">\n <div class=\"text-lg text-surface-600\">Create from Type Template</div>\n </p-divider>\n <div class=\"flex gap-3 mt-5 justify-center\">\n @for (card of propertyTypes(); track card.label) {\n <mt-card\n headless\n class=\"w-25 tailwind-4 cursor-pointer\"\n style=\"background-color: #fafafa\"\n (click)=\"createPropertyWithType(card.value)\"\n >\n <div class=\"content flex flex-col gap-3 items-center text-center\">\n <mt-avatar\n [style.--p-avatar-background]=\"\n 'var(--p-' + card.color + '-100)'\n \"\n [style.--p-avatar-color]=\"'var(--p-' + card.color + '-600)'\"\n [icon]=\"card.icon\"\n shape=\"square\"\n ></mt-avatar>\n <div class=\"flex flex-col gap-1\">\n <div class=\"text-xs font-normal\">{{ card.label }}</div>\n </div>\n </div>\n </mt-card>\n }\n </div>\n </div>\n </ng-template>\n </mt-table>\n</div>\n" }]
|
|
940
|
+
args: [{ selector: 'mt-properties-list', standalone: true, imports: [
|
|
941
|
+
CommonModule,
|
|
942
|
+
Table,
|
|
943
|
+
Breadcrumb,
|
|
944
|
+
Card,
|
|
945
|
+
Avatar,
|
|
946
|
+
Divider,
|
|
947
|
+
Button,
|
|
948
|
+
TranslocoModule,
|
|
949
|
+
], template: "<div class=\"space-y-3\">\n <div class=\"flex items-center justify-between\">\n <div class=\"space-y-1\">\n <h1 class=\"text-xl font-semibold text-slate-900 tracking-tight\">\n {{ \"properties.list.pageTitle\" | transloco }}\n </h1>\n <mt-breadcrumb\n [items]=\"breadcrumbItems()\"\n [styleClass]=\"'flex justify-center'\"\n >\n </mt-breadcrumb>\n </div>\n </div>\n <mt-table\n [tabs]=\"tabs()\"\n [(activeTab)]=\"activeTab\"\n (onTabChange)=\"onTabChange($event)\"\n [data]=\"tableData()\"\n [actions]=\"tableActions()\"\n [columns]=\"tableColumns()\"\n [rowActions]=\"rowActions()\"\n [generalSearch]=\"true\"\n [loading]=\"loading()\"\n >\n <ng-template #empty>\n <div headless class=\"flex-col justify-center items-center w-full p-5\">\n <div class=\"content flex flex-col gap-5 items-center text-center mb-5\">\n <svg\n width=\"152\"\n height=\"120\"\n viewBox=\"0 0 152 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"76\" cy=\"52\" r=\"52\" fill=\"#E9EAEB\" />\n <g filter=\"url(#filter0_ddd_2474_28277)\">\n <path\n d=\"M77.6 16C66.8273 16 57.2978 21.3233 51.4987 29.4829C49.605 29.0363 47.6301 28.8 45.6 28.8C31.4615 28.8 20 40.2615 20 54.4C20 68.5385 31.4615 80 45.6 80L109.6 80C121.971 80 132 69.9712 132 57.6C132 45.2288 121.971 35.2 109.6 35.2C108.721 35.2 107.854 35.2506 107.002 35.349C102.098 23.9677 90.7797 16 77.6 16Z\"\n fill=\"#FAFAFA\"\n />\n <ellipse\n cx=\"45.6\"\n cy=\"54.3998\"\n rx=\"25.6\"\n ry=\"25.6\"\n fill=\"url(#paint0_linear_2474_28277)\"\n />\n <circle\n cx=\"77.6016\"\n cy=\"48\"\n r=\"32\"\n fill=\"url(#paint1_linear_2474_28277)\"\n />\n <ellipse\n cx=\"109.599\"\n cy=\"57.6002\"\n rx=\"22.4\"\n ry=\"22.4\"\n fill=\"url(#paint2_linear_2474_28277)\"\n />\n </g>\n <circle cx=\"21\" cy=\"19\" r=\"5\" fill=\"#F5F5F5\" />\n <circle cx=\"18\" cy=\"109\" r=\"7\" fill=\"#F5F5F5\" />\n <circle cx=\"145\" cy=\"35\" r=\"7\" fill=\"#F5F5F5\" />\n <circle cx=\"134\" cy=\"8\" r=\"4\" fill=\"#F5F5F5\" />\n <foreignObject x=\"44\" y=\"54\" width=\"64\" height=\"64\">\n <div\n xmlns=\"http://www.w3.org/1999/xhtml\"\n style=\"\n backdrop-filter: blur(4px);\n clip-path: url(#bgblur_0_2474_28277_clip_path);\n height: 100%;\n width: 100%;\n \"\n ></div>\n </foreignObject>\n <g data-figma-bg-blur-radius=\"8\">\n <path\n d=\"M52 86C52 72.7452 62.7452 62 76 62C89.2548 62 100 72.7452 100 86C100 99.2548 89.2548 110 76 110C62.7452 110 52 99.2548 52 86Z\"\n fill=\"#344054\"\n fill-opacity=\"0.4\"\n />\n <path\n d=\"M85 95L81.5001 91.5M84 85.5C84 90.1944 80.1944 94 75.5 94C70.8056 94 67 90.1944 67 85.5C67 80.8056 70.8056 77 75.5 77C80.1944 77 84 80.8056 84 85.5Z\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </g>\n <defs>\n <filter\n id=\"filter0_ddd_2474_28277\"\n x=\"0\"\n y=\"16\"\n width=\"152\"\n height=\"104\"\n filterUnits=\"userSpaceOnUse\"\n color-interpolation-filters=\"sRGB\"\n >\n <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feMorphology\n radius=\"1.5\"\n operator=\"erode\"\n in=\"SourceAlpha\"\n result=\"effect1_dropShadow_2474_28277\"\n />\n <feOffset dy=\"3\" />\n <feGaussianBlur stdDeviation=\"1.5\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.04 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"BackgroundImageFix\"\n result=\"effect1_dropShadow_2474_28277\"\n />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feMorphology\n radius=\"4\"\n operator=\"erode\"\n in=\"SourceAlpha\"\n result=\"effect2_dropShadow_2474_28277\"\n />\n <feOffset dy=\"8\" />\n <feGaussianBlur stdDeviation=\"4\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.03 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"effect1_dropShadow_2474_28277\"\n result=\"effect2_dropShadow_2474_28277\"\n />\n <feColorMatrix\n in=\"SourceAlpha\"\n type=\"matrix\"\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n result=\"hardAlpha\"\n />\n <feMorphology\n radius=\"4\"\n operator=\"erode\"\n in=\"SourceAlpha\"\n result=\"effect3_dropShadow_2474_28277\"\n />\n <feOffset dy=\"20\" />\n <feGaussianBlur stdDeviation=\"12\" />\n <feComposite in2=\"hardAlpha\" operator=\"out\" />\n <feColorMatrix\n type=\"matrix\"\n values=\"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.08 0\"\n />\n <feBlend\n mode=\"normal\"\n in2=\"effect2_dropShadow_2474_28277\"\n result=\"effect3_dropShadow_2474_28277\"\n />\n <feBlend\n mode=\"normal\"\n in=\"SourceGraphic\"\n in2=\"effect3_dropShadow_2474_28277\"\n result=\"shape\"\n />\n </filter>\n <clipPath\n id=\"bgblur_0_2474_28277_clip_path\"\n transform=\"translate(-44 -54)\"\n >\n <path\n d=\"M52 86C52 72.7452 62.7452 62 76 62C89.2548 62 100 72.7452 100 86C100 99.2548 89.2548 110 76 110C62.7452 110 52 99.2548 52 86Z\"\n />\n </clipPath>\n <linearGradient\n id=\"paint0_linear_2474_28277\"\n x1=\"25.9429\"\n y1=\"37.4855\"\n x2=\"71.2\"\n y2=\"79.9998\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#D0D5DD\" />\n <stop offset=\"0.350715\" stop-color=\"white\" stop-opacity=\"0\" />\n </linearGradient>\n <linearGradient\n id=\"paint1_linear_2474_28277\"\n x1=\"53.0301\"\n y1=\"26.8571\"\n x2=\"109.602\"\n y2=\"80\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#D0D5DD\" />\n <stop offset=\"0.350715\" stop-color=\"white\" stop-opacity=\"0\" />\n </linearGradient>\n <linearGradient\n id=\"paint2_linear_2474_28277\"\n x1=\"92.3992\"\n y1=\"42.8002\"\n x2=\"131.999\"\n y2=\"80.0002\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stop-color=\"#D0D5DD\" />\n <stop offset=\"0.350715\" stop-color=\"white\" stop-opacity=\"0\" />\n </linearGradient>\n </defs>\n </svg>\n\n <div class=\"flex flex-col gap-1\">\n <div class=\"text-md text-surface-600\">\n {{ \"properties.list.emptyStateNoData\" | transloco }}\n </div>\n </div>\n <div>\n <mt-button\n [label]=\"'properties.list.addNewProperty' | transloco\"\n icon=\"general.plus\"\n (click)=\"createProperty()\"\n />\n </div>\n </div>\n <p-divider type=\"solid\">\n <div class=\"text-lg text-surface-600\">\n {{ \"properties.list.emptyStateTemplate\" | transloco }}\n </div>\n </p-divider>\n <div class=\"flex gap-3 mt-5 justify-center\">\n @for (card of propertyTypes(); track card.label) {\n <mt-card\n headless\n class=\"w-25 tailwind-4 cursor-pointer\"\n style=\"background-color: #fafafa\"\n (click)=\"createPropertyWithType(card.value)\"\n >\n <div class=\"content flex flex-col gap-3 items-center text-center\">\n <mt-avatar\n [style.--p-avatar-background]=\"\n 'var(--p-' + card.color + '-100)'\n \"\n [style.--p-avatar-color]=\"'var(--p-' + card.color + '-600)'\"\n [icon]=\"card.icon\"\n shape=\"square\"\n ></mt-avatar>\n <div class=\"flex flex-col gap-1\">\n <div class=\"text-xs font-normal\">{{ card.label }}</div>\n </div>\n </div>\n </mt-card>\n }\n </div>\n </div>\n </ng-template>\n </mt-table>\n</div>\n" }]
|
|
906
950
|
}] });
|
|
907
951
|
|
|
908
952
|
class ApiConfiguration {
|
|
909
953
|
facade = inject(PropertiesFacade);
|
|
910
954
|
destroyRef = inject(DestroyRef);
|
|
955
|
+
transloco = inject(TranslocoService);
|
|
911
956
|
schema = signal(null, ...(ngDevMode ? [{ debugName: "schema" }] : []));
|
|
912
957
|
isWriting = false;
|
|
913
958
|
touched = false;
|
|
@@ -1063,7 +1108,7 @@ class ApiConfiguration {
|
|
|
1063
1108
|
useExisting: forwardRef(() => ApiConfiguration),
|
|
1064
1109
|
multi: true,
|
|
1065
1110
|
},
|
|
1066
|
-
], ngImport: i0, template: "<div [formGroup]=\"form\" class=\"space-y-6\">\n <div class=\"space-y-4 rounded-xl bg-white px-6 py-4 shadow-sm\">\n <div class=\"grid items-end gap-3 md:grid-cols-[minmax(0,1fr)_auto]\">\n <mt-text-field\n formControlName=\"endpoint\"\n label=\"
|
|
1111
|
+
], ngImport: i0, template: "<div [formGroup]=\"form\" class=\"space-y-6\">\n <div class=\"space-y-4 rounded-xl bg-white px-6 py-4 shadow-sm\">\n <div class=\"grid items-end gap-3 md:grid-cols-[minmax(0,1fr)_auto]\">\n <mt-text-field\n formControlName=\"endpoint\"\n [label]=\"'properties.form.endpoint' | transloco\"\n [placeholder]=\"'properties.form.endpointPlaceholder' | transloco\"\n />\n <div class=\"flex justify-end gap-2\">\n <mt-button\n type=\"button\"\n [text]=\"true\"\n icon=\"general.plus\"\n [label]=\"'properties.form.addHeader' | transloco\"\n (click)=\"addHeader()\"\n />\n <mt-button\n type=\"button\"\n [label]=\"'properties.form.testApi' | transloco\"\n [loading]=\"isTesting()\"\n (click)=\"testApi()\"\n />\n </div>\n </div>\n\n @if (headers.controls.length) {\n <div class=\"space-y-3\">\n <div class=\"text-sm font-medium text-surface-500\">\n {{ \"properties.form.headers\" | transloco }}\n </div>\n <div class=\"space-y-3\">\n @for (\n headerCtrl of headers.controls;\n track headerCtrl;\n let i = $index\n ) {\n <div\n [formGroup]=\"headerCtrl\"\n class=\"grid items-end gap-3 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]\"\n >\n <mt-text-field\n formControlName=\"key\"\n [label]=\"'properties.form.headerKey' | transloco\"\n />\n <mt-text-field\n formControlName=\"value\"\n [label]=\"'properties.form.headerValue' | transloco\"\n />\n <mt-button\n type=\"button\"\n [text]=\"true\"\n icon=\"general.trash-01\"\n (click)=\"removeHeader(i)\"\n />\n </div>\n }\n </div>\n </div>\n } @else {\n <p class=\"text-xs text-surface-400\">\n {{ \"properties.form.noHeadersMessage\" | transloco }}\n </p>\n }\n </div>\n\n <div class=\"space-y-4 rounded-xl bg-white px-6 py-4 shadow-sm\">\n @if (hasDetectedSchema()) {\n <div class=\"grid gap-4 md:grid-cols-2\">\n <mt-select-field\n formControlName=\"key\"\n [options]=\"apiProperties()\"\n [showClear]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n [label]=\"'properties.form.keyField' | transloco\"\n />\n <mt-select-field\n formControlName=\"value\"\n [options]=\"apiProperties()\"\n [showClear]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n [label]=\"'properties.form.valueField' | transloco\"\n />\n </div>\n } @else {\n <p class=\"text-xs text-surface-400\">\n {{ \"properties.form.messageTestApiPrompt\" | transloco }}\n </p>\n }\n\n <div class=\"flex items-center justify-between gap-4\">\n <mt-toggle-field\n formControlName=\"supportMultiSelect\"\n [label]=\"'properties.form.labelSupportMultiSelect' | transloco\"\n />\n @if (isTesting()) {\n <span class=\"text-xs text-surface-400\">\n {{ \"properties.form.messageTesting\" | transloco }}\n </span>\n }\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "icon", "iconPosition"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "labelPosition", "placeholder", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1067
1112
|
}
|
|
1068
1113
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ApiConfiguration, decorators: [{
|
|
1069
1114
|
type: Component,
|
|
@@ -1074,19 +1119,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
1074
1119
|
SelectField,
|
|
1075
1120
|
ToggleField,
|
|
1076
1121
|
Button,
|
|
1122
|
+
TranslocoModule,
|
|
1077
1123
|
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1078
1124
|
{
|
|
1079
1125
|
provide: NG_VALUE_ACCESSOR,
|
|
1080
1126
|
useExisting: forwardRef(() => ApiConfiguration),
|
|
1081
1127
|
multi: true,
|
|
1082
1128
|
},
|
|
1083
|
-
], template: "<div [formGroup]=\"form\" class=\"space-y-6\">\n <div class=\"space-y-4 rounded-xl bg-white px-6 py-4 shadow-sm\">\n <div class=\"grid items-end gap-3 md:grid-cols-[minmax(0,1fr)_auto]\">\n <mt-text-field\n formControlName=\"endpoint\"\n label=\"
|
|
1129
|
+
], template: "<div [formGroup]=\"form\" class=\"space-y-6\">\n <div class=\"space-y-4 rounded-xl bg-white px-6 py-4 shadow-sm\">\n <div class=\"grid items-end gap-3 md:grid-cols-[minmax(0,1fr)_auto]\">\n <mt-text-field\n formControlName=\"endpoint\"\n [label]=\"'properties.form.endpoint' | transloco\"\n [placeholder]=\"'properties.form.endpointPlaceholder' | transloco\"\n />\n <div class=\"flex justify-end gap-2\">\n <mt-button\n type=\"button\"\n [text]=\"true\"\n icon=\"general.plus\"\n [label]=\"'properties.form.addHeader' | transloco\"\n (click)=\"addHeader()\"\n />\n <mt-button\n type=\"button\"\n [label]=\"'properties.form.testApi' | transloco\"\n [loading]=\"isTesting()\"\n (click)=\"testApi()\"\n />\n </div>\n </div>\n\n @if (headers.controls.length) {\n <div class=\"space-y-3\">\n <div class=\"text-sm font-medium text-surface-500\">\n {{ \"properties.form.headers\" | transloco }}\n </div>\n <div class=\"space-y-3\">\n @for (\n headerCtrl of headers.controls;\n track headerCtrl;\n let i = $index\n ) {\n <div\n [formGroup]=\"headerCtrl\"\n class=\"grid items-end gap-3 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]\"\n >\n <mt-text-field\n formControlName=\"key\"\n [label]=\"'properties.form.headerKey' | transloco\"\n />\n <mt-text-field\n formControlName=\"value\"\n [label]=\"'properties.form.headerValue' | transloco\"\n />\n <mt-button\n type=\"button\"\n [text]=\"true\"\n icon=\"general.trash-01\"\n (click)=\"removeHeader(i)\"\n />\n </div>\n }\n </div>\n </div>\n } @else {\n <p class=\"text-xs text-surface-400\">\n {{ \"properties.form.noHeadersMessage\" | transloco }}\n </p>\n }\n </div>\n\n <div class=\"space-y-4 rounded-xl bg-white px-6 py-4 shadow-sm\">\n @if (hasDetectedSchema()) {\n <div class=\"grid gap-4 md:grid-cols-2\">\n <mt-select-field\n formControlName=\"key\"\n [options]=\"apiProperties()\"\n [showClear]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n [label]=\"'properties.form.keyField' | transloco\"\n />\n <mt-select-field\n formControlName=\"value\"\n [options]=\"apiProperties()\"\n [showClear]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n [label]=\"'properties.form.valueField' | transloco\"\n />\n </div>\n } @else {\n <p class=\"text-xs text-surface-400\">\n {{ \"properties.form.messageTestApiPrompt\" | transloco }}\n </p>\n }\n\n <div class=\"flex items-center justify-between gap-4\">\n <mt-toggle-field\n formControlName=\"supportMultiSelect\"\n [label]=\"'properties.form.labelSupportMultiSelect' | transloco\"\n />\n @if (isTesting()) {\n <span class=\"text-xs text-surface-400\">\n {{ \"properties.form.messageTesting\" | transloco }}\n </span>\n }\n </div>\n </div>\n</div>\n" }]
|
|
1084
1130
|
}], ctorParameters: () => [] });
|
|
1085
1131
|
|
|
1086
1132
|
class CheckListFormConfiguration {
|
|
1087
1133
|
propertiesFacade = inject(PropertiesFacade);
|
|
1088
1134
|
controlContainer = inject(ControlContainer);
|
|
1089
1135
|
parentGroup = this.controlContainer.control;
|
|
1136
|
+
transloco = inject(TranslocoService);
|
|
1090
1137
|
lookups = this.propertiesFacade.lookups;
|
|
1091
1138
|
configScopes = this.propertiesFacade.configScopes;
|
|
1092
1139
|
configProperties = this.propertiesFacade.configProperties;
|
|
@@ -1099,7 +1146,7 @@ class CheckListFormConfiguration {
|
|
|
1099
1146
|
sections: [
|
|
1100
1147
|
{
|
|
1101
1148
|
key: 'configuration',
|
|
1102
|
-
label: '
|
|
1149
|
+
label: this.transloco.translate('properties.form.configurationSection'),
|
|
1103
1150
|
cssClass: ' rounded-xl bg-white \
|
|
1104
1151
|
shadow-sm \
|
|
1105
1152
|
px-6 py-4',
|
|
@@ -1109,7 +1156,7 @@ class CheckListFormConfiguration {
|
|
|
1109
1156
|
{
|
|
1110
1157
|
key: 'lookup',
|
|
1111
1158
|
type: 'select',
|
|
1112
|
-
label: '
|
|
1159
|
+
label: this.transloco.translate('properties.form.selectLookup'),
|
|
1113
1160
|
optionLabel: 'title',
|
|
1114
1161
|
optionValue: 'id',
|
|
1115
1162
|
filter: true,
|
|
@@ -1118,7 +1165,7 @@ class CheckListFormConfiguration {
|
|
|
1118
1165
|
{
|
|
1119
1166
|
key: 'scopeId',
|
|
1120
1167
|
type: 'select',
|
|
1121
|
-
label: '
|
|
1168
|
+
label: this.transloco.translate('properties.form.selectScope'),
|
|
1122
1169
|
optionLabel: 'title',
|
|
1123
1170
|
optionValue: 'id',
|
|
1124
1171
|
options: this.scopeItems(),
|
|
@@ -1130,8 +1177,8 @@ class CheckListFormConfiguration {
|
|
|
1130
1177
|
options: this.configProperties(),
|
|
1131
1178
|
optionLabel: 'title',
|
|
1132
1179
|
optionValue: 'key',
|
|
1133
|
-
sourceHeader: '
|
|
1134
|
-
targetHeader: '
|
|
1180
|
+
sourceHeader: this.transloco.translate('properties.form.availableProperties'),
|
|
1181
|
+
targetHeader: this.transloco.translate('properties.form.selectedProperties'),
|
|
1135
1182
|
}),
|
|
1136
1183
|
],
|
|
1137
1184
|
},
|
|
@@ -1157,7 +1204,7 @@ class CheckListFormConfiguration {
|
|
|
1157
1204
|
this.propertiesFacade.resetConfigProperties();
|
|
1158
1205
|
}
|
|
1159
1206
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: CheckListFormConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1160
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: CheckListFormConfiguration, isStandalone: true, selector: "mt-check-list-form-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1207
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: CheckListFormConfiguration, isStandalone: true, selector: "mt-check-list-form-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1161
1208
|
{ provide: ControlContainer, useExisting: FormGroupDirective },
|
|
1162
1209
|
] });
|
|
1163
1210
|
}
|
|
@@ -1172,6 +1219,7 @@ class DynamicListConfiguration {
|
|
|
1172
1219
|
propertiesFacade = inject(PropertiesFacade);
|
|
1173
1220
|
controlContainer = inject(ControlContainer);
|
|
1174
1221
|
parentGroup = this.controlContainer.control;
|
|
1222
|
+
transloco = inject(TranslocoService);
|
|
1175
1223
|
configScopes = this.propertiesFacade.configScopes;
|
|
1176
1224
|
configProperties = this.propertiesFacade.configProperties;
|
|
1177
1225
|
configuration = toSignal(this.parentGroup.valueChanges.pipe(startWith(this.parentGroup.value), map((value) => value?.configuration), distinctUntilChanged()), { initialValue: this.parentGroup.value?.configuration });
|
|
@@ -1183,7 +1231,7 @@ class DynamicListConfiguration {
|
|
|
1183
1231
|
sections: [
|
|
1184
1232
|
{
|
|
1185
1233
|
key: 'configuration',
|
|
1186
|
-
label: '
|
|
1234
|
+
label: this.transloco.translate('properties.form.configurationSection'),
|
|
1187
1235
|
cssClass: ' rounded-xl bg-white \
|
|
1188
1236
|
shadow-sm \
|
|
1189
1237
|
px-6 py-4',
|
|
@@ -1193,7 +1241,7 @@ class DynamicListConfiguration {
|
|
|
1193
1241
|
{
|
|
1194
1242
|
key: 'scopeId',
|
|
1195
1243
|
type: 'select',
|
|
1196
|
-
label: '
|
|
1244
|
+
label: this.transloco.translate('properties.form.selectScope'),
|
|
1197
1245
|
optionLabel: 'title',
|
|
1198
1246
|
optionValue: 'id',
|
|
1199
1247
|
filter: true,
|
|
@@ -1205,13 +1253,13 @@ class DynamicListConfiguration {
|
|
|
1205
1253
|
options: this.configProperties(),
|
|
1206
1254
|
optionLabel: 'title',
|
|
1207
1255
|
optionValue: 'key',
|
|
1208
|
-
sourceHeader: '
|
|
1209
|
-
targetHeader: '
|
|
1256
|
+
sourceHeader: this.transloco.translate('properties.form.availableProperties'),
|
|
1257
|
+
targetHeader: this.transloco.translate('properties.form.selectedProperties'),
|
|
1210
1258
|
}),
|
|
1211
1259
|
{
|
|
1212
|
-
key: '
|
|
1260
|
+
key: 'mappingBehaviour',
|
|
1213
1261
|
type: 'toggle',
|
|
1214
|
-
label: '
|
|
1262
|
+
label: this.transloco.translate('properties.form.mapToActual'),
|
|
1215
1263
|
cssClass: 'md:col-span-2',
|
|
1216
1264
|
},
|
|
1217
1265
|
],
|
|
@@ -1233,7 +1281,7 @@ class DynamicListConfiguration {
|
|
|
1233
1281
|
this.propertiesFacade.resetConfigProperties();
|
|
1234
1282
|
}
|
|
1235
1283
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DynamicListConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1236
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: DynamicListConfiguration, isStandalone: true, selector: "mt-dynamic-list-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1284
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: DynamicListConfiguration, isStandalone: true, selector: "mt-dynamic-list-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1237
1285
|
{ provide: ControlContainer, useExisting: FormGroupDirective },
|
|
1238
1286
|
] });
|
|
1239
1287
|
}
|
|
@@ -1248,6 +1296,7 @@ class EditableListViewConfiguration {
|
|
|
1248
1296
|
propertiesFacade = inject(PropertiesFacade);
|
|
1249
1297
|
controlContainer = inject(ControlContainer);
|
|
1250
1298
|
parentGroup = this.controlContainer.control;
|
|
1299
|
+
transloco = inject(TranslocoService);
|
|
1251
1300
|
configScopes = this.propertiesFacade.configScopes;
|
|
1252
1301
|
configProperties = this.propertiesFacade.configProperties;
|
|
1253
1302
|
configuration = toSignal(this.parentGroup.valueChanges.pipe(startWith(this.parentGroup.value), map((value) => value?.configuration), distinctUntilChanged()), { initialValue: this.parentGroup.value?.configuration });
|
|
@@ -1259,7 +1308,7 @@ class EditableListViewConfiguration {
|
|
|
1259
1308
|
sections: [
|
|
1260
1309
|
{
|
|
1261
1310
|
key: 'configuration',
|
|
1262
|
-
label: '
|
|
1311
|
+
label: this.transloco.translate('properties.form.configurationSection'),
|
|
1263
1312
|
cssClass: ' rounded-xl bg-white \
|
|
1264
1313
|
shadow-sm \
|
|
1265
1314
|
px-6 py-4',
|
|
@@ -1269,7 +1318,7 @@ class EditableListViewConfiguration {
|
|
|
1269
1318
|
{
|
|
1270
1319
|
key: 'scopeId',
|
|
1271
1320
|
type: 'select',
|
|
1272
|
-
label: '
|
|
1321
|
+
label: this.transloco.translate('properties.form.selectScope'),
|
|
1273
1322
|
optionLabel: 'title',
|
|
1274
1323
|
optionValue: 'id',
|
|
1275
1324
|
options: this.scopeItems(),
|
|
@@ -1280,18 +1329,18 @@ class EditableListViewConfiguration {
|
|
|
1280
1329
|
options: this.configProperties(),
|
|
1281
1330
|
optionLabel: 'title',
|
|
1282
1331
|
optionValue: 'key',
|
|
1283
|
-
sourceHeader: '
|
|
1284
|
-
targetHeader: '
|
|
1332
|
+
sourceHeader: this.transloco.translate('properties.form.availableProperties'),
|
|
1333
|
+
targetHeader: this.transloco.translate('properties.form.selectedProperties'),
|
|
1285
1334
|
}),
|
|
1286
1335
|
{
|
|
1287
1336
|
key: 'isEditable',
|
|
1288
1337
|
type: 'toggle',
|
|
1289
|
-
label: '
|
|
1338
|
+
label: this.transloco.translate('properties.form.isEditable'),
|
|
1290
1339
|
},
|
|
1291
1340
|
{
|
|
1292
1341
|
key: 'preserveValue',
|
|
1293
1342
|
type: 'toggle',
|
|
1294
|
-
label: '
|
|
1343
|
+
label: this.transloco.translate('properties.form.preserveValue'),
|
|
1295
1344
|
},
|
|
1296
1345
|
],
|
|
1297
1346
|
},
|
|
@@ -1312,7 +1361,7 @@ class EditableListViewConfiguration {
|
|
|
1312
1361
|
this.propertiesFacade.resetConfigProperties();
|
|
1313
1362
|
}
|
|
1314
1363
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: EditableListViewConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1315
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: EditableListViewConfiguration, isStandalone: true, selector: "mt-editable-list-view-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1364
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: EditableListViewConfiguration, isStandalone: true, selector: "mt-editable-list-view-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1316
1365
|
{ provide: ControlContainer, useExisting: FormGroupDirective },
|
|
1317
1366
|
] });
|
|
1318
1367
|
}
|
|
@@ -1329,6 +1378,7 @@ class InternalModuleConfiguration {
|
|
|
1329
1378
|
levels;
|
|
1330
1379
|
propertiesFacade = inject(PropertiesFacade);
|
|
1331
1380
|
cc = inject(ControlContainer);
|
|
1381
|
+
transloco = inject(TranslocoService);
|
|
1332
1382
|
parentGroup = this.cc.control;
|
|
1333
1383
|
configProperties = this.propertiesFacade.configProperties;
|
|
1334
1384
|
configScopes = this.propertiesFacade.configScopes;
|
|
@@ -1345,7 +1395,7 @@ class InternalModuleConfiguration {
|
|
|
1345
1395
|
sections: [
|
|
1346
1396
|
{
|
|
1347
1397
|
key: 'configuration',
|
|
1348
|
-
label: '
|
|
1398
|
+
label: this.transloco.translate('properties.form.configurationSection'),
|
|
1349
1399
|
cssClass: ' rounded-xl bg-white \
|
|
1350
1400
|
shadow-sm \
|
|
1351
1401
|
px-6 py-4',
|
|
@@ -1355,7 +1405,7 @@ class InternalModuleConfiguration {
|
|
|
1355
1405
|
{
|
|
1356
1406
|
key: 'type',
|
|
1357
1407
|
type: 'select',
|
|
1358
|
-
label: '
|
|
1408
|
+
label: this.transloco.translate('properties.form.type'),
|
|
1359
1409
|
optionLabel: 'scope',
|
|
1360
1410
|
optionValue: 'scope',
|
|
1361
1411
|
options: this.configScopes(),
|
|
@@ -1363,7 +1413,7 @@ class InternalModuleConfiguration {
|
|
|
1363
1413
|
{
|
|
1364
1414
|
key: 'scopeId',
|
|
1365
1415
|
type: 'select',
|
|
1366
|
-
label: '
|
|
1416
|
+
label: this.transloco.translate('properties.form.selectScope'),
|
|
1367
1417
|
optionLabel: 'title',
|
|
1368
1418
|
optionValue: 'id',
|
|
1369
1419
|
filter: true,
|
|
@@ -1372,7 +1422,7 @@ class InternalModuleConfiguration {
|
|
|
1372
1422
|
{
|
|
1373
1423
|
type: 'select',
|
|
1374
1424
|
key: 'property',
|
|
1375
|
-
label: '
|
|
1425
|
+
label: this.transloco.translate('properties.form.valueProperty'),
|
|
1376
1426
|
optionLabel: 'title',
|
|
1377
1427
|
optionValue: 'key',
|
|
1378
1428
|
options: this.configProperties(),
|
|
@@ -1383,14 +1433,14 @@ class InternalModuleConfiguration {
|
|
|
1383
1433
|
options: this.configProperties(),
|
|
1384
1434
|
optionLabel: 'title',
|
|
1385
1435
|
optionValue: 'key',
|
|
1386
|
-
sourceHeader: '
|
|
1387
|
-
targetHeader: '
|
|
1436
|
+
sourceHeader: this.transloco.translate('properties.form.availableProperties'),
|
|
1437
|
+
targetHeader: this.transloco.translate('properties.form.selectedProperties'),
|
|
1388
1438
|
}),
|
|
1389
1439
|
{
|
|
1390
1440
|
cssClass: 'md:col-span-2',
|
|
1391
1441
|
key: 'preserveValue',
|
|
1392
1442
|
type: 'toggle',
|
|
1393
|
-
label: '
|
|
1443
|
+
label: this.transloco.translate('properties.form.labelPreserveValue'),
|
|
1394
1444
|
},
|
|
1395
1445
|
],
|
|
1396
1446
|
},
|
|
@@ -1415,7 +1465,7 @@ class InternalModuleConfiguration {
|
|
|
1415
1465
|
this.propertiesFacade.resetConfigProperties();
|
|
1416
1466
|
}
|
|
1417
1467
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: InternalModuleConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1418
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: InternalModuleConfiguration, isStandalone: true, selector: "mt-internal-module-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1468
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: InternalModuleConfiguration, isStandalone: true, selector: "mt-internal-module-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1419
1469
|
{ provide: ControlContainer, useExisting: FormGroupDirective },
|
|
1420
1470
|
] });
|
|
1421
1471
|
}
|
|
@@ -1428,12 +1478,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
1428
1478
|
|
|
1429
1479
|
class LocationConfiguration {
|
|
1430
1480
|
facade = inject(PropertiesFacade);
|
|
1481
|
+
transloco = inject(TranslocoService);
|
|
1431
1482
|
countries = this.facade.countries;
|
|
1432
1483
|
formConfig = computed(() => ({
|
|
1433
1484
|
sections: [
|
|
1434
1485
|
{
|
|
1435
1486
|
key: 'configuration',
|
|
1436
|
-
label: '
|
|
1487
|
+
label: this.transloco.translate('properties.form.configurationSection'),
|
|
1437
1488
|
cssClass: ' rounded-xl bg-white \
|
|
1438
1489
|
shadow-sm \
|
|
1439
1490
|
px-6 py-4',
|
|
@@ -1443,7 +1494,7 @@ class LocationConfiguration {
|
|
|
1443
1494
|
{
|
|
1444
1495
|
key: 'country',
|
|
1445
1496
|
type: 'select',
|
|
1446
|
-
label: '
|
|
1497
|
+
label: this.transloco.translate('properties.form.selectCountry'),
|
|
1447
1498
|
optionLabel: 'name',
|
|
1448
1499
|
optionValue: 'name',
|
|
1449
1500
|
options: this.countries(),
|
|
@@ -1461,7 +1512,7 @@ class LocationConfiguration {
|
|
|
1461
1512
|
});
|
|
1462
1513
|
}
|
|
1463
1514
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LocationConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1464
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: LocationConfiguration, isStandalone: true, selector: "mt-location-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1515
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: LocationConfiguration, isStandalone: true, selector: "mt-location-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1465
1516
|
{ provide: ControlContainer, useExisting: FormGroupDirective },
|
|
1466
1517
|
] });
|
|
1467
1518
|
}
|
|
@@ -1474,12 +1525,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
1474
1525
|
|
|
1475
1526
|
class LookupConfiguration {
|
|
1476
1527
|
facade = inject(PropertiesFacade);
|
|
1528
|
+
transloco = inject(TranslocoService);
|
|
1477
1529
|
lookups = this.facade.lookups;
|
|
1478
1530
|
formConfig = computed(() => ({
|
|
1479
1531
|
sections: [
|
|
1480
1532
|
{
|
|
1481
1533
|
key: 'configuration',
|
|
1482
|
-
label: '
|
|
1534
|
+
label: this.transloco.translate('properties.form.configurationSection'),
|
|
1483
1535
|
cssClass: ' rounded-xl bg-white \
|
|
1484
1536
|
shadow-sm \
|
|
1485
1537
|
px-6 py-4',
|
|
@@ -1489,7 +1541,7 @@ class LookupConfiguration {
|
|
|
1489
1541
|
{
|
|
1490
1542
|
key: 'lookup',
|
|
1491
1543
|
type: 'select',
|
|
1492
|
-
label: '
|
|
1544
|
+
label: this.transloco.translate('properties.form.selectLookup'),
|
|
1493
1545
|
optionLabel: 'title',
|
|
1494
1546
|
optionValue: 'id',
|
|
1495
1547
|
options: this.lookups(),
|
|
@@ -1507,7 +1559,7 @@ class LookupConfiguration {
|
|
|
1507
1559
|
});
|
|
1508
1560
|
}
|
|
1509
1561
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LookupConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1510
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: LookupConfiguration, isStandalone: true, selector: "mt-lookup-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1562
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: LookupConfiguration, isStandalone: true, selector: "mt-lookup-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1511
1563
|
{ provide: ControlContainer, useExisting: FormGroupDirective },
|
|
1512
1564
|
] });
|
|
1513
1565
|
}
|
|
@@ -1519,11 +1571,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
1519
1571
|
}], ctorParameters: () => [] });
|
|
1520
1572
|
|
|
1521
1573
|
class PercentageConfiguration {
|
|
1574
|
+
transloco = inject(TranslocoService);
|
|
1522
1575
|
formConfig = signal({
|
|
1523
1576
|
sections: [
|
|
1524
1577
|
{
|
|
1525
1578
|
key: 'configuration',
|
|
1526
|
-
label: '
|
|
1579
|
+
label: this.transloco.translate('properties.form.configurationSection'),
|
|
1527
1580
|
cssClass: ' rounded-xl bg-white \
|
|
1528
1581
|
shadow-sm \
|
|
1529
1582
|
px-6 py-4',
|
|
@@ -1533,14 +1586,14 @@ class PercentageConfiguration {
|
|
|
1533
1586
|
{
|
|
1534
1587
|
key: 'color',
|
|
1535
1588
|
type: 'color-picker',
|
|
1536
|
-
label: '
|
|
1589
|
+
label: this.transloco.translate('properties.form.selectColor'),
|
|
1537
1590
|
},
|
|
1538
1591
|
],
|
|
1539
1592
|
},
|
|
1540
1593
|
],
|
|
1541
1594
|
}, ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
|
|
1542
1595
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PercentageConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1543
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: PercentageConfiguration, isStandalone: true, selector: "mt-percentage-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1596
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: PercentageConfiguration, isStandalone: true, selector: "mt-percentage-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1544
1597
|
{ provide: ControlContainer, useExisting: FormGroupDirective },
|
|
1545
1598
|
] });
|
|
1546
1599
|
}
|
|
@@ -1553,12 +1606,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
1553
1606
|
|
|
1554
1607
|
class UserConfiguration {
|
|
1555
1608
|
facade = inject(PropertiesFacade);
|
|
1609
|
+
transloco = inject(TranslocoService);
|
|
1556
1610
|
groups = this.facade.groups;
|
|
1557
1611
|
formConfig = computed(() => ({
|
|
1558
1612
|
sections: [
|
|
1559
1613
|
{
|
|
1560
1614
|
key: 'configuration',
|
|
1561
|
-
label: '
|
|
1615
|
+
label: this.transloco.translate('properties.form.configurationSection'),
|
|
1562
1616
|
cssClass: ' rounded-xl bg-white \
|
|
1563
1617
|
shadow-sm \
|
|
1564
1618
|
px-6 py-4',
|
|
@@ -1568,7 +1622,7 @@ class UserConfiguration {
|
|
|
1568
1622
|
{
|
|
1569
1623
|
key: 'group',
|
|
1570
1624
|
type: 'select',
|
|
1571
|
-
label: '
|
|
1625
|
+
label: this.transloco.translate('properties.form.selectGroup'),
|
|
1572
1626
|
optionLabel: 'title',
|
|
1573
1627
|
optionValue: 'id',
|
|
1574
1628
|
options: this.groups(),
|
|
@@ -1586,7 +1640,7 @@ class UserConfiguration {
|
|
|
1586
1640
|
});
|
|
1587
1641
|
}
|
|
1588
1642
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: UserConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1589
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: UserConfiguration, isStandalone: true, selector: "mt-user-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1643
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: UserConfiguration, isStandalone: true, selector: "mt-user-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1590
1644
|
{ provide: ControlContainer, useExisting: FormGroupDirective },
|
|
1591
1645
|
] });
|
|
1592
1646
|
}
|
|
@@ -1708,11 +1762,12 @@ const ATTACHMENT_ACCEPT = [
|
|
|
1708
1762
|
},
|
|
1709
1763
|
];
|
|
1710
1764
|
class AttachmentConfiguration {
|
|
1765
|
+
transloco = inject(TranslocoService);
|
|
1711
1766
|
formConfig = signal({
|
|
1712
1767
|
sections: [
|
|
1713
1768
|
{
|
|
1714
1769
|
key: 'configuration',
|
|
1715
|
-
label: '
|
|
1770
|
+
label: this.transloco.translate('properties.form.configurationSection'),
|
|
1716
1771
|
cssClass: ' rounded-xl bg-white \
|
|
1717
1772
|
shadow-sm \
|
|
1718
1773
|
px-6 py-4',
|
|
@@ -1724,21 +1779,21 @@ class AttachmentConfiguration {
|
|
|
1724
1779
|
options: ATTACHMENT_ACCEPT,
|
|
1725
1780
|
optionLabel: 'name',
|
|
1726
1781
|
optionValue: 'key',
|
|
1727
|
-
sourceHeader: '
|
|
1728
|
-
targetHeader: '
|
|
1782
|
+
sourceHeader: this.transloco.translate('properties.form.availableTypes'),
|
|
1783
|
+
targetHeader: this.transloco.translate('properties.form.selectedTypes'),
|
|
1729
1784
|
cssClass: 'md:col-span-2',
|
|
1730
1785
|
}),
|
|
1731
1786
|
{
|
|
1732
1787
|
key: 'IsMulitple',
|
|
1733
1788
|
type: 'toggle',
|
|
1734
|
-
label: '
|
|
1789
|
+
label: this.transloco.translate('properties.form.allowMultiple'),
|
|
1735
1790
|
},
|
|
1736
1791
|
],
|
|
1737
1792
|
},
|
|
1738
1793
|
],
|
|
1739
1794
|
}, ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
|
|
1740
1795
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AttachmentConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1741
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: AttachmentConfiguration, isStandalone: true, selector: "mt-attachment-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1796
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: AttachmentConfiguration, isStandalone: true, selector: "mt-attachment-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
|
|
1742
1797
|
{ provide: ControlContainer, useExisting: FormGroupDirective },
|
|
1743
1798
|
] });
|
|
1744
1799
|
}
|
|
@@ -1753,9 +1808,12 @@ class PropertyForm {
|
|
|
1753
1808
|
facade = inject(PropertiesFacade);
|
|
1754
1809
|
router = inject(Router);
|
|
1755
1810
|
route = inject(ActivatedRoute);
|
|
1811
|
+
transloco = inject(TranslocoService);
|
|
1756
1812
|
propertyId = input('', ...(ngDevMode ? [{ debugName: "propertyId" }] : []));
|
|
1757
1813
|
propertyTypes = this.facade.propertyTypes;
|
|
1758
|
-
submitLabel = computed(() =>
|
|
1814
|
+
submitLabel = computed(() => this.propertyId()
|
|
1815
|
+
? this.transloco.translate('properties.form.updateButton')
|
|
1816
|
+
: this.transloco.translate('properties.form.createButton'), ...(ngDevMode ? [{ debugName: "submitLabel" }] : []));
|
|
1759
1817
|
isEditing = computed(() => !!this.propertyId(), ...(ngDevMode ? [{ debugName: "isEditing" }] : []));
|
|
1760
1818
|
// Keep your original structure: "main" is a FormControl<any>, "configuration" is FormControl<any|null>
|
|
1761
1819
|
propertyForm = new FormGroup({
|
|
@@ -1809,18 +1867,19 @@ class PropertyForm {
|
|
|
1809
1867
|
{
|
|
1810
1868
|
key: 'viewType',
|
|
1811
1869
|
type: 'select',
|
|
1812
|
-
placeholder: '
|
|
1870
|
+
placeholder: this.transloco.translate('properties.form.selectPropertyType'),
|
|
1813
1871
|
optionLabel: 'label.en',
|
|
1814
1872
|
optionValue: 'viewType',
|
|
1815
1873
|
cssClass: 'w-1/2',
|
|
1816
1874
|
options: this.propertyTypes()?.value,
|
|
1817
1875
|
disabled: this.isEditing(),
|
|
1818
1876
|
filter: true,
|
|
1877
|
+
hasPlaceholderPrefix: false,
|
|
1819
1878
|
},
|
|
1820
1879
|
{
|
|
1821
1880
|
key: 'isCalculated',
|
|
1822
1881
|
type: 'toggle',
|
|
1823
|
-
label: '
|
|
1882
|
+
label: this.transloco.translate('properties.form.calculated'),
|
|
1824
1883
|
cssClass: 'justify-self-end',
|
|
1825
1884
|
relations: [
|
|
1826
1885
|
{
|
|
@@ -1879,26 +1938,26 @@ class PropertyForm {
|
|
|
1879
1938
|
},
|
|
1880
1939
|
{
|
|
1881
1940
|
key: 'default-info',
|
|
1882
|
-
label: '
|
|
1941
|
+
label: this.transloco.translate('properties.form.defaultInfoSection'),
|
|
1883
1942
|
type: 'header',
|
|
1884
1943
|
cssClass: ' rounded-xl bg-white shadow-sm p-6',
|
|
1885
1944
|
bodyClass: 'grid grid-cols-1 md:grid-cols-2 gap-3',
|
|
1886
1945
|
fields: [
|
|
1887
1946
|
{
|
|
1888
1947
|
key: 'title.en',
|
|
1889
|
-
label: '
|
|
1890
|
-
placeholder: '
|
|
1948
|
+
label: this.transloco.translate('properties.form.englishName'),
|
|
1949
|
+
placeholder: this.transloco.translate('properties.form.enterEnglishName'),
|
|
1891
1950
|
validators: [new ValidatorConfig({ type: 'required' })],
|
|
1892
1951
|
},
|
|
1893
1952
|
{
|
|
1894
1953
|
key: 'title.ar',
|
|
1895
|
-
label: '
|
|
1896
|
-
placeholder: '
|
|
1954
|
+
label: this.transloco.translate('properties.form.arabicName'),
|
|
1955
|
+
placeholder: this.transloco.translate('properties.form.enterArabicName'),
|
|
1897
1956
|
validators: [new ValidatorConfig({ type: 'required' })],
|
|
1898
1957
|
},
|
|
1899
1958
|
{
|
|
1900
1959
|
key: 'description',
|
|
1901
|
-
label: '
|
|
1960
|
+
label: this.transloco.translate('properties.form.description'),
|
|
1902
1961
|
type: 'textarea',
|
|
1903
1962
|
cssClass: 'md:col-span-2',
|
|
1904
1963
|
},
|
|
@@ -2087,7 +2146,7 @@ class PropertyForm {
|
|
|
2087
2146
|
this.destroyConfigurationComponent();
|
|
2088
2147
|
}
|
|
2089
2148
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PropertyForm, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2090
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: PropertyForm, isStandalone: true, selector: "mt-property-form", inputs: { propertyId: { classPropertyName: "propertyId", publicName: "propertyId", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "configurationHost", first: true, predicate: ["configurationHost"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<mt-card class=\"h-full\">\n <ng-template #headless>\n <div class=\"flex justify-between items-center p-3 border-b border-surface\">\n <div class=\"flex gap-2 items-center\">\n <mt-button\n [text]=\"true\"\n icon=\"arrow.arrow-narrow-left\"\n size=\"large\"\n (click)=\"goBack()\"\n ></mt-button>\n <mt-avatar size=\"normal\" icon=\"custom.user-pp\" />\n <h3 class=\"font-bold text-lg\">\n {{
|
|
2149
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: PropertyForm, isStandalone: true, selector: "mt-property-form", inputs: { propertyId: { classPropertyName: "propertyId", publicName: "propertyId", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "configurationHost", first: true, predicate: ["configurationHost"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<mt-card class=\"h-full\">\n <ng-template #headless>\n <div class=\"flex justify-between items-center p-3 border-b border-surface\">\n <div class=\"flex gap-2 items-center\">\n <mt-button\n [text]=\"true\"\n icon=\"arrow.arrow-narrow-left\"\n size=\"large\"\n (click)=\"goBack()\"\n ></mt-button>\n <mt-avatar size=\"normal\" icon=\"custom.user-pp\" />\n <h3 class=\"font-bold text-lg\">\n {{\n propertyId()\n ? (\"properties.form.editProperty\" | transloco)\n : (\"properties.form.createNewProperty\" | transloco)\n }}\n </h3>\n </div>\n <mt-button\n class=\"mx-2\"\n [label]=\"submitLabel()\"\n [icon]=\"isEditing() ? 'custom.pencil' : 'general.plus'\"\n [loading]=\"submitting()\"\n [disabled]=\"submitDisabled() || this.propertyForm.invalid\"\n (click)=\"createOrEditProperty()\"\n />\n </div>\n <div\n [formGroup]=\"propertyForm\"\n class=\"h-full py-4 bg-[radial-gradient(120%_80%_at_100%_0%,_#EBEFFF_0%,_#F6F8FC_45%,_#F6F8FC_100%)] h-full overflow-y-auto flex justify-center\"\n >\n <div class=\"w-1/2 flex flex-col gap-6\">\n @if (loading()) {\n <!-- Skeleton Loading State -->\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\n <div class=\"flex justify-between items-center gap-6\">\n <p-skeleton width=\"50%\" height=\"3rem\"></p-skeleton>\n <p-skeleton width=\"8rem\" height=\"2.5rem\"></p-skeleton>\n </div>\n </div>\n\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\n <p-skeleton\n width=\"12rem\"\n height=\"1.5rem\"\n styleClass=\"mb-4\"\n ></p-skeleton>\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <p-skeleton height=\"3rem\"></p-skeleton>\n <p-skeleton height=\"3rem\"></p-skeleton>\n <p-skeleton height=\"6rem\" styleClass=\"md:col-span-2\"></p-skeleton>\n <p-skeleton height=\"3rem\" styleClass=\"md:col-span-2\"></p-skeleton>\n </div>\n </div>\n\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\n <p-skeleton\n width=\"10rem\"\n height=\"1.5rem\"\n styleClass=\"mb-4\"\n ></p-skeleton>\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <p-skeleton height=\"3rem\"></p-skeleton>\n <p-skeleton height=\"3rem\"></p-skeleton>\n <p-skeleton height=\"8rem\" styleClass=\"md:col-span-2\"></p-skeleton>\n </div>\n </div>\n } @else {\n <mt-dynamic-form\n [formConfig]=\"dynamicFormConfigMain()\"\n [formControlName]=\"'main'\"\n />\n @if (configurationFormConfig()) {\n <mt-dynamic-form\n formControlName=\"configuration\"\n [formConfig]=\"configurationFormConfig()!\"\n />\n } @else {\n <ng-container #configurationHost></ng-container>\n @if (!configurationComponentExists()) {\n @switch (propertyType()) {\n @case (\"User\") {\n <mt-user-configuration />\n }\n @case (\"Percentage\") {\n <mt-percentage-configuration />\n }\n @case (\"Lookup\") {\n <mt-lookup-configuration />\n }\n @case (\"LookupMultiSelect\") {\n <mt-lookup-configuration />\n }\n @case (\"InternalModule\") {\n <mt-internal-module-configuration />\n }\n @case (\"DynamicList\") {\n <mt-dynamic-list-configuration />\n }\n @case (\"API\") {\n <mt-api-configuration formControlName=\"configuration\" />\n }\n <!-- @case('ViewList') { REMOVED FOR NOW\n <mt-view-list-configuration />\n } -->\n @case (\"Attachment\") {\n <mt-attachment-configuration />\n }\n <!-- @case('ReferenceProperty') { REMOVED FOR NOW\n } -->\n @case (\"EditableListView\") {\n <mt-editable-list-view-configuration />\n }\n @case (\"LookupLog\") {\n <mt-check-list-form-configuration />\n }\n <!-- @case('LookupMatrix') { REMOVED FOR NOW\n <mt-lookup-configuration />\n } -->\n @case (\"Location\") {\n <mt-location-configuration />\n }\n }\n }\n }\n }\n </div>\n </div>\n </ng-template>\n</mt-card>\n", styles: [""], dependencies: [{ kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ApiConfiguration, selector: "mt-api-configuration" }, { kind: "component", type: CheckListFormConfiguration, selector: "mt-check-list-form-configuration" }, { kind: "component", type: DynamicListConfiguration, selector: "mt-dynamic-list-configuration" }, { kind: "component", type: EditableListViewConfiguration, selector: "mt-editable-list-view-configuration" }, { kind: "component", type: InternalModuleConfiguration, selector: "mt-internal-module-configuration" }, { kind: "component", type: LocationConfiguration, selector: "mt-location-configuration" }, { kind: "component", type: LookupConfiguration, selector: "mt-lookup-configuration" }, { kind: "component", type: PercentageConfiguration, selector: "mt-percentage-configuration" }, { kind: "component", type: UserConfiguration, selector: "mt-user-configuration" }, { kind: "component", type: AttachmentConfiguration, selector: "mt-attachment-configuration" }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i1.TranslocoPipe, name: "transloco" }] });
|
|
2091
2150
|
}
|
|
2092
2151
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PropertyForm, decorators: [{
|
|
2093
2152
|
type: Component,
|
|
@@ -2108,7 +2167,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
2108
2167
|
UserConfiguration,
|
|
2109
2168
|
AttachmentConfiguration,
|
|
2110
2169
|
SkeletonModule,
|
|
2111
|
-
|
|
2170
|
+
TranslocoModule,
|
|
2171
|
+
], template: "<mt-card class=\"h-full\">\n <ng-template #headless>\n <div class=\"flex justify-between items-center p-3 border-b border-surface\">\n <div class=\"flex gap-2 items-center\">\n <mt-button\n [text]=\"true\"\n icon=\"arrow.arrow-narrow-left\"\n size=\"large\"\n (click)=\"goBack()\"\n ></mt-button>\n <mt-avatar size=\"normal\" icon=\"custom.user-pp\" />\n <h3 class=\"font-bold text-lg\">\n {{\n propertyId()\n ? (\"properties.form.editProperty\" | transloco)\n : (\"properties.form.createNewProperty\" | transloco)\n }}\n </h3>\n </div>\n <mt-button\n class=\"mx-2\"\n [label]=\"submitLabel()\"\n [icon]=\"isEditing() ? 'custom.pencil' : 'general.plus'\"\n [loading]=\"submitting()\"\n [disabled]=\"submitDisabled() || this.propertyForm.invalid\"\n (click)=\"createOrEditProperty()\"\n />\n </div>\n <div\n [formGroup]=\"propertyForm\"\n class=\"h-full py-4 bg-[radial-gradient(120%_80%_at_100%_0%,_#EBEFFF_0%,_#F6F8FC_45%,_#F6F8FC_100%)] h-full overflow-y-auto flex justify-center\"\n >\n <div class=\"w-1/2 flex flex-col gap-6\">\n @if (loading()) {\n <!-- Skeleton Loading State -->\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\n <div class=\"flex justify-between items-center gap-6\">\n <p-skeleton width=\"50%\" height=\"3rem\"></p-skeleton>\n <p-skeleton width=\"8rem\" height=\"2.5rem\"></p-skeleton>\n </div>\n </div>\n\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\n <p-skeleton\n width=\"12rem\"\n height=\"1.5rem\"\n styleClass=\"mb-4\"\n ></p-skeleton>\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <p-skeleton height=\"3rem\"></p-skeleton>\n <p-skeleton height=\"3rem\"></p-skeleton>\n <p-skeleton height=\"6rem\" styleClass=\"md:col-span-2\"></p-skeleton>\n <p-skeleton height=\"3rem\" styleClass=\"md:col-span-2\"></p-skeleton>\n </div>\n </div>\n\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\n <p-skeleton\n width=\"10rem\"\n height=\"1.5rem\"\n styleClass=\"mb-4\"\n ></p-skeleton>\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <p-skeleton height=\"3rem\"></p-skeleton>\n <p-skeleton height=\"3rem\"></p-skeleton>\n <p-skeleton height=\"8rem\" styleClass=\"md:col-span-2\"></p-skeleton>\n </div>\n </div>\n } @else {\n <mt-dynamic-form\n [formConfig]=\"dynamicFormConfigMain()\"\n [formControlName]=\"'main'\"\n />\n @if (configurationFormConfig()) {\n <mt-dynamic-form\n formControlName=\"configuration\"\n [formConfig]=\"configurationFormConfig()!\"\n />\n } @else {\n <ng-container #configurationHost></ng-container>\n @if (!configurationComponentExists()) {\n @switch (propertyType()) {\n @case (\"User\") {\n <mt-user-configuration />\n }\n @case (\"Percentage\") {\n <mt-percentage-configuration />\n }\n @case (\"Lookup\") {\n <mt-lookup-configuration />\n }\n @case (\"LookupMultiSelect\") {\n <mt-lookup-configuration />\n }\n @case (\"InternalModule\") {\n <mt-internal-module-configuration />\n }\n @case (\"DynamicList\") {\n <mt-dynamic-list-configuration />\n }\n @case (\"API\") {\n <mt-api-configuration formControlName=\"configuration\" />\n }\n <!-- @case('ViewList') { REMOVED FOR NOW\n <mt-view-list-configuration />\n } -->\n @case (\"Attachment\") {\n <mt-attachment-configuration />\n }\n <!-- @case('ReferenceProperty') { REMOVED FOR NOW\n } -->\n @case (\"EditableListView\") {\n <mt-editable-list-view-configuration />\n }\n @case (\"LookupLog\") {\n <mt-check-list-form-configuration />\n }\n <!-- @case('LookupMatrix') { REMOVED FOR NOW\n <mt-lookup-configuration />\n } -->\n @case (\"Location\") {\n <mt-location-configuration />\n }\n }\n }\n }\n }\n </div>\n </div>\n </ng-template>\n</mt-card>\n" }]
|
|
2112
2172
|
}], ctorParameters: () => [], propDecorators: { configurationHost: [{
|
|
2113
2173
|
type: ViewChild,
|
|
2114
2174
|
args: ['configurationHost', { read: ViewContainerRef }]
|