@cobre-npm/ds-v3 0.126.2 → 0.126.4
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/cobre-ds-v3-lib.es.js +52 -43
- package/dist/style.css +1 -1
- package/dist/types/components/atoms/CobreAvatar/CobreAvatar.vue.d.ts +5 -0
- package/dist/types/components/atoms/CobreBankLogo/CobreBankLogo.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobreButtonMenu/CobreButtonMenu.vue.d.ts +5 -0
- package/dist/types/components/atoms/CobreCardButton/CobreCardButton.vue.d.ts +5 -0
- package/dist/types/components/atoms/CobreColumnTable/CobreColumnTable.vue.d.ts +7 -0
- package/dist/types/components/atoms/CobreCountryFlag/CobreCountryFlag.vue.d.ts +5 -0
- package/dist/types/components/atoms/CobreDetailRow/CobreDetailRow.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobreEmptyResults/CobreEmptyResults.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobreHeadline/CobreHeadline.vue.d.ts +5 -0
- package/dist/types/components/atoms/CobreIndicative/CobreIndicative.vue.d.ts +7 -0
- package/dist/types/components/atoms/CobreInfoDetail/CobreInfoDetail.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobreInputLabel/CobreInputLabel.vue.d.ts +4 -0
- package/dist/types/components/atoms/CobreOptionsSwitch/CobreOptionsSwitch.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobrePager/CobrePager.vue.d.ts +5 -0
- package/dist/types/components/atoms/CobreRadio/CobreRadio.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobreRowActions/CobreRowActions.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobreRowActions/interfaces/CobreRowActions.interface.d.ts +8 -0
- package/dist/types/components/atoms/CobreSegmentedTabs/CobreSegmentedTabs.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobreSwitch/CobreSwitch.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobreTabMenu/CobreTabMenu.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobreTabMenuV2/CobreTabMenu.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobreTruncateTooltipText/CobreTruncateTooltipText.vue.d.ts +5 -0
- package/dist/types/components/atoms/CobreUploader/CobreUploader.vue.d.ts +6 -0
- package/dist/types/components/atoms/CobreWidgetState/CobreWidgetState.vue.d.ts +5 -0
- package/dist/types/components/molecules/CobreAccountCpButton/CobreAccountCpButton.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreAccountCpLogo/CobreAccountCpLogo.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreAccountInfoFiled/CobreAccountInfoField.vue.d.ts +5 -0
- package/dist/types/components/molecules/CobreAccountOptionSelect/CobreAccountOptionSelect.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreActionList/CobreActionList.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreAvatarsGroup/CobreAvatarsGroup.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreBalanceCard/CobreBalanceCard.vue.d.ts +5 -0
- package/dist/types/components/molecules/CobreCardIcon/CobreCardIcon.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreCopyTextBox/CobreCopyTextBox.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreEntityIdCopyButton/CobreEntityIdCopyButton.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreFieldLogo/CobreFieldLogo.vue.d.ts +5 -0
- package/dist/types/components/molecules/CobreFlowResult/CobreFlowResult.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreFormOtp/CobreFormOtp.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreInputAmount/CobreInputAmount.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreInputCurrency/CobreInputCurrency.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreInputDatePicker/CobreInputDatePicker.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreInputPhoneNumber/CobreInputPhoneNumber.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreInputUrl/CobreInputUrl.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreKebabMenu/CobreKebabMenu.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreLogoField/CobreLogoField.vue.d.ts +5 -0
- package/dist/types/components/molecules/CobreModalAction/CobreModalAction.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreMultiOptionsFilter/CobreMultiOptionsFilter.vue.d.ts +7 -0
- package/dist/types/components/molecules/CobreRowTable/CobreRowTable.vue.d.ts +10 -0
- package/dist/types/components/molecules/CobreSelectTags/CobreSelectTags.vue.d.ts +7 -0
- package/dist/types/components/molecules/CobreTableCellCopy/CobreTableCellCopy.vue.d.ts +6 -0
- package/dist/types/components/molecules/CobreTourTooltip/CobreTourTooltip.vue.d.ts +7 -0
- package/dist/types/components/molecules/Toolbar/CobreInputSearch/CobreInputSearch.vue.d.ts +5 -0
- package/dist/types/components/molecules/Toolbar/CobreInputSearchV2/CobreInputSearchV2.vue.d.ts +7 -0
- package/dist/types/components/organisms/CobreAccountPicker/CobreAccountPicker.vue.d.ts +6 -0
- package/dist/types/components/organisms/CobreAccountPickerModal/interfaces/account-selector-modal.interface.d.ts +11 -1
- package/dist/types/components/organisms/CobreDateFilter/CobreDateFilter.vue.d.ts +7 -0
- package/dist/types/components/organisms/CobreDynamicForm/CobreDynamicForm.vue.d.ts +7 -0
- package/dist/types/components/organisms/CobreDynamicForm/interfaces/currencies.interface.d.ts +4 -0
- package/dist/types/components/organisms/CobreDynamicForm/interfaces/field.interface.d.ts +25 -0
- package/dist/types/components/organisms/CobreFilterPanel/CobreFilterPanel.vue.d.ts +8 -0
- package/dist/types/components/organisms/CobreFilterPanel/components/FilterAmountRange.vue.d.ts +6 -0
- package/dist/types/components/organisms/CobreFilterPanel/components/FilterCheckboxList.vue.d.ts +6 -0
- package/dist/types/components/organisms/CobreFilterPanel/components/FilterInput.vue.d.ts +6 -0
- package/dist/types/components/organisms/CobreFilterPanel/components/FilterRadioList.vue.d.ts +6 -0
- package/dist/types/components/organisms/CobreFilterPanel/components/FilterSelect.vue.d.ts +6 -0
- package/dist/types/components/organisms/CobreFilterPanel/interfaces/filter.interface.d.ts +26 -0
- package/dist/types/components/organisms/CobreHeader/CobreHeader.vue.d.ts +7 -0
- package/dist/types/components/organisms/CobreHeader/components/Navbar.vue.d.ts +5 -0
- package/dist/types/components/organisms/CobreSideMenu/CobreSideMenu.vue.d.ts +6 -0
- package/dist/types/components/organisms/CobreSideMenu/components/SideMenuItem.vue.d.ts +6 -0
- package/dist/types/components/organisms/CobreSideMenu/components/SubItems.vue.d.ts +5 -0
- package/dist/types/components/organisms/CobreSideMenu/interfaces/menu.interface.d.ts +15 -0
- package/dist/types/components/organisms/CobreTimeline/CobreTimeline.vue.d.ts +5 -0
- package/dist/types/types/button.types.d.ts +5 -0
- package/dist/types/types/icon.types.d.ts +1 -0
- package/dist/types/utils/banksList.d.ts +1 -0
- package/dist/types/utils/index.d.ts +14 -0
- package/dist/types/utils/indicativesList.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CobreInputSearch — a debounced search input for toolbars, with a search icon,
|
|
3
|
+
* loading spinner and clear button. Use to filter lists/tables as the user types.
|
|
4
|
+
* Auto-focuses on mount. Emits debounced `update:modelValue` and `deleteInput`.
|
|
5
|
+
*/
|
|
1
6
|
interface Props {
|
|
2
7
|
modelValue?: string;
|
|
3
8
|
isLoading?: boolean;
|
package/dist/types/components/molecules/Toolbar/CobreInputSearchV2/CobreInputSearchV2.vue.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CobreInputSearchV2 — an expandable, debounced toolbar search field with an inline
|
|
3
|
+
* label, clear button and click-outside / Escape-to-collapse behaviour.
|
|
4
|
+
* Use as a compact search that expands on focus and collapses when emptied/dismissed.
|
|
5
|
+
* Auto-focuses on mount. Emits debounced `update:modelValue`, `deleteInput` and
|
|
6
|
+
* `closeSearch` (with whether it had a value).
|
|
7
|
+
*/
|
|
1
8
|
interface Props {
|
|
2
9
|
modelValue?: string;
|
|
3
10
|
isLoading?: boolean;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { type CobreSelectableItem } from '../../molecules/CobreAccountOptionSelect/CobreAccountOptionSelect.vue';
|
|
2
|
+
/**
|
|
3
|
+
* CobreAccountPicker — a button-style trigger that displays the currently
|
|
4
|
+
* selected account/counterparty (or a placeholder) and emits `click` to open a
|
|
5
|
+
* picker dialog. Use as the entry point for choosing a source/destination
|
|
6
|
+
* account in a flow; pair it with your own list/modal to perform the selection.
|
|
7
|
+
*/
|
|
2
8
|
interface Props {
|
|
3
9
|
label: string;
|
|
4
10
|
placeholderText: string;
|
|
@@ -1,25 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
/** Severity level of an alert shown in the account picker modal. */
|
|
2
|
+
export type AlertType = 'danger' | 'success' | 'warning' | 'info';
|
|
3
|
+
/** An alert message and its severity displayed in the account picker modal. */
|
|
2
4
|
export interface AlertConfig {
|
|
3
5
|
type: AlertType;
|
|
4
6
|
text: string;
|
|
5
7
|
}
|
|
8
|
+
/** A tab in the account picker modal's tab bar. */
|
|
6
9
|
export interface TabConfigItem {
|
|
7
10
|
id: string;
|
|
8
11
|
name: string;
|
|
9
12
|
icon?: string;
|
|
10
13
|
}
|
|
14
|
+
/** A selectable option within an account picker filter. */
|
|
11
15
|
export interface FilterOptionItem {
|
|
12
16
|
id: number;
|
|
13
17
|
label: string;
|
|
14
18
|
value: string;
|
|
15
19
|
}
|
|
20
|
+
/** Configuration for a single filter in the account picker modal. */
|
|
16
21
|
export interface FilterConfig {
|
|
22
|
+
/** Query/parameter key the filter writes to. */
|
|
17
23
|
param: string;
|
|
18
24
|
label: string;
|
|
25
|
+
/** Heading shown above the filter's option list. */
|
|
19
26
|
optionsTitle: string;
|
|
20
27
|
options: FilterOptionItem[];
|
|
28
|
+
/** Currently selected option value(s). */
|
|
21
29
|
value?: string[];
|
|
30
|
+
/** Custom width for the filter's dropdown box (CSS length). */
|
|
22
31
|
customBoxWidth?: string;
|
|
32
|
+
/** Max characters before the displayed label is truncated. */
|
|
23
33
|
maxTextLength?: number;
|
|
24
34
|
disabled?: boolean;
|
|
25
35
|
}
|
|
@@ -5,6 +5,13 @@ interface ParsedDate {
|
|
|
5
5
|
date_lte: Date | string | [Date, Date] | null;
|
|
6
6
|
type: CalendarTypes;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* CobreDateFilter — a chip-triggered dropdown date filter built on the vue
|
|
10
|
+
* datepicker. Lets the user pick a single date, a range, or a relative shortcut
|
|
11
|
+
* (today, lastN, after, before), emitting the resolved `date_gte`/`date_lte`
|
|
12
|
+
* bounds. Use in table/list toolbars to filter records by date.
|
|
13
|
+
* Exposes `clearDate()`; provides a `header-content` slot above the calendar.
|
|
14
|
+
*/
|
|
8
15
|
interface Props {
|
|
9
16
|
modelValue: null | {
|
|
10
17
|
date_gte: Date | string | [Date, Date] | null;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { ComputedRef } from 'vue';
|
|
2
2
|
import type { Field } from './interfaces/field.interface';
|
|
3
|
+
/**
|
|
4
|
+
* CobreDynamicForm — renders a form from a declarative `fields` array, mapping
|
|
5
|
+
* each field's `type` to the matching Cobre input (input, date, select,
|
|
6
|
+
* currency, phone, radio, url, checkbox). Use to build configurable forms
|
|
7
|
+
* without hand-wiring each control; only fields with `visible: true` are shown.
|
|
8
|
+
* Exposes `isFormValid` and `reset()`; emits `field-updated` on every change.
|
|
9
|
+
*/
|
|
3
10
|
type __VLS_Props = {
|
|
4
11
|
fields: Field[];
|
|
5
12
|
formId: string;
|
package/dist/types/components/organisms/CobreDynamicForm/interfaces/currencies.interface.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
/** A selectable currency option used by CobreDynamicForm currency fields. */
|
|
1
2
|
export interface Currency {
|
|
2
3
|
id: number;
|
|
3
4
|
label: string;
|
|
5
|
+
/** Currency code (e.g. ISO 4217 like 'USD', 'COP'). */
|
|
4
6
|
code: string;
|
|
5
7
|
value: string;
|
|
8
|
+
/** Geographic/region identifier associated with the currency. */
|
|
6
9
|
geo: string;
|
|
10
|
+
/** Minimum amount allowed for this currency. */
|
|
7
11
|
minAmount: number;
|
|
8
12
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { ComputedRef, Component, Ref } from 'vue';
|
|
2
2
|
import { Currency } from './currencies.interface';
|
|
3
|
+
/** Character/validation constraint applied to a CobreDynamicForm input field's value. */
|
|
3
4
|
export type InputType = 'email' | 'anyCharacter' | 'alphanumeric' | 'numeric' | 'letters' | 'password';
|
|
5
|
+
/** Widget rendered for a CobreDynamicForm field. */
|
|
4
6
|
export type FieldType = 'input' | 'select' | 'radio' | 'currency' | 'phone' | 'checkbox' | 'date' | 'url';
|
|
7
|
+
/** Imperative handle exposing a CobreDynamicForm field's validation state and reset action. */
|
|
5
8
|
export interface FieldRef {
|
|
6
9
|
isValid: boolean;
|
|
7
10
|
isDirty: boolean;
|
|
@@ -15,53 +18,75 @@ export interface FieldRef {
|
|
|
15
18
|
areValidLetters: boolean;
|
|
16
19
|
reset: () => void;
|
|
17
20
|
}
|
|
21
|
+
/** Configuration for a single field rendered by CobreDynamicForm, including its widget type, value, validation, and per-widget props. */
|
|
18
22
|
export interface Field {
|
|
19
23
|
id: string;
|
|
20
24
|
type: FieldType;
|
|
25
|
+
/** Reactive handle to the field's validation state (see FieldRef). */
|
|
21
26
|
ref?: Ref<Partial<FieldRef | null>>;
|
|
22
27
|
label: string;
|
|
23
28
|
placeholder?: string;
|
|
24
29
|
name?: string;
|
|
25
30
|
value: any;
|
|
26
31
|
required: boolean;
|
|
32
|
+
/** Whether the field is shown in the form. */
|
|
27
33
|
visible: boolean;
|
|
34
|
+
/** Number of grid columns the field spans in the form layout. */
|
|
28
35
|
colSpan?: number;
|
|
36
|
+
/** CSS class applied to the field's wrapper element. */
|
|
29
37
|
parentClass?: string;
|
|
38
|
+
/** CSS class applied to the field's control element. */
|
|
30
39
|
className?: string;
|
|
40
|
+
/** Validation rules and custom validity check applied to the field's value. */
|
|
31
41
|
validation?: {
|
|
32
42
|
minLength?: number | ComputedRef<number>;
|
|
33
43
|
maxLength?: number | ComputedRef<number>;
|
|
34
44
|
minAmount?: number;
|
|
35
45
|
type?: InputType;
|
|
46
|
+
/** Message displayed when the field is invalid. */
|
|
36
47
|
errorMessage?: ComputedRef<string>;
|
|
48
|
+
/** Custom validity predicate; returns true when the value is valid. */
|
|
37
49
|
isValid?: () => boolean;
|
|
38
50
|
};
|
|
51
|
+
/** Options for choice-based fields (select, radio). */
|
|
39
52
|
options?: any[];
|
|
53
|
+
/** Widget-specific props forwarded to the underlying field component. */
|
|
40
54
|
props?: {
|
|
41
55
|
currencySelected?: string;
|
|
42
56
|
searchable?: boolean;
|
|
43
57
|
disabled?: boolean;
|
|
44
58
|
currencies?: Currency[];
|
|
59
|
+
/** Maps an option object to the value stored for the field (vue-select style). */
|
|
45
60
|
reduce?: (item: any) => any;
|
|
46
61
|
clearable?: boolean;
|
|
47
62
|
label?: string;
|
|
63
|
+
/** Custom component rendered for each option in a select. */
|
|
48
64
|
optionSlot?: Component;
|
|
65
|
+
/** Custom component rendered for the selected option in a select. */
|
|
49
66
|
selectedOptionSlot?: Component;
|
|
50
67
|
multiple?: boolean;
|
|
68
|
+
/** Tooltip text shown next to the field label. */
|
|
51
69
|
labelTooltip?: string;
|
|
70
|
+
/** Informational helper text shown for the field. */
|
|
52
71
|
infoLabel?: string;
|
|
53
72
|
isCurrencyDisabled?: boolean;
|
|
73
|
+
/** Available country dialing-code options for a phone field. */
|
|
54
74
|
indicativeOptions?: Array<{
|
|
55
75
|
code: string;
|
|
56
76
|
geo: string;
|
|
57
77
|
country: string;
|
|
58
78
|
}>;
|
|
79
|
+
/** Currently selected dialing code for a phone field. */
|
|
59
80
|
indicativeModelValue?: string;
|
|
60
81
|
maxDate?: Date;
|
|
61
82
|
minDate?: Date;
|
|
83
|
+
/** Date display/parse format string. */
|
|
62
84
|
format?: string;
|
|
85
|
+
/** Locale used to render the date picker. */
|
|
63
86
|
locale?: string;
|
|
87
|
+
/** When true, the date picker selects a date range instead of a single date. */
|
|
64
88
|
range?: boolean;
|
|
65
89
|
};
|
|
90
|
+
/** Callback invoked when the field's value changes. */
|
|
66
91
|
onUpdate?: (value: any) => void;
|
|
67
92
|
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import type { Filter } from './interfaces/filter.interface';
|
|
2
|
+
/**
|
|
3
|
+
* CobreFilterPanel — a two-pane filter popover: a left tab list (one per
|
|
4
|
+
* filter) and the active filter's control on the right, rendered from the
|
|
5
|
+
* declarative `filters` array (checkbox, radio, input, amount-range, select).
|
|
6
|
+
* Use to filter a table/list by several dimensions at once; the parent owns
|
|
7
|
+
* filter values/state via the `filter-updated`/`filter-search`/`filter-cleared`
|
|
8
|
+
* events. Exposes `areFiltersValid()` and `reset()`.
|
|
9
|
+
*/
|
|
2
10
|
interface Props {
|
|
3
11
|
filters?: Filter[];
|
|
4
12
|
isOpen?: boolean;
|
package/dist/types/components/organisms/CobreFilterPanel/components/FilterAmountRange.vue.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { AmountRangeFilter, AmountRangeValue } from '../interfaces/filter.interface';
|
|
2
|
+
/**
|
|
3
|
+
* FilterAmountRange — the amount-range control for CobreFilterPanel: a pair of
|
|
4
|
+
* from/to amount inputs that emit the updated `{ from, to }` value. Validates
|
|
5
|
+
* that `from` does not exceed `to` and surfaces the filter's error message.
|
|
6
|
+
* Rendered internally by CobreFilterPanel for `amount-range` filters; exposes `isValid`.
|
|
7
|
+
*/
|
|
2
8
|
type __VLS_Props = {
|
|
3
9
|
filter: AmountRangeFilter;
|
|
4
10
|
};
|
package/dist/types/components/organisms/CobreFilterPanel/components/FilterCheckboxList.vue.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { CheckboxFilter } from '../interfaces/filter.interface';
|
|
2
|
+
/**
|
|
3
|
+
* FilterCheckboxList — the checkbox-group control for CobreFilterPanel: renders
|
|
4
|
+
* one checkbox per option and emits the updated array of selected values when
|
|
5
|
+
* an option is toggled. Options may carry a `logoURL` for an inline icon.
|
|
6
|
+
* Rendered internally by CobreFilterPanel for `checkbox` filters.
|
|
7
|
+
*/
|
|
2
8
|
type __VLS_Props = {
|
|
3
9
|
filter: CheckboxFilter;
|
|
4
10
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { InputFilter } from '../interfaces/filter.interface';
|
|
2
|
+
/**
|
|
3
|
+
* FilterInput — the free-text control for CobreFilterPanel: a single CobreInput
|
|
4
|
+
* that emits its string value and surfaces the filter's validation error.
|
|
5
|
+
* Honors the filter's inputType, placeholder, and min/max length.
|
|
6
|
+
* Rendered internally by CobreFilterPanel for `input` filters.
|
|
7
|
+
*/
|
|
2
8
|
type __VLS_Props = {
|
|
3
9
|
filter: InputFilter;
|
|
4
10
|
};
|
package/dist/types/components/organisms/CobreFilterPanel/components/FilterRadioList.vue.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { RadioFilter } from '../interfaces/filter.interface';
|
|
2
|
+
/**
|
|
3
|
+
* FilterRadioList — the single-select radio-group control for CobreFilterPanel:
|
|
4
|
+
* renders one radio per option and emits the chosen value on selection.
|
|
5
|
+
* Options may carry a `logoURL` for an inline icon.
|
|
6
|
+
* Rendered internally by CobreFilterPanel for `radio` filters.
|
|
7
|
+
*/
|
|
2
8
|
type __VLS_Props = {
|
|
3
9
|
filter: RadioFilter;
|
|
4
10
|
};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { SelectFilter } from '../interfaces/filter.interface';
|
|
2
|
+
/**
|
|
3
|
+
* FilterSelect — the dropdown control for CobreFilterPanel: wraps CobreSelect
|
|
4
|
+
* and emits the chosen value (or array when `multiple`). Honors the filter's
|
|
5
|
+
* placeholder, searchable, clearable, multiple, reduce, and optionLabel props.
|
|
6
|
+
* Rendered internally by CobreFilterPanel for `select` filters.
|
|
7
|
+
*/
|
|
2
8
|
type __VLS_Props = {
|
|
3
9
|
filter: SelectFilter;
|
|
4
10
|
};
|
|
@@ -1,38 +1,54 @@
|
|
|
1
|
+
/** Kind of control rendered for a CobreFilterPanel filter. */
|
|
1
2
|
export type FilterType = 'checkbox' | 'radio' | 'input' | 'amount-range' | 'select';
|
|
3
|
+
/** A selectable option within a choice-based filter (checkbox, radio, select). */
|
|
2
4
|
export interface FilterOption {
|
|
3
5
|
label: string;
|
|
4
6
|
value: string | number;
|
|
7
|
+
/** URL of a logo/icon image shown beside the option. */
|
|
5
8
|
logoURL?: string;
|
|
6
9
|
disabled?: boolean;
|
|
7
10
|
}
|
|
11
|
+
/** Lower/upper bounds of an amount-range filter; null means unbounded on that end. */
|
|
8
12
|
export interface AmountRangeValue {
|
|
9
13
|
from: number | null;
|
|
10
14
|
to: number | null;
|
|
11
15
|
}
|
|
16
|
+
/** Shared shape for every filter, parameterized by its FilterType; concrete filters extend this. */
|
|
12
17
|
export interface BaseFilter<T extends FilterType> {
|
|
18
|
+
/** Unique identifier used to read/write the filter's value. */
|
|
13
19
|
key: string;
|
|
14
20
|
type: T;
|
|
15
21
|
label: string;
|
|
16
22
|
icon?: string;
|
|
23
|
+
/** Number of active selections, shown as a badge. */
|
|
17
24
|
count?: number;
|
|
25
|
+
/** Whether the filter's options are currently loading. */
|
|
18
26
|
loading?: boolean;
|
|
27
|
+
/** Empty-state configuration shown when there are no options. */
|
|
19
28
|
empty?: {
|
|
20
29
|
show: boolean;
|
|
21
30
|
text?: string;
|
|
22
31
|
icon?: 'cards' | 'box' | 'error';
|
|
23
32
|
};
|
|
24
33
|
}
|
|
34
|
+
/** Shared validation hooks mixed into filter definitions. */
|
|
25
35
|
export interface CommonValidation {
|
|
36
|
+
/** Custom validity predicate; returns true when the filter value is valid. */
|
|
26
37
|
isValid?: () => boolean;
|
|
27
38
|
errorMessage?: string;
|
|
28
39
|
}
|
|
40
|
+
/** Shared disabled-state props mixed into filter `props`. */
|
|
29
41
|
export interface CommonDisabledProps {
|
|
30
42
|
disabled?: boolean;
|
|
43
|
+
/** Tooltip text shown next to the filter label. */
|
|
31
44
|
labelTooltip?: string;
|
|
32
45
|
}
|
|
46
|
+
/** Character/validation constraint applied to a filter's text input. */
|
|
33
47
|
export type CobreInputType = 'anyCharacter' | 'alphanumeric' | 'numeric' | 'letters' | 'email';
|
|
48
|
+
/** Shared search-box props mixed into filters whose options can be searched. */
|
|
34
49
|
export interface CommonSearchProps {
|
|
35
50
|
searchable?: boolean;
|
|
51
|
+
/** Configuration for the option search box. */
|
|
36
52
|
search?: {
|
|
37
53
|
placeholder?: string;
|
|
38
54
|
disabled?: boolean;
|
|
@@ -40,18 +56,21 @@ export interface CommonSearchProps {
|
|
|
40
56
|
inputType?: CobreInputType;
|
|
41
57
|
};
|
|
42
58
|
}
|
|
59
|
+
/** A multi-select checkbox-group filter; value holds the selected option values. */
|
|
43
60
|
export interface CheckboxFilter extends BaseFilter<'checkbox'> {
|
|
44
61
|
value: (string | number)[];
|
|
45
62
|
options: FilterOption[];
|
|
46
63
|
props?: CommonDisabledProps & CommonSearchProps;
|
|
47
64
|
validation?: CommonValidation;
|
|
48
65
|
}
|
|
66
|
+
/** A single-select radio-group filter; value is the chosen option or null. */
|
|
49
67
|
export interface RadioFilter extends BaseFilter<'radio'> {
|
|
50
68
|
value: string | number | null;
|
|
51
69
|
options: FilterOption[];
|
|
52
70
|
props?: CommonDisabledProps & CommonSearchProps;
|
|
53
71
|
validation?: CommonValidation;
|
|
54
72
|
}
|
|
73
|
+
/** A free-text input filter with optional length validation. */
|
|
55
74
|
export interface InputFilter extends BaseFilter<'input'> {
|
|
56
75
|
value: string;
|
|
57
76
|
props?: CommonDisabledProps & {
|
|
@@ -63,10 +82,13 @@ export interface InputFilter extends BaseFilter<'input'> {
|
|
|
63
82
|
maxLength?: number;
|
|
64
83
|
};
|
|
65
84
|
}
|
|
85
|
+
/** A numeric from/to range filter with optional min/max amount validation. */
|
|
66
86
|
export interface AmountRangeFilter extends BaseFilter<'amount-range'> {
|
|
67
87
|
value: AmountRangeValue;
|
|
68
88
|
props: CommonDisabledProps & {
|
|
89
|
+
/** Label for the lower-bound (from) input. */
|
|
69
90
|
fromLabel: string;
|
|
91
|
+
/** Label for the upper-bound (to) input. */
|
|
70
92
|
toLabel: string;
|
|
71
93
|
fromPlaceholder?: string;
|
|
72
94
|
toPlaceholder?: string;
|
|
@@ -76,6 +98,7 @@ export interface AmountRangeFilter extends BaseFilter<'amount-range'> {
|
|
|
76
98
|
maxAmount?: number;
|
|
77
99
|
};
|
|
78
100
|
}
|
|
101
|
+
/** A dropdown select filter; value is the chosen option (or array when multiple) or null. */
|
|
79
102
|
export interface SelectFilter extends BaseFilter<'select'> {
|
|
80
103
|
value: string | number | null;
|
|
81
104
|
options: FilterOption[];
|
|
@@ -84,9 +107,12 @@ export interface SelectFilter extends BaseFilter<'select'> {
|
|
|
84
107
|
searchable?: boolean;
|
|
85
108
|
clearable?: boolean;
|
|
86
109
|
multiple?: boolean;
|
|
110
|
+
/** Maps an option object to the value stored for the filter (vue-select style). */
|
|
87
111
|
reduce?: (item: any) => any;
|
|
112
|
+
/** Key on the option object used as its display label. */
|
|
88
113
|
optionLabel?: string;
|
|
89
114
|
};
|
|
90
115
|
validation?: CommonValidation;
|
|
91
116
|
}
|
|
117
|
+
/** Discriminated union of every filter type accepted by CobreFilterPanel. */
|
|
92
118
|
export type Filter = CheckboxFilter | RadioFilter | InputFilter | AmountRangeFilter | SelectFilter;
|
|
@@ -9,6 +9,13 @@ export interface MenuItem {
|
|
|
9
9
|
icon?: string;
|
|
10
10
|
subItems?: Items[];
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* CobreHeader — top application bar for the Cobre platform.
|
|
14
|
+
* Use as the page header; on mobile it toggles a hamburger menu that renders the
|
|
15
|
+
* `menu` entries via the Navbar component. For the persistent desktop side
|
|
16
|
+
* navigation use CobreSideMenu instead.
|
|
17
|
+
* Provides `start` (left, e.g. logo) and `end` (right, e.g. avatar/actions) slots.
|
|
18
|
+
*/
|
|
12
19
|
interface Props {
|
|
13
20
|
menu: MenuItem[];
|
|
14
21
|
menuItemActive: string;
|
|
@@ -9,6 +9,11 @@ interface Menu {
|
|
|
9
9
|
highlight?: boolean;
|
|
10
10
|
subItems?: SubItems[];
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Navbar — the navigation list rendered inside CobreHeader's mobile menu.
|
|
14
|
+
* Renders each `menu` entry; entries with subItems become collapsible groups
|
|
15
|
+
* that expand on tap. Not used standalone — driven by CobreHeader.
|
|
16
|
+
*/
|
|
12
17
|
interface Props {
|
|
13
18
|
menu: Menu[];
|
|
14
19
|
itemActive: string;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { MenuItem } from './interfaces/menu.interface';
|
|
2
|
+
/**
|
|
3
|
+
* CobreSideMenu — persistent vertical navigation rail for the Cobre platform.
|
|
4
|
+
* Renders top and bottom item groups, supports a collapsed (icon-only) state and
|
|
5
|
+
* expandable sub-pages. For the mobile/top application bar use CobreHeader instead.
|
|
6
|
+
* Provides `header` (top branding area), `start`, and `end` slots.
|
|
7
|
+
*/
|
|
2
8
|
interface Props {
|
|
3
9
|
itemsTop: MenuItem[];
|
|
4
10
|
itemActive: string;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { MenuItem } from '../interfaces/menu.interface';
|
|
2
|
+
/**
|
|
3
|
+
* SideMenuItem — renders one group of CobreSideMenu entries with their sub-items.
|
|
4
|
+
* Each entry shows an icon and label; entries with subItems expand on hover
|
|
5
|
+
* (inline when expanded, as a floating panel when collapsed). Driven by
|
|
6
|
+
* CobreSideMenu, not used standalone.
|
|
7
|
+
*/
|
|
2
8
|
interface Props {
|
|
3
9
|
items: MenuItem[] | undefined;
|
|
4
10
|
itemActive: string;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { Items } from '../interfaces/menu.interface';
|
|
2
|
+
/**
|
|
3
|
+
* SubItems — renders the nested sub-entries of a CobreSideMenu item as a list.
|
|
4
|
+
* Each sub-item is a selectable menu button; emits selectSubItem on click.
|
|
5
|
+
* Driven by SideMenuItem, not used standalone.
|
|
6
|
+
*/
|
|
2
7
|
interface Props {
|
|
3
8
|
subItems: Items[];
|
|
4
9
|
itemActive: string;
|
|
@@ -1,23 +1,38 @@
|
|
|
1
|
+
/** A nested sub-entry of a CobreSideMenu item, linking to a route. */
|
|
1
2
|
export interface Items {
|
|
2
3
|
id: string;
|
|
4
|
+
/** Display label of the sub-entry. */
|
|
3
5
|
text: string;
|
|
6
|
+
/** Route path the sub-entry navigates to. */
|
|
4
7
|
path: string;
|
|
8
|
+
/** Whether the sub-entry is shown in the menu. */
|
|
5
9
|
show: boolean;
|
|
6
10
|
icon?: string;
|
|
7
11
|
}
|
|
12
|
+
/** A top-level CobreSideMenu entry, optionally with sub-items or an expanded sub-page. */
|
|
8
13
|
export interface MenuItem {
|
|
9
14
|
id: string;
|
|
15
|
+
/** Display label of the menu entry. */
|
|
10
16
|
name: string;
|
|
17
|
+
/** Route path the entry navigates to. */
|
|
11
18
|
path?: string;
|
|
12
19
|
icon?: string;
|
|
20
|
+
/** Whether the entry is shown in the menu. */
|
|
13
21
|
show?: boolean;
|
|
22
|
+
/** Child entries rendered under this item. */
|
|
14
23
|
subItems?: Items[];
|
|
24
|
+
/** Whether this entry opens an expanded sub-page panel. */
|
|
15
25
|
inSubPage?: boolean;
|
|
26
|
+
/** Nested sub-page layout shown when the entry is expanded. */
|
|
16
27
|
subPage?: {
|
|
17
28
|
name: string;
|
|
29
|
+
/** Menu items shown in the top section of the sub-page. */
|
|
18
30
|
itemsTop: MenuItem[];
|
|
31
|
+
/** Menu items shown in the bottom section of the sub-page. */
|
|
19
32
|
itemsBottom?: MenuItem[];
|
|
33
|
+
/** Heading text for the top section. */
|
|
20
34
|
textTopItems?: string;
|
|
35
|
+
/** Heading text for the bottom section. */
|
|
21
36
|
textBottomItems?: string;
|
|
22
37
|
};
|
|
23
38
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CobreTimeline — a vertical, ordered list of events connected by a line.
|
|
3
|
+
* Use to show chronological steps or status history; each event renders an icon
|
|
4
|
+
* and title plus a scoped `item` slot (exposing `item`) for custom content.
|
|
5
|
+
*/
|
|
1
6
|
interface Item {
|
|
2
7
|
[key: string]: any;
|
|
3
8
|
iconClass?: string;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Visual style variants for CobreButton. Each value is applied as a
|
|
3
|
+
* `co-btn-v3--<variant>` CSS class. See CobreButton.vue for usage.
|
|
4
|
+
*/
|
|
1
5
|
export type ButtonThemes = 'primary' | 'secondary' | 'ghost' | 'ghost-small' | 'ghost-teal' | 'ghost-warning' | 'link' | 'single' | 'filter' | 'secondary-cloudy' | 'secondary-cloudy-warning' | 'icon' | 'icon-cloudy' | 'toolbar' | 'primary-warning' | 'chip';
|
|
6
|
+
/** Color emphasis applied on top of a CobreButton theme via `co-btn-v3--color-<color>`. */
|
|
2
7
|
export type ButtonColors = 'default' | 'light';
|
|
@@ -1,8 +1,22 @@
|
|
|
1
|
+
/** Map of bank identifier codes to human-readable bank names (re-exported from banksList). */
|
|
1
2
|
export { banks } from './banksList';
|
|
3
|
+
/** Base URL of the S3 bucket hosting Cobre portal static assets (images, icons, etc.). */
|
|
2
4
|
export declare const STATIC_ASSETS_BASE_URL = "https://cobre-portal-static-assets-prod.s3.us-east-1.amazonaws.com";
|
|
5
|
+
/**
|
|
6
|
+
* Parses the query-string parameters of a URL into a key/value object.
|
|
7
|
+
* @param url - The URL to parse; defaults to the current page (`window.location.href`).
|
|
8
|
+
* @returns An object mapping each query parameter name to its string value.
|
|
9
|
+
*/
|
|
3
10
|
export declare const getParams: (url?: string) => {
|
|
4
11
|
[x: string]: string;
|
|
5
12
|
};
|
|
13
|
+
/** Locks page scrolling by setting `document.body` overflow to `hidden` (e.g. when a modal opens). */
|
|
6
14
|
export declare const makeBodyNotScrollable: () => string;
|
|
15
|
+
/** Restores page scrolling by setting `document.body` overflow back to `auto`. */
|
|
7
16
|
export declare const makeBodyScrollable: () => string;
|
|
17
|
+
/**
|
|
18
|
+
* Masks a string for display, revealing only its last 4 characters in parentheses.
|
|
19
|
+
* @param data - The value to mask (e.g. an account number).
|
|
20
|
+
* @returns A string like `(···1234)`, or `'-'` when `data` is empty.
|
|
21
|
+
*/
|
|
8
22
|
export declare const maskString: (data: string) => string;
|