@kong-ui-public/forms 4.15.7-pr.2347.a3249204c.0 → 4.15.8-pr.2204.6e36c8512.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.
@@ -0,0 +1,229 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ t: (translationKey: "general" | "post-function" | "exit-transformer" | "rla" | "validators" | "redis" | "fields" | "vfg" | "general.packageName" | "general.disable_global_radio" | "general.disable_source_scope_change" | "post-function.tags" | "post-function.enabled" | "post-function.selectionGroup" | "post-function.instance_name" | "post-function.name" | "post-function.config-certificate" | "post-function.config-access" | "post-function.config-body_filter" | "post-function.config-header_filter" | "post-function.config-functions" | "post-function.config-log" | "post-function.config-rewrite" | "post-function.config-ws_client_frame" | "post-function.config-ws_close" | "post-function.config-ws_handshake" | "post-function.config-ws_upstream_frame" | "post-function.tags.hint" | "post-function.tags.newElementButtonLabel" | "post-function.enabled.newElementButtonLabel" | "post-function.selectionGroup.newElementButtonLabel" | "post-function.instance_name.newElementButtonLabel" | "post-function.name.newElementButtonLabel" | "post-function.config-certificate.newElementButtonLabel" | "post-function.config-certificate.help" | "post-function.config-access.newElementButtonLabel" | "post-function.config-access.help" | "post-function.config-body_filter.newElementButtonLabel" | "post-function.config-body_filter.help" | "post-function.config-header_filter.newElementButtonLabel" | "post-function.config-header_filter.help" | "post-function.config-functions.newElementButtonLabel" | "post-function.config-log.newElementButtonLabel" | "post-function.config-rewrite.newElementButtonLabel" | "post-function.config-ws_client_frame.newElementButtonLabel" | "post-function.config-ws_close.newElementButtonLabel" | "post-function.config-ws_handshake.newElementButtonLabel" | "post-function.config-ws_upstream_frame.newElementButtonLabel" | "exit-transformer.config-functions" | "exit-transformer.config-functions.newElementButtonLabel" | "redis.title" | "rla.redis" | "rla.view_advanced_fields" | "rla.window_type" | "rla.request_limits" | "rla.start_with_a_use_case" | "rla.use_case_index" | "rla.error_message" | "rla.identifiers" | "rla.redis.title" | "rla.redis.address_example" | "rla.window_type.options" | "rla.window_type.help" | "rla.window_type.label" | "rla.window_type.options.fixed" | "rla.window_type.options.sliding" | "rla.request_limits.title" | "rla.request_limits.label" | "rla.request_limits.subtitle" | "rla.request_limits.label_index" | "rla.request_limits.request_number" | "rla.request_limits.time_interval" | "rla.request_limits.interval_determiner" | "rla.request_limits.seconds" | "rla.error_message.help" | "rla.error_message.label" | "rla.error_message.code_placeholder" | "rla.error_message.message_placeholder" | "rla.identifiers.options" | "rla.identifiers.label" | "rla.identifiers.options.ip" | "rla.identifiers.options.credential" | "rla.identifiers.options.consumer" | "rla.identifiers.options.service" | "rla.identifiers.options.header" | "rla.identifiers.options.path" | "rla.identifiers.options.consumer-group" | "validators.field_is_required" | "validators.invalid_format" | "validators.number_too_small" | "validators.number_too_large" | "validators.invalid_number" | "validators.invalid_integer" | "validators.text_too_short" | "validators.text_too_long" | "validators.this_not_text" | "validators.this_not_array" | "validators.select_min_items" | "validators.select_max_items" | "validators.invalid_date" | "validators.date_is_early" | "validators.date_is_late" | "validators.invalid_email" | "validators.invalid_url" | "validators.invalid_card" | "validators.invalid_card_number" | "validators.invalid_text_contain_number" | "validators.invalid_tex_contain_spec" | "redis.shared_configuration" | "redis.dedicated_configuration" | "redis.config_card" | "redis.custom_plugin" | "redis.shared_configuration.error" | "redis.shared_configuration.title" | "redis.shared_configuration.label" | "redis.shared_configuration.description" | "redis.shared_configuration.tooltip" | "redis.shared_configuration.configuration_selector_label" | "redis.shared_configuration.configuration_selector_placeholder" | "redis.shared_configuration.create_new_configuration" | "redis.shared_configuration.empty_state" | "redis.shared_configuration.badge" | "redis.shared_configuration.selector" | "redis.shared_configuration.selector.title" | "redis.shared_configuration.selector.description" | "redis.shared_configuration.selector.placeholder" | "redis.dedicated_configuration.title" | "redis.dedicated_configuration.label" | "redis.dedicated_configuration.description" | "redis.config_card.common_fields" | "redis.config_card.common_fields.created_at_label" | "redis.config_card.common_fields.updated_at_label" | "redis.config_card.common_fields.type_label" | "redis.custom_plugin.tooltip" | "redis.custom_plugin.alert" | "fields.auto_suggest" | "fields.auto_suggest.error" | "fields.auto_suggest.recently_created" | "fields.auto_suggest.items_count" | "fields.auto_suggest.no_results" | "fields.auto_suggest.loading" | "fields.auto_suggest.error.load_entity" | "vfg.labels" | "vfg.labels.on" | "vfg.labels.off", values?: Record<string, import("@kong-ui-public/i18n").MessageFormatPrimitiveValue> | undefined, opts?: import("@kong-ui-public/i18n").IntlMessageFormatOptions) => string;
3
+ KUI_ICON_SIZE_40: "20px";
4
+ KUI_COLOR_TEXT_NEUTRAL: "#6c7489";
5
+ }, {
6
+ suggestions: never[];
7
+ idValue: string;
8
+ message: string;
9
+ items: never[];
10
+ initialItem: null;
11
+ selectedItem: null;
12
+ loading: boolean;
13
+ dataDrained: boolean;
14
+ }, {
15
+ fieldState(): string;
16
+ associatedEntity(): string | string[];
17
+ entity(): any;
18
+ scope(): any;
19
+ bypassSearch(): import("vue-router").LocationQueryValue | import("vue-router").LocationQueryValue[];
20
+ inputFields(): any;
21
+ allowUuidSearch(): any;
22
+ inputFieldsWithoutId(): any;
23
+ initialValueSelected(): boolean;
24
+ }, {
25
+ getPartial(size: any): any;
26
+ getAll(query: any, signal: any): Promise<any>;
27
+ getOne(id: any): Promise<any>;
28
+ transformItem(item: any): any;
29
+ dedupeSuggestions(items: any, filteredIds: any): any[];
30
+ getItem(data: any): any;
31
+ fetchUntilLimit(params: any, signal: any): Promise<any>;
32
+ fetchSuggestions(query: any, field: any, signal: any): Promise<any>;
33
+ getSuggestionLabel(item: any): any;
34
+ updateModel(value: any): void;
35
+ onSelected(item: any): void;
36
+ getReturnValue(item: any): any;
37
+ }, {
38
+ name: string;
39
+ props: string[];
40
+ emits: string[];
41
+ data(): {
42
+ errors: never[];
43
+ debouncedValidateFunc: null;
44
+ debouncedFormatFunc: null;
45
+ };
46
+ directives: {
47
+ attributes: {
48
+ beforeMount: (el: any, binding: any, vnode: any) => void;
49
+ updated: (el: any, binding: any, vnode: any) => void;
50
+ componentUpdated: (el: any, binding: any, vnode: any) => void;
51
+ };
52
+ };
53
+ computed: {
54
+ value: {
55
+ cache: boolean;
56
+ get(): any;
57
+ set(newValue: any): void;
58
+ };
59
+ };
60
+ methods: {
61
+ validate(calledParent: any): any[] | Promise<any[]>;
62
+ debouncedValidate(): void;
63
+ updateModelValue(newValue: any, oldValue: any): void;
64
+ clearValidationErrors(): void;
65
+ setModelValueByPath(path: any, value: any): void;
66
+ getFieldID(schema: any, unique?: boolean): string;
67
+ getLabelId(schema: any): string;
68
+ getFieldClasses(): any;
69
+ formatValueToField(value: any): any;
70
+ formatValueToModel(value: any): any;
71
+ };
72
+ }, import("vue").ComponentOptionsMixin, "model-updated"[], "model-updated", import("vue").PublicProps, Readonly<{}> & Readonly<{
73
+ "onModel-updated"?: ((...args: any[]) => any) | undefined;
74
+ }>, {}, {}, {
75
+ FieldScopedEntitySelect: {
76
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
77
+ transformItem?: import("../../types/form-autosuggest").AutoSuggestItemTransformer;
78
+ allowUuidSearch?: boolean;
79
+ placeholder?: string;
80
+ fields: string[];
81
+ selectedItem?: import("@kong/kongponents").SelectItem<string>;
82
+ initialItemSelected?: boolean;
83
+ domId: string;
84
+ id: string;
85
+ entity: string;
86
+ disabled?: boolean;
87
+ fieldDisabled?: boolean;
88
+ } & import("../../types/form-autosuggest").AutoSuggestInjection> & Readonly<{
89
+ onChange?: ((item: import("@kong/kongponents").SelectItem<string> | null) => any) | undefined;
90
+ }>, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
91
+ change: (item: import("@kong/kongponents").SelectItem<string> | null) => any;
92
+ }, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
93
+ P: {};
94
+ B: {};
95
+ D: {};
96
+ C: {};
97
+ M: {};
98
+ Defaults: {};
99
+ }, Readonly<{
100
+ transformItem?: import("../../types/form-autosuggest").AutoSuggestItemTransformer;
101
+ allowUuidSearch?: boolean;
102
+ placeholder?: string;
103
+ fields: string[];
104
+ selectedItem?: import("@kong/kongponents").SelectItem<string>;
105
+ initialItemSelected?: boolean;
106
+ domId: string;
107
+ id: string;
108
+ entity: string;
109
+ disabled?: boolean;
110
+ fieldDisabled?: boolean;
111
+ } & import("../../types/form-autosuggest").AutoSuggestInjection> & Readonly<{
112
+ onChange?: ((item: import("@kong/kongponents").SelectItem<string> | null) => any) | undefined;
113
+ }>, {}, {}, {}, {}, {}>;
114
+ __isFragment?: never;
115
+ __isTeleport?: never;
116
+ __isSuspense?: never;
117
+ } & import("vue").ComponentOptionsBase<Readonly<{
118
+ transformItem?: import("../../types/form-autosuggest").AutoSuggestItemTransformer;
119
+ allowUuidSearch?: boolean;
120
+ placeholder?: string;
121
+ fields: string[];
122
+ selectedItem?: import("@kong/kongponents").SelectItem<string>;
123
+ initialItemSelected?: boolean;
124
+ domId: string;
125
+ id: string;
126
+ entity: string;
127
+ disabled?: boolean;
128
+ fieldDisabled?: boolean;
129
+ } & import("../../types/form-autosuggest").AutoSuggestInjection> & Readonly<{
130
+ onChange?: ((item: import("@kong/kongponents").SelectItem<string> | null) => any) | undefined;
131
+ }>, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
132
+ change: (item: import("@kong/kongponents").SelectItem<string> | null) => any;
133
+ }, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
134
+ $slots: {
135
+ before?: (props: {}) => any;
136
+ } & {
137
+ 'selected-item'?: (props: {
138
+ item: import("@kong/kongponents").SelectItem<string>;
139
+ }) => any;
140
+ } & {
141
+ item?: (props: {
142
+ item: import("@kong/kongponents").SelectItem<string>;
143
+ }) => any;
144
+ };
145
+ });
146
+ SearchIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
147
+ title: {
148
+ type: StringConstructor;
149
+ required: false;
150
+ default: string;
151
+ };
152
+ color: {
153
+ type: StringConstructor;
154
+ required: false;
155
+ default: string;
156
+ };
157
+ display: {
158
+ type: StringConstructor;
159
+ required: false;
160
+ default: string;
161
+ };
162
+ decorative: {
163
+ type: BooleanConstructor;
164
+ required: false;
165
+ default: boolean;
166
+ };
167
+ size: {
168
+ type: (StringConstructor | NumberConstructor)[];
169
+ required: false;
170
+ default: "24px";
171
+ validator: (sizeValue: number | string) => boolean;
172
+ };
173
+ as: {
174
+ type: StringConstructor;
175
+ required: false;
176
+ default: string;
177
+ };
178
+ staticIds: {
179
+ type: BooleanConstructor;
180
+ default: boolean;
181
+ };
182
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
183
+ title: {
184
+ type: StringConstructor;
185
+ required: false;
186
+ default: string;
187
+ };
188
+ color: {
189
+ type: StringConstructor;
190
+ required: false;
191
+ default: string;
192
+ };
193
+ display: {
194
+ type: StringConstructor;
195
+ required: false;
196
+ default: string;
197
+ };
198
+ decorative: {
199
+ type: BooleanConstructor;
200
+ required: false;
201
+ default: boolean;
202
+ };
203
+ size: {
204
+ type: (StringConstructor | NumberConstructor)[];
205
+ required: false;
206
+ default: "24px";
207
+ validator: (sizeValue: number | string) => boolean;
208
+ };
209
+ as: {
210
+ type: StringConstructor;
211
+ required: false;
212
+ default: string;
213
+ };
214
+ staticIds: {
215
+ type: BooleanConstructor;
216
+ default: boolean;
217
+ };
218
+ }>> & Readonly<{}>, {
219
+ title: string;
220
+ color: string;
221
+ display: string;
222
+ decorative: boolean;
223
+ size: string | number;
224
+ as: string;
225
+ staticIds: boolean;
226
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
227
+ }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
228
+ export default _default;
229
+ //# sourceMappingURL=FieldAutoSuggestV2.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldAutoSuggestV2.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/FieldAutoSuggestV2.vue"],"names":[],"mappings":""}
@@ -0,0 +1,57 @@
1
+ import type { SelectItem } from '@kong/kongponents';
2
+ import type { AutoSuggestInjection, AutoSuggestItemTransformer } from '../../types/form-autosuggest';
3
+ /**
4
+ * How this component works
5
+ * This component utilizes `KSelect` with prefetch suggestions to improve user experience
6
+ * With `fieldDisabled` as a flag for controlling whether requests should be dispatched this was controlled by the upstream host apps,
7
+ * most likely permissions to list entities.
8
+ * By default when mounting the component, it will prefetch 50 records against the entity type `route/consumer/service/consumer_group`
9
+ * where `consumer_group` cannot be fuzzy queried with keywords which can only perform a client filtering with keywords.
10
+ * After data was fetched, the suggestions will be constructed using the `transformItem` function. When `selectedItem` is passed, in order to
11
+ * allow the option to be selected, it must be appended to the suggestions if the current suggestions list does not contain `selectedItem`
12
+ * When querying, if the data was exhausted when prefetching, the flag `dataDrainedFromPeeking` will be marked as `true` which indicates the
13
+ * upcoming querying will be delegated to inline search, otherwise, it performs a `fuzzy` search with `1000` items size capacity.
14
+ *
15
+ * A noticeable fact about the component KSelect, when the component has a selected item, then user opens the select dropdown, the component
16
+ * will set `query` to `''` where triggers a `query-change` event, thus the handler in our component `onQueryChange` will be triggered, when
17
+ * this happens, we tend to show the `prefetched` data when this happens, when user types, we introduces `debounce` for
18
+ * the query input to avoid excessive API calls.
19
+ */
20
+ type __VLS_Props = {
21
+ transformItem?: AutoSuggestItemTransformer;
22
+ allowUuidSearch?: boolean;
23
+ placeholder?: string;
24
+ fields: string[];
25
+ selectedItem?: SelectItem<string>;
26
+ initialItemSelected?: boolean;
27
+ domId: string;
28
+ id: string;
29
+ entity: string;
30
+ disabled?: boolean;
31
+ fieldDisabled?: boolean;
32
+ } & AutoSuggestInjection;
33
+ declare var __VLS_11: {}, __VLS_14: {
34
+ item: SelectItem<string>;
35
+ }, __VLS_17: {
36
+ item: SelectItem<string>;
37
+ };
38
+ type __VLS_Slots = {} & {
39
+ before?: (props: typeof __VLS_11) => any;
40
+ } & {
41
+ 'selected-item'?: (props: typeof __VLS_14) => any;
42
+ } & {
43
+ item?: (props: typeof __VLS_17) => any;
44
+ };
45
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
46
+ change: (item: SelectItem<string> | null) => any;
47
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
48
+ onChange?: ((item: SelectItem<string> | null) => any) | undefined;
49
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
50
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
51
+ export default _default;
52
+ type __VLS_WithSlots<T, S> = T & {
53
+ new (): {
54
+ $slots: S;
55
+ };
56
+ };
57
+ //# sourceMappingURL=FieldScopedEntitySelect.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldScopedEntitySelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/FieldScopedEntitySelect.vue"],"names":[],"mappings":"AAsQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,EAAc,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AAKhH;;;;;;;;;;;;;;;;GAgBG;AAEH,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,0BAA0B,CAAA;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,YAAY,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;IACjC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,GAAG,oBAAoB,CAAC;AAwPzB,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ;;CAAW,EAAE,QAAQ;;CAAY,CAAE;AACpE,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACrD;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAwB7C,QAAA,MAAM,eAAe;;;;kFAKnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAE1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -13,6 +13,13 @@ declare const _default: import("vue").DefineComponent<{}, {}, {
13
13
  [Symbol.hasInstance](value: any): boolean;
14
14
  [Symbol.metadata]: DecoratorMetadata | null;
15
15
  };
16
+ /**
17
+ * renderedTrack tracks makes lazy rendering possible by tracking each index pointed component's render state
18
+ * all unrendered components are set to 0, when the corresponding group got picked it will be set to 1 for good,
19
+ * this retains the local state for each subgroup without initializing early to send unpermitted requests which
20
+ * triggers testing failures
21
+ */
22
+ renderedTrack: never[];
16
23
  fieldSchema: never[];
17
24
  scope: string;
18
25
  }, {}, {
@@ -1 +1 @@
1
- {"version":3,"file":"FieldSelectionGroup.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/FieldSelectionGroup.vue"],"names":[],"mappings":""}
1
+ {"version":3,"file":"FieldSelectionGroup.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/fields/FieldSelectionGroup.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;IA6bM;;;;;OAKG"}
@@ -6,4 +6,10 @@ export declare const REDIS_PARTIAL_INFO = "redis-partial-info";
6
6
  export declare const AUTOFILL_SLOT_NAME = "autofill";
7
7
  /** Used by `provide` and `inject` */
8
8
  export declare const AUTOFILL_SLOT = "autofillSlot";
9
+ export declare const FIELD_STATES: {
10
+ CREATE_NOT_FROM_ENTITY: string;
11
+ CREATE_FROM_ENTITY: string;
12
+ UPDATE_ENTITY: string;
13
+ SET_REFERRAL_VALUE: string;
14
+ };
9
15
  //# sourceMappingURL=const.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../src/const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,sBAAsB,CAAA;AAEhD,eAAO,MAAM,YAAY,yBAAyB,CAAA;AAElD,eAAO,MAAM,yBAAyB,mCAAmC,CAAA;AAEzE,eAAO,MAAM,kBAAkB,uBAAuB,CAAA;AAEtD,oCAAoC;AACpC,eAAO,MAAM,kBAAkB,aAAa,CAAA;AAE5C,qCAAqC;AACrC,eAAO,MAAM,aAAa,iBAAiB,CAAA"}
1
+ {"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../src/const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,sBAAsB,CAAA;AAEhD,eAAO,MAAM,YAAY,yBAAyB,CAAA;AAElD,eAAO,MAAM,yBAAyB,mCAAmC,CAAA;AAEzE,eAAO,MAAM,kBAAkB,uBAAuB,CAAA;AAEtD,oCAAoC;AACpC,eAAO,MAAM,kBAAkB,aAAa,CAAA;AAE5C,qCAAqC;AACrC,eAAO,MAAM,aAAa,iBAAiB,CAAA;AAE3C,eAAO,MAAM,YAAY;;;;;CAKxB,CAAA"}
@@ -0,0 +1,18 @@
1
+ import type { AxiosResponse } from 'axios';
2
+ import type { SelectItem } from '@kong/kongponents';
3
+ export interface EntityData {
4
+ [key: string]: any;
5
+ id: string;
6
+ }
7
+ export interface EntityResponse {
8
+ data: EntityData[];
9
+ next?: string;
10
+ offset?: string;
11
+ }
12
+ export interface AutoSuggestInjection {
13
+ getAll: (query: string, signal?: AbortSignal) => Promise<EntityData[]>;
14
+ getPartial: (size: number) => Promise<AxiosResponse<EntityResponse>>;
15
+ getOne: (id: string) => Promise<EntityData>;
16
+ }
17
+ export type AutoSuggestItemTransformer = (item: EntityData) => SelectItem<string>;
18
+ //# sourceMappingURL=form-autosuggest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-autosuggest.d.ts","sourceRoot":"","sources":["../../../src/types/form-autosuggest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,EAAE,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IACtE,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,CAAA;IACpE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAA;CAC5C;AAED,MAAM,MAAM,0BAA0B,GAAG,CAAC,IAAI,EAAE,UAAU,KAAK,UAAU,CAAC,MAAM,CAAC,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { FIELD_STATES } from '../const';
2
+ import type { SelectItem } from '@kong/kongponents';
3
+ import type { EntityData } from '../types/form-autosuggest';
4
+ export declare const defaultItemTransformer: (item: EntityData) => SelectItem<string>;
5
+ /**
6
+ * 1. Look up current state using current model and entity from router (if exists)
7
+ * 2. If Updating, look up object from ID
8
+ * 3. If Creating & from referral (ie. service -> route) set value with entity object from params
9
+ * TODO: mark model to a specific type when we can.
10
+ * @returns {Object} Object to set current search text
11
+ */
12
+ export declare function getFieldState(model: any, associatedEntity: boolean, bypassSearch: boolean): typeof FIELD_STATES[keyof typeof FIELD_STATES];
13
+ //# sourceMappingURL=autoSuggest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autoSuggest.d.ts","sourceRoot":"","sources":["../../../src/utils/autoSuggest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAE3D,eAAO,MAAM,sBAAsB,GAAI,MAAM,UAAU,KAAG,UAAU,CAAC,MAAM,CAM1E,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,gBAAgB,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAU1I"}
@@ -4,6 +4,7 @@ export { default as FieldArrayCardContainer } from '../components/fields/FieldAr
4
4
  export { default as FieldArrayItem } from '../components/fields/FieldArrayItem.vue';
5
5
  export { default as FieldArrayMultiItem } from '../components/fields/FieldArrayMultiItem.vue';
6
6
  export { default as FieldAutoSuggest } from '../components/fields/FieldAutoSuggest.vue';
7
+ export { default as FieldAutoSuggestV2 } from '../components/fields/FieldAutoSuggestV2.vue';
7
8
  export { default as FieldCheckbox } from '../components/fields/FieldCheckbox.vue';
8
9
  export { default as FieldChecklist } from '../components/fields/FieldChecklist.vue';
9
10
  export { default as FieldInput } from '../components/fields/FieldInput.vue';
@@ -1 +1 @@
1
- {"version":3,"file":"fieldsLoader.d.ts","sourceRoot":"","sources":["../../../src/utils/fieldsLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wCAAwC,CAAA;AACjF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,kDAAkD,CAAA;AACrG,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yCAAyC,CAAA;AACnF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8CAA8C,CAAA;AAC7F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AACvF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wCAAwC,CAAA;AACjF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yCAAyC,CAAA;AACnF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6CAA6C,CAAA;AAC3F,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAC7E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AACvF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAC7E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8CAA8C,CAAA;AAC7F,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAC7E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8CAA8C,CAAA;AAC7F,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAC7E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wCAAwC,CAAA"}
1
+ {"version":3,"file":"fieldsLoader.d.ts","sourceRoot":"","sources":["../../../src/utils/fieldsLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wCAAwC,CAAA;AACjF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,kDAAkD,CAAA;AACrG,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yCAAyC,CAAA;AACnF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8CAA8C,CAAA;AAC7F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AACvF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6CAA6C,CAAA;AAC3F,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wCAAwC,CAAA;AACjF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yCAAyC,CAAA;AACnF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6CAA6C,CAAA;AAC3F,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAC7E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AACvF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAC7E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8CAA8C,CAAA;AAC7F,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAC7E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8CAA8C,CAAA;AAC7F,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAC7E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wCAAwC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/forms",
3
- "version": "4.15.7-pr.2347.a3249204c.0",
3
+ "version": "4.15.8-pr.2204.6e36c8512.0",
4
4
  "type": "module",
5
5
  "main": "./dist/forms.umd.js",
6
6
  "module": "./dist/forms.es.js",
@@ -40,16 +40,16 @@
40
40
  "peerDependencies": {
41
41
  "@kong/kongponents": "^9.34.2",
42
42
  "vue": "^3.5.12",
43
- "@kong-ui-public/entities-shared": "^3.27.6-pr.2347.a3249204c.0",
44
- "@kong-ui-public/i18n": "^2.4.4-pr.2347.a3249204c.0"
43
+ "@kong-ui-public/entities-shared": "^3.27.6",
44
+ "@kong-ui-public/i18n": "^2.4.4"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@kong/design-tokens": "1.18.0",
48
48
  "@kong/kongponents": "9.38.3",
49
49
  "@types/lodash-es": "^4.17.12",
50
50
  "pug": "^3.0.3",
51
- "@kong-ui-public/entities-shared": "^3.27.6-pr.2347.a3249204c.0",
52
- "@kong-ui-public/i18n": "^2.4.4-pr.2347.a3249204c.0"
51
+ "@kong-ui-public/entities-shared": "^3.27.6",
52
+ "@kong-ui-public/i18n": "^2.4.4"
53
53
  },
54
54
  "distSizeChecker": {
55
55
  "errorLimit": "1.2MB"
@@ -58,6 +58,7 @@
58
58
  "dev": "cross-env USE_SANDBOX=true vite",
59
59
  "build": "run-s typecheck build:package build:types",
60
60
  "build:package": "vite build -m production",
61
+ "build:package:watch": "vite build -m development --watch",
61
62
  "build:analyzer": "BUILD_VISUALIZER='core/forms' vite build -m production",
62
63
  "build:types": "vue-tsc -p './tsconfig.build.json' --emitDeclarationOnly",
63
64
  "build:sandbox": "cross-env USE_SANDBOX=true vite build -m production",