@firestitch/system 18.0.45 → 18.0.46

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.
@@ -41,9 +41,9 @@ import { FsPopoverModule } from '@firestitch/popover';
41
41
  import * as i1 from '@firestitch/skeleton';
42
42
  import { FsSkeletonModule } from '@firestitch/skeleton';
43
43
  import { CdkScrollable } from '@angular/cdk/scrolling';
44
+ import { FsApi, RequestMethod, StreamEventData, StreamEventType } from '@firestitch/api';
44
45
  import { ItemType } from '@firestitch/filter';
45
46
  import { map, tap, takeUntil, switchMap, filter, take, finalize } from 'rxjs/operators';
46
- import { FsApi, RequestMethod, StreamEventData, StreamEventType } from '@firestitch/api';
47
47
  import { Subject, timer, Observable } from 'rxjs';
48
48
  import { addMinutes, addHours, addDays, subSeconds, differenceInSeconds, getDaysInMonth, differenceInMinutes } from 'date-fns';
49
49
  import { FsMessage } from '@firestitch/message';
@@ -215,7 +215,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
215
215
 
216
216
  class ApiLogsComponent {
217
217
  _dialog = inject(MatDialog);
218
+ _api = inject(FsApi);
218
219
  list;
220
+ /**
221
+ * Optional override. Left unset, the component reads the framework's own
222
+ * system/logs/api endpoint.
223
+ */
219
224
  loadApiLogs;
220
225
  config = null;
221
226
  apiLogStates = indexNameValue(ApiLogStates);
@@ -252,12 +257,16 @@ class ApiLogsComponent {
252
257
  },
253
258
  ],
254
259
  fetch: (query) => {
255
- Object.assign(query, {});
256
- return this.loadApiLogs(query)
257
- .pipe(map((response) => ({ data: response.data, paging: response.paging })));
260
+ return this._apiLogsGet(query);
258
261
  },
259
262
  };
260
263
  }
264
+ _apiLogsGet(query) {
265
+ return this.loadApiLogs
266
+ ? this.loadApiLogs(query)
267
+ : this._api.get('system/logs/api', query, { key: null })
268
+ .pipe(map((response) => ({ data: response.apiLogs, paging: response.paging })));
269
+ }
261
270
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ApiLogsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
262
271
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: ApiLogsComponent, isStandalone: true, selector: "fs-system-api-logs", inputs: { loadApiLogs: "loadApiLogs" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a href=\"javascript:;\" (click)=\"open(row)\">\n {{row.type || 'Unknown'}}\n @if (row.direction=='outgoing') {\n <mat-icon class=\"direction\">arrow_upward</mat-icon>\n }\n @if (row.direction=='incoming') {\n <mat-icon class=\"direction\">arrow_downward</mat-icon>\n }\n </a>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{apiLogStates[row.state]}}\n @if (row.code) {\n <span class=\"code\" [ngClass]=\"{'success': row.code==200,'error': row.code!=200 }\">[{{row.code}}]</span>\n }\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Message</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.message}}\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Date</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n <div>@if (row.length) {\n <small>Duration: {{ row.length | fsDateDuration }}</small>\n }</div>\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [".code.success{color:green}.code.error{color:red}.direction{font-size:14px;height:14px;line-height:14px;width:14px}\n"], dependencies: [{ kind: "ngmodule", type: FsListModule }, { kind: "component", type: i1$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i1$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customizable", "sortable", "sortableDefault", "sortableDirection", "direction", "align", "width", "class"] }, { kind: "directive", type: i1$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "directive", type: i1$1.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FsDateModule }, { kind: "pipe", type: i4.FsDateDurationPipe, name: "fsDateDuration" }, { kind: "component", type: i4.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
263
272
  }
@@ -1021,13 +1030,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
1021
1030
  }] } });
1022
1031
 
1023
1032
  class InfoComponent {
1033
+ _api = inject(FsApi);
1024
1034
  iframe;
1035
+ /**
1036
+ * Optional override. Left unset, the component reads the framework's own
1037
+ * system/info endpoint.
1038
+ */
1025
1039
  load;
1026
1040
  ngAfterViewInit() {
1027
1041
  this._load();
1028
1042
  }
1043
+ _infoGet() {
1044
+ return this.load
1045
+ ? this.load()
1046
+ : this._api.get('system/info', {}, { key: 'info' });
1047
+ }
1029
1048
  _load() {
1030
- this.load()
1049
+ this._infoGet()
1031
1050
  .subscribe((info) => {
1032
1051
  info += '<style>body { background: transparent; }</style>';
1033
1052
  const doc = this.iframe.nativeElement.contentDocument || this.iframe.nativeElement.contentWindow;
@@ -1495,6 +1514,10 @@ class ServerLogsComponent {
1495
1514
  _dialog = inject(MatDialog);
1496
1515
  _api = inject(FsApi);
1497
1516
  list;
1517
+ /**
1518
+ * Optional override. Left unset, the component reads the framework's own
1519
+ * system/logs/server endpoint.
1520
+ */
1498
1521
  loadLogs;
1499
1522
  acknowledgedAll = new EventEmitter();
1500
1523
  config = null;
@@ -1570,12 +1593,16 @@ class ServerLogsComponent {
1570
1593
  },
1571
1594
  ],
1572
1595
  fetch: (query) => {
1573
- return this._api
1574
- .get('system/logs/server', query, { key: null })
1575
- .pipe(map((response) => ({ data: response.logs, paging: response.paging })));
1596
+ return this._logsGet(query);
1576
1597
  },
1577
1598
  };
1578
1599
  }
1600
+ _logsGet(query) {
1601
+ return this.loadLogs
1602
+ ? this.loadLogs(query)
1603
+ : this._api.get('system/logs/server', query, { key: null })
1604
+ .pipe(map((response) => ({ data: response.logs, paging: response.paging })));
1605
+ }
1579
1606
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ServerLogsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1580
1607
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: ServerLogsComponent, isStandalone: true, selector: "fs-system-server-logs", inputs: { loadLogs: "loadLogs" }, outputs: { acknowledgedAll: "acknowledgedAll" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column width=\"1%\">\n <ng-template\n fs-list-cell\n let-row=\"row\">\n <a (click)=\"toggleAcknowledged(row)\">\n <fs-badge\n [size]=\"10\"\n [tooltip]=\"row.acknowledged ? 'Acknowledged' : 'Unacknowledged'\"\n [color]=\"row.acknowledged ? '#E3E3E3' : '#F30000'\">\n </fs-badge>\n </a>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>\n Message\n </ng-template>\n <ng-template\n fs-list-cell\n let-row=\"row\">\n <a\n href=\"javascript:;\"\n (click)=\"open(row)\">\n {{ row.message }}\n </a>\n </ng-template>\n </fs-list-column>\n <fs-list-column class=\"col-date\">\n <ng-template fs-list-header>\n Type\n </ng-template>\n <ng-template\n fs-list-cell\n let-row=\"row\">\n {{ LogTypes[row.type] }}\n </ng-template>\n </fs-list-column>\n <fs-list-column class=\"col-date\">\n <ng-template fs-list-header>\n Date\n </ng-template>\n <ng-template\n fs-list-cell\n let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n</fs-list>", styles: ["fs-list ::ng-deep .col-date,fs-list ::ng-deep .col-type{white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: FsListModule }, { kind: "component", type: i1$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i1$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customizable", "sortable", "sortableDefault", "sortableDirection", "direction", "align", "width", "class"] }, { kind: "directive", type: i1$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "directive", type: i1$1.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { kind: "ngmodule", type: FsBadgeModule }, { kind: "component", type: i2$3.FsBadgeComponent, selector: "fs-badge", inputs: ["color", "text", "tooltip", "size", "shape", "image", "icon", "iconSize", "iconSizePercent", "iconColor", "backgroundSize"] }, { kind: "ngmodule", type: FsDateModule }, { kind: "component", type: i4.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1581
1608
  }
@@ -1611,6 +1638,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
1611
1638
  ], template: "<fs-dialog>\n <fs-dialog-title [close]=\"true\">\n {{ setting.label }}\n </fs-dialog-title>\n <mat-dialog-content>\n <fs-markdown-renderer [markdown]=\"setting.instructions\"></fs-markdown-renderer>\n </mat-dialog-content>\n</fs-dialog>\n", styles: ["fs-markdown-renderer{display:block;max-width:700px}:host ::ng-deep fs-markdown-renderer .markdown-renderer-container{overflow-x:auto;overflow-y:hidden}\n"] }]
1612
1639
  }] });
1613
1640
 
1641
+ class SettingData {
1642
+ _api = inject(FsApi);
1643
+ gets(data = {}, config = {}) {
1644
+ return this._api.get('system/settings', data, { key: 'settings', ...config });
1645
+ }
1646
+ bulk(data = {}, config = {}) {
1647
+ return this._api.post('system/settings/bulk', data, { key: 'settings', ...config });
1648
+ }
1649
+ fileUpload(settingId, data = {}, config = {}) {
1650
+ return this._api.post(`system/settings/${settingId}/files`, data, { key: 'setting', ...config });
1651
+ }
1652
+ fileDelete(settingId, data = {}, config = {}) {
1653
+ return this._api.delete(`system/settings/${settingId}/files`, data, { key: 'setting', ...config });
1654
+ }
1655
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SettingData, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1656
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SettingData, providedIn: 'root' });
1657
+ }
1658
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SettingData, decorators: [{
1659
+ type: Injectable,
1660
+ args: [{
1661
+ providedIn: 'root',
1662
+ }]
1663
+ }] });
1664
+
1614
1665
  class KeyNameValuePipe {
1615
1666
  transform(values) {
1616
1667
  return Object.keys(values).map((key) => {
@@ -1680,18 +1731,22 @@ class SettingsComponent {
1680
1731
  _clipboard = inject(FsClipboard);
1681
1732
  _prompt = inject(FsPrompt);
1682
1733
  _dialog = inject(MatDialog);
1734
+ _settingData = inject(SettingData);
1683
1735
  _cdRef = inject(ChangeDetectorRef);
1736
+ /**
1737
+ * Optional overrides. The settings endpoints ship with the framework at a fixed
1738
+ * path (system/settings), so when one of these is left unset the component calls
1739
+ * that endpoint itself through SettingData and a consumer has to pass nothing.
1740
+ */
1684
1741
  loadSettings;
1685
1742
  save;
1686
- fileRemove = new EventEmitter();
1687
- fileSelect = new EventEmitter();
1743
+ fileUpload;
1744
+ fileDelete;
1688
1745
  groupedSettings = [];
1689
1746
  groups = [];
1690
1747
  SettingInterfaceType = SettingInterfaceType;
1691
1748
  ngOnInit() {
1692
- this.loadSettings({
1693
- visible: true,
1694
- })
1749
+ this._loadSettings({ visible: true })
1695
1750
  .subscribe((settings) => {
1696
1751
  settings = settings
1697
1752
  .filter((setting) => {
@@ -1784,13 +1839,54 @@ class SettingsComponent {
1784
1839
  const values = settings.reduce((result, value) => {
1785
1840
  return (result[value.name] = value.value, result);
1786
1841
  }, {});
1787
- this.save(group, values)
1842
+ this._save(group, values)
1788
1843
  .subscribe(() => {
1789
1844
  this._message.success('Changes Saved');
1790
1845
  });
1791
1846
  }
1847
+ /**
1848
+ * The X on a file setting. Persisted on its own because the bulk save deliberately
1849
+ * skips file settings — they have their own endpoint, and without this the field
1850
+ * only cleared on screen while the file stayed.
1851
+ */
1852
+ removeFile(setting) {
1853
+ this._fileDelete(setting)
1854
+ .subscribe((updated) => {
1855
+ setting.value = updated?.value ?? '';
1856
+ this._message.success('Changes Saved');
1857
+ this._cdRef.markForCheck();
1858
+ });
1859
+ }
1860
+ selectFile(setting, file) {
1861
+ this._fileUpload(setting, file)
1862
+ .subscribe((updated) => {
1863
+ setting.value = updated?.value ?? setting.value;
1864
+ this._message.success('Changes Saved');
1865
+ this._cdRef.markForCheck();
1866
+ });
1867
+ }
1868
+ _loadSettings(query) {
1869
+ return this.loadSettings
1870
+ ? this.loadSettings(query)
1871
+ : this._settingData.gets(query);
1872
+ }
1873
+ _save(group, values) {
1874
+ return this.save
1875
+ ? this.save(group, values)
1876
+ : this._settingData.bulk({ group, values });
1877
+ }
1878
+ _fileUpload(setting, file) {
1879
+ return this.fileUpload
1880
+ ? this.fileUpload(setting, file)
1881
+ : this._settingData.fileUpload(setting.id, { file });
1882
+ }
1883
+ _fileDelete(setting) {
1884
+ return this.fileDelete
1885
+ ? this.fileDelete(setting)
1886
+ : this._settingData.fileDelete(setting.id);
1887
+ }
1792
1888
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SettingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1793
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: SettingsComponent, isStandalone: true, selector: "fs-system-settings", inputs: { loadSettings: "loadSettings", save: "save" }, outputs: { fileRemove: "fileRemove", fileSelect: "fileSelect" }, ngImport: i0, template: "<mat-accordion>\n @for (group of groups; track group) {\n <mat-expansion-panel\n hideToggle\n >\n <mat-expansion-panel-header>\n <mat-panel-title>\n <div class=\"title-row\">\n <div class=\"title\">\n {{ group || 'General' }}\n </div>\n <div class=\"actions\">\n <button\n type=\"button\"\n [matTooltip]=\"'Export ' + (group || 'General') + ' Settings'\"\n mat-icon-button\n (click)=\"export($event, groupedSettings[group])\">\n <mat-icon>\n cloud_download\n </mat-icon>\n </button>\n <button\n type=\"button\"\n [matTooltip]=\"'Import ' + (group || 'General') + ' Settings'\"\n mat-icon-button\n (click)=\"import($event, group)\">\n <mat-icon>\n cloud_upload\n </mat-icon>\n </button>\n </div>\n </div>\n </mat-panel-title>\n </mat-expansion-panel-header>\n @for (setting of groupedSettings[group]; track setting) {\n <div\n hideToggle\n class=\"setting\"\n [ngClass]=\"{ 'has-instruction': !! setting.instruction }\">\n @if (setting.interfaceType===SettingInterfaceType.InputBox) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Textarea) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <textarea\n matInput\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n </textarea>\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Select || setting.interfaceType===SettingInterfaceType.SelectMultiple) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <mat-select\n [(ngModel)]=\"setting.value\"\n [multiple]=\"setting.interfaceType===SettingInterfaceType.SelectMultiple\"\n [name]=\"'setting' + setting.id\">\n @for (item of setting.values | keyNameValue; track item) {\n <mat-option\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Date) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n fsDatePicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Color) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n fsColorPicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Time) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n fsTimePicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.File) {\n <fs-file-picker\n [allowRemove]=\"true\"\n [allowDownload]=\"true\"\n (select)=\"fileSelect.emit({ setting: setting, file: $event.file })\"\n (remove)=\"fileRemove.emit(setting)\"\n [url]=\"setting.value\">\n <div fsFileLabel>\n {{ setting.label }}\n @if (setting.instructions) {\n <button\n type=\"button\"\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n </div>\n <div\n fsFileHint\n [innerHTML]=\"setting.instruction | linkify\">\n </div>\n </fs-file-picker>\n }\n </div>\n }\n <button\n mat-stroked-button\n color=\"primary\"\n type=\"button\"\n (click)=\"saveGroup(group)\">\n Save\n </button>\n </mat-expansion-panel>\n }\n</mat-accordion>", styles: [".mat-expansion-panel-header{font-size:19px}.full-width{width:100%}.title-row{flex-direction:row;box-sizing:border-box;display:flex;place-content:center flex-start;align-items:center;width:100%}.title-row .title{display:flex;flex:1}:host ::ng-deep .mat-expansion-panel-header-title{margin:0}:host ::ng-deep .mat-expansion-panel .actions{display:none}:host ::ng-deep .mat-expansion-panel.mat-expanded .actions{display:block}:host ::ng-deep .setting.has-instruction fs-file-picker fs-label-message{display:block;padding-bottom:1em}\n"], dependencies: [{ kind: "directive", type: MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FsDatePickerModule }, { kind: "component", type: i2$4.FsDatePickerComponent, selector: "[fsDatePicker]", inputs: ["minYear", "maxYear", "minDate", "maxDate", "startOfDay", "view", "format", "minutes"], outputs: ["change"] }, { kind: "component", type: i2$4.FsTimePickerComponent, selector: "[fsTimePicker]", inputs: ["view"] }, { kind: "ngmodule", type: FsColorPickerModule }, { kind: "component", type: i3$3.FsColorPickerComponent, selector: "[fsColorPicker]", inputs: ["showClear"] }, { kind: "ngmodule", type: FsFileModule }, { kind: "component", type: i4$1.FsFilePickerComponent, selector: "fs-file-picker", inputs: ["minWidth", "minHeight", "imageWidth", "imageHeight", "imageQuality", "label", "showFilename", "allowDownload", "allowReupload", "multiple", "allowRemove", "url", "file", "accept", "disabled", "previewWidth", "previewHeight"], outputs: ["select", "remove", "download"] }, { kind: "directive", type: i4$1.FsFileLabelDirective, selector: "[fsFileLabel]" }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "pipe", type: KeyNameValuePipe, name: "keyNameValue" }, { kind: "pipe", type: LinkifyPipe, name: "linkify" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1889
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: SettingsComponent, isStandalone: true, selector: "fs-system-settings", inputs: { loadSettings: "loadSettings", save: "save", fileUpload: "fileUpload", fileDelete: "fileDelete" }, ngImport: i0, template: "<mat-accordion>\n @for (group of groups; track group) {\n <mat-expansion-panel\n hideToggle\n >\n <mat-expansion-panel-header>\n <mat-panel-title>\n <div class=\"title-row\">\n <div class=\"title\">\n {{ group || 'General' }}\n </div>\n <div class=\"actions\">\n <button\n type=\"button\"\n [matTooltip]=\"'Export ' + (group || 'General') + ' Settings'\"\n mat-icon-button\n (click)=\"export($event, groupedSettings[group])\">\n <mat-icon>\n cloud_download\n </mat-icon>\n </button>\n <button\n type=\"button\"\n [matTooltip]=\"'Import ' + (group || 'General') + ' Settings'\"\n mat-icon-button\n (click)=\"import($event, group)\">\n <mat-icon>\n cloud_upload\n </mat-icon>\n </button>\n </div>\n </div>\n </mat-panel-title>\n </mat-expansion-panel-header>\n @for (setting of groupedSettings[group]; track setting) {\n <div\n hideToggle\n class=\"setting\"\n [ngClass]=\"{ 'has-instruction': !! setting.instruction }\">\n @if (setting.interfaceType===SettingInterfaceType.InputBox) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Textarea) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <textarea\n matInput\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n </textarea>\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Select || setting.interfaceType===SettingInterfaceType.SelectMultiple) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <mat-select\n [(ngModel)]=\"setting.value\"\n [multiple]=\"setting.interfaceType===SettingInterfaceType.SelectMultiple\"\n [name]=\"'setting' + setting.id\">\n @for (item of setting.values | keyNameValue; track item) {\n <mat-option\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Date) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n fsDatePicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Color) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n fsColorPicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Time) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n fsTimePicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.File) {\n <fs-file-picker\n [allowRemove]=\"true\"\n [allowDownload]=\"true\"\n (select)=\"selectFile(setting, $event.file)\"\n (remove)=\"removeFile(setting)\"\n [url]=\"setting.value\">\n <div fsFileLabel>\n {{ setting.label }}\n @if (setting.instructions) {\n <button\n type=\"button\"\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n </div>\n <div\n fsFileHint\n [innerHTML]=\"setting.instruction | linkify\">\n </div>\n </fs-file-picker>\n }\n </div>\n }\n <button\n mat-stroked-button\n color=\"primary\"\n type=\"button\"\n (click)=\"saveGroup(group)\">\n Save\n </button>\n </mat-expansion-panel>\n }\n</mat-accordion>", styles: [".mat-expansion-panel-header{font-size:19px}.full-width{width:100%}.title-row{flex-direction:row;box-sizing:border-box;display:flex;place-content:center flex-start;align-items:center;width:100%}.title-row .title{display:flex;flex:1}:host ::ng-deep .mat-expansion-panel-header-title{margin:0}:host ::ng-deep .mat-expansion-panel .actions{display:none}:host ::ng-deep .mat-expansion-panel.mat-expanded .actions{display:block}:host ::ng-deep .setting.has-instruction fs-file-picker fs-label-message{display:block;padding-bottom:1em}\n"], dependencies: [{ kind: "directive", type: MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FsDatePickerModule }, { kind: "component", type: i2$4.FsDatePickerComponent, selector: "[fsDatePicker]", inputs: ["minYear", "maxYear", "minDate", "maxDate", "startOfDay", "view", "format", "minutes"], outputs: ["change"] }, { kind: "component", type: i2$4.FsTimePickerComponent, selector: "[fsTimePicker]", inputs: ["view"] }, { kind: "ngmodule", type: FsColorPickerModule }, { kind: "component", type: i3$3.FsColorPickerComponent, selector: "[fsColorPicker]", inputs: ["showClear"] }, { kind: "ngmodule", type: FsFileModule }, { kind: "component", type: i4$1.FsFilePickerComponent, selector: "fs-file-picker", inputs: ["minWidth", "minHeight", "imageWidth", "imageHeight", "imageQuality", "label", "showFilename", "allowDownload", "allowReupload", "multiple", "allowRemove", "url", "file", "accept", "disabled", "previewWidth", "previewHeight"], outputs: ["select", "remove", "download"] }, { kind: "directive", type: i4$1.FsFileLabelDirective, selector: "[fsFileLabel]" }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "pipe", type: KeyNameValuePipe, name: "keyNameValue" }, { kind: "pipe", type: LinkifyPipe, name: "linkify" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1794
1890
  }
1795
1891
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SettingsComponent, decorators: [{
1796
1892
  type: Component,
@@ -1817,19 +1913,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
1817
1913
  MatButton,
1818
1914
  KeyNameValuePipe,
1819
1915
  LinkifyPipe,
1820
- ], template: "<mat-accordion>\n @for (group of groups; track group) {\n <mat-expansion-panel\n hideToggle\n >\n <mat-expansion-panel-header>\n <mat-panel-title>\n <div class=\"title-row\">\n <div class=\"title\">\n {{ group || 'General' }}\n </div>\n <div class=\"actions\">\n <button\n type=\"button\"\n [matTooltip]=\"'Export ' + (group || 'General') + ' Settings'\"\n mat-icon-button\n (click)=\"export($event, groupedSettings[group])\">\n <mat-icon>\n cloud_download\n </mat-icon>\n </button>\n <button\n type=\"button\"\n [matTooltip]=\"'Import ' + (group || 'General') + ' Settings'\"\n mat-icon-button\n (click)=\"import($event, group)\">\n <mat-icon>\n cloud_upload\n </mat-icon>\n </button>\n </div>\n </div>\n </mat-panel-title>\n </mat-expansion-panel-header>\n @for (setting of groupedSettings[group]; track setting) {\n <div\n hideToggle\n class=\"setting\"\n [ngClass]=\"{ 'has-instruction': !! setting.instruction }\">\n @if (setting.interfaceType===SettingInterfaceType.InputBox) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Textarea) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <textarea\n matInput\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n </textarea>\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Select || setting.interfaceType===SettingInterfaceType.SelectMultiple) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <mat-select\n [(ngModel)]=\"setting.value\"\n [multiple]=\"setting.interfaceType===SettingInterfaceType.SelectMultiple\"\n [name]=\"'setting' + setting.id\">\n @for (item of setting.values | keyNameValue; track item) {\n <mat-option\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Date) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n fsDatePicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Color) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n fsColorPicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Time) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n fsTimePicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.File) {\n <fs-file-picker\n [allowRemove]=\"true\"\n [allowDownload]=\"true\"\n (select)=\"fileSelect.emit({ setting: setting, file: $event.file })\"\n (remove)=\"fileRemove.emit(setting)\"\n [url]=\"setting.value\">\n <div fsFileLabel>\n {{ setting.label }}\n @if (setting.instructions) {\n <button\n type=\"button\"\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n </div>\n <div\n fsFileHint\n [innerHTML]=\"setting.instruction | linkify\">\n </div>\n </fs-file-picker>\n }\n </div>\n }\n <button\n mat-stroked-button\n color=\"primary\"\n type=\"button\"\n (click)=\"saveGroup(group)\">\n Save\n </button>\n </mat-expansion-panel>\n }\n</mat-accordion>", styles: [".mat-expansion-panel-header{font-size:19px}.full-width{width:100%}.title-row{flex-direction:row;box-sizing:border-box;display:flex;place-content:center flex-start;align-items:center;width:100%}.title-row .title{display:flex;flex:1}:host ::ng-deep .mat-expansion-panel-header-title{margin:0}:host ::ng-deep .mat-expansion-panel .actions{display:none}:host ::ng-deep .mat-expansion-panel.mat-expanded .actions{display:block}:host ::ng-deep .setting.has-instruction fs-file-picker fs-label-message{display:block;padding-bottom:1em}\n"] }]
1916
+ ], template: "<mat-accordion>\n @for (group of groups; track group) {\n <mat-expansion-panel\n hideToggle\n >\n <mat-expansion-panel-header>\n <mat-panel-title>\n <div class=\"title-row\">\n <div class=\"title\">\n {{ group || 'General' }}\n </div>\n <div class=\"actions\">\n <button\n type=\"button\"\n [matTooltip]=\"'Export ' + (group || 'General') + ' Settings'\"\n mat-icon-button\n (click)=\"export($event, groupedSettings[group])\">\n <mat-icon>\n cloud_download\n </mat-icon>\n </button>\n <button\n type=\"button\"\n [matTooltip]=\"'Import ' + (group || 'General') + ' Settings'\"\n mat-icon-button\n (click)=\"import($event, group)\">\n <mat-icon>\n cloud_upload\n </mat-icon>\n </button>\n </div>\n </div>\n </mat-panel-title>\n </mat-expansion-panel-header>\n @for (setting of groupedSettings[group]; track setting) {\n <div\n hideToggle\n class=\"setting\"\n [ngClass]=\"{ 'has-instruction': !! setting.instruction }\">\n @if (setting.interfaceType===SettingInterfaceType.InputBox) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Textarea) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <textarea\n matInput\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n </textarea>\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Select || setting.interfaceType===SettingInterfaceType.SelectMultiple) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <mat-select\n [(ngModel)]=\"setting.value\"\n [multiple]=\"setting.interfaceType===SettingInterfaceType.SelectMultiple\"\n [name]=\"'setting' + setting.id\">\n @for (item of setting.values | keyNameValue; track item) {\n <mat-option\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Date) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n fsDatePicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Color) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n fsColorPicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.Time) {\n <mat-form-field\n class=\"full-width form-field-multiline-subscript\"\n >\n <mat-label>\n {{ setting.label }}\n </mat-label>\n <input\n matInput\n fsTimePicker\n [(ngModel)]=\"setting.value\"\n [name]=\"'setting' + setting.id\">\n @if (setting.instructions) {\n <button\n type=\"button\"\n matSuffix\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n <mat-hint\n [innerHTML]=\"setting.instruction | linkify\">\n </mat-hint>\n </mat-form-field>\n }\n @if (setting.interfaceType===SettingInterfaceType.File) {\n <fs-file-picker\n [allowRemove]=\"true\"\n [allowDownload]=\"true\"\n (select)=\"selectFile(setting, $event.file)\"\n (remove)=\"removeFile(setting)\"\n [url]=\"setting.value\">\n <div fsFileLabel>\n {{ setting.label }}\n @if (setting.instructions) {\n <button\n type=\"button\"\n mat-icon-button\n matTooltip=\"Setup instructions\"\n (click)=\"openInstructions(setting)\">\n <mat-icon>\n help_outline\n </mat-icon>\n </button>\n }\n </div>\n <div\n fsFileHint\n [innerHTML]=\"setting.instruction | linkify\">\n </div>\n </fs-file-picker>\n }\n </div>\n }\n <button\n mat-stroked-button\n color=\"primary\"\n type=\"button\"\n (click)=\"saveGroup(group)\">\n Save\n </button>\n </mat-expansion-panel>\n }\n</mat-accordion>", styles: [".mat-expansion-panel-header{font-size:19px}.full-width{width:100%}.title-row{flex-direction:row;box-sizing:border-box;display:flex;place-content:center flex-start;align-items:center;width:100%}.title-row .title{display:flex;flex:1}:host ::ng-deep .mat-expansion-panel-header-title{margin:0}:host ::ng-deep .mat-expansion-panel .actions{display:none}:host ::ng-deep .mat-expansion-panel.mat-expanded .actions{display:block}:host ::ng-deep .setting.has-instruction fs-file-picker fs-label-message{display:block;padding-bottom:1em}\n"] }]
1821
1917
  }], propDecorators: { loadSettings: [{
1822
1918
  type: Input
1823
1919
  }], save: [{
1824
1920
  type: Input
1825
- }], fileRemove: [{
1826
- type: Output
1827
- }], fileSelect: [{
1828
- type: Output
1921
+ }], fileUpload: [{
1922
+ type: Input
1923
+ }], fileDelete: [{
1924
+ type: Input
1829
1925
  }] } });
1830
1926
 
1831
1927
  class UpgradeLogsComponent {
1928
+ _api = inject(FsApi);
1832
1929
  list;
1930
+ /**
1931
+ * Optional override. Left unset, the component reads the framework's own
1932
+ * system/logs/upgrade endpoint.
1933
+ */
1833
1934
  loadUpgradeLogs;
1834
1935
  config = null;
1835
1936
  logTypes = [];
@@ -1847,11 +1948,16 @@ class UpgradeLogsComponent {
1847
1948
  },
1848
1949
  ],
1849
1950
  fetch: (query) => {
1850
- return this.loadUpgradeLogs(query)
1851
- .pipe(map((response) => ({ data: response.data, paging: response.paging })));
1951
+ return this._upgradeLogsGet(query);
1852
1952
  },
1853
1953
  };
1854
1954
  }
1955
+ _upgradeLogsGet(query) {
1956
+ return this.loadUpgradeLogs
1957
+ ? this.loadUpgradeLogs(query)
1958
+ : this._api.get('system/logs/upgrade', query, { key: null })
1959
+ .pipe(map((response) => ({ data: response.upgrades, paging: response.paging })));
1960
+ }
1855
1961
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: UpgradeLogsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1856
1962
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: UpgradeLogsComponent, isStandalone: true, selector: "fs-system-upgrade-logs", inputs: { loadUpgradeLogs: "loadUpgradeLogs" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\r\n <fs-list-column>\r\n <ng-template fs-list-header>Name</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n {{row.name}}\r\n </ng-template>\r\n </fs-list-column>\r\n\r\n <fs-list-column>\r\n <ng-template fs-list-header>Function</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n {{row.function}}()\r\n </ng-template>\r\n </fs-list-column>\r\n\r\n <fs-list-column>\r\n <ng-template fs-list-header>Date</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\r\n </ng-template>\r\n </fs-list-column>\r\n</fs-list>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FsListModule }, { kind: "component", type: i1$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i1$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customizable", "sortable", "sortableDefault", "sortableDirection", "direction", "align", "width", "class"] }, { kind: "directive", type: i1$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "directive", type: i1$1.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { kind: "ngmodule", type: FsDateModule }, { kind: "component", type: i4.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1857
1963
  }