0.0.67 • Published 9 months ago

ngp-core v0.0.67

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

ngp-core

listener

stock all observables, timeout and interval, kill all when component is destroying

methods

nameargumentsreturngoal
addSubscriptionSubscriptionvoidadd subscription in list will destroying when component destroy
addObservableObservable, Function next, Optional(Function error), Optional(Function complete)voidcreate subscription with observable and add it in list will destroying when component destroy
addTimeoutany (id timeout)any (id timeout)add timeout in list will clearing when component destroy
addIntervalany (id interval)any (id interval)add interval in list will clearing when component destroy
clearTimeoutany (id timeout)voidclear and remove of list
clearIntervalany (id timeout)voidclear and remove of list
appendTimeoutTimeout, Function executeany (id timeout)create timeout with time and execute your method
appendIntervalTimeout, Function executeany (id interval)create interval with time and execute your method
onDestroyoverrideable to execute on destroyvoidexecute when component is destroying

directive

builder template in component, please use readme in other library to know use it

  • ngp-body
  • ngp-event
  • ngp-header
  • ngp-footer
  • ngp-title

type

Color

enum of color bootstrap

  • DARK_BLUE: primary
  • BLUE: info
  • GREY: secondary
  • BLACK: dark
  • WHITE: white
  • GREEN: success
  • RED: danger
  • YELLOW: warning
  • BEIGE: light

TimeoutUnit

  • MILLISECOND
  • SECOND
  • MINUTE
  • HOUR

alias

  • ColorProperty: Color | 'dark_blue' | 'blue' | 'grey' | 'black' | 'white' | 'green' | 'red' | 'yellow' | RGB | string
  • EventType: keyof HTMLElementEventMap
  • BooleanProperty: boolean | 'true' | 'false'
  • NumberProperty: number | string
  • TimeoutUnitProperty: TimeoutUnit | 'ms' | 's' | 'm' | 'h'
  • TimeoutProperty: Timeout | number

model

ngp-event

propertytypeoptionalcontain
namestringtrueid component
typeEventTypefalsetype event receive
eventEventtrueevent catching

RGB

propertytypeoptionalcontain
rednumberfalseratio red
bluenumberfalseratio blue
greennumberfalseratio green
alphanumbertruedefault 1 opacity 0 -> 1

timeout

propertytypeoptionalcontain
valuenumberfalsetime
unitTimeoutUnittruedefault millisecond

function

component

nameargumentsreturngoal
propertyToBooleanBooleanProperty/undefinedbooleanconvert multiple type to boolean
propertyToNumberNumberProperty/undefinednumber/undefinedconvert multiple type to number
propertyToColorColorProperty/undefined{color?: Color, custom?: string}/undefinedconvert multiple type to Color
rgbToColorRGB/undefinedstring/undefinedrgb to rgba syntax css
propertyToTimeoutUnitTimeoutUnitPropertyTimeoutUnitconvert multiple type to TimeoutUnit
millisecondToUnittime: number; unit: TimeoutUnitnumberconvert millisecond to unit
timeoutToMillisecondTimeoutnumbertimeout to millisecond

observable

nameargumentsreturngoal
newEmitteranyBehaviorSubject
newEmitterNullableBehaviorSubject
emitterToObservable() -> BehaviorSubjectObservablecreate observable with skip default value
emitterToLimitObservable() -> BehaviorSubject; limit: numberObservablecreate obsservable skip default and take limit
observableErrorCompleteObservable/undefined; ((error) -> Observable/undefined)/undefined; complete: (() ->void)/undefinedObservable/undefinedapply error and/or complete to observable
subscribeObservable/undefined; next: (any) => void, ((error) -> Observable/undefined)/undefined; complete: (() ->void)/undefinedSubscription/undefinedapply next, error and/or complete to observable

enum

nameargumentsreturngoal
enumKeyOf{s: string: any}; key: stringany/undefinedfind in enum by name
valueOf{s: string: any}; value: anyany/undefinedfind in enum by value
0.0.63

12 months ago

0.0.64

12 months ago

0.0.65

12 months ago

0.0.66

12 months ago

0.0.67

9 months ago

0.0.62

12 months ago

0.0.60

1 year ago

0.0.61

1 year ago

0.0.59

1 year ago

0.0.55

1 year ago

0.0.56

1 year ago

0.0.57

1 year ago

0.0.58

1 year ago

0.0.40

2 years ago

0.0.41

2 years ago

0.0.42

2 years ago

0.0.43

2 years ago

0.0.44

2 years ago

0.0.45

2 years ago

0.0.46

2 years ago

0.0.47

2 years ago

0.0.38

2 years ago

0.0.39

2 years ago

0.0.51

2 years ago

0.0.52

2 years ago

0.0.53

2 years ago

0.0.54

1 year ago

0.0.50

2 years ago

0.0.48

2 years ago

0.0.49

2 years ago

0.0.37

2 years ago

0.0.32

2 years ago

0.0.33

2 years ago

0.0.34

2 years ago

0.0.35

2 years ago

0.0.36

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.30

2 years ago

0.0.26

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.2-1.5

2 years ago

0.0.2-1.4

2 years ago

0.0.2-1.7

2 years ago

0.0.2-1.6

2 years ago

0.0.2-1.1

2 years ago

0.0.2-1.3

2 years ago

0.0.2-1.2

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago