@kong-ui-public/forms 4.15.9-pr.2351.dfbb2c3a8.0 → 4.16.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.
- package/dist/forms.es.js +2661 -2274
- package/dist/forms.umd.js +3 -3
- package/dist/style.css +1 -1
- package/dist/types/components/fields/AutoSuggest.vue.d.ts +38 -0
- package/dist/types/components/fields/AutoSuggest.vue.d.ts.map +1 -0
- package/dist/types/components/fields/FieldArray.vue.d.ts +232 -2
- package/dist/types/components/fields/FieldAutoSuggest.vue.d.ts +2 -2
- package/dist/types/components/fields/FieldAutoSuggestV2.vue.d.ts +232 -0
- package/dist/types/components/fields/FieldAutoSuggestV2.vue.d.ts.map +1 -0
- package/dist/types/components/fields/FieldScopedEntitySelect.vue.d.ts +58 -0
- package/dist/types/components/fields/FieldScopedEntitySelect.vue.d.ts.map +1 -0
- package/dist/types/components/fields/FieldSelectionGroup.vue.d.ts +7 -0
- package/dist/types/components/fields/FieldSelectionGroup.vue.d.ts.map +1 -1
- package/dist/types/const.d.ts +6 -0
- package/dist/types/const.d.ts.map +1 -1
- package/dist/types/types/form-autosuggest.d.ts +18 -0
- package/dist/types/types/form-autosuggest.d.ts.map +1 -0
- package/dist/types/utils/autoSuggest.d.ts +13 -0
- package/dist/types/utils/autoSuggest.d.ts.map +1 -0
- package/dist/types/utils/fieldsLoader.d.ts +1 -0
- package/dist/types/utils/fieldsLoader.d.ts.map +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,232 @@
|
|
|
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
|
+
selectedItemLoading?: boolean;
|
|
83
|
+
initialItemSelected?: boolean;
|
|
84
|
+
domId: string;
|
|
85
|
+
id: string;
|
|
86
|
+
entity: string;
|
|
87
|
+
disabled?: boolean;
|
|
88
|
+
fieldDisabled?: boolean;
|
|
89
|
+
} & import("../../types/form-autosuggest").AutoSuggestInjection> & Readonly<{
|
|
90
|
+
onChange?: ((item: import("@kong/kongponents").SelectItem<string> | null) => any) | undefined;
|
|
91
|
+
}>, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
92
|
+
change: (item: import("@kong/kongponents").SelectItem<string> | null) => any;
|
|
93
|
+
}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
94
|
+
P: {};
|
|
95
|
+
B: {};
|
|
96
|
+
D: {};
|
|
97
|
+
C: {};
|
|
98
|
+
M: {};
|
|
99
|
+
Defaults: {};
|
|
100
|
+
}, Readonly<{
|
|
101
|
+
transformItem?: import("../../types/form-autosuggest").AutoSuggestItemTransformer;
|
|
102
|
+
allowUuidSearch?: boolean;
|
|
103
|
+
placeholder?: string;
|
|
104
|
+
fields: string[];
|
|
105
|
+
selectedItem?: import("@kong/kongponents").SelectItem<string>;
|
|
106
|
+
selectedItemLoading?: boolean;
|
|
107
|
+
initialItemSelected?: boolean;
|
|
108
|
+
domId: string;
|
|
109
|
+
id: string;
|
|
110
|
+
entity: string;
|
|
111
|
+
disabled?: boolean;
|
|
112
|
+
fieldDisabled?: boolean;
|
|
113
|
+
} & import("../../types/form-autosuggest").AutoSuggestInjection> & Readonly<{
|
|
114
|
+
onChange?: ((item: import("@kong/kongponents").SelectItem<string> | null) => any) | undefined;
|
|
115
|
+
}>, {}, {}, {}, {}, {}>;
|
|
116
|
+
__isFragment?: never;
|
|
117
|
+
__isTeleport?: never;
|
|
118
|
+
__isSuspense?: never;
|
|
119
|
+
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
120
|
+
transformItem?: import("../../types/form-autosuggest").AutoSuggestItemTransformer;
|
|
121
|
+
allowUuidSearch?: boolean;
|
|
122
|
+
placeholder?: string;
|
|
123
|
+
fields: string[];
|
|
124
|
+
selectedItem?: import("@kong/kongponents").SelectItem<string>;
|
|
125
|
+
selectedItemLoading?: boolean;
|
|
126
|
+
initialItemSelected?: boolean;
|
|
127
|
+
domId: string;
|
|
128
|
+
id: string;
|
|
129
|
+
entity: string;
|
|
130
|
+
disabled?: boolean;
|
|
131
|
+
fieldDisabled?: boolean;
|
|
132
|
+
} & import("../../types/form-autosuggest").AutoSuggestInjection> & Readonly<{
|
|
133
|
+
onChange?: ((item: import("@kong/kongponents").SelectItem<string> | null) => any) | undefined;
|
|
134
|
+
}>, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
135
|
+
change: (item: import("@kong/kongponents").SelectItem<string> | null) => any;
|
|
136
|
+
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
137
|
+
$slots: {
|
|
138
|
+
before?: (props: {}) => any;
|
|
139
|
+
} & {
|
|
140
|
+
'selected-item'?: (props: {
|
|
141
|
+
item: import("@kong/kongponents").SelectItem<string>;
|
|
142
|
+
}) => any;
|
|
143
|
+
} & {
|
|
144
|
+
item?: (props: {
|
|
145
|
+
item: import("@kong/kongponents").SelectItem<string>;
|
|
146
|
+
}) => any;
|
|
147
|
+
};
|
|
148
|
+
});
|
|
149
|
+
SearchIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
150
|
+
title: {
|
|
151
|
+
type: StringConstructor;
|
|
152
|
+
required: false;
|
|
153
|
+
default: string;
|
|
154
|
+
};
|
|
155
|
+
color: {
|
|
156
|
+
type: StringConstructor;
|
|
157
|
+
required: false;
|
|
158
|
+
default: string;
|
|
159
|
+
};
|
|
160
|
+
display: {
|
|
161
|
+
type: StringConstructor;
|
|
162
|
+
required: false;
|
|
163
|
+
default: string;
|
|
164
|
+
};
|
|
165
|
+
decorative: {
|
|
166
|
+
type: BooleanConstructor;
|
|
167
|
+
required: false;
|
|
168
|
+
default: boolean;
|
|
169
|
+
};
|
|
170
|
+
size: {
|
|
171
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
172
|
+
required: false;
|
|
173
|
+
default: "24px";
|
|
174
|
+
validator: (sizeValue: number | string) => boolean;
|
|
175
|
+
};
|
|
176
|
+
as: {
|
|
177
|
+
type: StringConstructor;
|
|
178
|
+
required: false;
|
|
179
|
+
default: string;
|
|
180
|
+
};
|
|
181
|
+
staticIds: {
|
|
182
|
+
type: BooleanConstructor;
|
|
183
|
+
default: boolean;
|
|
184
|
+
};
|
|
185
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
186
|
+
title: {
|
|
187
|
+
type: StringConstructor;
|
|
188
|
+
required: false;
|
|
189
|
+
default: string;
|
|
190
|
+
};
|
|
191
|
+
color: {
|
|
192
|
+
type: StringConstructor;
|
|
193
|
+
required: false;
|
|
194
|
+
default: string;
|
|
195
|
+
};
|
|
196
|
+
display: {
|
|
197
|
+
type: StringConstructor;
|
|
198
|
+
required: false;
|
|
199
|
+
default: string;
|
|
200
|
+
};
|
|
201
|
+
decorative: {
|
|
202
|
+
type: BooleanConstructor;
|
|
203
|
+
required: false;
|
|
204
|
+
default: boolean;
|
|
205
|
+
};
|
|
206
|
+
size: {
|
|
207
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
208
|
+
required: false;
|
|
209
|
+
default: "24px";
|
|
210
|
+
validator: (sizeValue: number | string) => boolean;
|
|
211
|
+
};
|
|
212
|
+
as: {
|
|
213
|
+
type: StringConstructor;
|
|
214
|
+
required: false;
|
|
215
|
+
default: string;
|
|
216
|
+
};
|
|
217
|
+
staticIds: {
|
|
218
|
+
type: BooleanConstructor;
|
|
219
|
+
default: boolean;
|
|
220
|
+
};
|
|
221
|
+
}>> & Readonly<{}>, {
|
|
222
|
+
title: string;
|
|
223
|
+
color: string;
|
|
224
|
+
display: string;
|
|
225
|
+
decorative: boolean;
|
|
226
|
+
size: string | number;
|
|
227
|
+
as: string;
|
|
228
|
+
staticIds: boolean;
|
|
229
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
230
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
231
|
+
export default _default;
|
|
232
|
+
//# 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,58 @@
|
|
|
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
|
+
selectedItemLoading?: boolean;
|
|
27
|
+
initialItemSelected?: boolean;
|
|
28
|
+
domId: string;
|
|
29
|
+
id: string;
|
|
30
|
+
entity: string;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
fieldDisabled?: boolean;
|
|
33
|
+
} & AutoSuggestInjection;
|
|
34
|
+
declare var __VLS_11: {}, __VLS_14: {
|
|
35
|
+
item: SelectItem<string>;
|
|
36
|
+
}, __VLS_17: {
|
|
37
|
+
item: SelectItem<string>;
|
|
38
|
+
};
|
|
39
|
+
type __VLS_Slots = {} & {
|
|
40
|
+
before?: (props: typeof __VLS_11) => any;
|
|
41
|
+
} & {
|
|
42
|
+
'selected-item'?: (props: typeof __VLS_14) => any;
|
|
43
|
+
} & {
|
|
44
|
+
item?: (props: typeof __VLS_17) => any;
|
|
45
|
+
};
|
|
46
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
|
+
change: (item: SelectItem<string> | null) => any;
|
|
48
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
49
|
+
onChange?: ((item: SelectItem<string> | null) => any) | undefined;
|
|
50
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=FieldScopedEntitySelect.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldScopedEnt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AAe,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"}
|
package/dist/types/const.d.ts
CHANGED
|
@@ -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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,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.
|
|
3
|
+
"version": "4.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/forms.umd.js",
|
|
6
6
|
"module": "./dist/forms.es.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@kong/kongponents": "^9.34.2",
|
|
42
42
|
"vue": "^3.5.12",
|
|
43
|
-
"@kong-ui-public/entities-shared": "^3.27.
|
|
43
|
+
"@kong-ui-public/entities-shared": "^3.27.7",
|
|
44
44
|
"@kong-ui-public/i18n": "^2.4.4"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@kong/kongponents": "9.38.4",
|
|
49
49
|
"@types/lodash-es": "^4.17.12",
|
|
50
50
|
"pug": "^3.0.3",
|
|
51
|
-
"@kong-ui-public/entities-shared": "^3.27.
|
|
51
|
+
"@kong-ui-public/entities-shared": "^3.27.7",
|
|
52
52
|
"@kong-ui-public/i18n": "^2.4.4"
|
|
53
53
|
},
|
|
54
54
|
"distSizeChecker": {
|
|
@@ -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",
|