@masterteam/components 0.0.200 → 0.0.202
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/common.css +1 -1
- package/fesm2022/masterteam-components-business-fields.mjs +6 -6
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-date-field.mjs +4 -3
- package/fesm2022/masterteam-components-date-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +6 -6
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-field-validation.mjs.map +1 -1
- package/fesm2022/masterteam-components-location-field.mjs +76 -34
- package/fesm2022/masterteam-components-location-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-property-filter-builder.mjs +2 -2
- package/fesm2022/masterteam-components-property-filter-builder.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +122 -6
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/fesm2022/masterteam-components-textarea-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-treeselect-field.mjs +2 -2
- package/fesm2022/masterteam-components-treeselect-field.mjs.map +1 -1
- package/package.json +4 -4
- package/types/masterteam-components-date-field.d.ts +2 -1
- package/types/masterteam-components-location-field.d.ts +28 -4
- package/types/masterteam-components-table.d.ts +41 -1
|
@@ -18,6 +18,7 @@ class DateField {
|
|
|
18
18
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
19
19
|
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
20
20
|
showIcon = input(true, ...(ngDevMode ? [{ debugName: "showIcon" }] : /* istanbul ignore next */ []));
|
|
21
|
+
showOnFocus = input(true, ...(ngDevMode ? [{ debugName: "showOnFocus" }] : /* istanbul ignore next */ []));
|
|
21
22
|
showClear = input(false, ...(ngDevMode ? [{ debugName: "showClear" }] : /* istanbul ignore next */ []));
|
|
22
23
|
showTime = input(false, ...(ngDevMode ? [{ debugName: "showTime" }] : /* istanbul ignore next */ []));
|
|
23
24
|
minDate = input(...(ngDevMode ? [undefined, { debugName: "minDate" }] : /* istanbul ignore next */ []));
|
|
@@ -84,17 +85,17 @@ class DateField {
|
|
|
84
85
|
this.disabled.set(disabled);
|
|
85
86
|
}
|
|
86
87
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DateField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
87
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DateField, isStandalone: true, selector: "mt-date-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, pInputs: { classPropertyName: "pInputs", publicName: "pInputs", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.styleClass" }, classAttribute: "grid gap-1" }, viewQueries: [{ propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<p-datepicker\r\n #calendar\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n [baseZIndex]=\"1051\"\r\n placeholder=\"{{ placeholder() ?? label() ?? '' }}\"\r\n inputStyleClass=\"w-full\"\r\n [showIcon]=\"showIcon()\"\r\n [showClear]=\"showClear()\"\r\n [showTime]=\"showTime()\"\r\n [minDate]=\"minDate()\"\r\n [maxDate]=\"maxDate()\"\r\n dateFormat=\"dd/mm/yy\"\r\n appendTo=\"body\"\r\n>\r\n <ng-template #previousicon>\r\n <mt-icon\r\n [icon]=\"rtl() ? 'arrow.chevron-right' : 'arrow.chevron-left'\"\r\n class=\"text-2xl\"\r\n />\r\n </ng-template>\r\n <ng-template #nexticon>\r\n <mt-icon\r\n [icon]=\"rtl() ? 'arrow.chevron-left' : 'arrow.chevron-right'\"\r\n class=\"text-2xl\"\r\n />\r\n </ng-template>\r\n</p-datepicker>\r\n\r\n@if (ngControl) {\r\n <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: FieldValidation, selector: "mt-field-validation", inputs: ["control", "touched"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
88
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DateField, isStandalone: true, selector: "mt-date-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: true, isRequired: false, transformFunction: null }, showOnFocus: { classPropertyName: "showOnFocus", publicName: "showOnFocus", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, pInputs: { classPropertyName: "pInputs", publicName: "pInputs", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.styleClass" }, classAttribute: "grid gap-1" }, viewQueries: [{ propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<p-datepicker\r\n #calendar\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n [baseZIndex]=\"1051\"\r\n placeholder=\"{{ placeholder() ?? label() ?? '' }}\"\r\n inputStyleClass=\"w-full\"\r\n [showIcon]=\"showIcon()\"\r\n [showOnFocus]=\"showOnFocus()\"\r\n [showClear]=\"showClear()\"\r\n [showTime]=\"showTime()\"\r\n [minDate]=\"minDate()\"\r\n [maxDate]=\"maxDate()\"\r\n dateFormat=\"dd/mm/yy\"\r\n appendTo=\"body\"\r\n>\r\n <ng-template #previousicon>\r\n <mt-icon\r\n [icon]=\"rtl() ? 'arrow.chevron-right' : 'arrow.chevron-left'\"\r\n class=\"text-2xl\"\r\n />\r\n </ng-template>\r\n <ng-template #nexticon>\r\n <mt-icon\r\n [icon]=\"rtl() ? 'arrow.chevron-left' : 'arrow.chevron-right'\"\r\n class=\"text-2xl\"\r\n />\r\n </ng-template>\r\n</p-datepicker>\r\n\r\n@if (ngControl) {\r\n <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: FieldValidation, selector: "mt-field-validation", inputs: ["control", "touched"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
88
89
|
}
|
|
89
90
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DateField, decorators: [{
|
|
90
91
|
type: Component,
|
|
91
92
|
args: [{ selector: 'mt-date-field', standalone: true, imports: [FormsModule, DatePickerModule, Tooltip, Icon, FieldValidation], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
92
93
|
class: 'grid gap-1',
|
|
93
|
-
}, template: "@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<p-datepicker\r\n #calendar\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n [baseZIndex]=\"1051\"\r\n placeholder=\"{{ placeholder() ?? label() ?? '' }}\"\r\n inputStyleClass=\"w-full\"\r\n [showIcon]=\"showIcon()\"\r\n [showClear]=\"showClear()\"\r\n [showTime]=\"showTime()\"\r\n [minDate]=\"minDate()\"\r\n [maxDate]=\"maxDate()\"\r\n dateFormat=\"dd/mm/yy\"\r\n appendTo=\"body\"\r\n>\r\n <ng-template #previousicon>\r\n <mt-icon\r\n [icon]=\"rtl() ? 'arrow.chevron-right' : 'arrow.chevron-left'\"\r\n class=\"text-2xl\"\r\n />\r\n </ng-template>\r\n <ng-template #nexticon>\r\n <mt-icon\r\n [icon]=\"rtl() ? 'arrow.chevron-left' : 'arrow.chevron-right'\"\r\n class=\"text-2xl\"\r\n />\r\n </ng-template>\r\n</p-datepicker>\r\n\r\n@if (ngControl) {\r\n <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\n" }]
|
|
94
|
+
}, template: "@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<p-datepicker\r\n #calendar\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n [baseZIndex]=\"1051\"\r\n placeholder=\"{{ placeholder() ?? label() ?? '' }}\"\r\n inputStyleClass=\"w-full\"\r\n [showIcon]=\"showIcon()\"\r\n [showOnFocus]=\"showOnFocus()\"\r\n [showClear]=\"showClear()\"\r\n [showTime]=\"showTime()\"\r\n [minDate]=\"minDate()\"\r\n [maxDate]=\"maxDate()\"\r\n dateFormat=\"dd/mm/yy\"\r\n appendTo=\"body\"\r\n>\r\n <ng-template #previousicon>\r\n <mt-icon\r\n [icon]=\"rtl() ? 'arrow.chevron-right' : 'arrow.chevron-left'\"\r\n class=\"text-2xl\"\r\n />\r\n </ng-template>\r\n <ng-template #nexticon>\r\n <mt-icon\r\n [icon]=\"rtl() ? 'arrow.chevron-left' : 'arrow.chevron-right'\"\r\n class=\"text-2xl\"\r\n />\r\n </ng-template>\r\n</p-datepicker>\r\n\r\n@if (ngControl) {\r\n <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\n" }]
|
|
94
95
|
}], ctorParameters: () => [], propDecorators: { calendar: [{
|
|
95
96
|
type: ViewChild,
|
|
96
97
|
args: ['calendar', { static: true }]
|
|
97
|
-
}], field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], showTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTime", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], pInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "pInputs", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], styleClass: [{
|
|
98
|
+
}], field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], showOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOnFocus", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], showTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTime", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], pInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "pInputs", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], styleClass: [{
|
|
98
99
|
type: HostBinding,
|
|
99
100
|
args: ['class']
|
|
100
101
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-date-field.mjs","sources":["../../../../packages/masterteam/components/date-field/date-field.ts","../../../../packages/masterteam/components/date-field/date-field.html","../../../../packages/masterteam/components/date-field/masterteam-components-date-field.ts"],"sourcesContent":["import {\r\n Component,\r\n HostBinding,\r\n OnChanges,\r\n OnInit,\r\n SimpleChanges,\r\n ViewChild,\r\n signal,\r\n input,\r\n inject,\r\n ChangeDetectionStrategy,\r\n effect,\r\n} from '@angular/core';\r\nimport {\r\n ControlValueAccessor,\r\n FormsModule,\r\n NgControl,\r\n Validators,\r\n} from '@angular/forms';\r\nimport { Tooltip } from '@masterteam/components/tooltip';\r\nimport { FieldValidation } from '@masterteam/components/field-validation';\r\nimport { DatePickerModule, DatePicker } from 'primeng/datepicker';\r\nimport { isInvalid } from '@masterteam/components';\r\nimport { Icon } from '@masterteam/icons';\r\n\r\n@Component({\r\n selector: 'mt-date-field',\r\n standalone: true,\r\n imports: [FormsModule, DatePickerModule, Tooltip, Icon, FieldValidation],\r\n templateUrl: './date-field.html',\r\n styleUrls: ['./date-field.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'grid gap-1',\r\n },\r\n})\r\nexport class DateField implements ControlValueAccessor, OnInit, OnChanges {\r\n @ViewChild('calendar', { static: true })\r\n calendar: DatePicker;\r\n\r\n readonly field = input<boolean>(true);\r\n readonly hint = input<string>();\r\n readonly label = input<string>();\r\n readonly placeholder = input<string>();\r\n readonly class = input<string>('');\r\n readonly readonly = input<boolean>(false);\r\n readonly showIcon = input<boolean>(true);\r\n readonly showClear = input<boolean>(false);\r\n readonly showTime = input<boolean>(false);\r\n readonly minDate = input<Date | null | undefined>();\r\n readonly maxDate = input<Date | null | undefined>();\r\n readonly pInputs = input<Partial<DatePicker>>();\r\n readonly required = input<boolean>(false);\r\n\r\n rtl = signal<boolean>(document.documentElement.dir === 'rtl');\r\n\r\n @HostBinding('class') styleClass: string;\r\n\r\n requiredValidator = Validators.required;\r\n value = signal<Date | string | null>(null);\r\n disabled = signal<boolean>(false);\r\n\r\n onTouched: () => void = () => {};\r\n onModelChange: (value: Date | string | null) => void = () => {};\r\n\r\n public ngControl = inject(NgControl, { self: true });\r\n\r\n isInvalid = isInvalid;\r\n\r\n constructor() {\r\n if (this.ngControl) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n effect(() => {\r\n if (this.ngControl.control && this.required()) {\r\n this.ngControl.control.addValidators(Validators.required);\r\n this.ngControl.control.updateValueAndValidity();\r\n }\r\n });\r\n }\r\n\r\n applyInputsToCalendar() {\r\n Object.assign(this.calendar, this.pInputs());\r\n }\r\n\r\n ngOnInit() {\r\n this.styleClass = this.class();\r\n if (this.pInputs()) {\r\n this.applyInputsToCalendar();\r\n }\r\n }\r\n onValueChange(value: Date | string | null) {\r\n this.onModelChange(value);\r\n this.value.set(value);\r\n }\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes['pInputs']) {\r\n this.applyInputsToCalendar();\r\n }\r\n }\r\n\r\n writeValue(value: Date | string | null) {\r\n if (value == null || value === '') {\r\n this.value.set(null);\r\n return;\r\n }\r\n if (typeof value === 'string') {\r\n const parsed = new Date(value);\r\n this.value.set(isNaN(parsed.getTime()) ? null : parsed);\r\n return;\r\n }\r\n this.value.set(value);\r\n }\r\n\r\n registerOnChange(fn: any) {\r\n this.onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any) {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(disabled: boolean) {\r\n this.disabled.set(disabled);\r\n }\r\n}\r\n","@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<p-datepicker\r\n #calendar\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n [baseZIndex]=\"1051\"\r\n placeholder=\"{{ placeholder() ?? label() ?? '' }}\"\r\n inputStyleClass=\"w-full\"\r\n [showIcon]=\"showIcon()\"\r\n [showClear]=\"showClear()\"\r\n [showTime]=\"showTime()\"\r\n [minDate]=\"minDate()\"\r\n [maxDate]=\"maxDate()\"\r\n dateFormat=\"dd/mm/yy\"\r\n appendTo=\"body\"\r\n>\r\n <ng-template #previousicon>\r\n <mt-icon\r\n [icon]=\"rtl() ? 'arrow.chevron-right' : 'arrow.chevron-left'\"\r\n class=\"text-2xl\"\r\n />\r\n </ng-template>\r\n <ng-template #nexticon>\r\n <mt-icon\r\n [icon]=\"rtl() ? 'arrow.chevron-left' : 'arrow.chevron-right'\"\r\n class=\"text-2xl\"\r\n />\r\n </ng-template>\r\n</p-datepicker>\r\n\r\n@if (ngControl) {\r\n <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAoCa,SAAS,CAAA;AAEpB,IAAA,QAAQ;AAEC,IAAA,KAAK,GAAG,KAAK,CAAU,IAAI,4EAAC;IAC5B,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACtB,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACvB,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;AAC7B,IAAA,KAAK,GAAG,KAAK,C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AAA,QAAA,EAAA,eAAe,cACb,IAAI,EAAA,OAAA,EACP,CAAC,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,mBAGvD,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,YAAY;AACpB,qBAAA,EAAA,QAAA,EAAA,ipDAAA,EAAA;;sBAGA,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;sBAmBtC,WAAW;uBAAC,OAAO;;;AExDtB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"masterteam-components-date-field.mjs","sources":["../../../../packages/masterteam/components/date-field/date-field.ts","../../../../packages/masterteam/components/date-field/date-field.html","../../../../packages/masterteam/components/date-field/masterteam-components-date-field.ts"],"sourcesContent":["import {\r\n Component,\r\n HostBinding,\r\n OnChanges,\r\n OnInit,\r\n SimpleChanges,\r\n ViewChild,\r\n signal,\r\n input,\r\n inject,\r\n ChangeDetectionStrategy,\r\n effect,\r\n} from '@angular/core';\r\nimport {\r\n ControlValueAccessor,\r\n FormsModule,\r\n NgControl,\r\n Validators,\r\n} from '@angular/forms';\r\nimport { Tooltip } from '@masterteam/components/tooltip';\r\nimport { FieldValidation } from '@masterteam/components/field-validation';\r\nimport { DatePickerModule, DatePicker } from 'primeng/datepicker';\r\nimport { isInvalid } from '@masterteam/components';\r\nimport { Icon } from '@masterteam/icons';\r\n\r\n@Component({\r\n selector: 'mt-date-field',\r\n standalone: true,\r\n imports: [FormsModule, DatePickerModule, Tooltip, Icon, FieldValidation],\r\n templateUrl: './date-field.html',\r\n styleUrls: ['./date-field.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'grid gap-1',\r\n },\r\n})\r\nexport class DateField implements ControlValueAccessor, OnInit, OnChanges {\r\n @ViewChild('calendar', { static: true })\r\n calendar: DatePicker;\r\n\r\n readonly field = input<boolean>(true);\r\n readonly hint = input<string>();\r\n readonly label = input<string>();\r\n readonly placeholder = input<string>();\r\n readonly class = input<string>('');\r\n readonly readonly = input<boolean>(false);\r\n readonly showIcon = input<boolean>(true);\r\n readonly showOnFocus = input<boolean>(true);\r\n readonly showClear = input<boolean>(false);\r\n readonly showTime = input<boolean>(false);\r\n readonly minDate = input<Date | null | undefined>();\r\n readonly maxDate = input<Date | null | undefined>();\r\n readonly pInputs = input<Partial<DatePicker>>();\r\n readonly required = input<boolean>(false);\r\n\r\n rtl = signal<boolean>(document.documentElement.dir === 'rtl');\r\n\r\n @HostBinding('class') styleClass: string;\r\n\r\n requiredValidator = Validators.required;\r\n value = signal<Date | string | null>(null);\r\n disabled = signal<boolean>(false);\r\n\r\n onTouched: () => void = () => {};\r\n onModelChange: (value: Date | string | null) => void = () => {};\r\n\r\n public ngControl = inject(NgControl, { self: true });\r\n\r\n isInvalid = isInvalid;\r\n\r\n constructor() {\r\n if (this.ngControl) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n effect(() => {\r\n if (this.ngControl.control && this.required()) {\r\n this.ngControl.control.addValidators(Validators.required);\r\n this.ngControl.control.updateValueAndValidity();\r\n }\r\n });\r\n }\r\n\r\n applyInputsToCalendar() {\r\n Object.assign(this.calendar, this.pInputs());\r\n }\r\n\r\n ngOnInit() {\r\n this.styleClass = this.class();\r\n if (this.pInputs()) {\r\n this.applyInputsToCalendar();\r\n }\r\n }\r\n onValueChange(value: Date | string | null) {\r\n this.onModelChange(value);\r\n this.value.set(value);\r\n }\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes['pInputs']) {\r\n this.applyInputsToCalendar();\r\n }\r\n }\r\n\r\n writeValue(value: Date | string | null) {\r\n if (value == null || value === '') {\r\n this.value.set(null);\r\n return;\r\n }\r\n if (typeof value === 'string') {\r\n const parsed = new Date(value);\r\n this.value.set(isNaN(parsed.getTime()) ? null : parsed);\r\n return;\r\n }\r\n this.value.set(value);\r\n }\r\n\r\n registerOnChange(fn: any) {\r\n this.onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any) {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(disabled: boolean) {\r\n this.disabled.set(disabled);\r\n }\r\n}\r\n","@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<p-datepicker\r\n #calendar\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n [baseZIndex]=\"1051\"\r\n placeholder=\"{{ placeholder() ?? label() ?? '' }}\"\r\n inputStyleClass=\"w-full\"\r\n [showIcon]=\"showIcon()\"\r\n [showOnFocus]=\"showOnFocus()\"\r\n [showClear]=\"showClear()\"\r\n [showTime]=\"showTime()\"\r\n [minDate]=\"minDate()\"\r\n [maxDate]=\"maxDate()\"\r\n dateFormat=\"dd/mm/yy\"\r\n appendTo=\"body\"\r\n>\r\n <ng-template #previousicon>\r\n <mt-icon\r\n [icon]=\"rtl() ? 'arrow.chevron-right' : 'arrow.chevron-left'\"\r\n class=\"text-2xl\"\r\n />\r\n </ng-template>\r\n <ng-template #nexticon>\r\n <mt-icon\r\n [icon]=\"rtl() ? 'arrow.chevron-left' : 'arrow.chevron-right'\"\r\n class=\"text-2xl\"\r\n />\r\n </ng-template>\r\n</p-datepicker>\r\n\r\n@if (ngControl) {\r\n <mt-field-validation [control]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|
|
842
842
|
}, ...(ngDevMode ? [{ debugName: "connection" }] : /* istanbul ignore next */ []));
|
|
843
843
|
displayValue = computed(() => displayOrPlaceholder(this.connection()?.display), ...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
|
|
844
844
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityConnection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
845
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: EntityConnection, isStandalone: true, selector: "mt-entity-connection", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n>\n <div\n class=\"min-w-0 max-w-full truncate text-sm font-semibold\"\n mtTruncateTooltip\n tooltipPosition=\"top\"\n >\n {{ displayValue() }}\n </div>\n</mt-entity-field>\n", dependencies: [{ kind: "component", type: EntityField, selector: "mt-entity-field", inputs: ["label", "labelIconName", "configuration", "gap"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }] });
|
|
845
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: EntityConnection, isStandalone: true, selector: "mt-entity-connection", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n>\r\n <div\r\n class=\"min-w-0 max-w-full truncate text-sm font-semibold\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >\r\n {{ displayValue() }}\r\n </div>\r\n</mt-entity-field>\r\n", dependencies: [{ kind: "component", type: EntityField, selector: "mt-entity-field", inputs: ["label", "labelIconName", "configuration", "gap"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }] });
|
|
846
846
|
}
|
|
847
847
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityConnection, decorators: [{
|
|
848
848
|
type: Component,
|
|
849
|
-
args: [{ selector: 'mt-entity-connection', standalone: true, imports: [EntityField, TruncateTooltip], template: "<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n>\n <div\n class=\"min-w-0 max-w-full truncate text-sm font-semibold\"\n mtTruncateTooltip\n tooltipPosition=\"top\"\n >\n {{ displayValue() }}\n </div>\n</mt-entity-field>\n" }]
|
|
849
|
+
args: [{ selector: 'mt-entity-connection', standalone: true, imports: [EntityField, TruncateTooltip], template: "<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n>\r\n <div\r\n class=\"min-w-0 max-w-full truncate text-sm font-semibold\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >\r\n {{ displayValue() }}\r\n </div>\r\n</mt-entity-field>\r\n" }]
|
|
850
850
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
|
|
851
851
|
function normalizeEntityConnection(value) {
|
|
852
852
|
if (value === null || value === undefined || value === '') {
|
|
@@ -894,11 +894,11 @@ class EntityScheduleItem {
|
|
|
894
894
|
}, ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
895
895
|
emptyLabel = ENTITY_EMPTY_VALUE_PLACEHOLDER;
|
|
896
896
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityScheduleItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
897
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityScheduleItem, isStandalone: true, selector: "mt-entity-schedule-item", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n gap=\"normal\"\n>\n @if (items().length) {\n <div class=\"flex flex-wrap items-center gap-2\">\n @for (item of items(); track item.id) {\n <mt-chip [label]=\"item.name\" size=\"small\" />\n }\n </div>\n } @else {\n <span\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit text-gray-500 bg-gray-100\"\n >\n {{ emptyLabel }}\n </span>\n }\n</mt-entity-field>\n", dependencies: [{ kind: "component", type: EntityField, selector: "mt-entity-field", inputs: ["label", "labelIconName", "configuration", "gap"] }, { kind: "component", type: Chip, selector: "mt-chip", inputs: ["label", "icon", "image", "removable", "removeIcon", "styleClass", "size"], outputs: ["onRemove", "onImageError"] }] });
|
|
897
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityScheduleItem, isStandalone: true, selector: "mt-entity-schedule-item", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n gap=\"normal\"\r\n>\r\n @if (items().length) {\r\n <div class=\"flex flex-wrap items-center gap-2\">\r\n @for (item of items(); track item.id) {\r\n <mt-chip [label]=\"item.name\" size=\"small\" />\r\n }\r\n </div>\r\n } @else {\r\n <span\r\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit text-gray-500 bg-gray-100\"\r\n >\r\n {{ emptyLabel }}\r\n </span>\r\n }\r\n</mt-entity-field>\r\n", dependencies: [{ kind: "component", type: EntityField, selector: "mt-entity-field", inputs: ["label", "labelIconName", "configuration", "gap"] }, { kind: "component", type: Chip, selector: "mt-chip", inputs: ["label", "icon", "image", "removable", "removeIcon", "styleClass", "size"], outputs: ["onRemove", "onImageError"] }] });
|
|
898
898
|
}
|
|
899
899
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityScheduleItem, decorators: [{
|
|
900
900
|
type: Component,
|
|
901
|
-
args: [{ selector: 'mt-entity-schedule-item', standalone: true, imports: [EntityField, Chip], template: "<mt-entity-field\n [label]=\"displayName()\"\n [configuration]=\"data()?.configuration\"\n gap=\"normal\"\n>\n @if (items().length) {\n <div class=\"flex flex-wrap items-center gap-2\">\n @for (item of items(); track item.id) {\n <mt-chip [label]=\"item.name\" size=\"small\" />\n }\n </div>\n } @else {\n <span\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit text-gray-500 bg-gray-100\"\n >\n {{ emptyLabel }}\n </span>\n }\n</mt-entity-field>\n" }]
|
|
901
|
+
args: [{ selector: 'mt-entity-schedule-item', standalone: true, imports: [EntityField, Chip], template: "<mt-entity-field\r\n [label]=\"displayName()\"\r\n [configuration]=\"data()?.configuration\"\r\n gap=\"normal\"\r\n>\r\n @if (items().length) {\r\n <div class=\"flex flex-wrap items-center gap-2\">\r\n @for (item of items(); track item.id) {\r\n <mt-chip [label]=\"item.name\" size=\"small\" />\r\n }\r\n </div>\r\n } @else {\r\n <span\r\n class=\"inline-flex items-center px-3 py-2 rounded-md text-xs font-semibold w-fit text-gray-500 bg-gray-100\"\r\n >\r\n {{ emptyLabel }}\r\n </span>\r\n }\r\n</mt-entity-field>\r\n" }]
|
|
902
902
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
|
|
903
903
|
|
|
904
904
|
class EntityLookupModuleCheckList {
|
|
@@ -968,11 +968,11 @@ class EntityLookupModuleCheckList {
|
|
|
968
968
|
return String(value);
|
|
969
969
|
}
|
|
970
970
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityLookupModuleCheckList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
971
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityLookupModuleCheckList, isStandalone: true, selector: "mt-entity-lookup-module-check-list", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<mt-entity-field\n [label]=\"data().name ?? ''\"\n [configuration]=\"data()?.configuration\"\n gap=\"normal\"\n>\n @if (hasItems()) {\n <div class=\"flex flex-col gap-2\">\n @for (item of items(); track $index) {\n <div\n class=\"rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\n >\n <span\n class=\"inline-flex w-fit items-center rounded-md bg-primary-50 px-2 py-1 text-xs font-semibold text-primary-700\"\n >\n {{ item.lookupKey || emptyLabel }}\n </span>\n @if (item.props.length) {\n <div class=\"mt-2 grid grid-cols-1 gap-x-4 gap-y-1 sm:grid-cols-2\">\n @for (prop of item.props; track prop.key) {\n <div class=\"flex min-w-0 flex-col\">\n <span class=\"truncate text-xs text-muted-color\">\n {{ prop.key }}\n </span>\n <span class=\"truncate text-sm text-color\">\n {{ prop.value }}\n </span>\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n } @else {\n <span\n class=\"inline-flex w-fit items-center rounded-md bg-gray-100 px-3 py-2 text-xs font-semibold text-gray-500\"\n >\n {{ emptyLabel }}\n </span>\n }\n</mt-entity-field>\n", dependencies: [{ kind: "component", type: EntityField, selector: "mt-entity-field", inputs: ["label", "labelIconName", "configuration", "gap"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
971
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityLookupModuleCheckList, isStandalone: true, selector: "mt-entity-lookup-module-check-list", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<mt-entity-field\r\n [label]=\"data().name ?? ''\"\r\n [configuration]=\"data()?.configuration\"\r\n gap=\"normal\"\r\n>\r\n @if (hasItems()) {\r\n <div class=\"flex flex-col gap-2\">\r\n @for (item of items(); track $index) {\r\n <div\r\n class=\"rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\r\n >\r\n <span\r\n class=\"inline-flex w-fit items-center rounded-md bg-primary-50 px-2 py-1 text-xs font-semibold text-primary-700\"\r\n >\r\n {{ item.lookupKey || emptyLabel }}\r\n </span>\r\n @if (item.props.length) {\r\n <div class=\"mt-2 grid grid-cols-1 gap-x-4 gap-y-1 sm:grid-cols-2\">\r\n @for (prop of item.props; track prop.key) {\r\n <div class=\"flex min-w-0 flex-col\">\r\n <span class=\"truncate text-xs text-muted-color\">\r\n {{ prop.key }}\r\n </span>\r\n <span class=\"truncate text-sm text-color\">\r\n {{ prop.value }}\r\n </span>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span\r\n class=\"inline-flex w-fit items-center rounded-md bg-gray-100 px-3 py-2 text-xs font-semibold text-gray-500\"\r\n >\r\n {{ emptyLabel }}\r\n </span>\r\n }\r\n</mt-entity-field>\r\n", dependencies: [{ kind: "component", type: EntityField, selector: "mt-entity-field", inputs: ["label", "labelIconName", "configuration", "gap"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
972
972
|
}
|
|
973
973
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityLookupModuleCheckList, decorators: [{
|
|
974
974
|
type: Component,
|
|
975
|
-
args: [{ selector: 'mt-entity-lookup-module-check-list', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [EntityField], template: "<mt-entity-field\n [label]=\"data().name ?? ''\"\n [configuration]=\"data()?.configuration\"\n gap=\"normal\"\n>\n @if (hasItems()) {\n <div class=\"flex flex-col gap-2\">\n @for (item of items(); track $index) {\n <div\n class=\"rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\n >\n <span\n class=\"inline-flex w-fit items-center rounded-md bg-primary-50 px-2 py-1 text-xs font-semibold text-primary-700\"\n >\n {{ item.lookupKey || emptyLabel }}\n </span>\n @if (item.props.length) {\n <div class=\"mt-2 grid grid-cols-1 gap-x-4 gap-y-1 sm:grid-cols-2\">\n @for (prop of item.props; track prop.key) {\n <div class=\"flex min-w-0 flex-col\">\n <span class=\"truncate text-xs text-muted-color\">\n {{ prop.key }}\n </span>\n <span class=\"truncate text-sm text-color\">\n {{ prop.value }}\n </span>\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n } @else {\n <span\n class=\"inline-flex w-fit items-center rounded-md bg-gray-100 px-3 py-2 text-xs font-semibold text-gray-500\"\n >\n {{ emptyLabel }}\n </span>\n }\n</mt-entity-field>\n" }]
|
|
975
|
+
args: [{ selector: 'mt-entity-lookup-module-check-list', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [EntityField], template: "<mt-entity-field\r\n [label]=\"data().name ?? ''\"\r\n [configuration]=\"data()?.configuration\"\r\n gap=\"normal\"\r\n>\r\n @if (hasItems()) {\r\n <div class=\"flex flex-col gap-2\">\r\n @for (item of items(); track $index) {\r\n <div\r\n class=\"rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\r\n >\r\n <span\r\n class=\"inline-flex w-fit items-center rounded-md bg-primary-50 px-2 py-1 text-xs font-semibold text-primary-700\"\r\n >\r\n {{ item.lookupKey || emptyLabel }}\r\n </span>\r\n @if (item.props.length) {\r\n <div class=\"mt-2 grid grid-cols-1 gap-x-4 gap-y-1 sm:grid-cols-2\">\r\n @for (prop of item.props; track prop.key) {\r\n <div class=\"flex min-w-0 flex-col\">\r\n <span class=\"truncate text-xs text-muted-color\">\r\n {{ prop.key }}\r\n </span>\r\n <span class=\"truncate text-sm text-color\">\r\n {{ prop.value }}\r\n </span>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span\r\n class=\"inline-flex w-fit items-center rounded-md bg-gray-100 px-3 py-2 text-xs font-semibold text-gray-500\"\r\n >\r\n {{ emptyLabel }}\r\n </span>\r\n }\r\n</mt-entity-field>\r\n" }]
|
|
976
976
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }] } });
|
|
977
977
|
|
|
978
978
|
class EntityLeafDetails {
|