1.1.47 • Published 4 years ago

@gb-pkm/components v1.1.47

Weekly downloads
107
License
-
Repository
-
Last release
4 years ago

Components

Dropdown

Importing:

@NgModule({
  imports: [GbDropdownModule]
})

Using:

<gb-dropdown>
   <gb-dropdown-item>
     Item_1
   </gb-dropdown-item>
   <gb-dropdown-item>
     Item_2
   </gb-dropdown-item>
 </gb-dropdown>

Notification

Importing:

@NgModule({
  imports: [GbNotificationModule]
})

Using:

constructor(private notificationService: GbNotificationService) {
    this.showNotification();
}

public showNotification() {
    this.notificationService.createNotification('Notification text', NotificationType.INFO, 3000);
}

Popover

Importing:

@NgModule({
  imports: [GbPopoverModule]
})

Using:

<div #popoverElement>
  Popover
</div>
<popover [element]="popoverElement">
  Popover
</popover>

Modal window

@NgModule({
  imports: [GbModalWindowModule.forRoot()]
})

Modal in template:

<button (click)="openModalWithId('modalWindow')">
  Open modal
</button>

<button (click)="openModalWithComponent(modalWindow)">
  Open modal component
</button>

<gb-modal-window #modalWindow
                 modalId="modalWindow"
                 [title]="'Modal title'">
  <div modal-body>
    Modal body
  </div>
  <div modal-footer>
    Modal footer
  </div>
</gb-modal-window>
constructor(public modalService: GbModalWindowService) {
}

public openModalWithId(id: string): void {
    this.modalService.openModal(id);
}

public openModalWithComponent(modal: GbModalWindowComponent): void {
    this.modalService.openModal(modal);
}

Modal as a component:

export class ModalComponent extends GbModalWindow<InputData, OutputData> {

  public data: InputData;

  constructor() {
    super();
  }

  public setData(data: InputData): any {
    this.data = data;
  }

  public save(): void {
    this.selected.next(outputData as OutputData);
  }
}
<gb-modal-window [title]="'Modal window'">
  <div modal-body>
   Modal body
  </div>
  <div modal-footer>
    <button (click)="close()">
      Close
    </button>
    <button (click)="save()">
      Save
    </button>
  </div>
</gb-modal-window>
constructor(public modalService: GbModalWindowService) {
}

public openModalComponent(): void {
    this.modalService.openModalComponent(ModalComponent);
}

Settings:

GbModalWindowSettings

padding: boolean;
closable: boolean;
closeOnOutsideClick: boolean;
hasBackground: boolean;
type: ModalType;
<gb-modal-window [settings]="settings"></gb-modal-window>
modalWindow.open(settings);

Context menu

Importing:

@NgModule({
  imports: [GbContextMenuModule]
})

Using:

<div gbContextMenu>
  Context menu container
  <gb-context-menu>
    Context menu content
  </gb-context-menu>
</div>

Pipes

Importing:

@NgModule({
  imports: [GbPipesModule]
})

Highlight

Map Values

New Array

Object keys

Safe html

Object values

Directives

Importing:

@NgModule({
  imports: [GbDirectivesModule]
})

Click outside

Lifecycle

Stop propagation

Number

1.1.47

4 years ago

1.1.46

4 years ago

1.1.45

4 years ago

1.1.44

4 years ago

1.1.43

5 years ago

1.1.41

5 years ago

1.1.40

5 years ago

1.1.32

5 years ago

1.1.31

5 years ago

1.1.30

5 years ago

1.1.29

5 years ago

1.1.28

5 years ago

1.1.27

5 years ago

1.1.26

5 years ago

1.1.25

5 years ago

1.1.24

5 years ago

1.1.23

5 years ago

1.1.22

5 years ago

1.1.21

5 years ago

1.1.20

5 years ago

1.1.19

5 years ago

1.1.18

5 years ago

1.1.15

5 years ago

1.1.17

5 years ago

1.1.16

5 years ago

1.1.14

5 years ago

1.1.13

5 years ago

1.1.12

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.0.100

5 years ago

1.0.99

5 years ago

1.0.98

5 years ago

1.0.96

5 years ago

1.0.95

5 years ago

1.0.94

5 years ago

1.0.93

5 years ago

1.0.92

5 years ago

1.0.91

5 years ago

1.0.88

5 years ago

1.0.87

5 years ago

1.0.86

5 years ago

1.0.73

5 years ago

1.0.72

5 years ago

1.0.71

5 years ago

1.0.70

5 years ago

1.0.68

5 years ago

1.0.67

5 years ago

1.0.66

5 years ago

1.0.65

5 years ago

1.0.64

5 years ago

1.0.63

5 years ago

1.0.62

5 years ago

1.0.61

5 years ago

1.0.60

5 years ago

1.0.59

5 years ago

1.0.58

5 years ago

1.0.56

5 years ago

1.0.55

5 years ago

1.0.54

5 years ago

1.0.53

5 years ago

1.0.52

5 years ago

1.0.51

5 years ago

1.0.50

5 years ago

1.0.49

5 years ago

1.0.48

5 years ago

1.0.47

5 years ago

1.0.46

5 years ago

1.0.45

5 years ago

1.0.44

5 years ago

1.0.43

5 years ago

1.0.42

5 years ago

1.0.41

5 years ago

1.0.40

5 years ago

1.0.39

5 years ago

1.0.37

5 years ago

1.0.36

5 years ago

1.0.35

5 years ago

1.0.33

5 years ago

1.0.32

5 years ago

1.0.31

5 years ago

1.0.30

5 years ago

1.0.29

5 years ago

1.0.28

5 years ago

1.0.27

5 years ago

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.5

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago