fas-admin 0.0.81 → 0.0.91
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/api/api-services/operator-faq-categories.service.d.ts +14 -0
- package/api/api-services/operator-faq-category-translation.service.d.ts +18 -0
- package/api/api-services/operator-faq-category.service.d.ts +19 -0
- package/api/api-services/operator-faq-item-translation.service.d.ts +18 -0
- package/api/api-services/operator-faq-item.service.d.ts +19 -0
- package/api/api-services/operator-faq-items.service.d.ts +14 -0
- package/api/api-services/upload-media.service.d.ts +15 -0
- package/api/operator-faq-category-im.model.d.ts +5 -0
- package/api/operator-faq-category-translation-im.model.d.ts +5 -0
- package/api/operator-faq-category-translation-um.model.d.ts +4 -0
- package/api/operator-faq-category-translation-vm.model.d.ts +7 -0
- package/api/operator-faq-category-um.model.d.ts +6 -0
- package/api/operator-faq-category-vm.model.d.ts +12 -0
- package/api/operator-faq-item-im.model.d.ts +6 -0
- package/api/operator-faq-item-translation-im.model.d.ts +6 -0
- package/api/operator-faq-item-translation-um.model.d.ts +5 -0
- package/api/operator-faq-item-translation-vm.model.d.ts +8 -0
- package/api/operator-faq-item-um.model.d.ts +7 -0
- package/api/operator-faq-item-vm.model.d.ts +13 -0
- package/api/upload-file-result-vm.model.d.ts +5 -0
- package/esm2022/api/api-services/operator-faq-categories.service.mjs +34 -0
- package/esm2022/api/api-services/operator-faq-category-translation.service.mjs +44 -0
- package/esm2022/api/api-services/operator-faq-category.service.mjs +50 -0
- package/esm2022/api/api-services/operator-faq-item-translation.service.mjs +44 -0
- package/esm2022/api/api-services/operator-faq-item.service.mjs +50 -0
- package/esm2022/api/api-services/operator-faq-items.service.mjs +36 -0
- package/esm2022/api/api-services/upload-media.service.mjs +38 -0
- package/esm2022/api/operator-faq-category-im.model.mjs +2 -0
- package/esm2022/api/operator-faq-category-translation-im.model.mjs +2 -0
- package/esm2022/api/operator-faq-category-translation-um.model.mjs +2 -0
- package/esm2022/api/operator-faq-category-translation-vm.model.mjs +2 -0
- package/esm2022/api/operator-faq-category-um.model.mjs +2 -0
- package/esm2022/api/operator-faq-category-vm.model.mjs +2 -0
- package/esm2022/api/operator-faq-item-im.model.mjs +2 -0
- package/esm2022/api/operator-faq-item-translation-im.model.mjs +2 -0
- package/esm2022/api/operator-faq-item-translation-um.model.mjs +2 -0
- package/esm2022/api/operator-faq-item-translation-vm.model.mjs +2 -0
- package/esm2022/api/operator-faq-item-um.model.mjs +2 -0
- package/esm2022/api/operator-faq-item-vm.model.mjs +2 -0
- package/esm2022/api/upload-file-result-vm.model.mjs +2 -0
- package/esm2022/lib/components/views/faq/faq.component.mjs +567 -0
- package/esm2022/lib/components/views/faq/faq.module.mjs +72 -0
- package/esm2022/lib/components/views/faq/prime-icon-options.const.mjs +263 -0
- package/esm2022/lib/fas-admin.component.mjs +2 -2
- package/esm2022/lib/fas-admin.module.mjs +5 -1
- package/esm2022/lib/shared/const/fas-default-settings.const.mjs +7 -1
- package/esm2022/lib/shared/models/fas-admin-models.mjs +1 -1
- package/fesm2022/fas-admin.mjs +1145 -12
- package/fesm2022/fas-admin.mjs.map +1 -1
- package/lib/components/views/faq/faq.component.d.ts +85 -0
- package/lib/components/views/faq/faq.module.d.ts +20 -0
- package/lib/components/views/faq/prime-icon-options.const.d.ts +5 -0
- package/lib/fas-admin.module.d.ts +3 -2
- package/lib/shared/models/fas-admin-models.d.ts +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import { IOperatorFaqCategoryVm } from '../../../../api/operator-faq-category-vm.model';
|
|
4
|
+
import { IOperatorFaqItemVm } from '../../../../api/operator-faq-item-vm.model';
|
|
5
|
+
import { IOperatorFaqCategoryTranslationVm } from '../../../../api/operator-faq-category-translation-vm.model';
|
|
6
|
+
import { IOperatorFaqItemTranslationVm } from '../../../../api/operator-faq-item-translation-vm.model';
|
|
7
|
+
import { PrimeIconOption } from './prime-icon-options.const';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class FaqComponent implements OnInit {
|
|
10
|
+
/** Languages selectable when adding translations (besides the base PL content). */
|
|
11
|
+
availableLanguages: {
|
|
12
|
+
code: string;
|
|
13
|
+
name: string;
|
|
14
|
+
}[];
|
|
15
|
+
private _categoriesService;
|
|
16
|
+
private _categoryService;
|
|
17
|
+
private _itemsService;
|
|
18
|
+
private _itemService;
|
|
19
|
+
private _categoryTranslationService;
|
|
20
|
+
private _itemTranslationService;
|
|
21
|
+
private _uploadMediaService;
|
|
22
|
+
private _messageService;
|
|
23
|
+
private _fb;
|
|
24
|
+
categories: IOperatorFaqCategoryVm[];
|
|
25
|
+
itemsByCategory: {
|
|
26
|
+
[categoryId: number]: IOperatorFaqItemVm[];
|
|
27
|
+
};
|
|
28
|
+
loading: boolean;
|
|
29
|
+
categoryDialogVisible: boolean;
|
|
30
|
+
editingCategory?: IOperatorFaqCategoryVm;
|
|
31
|
+
categoryForm: FormGroup;
|
|
32
|
+
categoryTranslationForm: FormGroup;
|
|
33
|
+
/** When set, the category translation sub-form is editing this translation instead of adding a new one. */
|
|
34
|
+
editingCategoryTranslationId?: number;
|
|
35
|
+
readonly primeIconOptions: PrimeIconOption[];
|
|
36
|
+
itemDialogVisible: boolean;
|
|
37
|
+
editingItem?: IOperatorFaqItemVm;
|
|
38
|
+
itemCategoryId?: number;
|
|
39
|
+
itemForm: FormGroup;
|
|
40
|
+
itemTranslationForm: FormGroup;
|
|
41
|
+
/** When set, the item translation sub-form is editing this translation instead of adding a new one. */
|
|
42
|
+
editingItemTranslationId?: number;
|
|
43
|
+
private _itemAnswerQuill?;
|
|
44
|
+
private _translationAnswerQuill?;
|
|
45
|
+
private _pendingItemAnswer;
|
|
46
|
+
ngOnInit(): void;
|
|
47
|
+
private buildForms;
|
|
48
|
+
loadCategories(): void;
|
|
49
|
+
loadItems(categoryId: number): void;
|
|
50
|
+
onCategoryTabOpen(categoryId: number): void;
|
|
51
|
+
resolvePrimeIconOption(icon: PrimeIconOption | string | null | undefined): PrimeIconOption | undefined;
|
|
52
|
+
openNewCategory(): void;
|
|
53
|
+
openEditCategory(category: IOperatorFaqCategoryVm): void;
|
|
54
|
+
saveCategory(): void;
|
|
55
|
+
private hasPendingCategoryTranslation;
|
|
56
|
+
deleteCategory(category: IOperatorFaqCategoryVm): void;
|
|
57
|
+
saveCategoryTranslation(): void;
|
|
58
|
+
editCategoryTranslation(t: IOperatorFaqCategoryTranslationVm): void;
|
|
59
|
+
cancelCategoryTranslationEdit(): void;
|
|
60
|
+
deleteCategoryTranslation(translationId: number): void;
|
|
61
|
+
openNewItem(categoryId: number): void;
|
|
62
|
+
openEditItem(item: IOperatorFaqItemVm): void;
|
|
63
|
+
onItemDialogShow(): void;
|
|
64
|
+
saveItem(): void;
|
|
65
|
+
private hasPendingItemTranslation;
|
|
66
|
+
deleteItem(item: IOperatorFaqItemVm): void;
|
|
67
|
+
saveItemTranslation(): void;
|
|
68
|
+
editItemTranslation(t: IOperatorFaqItemTranslationVm): void;
|
|
69
|
+
cancelItemTranslationEdit(): void;
|
|
70
|
+
/** Push HTML into the translation answer Quill editor, mirroring the main answer editor sync. */
|
|
71
|
+
private writeTranslationAnswerToEditor;
|
|
72
|
+
deleteItemTranslation(translationId: number): void;
|
|
73
|
+
onEditorInit(event: any): void;
|
|
74
|
+
onTranslationEditorInit(event: any): void;
|
|
75
|
+
private syncItemAnswerEditor;
|
|
76
|
+
private writeItemAnswerToEditor;
|
|
77
|
+
private selectAndUploadImage;
|
|
78
|
+
private success;
|
|
79
|
+
private error;
|
|
80
|
+
private handleError;
|
|
81
|
+
/** True when the (HTML) rich-text value contains visible text or an image. */
|
|
82
|
+
private htmlHasContent;
|
|
83
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FaqComponent, never>;
|
|
84
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FaqComponent, "lib-faq", never, { "availableLanguages": { "alias": "availableLanguages"; "required": false; }; }, {}, never, never, false, never>;
|
|
85
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./faq.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/forms";
|
|
5
|
+
import * as i4 from "@angular/common/http";
|
|
6
|
+
import * as i5 from "primeng/accordion";
|
|
7
|
+
import * as i6 from "primeng/button";
|
|
8
|
+
import * as i7 from "primeng/dialog";
|
|
9
|
+
import * as i8 from "primeng/table";
|
|
10
|
+
import * as i9 from "primeng/inputtext";
|
|
11
|
+
import * as i10 from "primeng/inputnumber";
|
|
12
|
+
import * as i11 from "primeng/dropdown";
|
|
13
|
+
import * as i12 from "primeng/editor";
|
|
14
|
+
import * as i13 from "primeng/toast";
|
|
15
|
+
import * as i14 from "primeng/progressspinner";
|
|
16
|
+
export declare class FaqModule {
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FaqModule, never>;
|
|
18
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FaqModule, [typeof i1.FaqComponent], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i3.FormsModule, typeof i4.HttpClientModule, typeof i5.AccordionModule, typeof i6.ButtonModule, typeof i7.DialogModule, typeof i8.TableModule, typeof i9.InputTextModule, typeof i10.InputNumberModule, typeof i11.DropdownModule, typeof i12.EditorModule, typeof i13.ToastModule, typeof i14.ProgressSpinnerModule], never>;
|
|
19
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FaqModule>;
|
|
20
|
+
}
|
|
@@ -15,13 +15,14 @@ import * as i11 from "./components/views/messages/messages.module";
|
|
|
15
15
|
import * as i12 from "primeng/divider";
|
|
16
16
|
import * as i13 from "./components/views/ratings/ratings.module";
|
|
17
17
|
import * as i14 from "./components/views/users/users.module";
|
|
18
|
-
import * as i15 from "
|
|
18
|
+
import * as i15 from "./components/views/faq/faq.module";
|
|
19
|
+
import * as i16 from "primeng/toast";
|
|
19
20
|
export declare class FASAdminModule {
|
|
20
21
|
private configData;
|
|
21
22
|
private fasAdminService;
|
|
22
23
|
constructor(configData: IFASAdminConfigInitializer, fasAdminService: FASAdminService);
|
|
23
24
|
private generateRoutes;
|
|
24
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<FASAdminModule, never>;
|
|
25
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FASAdminModule, [typeof i1.FASAdminComponent, typeof i2.TopBarComponent, typeof i3.SideBarComponent], [typeof i4.CommonModule, typeof i5.RouterModule, typeof i6.SubscriptionsModule, typeof i7.NotificationsModule, typeof i8.OverlayPanelModule, typeof i9.OperatorsModule, typeof i10.StatisticModule, typeof i11.MessagesModule, typeof i12.DividerModule, typeof i13.RatingsModule, typeof i14.UsersModule, typeof i15.ToastModule], never>;
|
|
26
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FASAdminModule, [typeof i1.FASAdminComponent, typeof i2.TopBarComponent, typeof i3.SideBarComponent], [typeof i4.CommonModule, typeof i5.RouterModule, typeof i6.SubscriptionsModule, typeof i7.NotificationsModule, typeof i8.OverlayPanelModule, typeof i9.OperatorsModule, typeof i10.StatisticModule, typeof i11.MessagesModule, typeof i12.DividerModule, typeof i13.RatingsModule, typeof i14.UsersModule, typeof i15.FaqModule, typeof i16.ToastModule], never>;
|
|
26
27
|
static ɵinj: i0.ɵɵInjectorDeclaration<FASAdminModule>;
|
|
27
28
|
}
|
|
@@ -5,7 +5,7 @@ export interface IFASButtonList {
|
|
|
5
5
|
label: string;
|
|
6
6
|
icon: string;
|
|
7
7
|
}
|
|
8
|
-
export type IFASDefaultRoutePath = 'dashboard' | 'statistic' | 'subscriptions' | 'messages' | 'operators' | 'users' | 'ratings' | 'notifications';
|
|
8
|
+
export type IFASDefaultRoutePath = 'dashboard' | 'statistic' | 'subscriptions' | 'messages' | 'operators' | 'users' | 'ratings' | 'notifications' | 'faq';
|
|
9
9
|
export type IFASUserRole = 'PlatformOperator' | 'Osk';
|
|
10
10
|
export interface IFASDefaultPath {
|
|
11
11
|
path: IFASDefaultRoutePath;
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fas-admin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.91",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^17.2.0",
|
|
6
6
|
"@angular/core": "^17.2.0",
|
|
7
7
|
"@angular/forms": "^17.2.0",
|
|
8
8
|
"@angular/router": "^17.2.0",
|
|
9
|
-
"jwt-decode": "^3.1.2"
|
|
9
|
+
"jwt-decode": "^3.1.2",
|
|
10
|
+
"primeng": "^17.17.0",
|
|
11
|
+
"quill": "^2.0.0"
|
|
10
12
|
},
|
|
11
13
|
"dependencies": {
|
|
12
14
|
"tslib": "^2.3.0"
|