@masterteam/system-settings 0.0.28 → 0.0.29

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.
@@ -1,7 +1,7 @@
1
1
  import { CommonModule, NgTemplateOutlet } from '@angular/common';
2
2
  import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
3
3
  import * as i0 from '@angular/core';
4
- import { input, ChangeDetectionStrategy, Component, inject, computed, effect, output, signal, InjectionToken, makeEnvironmentProviders, Injectable, DestroyRef, untracked, viewChild, forwardRef } from '@angular/core';
4
+ import { input, ChangeDetectionStrategy, Component, inject, computed, effect, signal, output, InjectionToken, makeEnvironmentProviders, Injectable, DestroyRef, untracked, viewChild, forwardRef } from '@angular/core';
5
5
  import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
6
  import * as i1 from '@angular/forms';
7
7
  import { ReactiveFormsModule, FormGroup, FormControl, Validators, NG_VALUE_ACCESSOR } from '@angular/forms';
@@ -59,7 +59,7 @@ class SystemSettingsGeneralSection {
59
59
  currencyOptions = input([], ...(ngDevMode ? [{ debugName: "currencyOptions" }] : /* istanbul ignore next */ []));
60
60
  currencyFormatOptions = input([], ...(ngDevMode ? [{ debugName: "currencyFormatOptions" }] : /* istanbul ignore next */ []));
61
61
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsGeneralSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
62
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SystemSettingsGeneralSection, isStandalone: true, selector: "mt-system-settings-general-section", inputs: { generalConfigurationForm: { classPropertyName: "generalConfigurationForm", publicName: "generalConfigurationForm", isSignal: true, isRequired: true, transformFunction: null }, timezoneForm: { classPropertyName: "timezoneForm", publicName: "timezoneForm", isSignal: true, isRequired: true, transformFunction: null }, currencyForm: { classPropertyName: "currencyForm", publicName: "currencyForm", isSignal: true, isRequired: true, transformFunction: null }, exploreDefaultViewOptions: { classPropertyName: "exploreDefaultViewOptions", publicName: "exploreDefaultViewOptions", isSignal: true, isRequired: false, transformFunction: null }, dateFormatOptions: { classPropertyName: "dateFormatOptions", publicName: "dateFormatOptions", isSignal: true, isRequired: false, transformFunction: null }, timeFormatOptions: { classPropertyName: "timeFormatOptions", publicName: "timeFormatOptions", isSignal: true, isRequired: false, transformFunction: null }, currencyOptions: { classPropertyName: "currencyOptions", publicName: "currencyOptions", isSignal: true, isRequired: false, transformFunction: null }, currencyFormatOptions: { classPropertyName: "currencyFormatOptions", publicName: "currencyFormatOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <div class=\"grid gap-6 xl:grid-cols-3\">\r\n <mt-card class=\"block\">\r\n <div class=\"space-y-4\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"date-time-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"date-time-description\") }}\r\n </p>\r\n </div>\r\n\r\n <div [formGroup]=\"timezoneForm()\" class=\"grid gap-4 md:grid-cols-2\">\r\n <mt-select-field\r\n formControlName=\"dateFormat\"\r\n [options]=\"dateFormatOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('date-format')\"\r\n [placeholder]=\"t('date-format-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n\r\n <mt-select-field\r\n formControlName=\"timeFormat\"\r\n [options]=\"timeFormatOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('time-format')\"\r\n [placeholder]=\"t('time-format-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n </div>\r\n </div>\r\n </mt-card>\r\n\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"currencyForm()\" class=\"space-y-4\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"currency-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"currency-description\") }}\r\n </p>\r\n </div>\r\n\r\n <mt-select-field\r\n formControlName=\"code\"\r\n [options]=\"currencyOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('currency')\"\r\n [placeholder]=\"t('currency-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n\r\n <mt-select-field\r\n formControlName=\"format\"\r\n [options]=\"currencyFormatOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('currency-format')\"\r\n [placeholder]=\"t('currency-format-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n </div>\r\n </mt-card>\r\n\r\n <mt-system-settings-general-config-section\r\n class=\"block\"\r\n [generalConfigurationForm]=\"generalConfigurationForm()\"\r\n [exploreDefaultViewOptions]=\"exploreDefaultViewOptions()\"\r\n />\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: SystemSettingsGeneralConfigSection, selector: "mt-system-settings-general-config-section", inputs: ["generalConfigurationForm", "exploreDefaultViewOptions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
62
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SystemSettingsGeneralSection, isStandalone: true, selector: "mt-system-settings-general-section", inputs: { generalConfigurationForm: { classPropertyName: "generalConfigurationForm", publicName: "generalConfigurationForm", isSignal: true, isRequired: true, transformFunction: null }, timezoneForm: { classPropertyName: "timezoneForm", publicName: "timezoneForm", isSignal: true, isRequired: true, transformFunction: null }, currencyForm: { classPropertyName: "currencyForm", publicName: "currencyForm", isSignal: true, isRequired: true, transformFunction: null }, exploreDefaultViewOptions: { classPropertyName: "exploreDefaultViewOptions", publicName: "exploreDefaultViewOptions", isSignal: true, isRequired: false, transformFunction: null }, dateFormatOptions: { classPropertyName: "dateFormatOptions", publicName: "dateFormatOptions", isSignal: true, isRequired: false, transformFunction: null }, timeFormatOptions: { classPropertyName: "timeFormatOptions", publicName: "timeFormatOptions", isSignal: true, isRequired: false, transformFunction: null }, currencyOptions: { classPropertyName: "currencyOptions", publicName: "currencyOptions", isSignal: true, isRequired: false, transformFunction: null }, currencyFormatOptions: { classPropertyName: "currencyFormatOptions", publicName: "currencyFormatOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <div class=\"grid gap-6 xl:grid-cols-3\">\r\n <mt-card class=\"block\">\r\n <div class=\"space-y-4\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"date-time-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"date-time-description\") }}\r\n </p>\r\n </div>\r\n\r\n <div [formGroup]=\"timezoneForm()\" class=\"grid gap-4 md:grid-cols-2\">\r\n <mt-select-field\r\n formControlName=\"dateFormat\"\r\n [options]=\"dateFormatOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('date-format')\"\r\n [placeholder]=\"t('date-format-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n\r\n <mt-select-field\r\n formControlName=\"timeFormat\"\r\n [options]=\"timeFormatOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('time-format')\"\r\n [placeholder]=\"t('time-format-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n </div>\r\n </div>\r\n </mt-card>\r\n\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"currencyForm()\" class=\"space-y-4\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"currency-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"currency-description\") }}\r\n </p>\r\n </div>\r\n\r\n <mt-select-field\r\n formControlName=\"code\"\r\n [options]=\"currencyOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('currency')\"\r\n [placeholder]=\"t('currency-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n\r\n <mt-select-field\r\n formControlName=\"format\"\r\n [options]=\"currencyFormatOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('currency-format')\"\r\n [placeholder]=\"t('currency-format-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n </div>\r\n </mt-card>\r\n\r\n <mt-system-settings-general-config-section\r\n class=\"block\"\r\n [generalConfigurationForm]=\"generalConfigurationForm()\"\r\n [exploreDefaultViewOptions]=\"exploreDefaultViewOptions()\"\r\n />\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "optionDisabled", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: SystemSettingsGeneralConfigSection, selector: "mt-system-settings-general-config-section", inputs: ["generalConfigurationForm", "exploreDefaultViewOptions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
63
63
  }
64
64
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsGeneralSection, decorators: [{
65
65
  type: Component,
@@ -111,7 +111,15 @@ class SystemSettingsHolidayEditor {
111
111
  this.form.markAsUntouched();
112
112
  });
113
113
  }
114
+ /** Set the moment this dialog hands a holiday back; see `onSave`. */
115
+ submitting = signal(false, ...(ngDevMode ? [{ debugName: "submitting" }] : /* istanbul ignore next */ []));
114
116
  onSave() {
117
+ // Closing the dialog is asynchronous and the caller adds a row for
118
+ // every result it receives, so two quick presses added the same
119
+ // holiday twice (#1239). One press, one holiday.
120
+ if (this.submitting()) {
121
+ return;
122
+ }
115
123
  this.form.markAllAsTouched();
116
124
  if (this.form.invalid) {
117
125
  return;
@@ -120,6 +128,7 @@ class SystemSettingsHolidayEditor {
120
128
  if (!(value.from instanceof Date) || !(value.to instanceof Date)) {
121
129
  return;
122
130
  }
131
+ this.submitting.set(true);
123
132
  this.ref.close({
124
133
  label: value.label.trim(),
125
134
  from: value.from,
@@ -130,7 +139,7 @@ class SystemSettingsHolidayEditor {
130
139
  this.ref.close(null);
131
140
  }
132
141
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidayEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
133
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SystemSettingsHolidayEditor, isStandalone: true, selector: "mt-system-settings-holiday-editor", inputs: { holiday: { classPropertyName: "holiday", publicName: "holiday", isSignal: true, isRequired: false, transformFunction: null }, isEditMode: { classPropertyName: "isEditMode", publicName: "isEditMode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <div [class]=\"' ' + (modal.contentClass || '')\">\n <form [formGroup]=\"form\" class=\"space-y-4 p-3\" (ngSubmit)=\"onSave()\">\n <mt-text-field\n formControlName=\"label\"\n [label]=\"t('holiday-name')\"\n [placeholder]=\"t('holiday-name-placeholder')\"\n [required]=\"true\"\n />\n\n <div class=\"grid gap-4 md:grid-cols-2\">\n <div class=\"grid gap-1\">\n <mt-date-field\n formControlName=\"from\"\n [label]=\"t('from-date')\"\n [placeholder]=\"t('from-date')\"\n [showIcon]=\"true\"\n [required]=\"true\"\n />\n </div>\n\n <div class=\"grid gap-1\">\n <mt-date-field\n formControlName=\"to\"\n [label]=\"t('to-date')\"\n [placeholder]=\"t('to-date')\"\n [showIcon]=\"true\"\n [required]=\"true\"\n [pInputs]=\"toPickerInputs()\"\n />\n </div>\n </div>\n\n @if (form.errors?.[\"invalidRange\"] && (form.dirty || form.touched)) {\n <div class=\"text-sm text-red-600\">\n {{ t(\"holiday-range-error\") }}\n </div>\n }\n </form>\n </div>\n <div [class]=\"modal.footerClass\">\n <mt-button\n [label]=\"t('cancel')\"\n variant=\"outlined\"\n type=\"button\"\n (onClick)=\"onCancel()\"\n />\n <mt-button [label]=\"t(actionLabel())\" type=\"button\" (onClick)=\"onSave()\" />\n </div>\n</ng-container>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: DateField, selector: "mt-date-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "showIcon", "showOnFocus", "showClear", "showTime", "timeOnly", "minDate", "maxDate", "pInputs", "required"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
142
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SystemSettingsHolidayEditor, isStandalone: true, selector: "mt-system-settings-holiday-editor", inputs: { holiday: { classPropertyName: "holiday", publicName: "holiday", isSignal: true, isRequired: false, transformFunction: null }, isEditMode: { classPropertyName: "isEditMode", publicName: "isEditMode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <div [class]=\"' ' + (modal.contentClass || '')\">\r\n <form [formGroup]=\"form\" class=\"space-y-4 p-3\" (ngSubmit)=\"onSave()\">\r\n <mt-text-field\r\n formControlName=\"label\"\r\n [label]=\"t('holiday-name')\"\r\n [placeholder]=\"t('holiday-name-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <div class=\"grid gap-1\">\r\n <mt-date-field\r\n formControlName=\"from\"\r\n [label]=\"t('from-date')\"\r\n [placeholder]=\"t('from-date')\"\r\n [showIcon]=\"true\"\r\n [required]=\"true\"\r\n />\r\n </div>\r\n\r\n <div class=\"grid gap-1\">\r\n <mt-date-field\r\n formControlName=\"to\"\r\n [label]=\"t('to-date')\"\r\n [placeholder]=\"t('to-date')\"\r\n [showIcon]=\"true\"\r\n [required]=\"true\"\r\n [pInputs]=\"toPickerInputs()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (form.errors?.[\"invalidRange\"] && (form.dirty || form.touched)) {\r\n <div class=\"text-sm text-red-600\">\r\n {{ t(\"holiday-range-error\") }}\r\n </div>\r\n }\r\n </form>\r\n </div>\r\n <div [class]=\"modal.footerClass\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n variant=\"outlined\"\r\n type=\"button\"\r\n (onClick)=\"onCancel()\"\r\n />\r\n <mt-button\r\n [label]=\"t(actionLabel())\"\r\n type=\"button\"\r\n [disabled]=\"submitting()\"\r\n (onClick)=\"onSave()\"\r\n />\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: DateField, selector: "mt-date-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "showIcon", "showOnFocus", "showClear", "showTime", "timeOnly", "minDate", "maxDate", "pInputs", "required"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
134
143
  }
135
144
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidayEditor, decorators: [{
136
145
  type: Component,
@@ -140,7 +149,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
140
149
  Button,
141
150
  DateField,
142
151
  TextField,
143
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <div [class]=\"' ' + (modal.contentClass || '')\">\n <form [formGroup]=\"form\" class=\"space-y-4 p-3\" (ngSubmit)=\"onSave()\">\n <mt-text-field\n formControlName=\"label\"\n [label]=\"t('holiday-name')\"\n [placeholder]=\"t('holiday-name-placeholder')\"\n [required]=\"true\"\n />\n\n <div class=\"grid gap-4 md:grid-cols-2\">\n <div class=\"grid gap-1\">\n <mt-date-field\n formControlName=\"from\"\n [label]=\"t('from-date')\"\n [placeholder]=\"t('from-date')\"\n [showIcon]=\"true\"\n [required]=\"true\"\n />\n </div>\n\n <div class=\"grid gap-1\">\n <mt-date-field\n formControlName=\"to\"\n [label]=\"t('to-date')\"\n [placeholder]=\"t('to-date')\"\n [showIcon]=\"true\"\n [required]=\"true\"\n [pInputs]=\"toPickerInputs()\"\n />\n </div>\n </div>\n\n @if (form.errors?.[\"invalidRange\"] && (form.dirty || form.touched)) {\n <div class=\"text-sm text-red-600\">\n {{ t(\"holiday-range-error\") }}\n </div>\n }\n </form>\n </div>\n <div [class]=\"modal.footerClass\">\n <mt-button\n [label]=\"t('cancel')\"\n variant=\"outlined\"\n type=\"button\"\n (onClick)=\"onCancel()\"\n />\n <mt-button [label]=\"t(actionLabel())\" type=\"button\" (onClick)=\"onSave()\" />\n </div>\n</ng-container>\n", styles: [":host{display:block}\n"] }]
152
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <div [class]=\"' ' + (modal.contentClass || '')\">\r\n <form [formGroup]=\"form\" class=\"space-y-4 p-3\" (ngSubmit)=\"onSave()\">\r\n <mt-text-field\r\n formControlName=\"label\"\r\n [label]=\"t('holiday-name')\"\r\n [placeholder]=\"t('holiday-name-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <div class=\"grid gap-1\">\r\n <mt-date-field\r\n formControlName=\"from\"\r\n [label]=\"t('from-date')\"\r\n [placeholder]=\"t('from-date')\"\r\n [showIcon]=\"true\"\r\n [required]=\"true\"\r\n />\r\n </div>\r\n\r\n <div class=\"grid gap-1\">\r\n <mt-date-field\r\n formControlName=\"to\"\r\n [label]=\"t('to-date')\"\r\n [placeholder]=\"t('to-date')\"\r\n [showIcon]=\"true\"\r\n [required]=\"true\"\r\n [pInputs]=\"toPickerInputs()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (form.errors?.[\"invalidRange\"] && (form.dirty || form.touched)) {\r\n <div class=\"text-sm text-red-600\">\r\n {{ t(\"holiday-range-error\") }}\r\n </div>\r\n }\r\n </form>\r\n </div>\r\n <div [class]=\"modal.footerClass\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n variant=\"outlined\"\r\n type=\"button\"\r\n (onClick)=\"onCancel()\"\r\n />\r\n <mt-button\r\n [label]=\"t(actionLabel())\"\r\n type=\"button\"\r\n [disabled]=\"submitting()\"\r\n (onClick)=\"onSave()\"\r\n />\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block}\n"] }]
144
153
  }], ctorParameters: () => [], propDecorators: { holiday: [{ type: i0.Input, args: [{ isSignal: true, alias: "holiday", required: false }] }], isEditMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "isEditMode", required: false }] }] } });
145
154
  function holidayRangeValidator() {
146
155
  return (control) => {
@@ -214,7 +223,7 @@ class SystemSettingsTimeSheetSection {
214
223
  */
215
224
  hidePolicy = input(false, ...(ngDevMode ? [{ debugName: "hidePolicy" }] : /* istanbul ignore next */ []));
216
225
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsTimeSheetSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
217
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SystemSettingsTimeSheetSection, isStandalone: true, selector: "mt-system-settings-timesheet-section", inputs: { policyForm: { classPropertyName: "policyForm", publicName: "policyForm", isSignal: true, isRequired: true, transformFunction: null }, globalWorkingHoursForm: { classPropertyName: "globalWorkingHoursForm", publicName: "globalWorkingHoursForm", isSignal: true, isRequired: true, transformFunction: null }, timeZoneOptions: { classPropertyName: "timeZoneOptions", publicName: "timeZoneOptions", isSignal: true, isRequired: false, transformFunction: null }, dayOptions: { classPropertyName: "dayOptions", publicName: "dayOptions", isSignal: true, isRequired: false, transformFunction: null }, frequencyOptions: { classPropertyName: "frequencyOptions", publicName: "frequencyOptions", isSignal: true, isRequired: false, transformFunction: null }, maxDailyBelowDaily: { classPropertyName: "maxDailyBelowDaily", publicName: "maxDailyBelowDaily", isSignal: true, isRequired: false, transformFunction: null }, hidePolicy: { classPropertyName: "hidePolicy", publicName: "hidePolicy", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <div\r\n [class]=\"\r\n hidePolicy() ? 'grid gap-6 mb-6' : 'grid gap-6 xl:grid-cols-2 mb-6'\r\n \"\r\n >\r\n @if (!hidePolicy()) {\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"policyForm()\" class=\"space-y-5\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"general-card-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"general-card-description\") }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <mt-select-field\r\n formControlName=\"frequency\"\r\n [options]=\"frequencyOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('frequency')\"\r\n [placeholder]=\"t('frequency-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n\r\n <mt-number-field\r\n formControlName=\"maxDailyHours\"\r\n [label]=\"t('max-daily-hours')\"\r\n [placeholder]=\"t('max-daily-hours-placeholder')\"\r\n [min]=\"1\"\r\n [max]=\"24\"\r\n [required]=\"true\"\r\n [hint]=\"maxDailyBelowDaily() ? t('max-daily-below-daily') : ''\"\r\n />\r\n\r\n <mt-number-field\r\n formControlName=\"submissionDeadlineDays\"\r\n [label]=\"t('submission-deadline-days')\"\r\n [placeholder]=\"t('submission-deadline-days-placeholder')\"\r\n [min]=\"0\"\r\n [max]=\"90\"\r\n [required]=\"true\"\r\n [hint]=\"t('submission-deadline-hint')\"\r\n />\r\n </div>\r\n\r\n <div class=\"grid gap-3 md:grid-cols-2\">\r\n <mt-toggle-field\r\n formControlName=\"requireDescription\"\r\n [label]=\"t('require-description')\"\r\n />\r\n <mt-toggle-field\r\n formControlName=\"allowFutureEntry\"\r\n [label]=\"t('allow-future-entry')\"\r\n />\r\n <mt-toggle-field\r\n formControlName=\"allowBackdatedEntry\"\r\n [label]=\"t('allow-backdated-entry')\"\r\n />\r\n <mt-toggle-field\r\n formControlName=\"autoLockOnApprove\"\r\n [label]=\"t('auto-lock-on-approve')\"\r\n />\r\n </div>\r\n </div>\r\n </mt-card>\r\n }\r\n\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"globalWorkingHoursForm()\" class=\"space-y-5\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"working-hours-card-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"working-hours-card-description\") }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <div class=\"flex min-w-0 flex-col gap-1 md:col-span-2\">\r\n <mt-select-field\r\n formControlName=\"timeZoneId\"\r\n [options]=\"timeZoneOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [filter]=\"true\"\r\n [filterBy]=\"'name'\"\r\n [label]=\"t('organization-timezone')\"\r\n [hint]=\"t('organization-timezone-hint')\"\r\n [placeholder]=\"t('organization-timezone-placeholder')\"\r\n />\r\n @if (globalWorkingHoursForm().hasError(\"timeZoneRequired\")) {\r\n <p class=\"text-xs text-red-600\">\r\n {{ t(\"organization-timezone-required\") }}\r\n </p>\r\n }\r\n </div>\r\n\r\n <mt-multi-select-field\r\n class=\"md:col-span-2\"\r\n formControlName=\"workingDays\"\r\n [options]=\"dayOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'dayNumber'\"\r\n [label]=\"t('working-days')\"\r\n [placeholder]=\"t('working-days-placeholder')\"\r\n [display]=\"'chip'\"\r\n [required]=\"true\"\r\n [showClear]=\"true\"\r\n />\r\n\r\n <mt-number-field\r\n class=\"md:col-span-2\"\r\n formControlName=\"hoursPerDay\"\r\n [label]=\"t('daily-working-hours')\"\r\n [placeholder]=\"t('daily-working-hours-placeholder')\"\r\n [min]=\"0\"\r\n [max]=\"24\"\r\n [required]=\"true\"\r\n />\r\n </div>\r\n </div>\r\n </mt-card>\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
226
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SystemSettingsTimeSheetSection, isStandalone: true, selector: "mt-system-settings-timesheet-section", inputs: { policyForm: { classPropertyName: "policyForm", publicName: "policyForm", isSignal: true, isRequired: true, transformFunction: null }, globalWorkingHoursForm: { classPropertyName: "globalWorkingHoursForm", publicName: "globalWorkingHoursForm", isSignal: true, isRequired: true, transformFunction: null }, timeZoneOptions: { classPropertyName: "timeZoneOptions", publicName: "timeZoneOptions", isSignal: true, isRequired: false, transformFunction: null }, dayOptions: { classPropertyName: "dayOptions", publicName: "dayOptions", isSignal: true, isRequired: false, transformFunction: null }, frequencyOptions: { classPropertyName: "frequencyOptions", publicName: "frequencyOptions", isSignal: true, isRequired: false, transformFunction: null }, maxDailyBelowDaily: { classPropertyName: "maxDailyBelowDaily", publicName: "maxDailyBelowDaily", isSignal: true, isRequired: false, transformFunction: null }, hidePolicy: { classPropertyName: "hidePolicy", publicName: "hidePolicy", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <div\r\n [class]=\"\r\n hidePolicy() ? 'grid gap-6 mb-6' : 'grid gap-6 xl:grid-cols-2 mb-6'\r\n \"\r\n >\r\n @if (!hidePolicy()) {\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"policyForm()\" class=\"space-y-5\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"general-card-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"general-card-description\") }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <mt-select-field\r\n formControlName=\"frequency\"\r\n [options]=\"frequencyOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('frequency')\"\r\n [placeholder]=\"t('frequency-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n\r\n <mt-number-field\r\n formControlName=\"maxDailyHours\"\r\n [label]=\"t('max-daily-hours')\"\r\n [placeholder]=\"t('max-daily-hours-placeholder')\"\r\n [min]=\"1\"\r\n [max]=\"24\"\r\n [required]=\"true\"\r\n [hint]=\"maxDailyBelowDaily() ? t('max-daily-below-daily') : ''\"\r\n />\r\n\r\n <mt-number-field\r\n formControlName=\"submissionDeadlineDays\"\r\n [label]=\"t('submission-deadline-days')\"\r\n [placeholder]=\"t('submission-deadline-days-placeholder')\"\r\n [min]=\"0\"\r\n [max]=\"90\"\r\n [required]=\"true\"\r\n [hint]=\"t('submission-deadline-hint')\"\r\n />\r\n </div>\r\n\r\n <div class=\"grid gap-3 md:grid-cols-2\">\r\n <mt-toggle-field\r\n formControlName=\"requireDescription\"\r\n [label]=\"t('require-description')\"\r\n />\r\n <mt-toggle-field\r\n formControlName=\"allowFutureEntry\"\r\n [label]=\"t('allow-future-entry')\"\r\n />\r\n <mt-toggle-field\r\n formControlName=\"allowBackdatedEntry\"\r\n [label]=\"t('allow-backdated-entry')\"\r\n />\r\n <mt-toggle-field\r\n formControlName=\"autoLockOnApprove\"\r\n [label]=\"t('auto-lock-on-approve')\"\r\n />\r\n </div>\r\n </div>\r\n </mt-card>\r\n }\r\n\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"globalWorkingHoursForm()\" class=\"space-y-5\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"working-hours-card-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"working-hours-card-description\") }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <div class=\"flex min-w-0 flex-col gap-1 md:col-span-2\">\r\n <mt-select-field\r\n formControlName=\"timeZoneId\"\r\n [options]=\"timeZoneOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [filter]=\"true\"\r\n [filterBy]=\"'name'\"\r\n [label]=\"t('organization-timezone')\"\r\n [hint]=\"t('organization-timezone-hint')\"\r\n [placeholder]=\"t('organization-timezone-placeholder')\"\r\n />\r\n @if (globalWorkingHoursForm().hasError(\"timeZoneRequired\")) {\r\n <p class=\"text-xs text-red-600\">\r\n {{ t(\"organization-timezone-required\") }}\r\n </p>\r\n }\r\n </div>\r\n\r\n <mt-multi-select-field\r\n class=\"md:col-span-2\"\r\n formControlName=\"workingDays\"\r\n [options]=\"dayOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'dayNumber'\"\r\n [label]=\"t('working-days')\"\r\n [placeholder]=\"t('working-days-placeholder')\"\r\n [display]=\"'chip'\"\r\n [required]=\"true\"\r\n [showClear]=\"true\"\r\n />\r\n\r\n <mt-number-field\r\n class=\"md:col-span-2\"\r\n formControlName=\"hoursPerDay\"\r\n [label]=\"t('daily-working-hours')\"\r\n [placeholder]=\"t('daily-working-hours-placeholder')\"\r\n [min]=\"0\"\r\n [max]=\"24\"\r\n [required]=\"true\"\r\n />\r\n </div>\r\n </div>\r\n </mt-card>\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "optionDisabled", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
218
227
  }
219
228
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsTimeSheetSection, decorators: [{
220
229
  type: Component,
@@ -762,6 +771,13 @@ class SystemSettings {
762
771
  this.holidayItems.update((items) => items.filter((_, itemIndex) => itemIndex !== index));
763
772
  }
764
773
  onSave() {
774
+ // `updating` only turns true once the request is on its way, and the
775
+ // Save button is disabled from it a render later, so two quick presses
776
+ // both reached here and sent two PUTs — two "Updated successfully"
777
+ // toasts for one intended save (#1239). Refuse the second here.
778
+ if (this.updating()) {
779
+ return;
780
+ }
765
781
  this.form.markAllAsTouched();
766
782
  const nextSnapshot = this.buildCurrentSnapshot();
767
783
  const initialSnapshot = this.initialSnapshot();
@@ -3321,7 +3337,7 @@ const EMAIL_DELIVERY_ROUTES = [
3321
3337
  {
3322
3338
  path: '',
3323
3339
  canDeactivate: [emailDesignLeaveGuard],
3324
- loadComponent: () => import('./masterteam-system-settings-email-delivery-shell-CYO489J5.mjs').then((module) => module.EmailDeliveryShell),
3340
+ loadComponent: () => import('./masterteam-system-settings-email-delivery-shell-BSeEc7SA.mjs').then((module) => module.EmailDeliveryShell),
3325
3341
  },
3326
3342
  { path: '**', redirectTo: '' },
3327
3343
  ];
@@ -3482,7 +3498,7 @@ class EmailContentStylesEditor {
3482
3498
  return this.transloco.translate(`email-delivery.design.styles.${key}`);
3483
3499
  }
3484
3500
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EmailContentStylesEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
3485
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EmailContentStylesEditor, isStandalone: true, selector: "mt-email-content-styles", inputs: { styles: { classPropertyName: "styles", publicName: "styles", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stylesChange: "stylesChange" }, host: { classAttribute: "block min-w-0" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'email-delivery.design.styles'\">\r\n <div class=\"flex min-w-0 flex-col gap-4\">\r\n <p class=\"text-xs text-muted-color\">{{ t(\"hint\") }}</p>\r\n\r\n @for (section of sections; track section.key) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"sectionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: section }\"\r\n />\r\n }\r\n\r\n <div>\r\n <mt-button\r\n [icon]=\"showAdvanced() ? 'arrow.chevron-up' : 'arrow.chevron-down'\"\r\n [label]=\"t(showAdvanced() ? 'hide-advanced' : 'show-advanced')\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n size=\"small\"\r\n (onClick)=\"showAdvanced.set(!showAdvanced())\"\r\n />\r\n </div>\r\n <!-- Hidden advanced values are kept: the styles object passes through. -->\r\n @if (showAdvanced()) {\r\n @for (section of advancedSections; track section.key) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"sectionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: section }\"\r\n />\r\n }\r\n }\r\n </div>\r\n\r\n <ng-template #sectionTemplate let-section>\r\n <section\r\n class=\"flex min-w-0 flex-col gap-3 rounded-md border border-surface p-3\"\r\n >\r\n <h4 class=\"text-sm font-semibold\">{{ sectionLabel(section) }}</h4>\r\n @for (row of rows(section); track $index) {\r\n <div class=\"flex min-w-0 flex-col gap-2\">\r\n @if (groupLabel(row[0]) && rows(section).length > 1) {\r\n <span class=\"text-xs font-medium text-muted-color\">{{\r\n groupLabel(row[0])\r\n }}</span>\r\n }\r\n <div class=\"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2\">\r\n @for (item of row; track item.id) {\r\n @switch (item.kind) {\r\n @case (\"font\") {\r\n <mt-select-field\r\n [formControl]=\"control(item.id)\"\r\n [options]=\"fontOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [hasPlaceholderPrefix]=\"false\"\r\n />\r\n }\r\n @case (\"weight\") {\r\n <mt-select-field\r\n [formControl]=\"control(item.id)\"\r\n [options]=\"weightOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [hasPlaceholderPrefix]=\"false\"\r\n />\r\n }\r\n @case (\"underline\") {\r\n <mt-select-field\r\n [formControl]=\"control(item.id)\"\r\n [options]=\"underlineOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [hasPlaceholderPrefix]=\"false\"\r\n />\r\n }\r\n @case (\"color\") {\r\n <mt-color-picker-field\r\n [formControl]=\"control(item.id)\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n />\r\n }\r\n @default {\r\n <mt-number-field\r\n [formControl]=\"control(item.id)\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [min]=\"range(item).min\"\r\n [max]=\"range(item).max\"\r\n [maxFractionDigits]=\"range(item).fractionDigits\"\r\n />\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n </section>\r\n </ng-template>\r\n</ng-container>\r\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3501
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EmailContentStylesEditor, isStandalone: true, selector: "mt-email-content-styles", inputs: { styles: { classPropertyName: "styles", publicName: "styles", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stylesChange: "stylesChange" }, host: { classAttribute: "block min-w-0" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'email-delivery.design.styles'\">\r\n <div class=\"flex min-w-0 flex-col gap-4\">\r\n <p class=\"text-xs text-muted-color\">{{ t(\"hint\") }}</p>\r\n\r\n @for (section of sections; track section.key) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"sectionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: section }\"\r\n />\r\n }\r\n\r\n <div>\r\n <mt-button\r\n [icon]=\"showAdvanced() ? 'arrow.chevron-up' : 'arrow.chevron-down'\"\r\n [label]=\"t(showAdvanced() ? 'hide-advanced' : 'show-advanced')\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n size=\"small\"\r\n (onClick)=\"showAdvanced.set(!showAdvanced())\"\r\n />\r\n </div>\r\n <!-- Hidden advanced values are kept: the styles object passes through. -->\r\n @if (showAdvanced()) {\r\n @for (section of advancedSections; track section.key) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"sectionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: section }\"\r\n />\r\n }\r\n }\r\n </div>\r\n\r\n <ng-template #sectionTemplate let-section>\r\n <section\r\n class=\"flex min-w-0 flex-col gap-3 rounded-md border border-surface p-3\"\r\n >\r\n <h4 class=\"text-sm font-semibold\">{{ sectionLabel(section) }}</h4>\r\n @for (row of rows(section); track $index) {\r\n <div class=\"flex min-w-0 flex-col gap-2\">\r\n @if (groupLabel(row[0]) && rows(section).length > 1) {\r\n <span class=\"text-xs font-medium text-muted-color\">{{\r\n groupLabel(row[0])\r\n }}</span>\r\n }\r\n <div class=\"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2\">\r\n @for (item of row; track item.id) {\r\n @switch (item.kind) {\r\n @case (\"font\") {\r\n <mt-select-field\r\n [formControl]=\"control(item.id)\"\r\n [options]=\"fontOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [hasPlaceholderPrefix]=\"false\"\r\n />\r\n }\r\n @case (\"weight\") {\r\n <mt-select-field\r\n [formControl]=\"control(item.id)\"\r\n [options]=\"weightOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [hasPlaceholderPrefix]=\"false\"\r\n />\r\n }\r\n @case (\"underline\") {\r\n <mt-select-field\r\n [formControl]=\"control(item.id)\"\r\n [options]=\"underlineOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [hasPlaceholderPrefix]=\"false\"\r\n />\r\n }\r\n @case (\"color\") {\r\n <mt-color-picker-field\r\n [formControl]=\"control(item.id)\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n />\r\n }\r\n @default {\r\n <mt-number-field\r\n [formControl]=\"control(item.id)\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [min]=\"range(item).min\"\r\n [max]=\"range(item).max\"\r\n [maxFractionDigits]=\"range(item).fractionDigits\"\r\n />\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n </section>\r\n </ng-template>\r\n</ng-container>\r\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "optionDisabled", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3486
3502
  }
3487
3503
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EmailContentStylesEditor, decorators: [{
3488
3504
  type: Component,
@@ -4548,4 +4564,4 @@ function numberAttribute(element, name) {
4548
4564
  */
4549
4565
 
4550
4566
  export { EmailDeliveryAccessService as A, collectEmailTemplatePlaceholders as B, buildEmailTemplatePlaceholderFields as C, DEFAULT_GENERAL_CONFIGURATION as D, EmailDeliveryFacade as E, FIXED_CURRENCIES as F, GENERAL_CONFIGURATION_SETTING_KEY as G, EmailUserTestDialog as H, EMAIL_USER_INITIATED_TEST_OPERATION_KIND as I, EMAIL_DELIVERY_ROUTES as J, EMAIL_FONT_FAMILIES as K, EMAIL_STYLE_RANGES as L, EMAIL_FONT_WEIGHTS as M, EMAIL_FONT_LABELS as N, EMAIL_STYLE_SECTIONS as O, EMAIL_STYLE_ADVANCED_SECTIONS as P, readEmailStyle as Q, RATE_SOURCE_OPTIONS as R, SystemSettings as S, TIMESHEET_FREQUENCY_OPTIONS as T, writeEmailStyle as U, normalizeEmailColor as V, WEEKEND_DAY_DEFINITIONS as W, emailDesignLeaveGuard as X, buildEmailPreviewDocument as Y, EmailDeliveryStatus as a, EMAIL_DELIVERY_ATTEMPT_STATUSES as b, createEmailTestRequestId as c, areEmailTestRecipientsValid as d, isEmailTestRequestPending as e, EMAIL_DELIVERY_PERMISSIONS as f, getEmailDeliveryStatusMap as g, EmailLayoutFacade as h, isConnectionTestAttempt as i, emailStylesKey as j, EMAIL_LAYOUT_CONTENT_SLOT as k, EMAIL_LAYOUT_MAX_BYTES as l, EmailVisualEditor as m, EmailContentStylesEditor as n, EmailHtmlPreview as o, parseEmailTestRecipients as p, EXPLORE_DEFAULT_VIEW_OPTIONS as q, readLayoutErrorDiagnostics as r, DEFAULT_DATE_FORMAT_OPTIONS as s, DEFAULT_TIME_FORMAT_OPTIONS as t, DOTNET_DAY_DEFINITIONS as u, SCHEDULE_ITEM_TYPE_OPTIONS as v, SystemSettingsHolidayEditor as w, DEFAULT_EMAIL_DELIVERY_OPTIONS as x, EMAIL_DELIVERY_OPTIONS as y, provideEmailDelivery as z };
4551
- //# sourceMappingURL=masterteam-system-settings-masterteam-system-settings-D9LyVzzO.mjs.map
4567
+ //# sourceMappingURL=masterteam-system-settings-masterteam-system-settings-qKFEtgzd.mjs.map