spiderly 19.0.9 → 19.1.0-preview

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.
@@ -5,16 +5,20 @@ import { AppSidebarComponent } from './sidebar/sidebar.component';
5
5
  import { SideMenuTopBarComponent } from './sidemenu-topbar/sidemenu-topbar.component';
6
6
  import { LayoutBaseService } from '../../services/app-layout-base.service';
7
7
  import { SpiderlyMenuItem } from './sidebar/sidebar-menu.component';
8
- import { MenuItem } from 'primeng/api';
9
8
  import * as i0 from "@angular/core";
10
9
  export declare class SpiderlyLayoutComponent implements OnDestroy {
11
10
  protected layoutService: LayoutBaseService;
12
11
  protected renderer: Renderer2;
13
12
  protected router: Router;
14
13
  menu: SpiderlyMenuItem[];
15
- sideMenu: MenuItem[];
16
- topMenu: MenuItem[];
14
+ sideMenu: SpiderlyMenuItem[];
15
+ topMenu: SpiderlyMenuItem[];
17
16
  isSideMenuLayout: boolean;
17
+ /**
18
+ * Determines whether to show background color on hover
19
+ * for root top menu items. Defaults to `false`.
20
+ */
21
+ showHoverBgOnRootTopMenuItems: boolean;
18
22
  overlayMenuOpenSubscription: Subscription;
19
23
  menuOutsideClickListener: any;
20
24
  profileMenuOutsideClickListener: any;
@@ -41,5 +45,5 @@ export declare class SpiderlyLayoutComponent implements OnDestroy {
41
45
  ngOnDestroy(): void;
42
46
  onAfterNgDestroy: () => void;
43
47
  static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyLayoutComponent, never>;
44
- static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyLayoutComponent, "spiderly-layout", never, { "menu": { "alias": "menu"; "required": false; }; "isSideMenuLayout": { "alias": "isSideMenuLayout"; "required": false; }; }, {}, never, ["[ACTIONS]"], true, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyLayoutComponent, "spiderly-layout", never, { "menu": { "alias": "menu"; "required": false; }; "isSideMenuLayout": { "alias": "isSideMenuLayout"; "required": false; }; "showHoverBgOnRootTopMenuItems": { "alias": "showHoverBgOnRootTopMenuItems"; "required": false; }; }, {}, never, ["[ACTIONS]"], true, never>;
45
49
  }
@@ -1,14 +1,23 @@
1
1
  import { ConfigBaseService } from '../../../services/config-base.service';
2
- import { MenuItem } from 'primeng/api';
2
+ import { SpiderlyMenuItem } from '../sidebar/sidebar-menu.component';
3
+ import { AuthBaseService } from '../../../services/auth-base.service';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class TopBarComponent {
6
+ private authService;
5
7
  private config;
6
- menu: MenuItem[];
8
+ menu: SpiderlyMenuItem[];
7
9
  companyName: string;
8
10
  logoPath: string;
9
- isSideMenuActive: boolean;
10
- constructor(config: ConfigBaseService);
11
+ /**
12
+ * Determines whether to show background color on hover
13
+ * for root menu items. Defaults to `false`.
14
+ */
15
+ showHoverBgOnRootItems: boolean;
16
+ private permissionSubscription;
17
+ constructor(authService: AuthBaseService, config: ConfigBaseService);
11
18
  ngOnInit(): void;
19
+ hideMenuItemsBasedOnPermissions: (menu: SpiderlyMenuItem[], currentUserPermissionCodes: string[]) => void;
20
+ ngOnDestroy(): void;
12
21
  static ɵfac: i0.ɵɵFactoryDeclaration<TopBarComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<TopBarComponent, "spiderly-topbar", never, { "menu": { "alias": "menu"; "required": false; }; }, {}, never, ["[ACTIONS]"], true, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<TopBarComponent, "spiderly-topbar", never, { "menu": { "alias": "menu"; "required": false; }; "showHoverBgOnRootItems": { "alias": "showHoverBgOnRootItems"; "required": false; }; }, {}, never, ["[ACTIONS]"], true, never>;
14
23
  }
@@ -115,7 +115,7 @@ export declare class Column<T = any> {
115
115
  name?: string;
116
116
  field?: string & keyof T;
117
117
  filterField?: string & keyof T;
118
- filterType?: 'text' | 'date' | 'multiselect' | 'boolean' | 'numeric';
118
+ filterType?: 'text' | 'date' | 'multiselect' | 'boolean' | 'numeric' | 'blob';
119
119
  filterPlaceholder?: string;
120
120
  showMatchModes?: boolean;
121
121
  showAddButton?: boolean;
@@ -1,5 +1,4 @@
1
1
  import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
2
- import { ActivatedRoute, Router } from '@angular/router';
3
2
  import { Table, TableFilterEvent, TableLazyLoadEvent } from 'primeng/table';
4
3
  import { Observable } from 'rxjs';
5
4
  import { TranslocoService } from '@jsverse/transloco';
@@ -11,37 +10,46 @@ import { BaseEntity } from '../../entities/base-entity';
11
10
  import { PrimengOption } from '../../entities/primeng-option';
12
11
  import * as i0 from "@angular/core";
13
12
  export declare class SpiderlyDataViewComponent<T> implements OnInit {
14
- private router;
15
- private route;
16
13
  private translocoService;
17
14
  private locale;
18
15
  table: Table;
16
+ /**
17
+ * List of items in the table.
18
+ * Should be provided only when `hasLazyLoad === false`.
19
+ */
19
20
  items: T[];
20
21
  rows: number;
21
22
  filters: Filter<T>[];
22
23
  totalRecords: number;
23
- showCardWrapper: boolean;
24
24
  onLazyLoad: EventEmitter<TableFilter>;
25
+ showCardWrapper: boolean;
26
+ /**
27
+ * Whether to display additional data on the right side of the paginator.
28
+ * Defaults to `false`.
29
+ */
30
+ showPaginatorRightData: boolean;
31
+ showTotalRecordsNumber: boolean;
32
+ applyFiltersIcon: string;
33
+ clearFiltersIcon: string;
25
34
  getTableDataObservableMethod: (tableFilter: TableFilter) => Observable<TableResponse>;
26
35
  lastLazyLoadEvent: TableLazyLoadEvent;
27
36
  loading: boolean;
28
37
  matchModeDateOptions: SelectItem[];
29
38
  matchModeNumberOptions: SelectItem[];
30
39
  cardBody: TemplateRef<any>;
31
- constructor(router: Router, route: ActivatedRoute, translocoService: TranslocoService, locale: string);
40
+ constructor(translocoService: TranslocoService, locale: string);
32
41
  ngOnInit(): void;
33
42
  lazyLoad(event: TableLazyLoadEvent): void;
34
43
  filter(event: TableFilterEvent): void;
35
44
  getDefaultMatchMode(filterType: string): any;
36
45
  getMatchModeOptions(filterType: string): SelectItem<any>[];
37
- navigateToDetails(rowId: number): void;
38
46
  reload(): void;
39
47
  colTrackByFn(index: any, item: any): any;
40
48
  actionTrackByFn(index: any, item: Action): string;
41
49
  applyFilters: () => void;
42
50
  clearFilters(): void;
43
51
  static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyDataViewComponent<any>, never>;
44
- static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyDataViewComponent<any>, "spiderly-data-view", never, { "items": { "alias": "items"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "showCardWrapper": { "alias": "showCardWrapper"; "required": false; }; "getTableDataObservableMethod": { "alias": "getTableDataObservableMethod"; "required": false; }; }, { "onLazyLoad": "onLazyLoad"; }, ["cardBody"], never, true, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyDataViewComponent<any>, "spiderly-data-view", never, { "items": { "alias": "items"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "showCardWrapper": { "alias": "showCardWrapper"; "required": false; }; "showPaginatorRightData": { "alias": "showPaginatorRightData"; "required": false; }; "showTotalRecordsNumber": { "alias": "showTotalRecordsNumber"; "required": false; }; "applyFiltersIcon": { "alias": "applyFiltersIcon"; "required": false; }; "clearFiltersIcon": { "alias": "clearFiltersIcon"; "required": false; }; "getTableDataObservableMethod": { "alias": "getTableDataObservableMethod"; "required": false; }; }, { "onLazyLoad": "onLazyLoad"; }, ["cardBody"], ["[PAGINATORRIGHT]"], true, never>;
45
53
  }
46
54
  export interface DataViewCardBody<T> {
47
55
  $implicit: T;
@@ -52,7 +60,7 @@ export interface Filter<T extends BaseEntity> {
52
60
  name?: string;
53
61
  field?: string & keyof T;
54
62
  filterField?: string & keyof T;
55
- filterType?: 'text' | 'date' | 'multiselect' | 'boolean' | 'numeric';
63
+ filterType?: 'text' | 'date' | 'multiselect' | 'boolean' | 'numeric' | 'blob';
56
64
  filterPlaceholder?: string;
57
65
  showMatchModes?: boolean;
58
66
  dropdownOrMultiselectValues?: PrimengOption[];
@@ -1,14 +1,17 @@
1
- import { OnInit } from '@angular/core';
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { BaseControl } from '../base-control';
3
3
  import { TranslocoService } from '@jsverse/transloco';
4
+ import { CheckboxChangeEvent } from 'primeng/checkbox';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class SpiderlyCheckboxComponent extends BaseControl implements OnInit {
6
7
  protected translocoService: TranslocoService;
7
8
  fakeLabel: boolean;
8
9
  initializeToFalse: boolean;
9
10
  inlineLabel: boolean;
11
+ onChange: EventEmitter<CheckboxChangeEvent>;
10
12
  constructor(translocoService: TranslocoService);
11
13
  ngOnInit(): void;
14
+ change: (event: CheckboxChangeEvent) => void;
12
15
  static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyCheckboxComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyCheckboxComponent, "spiderly-checkbox", never, { "fakeLabel": { "alias": "fakeLabel"; "required": false; }; "initializeToFalse": { "alias": "initializeToFalse"; "required": false; }; "inlineLabel": { "alias": "inlineLabel"; "required": false; }; }, {}, never, never, true, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyCheckboxComponent, "spiderly-checkbox", never, { "fakeLabel": { "alias": "fakeLabel"; "required": false; }; "initializeToFalse": { "alias": "initializeToFalse"; "required": false; }; "inlineLabel": { "alias": "inlineLabel"; "required": false; }; }, { "onChange": "onChange"; }, never, never, true, never>;
14
17
  }
@@ -10,6 +10,7 @@ export declare class SpiderlyTranslocoModule {
10
10
  }
11
11
  export interface SpiderlyTranslocoConfig {
12
12
  availableLangs: string[];
13
+ preloadLangs: string[];
13
14
  defaultLang: string;
14
15
  fallbackLang: string;
15
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spiderly",
3
- "version": "19.0.9",
3
+ "version": "19.1.0-preview",
4
4
  "author": "Filip Trivan",
5
5
  "license": "MIT",
6
6
  "description": "Spiderly Angular Library to use in combination with Spiderly.",
@@ -15,7 +15,13 @@
15
15
  }
16
16
 
17
17
  ::ng-deep{
18
+ .show-hover-bg-on-root-items {
19
+ .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content {
20
+ background-color: transparent !important;
21
+ }
22
+ }
18
23
  .p-menubar-item-link {
24
+ background-color: transparent !important;
19
25
  padding: 10px !important;
20
26
  font-size: 15px !important;
21
27
  .pi {
@@ -1,3 +1,4 @@
1
+
1
2
  ::ng-deep{
2
3
  .p-datatable-tbody {
3
4
  display: flex;
@@ -12,6 +13,10 @@
12
13
  background-color: transparent !important;
13
14
  }
14
15
 
16
+ .p-paginator {
17
+ padding: 18px 9px 0px 9px !important;
18
+ }
19
+
15
20
  .p-fluid {
16
21
  width: 100% !important;
17
22
  }
@@ -29,6 +34,7 @@
29
34
  }
30
35
  }
31
36
 
37
+
32
38
  .data-view-grid {
33
39
  display: grid;
34
40
  gap: 18px;
@@ -0,0 +1,23 @@
1
+ ::ng-deep {
2
+ .p-checkbox-false {
3
+ .p-checkbox-box {
4
+ border-color: var(--p-checkbox-checked-border-color);
5
+ background: var(--p-checkbox-checked-background);
6
+ }
7
+ .p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
8
+ border-color: var(--p-checkbox-checked-hover-border-color);
9
+ background: var(--p-checkbox-checked-hover-background);
10
+ }
11
+ .p-checkbox-false:has(.p-checkbox.p-disabled) .p-checkbox-false-icon {
12
+ color: var(--p-checkbox-icon-disabled-color);
13
+ }
14
+ }
15
+ }
16
+
17
+ .p-checkbox-false-icon {
18
+ position: absolute;
19
+ top: 3px;
20
+ left: 2.7px;
21
+ font-size: 12.25px;
22
+ color: var(--p-checkbox-icon-checked-color);
23
+ }