@masterteam/system-settings 0.0.27 → 0.0.28
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/README.md +4 -2
- package/assets/system-settings.css +2 -2
- package/fesm2022/{masterteam-system-settings-email-delivery-shell-BLXQ0PMi.mjs → masterteam-system-settings-email-delivery-shell-CYO489J5.mjs} +6 -6
- package/fesm2022/{masterteam-system-settings-email-delivery-shell-BLXQ0PMi.mjs.map → masterteam-system-settings-email-delivery-shell-CYO489J5.mjs.map} +1 -1
- package/fesm2022/{masterteam-system-settings-masterteam-system-settings-p_V0dnJF.mjs → masterteam-system-settings-masterteam-system-settings-D9LyVzzO.mjs} +20 -74
- package/fesm2022/masterteam-system-settings-masterteam-system-settings-D9LyVzzO.mjs.map +1 -0
- package/fesm2022/masterteam-system-settings.mjs +1 -1
- package/package.json +4 -4
- package/types/masterteam-system-settings.d.ts +0 -4
- package/fesm2022/masterteam-system-settings-masterteam-system-settings-p_V0dnJF.mjs.map +0 -1
|
@@ -42,16 +42,11 @@ class SystemSettingsGeneralConfigSection {
|
|
|
42
42
|
generalConfigurationForm = input.required(...(ngDevMode ? [{ debugName: "generalConfigurationForm" }] : /* istanbul ignore next */ []));
|
|
43
43
|
exploreDefaultViewOptions = input([], ...(ngDevMode ? [{ debugName: "exploreDefaultViewOptions" }] : /* istanbul ignore next */ []));
|
|
44
44
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsGeneralConfigSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SystemSettingsGeneralConfigSection, isStandalone: true, selector: "mt-system-settings-general-config-section", inputs: { generalConfigurationForm: { classPropertyName: "generalConfigurationForm", publicName: "generalConfigurationForm", isSignal: true, isRequired: true, transformFunction: null }, exploreDefaultViewOptions: { classPropertyName: "exploreDefaultViewOptions", publicName: "exploreDefaultViewOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"generalConfigurationForm()\" 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-configuration-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"general-configuration-description\") }}\r\n </p>\r\n </div>\r\n\r\n <mt-radio-cards-field\r\n formControlName=\"defaultExploreView\"\r\n [options]=\"exploreDefaultViewOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('explore-default-view')\"\r\n [hint]=\"t('explore-default-view-hint')\"\r\n [required]=\"true\"\r\n size=\"small\"\r\n />\r\n
|
|
45
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SystemSettingsGeneralConfigSection, isStandalone: true, selector: "mt-system-settings-general-config-section", inputs: { generalConfigurationForm: { classPropertyName: "generalConfigurationForm", publicName: "generalConfigurationForm", isSignal: true, isRequired: true, transformFunction: null }, exploreDefaultViewOptions: { classPropertyName: "exploreDefaultViewOptions", publicName: "exploreDefaultViewOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"generalConfigurationForm()\" 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-configuration-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"general-configuration-description\") }}\r\n </p>\r\n </div>\r\n\r\n <mt-radio-cards-field\r\n formControlName=\"defaultExploreView\"\r\n [options]=\"exploreDefaultViewOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('explore-default-view')\"\r\n [hint]=\"t('explore-default-view-hint')\"\r\n [required]=\"true\"\r\n size=\"small\"\r\n />\r\n </div>\r\n </mt-card>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%}mt-card{height:100%}\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: RadioCardsField, selector: "mt-radio-cards-field", inputs: ["circle", "label", "hint", "readonly", "required", "color", "size", "optionLabel", "optionValue", "options"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
46
46
|
}
|
|
47
47
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsGeneralConfigSection, decorators: [{
|
|
48
48
|
type: Component,
|
|
49
|
-
args: [{ selector: 'mt-system-settings-general-config-section', imports: [
|
|
50
|
-
ReactiveFormsModule,
|
|
51
|
-
TranslocoDirective,
|
|
52
|
-
Card,
|
|
53
|
-
RadioCardsField,
|
|
54
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"generalConfigurationForm()\" 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-configuration-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"general-configuration-description\") }}\r\n </p>\r\n </div>\r\n\r\n <mt-radio-cards-field\r\n formControlName=\"defaultExploreView\"\r\n [options]=\"exploreDefaultViewOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('explore-default-view')\"\r\n [hint]=\"t('explore-default-view-hint')\"\r\n [required]=\"true\"\r\n size=\"small\"\r\n />\r\n\r\n </div>\r\n </mt-card>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%}mt-card{height:100%}\n"] }]
|
|
49
|
+
args: [{ selector: 'mt-system-settings-general-config-section', imports: [ReactiveFormsModule, TranslocoDirective, Card, RadioCardsField], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"generalConfigurationForm()\" 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-configuration-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"general-configuration-description\") }}\r\n </p>\r\n </div>\r\n\r\n <mt-radio-cards-field\r\n formControlName=\"defaultExploreView\"\r\n [options]=\"exploreDefaultViewOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('explore-default-view')\"\r\n [hint]=\"t('explore-default-view-hint')\"\r\n [required]=\"true\"\r\n size=\"small\"\r\n />\r\n </div>\r\n </mt-card>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%}mt-card{height:100%}\n"] }]
|
|
55
50
|
}], propDecorators: { generalConfigurationForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "generalConfigurationForm", required: true }] }], exploreDefaultViewOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "exploreDefaultViewOptions", required: false }] }] } });
|
|
56
51
|
|
|
57
52
|
class SystemSettingsGeneralSection {
|
|
@@ -135,7 +130,7 @@ class SystemSettingsHolidayEditor {
|
|
|
135
130
|
this.ref.close(null);
|
|
136
131
|
}
|
|
137
132
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidayEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
138
|
-
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'\">\
|
|
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 });
|
|
139
134
|
}
|
|
140
135
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidayEditor, decorators: [{
|
|
141
136
|
type: Component,
|
|
@@ -145,7 +140,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
145
140
|
Button,
|
|
146
141
|
DateField,
|
|
147
142
|
TextField,
|
|
148
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\
|
|
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"] }]
|
|
149
144
|
}], ctorParameters: () => [], propDecorators: { holiday: [{ type: i0.Input, args: [{ isSignal: true, alias: "holiday", required: false }] }], isEditMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "isEditMode", required: false }] }] } });
|
|
150
145
|
function holidayRangeValidator() {
|
|
151
146
|
return (control) => {
|
|
@@ -196,11 +191,11 @@ class SystemSettingsHolidaysSection {
|
|
|
196
191
|
], ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
|
|
197
192
|
hasHolidays = computed(() => this.holidays().length > 0, ...(ngDevMode ? [{ debugName: "hasHolidays" }] : /* istanbul ignore next */ []));
|
|
198
193
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidaysSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
199
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SystemSettingsHolidaysSection, isStandalone: true, selector: "mt-system-settings-holidays-section", inputs: { holidays: { classPropertyName: "holidays", publicName: "holidays", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addHoliday: "addHoliday", editHoliday: "editHoliday", deleteHoliday: "deleteHoliday" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\
|
|
194
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SystemSettingsHolidaysSection, isStandalone: true, selector: "mt-system-settings-holidays-section", inputs: { holidays: { classPropertyName: "holidays", publicName: "holidays", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addHoliday: "addHoliday", editHoliday: "editHoliday", deleteHoliday: "deleteHoliday" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <mt-card class=\"block\">\n <div class=\"space-y-6\">\n <div\n class=\"flex flex-col gap-4 md:flex-row md:items-start md:justify-between\"\n >\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"holidays-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"holidays-description\") }}\n </p>\n </div>\n\n <mt-button\n [label]=\"t('add-holiday')\"\n icon=\"general.plus\"\n (onClick)=\"addHoliday.emit()\"\n />\n </div>\n\n @if (hasHolidays()) {\n <mt-table\n noCard\n [data]=\"holidays()\"\n [columns]=\"columns()\"\n [rowActions]=\"rowActions()\"\n [generalSearch]=\"false\"\n [showFilters]=\"false\"\n [dataKey]=\"'rowKey'\"\n storageKey=\"admin-system-settings-holidays-table\"\n >\n </mt-table>\n } @else {\n <div\n class=\"rounded-xl border border-dashed border-neutral-300 bg-neutral-50 px-6 py-10 text-center\"\n >\n <h5 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"no-holidays-title\") }}\n </h5>\n <p class=\"mt-2 text-sm text-neutral-600\">\n {{ t(\"no-holidays-description\") }}\n </p>\n </div>\n }\n </div>\n </mt-card>\n</ng-container>\n", styles: [":host{display:block}\n"], dependencies: [{ 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: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "searchScope", "showFilters", "filterMode", "filterCloseOnOutsideClick", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "externalFiltersActive", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "filtersCleared", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
200
195
|
}
|
|
201
196
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidaysSection, decorators: [{
|
|
202
197
|
type: Component,
|
|
203
|
-
args: [{ selector: 'mt-system-settings-holidays-section', imports: [TranslocoDirective, Button, Card, Table], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\
|
|
198
|
+
args: [{ selector: 'mt-system-settings-holidays-section', imports: [TranslocoDirective, Button, Card, Table], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <mt-card class=\"block\">\n <div class=\"space-y-6\">\n <div\n class=\"flex flex-col gap-4 md:flex-row md:items-start md:justify-between\"\n >\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"holidays-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"holidays-description\") }}\n </p>\n </div>\n\n <mt-button\n [label]=\"t('add-holiday')\"\n icon=\"general.plus\"\n (onClick)=\"addHoliday.emit()\"\n />\n </div>\n\n @if (hasHolidays()) {\n <mt-table\n noCard\n [data]=\"holidays()\"\n [columns]=\"columns()\"\n [rowActions]=\"rowActions()\"\n [generalSearch]=\"false\"\n [showFilters]=\"false\"\n [dataKey]=\"'rowKey'\"\n storageKey=\"admin-system-settings-holidays-table\"\n >\n </mt-table>\n } @else {\n <div\n class=\"rounded-xl border border-dashed border-neutral-300 bg-neutral-50 px-6 py-10 text-center\"\n >\n <h5 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"no-holidays-title\") }}\n </h5>\n <p class=\"mt-2 text-sm text-neutral-600\">\n {{ t(\"no-holidays-description\") }}\n </p>\n </div>\n }\n </div>\n </mt-card>\n</ng-container>\n", styles: [":host{display:block}\n"] }]
|
|
204
199
|
}], propDecorators: { holidays: [{ type: i0.Input, args: [{ isSignal: true, alias: "holidays", required: false }] }], addHoliday: [{ type: i0.Output, args: ["addHoliday"] }], editHoliday: [{ type: i0.Output, args: ["editHoliday"] }], deleteHoliday: [{ type: i0.Output, args: ["deleteHoliday"] }] } });
|
|
205
200
|
|
|
206
201
|
class SystemSettingsTimeSheetSection {
|
|
@@ -472,7 +467,6 @@ class SystemSettings {
|
|
|
472
467
|
}),
|
|
473
468
|
}),
|
|
474
469
|
timezone: new FormGroup({
|
|
475
|
-
regionId: new FormControl(null, Validators.required),
|
|
476
470
|
dateFormat: new FormControl(null, Validators.required),
|
|
477
471
|
timeFormat: new FormControl(null, Validators.required),
|
|
478
472
|
}),
|
|
@@ -907,7 +901,6 @@ class SystemSettings {
|
|
|
907
901
|
defaultExploreView: generalConfiguration.defaultExploreView,
|
|
908
902
|
});
|
|
909
903
|
this.form.controls.timezone.setValue({
|
|
910
|
-
regionId: timezone.region?.id ?? null,
|
|
911
904
|
dateFormat: timezone.dateFormat,
|
|
912
905
|
timeFormat: timezone.timeFormat,
|
|
913
906
|
});
|
|
@@ -969,20 +962,14 @@ class SystemSettings {
|
|
|
969
962
|
}
|
|
970
963
|
buildTimezoneValue() {
|
|
971
964
|
const timezoneForm = this.form.controls.timezone.getRawValue();
|
|
972
|
-
if (!timezoneForm.
|
|
973
|
-
!timezoneForm.dateFormat ||
|
|
974
|
-
!timezoneForm.timeFormat) {
|
|
975
|
-
return null;
|
|
976
|
-
}
|
|
977
|
-
const region = this.timezones().find((item) => item.id === timezoneForm.regionId);
|
|
978
|
-
if (!region) {
|
|
965
|
+
if (!timezoneForm.dateFormat || !timezoneForm.timeFormat) {
|
|
979
966
|
return null;
|
|
980
967
|
}
|
|
981
968
|
return {
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
969
|
+
// Not editable on this page: send back what was loaded, untouched. It
|
|
970
|
+
// is never looked up in the catalog, so a stored id the catalog no
|
|
971
|
+
// longer lists (or a catalog that failed to load) cannot block a save.
|
|
972
|
+
region: this.initialSnapshot()?.timezone.region ?? null,
|
|
986
973
|
dateFormat: timezoneForm.dateFormat,
|
|
987
974
|
timeFormat: timezoneForm.timeFormat,
|
|
988
975
|
};
|
|
@@ -1119,7 +1106,11 @@ class SystemSettings {
|
|
|
1119
1106
|
};
|
|
1120
1107
|
}
|
|
1121
1108
|
return {
|
|
1122
|
-
|
|
1109
|
+
// Kept exactly as stored: the page has no control for it, so it is
|
|
1110
|
+
// neither rebuilt from the catalog nor allowed to block a save.
|
|
1111
|
+
region: (setting.value['region'] ??
|
|
1112
|
+
setting.value['Region'] ??
|
|
1113
|
+
null),
|
|
1123
1114
|
dateFormat: getNullableString(setting.value['dateFormat'] ??
|
|
1124
1115
|
setting.value['DateFormat'] ??
|
|
1125
1116
|
setting.value['dateformat']),
|
|
@@ -1194,45 +1185,6 @@ class SystemSettings {
|
|
|
1194
1185
|
}
|
|
1195
1186
|
return { label, from, to };
|
|
1196
1187
|
}
|
|
1197
|
-
normalizeTimezoneRegion(value) {
|
|
1198
|
-
if (typeof value === 'string' && value.trim()) {
|
|
1199
|
-
const normalizedValue = value.trim().toLowerCase();
|
|
1200
|
-
const region = this.timezones().find((item) => item.id.trim().toLowerCase() === normalizedValue) ?? null;
|
|
1201
|
-
return region
|
|
1202
|
-
? {
|
|
1203
|
-
...region,
|
|
1204
|
-
name: region.name ?? region.displayName,
|
|
1205
|
-
}
|
|
1206
|
-
: null;
|
|
1207
|
-
}
|
|
1208
|
-
if (!isRecord(value)) {
|
|
1209
|
-
return null;
|
|
1210
|
-
}
|
|
1211
|
-
const id = getString(value['id'] ?? value['Id']);
|
|
1212
|
-
if (!id) {
|
|
1213
|
-
return null;
|
|
1214
|
-
}
|
|
1215
|
-
const matchedRegion = this.timezones().find((item) => item.id.trim().toLowerCase() === id.trim().toLowerCase());
|
|
1216
|
-
if (matchedRegion) {
|
|
1217
|
-
return {
|
|
1218
|
-
...matchedRegion,
|
|
1219
|
-
name: getString(value['name'] ?? value['Name']) ??
|
|
1220
|
-
matchedRegion.name ??
|
|
1221
|
-
matchedRegion.displayName,
|
|
1222
|
-
};
|
|
1223
|
-
}
|
|
1224
|
-
const standardName = getString(value['standardName'] ?? value['StandardName']) ?? id;
|
|
1225
|
-
const displayName = getString(value['displayName'] ?? value['DisplayName']) ?? id;
|
|
1226
|
-
return {
|
|
1227
|
-
id,
|
|
1228
|
-
baseUtcOffset: getString(value['baseUtcOffset'] ?? value['BaseUtcOffset']) ?? '',
|
|
1229
|
-
standardName,
|
|
1230
|
-
displayName,
|
|
1231
|
-
daylightName: getString(value['daylightName'] ?? value['DaylightName']) ??
|
|
1232
|
-
standardName,
|
|
1233
|
-
name: getString(value['name'] ?? value['Name']) ?? displayName,
|
|
1234
|
-
};
|
|
1235
|
-
}
|
|
1236
1188
|
normalizeCurrencyUnit(value) {
|
|
1237
1189
|
if (!isRecord(value)) {
|
|
1238
1190
|
return FIXED_CURRENCIES[0].unit;
|
|
@@ -1264,7 +1216,7 @@ class SystemSettings {
|
|
|
1264
1216
|
normalizeTimezoneSnapshot(value) {
|
|
1265
1217
|
const defaults = this.getDefaultTimezoneValue();
|
|
1266
1218
|
return {
|
|
1267
|
-
region: value.region
|
|
1219
|
+
region: value.region,
|
|
1268
1220
|
dateFormat: value.dateFormat ?? defaults.dateFormat,
|
|
1269
1221
|
timeFormat: value.timeFormat ?? defaults.timeFormat,
|
|
1270
1222
|
};
|
|
@@ -1348,7 +1300,6 @@ class SystemSettings {
|
|
|
1348
1300
|
}
|
|
1349
1301
|
}
|
|
1350
1302
|
getDefaultTimezoneValue() {
|
|
1351
|
-
const region = this.timezones()[0] ?? null;
|
|
1352
1303
|
const defaultDateFormat = this.dateFormatOptions().find((option) => option.isSelected)?.id ??
|
|
1353
1304
|
this.dateFormatOptions()[0]?.id ??
|
|
1354
1305
|
null;
|
|
@@ -1356,12 +1307,7 @@ class SystemSettings {
|
|
|
1356
1307
|
this.timeFormatOptions()[0]?.id ??
|
|
1357
1308
|
null;
|
|
1358
1309
|
return {
|
|
1359
|
-
region:
|
|
1360
|
-
? {
|
|
1361
|
-
...region,
|
|
1362
|
-
name: region.name ?? region.displayName,
|
|
1363
|
-
}
|
|
1364
|
-
: null,
|
|
1310
|
+
region: null,
|
|
1365
1311
|
dateFormat: defaultDateFormat,
|
|
1366
1312
|
timeFormat: defaultTimeFormat,
|
|
1367
1313
|
};
|
|
@@ -3375,7 +3321,7 @@ const EMAIL_DELIVERY_ROUTES = [
|
|
|
3375
3321
|
{
|
|
3376
3322
|
path: '',
|
|
3377
3323
|
canDeactivate: [emailDesignLeaveGuard],
|
|
3378
|
-
loadComponent: () => import('./masterteam-system-settings-email-delivery-shell-
|
|
3324
|
+
loadComponent: () => import('./masterteam-system-settings-email-delivery-shell-CYO489J5.mjs').then((module) => module.EmailDeliveryShell),
|
|
3379
3325
|
},
|
|
3380
3326
|
{ path: '**', redirectTo: '' },
|
|
3381
3327
|
];
|
|
@@ -4602,4 +4548,4 @@ function numberAttribute(element, name) {
|
|
|
4602
4548
|
*/
|
|
4603
4549
|
|
|
4604
4550
|
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 };
|
|
4605
|
-
//# sourceMappingURL=masterteam-system-settings-masterteam-system-settings-
|
|
4551
|
+
//# sourceMappingURL=masterteam-system-settings-masterteam-system-settings-D9LyVzzO.mjs.map
|