@dataclouder/ngx-core 0.1.21 → 0.1.23
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/fesm2022/dataclouder-ngx-core.mjs +1111 -50
- package/fesm2022/dataclouder-ngx-core.mjs.map +1 -1
- package/lib/components/base-list/entity-base-list.component.d.ts +29 -0
- package/lib/components/forms/dc-auditable-viewer.component.d.ts +7 -0
- package/lib/components/forms/dc-extensions-viewer.component.d.ts +7 -0
- package/lib/components/forms/dc-learnable-viewer.component.d.ts +7 -0
- package/lib/components/forms/dc-manageable-viewer.component.d.ts +7 -0
- package/lib/components/forms/dc-reactions-viewer.component.d.ts +7 -0
- package/lib/components/quick-table/quick-table.d.ts +3 -2
- package/lib/models/extension.model.d.ts +29 -0
- package/lib/models/languages.model.d.ts +10 -0
- package/lib/models/pagination.abstract.d.ts +2 -2
- package/lib/services/entity-cominication.service.d.ts +17 -0
- package/package.json +1 -1
- package/public-api.d.ts +9 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, Input, Component, output, ChangeDetectionStrategy, inject, HostListener, ChangeDetectorRef, Injectable, Pipe, signal, effect, ViewChild,
|
|
2
|
+
import { input, Input, Component, output, ChangeDetectionStrategy, inject, HostListener, ChangeDetectorRef, Injectable, Pipe, signal, effect, ViewChild, Directive, InjectionToken, Optional, Inject } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { FormsModule } from '@angular/forms';
|
|
5
5
|
import * as i1$1 from 'primeng/button';
|
|
@@ -32,9 +32,15 @@ import { TableModule } from 'primeng/table';
|
|
|
32
32
|
import { get } from 'lodash';
|
|
33
33
|
import * as i5$1 from 'primeng/tag';
|
|
34
34
|
import { TagModule } from 'primeng/tag';
|
|
35
|
-
import
|
|
35
|
+
import * as i1$2 from '@angular/common';
|
|
36
36
|
import { CommonModule } from '@angular/common';
|
|
37
|
-
import * as
|
|
37
|
+
import * as i2$2 from 'primeng/fieldset';
|
|
38
|
+
import { FieldsetModule } from 'primeng/fieldset';
|
|
39
|
+
import * as i4$2 from 'primeng/chip';
|
|
40
|
+
import { ChipModule } from 'primeng/chip';
|
|
41
|
+
import { AvatarModule } from 'primeng/avatar';
|
|
42
|
+
import { firstValueFrom, tap, catchError, lastValueFrom, throwError } from 'rxjs';
|
|
43
|
+
import * as i4$3 from 'primeng/textarea';
|
|
38
44
|
import { TextareaModule } from 'primeng/textarea';
|
|
39
45
|
import { HttpClient } from '@angular/common/http';
|
|
40
46
|
|
|
@@ -446,7 +452,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
|
|
|
446
452
|
class GetPathPipe {
|
|
447
453
|
transform(obj, column) {
|
|
448
454
|
const value = get(obj, column.field, 'No disponible');
|
|
449
|
-
//
|
|
455
|
+
//
|
|
450
456
|
if (column.type === 'text') {
|
|
451
457
|
return value.length > 80 ? value.substring(0, 80) + '...' : value;
|
|
452
458
|
}
|
|
@@ -469,13 +475,13 @@ class QuickTableComponent {
|
|
|
469
475
|
this.columns = input([]);
|
|
470
476
|
this.tableData = input([]); // This is the backup data
|
|
471
477
|
// Default action is only select
|
|
472
|
-
|
|
473
|
-
this.actions = [];
|
|
478
|
+
this.actions = input([]);
|
|
474
479
|
// Outputs
|
|
475
480
|
this.onAction = output();
|
|
476
481
|
// Signals States
|
|
477
482
|
this._columns = signal([]);
|
|
478
483
|
this._tableData = signal([]);
|
|
484
|
+
this._actions = signal([]);
|
|
479
485
|
this.filters = signal({});
|
|
480
486
|
this.globalFilterFields = signal([]);
|
|
481
487
|
this.tableColumns = [];
|
|
@@ -485,10 +491,13 @@ class QuickTableComponent {
|
|
|
485
491
|
this._tableData.set(this.tableData());
|
|
486
492
|
this.initializeFilters();
|
|
487
493
|
}
|
|
488
|
-
if (
|
|
489
|
-
this.actions
|
|
494
|
+
if (this.actions()?.length > 0) {
|
|
495
|
+
this._actions.set(this.actions());
|
|
490
496
|
}
|
|
491
|
-
|
|
497
|
+
else {
|
|
498
|
+
this._actions.set([{ title: 'select', label: 'Select', icon: 'pi pi-check', severity: 'primary' }]);
|
|
499
|
+
}
|
|
500
|
+
console.log('QuickTableComponent actions', this._actions());
|
|
492
501
|
});
|
|
493
502
|
}
|
|
494
503
|
initializeTableColumns() {
|
|
@@ -585,7 +594,7 @@ class QuickTableComponent {
|
|
|
585
594
|
}
|
|
586
595
|
}
|
|
587
596
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: QuickTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
588
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.4", type: QuickTableComponent, isStandalone: true, selector: "app-quick-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, tableData: { classPropertyName: "tableData", publicName: "tableData", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal:
|
|
597
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.4", type: QuickTableComponent, isStandalone: true, selector: "app-quick-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, tableData: { classPropertyName: "tableData", publicName: "tableData", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, viewQueries: [{ propertyName: "tableRef", first: true, predicate: ["tableRef"], descendants: true }], ngImport: i0, template: "<p-table\n [tableStyle]=\"{ 'min-width': '20rem' }\"\n #tableRef\n [value]=\"_tableData()\"\n [columns]=\"_columns()\"\n [globalFilterFields]=\"globalFilterFields()\"\n [filters]=\"filters()\"\n (onFilter)=\"onFilterLocal($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"flex justify-content-between align-items-center\">\n <h5 class=\"m-0\">Table Data</h5>\n <span class=\"p-input-icon-left\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onGlobalFilter($event)\" placeholder=\"Search keyword\" />\n </span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n @for (column of columns; track column) {\n <th [pSortableColumn]=\"column.field\">{{ column.header }} <p-sortIcon [field]=\"column.field\"></p-sortIcon></th>\n }\n </tr>\n <tr>\n @for (column of columns; track column) { @if(column.type === 'tags') {\n <th>\n <p-multiselect\n [options]=\"filters()?.[column.field]?.['options']\"\n placeholder=\"Selecciona\"\n (onChange)=\"filterOutsideTable('tags', column.field, $event.value)\"\n [style]=\"{ minWidth: '14rem' }\"\n [panelStyle]=\"{ minWidth: '16rem' }\">\n <ng-template let-option #item>\n <div class=\"flex items-center gap-2\">\n <span>{{ option }}</span>\n </div>\n </ng-template>\n </p-multiselect>\n </th>\n\n } @else {\n <th>\n <p-columnFilter [type]=\"getFilterType(column)\" [field]=\"column.field\" placeholder=\"Search\" [showMenu]=\"false\"></p-columnFilter>\n </th>\n } }\n </tr>\n </ng-template>\n <!-- @if(tableData()){ -->\n <ng-template pTemplate=\"body\" let-item let-columns=\"columns\">\n <tr>\n @for (column of columns; track column) {\n <td>\n @if(column.type === 'image'){\n <div class=\"image-container\">\n <img [src]=\"item | getPath: column\" alt=\"Image\" class=\"image\" />\n </div>\n } @else if(column.type === 'tags') {\n <div class=\"tags-container\">\n @for (tag of item[column.field]; track tag) {\n <p-tag [rounded]=\"true\" [value]=\"tag\"></p-tag>\n }\n </div>\n } @else if(column.type === 'actions') {\n <div style=\"display: flex; gap: 2px\">\n @for (actionBtn of _actions(); track actionBtn) {\n <p-button (click)=\"selectItem(item, actionBtn)\" [icon]=\"actionBtn.icon\" [severity]=\"actionBtn['severity']\" />\n }\n </div>\n } @else {\n <span>{{ item | getPath: column}} </span>\n }\n </td>\n }\n </tr>\n </ng-template>\n <!-- } -->\n</p-table>\n", styles: [":host{display:block;height:100%;overflow:auto}.generic-list-container{display:flex;flex-direction:column;height:100%}.generic-list-content{margin-top:10px;flex:1;overflow-y:auto;padding-bottom:10px}.card-source{margin-bottom:10px;position:relative}.paginator-container{margin-top:auto;padding-top:10px}.image-container{width:50px;height:50px;border-radius:50%;overflow:hidden;display:flex;justify-content:center;align-items:center}.image-container img{width:100%;height:100%;object-fit:cover}\n"], dependencies: [{ kind: "ngmodule", type: CardModule }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: SpeedDialModule }, { kind: "ngmodule", type: PaginatorModule }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i3$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i3$2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i3$2.ColumnFilter, selector: "p-columnFilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping", "showButtons", "ariaLabel", "filterButtonProps"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: RouterModule }, { kind: "pipe", type: GetPathPipe, name: "getPath" }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i5$1.Tag, selector: "p-tag", inputs: ["style", "styleClass", "severity", "value", "icon", "rounded"] }, { kind: "ngmodule", type: SelectModule }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i6.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "fluid", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "size", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
589
598
|
}
|
|
590
599
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: QuickTableComponent, decorators: [{
|
|
591
600
|
type: Component,
|
|
@@ -601,46 +610,188 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
|
|
|
601
610
|
TagModule,
|
|
602
611
|
SelectModule,
|
|
603
612
|
MultiSelectModule,
|
|
604
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<p-table\n [tableStyle]=\"{ 'min-width': '20rem' }\"\n #tableRef\n [value]=\"_tableData()\"\n [columns]=\"_columns()\"\n [globalFilterFields]=\"globalFilterFields()\"\n [filters]=\"filters()\"\n (onFilter)=\"onFilterLocal($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"flex justify-content-between align-items-center\">\n <h5 class=\"m-0\">Table Data</h5>\n <span class=\"p-input-icon-left\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onGlobalFilter($event)\" placeholder=\"Search keyword\" />\n </span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n @for (column of columns; track column) {\n <th [pSortableColumn]=\"column.field\">{{ column.header }} <p-sortIcon [field]=\"column.field\"></p-sortIcon></th>\n }\n </tr>\n <tr>\n @for (column of columns; track column) { @if(column.type === 'tags') {\n <th>\n <p-multiselect\n [options]=\"filters()?.[column.field]?.['options']\"\n placeholder=\"Selecciona\"\n (onChange)=\"filterOutsideTable('tags', column.field, $event.value)\"\n [style]=\"{ minWidth: '14rem' }\"\n [panelStyle]=\"{ minWidth: '16rem' }\">\n <ng-template let-option #item>\n <div class=\"flex items-center gap-2\">\n <span>{{ option }}</span>\n </div>\n </ng-template>\n </p-multiselect>\n </th>\n\n } @else {\n <th>\n <p-columnFilter [type]=\"getFilterType(column)\" [field]=\"column.field\" placeholder=\"Search\" [showMenu]=\"false\"></p-columnFilter>\n </th>\n } }\n </tr>\n </ng-template>\n <!-- @if(tableData()){ -->\n <ng-template pTemplate=\"body\" let-item let-columns=\"columns\">\n <tr>\n @for (column of columns; track column) {\n <td>\n @if(column.type === 'image'){\n <div class=\"image-container\">\n <img [src]=\"item | getPath: column\" alt=\"Image\" class=\"image\" />\n </div>\n } @else if(column.type === 'tags') {\n <div class=\"tags-container\">\n @for (tag of item[column.field]; track tag) {\n <p-tag [rounded]=\"true\" [value]=\"tag\"></p-tag>\n }\n </div>\n } @else if(column.type === 'actions') {\n <div style=\"display: flex; gap: 2px\">\n @for (actionBtn of
|
|
605
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
606
|
-
type: Input
|
|
607
|
-
}], tableRef: [{
|
|
613
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<p-table\n [tableStyle]=\"{ 'min-width': '20rem' }\"\n #tableRef\n [value]=\"_tableData()\"\n [columns]=\"_columns()\"\n [globalFilterFields]=\"globalFilterFields()\"\n [filters]=\"filters()\"\n (onFilter)=\"onFilterLocal($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"flex justify-content-between align-items-center\">\n <h5 class=\"m-0\">Table Data</h5>\n <span class=\"p-input-icon-left\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onGlobalFilter($event)\" placeholder=\"Search keyword\" />\n </span>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n @for (column of columns; track column) {\n <th [pSortableColumn]=\"column.field\">{{ column.header }} <p-sortIcon [field]=\"column.field\"></p-sortIcon></th>\n }\n </tr>\n <tr>\n @for (column of columns; track column) { @if(column.type === 'tags') {\n <th>\n <p-multiselect\n [options]=\"filters()?.[column.field]?.['options']\"\n placeholder=\"Selecciona\"\n (onChange)=\"filterOutsideTable('tags', column.field, $event.value)\"\n [style]=\"{ minWidth: '14rem' }\"\n [panelStyle]=\"{ minWidth: '16rem' }\">\n <ng-template let-option #item>\n <div class=\"flex items-center gap-2\">\n <span>{{ option }}</span>\n </div>\n </ng-template>\n </p-multiselect>\n </th>\n\n } @else {\n <th>\n <p-columnFilter [type]=\"getFilterType(column)\" [field]=\"column.field\" placeholder=\"Search\" [showMenu]=\"false\"></p-columnFilter>\n </th>\n } }\n </tr>\n </ng-template>\n <!-- @if(tableData()){ -->\n <ng-template pTemplate=\"body\" let-item let-columns=\"columns\">\n <tr>\n @for (column of columns; track column) {\n <td>\n @if(column.type === 'image'){\n <div class=\"image-container\">\n <img [src]=\"item | getPath: column\" alt=\"Image\" class=\"image\" />\n </div>\n } @else if(column.type === 'tags') {\n <div class=\"tags-container\">\n @for (tag of item[column.field]; track tag) {\n <p-tag [rounded]=\"true\" [value]=\"tag\"></p-tag>\n }\n </div>\n } @else if(column.type === 'actions') {\n <div style=\"display: flex; gap: 2px\">\n @for (actionBtn of _actions(); track actionBtn) {\n <p-button (click)=\"selectItem(item, actionBtn)\" [icon]=\"actionBtn.icon\" [severity]=\"actionBtn['severity']\" />\n }\n </div>\n } @else {\n <span>{{ item | getPath: column}} </span>\n }\n </td>\n }\n </tr>\n </ng-template>\n <!-- } -->\n</p-table>\n", styles: [":host{display:block;height:100%;overflow:auto}.generic-list-container{display:flex;flex-direction:column;height:100%}.generic-list-content{margin-top:10px;flex:1;overflow-y:auto;padding-bottom:10px}.card-source{margin-bottom:10px;position:relative}.paginator-container{margin-top:auto;padding-top:10px}.image-container{width:50px;height:50px;border-radius:50%;overflow:hidden;display:flex;justify-content:center;align-items:center}.image-container img{width:100%;height:100%;object-fit:cover}\n"] }]
|
|
614
|
+
}], ctorParameters: () => [], propDecorators: { tableRef: [{
|
|
608
615
|
type: ViewChild,
|
|
609
616
|
args: ['tableRef']
|
|
610
617
|
}] } });
|
|
611
618
|
|
|
612
|
-
|
|
613
|
-
|
|
619
|
+
class DcAuditableViewerComponent {
|
|
620
|
+
constructor() {
|
|
621
|
+
this.data = input.required();
|
|
622
|
+
}
|
|
623
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: DcAuditableViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
624
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.4", type: DcAuditableViewerComponent, isStandalone: true, selector: "dc-auditable-viewer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
625
|
+
@if (data(); as audit) {
|
|
626
|
+
<p-fieldset legend="Audit Information" [toggleable]="true" [collapsed]="true">
|
|
627
|
+
<div class="grid text-sm">
|
|
628
|
+
<div class="col-12 md:col-6 flex flex-column gap-2">
|
|
629
|
+
<label class="font-semibold">Author</label>
|
|
630
|
+
<p-chip [label]="audit.authorEmail" [image]="'https://i.pravatar.cc/40?u=' + audit.createdBy" />
|
|
631
|
+
</div>
|
|
632
|
+
|
|
633
|
+
<div class="col-12 md:col-6 flex flex-column gap-2">
|
|
634
|
+
<label class="font-semibold">Last update by</label>
|
|
635
|
+
<p-chip [label]="audit.updatedBy" [image]="'https://i.pravatar.cc/40?u=' + audit.updatedBy" />
|
|
636
|
+
</div>
|
|
637
|
+
|
|
638
|
+
<div class="col-12 md:col-6 flex flex-column gap-2">
|
|
639
|
+
<label class="font-semibold">Creation date</label>
|
|
640
|
+
<span>{{ audit.createdAt | date : 'medium' }}</span>
|
|
641
|
+
</div>
|
|
642
|
+
|
|
643
|
+
<div class="col-12 md:col-6 flex flex-column gap-2">
|
|
644
|
+
<label class="font-semibold">Last update date</label>
|
|
645
|
+
<span>{{ audit.updatedAt | date : 'medium' }}</span>
|
|
646
|
+
</div>
|
|
647
|
+
|
|
648
|
+
@if(audit.generatedByIA) {
|
|
649
|
+
<div class="col-12 mt-2">
|
|
650
|
+
<p-tag severity="info">
|
|
651
|
+
<div class="flex align-items-center gap-2">
|
|
652
|
+
<i class="pi pi-sparkles"></i>
|
|
653
|
+
<span>Generated by AI</span>
|
|
654
|
+
</div>
|
|
655
|
+
</p-tag>
|
|
656
|
+
</div>
|
|
657
|
+
@if(audit.prompt) {
|
|
658
|
+
<div class="col-12 mt-2">
|
|
659
|
+
<div class="flex flex-column gap-2">
|
|
660
|
+
<label class="font-semibold">Prompt</label>
|
|
661
|
+
<p class="m-0 surface-100 p-2 border-round" style="white-space: pre-wrap;">
|
|
662
|
+
{{ audit.prompt }}
|
|
663
|
+
</p>
|
|
664
|
+
</div>
|
|
665
|
+
</div>
|
|
666
|
+
} }
|
|
667
|
+
</div>
|
|
668
|
+
</p-fieldset>
|
|
669
|
+
}
|
|
670
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }, { kind: "ngmodule", type: FieldsetModule }, { kind: "component", type: i2$2.Fieldset, selector: "p-fieldset", inputs: ["legend", "toggleable", "collapsed", "style", "styleClass", "transitionOptions"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i5$1.Tag, selector: "p-tag", inputs: ["style", "styleClass", "severity", "value", "icon", "rounded"] }, { kind: "ngmodule", type: ChipModule }, { kind: "component", type: i4$2.Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "style", "styleClass", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "ngmodule", type: AvatarModule }] }); }
|
|
614
671
|
}
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
]
|
|
672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: DcAuditableViewerComponent, decorators: [{
|
|
673
|
+
type: Component,
|
|
674
|
+
args: [{
|
|
675
|
+
selector: 'dc-auditable-viewer',
|
|
676
|
+
template: `
|
|
677
|
+
@if (data(); as audit) {
|
|
678
|
+
<p-fieldset legend="Audit Information" [toggleable]="true" [collapsed]="true">
|
|
679
|
+
<div class="grid text-sm">
|
|
680
|
+
<div class="col-12 md:col-6 flex flex-column gap-2">
|
|
681
|
+
<label class="font-semibold">Author</label>
|
|
682
|
+
<p-chip [label]="audit.authorEmail" [image]="'https://i.pravatar.cc/40?u=' + audit.createdBy" />
|
|
683
|
+
</div>
|
|
684
|
+
|
|
685
|
+
<div class="col-12 md:col-6 flex flex-column gap-2">
|
|
686
|
+
<label class="font-semibold">Last update by</label>
|
|
687
|
+
<p-chip [label]="audit.updatedBy" [image]="'https://i.pravatar.cc/40?u=' + audit.updatedBy" />
|
|
688
|
+
</div>
|
|
689
|
+
|
|
690
|
+
<div class="col-12 md:col-6 flex flex-column gap-2">
|
|
691
|
+
<label class="font-semibold">Creation date</label>
|
|
692
|
+
<span>{{ audit.createdAt | date : 'medium' }}</span>
|
|
693
|
+
</div>
|
|
694
|
+
|
|
695
|
+
<div class="col-12 md:col-6 flex flex-column gap-2">
|
|
696
|
+
<label class="font-semibold">Last update date</label>
|
|
697
|
+
<span>{{ audit.updatedAt | date : 'medium' }}</span>
|
|
698
|
+
</div>
|
|
699
|
+
|
|
700
|
+
@if(audit.generatedByIA) {
|
|
701
|
+
<div class="col-12 mt-2">
|
|
702
|
+
<p-tag severity="info">
|
|
703
|
+
<div class="flex align-items-center gap-2">
|
|
704
|
+
<i class="pi pi-sparkles"></i>
|
|
705
|
+
<span>Generated by AI</span>
|
|
706
|
+
</div>
|
|
707
|
+
</p-tag>
|
|
708
|
+
</div>
|
|
709
|
+
@if(audit.prompt) {
|
|
710
|
+
<div class="col-12 mt-2">
|
|
711
|
+
<div class="flex flex-column gap-2">
|
|
712
|
+
<label class="font-semibold">Prompt</label>
|
|
713
|
+
<p class="m-0 surface-100 p-2 border-round" style="white-space: pre-wrap;">
|
|
714
|
+
{{ audit.prompt }}
|
|
715
|
+
</p>
|
|
716
|
+
</div>
|
|
717
|
+
</div>
|
|
718
|
+
} }
|
|
719
|
+
</div>
|
|
720
|
+
</p-fieldset>
|
|
721
|
+
}
|
|
722
|
+
`,
|
|
723
|
+
standalone: true,
|
|
724
|
+
imports: [CommonModule, FieldsetModule, TagModule, ChipModule, AvatarModule],
|
|
725
|
+
}]
|
|
726
|
+
}] });
|
|
727
|
+
|
|
728
|
+
class DcExtensionsViewerComponent {
|
|
729
|
+
constructor() {
|
|
730
|
+
this.data = input.required();
|
|
731
|
+
}
|
|
732
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: DcExtensionsViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
733
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.4", type: DcExtensionsViewerComponent, isStandalone: true, selector: "dc-extensions-viewer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<pre>{{ data() | json }}</pre>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.JsonPipe, name: "json" }] }); }
|
|
622
734
|
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
[
|
|
638
|
-
};
|
|
639
|
-
class IAIModel {
|
|
735
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: DcExtensionsViewerComponent, decorators: [{
|
|
736
|
+
type: Component,
|
|
737
|
+
args: [{
|
|
738
|
+
selector: 'dc-extensions-viewer',
|
|
739
|
+
template: `<pre>{{ data() | json }}</pre>`,
|
|
740
|
+
standalone: true,
|
|
741
|
+
imports: [CommonModule],
|
|
742
|
+
}]
|
|
743
|
+
}] });
|
|
744
|
+
|
|
745
|
+
class DcLearnableViewerComponent {
|
|
746
|
+
constructor() {
|
|
747
|
+
this.data = input.required();
|
|
748
|
+
}
|
|
749
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: DcLearnableViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
750
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.4", type: DcLearnableViewerComponent, isStandalone: true, selector: "dc-learnable-viewer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<pre>{{ data() | json }}</pre>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.JsonPipe, name: "json" }] }); }
|
|
640
751
|
}
|
|
641
|
-
|
|
642
|
-
|
|
752
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: DcLearnableViewerComponent, decorators: [{
|
|
753
|
+
type: Component,
|
|
754
|
+
args: [{
|
|
755
|
+
selector: 'dc-learnable-viewer',
|
|
756
|
+
template: `<pre>{{ data() | json }}</pre>`,
|
|
757
|
+
standalone: true,
|
|
758
|
+
imports: [CommonModule],
|
|
759
|
+
}]
|
|
760
|
+
}] });
|
|
761
|
+
|
|
762
|
+
class DcManageableViewerComponent {
|
|
763
|
+
constructor() {
|
|
764
|
+
this.data = input.required();
|
|
765
|
+
}
|
|
766
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: DcManageableViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
767
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.4", type: DcManageableViewerComponent, isStandalone: true, selector: "dc-manageable-viewer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<pre>{{ data() | json }}</pre>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.JsonPipe, name: "json" }] }); }
|
|
643
768
|
}
|
|
769
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: DcManageableViewerComponent, decorators: [{
|
|
770
|
+
type: Component,
|
|
771
|
+
args: [{
|
|
772
|
+
selector: 'dc-manageable-viewer',
|
|
773
|
+
template: `<pre>{{ data() | json }}</pre>`,
|
|
774
|
+
standalone: true,
|
|
775
|
+
imports: [CommonModule],
|
|
776
|
+
}]
|
|
777
|
+
}] });
|
|
778
|
+
|
|
779
|
+
class DcReactionsViewerComponent {
|
|
780
|
+
constructor() {
|
|
781
|
+
this.data = input.required();
|
|
782
|
+
}
|
|
783
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: DcReactionsViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
784
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.4", type: DcReactionsViewerComponent, isStandalone: true, selector: "dc-reactions-viewer", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<pre>{{ data() | json }}</pre>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.JsonPipe, name: "json" }] }); }
|
|
785
|
+
}
|
|
786
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: DcReactionsViewerComponent, decorators: [{
|
|
787
|
+
type: Component,
|
|
788
|
+
args: [{
|
|
789
|
+
selector: 'dc-reactions-viewer',
|
|
790
|
+
template: `<pre>{{ data() | json }}</pre>`,
|
|
791
|
+
standalone: true,
|
|
792
|
+
imports: [CommonModule],
|
|
793
|
+
}]
|
|
794
|
+
}] });
|
|
644
795
|
|
|
645
796
|
/**
|
|
646
797
|
* Abstract base class for implementing pagination functionality.
|
|
@@ -665,9 +816,9 @@ class PaginationBase {
|
|
|
665
816
|
*/
|
|
666
817
|
this.onAction = output();
|
|
667
818
|
/** Current first record index for the paginator */
|
|
668
|
-
this.
|
|
819
|
+
this.first = 0;
|
|
669
820
|
/** Number of rows to display per page */
|
|
670
|
-
this.
|
|
821
|
+
this.rows = 10;
|
|
671
822
|
/** Total number of records available */
|
|
672
823
|
this.totalRecords = 0;
|
|
673
824
|
/** Current view mode, either cards or table */
|
|
@@ -680,7 +831,7 @@ class PaginationBase {
|
|
|
680
831
|
* Configuration for filtering, sorting, and pagination.
|
|
681
832
|
* Includes current page, rows per page, sorting criteria, and applied filters.
|
|
682
833
|
*/
|
|
683
|
-
this.filterConfig = { page: 0, rowsPerPage: this.
|
|
834
|
+
this.filterConfig = { page: 0, rowsPerPage: this.rows, sort: { _id: -1 }, filters: {} };
|
|
684
835
|
this.route = inject(ActivatedRoute);
|
|
685
836
|
this.router = inject(Router);
|
|
686
837
|
this.initializePagination();
|
|
@@ -694,7 +845,7 @@ class PaginationBase {
|
|
|
694
845
|
const page = this.route.snapshot.queryParamMap.get('page');
|
|
695
846
|
if (page) {
|
|
696
847
|
this.filterConfig.page = +page - 1;
|
|
697
|
-
this.
|
|
848
|
+
this.first = this.filterConfig.page * this.rows;
|
|
698
849
|
}
|
|
699
850
|
}
|
|
700
851
|
/**
|
|
@@ -703,11 +854,11 @@ class PaginationBase {
|
|
|
703
854
|
* @param pageEvent - The page event containing page number and rows per page
|
|
704
855
|
*/
|
|
705
856
|
async onPageChange(pageEvent) {
|
|
706
|
-
this.
|
|
857
|
+
this.rows = pageEvent.rows;
|
|
707
858
|
this.filterConfig = {
|
|
708
859
|
...this.filterConfig,
|
|
709
860
|
page: pageEvent.page,
|
|
710
|
-
rowsPerPage: this.
|
|
861
|
+
rowsPerPage: this.rows,
|
|
711
862
|
};
|
|
712
863
|
await this.loadData();
|
|
713
864
|
this.updatePageParam(pageEvent.page + 1);
|
|
@@ -740,6 +891,126 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
|
|
|
740
891
|
type: Directive
|
|
741
892
|
}], ctorParameters: () => [] });
|
|
742
893
|
|
|
894
|
+
class EntityBaseListComponent extends PaginationBase {
|
|
895
|
+
constructor() {
|
|
896
|
+
super();
|
|
897
|
+
// Services
|
|
898
|
+
this.router = inject(Router);
|
|
899
|
+
this.route = inject(ActivatedRoute);
|
|
900
|
+
// Inputs & Outputs
|
|
901
|
+
this.initialViewType = input('card');
|
|
902
|
+
this.onlyView = input(false);
|
|
903
|
+
// Outputs
|
|
904
|
+
this.onSelect = output();
|
|
905
|
+
// Writable Signals for component state
|
|
906
|
+
this.items = signal([]);
|
|
907
|
+
this.totalRecordsSignal = signal(0);
|
|
908
|
+
// Public properties for configuration
|
|
909
|
+
this.filterBarOptions = { showActions: true, showCreateButton: true, showViewButton: true };
|
|
910
|
+
this.columns = [];
|
|
911
|
+
this.viewType = signal(this.initialViewType());
|
|
912
|
+
effect(() => {
|
|
913
|
+
// Keep the parent's totalRecords in sync with our signal
|
|
914
|
+
this.totalRecords = this.totalRecordsSignal();
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
async ngOnInit() {
|
|
918
|
+
await this.loadData();
|
|
919
|
+
}
|
|
920
|
+
async loadData() {
|
|
921
|
+
try {
|
|
922
|
+
this.isLoading = true;
|
|
923
|
+
const response = await this.entityCommunicationService.query(this.filterConfig);
|
|
924
|
+
this.items.set(response.rows);
|
|
925
|
+
this.totalRecordsSignal.set(response.count);
|
|
926
|
+
}
|
|
927
|
+
catch (error) {
|
|
928
|
+
console.error('Error loading data', error);
|
|
929
|
+
}
|
|
930
|
+
finally {
|
|
931
|
+
this.isLoading = false;
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
onNew() {
|
|
935
|
+
this.router.navigate(['./edit'], { relativeTo: this.route });
|
|
936
|
+
}
|
|
937
|
+
toggleView() {
|
|
938
|
+
this.viewType.update((v) => (v === 'card' ? 'table' : 'card'));
|
|
939
|
+
}
|
|
940
|
+
async doAction(actionEvent) {
|
|
941
|
+
const { item, action } = actionEvent;
|
|
942
|
+
if (!item) {
|
|
943
|
+
return;
|
|
944
|
+
}
|
|
945
|
+
switch (action) {
|
|
946
|
+
case 'view':
|
|
947
|
+
this.router.navigate(['./details', item._id], { relativeTo: this.route });
|
|
948
|
+
break;
|
|
949
|
+
case 'edit':
|
|
950
|
+
this.router.navigate(['./edit', item._id], { relativeTo: this.route });
|
|
951
|
+
break;
|
|
952
|
+
case 'delete':
|
|
953
|
+
const confirmed = confirm(`Are you sure you want to delete this item?`);
|
|
954
|
+
if (confirmed) {
|
|
955
|
+
try {
|
|
956
|
+
await this.entityCommunicationService.remove(item._id);
|
|
957
|
+
}
|
|
958
|
+
catch (error) {
|
|
959
|
+
console.error('Error deleting item', error);
|
|
960
|
+
}
|
|
961
|
+
finally {
|
|
962
|
+
await this.loadData(); // Refresh list
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
break;
|
|
966
|
+
case 'clone':
|
|
967
|
+
await this.entityCommunicationService.clone(item._id);
|
|
968
|
+
await this.loadData(); // Refresh list
|
|
969
|
+
break;
|
|
970
|
+
default:
|
|
971
|
+
// this.handleCustomAction(actionEvent);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: EntityBaseListComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
975
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.4", type: EntityBaseListComponent, isStandalone: true, inputs: { initialViewType: { classPropertyName: "initialViewType", publicName: "initialViewType", isSignal: true, isRequired: false, transformFunction: null }, onlyView: { classPropertyName: "onlyView", publicName: "onlyView", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelect: "onSelect" }, usesInheritance: true, ngImport: i0 }); }
|
|
976
|
+
}
|
|
977
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: EntityBaseListComponent, decorators: [{
|
|
978
|
+
type: Directive
|
|
979
|
+
}], ctorParameters: () => [] });
|
|
980
|
+
|
|
981
|
+
const TOAST_ALERTS_TOKEN = new InjectionToken('Toast alerts Service');
|
|
982
|
+
class ToastAlertsAbstractService {
|
|
983
|
+
}
|
|
984
|
+
function provideToastAlert(serviceImplementation) {
|
|
985
|
+
return [
|
|
986
|
+
{
|
|
987
|
+
provide: TOAST_ALERTS_TOKEN,
|
|
988
|
+
useExisting: serviceImplementation,
|
|
989
|
+
},
|
|
990
|
+
];
|
|
991
|
+
}
|
|
992
|
+
// @deprecated, moved to ngx-tts
|
|
993
|
+
var AudioSpeed;
|
|
994
|
+
(function (AudioSpeed) {
|
|
995
|
+
AudioSpeed["VerySlow"] = "verySlow";
|
|
996
|
+
AudioSpeed["Slow"] = "slow";
|
|
997
|
+
AudioSpeed["Regular"] = "regular";
|
|
998
|
+
AudioSpeed["Fast"] = "fast";
|
|
999
|
+
AudioSpeed["VeryFast"] = "veryFast";
|
|
1000
|
+
})(AudioSpeed || (AudioSpeed = {}));
|
|
1001
|
+
const AudioSpeedReverse = {
|
|
1002
|
+
[AudioSpeed.VerySlow]: 1,
|
|
1003
|
+
[AudioSpeed.Slow]: 2,
|
|
1004
|
+
[AudioSpeed.Regular]: 3,
|
|
1005
|
+
[AudioSpeed.Fast]: 4,
|
|
1006
|
+
[AudioSpeed.VeryFast]: 5,
|
|
1007
|
+
};
|
|
1008
|
+
class IAIModel {
|
|
1009
|
+
}
|
|
1010
|
+
// Since it not clear if this bellows to chat AI Or user i put here.
|
|
1011
|
+
class ChatUserSettings {
|
|
1012
|
+
}
|
|
1013
|
+
|
|
743
1014
|
var EModelQuality;
|
|
744
1015
|
(function (EModelQuality) {
|
|
745
1016
|
EModelQuality["FAST"] = "fast";
|
|
@@ -825,6 +1096,14 @@ function formatCamelCaseString(input) {
|
|
|
825
1096
|
.join(' ');
|
|
826
1097
|
}
|
|
827
1098
|
|
|
1099
|
+
// Entity extension that add extra features to the entity
|
|
1100
|
+
// * Auditable: Ability to track who created and updated the entity
|
|
1101
|
+
// * Learnable: Ability to track who created and updated the entity
|
|
1102
|
+
// * IManageable: Ability to say is the entity is public or private, or published or draft
|
|
1103
|
+
// * IReactable: Ability to give likes, dislikes, etc. hearts etc.
|
|
1104
|
+
// * Extensionable: Ability to add extra features to the entity
|
|
1105
|
+
// * ❗️ PENDING IMediable: this add media songs and videos and more only thinking for lessons or content interactions.
|
|
1106
|
+
|
|
828
1107
|
class ConfirmService {
|
|
829
1108
|
constructor() {
|
|
830
1109
|
this.pdialogService = inject(DialogService);
|
|
@@ -892,7 +1171,7 @@ class PromptComponent {
|
|
|
892
1171
|
this.ref.close(null);
|
|
893
1172
|
}
|
|
894
1173
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: PromptComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
895
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: PromptComponent, isStandalone: true, selector: "dc-prompt", ngImport: i0, template: "<div class=\"form-input-card p-4\">\n <p-message severity=\"secondary\"> {{ title() }}</p-message>\n\n <div class=\"my-4\">{{ message() }}</div>\n\n <div class=\"p-field mb-4\">\n <textarea rows=\"5\" cols=\"30\" pTextarea [(ngModel)]=\"inputValue\" class=\"w-full\"></textarea>\n </div>\n\n <div class=\"flex justify-content-end gap-2\">\n <p-button [label]=\"cancelText()\" (click)=\"cancel()\" severity=\"secondary\"></p-button>\n <p-button [label]=\"acceptText()\" (click)=\"accept()\"></p-button>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i2.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i4$
|
|
1174
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: PromptComponent, isStandalone: true, selector: "dc-prompt", ngImport: i0, template: "<div class=\"form-input-card p-4\">\n <p-message severity=\"secondary\"> {{ title() }}</p-message>\n\n <div class=\"my-4\">{{ message() }}</div>\n\n <div class=\"p-field mb-4\">\n <textarea rows=\"5\" cols=\"30\" pTextarea [(ngModel)]=\"inputValue\" class=\"w-full\"></textarea>\n </div>\n\n <div class=\"flex justify-content-end gap-2\">\n <p-button [label]=\"cancelText()\" (click)=\"cancel()\" severity=\"secondary\"></p-button>\n <p-button [label]=\"acceptText()\" (click)=\"accept()\"></p-button>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i2.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i4$3.Textarea, selector: "[pTextarea]", inputs: ["autoResize", "variant", "fluid", "pSize"], outputs: ["onResize"] }] }); }
|
|
896
1175
|
}
|
|
897
1176
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: PromptComponent, decorators: [{
|
|
898
1177
|
type: Component,
|
|
@@ -1413,6 +1692,788 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
|
|
|
1413
1692
|
args: [HTTP_CORE_CONFIG]
|
|
1414
1693
|
}] }] });
|
|
1415
1694
|
|
|
1695
|
+
class EntityCommunicationService {
|
|
1696
|
+
constructor(serviceName) {
|
|
1697
|
+
this.serviceName = serviceName;
|
|
1698
|
+
this.httpService = inject(HttpCoreService);
|
|
1699
|
+
}
|
|
1700
|
+
findAll() {
|
|
1701
|
+
return this.httpService.get(`api/${this.serviceName}`);
|
|
1702
|
+
}
|
|
1703
|
+
findOne(id) {
|
|
1704
|
+
return this.httpService.get(`api/${this.serviceName}/${id}`);
|
|
1705
|
+
}
|
|
1706
|
+
createOrUpdate(entity) {
|
|
1707
|
+
// if Id is present then in object, then Update all props in the object
|
|
1708
|
+
return this.httpService.post(`api/${this.serviceName}`, entity);
|
|
1709
|
+
}
|
|
1710
|
+
query(filterConfig) {
|
|
1711
|
+
return this.httpService.post(`api/${this.serviceName}/query`, filterConfig);
|
|
1712
|
+
}
|
|
1713
|
+
partialUpdate(id, partialUpdates) {
|
|
1714
|
+
// In backend object is flattened, so Convert nested objects to dot notation eg. { "video.captions.remotion": captions.captions }
|
|
1715
|
+
return this.httpService.put(`api/${this.serviceName}/${id}`, partialUpdates);
|
|
1716
|
+
}
|
|
1717
|
+
async remove(id) {
|
|
1718
|
+
await this.httpService.delete(`api/${this.serviceName}/${id}`);
|
|
1719
|
+
}
|
|
1720
|
+
clone(id, overrides = {}) {
|
|
1721
|
+
return this.httpService.post(`api/${this.serviceName}/${id}/clone`, overrides);
|
|
1722
|
+
}
|
|
1723
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: EntityCommunicationService, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1724
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: EntityCommunicationService }); }
|
|
1725
|
+
}
|
|
1726
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: EntityCommunicationService, decorators: [{
|
|
1727
|
+
type: Injectable
|
|
1728
|
+
}], ctorParameters: () => [{ type: undefined }] });
|
|
1729
|
+
|
|
1730
|
+
const LANGUAGES = {
|
|
1731
|
+
en: {
|
|
1732
|
+
nativeName: 'English',
|
|
1733
|
+
flag: '🇺🇸', // Using US flag as a primary example
|
|
1734
|
+
code: 'en',
|
|
1735
|
+
i: 1,
|
|
1736
|
+
llmKnowledge: 100,
|
|
1737
|
+
countries: ['United Kingdom', 'United States', 'Canada', 'Australia', 'New Zealand', 'Ireland', 'South Africa', 'India', 'and many others.'],
|
|
1738
|
+
translations: {
|
|
1739
|
+
en: 'English',
|
|
1740
|
+
es: 'Inglés',
|
|
1741
|
+
},
|
|
1742
|
+
},
|
|
1743
|
+
es: {
|
|
1744
|
+
nativeName: 'Español',
|
|
1745
|
+
flag: '🇪🇸', // Using Spain flag as a primary example
|
|
1746
|
+
code: 'es',
|
|
1747
|
+
i: 2,
|
|
1748
|
+
llmKnowledge: 99,
|
|
1749
|
+
countries: [
|
|
1750
|
+
'Spain',
|
|
1751
|
+
'Mexico',
|
|
1752
|
+
'Argentina',
|
|
1753
|
+
'Colombia',
|
|
1754
|
+
'Peru',
|
|
1755
|
+
'Chile',
|
|
1756
|
+
'Venezuela',
|
|
1757
|
+
'Ecuador',
|
|
1758
|
+
'Guatemala',
|
|
1759
|
+
'Cuba',
|
|
1760
|
+
'Bolivia',
|
|
1761
|
+
'Dominican Republic',
|
|
1762
|
+
'Honduras',
|
|
1763
|
+
'El Salvador',
|
|
1764
|
+
'Nicaragua',
|
|
1765
|
+
'Paraguay',
|
|
1766
|
+
'Costa Rica',
|
|
1767
|
+
'Puerto Rico',
|
|
1768
|
+
'Uruguay',
|
|
1769
|
+
'Equatorial Guinea.',
|
|
1770
|
+
],
|
|
1771
|
+
translations: {
|
|
1772
|
+
en: 'Spanish',
|
|
1773
|
+
es: 'Español',
|
|
1774
|
+
},
|
|
1775
|
+
},
|
|
1776
|
+
de: {
|
|
1777
|
+
nativeName: 'Deutsch',
|
|
1778
|
+
flag: '🇩🇪',
|
|
1779
|
+
code: 'de',
|
|
1780
|
+
i: 3,
|
|
1781
|
+
llmKnowledge: 97,
|
|
1782
|
+
countries: ['Germany', 'Austria', 'Switzerland', 'Belgium', 'Luxembourg', 'Liechtenstein.'],
|
|
1783
|
+
translations: {
|
|
1784
|
+
en: 'German',
|
|
1785
|
+
es: 'Alemán',
|
|
1786
|
+
},
|
|
1787
|
+
},
|
|
1788
|
+
fr: {
|
|
1789
|
+
nativeName: 'Français',
|
|
1790
|
+
flag: '🇫🇷',
|
|
1791
|
+
code: 'fr',
|
|
1792
|
+
i: 4,
|
|
1793
|
+
llmKnowledge: 96,
|
|
1794
|
+
countries: ['France', 'Canada', 'Belgium', 'Switzerland', 'Haiti', 'Ivory Coast', 'Senegal', 'Cameroon', 'Madagascar', 'and many others.'],
|
|
1795
|
+
translations: {
|
|
1796
|
+
en: 'French',
|
|
1797
|
+
es: 'Francés',
|
|
1798
|
+
},
|
|
1799
|
+
},
|
|
1800
|
+
zh: {
|
|
1801
|
+
nativeName: '中文 (Zhōngwén)',
|
|
1802
|
+
flag: '🇨🇳',
|
|
1803
|
+
code: 'zh',
|
|
1804
|
+
i: 5,
|
|
1805
|
+
llmKnowledge: 94,
|
|
1806
|
+
countries: ['China', 'Singapore', 'Taiwan.'],
|
|
1807
|
+
translations: {
|
|
1808
|
+
en: 'Chinese (Mandarin)',
|
|
1809
|
+
es: 'Chino (Mandarín)',
|
|
1810
|
+
},
|
|
1811
|
+
},
|
|
1812
|
+
it: {
|
|
1813
|
+
nativeName: 'Italiano',
|
|
1814
|
+
flag: '🇮🇹',
|
|
1815
|
+
code: 'it',
|
|
1816
|
+
i: 6,
|
|
1817
|
+
llmKnowledge: 93,
|
|
1818
|
+
countries: ['Italy', 'Switzerland', 'San Marino', 'Vatican City.'],
|
|
1819
|
+
translations: {
|
|
1820
|
+
en: 'Italian',
|
|
1821
|
+
es: 'Italiano',
|
|
1822
|
+
},
|
|
1823
|
+
},
|
|
1824
|
+
pt: {
|
|
1825
|
+
nativeName: 'Português',
|
|
1826
|
+
flag: '🇧🇷',
|
|
1827
|
+
code: 'pt',
|
|
1828
|
+
i: 7,
|
|
1829
|
+
llmKnowledge: 92,
|
|
1830
|
+
countries: ['Portugal', 'Brazil', 'Angola', 'Mozambique', 'Cape Verde', 'Guinea-Bissau', 'Sao Tome and Principe', 'East Timor', 'Macau.'],
|
|
1831
|
+
translations: {
|
|
1832
|
+
en: 'Portuguese',
|
|
1833
|
+
es: 'Portugués',
|
|
1834
|
+
},
|
|
1835
|
+
},
|
|
1836
|
+
ja: {
|
|
1837
|
+
nativeName: '日本語 (Nihongo)',
|
|
1838
|
+
flag: '🇯🇵',
|
|
1839
|
+
code: 'ja',
|
|
1840
|
+
i: 8,
|
|
1841
|
+
llmKnowledge: 91,
|
|
1842
|
+
countries: ['Japan.'],
|
|
1843
|
+
translations: {
|
|
1844
|
+
en: 'Japanese',
|
|
1845
|
+
es: 'Japonés',
|
|
1846
|
+
},
|
|
1847
|
+
},
|
|
1848
|
+
nl: {
|
|
1849
|
+
nativeName: 'Nederlands',
|
|
1850
|
+
flag: '🇳🇱',
|
|
1851
|
+
code: 'nl',
|
|
1852
|
+
i: 9,
|
|
1853
|
+
llmKnowledge: 90,
|
|
1854
|
+
countries: ['Netherlands', 'Belgium', 'Suriname', 'Aruba', 'Curaçao', 'Sint Maarten.'],
|
|
1855
|
+
translations: {
|
|
1856
|
+
en: 'Dutch',
|
|
1857
|
+
es: 'Neerlandés',
|
|
1858
|
+
},
|
|
1859
|
+
},
|
|
1860
|
+
ru: {
|
|
1861
|
+
nativeName: 'Русский (Russkiy)',
|
|
1862
|
+
flag: '🇷🇺',
|
|
1863
|
+
code: 'ru',
|
|
1864
|
+
i: 10, // Adjusted index
|
|
1865
|
+
llmKnowledge: 89,
|
|
1866
|
+
countries: ['Russia', 'Belarus', 'Kazakhstan', 'Kyrgyzstan', 'Tajikistan (co-official)', 'Abkhazia', 'South Ossetia', 'Transnistria.'],
|
|
1867
|
+
translations: {
|
|
1868
|
+
en: 'Russian',
|
|
1869
|
+
es: 'Ruso',
|
|
1870
|
+
},
|
|
1871
|
+
},
|
|
1872
|
+
ko: {
|
|
1873
|
+
nativeName: '한국어 (Hangugeo)',
|
|
1874
|
+
flag: '🇰🇷',
|
|
1875
|
+
code: 'ko',
|
|
1876
|
+
i: 11,
|
|
1877
|
+
llmKnowledge: 87,
|
|
1878
|
+
countries: ['South Korea', 'North Korea.'],
|
|
1879
|
+
translations: {
|
|
1880
|
+
en: 'Korean',
|
|
1881
|
+
es: 'Coreano',
|
|
1882
|
+
},
|
|
1883
|
+
},
|
|
1884
|
+
pl: {
|
|
1885
|
+
nativeName: 'Polski',
|
|
1886
|
+
flag: '🇵🇱',
|
|
1887
|
+
code: 'pl',
|
|
1888
|
+
i: 12,
|
|
1889
|
+
llmKnowledge: 86,
|
|
1890
|
+
countries: ['Poland.'],
|
|
1891
|
+
translations: {
|
|
1892
|
+
en: 'Polish',
|
|
1893
|
+
es: 'Polaco',
|
|
1894
|
+
},
|
|
1895
|
+
},
|
|
1896
|
+
sv: {
|
|
1897
|
+
nativeName: 'Svenska',
|
|
1898
|
+
flag: '🇸🇪',
|
|
1899
|
+
code: 'sv',
|
|
1900
|
+
i: 13,
|
|
1901
|
+
llmKnowledge: 85,
|
|
1902
|
+
countries: ['Sweden', 'Finland (co-official).'],
|
|
1903
|
+
translations: {
|
|
1904
|
+
en: 'Swedish',
|
|
1905
|
+
es: 'Sueco',
|
|
1906
|
+
},
|
|
1907
|
+
},
|
|
1908
|
+
tr: {
|
|
1909
|
+
nativeName: 'Türkçe',
|
|
1910
|
+
flag: '🇹🇷',
|
|
1911
|
+
code: 'tr',
|
|
1912
|
+
i: 14,
|
|
1913
|
+
llmKnowledge: 84,
|
|
1914
|
+
countries: ['Turkey', 'Cyprus (North).'],
|
|
1915
|
+
translations: {
|
|
1916
|
+
en: 'Turkish',
|
|
1917
|
+
es: 'Turco',
|
|
1918
|
+
},
|
|
1919
|
+
},
|
|
1920
|
+
ar: {
|
|
1921
|
+
nativeName: 'العربية (Al-Arabiyyah)',
|
|
1922
|
+
flag: '🇸🇦',
|
|
1923
|
+
code: 'ar',
|
|
1924
|
+
i: 15,
|
|
1925
|
+
llmKnowledge: 83,
|
|
1926
|
+
countries: [
|
|
1927
|
+
'Saudi Arabia',
|
|
1928
|
+
'Egypt',
|
|
1929
|
+
'Algeria',
|
|
1930
|
+
'Morocco',
|
|
1931
|
+
'Iraq',
|
|
1932
|
+
'Sudan',
|
|
1933
|
+
'Yemen',
|
|
1934
|
+
'Syria',
|
|
1935
|
+
'Tunisia',
|
|
1936
|
+
'Jordan',
|
|
1937
|
+
'United Arab Emirates',
|
|
1938
|
+
'Lebanon',
|
|
1939
|
+
'Libya',
|
|
1940
|
+
'Oman',
|
|
1941
|
+
'Kuwait',
|
|
1942
|
+
'Mauritania',
|
|
1943
|
+
'Qatar',
|
|
1944
|
+
'Bahrain',
|
|
1945
|
+
'Comoros',
|
|
1946
|
+
'Djibouti',
|
|
1947
|
+
'Somalia',
|
|
1948
|
+
'Eritrea',
|
|
1949
|
+
'Chad',
|
|
1950
|
+
'Western Sahara',
|
|
1951
|
+
'Palestine.',
|
|
1952
|
+
],
|
|
1953
|
+
translations: {
|
|
1954
|
+
en: 'Arabic',
|
|
1955
|
+
es: 'Árabe',
|
|
1956
|
+
},
|
|
1957
|
+
},
|
|
1958
|
+
vi: {
|
|
1959
|
+
nativeName: 'Tiếng Việt',
|
|
1960
|
+
flag: '🇻🇳',
|
|
1961
|
+
code: 'vi',
|
|
1962
|
+
i: 16,
|
|
1963
|
+
llmKnowledge: 82,
|
|
1964
|
+
countries: ['Vietnam.'],
|
|
1965
|
+
translations: {
|
|
1966
|
+
en: 'Vietnamese',
|
|
1967
|
+
es: 'Vietnamita',
|
|
1968
|
+
},
|
|
1969
|
+
},
|
|
1970
|
+
id: {
|
|
1971
|
+
nativeName: 'Bahasa Indonesia',
|
|
1972
|
+
flag: '🇮🇩',
|
|
1973
|
+
code: 'id',
|
|
1974
|
+
i: 17,
|
|
1975
|
+
llmKnowledge: 81,
|
|
1976
|
+
countries: ['Indonesia.'],
|
|
1977
|
+
translations: {
|
|
1978
|
+
en: 'Indonesian',
|
|
1979
|
+
es: 'Indonesio',
|
|
1980
|
+
},
|
|
1981
|
+
},
|
|
1982
|
+
da: {
|
|
1983
|
+
nativeName: 'Dansk',
|
|
1984
|
+
flag: '🇩🇰',
|
|
1985
|
+
code: 'da',
|
|
1986
|
+
i: 18,
|
|
1987
|
+
llmKnowledge: 80,
|
|
1988
|
+
countries: ['Denmark', 'Faroe Islands (co-official)', 'Greenland (co-official).'],
|
|
1989
|
+
translations: {
|
|
1990
|
+
en: 'Danish',
|
|
1991
|
+
es: 'Danés',
|
|
1992
|
+
},
|
|
1993
|
+
},
|
|
1994
|
+
no: {
|
|
1995
|
+
nativeName: 'Norsk',
|
|
1996
|
+
flag: '🇳🇴',
|
|
1997
|
+
code: 'no',
|
|
1998
|
+
i: 19,
|
|
1999
|
+
llmKnowledge: 79,
|
|
2000
|
+
countries: ['Norway.'],
|
|
2001
|
+
translations: {
|
|
2002
|
+
en: 'Norwegian',
|
|
2003
|
+
es: 'Noruego',
|
|
2004
|
+
},
|
|
2005
|
+
},
|
|
2006
|
+
fi: {
|
|
2007
|
+
nativeName: 'Suomi',
|
|
2008
|
+
flag: '🇫🇮',
|
|
2009
|
+
code: 'fi',
|
|
2010
|
+
i: 20,
|
|
2011
|
+
llmKnowledge: 78,
|
|
2012
|
+
countries: ['Finland.'],
|
|
2013
|
+
translations: {
|
|
2014
|
+
en: 'Finnish',
|
|
2015
|
+
es: 'Finlandés',
|
|
2016
|
+
},
|
|
2017
|
+
},
|
|
2018
|
+
cs: {
|
|
2019
|
+
nativeName: 'Čeština',
|
|
2020
|
+
flag: '🇨🇿',
|
|
2021
|
+
code: 'cs',
|
|
2022
|
+
i: 21,
|
|
2023
|
+
llmKnowledge: 77,
|
|
2024
|
+
countries: ['Czech Republic.'],
|
|
2025
|
+
translations: {
|
|
2026
|
+
en: 'Czech',
|
|
2027
|
+
es: 'Checo',
|
|
2028
|
+
},
|
|
2029
|
+
},
|
|
2030
|
+
el: {
|
|
2031
|
+
nativeName: 'Ελληνικά (Elliniká)',
|
|
2032
|
+
flag: '🇬🇷',
|
|
2033
|
+
code: 'el',
|
|
2034
|
+
i: 22,
|
|
2035
|
+
llmKnowledge: 76,
|
|
2036
|
+
countries: ['Greece', 'Cyprus.'],
|
|
2037
|
+
translations: {
|
|
2038
|
+
en: 'Greek',
|
|
2039
|
+
es: 'Griego',
|
|
2040
|
+
},
|
|
2041
|
+
},
|
|
2042
|
+
hu: {
|
|
2043
|
+
nativeName: 'Magyar',
|
|
2044
|
+
flag: '🇭🇺',
|
|
2045
|
+
code: 'hu',
|
|
2046
|
+
i: 23,
|
|
2047
|
+
llmKnowledge: 75,
|
|
2048
|
+
countries: ['Hungary.'],
|
|
2049
|
+
translations: {
|
|
2050
|
+
en: 'Hungarian',
|
|
2051
|
+
es: 'Húngaro',
|
|
2052
|
+
},
|
|
2053
|
+
},
|
|
2054
|
+
ro: {
|
|
2055
|
+
nativeName: 'Română',
|
|
2056
|
+
flag: '🇷🇴',
|
|
2057
|
+
code: 'ro',
|
|
2058
|
+
i: 24,
|
|
2059
|
+
llmKnowledge: 74,
|
|
2060
|
+
countries: ['Romania', 'Moldova (as Moldovan).'],
|
|
2061
|
+
translations: {
|
|
2062
|
+
en: 'Romanian',
|
|
2063
|
+
es: 'Rumano',
|
|
2064
|
+
},
|
|
2065
|
+
},
|
|
2066
|
+
uk: {
|
|
2067
|
+
nativeName: 'Українська (Ukrainska)',
|
|
2068
|
+
flag: '🇺🇦',
|
|
2069
|
+
code: 'uk',
|
|
2070
|
+
i: 25,
|
|
2071
|
+
llmKnowledge: 73,
|
|
2072
|
+
countries: ['Ukraine.'],
|
|
2073
|
+
translations: {
|
|
2074
|
+
en: 'Ukrainian',
|
|
2075
|
+
es: 'Ucraniano',
|
|
2076
|
+
},
|
|
2077
|
+
},
|
|
2078
|
+
he: {
|
|
2079
|
+
nativeName: 'עברית (Ivrit)',
|
|
2080
|
+
flag: '🇮🇱',
|
|
2081
|
+
code: 'he',
|
|
2082
|
+
i: 26,
|
|
2083
|
+
llmKnowledge: 72,
|
|
2084
|
+
countries: ['Israel.'],
|
|
2085
|
+
translations: {
|
|
2086
|
+
en: 'Hebrew',
|
|
2087
|
+
es: 'Hebreo',
|
|
2088
|
+
},
|
|
2089
|
+
},
|
|
2090
|
+
th: {
|
|
2091
|
+
nativeName: 'ภาษาไทย (Phasa Thai)',
|
|
2092
|
+
flag: '🇹🇭',
|
|
2093
|
+
code: 'th',
|
|
2094
|
+
i: 27,
|
|
2095
|
+
llmKnowledge: 71,
|
|
2096
|
+
countries: ['Thailand.'],
|
|
2097
|
+
translations: {
|
|
2098
|
+
en: 'Thai',
|
|
2099
|
+
es: 'Tailandés',
|
|
2100
|
+
},
|
|
2101
|
+
},
|
|
2102
|
+
hi: {
|
|
2103
|
+
nativeName: 'हिन्दी (Hindī)',
|
|
2104
|
+
flag: '🇮🇳',
|
|
2105
|
+
code: 'hi',
|
|
2106
|
+
i: 28,
|
|
2107
|
+
llmKnowledge: 70,
|
|
2108
|
+
countries: ['India (co-official)', 'Fiji (co-official).'],
|
|
2109
|
+
translations: {
|
|
2110
|
+
en: 'Hindi',
|
|
2111
|
+
es: 'Hindi',
|
|
2112
|
+
},
|
|
2113
|
+
},
|
|
2114
|
+
ca: {
|
|
2115
|
+
nativeName: 'Català',
|
|
2116
|
+
flag: '🇪🇸',
|
|
2117
|
+
code: 'ca',
|
|
2118
|
+
i: 29,
|
|
2119
|
+
llmKnowledge: 69,
|
|
2120
|
+
countries: ['Spain (Catalonia, Valencia, Balearic Islands)', 'Andorra.'],
|
|
2121
|
+
translations: {
|
|
2122
|
+
en: 'Catalan',
|
|
2123
|
+
es: 'Catalán',
|
|
2124
|
+
},
|
|
2125
|
+
},
|
|
2126
|
+
bg: {
|
|
2127
|
+
nativeName: 'Български (Balgarski)',
|
|
2128
|
+
flag: '🇧🇬',
|
|
2129
|
+
code: 'bg',
|
|
2130
|
+
i: 30,
|
|
2131
|
+
llmKnowledge: 68,
|
|
2132
|
+
countries: ['Bulgaria.'],
|
|
2133
|
+
translations: {
|
|
2134
|
+
en: 'Bulgarian',
|
|
2135
|
+
es: 'Búlgaro',
|
|
2136
|
+
},
|
|
2137
|
+
},
|
|
2138
|
+
hr: {
|
|
2139
|
+
nativeName: 'Hrvatski',
|
|
2140
|
+
flag: '🇭🇷',
|
|
2141
|
+
code: 'hr',
|
|
2142
|
+
i: 31,
|
|
2143
|
+
llmKnowledge: 67,
|
|
2144
|
+
countries: ['Croatia', 'Bosnia and Herzegovina (co-official)', 'Serbia (Vojvodina).'],
|
|
2145
|
+
translations: {
|
|
2146
|
+
en: 'Croatian',
|
|
2147
|
+
es: 'Croata',
|
|
2148
|
+
},
|
|
2149
|
+
},
|
|
2150
|
+
sk: {
|
|
2151
|
+
nativeName: 'Slovenčina',
|
|
2152
|
+
flag: '🇸🇰',
|
|
2153
|
+
code: 'sk',
|
|
2154
|
+
i: 32,
|
|
2155
|
+
llmKnowledge: 66,
|
|
2156
|
+
countries: ['Slovakia.'],
|
|
2157
|
+
translations: {
|
|
2158
|
+
en: 'Slovak',
|
|
2159
|
+
es: 'Eslovaco',
|
|
2160
|
+
},
|
|
2161
|
+
},
|
|
2162
|
+
fil: {
|
|
2163
|
+
nativeName: 'Filipino',
|
|
2164
|
+
flag: '🇵🇭',
|
|
2165
|
+
code: 'fil',
|
|
2166
|
+
i: 33,
|
|
2167
|
+
llmKnowledge: 65,
|
|
2168
|
+
countries: ['Philippines (co-official).'],
|
|
2169
|
+
translations: {
|
|
2170
|
+
en: 'Filipino',
|
|
2171
|
+
es: 'Filipino',
|
|
2172
|
+
},
|
|
2173
|
+
},
|
|
2174
|
+
tl: {
|
|
2175
|
+
// Tagalog often used as base for Filipino, but distinct ISO code
|
|
2176
|
+
nativeName: 'Tagalog',
|
|
2177
|
+
flag: '🇵🇭',
|
|
2178
|
+
code: 'tl',
|
|
2179
|
+
i: 34,
|
|
2180
|
+
llmKnowledge: 64,
|
|
2181
|
+
countries: ['Philippines (base of Filipino).'],
|
|
2182
|
+
translations: {
|
|
2183
|
+
en: 'Tagalog',
|
|
2184
|
+
es: 'Tagalo',
|
|
2185
|
+
},
|
|
2186
|
+
},
|
|
2187
|
+
lt: {
|
|
2188
|
+
nativeName: 'Lietuvių',
|
|
2189
|
+
flag: '🇱🇹',
|
|
2190
|
+
code: 'lt',
|
|
2191
|
+
i: 35,
|
|
2192
|
+
llmKnowledge: 63,
|
|
2193
|
+
countries: ['Lithuania.'],
|
|
2194
|
+
translations: {
|
|
2195
|
+
en: 'Lithuanian',
|
|
2196
|
+
es: 'Lituano',
|
|
2197
|
+
},
|
|
2198
|
+
},
|
|
2199
|
+
lv: {
|
|
2200
|
+
nativeName: 'Latviešu',
|
|
2201
|
+
flag: '🇱🇻',
|
|
2202
|
+
code: 'lv',
|
|
2203
|
+
i: 36,
|
|
2204
|
+
llmKnowledge: 62,
|
|
2205
|
+
countries: ['Latvia.'],
|
|
2206
|
+
translations: {
|
|
2207
|
+
en: 'Latvian',
|
|
2208
|
+
es: 'Letón',
|
|
2209
|
+
},
|
|
2210
|
+
},
|
|
2211
|
+
sl: {
|
|
2212
|
+
nativeName: 'Slovenščina',
|
|
2213
|
+
flag: '🇸🇮',
|
|
2214
|
+
code: 'sl',
|
|
2215
|
+
i: 37,
|
|
2216
|
+
llmKnowledge: 61,
|
|
2217
|
+
countries: ['Slovenia.'],
|
|
2218
|
+
translations: {
|
|
2219
|
+
en: 'Slovenian',
|
|
2220
|
+
es: 'Esloveno',
|
|
2221
|
+
},
|
|
2222
|
+
},
|
|
2223
|
+
et: {
|
|
2224
|
+
nativeName: 'Eesti',
|
|
2225
|
+
flag: '🇪🇪',
|
|
2226
|
+
code: 'et',
|
|
2227
|
+
i: 38,
|
|
2228
|
+
llmKnowledge: 60,
|
|
2229
|
+
countries: ['Estonia.'],
|
|
2230
|
+
translations: {
|
|
2231
|
+
en: 'Estonian',
|
|
2232
|
+
es: 'Estonio',
|
|
2233
|
+
},
|
|
2234
|
+
},
|
|
2235
|
+
ms: {
|
|
2236
|
+
nativeName: 'Bahasa Melayu',
|
|
2237
|
+
flag: '🇲🇾',
|
|
2238
|
+
code: 'ms',
|
|
2239
|
+
i: 39,
|
|
2240
|
+
llmKnowledge: 59,
|
|
2241
|
+
countries: ['Malaysia', 'Brunei', 'Singapore (co-official).'],
|
|
2242
|
+
translations: {
|
|
2243
|
+
en: 'Malay',
|
|
2244
|
+
es: 'Malayo',
|
|
2245
|
+
},
|
|
2246
|
+
},
|
|
2247
|
+
sw: {
|
|
2248
|
+
nativeName: 'Kiswahili',
|
|
2249
|
+
flag: '🇹🇿',
|
|
2250
|
+
code: 'sw',
|
|
2251
|
+
i: 40,
|
|
2252
|
+
llmKnowledge: 58,
|
|
2253
|
+
countries: ['Tanzania', 'Kenya', 'Uganda', 'Rwanda', 'Democratic Republic of the Congo (national language).'],
|
|
2254
|
+
translations: {
|
|
2255
|
+
en: 'Swahili',
|
|
2256
|
+
es: 'Suajili',
|
|
2257
|
+
},
|
|
2258
|
+
},
|
|
2259
|
+
fa: {
|
|
2260
|
+
nativeName: 'فارسی (Fārsī)',
|
|
2261
|
+
flag: '🇮🇷',
|
|
2262
|
+
code: 'fa',
|
|
2263
|
+
i: 41,
|
|
2264
|
+
llmKnowledge: 57,
|
|
2265
|
+
countries: ['Iran', 'Afghanistan (as Dari)', 'Tajikistan (as Tajik).'],
|
|
2266
|
+
translations: {
|
|
2267
|
+
en: 'Persian/Farsi',
|
|
2268
|
+
es: 'Persa',
|
|
2269
|
+
},
|
|
2270
|
+
},
|
|
2271
|
+
bn: {
|
|
2272
|
+
nativeName: 'বাংলা (Bangla)',
|
|
2273
|
+
flag: '🇧🇩',
|
|
2274
|
+
code: 'bn',
|
|
2275
|
+
i: 42,
|
|
2276
|
+
llmKnowledge: 56,
|
|
2277
|
+
countries: ['Bangladesh', 'India (West Bengal, Tripura).'],
|
|
2278
|
+
translations: {
|
|
2279
|
+
en: 'Bengali',
|
|
2280
|
+
es: 'Bengalí',
|
|
2281
|
+
},
|
|
2282
|
+
},
|
|
2283
|
+
ur: {
|
|
2284
|
+
nativeName: 'اردو (Urdū)',
|
|
2285
|
+
flag: '🇵🇰',
|
|
2286
|
+
code: 'ur',
|
|
2287
|
+
i: 43,
|
|
2288
|
+
llmKnowledge: 55,
|
|
2289
|
+
countries: ['Pakistan (co-official)', 'India (recognized).'],
|
|
2290
|
+
translations: {
|
|
2291
|
+
en: 'Urdu',
|
|
2292
|
+
es: 'Urdu',
|
|
2293
|
+
},
|
|
2294
|
+
},
|
|
2295
|
+
sr: {
|
|
2296
|
+
nativeName: 'Српски (Srpski)',
|
|
2297
|
+
flag: '🇷🇸',
|
|
2298
|
+
code: 'sr',
|
|
2299
|
+
i: 44,
|
|
2300
|
+
llmKnowledge: 54,
|
|
2301
|
+
countries: ['Serbia', 'Bosnia and Herzegovina (co-official)', 'Montenegro (co-official)', 'Kosovo (co-official).'],
|
|
2302
|
+
translations: {
|
|
2303
|
+
en: 'Serbian',
|
|
2304
|
+
es: 'Serbio',
|
|
2305
|
+
},
|
|
2306
|
+
},
|
|
2307
|
+
is: {
|
|
2308
|
+
nativeName: 'Íslenska',
|
|
2309
|
+
flag: '🇮🇸',
|
|
2310
|
+
code: 'is',
|
|
2311
|
+
i: 45,
|
|
2312
|
+
llmKnowledge: 53,
|
|
2313
|
+
countries: ['Iceland.'],
|
|
2314
|
+
translations: {
|
|
2315
|
+
en: 'Icelandic',
|
|
2316
|
+
es: 'Islandés',
|
|
2317
|
+
},
|
|
2318
|
+
},
|
|
2319
|
+
ta: {
|
|
2320
|
+
nativeName: 'தமிழ் (Tamiḻ)',
|
|
2321
|
+
flag: '🇱🇰',
|
|
2322
|
+
code: 'ta',
|
|
2323
|
+
i: 46,
|
|
2324
|
+
llmKnowledge: 52,
|
|
2325
|
+
countries: ['Sri Lanka', 'Singapore', 'India (Tamil Nadu, Puducherry).'],
|
|
2326
|
+
translations: {
|
|
2327
|
+
en: 'Tamil',
|
|
2328
|
+
es: 'Tamil',
|
|
2329
|
+
},
|
|
2330
|
+
},
|
|
2331
|
+
mr: {
|
|
2332
|
+
nativeName: 'मराठी (Marāṭhī)',
|
|
2333
|
+
flag: '🇮🇳',
|
|
2334
|
+
code: 'mr',
|
|
2335
|
+
i: 47,
|
|
2336
|
+
llmKnowledge: 51,
|
|
2337
|
+
countries: ['India (Maharashtra).'],
|
|
2338
|
+
translations: {
|
|
2339
|
+
en: 'Marathi',
|
|
2340
|
+
es: 'Maratí',
|
|
2341
|
+
},
|
|
2342
|
+
},
|
|
2343
|
+
my: {
|
|
2344
|
+
nativeName: 'မြန်မာဘာသာ (Myanmar)',
|
|
2345
|
+
flag: '🇲🇲',
|
|
2346
|
+
code: 'my',
|
|
2347
|
+
i: 48,
|
|
2348
|
+
llmKnowledge: 50,
|
|
2349
|
+
countries: ['Myanmar.'],
|
|
2350
|
+
translations: {
|
|
2351
|
+
en: 'Burmese',
|
|
2352
|
+
es: 'Birmano',
|
|
2353
|
+
},
|
|
2354
|
+
},
|
|
2355
|
+
cy: {
|
|
2356
|
+
nativeName: 'Cymraeg',
|
|
2357
|
+
flag: '🏴',
|
|
2358
|
+
code: 'cy',
|
|
2359
|
+
i: 49,
|
|
2360
|
+
llmKnowledge: 49,
|
|
2361
|
+
countries: ['United Kingdom (Wales).'],
|
|
2362
|
+
translations: {
|
|
2363
|
+
en: 'Welsh',
|
|
2364
|
+
es: 'Galés',
|
|
2365
|
+
},
|
|
2366
|
+
},
|
|
2367
|
+
ha: {
|
|
2368
|
+
nativeName: 'Hausa',
|
|
2369
|
+
flag: '🇳🇬',
|
|
2370
|
+
code: 'ha',
|
|
2371
|
+
i: 50,
|
|
2372
|
+
llmKnowledge: 48,
|
|
2373
|
+
countries: ['Nigeria (major language)', 'Niger', 'Ghana', 'Cameroon', 'Benin', 'Chad', 'Sudan.'],
|
|
2374
|
+
translations: {
|
|
2375
|
+
en: 'Hausa',
|
|
2376
|
+
es: 'Hausa',
|
|
2377
|
+
},
|
|
2378
|
+
},
|
|
2379
|
+
eu: {
|
|
2380
|
+
nativeName: 'Euskara',
|
|
2381
|
+
flag: '🇪🇸',
|
|
2382
|
+
code: 'eu',
|
|
2383
|
+
i: 51,
|
|
2384
|
+
llmKnowledge: 47,
|
|
2385
|
+
countries: ['Spain (Basque Country, Navarre)', 'France (French Basque Country).'],
|
|
2386
|
+
translations: {
|
|
2387
|
+
en: 'Basque',
|
|
2388
|
+
es: 'Vasco',
|
|
2389
|
+
},
|
|
2390
|
+
},
|
|
2391
|
+
ga: {
|
|
2392
|
+
nativeName: 'Gaeilge',
|
|
2393
|
+
flag: '🇮🇪',
|
|
2394
|
+
code: 'ga',
|
|
2395
|
+
i: 52,
|
|
2396
|
+
llmKnowledge: 46,
|
|
2397
|
+
countries: ['Ireland', 'United Kingdom (Northern Ireland).'],
|
|
2398
|
+
translations: {
|
|
2399
|
+
en: 'Irish',
|
|
2400
|
+
es: 'Irlandés',
|
|
2401
|
+
},
|
|
2402
|
+
},
|
|
2403
|
+
sd: {
|
|
2404
|
+
nativeName: 'سنڌي (Sindhī)',
|
|
2405
|
+
flag: '🇵🇰',
|
|
2406
|
+
code: 'sd',
|
|
2407
|
+
i: 53,
|
|
2408
|
+
llmKnowledge: 45,
|
|
2409
|
+
countries: ['Pakistan (Sindh)', 'India (recognized).'],
|
|
2410
|
+
translations: {
|
|
2411
|
+
en: 'Sindhi',
|
|
2412
|
+
es: 'Sindi',
|
|
2413
|
+
},
|
|
2414
|
+
},
|
|
2415
|
+
am: {
|
|
2416
|
+
nativeName: 'አማርኛ (Amarəñña)',
|
|
2417
|
+
flag: '🇪🇹',
|
|
2418
|
+
code: 'am',
|
|
2419
|
+
i: 54,
|
|
2420
|
+
llmKnowledge: 44,
|
|
2421
|
+
countries: ['Ethiopia.'],
|
|
2422
|
+
translations: {
|
|
2423
|
+
en: 'Amharic',
|
|
2424
|
+
es: 'Amárico',
|
|
2425
|
+
},
|
|
2426
|
+
},
|
|
2427
|
+
jv: {
|
|
2428
|
+
nativeName: 'Basa Jawa',
|
|
2429
|
+
flag: '🇮🇩',
|
|
2430
|
+
code: 'jv',
|
|
2431
|
+
i: 55,
|
|
2432
|
+
llmKnowledge: 43,
|
|
2433
|
+
countries: ['Indonesia (important regional language).'],
|
|
2434
|
+
translations: {
|
|
2435
|
+
en: 'Javanese',
|
|
2436
|
+
es: 'Javanés',
|
|
2437
|
+
},
|
|
2438
|
+
},
|
|
2439
|
+
km: {
|
|
2440
|
+
nativeName: 'ភាសាខ្មែរ (Phéasa Khmér)',
|
|
2441
|
+
flag: '🇰🇭',
|
|
2442
|
+
code: 'km',
|
|
2443
|
+
i: 56,
|
|
2444
|
+
llmKnowledge: 42,
|
|
2445
|
+
countries: ['Cambodia.'],
|
|
2446
|
+
translations: {
|
|
2447
|
+
en: 'Khmer',
|
|
2448
|
+
es: 'Jemer',
|
|
2449
|
+
},
|
|
2450
|
+
},
|
|
2451
|
+
yo: {
|
|
2452
|
+
nativeName: 'Yorùbá',
|
|
2453
|
+
flag: '🇳🇬',
|
|
2454
|
+
code: 'yo',
|
|
2455
|
+
i: 57,
|
|
2456
|
+
llmKnowledge: 41,
|
|
2457
|
+
countries: ['Nigeria', 'Benin', 'Togo.'],
|
|
2458
|
+
translations: {
|
|
2459
|
+
en: 'Yoruba',
|
|
2460
|
+
es: 'Yoruba',
|
|
2461
|
+
},
|
|
2462
|
+
},
|
|
2463
|
+
gl: {
|
|
2464
|
+
nativeName: 'Galego',
|
|
2465
|
+
flag: '🇪🇸',
|
|
2466
|
+
code: 'gl',
|
|
2467
|
+
i: 58,
|
|
2468
|
+
llmKnowledge: 40,
|
|
2469
|
+
countries: ['Spain (Galicia).'],
|
|
2470
|
+
translations: {
|
|
2471
|
+
en: 'Galician',
|
|
2472
|
+
es: 'Gallego',
|
|
2473
|
+
},
|
|
2474
|
+
},
|
|
2475
|
+
};
|
|
2476
|
+
|
|
1416
2477
|
/*
|
|
1417
2478
|
* Public API Surface of core-components
|
|
1418
2479
|
*/
|
|
@@ -1422,5 +2483,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
|
|
|
1422
2483
|
* Generated bundle index. Do not edit.
|
|
1423
2484
|
*/
|
|
1424
2485
|
|
|
1425
|
-
export { AudioSpeed, AudioSpeedReverse, ChatUserSettings, ConfirmComponent, ConfirmService, DCFilterBarComponent, DCProgressToastComponent, EModelQuality, EmptyStateComponent, GetPathPipe, HTTP_CORE_CONFIG, HttpCoreService, IAIModel, LoadingBarComponent, LoadingBarService, ModelQualityOptions, OptionValue, PaginationBase, PromptService, QuickTableComponent, TOAST_ALERTS_TOKEN, ToastAlertsAbstractService, availibleFilters, extractJsonFromString, formatCamelCaseString, provideToastAlert, sortOptions, sortTypes };
|
|
2486
|
+
export { AudioSpeed, AudioSpeedReverse, ChatUserSettings, ConfirmComponent, ConfirmService, DCFilterBarComponent, DCProgressToastComponent, DcAuditableViewerComponent, DcExtensionsViewerComponent, DcLearnableViewerComponent, DcManageableViewerComponent, DcReactionsViewerComponent, EModelQuality, EmptyStateComponent, EntityBaseListComponent, EntityCommunicationService, GetPathPipe, HTTP_CORE_CONFIG, HttpCoreService, IAIModel, LANGUAGES, LoadingBarComponent, LoadingBarService, ModelQualityOptions, OptionValue, PaginationBase, PromptService, QuickTableComponent, TOAST_ALERTS_TOKEN, ToastAlertsAbstractService, availibleFilters, extractJsonFromString, formatCamelCaseString, provideToastAlert, sortOptions, sortTypes };
|
|
1426
2487
|
//# sourceMappingURL=dataclouder-ngx-core.mjs.map
|