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

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.0.100

7 years ago

1.0.99

7 years ago

1.0.98

7 years ago

1.0.96

7 years ago

1.0.95

7 years ago

1.0.94

7 years ago

1.0.93

7 years ago

1.0.92

7 years ago

1.0.91

7 years ago

1.0.88

7 years ago

1.0.87

7 years ago

1.0.86

7 years ago

1.0.73

7 years ago

1.0.72

7 years ago

1.0.71

7 years ago

1.0.70

7 years ago

1.0.68

7 years ago

1.0.67

7 years ago

1.0.66

7 years ago

1.0.65

7 years ago

1.0.64

7 years ago

1.0.63

7 years ago

1.0.62

7 years ago

1.0.61

7 years ago

1.0.60

7 years ago

1.0.59

7 years ago

1.0.58

7 years ago

1.0.56

7 years ago

1.0.55

7 years ago

1.0.54

7 years ago

1.0.53

7 years ago

1.0.52

7 years ago

1.0.51

7 years ago

1.0.50

7 years ago

1.0.49

7 years ago

1.0.48

7 years ago

1.0.47

7 years ago

1.0.46

7 years ago

1.0.45

7 years ago

1.0.44

7 years ago

1.0.43

7 years ago

1.0.42

7 years ago

1.0.41

7 years ago

1.0.40

7 years ago

1.0.39

7 years ago

1.0.37

7 years ago

1.0.36

7 years ago

1.0.35

7 years ago

1.0.33

7 years ago

1.0.32

7 years ago

1.0.31

7 years ago

1.0.30

7 years ago

1.0.29

7 years ago

1.0.28

7 years ago

1.0.27

7 years ago

1.0.26

7 years ago

1.0.25

7 years ago

1.0.24

7 years ago

1.0.23

7 years ago

1.0.22

7 years ago

1.0.21

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.5

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago