@aakash58/chatbot 1.0.88 → 1.0.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Output, Input, Component, ViewChild, HostListener, Directive, signal, Injectable, Inject, inject, InjectionToken, computed, effect, ElementRef, ChangeDetectionStrategy, provideAppInitializer } from '@angular/core';
2
+ import { EventEmitter, Output, Input, Component, ViewChild, HostListener, Directive, signal, Injectable, Inject, inject, InjectionToken, computed, effect, ElementRef, ChangeDetectionStrategy, provideAppInitializer, ContentChildren } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i1$1 from '@angular/material/icon';
@@ -3148,6 +3148,95 @@ bootstrapApplication(Doohbot, {
3148
3148
 
3149
3149
  const DOOHBOT_API_URL = new InjectionToken('DOOHBOT_API_URL');
3150
3150
 
3151
+ class MenuItem {
3152
+ href = '#';
3153
+ selected = new EventEmitter();
3154
+ onClick(event) {
3155
+ // Optional: prevent default if used for actions, not navigation
3156
+ // event.preventDefault();
3157
+ this.selected.emit();
3158
+ }
3159
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MenuItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
3160
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: MenuItem, isStandalone: true, selector: "app-menu-item", inputs: { href: "href" }, outputs: { selected: "selected" }, ngImport: i0, template: "<li>\r\n <a [href]=\"href\" (click)=\"onClick($event)\">\r\n <ng-content></ng-content>\r\n </a>\r\n</li>\r\n", styles: [""] });
3161
+ }
3162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MenuItem, decorators: [{
3163
+ type: Component,
3164
+ args: [{ selector: 'app-menu-item', imports: [], template: "<li>\r\n <a [href]=\"href\" (click)=\"onClick($event)\">\r\n <ng-content></ng-content>\r\n </a>\r\n</li>\r\n" }]
3165
+ }], propDecorators: { href: [{
3166
+ type: Input
3167
+ }], selected: [{
3168
+ type: Output
3169
+ }] } });
3170
+
3171
+ class DropdownMenu {
3172
+ detailsRef;
3173
+ menuItems;
3174
+ ngAfterContentInit() {
3175
+ // Subscribe to all menu item selections
3176
+ this.menuItems.forEach((item) => {
3177
+ item.selected.subscribe(() => {
3178
+ this.close();
3179
+ });
3180
+ });
3181
+ }
3182
+ close() {
3183
+ this.detailsRef.nativeElement.open = false;
3184
+ }
3185
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: DropdownMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
3186
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: DropdownMenu, isStandalone: true, selector: "app-dropdown-menu", queries: [{ propertyName: "menuItems", predicate: MenuItem }], viewQueries: [{ propertyName: "detailsRef", first: true, predicate: ["details"], descendants: true }], ngImport: i0, template: "<details class=\"dropdown-menu\" #details>\r\n <summary role=\"button\" class=\"dropdown-trigger\">\r\n <ng-content select=\"[trigger]\"></ng-content>\r\n </summary>\r\n <ul class=\"dropdown-list\">\r\n <ng-content></ng-content>\r\n </ul>\r\n</details>\r\n\r\n<!-- ussage example:\r\n<app-dropdown-menu>\r\n <span trigger>\u2630 Menu</span>\r\n\r\n <app-menu-item href=\"/profile\" (selected)=\"doSomething('profile')\">\r\n My Profile\r\n </app-menu-item>\r\n \r\n <app-menu-item href=\"/settings\" (selected)=\"doSomething('settings')\">\r\n Settings\r\n </app-menu-item>\r\n \r\n <app-menu-item href=\"#\" (selected)=\"logout()\">\r\n Logout\r\n </app-menu-item>\r\n</app-dropdown-menu> -->\r\n\r\n<!-- \r\n Note: The above usage example is commented out to avoid rendering issues.\r\n It demonstrates how to use the DropdownMenu component with MenuItem components as options.\r\n-->\r\n", styles: [".dropdown-menu{position:relative;display:inline-block;margin:0;padding:0}.dropdown-menu summary{list-style:none;cursor:pointer;outline:none}.dropdown-menu summary::-webkit-details-marker{display:none}.dropdown-list{position:absolute;top:100%;left:0;margin:8px 0 0;padding:8px 0;width:180px;background:var(--background-color);border-radius:6px;box-shadow:var(--border-shadow-color);z-index:1000;list-style:none}.dropdown-list:before{content:\"\";position:absolute;top:-6px;left:16px;width:0;height:0;border:6px solid transparent;border-bottom-color:var(--background-color)}.dropdown-list li a{display:block;padding:8px 16px;color:var(--primary-color);text-decoration:none}.dropdown-list li a:hover{background:var(--red);color:var(--secondary-color)}\n"] });
3187
+ }
3188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: DropdownMenu, decorators: [{
3189
+ type: Component,
3190
+ args: [{ selector: 'app-dropdown-menu', imports: [], template: "<details class=\"dropdown-menu\" #details>\r\n <summary role=\"button\" class=\"dropdown-trigger\">\r\n <ng-content select=\"[trigger]\"></ng-content>\r\n </summary>\r\n <ul class=\"dropdown-list\">\r\n <ng-content></ng-content>\r\n </ul>\r\n</details>\r\n\r\n<!-- ussage example:\r\n<app-dropdown-menu>\r\n <span trigger>\u2630 Menu</span>\r\n\r\n <app-menu-item href=\"/profile\" (selected)=\"doSomething('profile')\">\r\n My Profile\r\n </app-menu-item>\r\n \r\n <app-menu-item href=\"/settings\" (selected)=\"doSomething('settings')\">\r\n Settings\r\n </app-menu-item>\r\n \r\n <app-menu-item href=\"#\" (selected)=\"logout()\">\r\n Logout\r\n </app-menu-item>\r\n</app-dropdown-menu> -->\r\n\r\n<!-- \r\n Note: The above usage example is commented out to avoid rendering issues.\r\n It demonstrates how to use the DropdownMenu component with MenuItem components as options.\r\n-->\r\n", styles: [".dropdown-menu{position:relative;display:inline-block;margin:0;padding:0}.dropdown-menu summary{list-style:none;cursor:pointer;outline:none}.dropdown-menu summary::-webkit-details-marker{display:none}.dropdown-list{position:absolute;top:100%;left:0;margin:8px 0 0;padding:8px 0;width:180px;background:var(--background-color);border-radius:6px;box-shadow:var(--border-shadow-color);z-index:1000;list-style:none}.dropdown-list:before{content:\"\";position:absolute;top:-6px;left:16px;width:0;height:0;border:6px solid transparent;border-bottom-color:var(--background-color)}.dropdown-list li a{display:block;padding:8px 16px;color:var(--primary-color);text-decoration:none}.dropdown-list li a:hover{background:var(--red);color:var(--secondary-color)}\n"] }]
3191
+ }], propDecorators: { detailsRef: [{
3192
+ type: ViewChild,
3193
+ args: ['details']
3194
+ }], menuItems: [{
3195
+ type: ContentChildren,
3196
+ args: [MenuItem]
3197
+ }] } });
3198
+
3199
+ class StorageService {
3200
+ }
3201
+ class LocalStorageService extends StorageService {
3202
+ getItem(key) {
3203
+ return localStorage.getItem(key);
3204
+ }
3205
+ setItem(key, value) {
3206
+ localStorage.setItem(key, value);
3207
+ }
3208
+ removeItem(key) {
3209
+ localStorage.removeItem(key);
3210
+ }
3211
+ clear() {
3212
+ localStorage.clear();
3213
+ }
3214
+ get length() {
3215
+ return localStorage.length;
3216
+ }
3217
+ key(index) {
3218
+ return localStorage.key(index);
3219
+ }
3220
+ getAllKeys() {
3221
+ return Object.keys(localStorage);
3222
+ }
3223
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LocalStorageService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3224
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LocalStorageService, providedIn: 'root' });
3225
+ }
3226
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LocalStorageService, decorators: [{
3227
+ type: Injectable,
3228
+ args: [{
3229
+ providedIn: 'root',
3230
+ }]
3231
+ }] });
3232
+ // Provide LocalStorageService as the default implementation of StorageService
3233
+ function provideStorage() {
3234
+ return {
3235
+ provide: StorageService,
3236
+ useClass: LocalStorageService,
3237
+ };
3238
+ }
3239
+
3151
3240
  /*
3152
3241
  * Public API Surface of chatbot
3153
3242
  */
@@ -3157,5 +3246,5 @@ const DOOHBOT_API_URL = new InjectionToken('DOOHBOT_API_URL');
3157
3246
  * Generated bundle index. Do not edit.
3158
3247
  */
3159
3248
 
3160
- export { AccountService, AuthService, ChatWindowComponent, ChatbotApiService, DOOHBOT_API_CONFIG, DOOHBOT_API_URL, DialogComponent, DialogService, Doohbot, DoohbotInput, MessageListComponent, appConst, initializeApp };
3249
+ export { AccountService, AuthService, ChatFacadeService, ChatHistoryService, ChatWindowComponent, ChatbotApiService, Chips, DOOHBOT_API_CONFIG, DOOHBOT_API_URL, DialogComponent, DialogService, Doohbot, DoohbotInput, DropdownMenu, LocalStorageService, MenuItem, MessageListComponent, SnackBar, StorageService, ThemeService, appConst, initializeApp, provideStorage };
3161
3250
  //# sourceMappingURL=aakash58-chatbot.mjs.map