@kong-ui-public/entities-shared 3.72.1 → 3.72.2-pr.3999.7a488ec91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +2 -0
  2. package/dist/_plugin-vue_export-helper-B2ERpA_4.cjs +1 -0
  3. package/dist/{_plugin-vue_export-helper-CH7HFDMi.js → _plugin-vue_export-helper-CnEmxi1C.js} +216 -213
  4. package/dist/deck-editor.cjs.js +1 -1
  5. package/dist/deck-editor.es.js +1 -1
  6. package/dist/entities-shared.cjs.js +75 -75
  7. package/dist/entities-shared.es.js +2326 -2154
  8. package/dist/style.css +1 -1
  9. package/dist/types/components/common/DeckCallout.vue.d.ts +2 -2
  10. package/dist/types/components/entity-base-config-card/ConfigCardDisplay.vue.d.ts +16 -14
  11. package/dist/types/components/entity-base-config-card/ConfigCardDisplay.vue.d.ts.map +1 -1
  12. package/dist/types/components/entity-base-config-card/ConfigCardRowSchemaScope.vue.d.ts +26 -0
  13. package/dist/types/components/entity-base-config-card/ConfigCardRowSchemaScope.vue.d.ts.map +1 -0
  14. package/dist/types/components/entity-base-config-card/EntityBaseConfigCard.vue.d.ts +25 -13
  15. package/dist/types/components/entity-base-config-card/EntityBaseConfigCard.vue.d.ts.map +1 -1
  16. package/dist/types/components/entity-base-config-card/EntityConfigCardView.vue.d.ts +247 -0
  17. package/dist/types/components/entity-base-config-card/EntityConfigCardView.vue.d.ts.map +1 -0
  18. package/dist/types/components/entity-base-config-card/reader-config-card.d.ts +34 -0
  19. package/dist/types/components/entity-base-config-card/reader-config-card.d.ts.map +1 -0
  20. package/dist/types/components/entity-base-config-card/record.d.ts +6 -0
  21. package/dist/types/components/entity-base-config-card/record.d.ts.map +1 -0
  22. package/dist/types/components/entity-base-config-card/row-schema.d.ts +11 -0
  23. package/dist/types/components/entity-base-config-card/row-schema.d.ts.map +1 -0
  24. package/dist/types/components/entity-base-table/EntityBaseTable.vue.d.ts +1 -1
  25. package/dist/types/composables/index.d.ts +3 -3
  26. package/dist/types/composables/useDeckOptions.d.ts +3 -2
  27. package/dist/types/composables/useDeckOptions.d.ts.map +1 -1
  28. package/dist/types/composables/useSchema.d.ts +3 -3
  29. package/dist/types/composables/useSchema.d.ts.map +1 -1
  30. package/dist/types/index.d.ts +4 -3
  31. package/dist/types/index.d.ts.map +1 -1
  32. package/dist/types/types/entity-base-config-card.d.ts +14 -0
  33. package/dist/types/types/entity-base-config-card.d.ts.map +1 -1
  34. package/dist/types/utils/config-card.d.ts +9 -0
  35. package/dist/types/utils/config-card.d.ts.map +1 -0
  36. package/package.json +2 -2
  37. package/dist/_plugin-vue_export-helper-CaP0B8XI.cjs +0 -1
@@ -0,0 +1,34 @@
1
+ import type { InjectionKey, Ref } from 'vue';
2
+ import type { ConfigCardCodeFormat, DeckConfigOptions, EntityConfigCardViewConfig } from '../../types';
3
+ /**
4
+ * Behavior owned by `EntityBaseConfigCard`: request metadata, persistence, decK token
5
+ * generation, resolver compatibility and the loading/error state. Never part of a View's props.
6
+ */
7
+ export interface ReaderConfigCardContext {
8
+ /** The View config the reader renders with and passes to its default slot. It identifies the receiving View. */
9
+ config: EntityConfigCardViewConfig;
10
+ status: 'loading' | 'error' | 'ready';
11
+ errorMessage: string;
12
+ /** The existing reader also uses title and actions as field slots when those keys exist. */
13
+ legacyFieldSlots?: boolean;
14
+ requestUrl: string;
15
+ /** Schema provided above the reader with `useSchemaProvider` */
16
+ schema?: Record<string, any>;
17
+ formatsToHide: ConfigCardCodeFormat[];
18
+ deckOptions?: boolean | DeckConfigOptions;
19
+ deckCalloutPreferenceKey?: string;
20
+ formatPreferenceKey?: string;
21
+ /** Code record redacted in the reader's legacy resolver order */
22
+ redactedCodeBlockRecord?: Record<string, any>;
23
+ configCardDoc: string;
24
+ label: string;
25
+ }
26
+ export declare const READER_CONFIG_CARD_CONTEXT: InjectionKey<Readonly<Ref<ReaderConfigCardContext>> | undefined>;
27
+ /**
28
+ * The reader context for the View rendered with the reader's own config object: the reader's
29
+ * card, or the detail View given the `config` of the reader's default slot. Other Views receive
30
+ * `undefined`. Matching follows prop updates, so a reused View instance gains or loses the
31
+ * context with its `config`.
32
+ */
33
+ export declare function useReaderConfigCardContext(config: () => EntityConfigCardViewConfig | undefined): Readonly<Ref<ReaderConfigCardContext | undefined>>;
34
+ //# sourceMappingURL=reader-config-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reader-config-card.d.ts","sourceRoot":"","sources":["../../../../src/components/entity-base-config-card/reader-config-card.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAEtG;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,gHAAgH;IAChH,MAAM,EAAE,0BAA0B,CAAA;IAClC,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;IACrC,YAAY,EAAE,MAAM,CAAA;IACpB,4FAA4F;IAC5F,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,aAAa,EAAE,oBAAoB,EAAE,CAAA;IACrC,WAAW,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAA;IACzC,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,iEAAiE;IACjE,uBAAuB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC7C,aAAa,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,0BAA0B,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,GAAG,SAAS,CAAwC,CAAA;AAEhJ;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,0BAA0B,GAAG,SAAS,GAAG,QAAQ,CAAC,GAAG,CAAC,uBAAuB,GAAG,SAAS,CAAC,CAAC,CAGnJ"}
@@ -0,0 +1,6 @@
1
+ import type { ConfigurationSchema } from '../../types';
2
+ /** Missing display fields belong to the derived card record, never to query data. */
3
+ export declare function withForceShowFields(record: Record<string, any>, configSchema: ConfigurationSchema): Record<string, any>;
4
+ /** Preserve API-schema first, display-schema second redaction for every entry point. */
5
+ export declare function redactConfigCardRecord(source: Record<string, any>, schema: Record<string, any> | undefined, configSchema: ConfigurationSchema): Record<string, any>;
6
+ //# sourceMappingURL=record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../../src/components/entity-base-config-card/record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAGtD,qFAAqF;AACrF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,YAAY,EAAE,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAMvH;AAED,wFAAwF;AACxF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,EAAE,YAAY,EAAE,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAUnK"}
@@ -0,0 +1,11 @@
1
+ import type { InjectionKey } from 'vue';
2
+ import type { RecordItem } from '../../types';
3
+ /**
4
+ * Resolves the API schema of the record a row's value comes from: the root record, or the
5
+ * Plugin or Policy record. Returns `undefined` for rows the View did not build, which keep the
6
+ * schema provided above them. Provided by `EntityConfigCardView`; never part of a public API.
7
+ */
8
+ export declare const CONFIG_CARD_ROW_SCHEMA: InjectionKey<(row: RecordItem) => {
9
+ schema?: Record<string, any>;
10
+ } | undefined>;
11
+ //# sourceMappingURL=row-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-schema.d.ts","sourceRoot":"","sources":["../../../../src/components/entity-base-config-card/row-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,YAAY,CAAC,CAAC,GAAG,EAAE,UAAU,KAAK;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE,GAAG,SAAS,CAAoC,CAAA"}
@@ -289,8 +289,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
289
289
  }>, {
290
290
  title: string;
291
291
  query: string;
292
- titleTag: HeaderTag;
293
292
  errorMessage: string | TableErrorMessage;
293
+ titleTag: HeaderTag;
294
294
  isLoading: boolean;
295
295
  tableHeaders: BaseTableHeaders;
296
296
  fetcher: (param: TableDataFetcherParams) => Promise<FetcherResponse>;
@@ -35,10 +35,10 @@ declare const _default: {
35
35
  useSchema: () => Readonly<import("vue").Ref<{
36
36
  [x: string]: any;
37
37
  } | undefined>>;
38
- useSchemaProvider: (schema: import("vue").Ref<{
38
+ useSchemaProvider: (schema: Readonly<import("vue").Ref<{
39
39
  [x: string]: any;
40
- }>) => void;
41
- useSubSchema: (subSchemaKey: string) => Readonly<import("vue").Ref<{
40
+ } | undefined>>) => void;
41
+ useSubSchema: (subSchemaKey: import("vue").MaybeRefOrGetter<string>) => Readonly<import("vue").Ref<{
42
42
  [x: string]: any;
43
43
  } | undefined>>;
44
44
  useTableState: typeof useTableState;
@@ -1,6 +1,7 @@
1
1
  import type { MaybeRefOrGetter } from 'vue';
2
- import type { KongManagerBaseEntityConfig, KongManagerBaseFormConfig, KonnectBaseEntityConfig, KonnectBaseFormConfig, SupportedEntityType } from '../types';
3
- export declare function useBaseEntityDeckOptions(config: MaybeRefOrGetter<KonnectBaseEntityConfig | KongManagerBaseEntityConfig>, entityType: MaybeRefOrGetter<SupportedEntityType>): {
2
+ import type { ConfigCardDisplayConfig } from '../utils/config-card';
3
+ import type { KongManagerBaseFormConfig, KonnectBaseFormConfig, SupportedEntityType } from '../types';
4
+ export declare function useBaseEntityDeckOptions(config: MaybeRefOrGetter<ConfigCardDisplayConfig>, entityType: MaybeRefOrGetter<SupportedEntityType | undefined>): {
4
5
  isDeckEnabled: import("vue").ComputedRef<boolean>;
5
6
  deckCustomizationOptions: import("vue").ComputedRef<boolean | import("..").DeckCustomizationOptions | undefined>;
6
7
  deckCalloutPreferenceKey: import("vue").ComputedRef<string | undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"useDeckOptions.d.ts","sourceRoot":"","sources":["../../../src/composables/useDeckOptions.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAE3C,OAAO,KAAK,EACV,2BAA2B,EAC3B,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,UAAU,CAAA;AAEjB,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,gBAAgB,CAAC,uBAAuB,GAAG,2BAA2B,CAAC,EAC/E,UAAU,EAAE,gBAAgB,CAAC,mBAAmB,CAAC;;;;EAoClD;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,gBAAgB,CAAC,qBAAqB,GAAG,yBAAyB,CAAC,EAC3E,UAAU,EAAE,gBAAgB,CAAC,mBAAmB,CAAC;;;;EAoClD"}
1
+ {"version":3,"file":"useDeckOptions.d.ts","sourceRoot":"","sources":["../../../src/composables/useDeckOptions.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAE3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAEnE,OAAO,KAAK,EACV,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,UAAU,CAAA;AAEjB,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,gBAAgB,CAAC,uBAAuB,CAAC,EACjD,UAAU,EAAE,gBAAgB,CAAC,mBAAmB,GAAG,SAAS,CAAC;;;;EAqC9D;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,gBAAgB,CAAC,qBAAqB,GAAG,yBAAyB,CAAC,EAC3E,UAAU,EAAE,gBAAgB,CAAC,mBAAmB,CAAC;;;;EAoClD"}
@@ -1,12 +1,12 @@
1
- import type { Ref } from 'vue';
1
+ import type { MaybeRefOrGetter, Ref } from 'vue';
2
2
  type Schema = Record<string, any>;
3
- export declare const useSchemaProvider: (schema: Ref<Schema>) => void;
3
+ export declare const useSchemaProvider: (schema: Readonly<Ref<Schema | undefined>>) => void;
4
4
  export declare const useSchema: () => Readonly<Ref<Schema | undefined>>;
5
5
  /**
6
6
  * find the sub schema by key and provide it as the parent schema for the children
7
7
  * @param subSchemaKey the key of the sub schema, or the index of an element when the parent schema is an array or set
8
8
  * @returns the sub schema or undefined
9
9
  */
10
- export declare const useSubSchema: (subSchemaKey: string) => Readonly<Ref<Schema | undefined>>;
10
+ export declare const useSubSchema: (subSchemaKey: MaybeRefOrGetter<string>) => Readonly<Ref<Schema | undefined>>;
11
11
  export {};
12
12
  //# sourceMappingURL=useSchema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSchema.d.ts","sourceRoot":"","sources":["../../../src/composables/useSchema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAIjC,eAAO,MAAM,iBAAiB,GAAI,QAAQ,GAAG,CAAC,MAAM,CAAC,SAEpD,CAAA;AAED,eAAO,MAAM,SAAS,QAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAE5D,CAAA;AAID;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,cAAc,MAAM,KAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAsBnF,CAAA"}
1
+ {"version":3,"file":"useSchema.d.ts","sourceRoot":"","sources":["../../../src/composables/useSchema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEhD,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAIjC,eAAO,MAAM,iBAAiB,GAAI,QAAQ,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,SAE1E,CAAA;AAED,eAAO,MAAM,SAAS,QAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAE5D,CAAA;AAID;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,cAAc,gBAAgB,CAAC,MAAM,CAAC,KAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAyBrG,CAAA"}
@@ -1,3 +1,4 @@
1
+ import EntityConfigCardView from './components/entity-base-config-card/EntityConfigCardView.vue';
1
2
  import OnboardingCard from './components/onboarding-card/OnboardingCard.vue';
2
3
  import EntityBaseConfigCard from './components/entity-base-config-card/EntityBaseConfigCard.vue';
3
4
  import ConfigCardItem from './components/entity-base-config-card/ConfigCardItem.vue';
@@ -22,10 +23,10 @@ import SensitiveInput from './components/common/SensitiveInput.vue';
22
23
  import TableTags from './components/common/TableTags.vue';
23
24
  declare const useAxios: typeof import("./composables/useAxios.ts").default, useDeleteUrlBuilder: typeof import("./composables/useDeleteUrlBuilder.ts").default, useBaseEntityDeckOptions: typeof import("./composables/useDeckOptions.ts").useBaseEntityDeckOptions, useBaseFormDeckOptions: typeof import("./composables/useDeckOptions.ts").useBaseFormDeckOptions, useErrors: typeof import("./composables/useErrors.ts").default, useExternalLinkCreator: typeof import("./composables/useExternalLinkCreator.ts").default, useFetchUrlBuilder: typeof import("./composables/useFetchUrlBuilder.ts").default, useFetcher: typeof import("./composables/useFetcher.ts").default, useFetcherCacheKey: typeof import("./composables/useFetcher.ts").useFetcherCacheKey, useDebouncedFilter: typeof import("./composables/useDebouncedFilter.ts").default, useStringHelpers: typeof import("./composables/useStringHelpers.ts").default, useHelpers: typeof import("./composables/useHelpers.ts").default, useGatewayFeatureSupported: typeof import("./composables/useGatewayFeatureSupported.ts").default, useTruncationDetector: typeof import("./composables/useTruncationDetector.ts").default, useValidators: typeof import("./composables/useValidators.ts").default, useSchema: () => Readonly<import("vue").Ref<{
24
25
  [x: string]: any;
25
- } | undefined>>, useSchemaProvider: (schema: import("vue").Ref<{
26
+ } | undefined>>, useSchemaProvider: (schema: Readonly<import("vue").Ref<{
26
27
  [x: string]: any;
27
- }>) => void, useTableState: typeof import("./composables/useTableState.ts").default, useManagedByEnabled: typeof import("./composables/useManagedByEnabled.ts").default, useManagedByColumn: typeof import("./composables/useManagedByColumn.ts").default;
28
- export { OnboardingCard, EntityBaseConfigCard, ConfigCardItem, ConfigCardDisplay, InternalLinkItem, EntityBaseForm, EntityBaseTable, EntityDeleteModal, EntityFilter, EntityToggleModal, PermissionsWrapper, EntityFormSection, EntityFormBlock, EntityLink, EntityEmptyState, JsonCodeBlock, TerraformCodeBlock, YamlCodeBlock, DeckCodeBlock, GeneratePatModal, SensitiveInput, TableTags };
28
+ } | undefined>>) => void, useTableState: typeof import("./composables/useTableState.ts").default, useManagedByEnabled: typeof import("./composables/useManagedByEnabled.ts").default, useManagedByColumn: typeof import("./composables/useManagedByColumn.ts").default;
29
+ export { EntityConfigCardView, OnboardingCard, EntityBaseConfigCard, ConfigCardItem, ConfigCardDisplay, InternalLinkItem, EntityBaseForm, EntityBaseTable, EntityDeleteModal, EntityFilter, EntityToggleModal, PermissionsWrapper, EntityFormSection, EntityFormBlock, EntityLink, EntityEmptyState, JsonCodeBlock, TerraformCodeBlock, YamlCodeBlock, DeckCodeBlock, GeneratePatModal, SensitiveInput, TableTags };
29
30
  export { useAxios, useDeleteUrlBuilder, useBaseEntityDeckOptions, useBaseFormDeckOptions, useErrors, useExternalLinkCreator, useFetchUrlBuilder, useFetcher, useFetcherCacheKey, useDebouncedFilter, useStringHelpers, useHelpers, useGatewayFeatureSupported, useTruncationDetector, useValidators, useSchema, useSchemaProvider, useTableState, useManagedByEnabled, useManagedByColumn };
30
31
  export * from './types';
31
32
  export * from './constants';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iDAAiD,CAAA;AAC5E,OAAO,oBAAoB,MAAM,+DAA+D,CAAA;AAChG,OAAO,cAAc,MAAM,yDAAyD,CAAA;AACpF,OAAO,iBAAiB,MAAM,4DAA4D,CAAA;AAC1F,OAAO,gBAAgB,MAAM,2DAA2D,CAAA;AACxF,OAAO,cAAc,MAAM,kDAAkD,CAAA;AAC7E,OAAO,eAAe,MAAM,oDAAoD,CAAA;AAChF,OAAO,iBAAiB,MAAM,wDAAwD,CAAA;AACtF,OAAO,YAAY,MAAM,6CAA6C,CAAA;AACtE,OAAO,iBAAiB,MAAM,wDAAwD,CAAA;AACtF,OAAO,kBAAkB,MAAM,yDAAyD,CAAA;AACxF,OAAO,iBAAiB,MAAM,wDAAwD,CAAA;AACtF,OAAO,eAAe,MAAM,oDAAoD,CAAA;AAChF,OAAO,UAAU,MAAM,yCAAyC,CAAA;AAChE,OAAO,gBAAgB,MAAM,sDAAsD,CAAA;AACnF,OAAO,aAAa,MAAM,uCAAuC,CAAA;AACjE,OAAO,kBAAkB,MAAM,4CAA4C,CAAA;AAC3E,OAAO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,gEAAE,UAAU,wDAAE,kBAAkB,mEAAE,kBAAkB,gEAAE,gBAAgB,8DAAE,UAAU,wDAAE,0BAA0B,wEAAE,qBAAqB,mEAAE,aAAa,2DAAE,SAAS;;iBAAE,iBAAiB;;0BAAE,aAAa,2DAAE,mBAAmB,iEAAE,kBAAkB,8DAAgB,CAAA;AAGxY,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,oBAAoB,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,kBAAkB,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,SAAS,EAAE,CAAA;AAGnZ,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,SAAS,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,UAAU,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,UAAU,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,aAAa,EAAE,SAAS,EAAE,iBAAiB,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAA;AAG3X,cAAc,SAAS,CAAA;AAGvB,cAAc,aAAa,CAAA;AAE3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAMvD,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACjG,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA"}
@@ -142,4 +142,18 @@ export interface ComponentAttrsData {
142
142
  export declare const CONFIG_CARD_FORMATS: readonly ["structured", "yaml", "json", "terraform", "deck"];
143
143
  export type ConfigCardFormat = (typeof CONFIG_CARD_FORMATS)[number];
144
144
  export type ConfigCardCodeFormat = Exclude<ConfigCardFormat, 'structured'>;
145
+ /** Presentation and export context of `EntityConfigCardView`. No entity ID, endpoint or HTTP client is required. */
146
+ export interface EntityConfigCardViewConfig {
147
+ app?: 'konnect' | 'kongManager';
148
+ /** Kong Manager `--kong-addr` in generated decK commands. It is never requested. */
149
+ apiBaseUrl?: string;
150
+ /** Workspace written into generated decK YAML */
151
+ workspace?: string | null;
152
+ /** Konnect control plane name written into generated decK YAML */
153
+ controlPlaneName?: string;
154
+ /** Regional Konnect `--konnect-addr` in generated decK commands */
155
+ geoApiServerUrl?: string;
156
+ /** Konnect only: enable the decK format. Local command editing is available when the host provides the decK command editor. */
157
+ enableDeckConfig?: boolean;
158
+ }
145
159
  //# sourceMappingURL=entity-base-config-card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entity-base-config-card.d.ts","sourceRoot":"","sources":["../../../src/types/entity-base-config-card.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAE/D;;;;GAIG;AACH,oBAAY,mBAAmB;IAC7B,aAAa,mBAAmB;IAChC,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,aAAa,mBAAmB;IAChC,cAAc,YAAY;IAC1B,GAAG,QAAQ;IACX,MAAM,QAAQ;IACd,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,OAAO,YAAY;IAGnB,iBAAiB,wBAAwB;IACzC,cAAc,oBAAoB;IAClC,cAAc,oBAAoB;IAClC,QAAQ,aAAa;IACrB,aAAa,mBAAmB;IAChC,aAAa,mBAAmB;IAChC,aAAa,mBAAmB;IAChC,cAAc,oBA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AE,uBAAuB,CAAA;IACnC,UAAU,EAAE,uBAAuB,CAAA;IACnC,IAAI,EAAE,uBAAuB,CAAA;IAC7B,MAAM,EAAE,uBAAuB,CAAA;IAC/B,QAAQ,EAAE,uBAAuB,CAAA;CAClC;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAGD,eAAO,MAAM,mBAAmB,8DAA+D,CAAA;AAG/F,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;AAGnE,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAA;AAE1E,oHAAoH;AACpH,MAAM,WAAW,0BAA0B;IACzC,GAAG,CAAC,EAAE,SAAS,GAAG,aAAa,CAAA;IAC/B,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,+HAA+H;IAC/H,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B"}
@@ -0,0 +1,9 @@
1
+ import type { DeckConfigOptions, EntityConfigCardViewConfig, KongManagerBaseEntityConfig, KonnectBaseEntityConfig } from '../types';
2
+ /** Configs accepted by `ConfigCardDisplay` and `useBaseEntityDeckOptions`: reader configs and the View's display config. */
3
+ export type ConfigCardDisplayConfig = KongManagerBaseEntityConfig | KonnectBaseEntityConfig | (Omit<EntityConfigCardViewConfig, 'enableDeckConfig'> & {
4
+ deckCalloutPreferenceKey?: string;
5
+ enableDeckConfig?: boolean | DeckConfigOptions;
6
+ });
7
+ /** Project a reader config onto the View config. decK options become a boolean; token generation stays with the reader. */
8
+ export declare function getConfigCardViewConfig(config: ConfigCardDisplayConfig): EntityConfigCardViewConfig;
9
+ //# sourceMappingURL=config-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-card.d.ts","sourceRoot":"","sources":["../../../src/utils/config-card.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAEnI,4HAA4H;AAC5H,MAAM,MAAM,uBAAuB,GAAG,2BAA2B,GAAG,uBAAuB,GAAG,CAAC,IAAI,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,GAAG;IACpJ,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,gBAAgB,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAA;CAC/C,CAAC,CAAA;AAEF,2HAA2H;AAC3H,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,uBAAuB,GAAG,0BAA0B,CAUnG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-shared",
3
- "version": "3.72.1",
3
+ "version": "3.72.2-pr.3999.7a488ec91.0",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-shared.umd.js",
6
6
  "module": "./dist/entities-shared.es.js",
@@ -68,7 +68,7 @@
68
68
  "extends": "../../../package.json"
69
69
  },
70
70
  "distSizeChecker": {
71
- "errorLimit": "810KB"
71
+ "errorLimit": "900KB"
72
72
  },
73
73
  "dependencies": {
74
74
  "@kong-ui-public/core": "^1.13.20",
@@ -1 +0,0 @@
1
- "use strict";const U=require("axios"),c=require("vue"),R=require("@kong-ui-public/i18n"),re=Symbol("PLUGIN_FORM_LAYOUT_STATE"),oe=Symbol("CONFIG_CARD_SHOW_SENSITIVE_FIELDS"),N=Symbol("DECK_COMMAND_EDITOR"),K="[entities-shared] DeckCommandEditor was not provided. Provide it via the `DECK_COMMAND_EDITOR_KEY` injection key or the `provideDeckCommandEditor` helper (see @kong-ui-public/entities-shared/deck-editor).",ie="50vh",ce=2e5,W={MANAGED_BY:"KM-3018-entity-managed-by"};function le(){return{getAxiosInstance:(e={})=>{try{const n=c.inject("get-axios-instance",void 0);return typeof n=="function"?n(e):U.create({withCredentials:!0,timeout:3e4,...e})}catch(n){return console.warn("getAxiosInstance:",n.message||n),U.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{const n=e?.response?.headers||{};return n["x-trace-id"]||n["x-datadog-trace-id"]||""}}}function ue(){return{debounce:(e,n)=>{let o;return(...t)=>{clearTimeout(o),o=window?.setTimeout(()=>{e(...t)},n)}}}}const T="khcp-user-table-preferences",Y={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0,columnVisibility:{}};function de(){const e=o=>{if(typeof o=="string")try{return JSON.parse(o)}catch(t){console.error("useTablePreferences(tryParseJson)",t);return}},n=()=>{const o=e(localStorage.getItem(T));return!o||!Object.keys(o).length?new Map:new Map(Object.entries(o))};return{setTablePreferences:(o,t)=>{try{const a=n();a.set(o,t),localStorage.setItem(T,JSON.stringify(Object.fromEntries(a.entries())))}catch(a){console.error("useTablePreferences(setTablePreferences)",a)}},getTablePreferences:(o,t)=>n()?.get(o)||void 0||t||Y,deleteAllTablePreferences:()=>{localStorage.removeItem(T)}}}function P(e={}){const{getAxiosInstance:n}=le();return{axiosInstance:n(e)}}const fe={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},pe={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},ge={actions:{viewConfiguration:"View configuration",hideConfiguration:"Hide configuration",save:"Save",cancel:"Cancel",back:"Back"},configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML or JSON. This allows for straightforward importing into APIOps tools like decK with YAML, or Insomnia and cURL with JSON.",yaml:"YAML",json:"JSON",terraform:"Terraform",deck:"decK"},errors:{edit:"The entity could not be edited at this time."}},ye={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},me={title:"Configuration",actions:{copy:"Copy JSON",deck_customize:"Customize before copying to CLI",deck_customize_cancel:"Cancel",sensitive_fields:"Show sensitive fields",sensitive_fields_tooltip:"View masked sensitive data in your configurations if any field values have been redacted."},sections:{advanced:"Advanced",plugin:"Plugin specific configuration",policy:"Policy specific configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last updated",created_at_label:"Created",managed_by_label:"Managed By",tags_label:"Tags",link:"Link",partial_label:"Redis configuration"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},he={learnMore:"Learn more",pricingTitle:"Pricing: "},be={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},_e={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},ve={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Ae={utf8Name:"The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."},Ce={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},Ie={copy_url:"Copy URL"},ke={hint:{konnect:"The {token} environment variable must be added first. See {link} for details.",kongManager:"If your Admin API is secured, set up authentication following {link}."},documentation:"the documentation",steps:{step_1:"Step 1: Export token",step_2:"Step 2: Apply configuration"},customization:{title:"Customize before copying to CLI",copy_pat:"Make sure to copy your personal access token now. You won't be able to see it again.",reuse_pat:"Use an existing PAT if you've already generated one.",generate_pat:"Generate PAT",footer_reminder:"Changes you make here won't affect your configuration. After you apply changes with decK in the CLI, refresh the page to view them.",secret_advise:"Command may contain sensitive values. Treat it as a secret."},copy_tooltip:"Copy"},we={body:"Want a ready-to-use CLI command? {cta} to view this configuration as a decK sync snippet you can copy directly.",cta:"Switch to decK format"},Ee={title:"Generate a Personal Access Token",description:"Personal access tokens are used to authenticate decK commands and Konnect API requests.",fields:{name:{label:"Name",placeholder:"Enter token name"},expiresAt:{label:"Expiration date",placeholder:"Select an expiration date",n_days:"{n} days"}},actions:{cancel:"Cancel",generate:"Generate",generating:"Generating…"}},De={dismissLabel:"Dismiss"},Oe={rotateKey:"Rotate key",generateKey:"Generate key",placeholder:"Enter or generate a key",oneTimeHint:"The key is shown only once. Copy it now and store it securely.",copy:"Copy",showKey:"Show key",hideKey:"Hide key"},J={global:fe,deleteModal:pe,baseForm:ge,baseTable:ye,baseConfigCard:me,emptyState:he,filter:be,debouncedFilter:_e,errors:ve,validationErrors:Ae,toggleModal:Ce,jsonCodeBlock:Ie,deckCodeBlock:ke,deckCallout:we,generatePatModal:Ee,onboardingCard:De,sensitiveInput:Oe};function L(){const e=R.createI18n("en-us",J);return{i18n:e,i18nT:R.i18nTComponent(e)}}var C=(e=>(e[e.InitialLoad=0]="InitialLoad",e[e.Loading=1]="Loading",e[e.Idle=2]="Idle",e[e.NoResults=3]="NoResults",e[e.NoRecords=4]="NoRecords",e[e.Error=5]="Error",e))(C||{}),B=(e=>(e.CaCertificate="ca_certificate",e.Certificate="certificate",e.Consumer="consumer",e.ConsumerGroup="consumer_group",e.GatewayService="service",e.Key="key",e.KeySet="set",e.Plugin="plugin",e.Route="route",e.SNI="sni",e.Upstream="upstream",e.Target="target",e.Vault="vault",e.Partial="partial",e.CloudGatewayAddon="cloud_gateway_addon",e.BackendCluster="backend_cluster",e.VirtualCluster="virtual_cluster",e.Listener="listener",e.ProducePolicy="produce_policy",e.ConsumePolicy="consume_policy",e.ClusterPolicy="cluster_policy",e.ListenerPolicy="listener_policy",e.SchemaRegistry="schema_registry",e.StaticKey="static_key",e.TlsTrustBundle="tls_trust_bundle",e.AuthServer="auth_server",e.AuthServerScopes="auth_server_scopes",e.AuthServerClaims="auth_server_claims",e.AuthServerClients="auth_server_clients",e.Other="other",e.PluginSchema="plugin_schema",e.CustomPlugin="custom_plugin",e.ClonedPlugin="cloned_plugin",e))(B||{});const Le=Object.values(B),X=["ca_certificate","certificate","consumer","consumer_group","service","key","set","plugin","plugin_schema","custom_plugin","cloned_plugin","route","upstream","target","vault","partial"];function F(e){return X.includes(e)}const Te=["backend_cluster","virtual_cluster","listener","produce_policy","consume_policy","cluster_policy","listener_policy","schema_registry","static_key","tls_trust_bundle"],Me=["auth_server","auth_server_scopes","auth_server_claims","auth_server_clients"];var D=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.CopyBadge="copy-badge",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e.ManagedBy="managed-by",e))(D||{}),q=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e.Policy="policy",e))(q||{});const Re=["structured","yaml","json","terraform","deck"];function Q(){const e=(i,r)=>r?.[i]??void 0,n=(i,r)=>{if(i.length!==r.length)return!1;const f=new Set([...i,...r]);for(const l of f){const p=i.filter(_=>_===l).length,m=r.filter(_=>_===l).length;if(p!==m)return!1}return!0},o=(i,r,f)=>{if(f){if(Object.keys(i).length===Object.keys(r).length)for(const l in i)if(Array.isArray(i[l])&&Array.isArray(r[l])){if(n(i[l],r[l]))continue;return!1}else{if(i[l]===r[l])continue;return!1}else return!1;return!0}try{return JSON.stringify(i)===JSON.stringify(r)}catch{return!1}},t=i=>(r,f)=>{let l=r[i]===void 0||r[i]===null?"":r[i],p=f[i]===void 0||f[i]===null?"":f[i];return Array.isArray(r[i])&&(l=r[i][0]),Array.isArray(f[i])&&(p=f[i][0]),l.localeCompare(p)},a=i=>i?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(i):!1,u="********",s=i=>!!i&&typeof i=="object"&&!Array.isArray(i),d=(i,r)=>i?.find(l=>Object.keys(l)?.[0]===r)?.[r],y=(i,r)=>{if(!r||i===null||i===void 0)return i;if(r.type==="string")return r.encrypted?u:i;if(r.type==="record"||r.type==="map"){if(!s(i))return i;if(r.type==="map"&&!r.values)return{...i};const f={};for(const l in i)if(r.type==="record"){const p=d(r.fields,l);f[l]=p?y(i[l],p):i[l]}else if(r.type==="map"){const p=r.values;f[l]=y(i[l],{...p,encrypted:!!(r.encrypted||p.encrypted)})}return f}if((r.type==="array"||r.type==="set")&&Array.isArray(i)){const f=r.elements;return f?i.map(l=>y(l,{...f,encrypted:!!(r.encrypted||f.encrypted)})):i.slice()}return i},h=(i,r)=>{if(Array.isArray(i))return i.map(l=>h(l,r));if(!s(i))return i;const f={};for(const l in i){if(r[l]?.type===D.Redacted){f[l]=u;continue}if(r[l]?.type===D.RedactedArray&&Array.isArray(i[l])){f[l]=i[l].map(()=>u);continue}f[l]=h(i[l],r)}return f};return{getPropValue:e,objectsAreEqual:o,sortAlpha:t,isValidUuid:a,isObjectRecord:s,getApiSchemaField:d,redactByApiSchema:y,redactByConfigSchema:h}}function xe(e,n,o,t={fetchedItemsKey:"data",searchKeys:["id"]}){o||(o="1000");const{axiosInstance:a}=P(e.axiosRequestConfig),{i18n:{t:u}}=L(),{debounce:s}=ue(),d=s(async g=>{await k(g)},200),y=c.ref(!1),h=c.ref(""),i=c.ref(""),r=c.ref([]),f=c.ref([]),l=c.ref(void 0),p=c.computed(()=>{let g=`${e.apiBaseUrl}${c.unref(n)}`;return e.app==="konnect"&&(g=g.replace(/{controlPlaneId}/gi,e?.controlPlaneId||"")),g.replace(/\/{workspace}/gi,e?.workspace?`/${e.workspace}`:"")}),{isValidUuid:m}=Q(),_=async()=>{try{y.value=!0;const{data:g}=await a.get(`${p.value}?size=${o}`);g?.next||(l.value=t.fetchedItemsKey in g?g[t.fetchedItemsKey]:[]),f.value=t.fetchedItemsKey in g?g[t.fetchedItemsKey]:[],r.value=f.value}catch{r.value=[],h.value=u("debouncedFilter.errors.fetch")}finally{y.value=!1}},I=c.ref(""),k=async g=>{if(I.value!==g){if(I.value=g??"",!g){r.value=f.value;return}if(l.value===void 0)try{if(y.value=!0,h.value="",i.value="",e.app==="konnect"){const b=`${p.value}/${g}`,{data:v}=await a.get(`${b}?size=${o}`);t.fetchedItemsKey in v?r.value=v[t.fetchedItemsKey]:v?.[t.exactMatchKey??"id"]?r.value=[v]:r.value=[]}else{const b=[];m(g)&&t.searchKeys.includes("id")?b.push((async()=>{const{data:A}=await a.get(`${p.value}/${g}`);return[A[t.fetchedItemsKey]??A]})()):b.push(...t.searchKeys.filter(A=>A!=="id").map(async A=>{const{data:E}=await a.get(`${p.value}?${A}=${g}`);return E[t.fetchedItemsKey]}));const v=await Promise.all(b),w=new Set;r.value=[],v?.forEach?.(A=>{A?.forEach?.(E=>{w.has(E.id)||(w.add(E.id),r.value.push(E))})})}}catch(b){b?.response?.status===404?i.value=u("debouncedFilter.errors.invalid"):(r.value=[],h.value=u("debouncedFilter.errors.fetch"))}finally{y.value=!1}else y.value=!0,i.value="",r.value=l.value?.filter(b=>{let v=!1;for(const w of t.searchKeys)(typeof b[w]=="string"?b[w]?.toLowerCase():b[w])?.includes(g.toLowerCase())&&(v=!0);return v}),(!r.value||!r.value.length)&&(i.value=u("debouncedFilter.errors.invalid")),y.value=!1}};return{loading:y,error:h,validationError:i,results:r,allRecords:l,loadItems:_,debouncedQueryChange:d}}function Ne(e,n){const o=c.inject(N,null),t=c.computed(()=>{const s=c.toValue(e);return(s.app==="kongManager"||!!(s.app==="konnect"&&s.enableDeckConfig))&&F(c.toValue(n))}),a=c.computed(()=>{const s=c.toValue(e),d=s.app==="konnect"&&s.enableDeckConfig&&typeof s.enableDeckConfig!="boolean"?s.enableDeckConfig.customization:void 0;if(d&&!o){console.warn(K);return}return d}),u=c.computed(()=>{const s=c.toValue(e);return s.app==="konnect"&&s.enableDeckConfig&&typeof s.enableDeckConfig!="boolean"?s.enableDeckConfig.calloutPreferenceKey:s.app==="kongManager"?s.deckCalloutPreferenceKey:void 0});return{isDeckEnabled:t,deckCustomizationOptions:a,deckCalloutPreferenceKey:u}}function Ke(e,n){const o=c.inject(N,null),t=c.computed(()=>{const s=c.toValue(e);return(s.app==="kongManager"||!!(s.app==="konnect"&&s.enableDeckTab))&&F(c.toValue(n))}),a=c.computed(()=>{const s=c.toValue(e),d=s.app==="konnect"&&s.enableDeckTab&&typeof s.enableDeckTab!="boolean"?s.enableDeckTab.customization:void 0;if(d&&!o){console.warn(K);return}return d}),u=c.computed(()=>{const s=c.toValue(e);return s.app==="konnect"&&s.enableDeckTab&&typeof s.enableDeckTab!="boolean"?s.enableDeckTab.calloutPreferenceKey:s.app==="kongManager"?s.deckCalloutPreferenceKey:void 0});return{isDeckEnabled:t,deckCustomizationOptions:a,deckCalloutPreferenceKey:u}}function Pe(e,n){const o=c.unref(n),t=c.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${o}`):new URL(o));return t.value.search="",a=>`${t.value.href}/${a}`}function Be(){const{i18n:{t:e}}=L();return{getErrorFieldsFromError:t=>{if(!t)return{messages:[e("errors.unexpected")],fields:[]};if(t?.response?.status===401)return{messages:[],fields:[]};let a=[e("errors.unexpected")];const u=[];if(t?.response?.data){if(t.response.data.details?.length)return a=[],t.response.data.details.forEach(s=>{let d=e("errors.unexpected");s.messages&&Array.isArray(s.messages)&&s.messages.length&&(d=s.messages.join(", ")),s.field&&u.push({field:s.field,message:d}),a.push(`${s.field??""} ${d}`)}),{messages:a,fields:u};if(t.response.data.message&&Array.isArray(t.response.data.message))return a=[],t.response.data.message.forEach(s=>{if(s?.constraints){const d=Object.values(s.constraints).join(", ");a.push(d),s.property&&u.push({field:s.property,message:d})}else s?.property&&s?.message?(u.push({field:s.property,message:s.message}),a.push(s.message)):a.push(s)}),{messages:a,fields:u};if(typeof t.response.data.message=="string"||typeof t.response.data=="string")return{messages:[t.response.data.message],fields:[]};if(typeof t.response.data=="object")return a=[],Object.keys(t.response.data).forEach(s=>{u.push({field:s,message:t.response.data[s]}),a.push(t.response.data[s])}),{messages:a,fields:u}}return{messages:[t.message||e("errors.unexpected")],fields:[]}},getMessageFromError:t=>{if(!t)return e("errors.unexpected");if(t?.response?.status===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if(t?.response?.data){if(t.response.data.detail)return t.response.data.detail;if(t.response.data.details?.length)return t.response.data.details.map(a=>{let u=e("errors.unexpected");return a.messages&&typeof a.messages=="object"&&a.messages.length&&(u=a.messages.join(", ")),a.field?`${a.field} - ${u}`:u}).join("; ");if(t.response.data.message){const{message:a}=t.response.data;return Array.isArray(a)?a[0]?.constraints?Object.values(a[0].constraints)[0]:a[0]:a}if(typeof t.response.data=="string")return t.response.data;if(typeof t.response.data=="object")return Object.keys(t.response.data).map(a=>`${a} ${t.response.data[a]}`).join(", ")}return t.message||e("errors.unexpected")}}}function Fe(e){const n=window.location.origin,o=n.endsWith("/")?n:`${n}/`;try{const t=e.join("/"),a=`${o}${t}`,u=e.some(d=>d.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(a)&&!u&&new URL(a))return`${o}${t}`;throw new Error("Invalid url")}catch(t){return console.warn("Failed to build valid URL:",t),""}}function Z(e,n){const o=c.computed(()=>{const a=c.toValue(e);return typeof a.isExactMatch=="boolean"?a.isExactMatch:a.app==="konnect"}),t=c.computed(()=>{const a=c.toValue(n);return a.startsWith("/")?new URL(`${window.location.origin}${a}`):new URL(a)});return a=>{const{page:u,pageSize:s,offset:d,sortColumnKey:y,sortColumnOrder:h,query:i}=a;try{let r=new URL(t.value.href);if(o.value&&i){const f=new URLSearchParams(t.value.search);r.search="",r=c.toValue(e).isExactMatch?new URL(`${r.href}/${i}`):new URL(`${r.href}?filter[name][contains]=${i}`),f.forEach((l,p)=>r.searchParams.append(p,l))}else o.value||new URLSearchParams(i).forEach((f,l)=>{r.searchParams.append(l,f)}),y&&r.searchParams.append("sort_by",y),h==="desc"&&r.searchParams.append("sort_desc","1"),r.searchParams.append("size",String(s));return d&&u!==1&&r.searchParams.append("offset",String(d)),r.href}catch(r){return console.error("RouteList(fetcher)",r),c.toValue(n)}}}const $=new Map;function Ue(e,n,o){const t=c.ref(!0),a=c.toValue(e),{axiosInstance:u}=P(a.axiosRequestConfig),s=Z(e,n),d=c.ref({status:C.Idle}),y=async r=>{const f=c.toValue(o)||"data";try{d.value=t.value?{status:C.InitialLoad}:{status:C.Loading},t.value=!1;let l=s(r);l.includes("filter[name]")&&(l=`${l}&page[size]=${r.pageSize}&page[number]=${r.page}`);const p=await u.get(l);if(p.status>=400)throw p;const m=p.data,_=f&&f.replace(/[^\w-_]/gi,"");let I;m[_]?I=Array.isArray(m[_])?m[_]:[m[_]]:Array.isArray(m)?I=m:I=Object.keys(m).length?[m]:[];const k={data:I,total:I.length,...m.offset?{pagination:{offset:m.offset}}:null};return k.data.length===0&&!r.query?d.value={status:C.NoRecords,response:k}:d.value={status:C.Idle,response:k},k}catch(l){const p={data:[],total:0};return r.query&&(l.response?.status===404||l.status===404)?(d.value={status:C.NoResults,response:p,error:l.response?l:{response:l}},p):(d.value={status:C.Error,response:p,error:l.response?l:{response:l}},p)}},h=a.cacheIdentifier,i=ee(h);return{fetcher:y,fetcherState:d,fetcherCacheKey:i}}function ee(e){if(e){let n=$.get(e);return n||(n=c.ref(1),$.set(e,n)),n}return c.ref(1)}function $e(){const e=(t,a="_")=>t?t.split(a).map(u=>u.toLowerCase()==="id"?u.toUpperCase():u.charAt(0).toUpperCase()+u.substring(1)).join(" "):"",n=/(?:^|[\s-:'"])\w/g;return{capitalize:t=>t?t.replace(n,a=>a.toUpperCase()):"",convertKeyToTitle:e}}const te=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,j=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const n=e.match(te);if(!n)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return n.shift(),n},G=e=>e==="*"||e==="x"||e==="X",V=e=>{const n=parseInt(e,10);return isNaN(n)?e:n},je=(e,n)=>typeof e!=typeof n?[String(e),String(n)]:[e,n],Ge=(e,n)=>{if(G(e)||G(n))return 0;const[o,t]=je(V(e),V(n));return o>t?1:o<t?-1:0},S=(e,n)=>{for(let o=0;o<Math.max(e.length,n.length);o++){const t=Ge(e[o]||"0",n[o]||"0");if(t!==0)return t}return 0},Ve=(e,n)=>{const o=j(e),t=j(n),a=o.pop(),u=t.pop(),s=S(o,t);return s!==0?s:a&&u?S(a.split("."),u.split(".")):a||u?a?-1:1:0},H=(e,n,o)=>{Se(o);const t=Ve(e,n);return ae[o].includes(t)},ae={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},z=Object.keys(ae),Se=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(z.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${z.join("|")}`)},He=e=>typeof e=="string"&&/^[v\d]/.test(e)&&te.test(e);function ze(e){const{gatewayInfo:n,supportedRange:o}=e;if(!n)return!0;const{edition:t,version:a}=n;if(!He(a))return console.error("Invalid version"),!1;const u=o[t];if(!u)return!1;const[s,d]=u;return!(s&&H(a,s,"<")||d&&H(a,d,">"))}function We(e){const n=c.ref(0),o=c.ref(0),t=c.ref(!1);return c.watch(e,u=>{u&&!t.value&&(n.value=u.offsetWidth,o.value=u.scrollWidth,t.value=!0)}),{isTruncated:c.computed(()=>n.value<o.value)}}function Ye(){const{i18n:{t:e}}=L();return{utf8Name:o=>/^[\p{N}\p{L}.\-_~]*$/u.test(o)?"":e("validationErrors.utf8Name")}}const O=Symbol("schema"),Je=e=>{c.provide(O,e)},Xe=()=>c.inject(O,void 0),qe=e=>/^\d+$/.test(e),Qe=e=>{const o=c.inject(O,void 0)?.value;let t;if((o?.type==="array"||o?.type==="set")&&qe(e)){const u=o.elements;t=u&&{...u,encrypted:!!(o.encrypted||u.encrypted)}}else t=o?.fields?.find(s=>Object.keys(s)[0]===e)?.[e];const a=c.toRef(t);return c.provide(O,a),a};function Ze(e){let n="";const o=c.ref(!1),t=c.ref(null),a=c.computed(()=>{let s;return o.value?s=!0:t.value?s=t.value.hasData||e&&c.toValue(e):s=!1,!s});return{tableState:t,hasRecords:o,hideTableToolbar:a,handleStateChange:s=>{s.hasData?o.value=!0:s.state==="success"&&!s.hasData&&(!e||!n)&&(o.value=!1),e&&(n=c.toValue(e)),t.value={...s}}}}function se(){const e=c.inject(W.MANAGED_BY,!1);return c.computed(()=>!!c.toValue(e))}const et=e=>e?.service||e?.tool||null,tt="Custom",x={"terraform-provider-konnect":"Terraform",deck:"decK","kong-gateway-operator":"Kong Gateway Operator",kongctl:"kongctl","kong-ingress-controller":"Kong Ingress Controller","gw-manager":"Konnect UI","ai-manager":"AI Manager","dev-portal":"Dev Portal"},at=e=>{const n=et(e);return n?Object.hasOwn(x,n)?x[n]:tt:null};let M;const ne=()=>(M===void 0&&(M=R.createI18n("en-us",J).t("baseConfigCard.commonFields.managed_by_label")),M);function st(e,n={}){const o=se();return{defaultTablePreferences:{columnVisibility:{managed_by:!1,...n}},tableHeaders:c.computed(()=>({...c.toValue(e),...o.value?{managed_by:{label:ne(),sortable:!1}}:{}}))}}const nt={useAxios:P,useDebouncedFilter:xe,useDeleteUrlBuilder:Pe,useBaseEntityDeckOptions:Ne,useBaseFormDeckOptions:Ke,useErrors:Be,useExternalLinkCreator:Fe,useFetcher:Ue,useFetcherCacheKey:ee,useFetchUrlBuilder:Z,useHelpers:Q,useStringHelpers:$e,useI18n:L,useGatewayFeatureSupported:ze,useTruncationDetector:We,useValidators:Ye,useSchema:Xe,useSchemaProvider:Je,useSubSchema:Qe,useTableState:Ze,useManagedByEnabled:se,useManagedByColumn:st},rt=(e,n)=>{const o=e.__vccOpts||e;for(const[t,a]of n)o[t]=a;return o};exports.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT=ie;exports.CONFIG_CARD_FORMATS=Re;exports.CONFIG_CARD_SHOW_SENSITIVE_FIELDS=oe;exports.ConfigurationSchemaSection=q;exports.ConfigurationSchemaType=D;exports.DECK_COMMAND_EDITOR_KEY=N;exports.DECK_COMMAND_EDITOR_MISSING_WARNING=K;exports.ENTITIES_FEATURE_FLAGS=W;exports.EventGatewayTypesArray=Te;exports.FetcherStatus=C;exports.IdentityTypesArray=Me;exports.MANAGED_BY_LABELS=x;exports.PLUGIN_FORM_LAYOUT_STATE=re;exports.SHIKI_MAX_HIGHLIGHT_LENGTH=ce;exports.SupportedEntityDeckArray=X;exports.SupportedEntityType=B;exports.SupportedEntityTypesArray=Le;exports._export_sfc=rt;exports.composables=nt;exports.de=de;exports.getManagedByFieldLabel=ne;exports.getManagedByLabel=at;exports.isSupportedDeckEntityType=F;exports.ne=Y;