BeefreeSDK / beefree-sdk-npm-official

Official NPM package of Beefree SDK
https://developers.beefree.io
Apache License 2.0
19 stars 7 forks source link

chore: added content dialog row display conditions type #148

Closed davidesamp closed 5 months ago

davidesamp commented 5 months ago

Description

Added rowDisplayConditions content dialog type

Motivation and Context

Close https://github.com/BeefreeSDK/beefree-sdk-npm-official/issues/139

Usage examples


import BeeSDK from '@mailupinc/bee-plugin'

const sdk = new BeeSDK()
sdk.getToken()

const handleRowDisplayConditionsResponse = (resolve) => {
  const mockedRowDisplayConditions: RowDisplayConditionsHandler = {
    after: 'sample-after',
    before: 'sample-before',
    description: 'sample-description',
    label: 'sample-label',
    type: 'sample-type',
  }
  return resolve(mockedRowDisplayConditions)
}

const beeConfig :IBeeConfig = {
   ...,
   contentDialogs: {
     rowDisplayConditions: {
        label: 'Row Display Conditions',
        handler: handleRowDisplayConditionsResponse
      }
   }
}

## Types of changes

- [X] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
github-actions[bot] commented 5 months ago

Code Coverage Report

Coverage after merging chore/dialog-row-display-cond into master

81.94%
Coverage Report
FileBranchesFuncsLinesUncovered Lines
src
   index.ts60%5.88%57.95%..., 85, 95, 96, 99
src/services
   api.ts100%50%100%
   axios.ts100%100%100%
src/types
   bee.ts100%100%100%
src/utils
   Constants.ts100%100%100%
   utils.ts0%0%73.33%..., 8, 8, 8, 8