1.1.47 • Published 6 years ago

@gb-pkm/components v1.1.47

Weekly downloads
107
License
-
Repository
-
Last release
6 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

6 years ago

1.1.46

6 years ago

1.1.45

6 years ago

1.1.44

6 years ago

1.1.43

6 years ago

1.1.41

6 years ago

1.1.40

6 years ago

1.1.32

6 years ago

1.1.31

6 years ago

1.1.30

6 years ago

1.1.29

6 years ago

1.1.28

6 years ago

1.1.27

6 years ago

1.1.26

6 years ago

1.1.25

6 years ago

1.1.24

6 years ago

1.1.23

6 years ago

1.1.22

6 years ago

1.1.21

6 years ago

1.1.20

6 years ago

1.1.19

6 years ago

1.1.18

6 years ago

1.1.15

6 years ago

1.1.17

6 years ago

1.1.16

6 years ago

1.1.14

6 years ago

1.1.13

6 years ago

1.1.12

6 years ago

1.1.11

6 years ago

1.1.10

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.0.100

6 years ago

1.0.99

6 years ago

1.0.98

6 years ago

1.0.96

6 years ago

1.0.95

6 years ago

1.0.94

6 years ago

1.0.93

6 years ago

1.0.92

6 years ago

1.0.91

6 years ago

1.0.88

6 years ago

1.0.87

6 years ago

1.0.86

6 years ago

1.0.73

6 years ago

1.0.72

6 years ago

1.0.71

6 years ago

1.0.70

6 years ago

1.0.68

6 years ago

1.0.67

6 years ago

1.0.66

6 years ago

1.0.65

6 years ago

1.0.64

6 years ago

1.0.63

6 years ago

1.0.62

6 years ago

1.0.61

6 years ago

1.0.60

6 years ago

1.0.59

6 years ago

1.0.58

6 years ago

1.0.56

6 years ago

1.0.55

6 years ago

1.0.54

6 years ago

1.0.53

6 years ago

1.0.52

6 years ago

1.0.51

6 years ago

1.0.50

6 years ago

1.0.49

6 years ago

1.0.48

6 years ago

1.0.47

6 years ago

1.0.46

6 years ago

1.0.45

6 years ago

1.0.44

6 years ago

1.0.43

6 years ago

1.0.42

6 years ago

1.0.41

6 years ago

1.0.40

6 years ago

1.0.39

6 years ago

1.0.37

6 years ago

1.0.36

6 years ago

1.0.35

6 years ago

1.0.33

6 years ago

1.0.32

6 years ago

1.0.31

6 years ago

1.0.30

6 years ago

1.0.29

6 years ago

1.0.28

6 years ago

1.0.27

6 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.5

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago