Shared components for Kong entities.
- Features
- Requirements
- Included components
- Included composables
- Usage
- Individual component documentation
- Individual composables documentation
- Sandbox shared utilities
- Modal component for entity toggle confirmation (see the EntityToggleModal docs for more info)
- Modal component for entity delete confirmation (see the EntityDeleteModal docs for more info)
- Base table component for entity list views (see the EntityBaseTable docs for more info)
- Filter component for filtering entities (see the EntityFilter docs for more info)
-
vue
andvue-router
must be initialized in the host application -
@kong/kongponents
must be added as adependency
in the host application, globally available via the Vue Plugin installation, and the package's style imports must be added in the app entry file. See here for instructions on installing Kongponents. -
@kong-ui-public/i18n
must be available as adependency
in the host application. -
axios
must be installed as a dependency in the host application
EntityDeleteModal
EntityBaseTable
EntityBaseForm
EntityFilter
PermissionsWrapper
EntityFormSection
EntityLink
EntityToggleModal
EntityBaseConfigCard
Reference the individual component docs for more info.
useAxios
Reference the individual composables docs for more info.
Install the component in your host application
yarn add @kong-ui-public/entities-shared
Note: If you are installing
@kong-ui-public/entities-shared
into another package within this repository, you will need to build it first before attempting to run locally withpnpm --filter="@kong-ui-public/entities-shared" run build
.
Import the component in your host application
import { EntityDeleteModal, EntityBaseTable } from '@kong-ui-public/entities-shared'
import '@kong-ui-public/entities-shared/dist/style.css'
<EntityDeleteModal.vue />
<EntityBaseTable.vue />
<EntityBaseForm.vue />
<EntityFilter.vue />
<PermissionsWrapper.vue />
<EntityFormSection.vue />
<EntityLink.vue />
<EntityEmptyState.vue />
<EntityToggleModal.vue />
<EntityBaseConfigCard.vue />
The individual entities sandboxes all share some common components/utilities which lives in the /packages/entities/entities-shared/sandbox/shared
folder and can be imported via the @entities-shared-sandbox/...
alias. Those components are not getting exported by the package and are only available in "dev" environment.
Docs.