@devtron-labs/devtron-fe-common-lib 0.2.6-beta-1 → 0.2.6-patch-1
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/Pages/GlobalConfigurations/Authorization/index.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/Authorization/types.d.ts +0 -18
- package/dist/Pages/GlobalConfigurations/DeploymentCharts/basicViewSchema.json.d.ts +28 -225
- package/dist/Shared/Components/index.d.ts +0 -1
- package/dist/{cssMode-a92794b5.js → cssMode-a521822e.js} +1 -1
- package/dist/{freemarker2-e5ee51c9.js → freemarker2-d1630d73.js} +1 -1
- package/dist/{handlebars-9153151b.js → handlebars-be00e6fd.js} +1 -1
- package/dist/{html-011bc885.js → html-ba55d91c.js} +1 -1
- package/dist/{htmlMode-4885a742.js → htmlMode-2f0cd720.js} +1 -1
- package/dist/{index-a419ec38.js → index-2aade56e.js} +38112 -43283
- package/dist/index.js +367 -369
- package/dist/{javascript-9b5d9b49.js → javascript-59181612.js} +1 -1
- package/dist/{jsonMode-fa67bdba.js → jsonMode-ee504621.js} +1 -1
- package/dist/{liquid-a2b3aabb.js → liquid-8c7c2432.js} +1 -1
- package/dist/{mdx-96b66709.js → mdx-8f6f9100.js} +1 -1
- package/dist/{python-93cea446.js → python-23ec6612.js} +1 -1
- package/dist/{razor-a13e6ece.js → razor-59e0c039.js} +1 -1
- package/dist/{tsMode-fa82c200.js → tsMode-3dee8d82.js} +1 -1
- package/dist/{typescript-9835808a.js → typescript-f103ce1a.js} +1 -1
- package/dist/{xml-f03d7ed4.js → xml-12a700e7.js} +1 -1
- package/dist/{yaml-82f4884e.js → yaml-45f0016a.js} +1 -1
- package/package.json +5 -5
- package/dist/Pages/GlobalConfigurations/DeploymentCharts/fallbackJobsNCronJobGuiSchema.json.d.ts +0 -157
- package/dist/Shared/Components/SelectPickerCustom/FilterSelectPicker.d.ts +0 -4
- package/dist/Shared/Components/SelectPickerCustom/SelectPicker.component.d.ts +0 -139
- package/dist/Shared/Components/SelectPickerCustom/common.d.ts +0 -13
- package/dist/Shared/Components/SelectPickerCustom/index.d.ts +0 -3
- package/dist/Shared/Components/SelectPickerCustom/type.d.ts +0 -163
- package/dist/Shared/Components/SelectPickerCustom/utils.d.ts +0 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { conf as t, language as e } from "./typescript-
|
|
1
|
+
import { conf as t, language as e } from "./typescript-f103ce1a.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ge = Object.defineProperty;
|
|
2
2
|
var Qe = (e, n, i) => n in e ? Ge(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
|
|
3
3
|
var C = (e, n, i) => (Qe(e, typeof n != "symbol" ? n + "" : n, i), i);
|
|
4
|
-
import { m as Ze } from "./index-
|
|
4
|
+
import { m as Ze } from "./index-2aade56e.js";
|
|
5
5
|
/*!-----------------------------------------------------------------------------
|
|
6
6
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
7
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as d } from "./index-
|
|
1
|
+
import { m as d } from "./index-2aade56e.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as d } from "./index-
|
|
1
|
+
import { m as d } from "./index-2aade56e.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as a } from "./index-
|
|
1
|
+
import { m as a } from "./index-2aade56e.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as s } from "./index-
|
|
1
|
+
import { m as s } from "./index-2aade56e.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var M = Object.defineProperty;
|
|
2
2
|
var R = (e, t, r) => t in e ? M(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var _ = (e, t, r) => (R(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
-
import { t as K, m as E } from "./index-
|
|
4
|
+
import { t as K, m as E } from "./index-2aade56e.js";
|
|
5
5
|
/*!-----------------------------------------------------------------------------
|
|
6
6
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
7
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as a } from "./index-
|
|
1
|
+
import { m as a } from "./index-2aade56e.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m } from "./index-
|
|
1
|
+
import { m } from "./index-2aade56e.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as i } from "./index-
|
|
1
|
+
import { m as i } from "./index-2aade56e.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtron-labs/devtron-fe-common-lib",
|
|
3
|
-
"version": "0.2.6-
|
|
3
|
+
"version": "0.2.6-patch-1",
|
|
4
4
|
"description": "Supporting common component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
25
|
"prepare": "node -e \"try { require('husky').install() } catch (e) {}\"",
|
|
26
|
-
"lint": "tsc --noEmit && NODE_OPTIONS=--max_old_space_size=
|
|
26
|
+
"lint": "tsc --noEmit && NODE_OPTIONS=--max_old_space_size=8192 eslint 'src/**/*.{js,jsx,ts,tsx}' --max-warnings 0",
|
|
27
27
|
"lint-fix": "eslint 'src/**/*.{js,jsx,ts,tsx}' --fix",
|
|
28
28
|
"test": "exit 0",
|
|
29
|
-
"dev": "NODE_OPTIONS=--max_old_space_size=
|
|
30
|
-
"build": "NODE_OPTIONS=--max_old_space_size=
|
|
31
|
-
"build-watch": "NODE_OPTIONS=--max_old_space_size=
|
|
29
|
+
"dev": "NODE_OPTIONS=--max_old_space_size=8192 vite",
|
|
30
|
+
"build": "NODE_OPTIONS=--max_old_space_size=8192 vite build --sourcemap",
|
|
31
|
+
"build-watch": "NODE_OPTIONS=--max_old_space_size=8192 vite build --sourcemap --watch",
|
|
32
32
|
"build-lib": "vite build",
|
|
33
33
|
"preview": "vite preview",
|
|
34
34
|
"lint-staged": "lint-staged"
|
package/dist/Pages/GlobalConfigurations/DeploymentCharts/fallbackJobsNCronJobGuiSchema.json.d.ts
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
"type": "object",
|
|
3
|
-
"properties": {
|
|
4
|
-
"args": {
|
|
5
|
-
"type": "object",
|
|
6
|
-
"title": "Arguments",
|
|
7
|
-
"properties": {
|
|
8
|
-
"value": {
|
|
9
|
-
"type": "array",
|
|
10
|
-
"items": {
|
|
11
|
-
"type": "string"
|
|
12
|
-
},
|
|
13
|
-
"title": "Value",
|
|
14
|
-
"hidden": {
|
|
15
|
-
"condition": false,
|
|
16
|
-
"match": "enabled"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"enabled": {
|
|
20
|
-
"type": "boolean",
|
|
21
|
-
"title": "Enabled"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"command": {
|
|
26
|
-
"type": "object",
|
|
27
|
-
"title": "Command",
|
|
28
|
-
"properties": {
|
|
29
|
-
"value": {
|
|
30
|
-
"type": "array",
|
|
31
|
-
"items": {
|
|
32
|
-
"type": "string"
|
|
33
|
-
},
|
|
34
|
-
"title": "Value",
|
|
35
|
-
"hidden": {
|
|
36
|
-
"condition": false,
|
|
37
|
-
"match": "enabled"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"enabled": {
|
|
41
|
-
"type": "boolean",
|
|
42
|
-
"title": "Enabled"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"resources": {
|
|
47
|
-
"type": "object",
|
|
48
|
-
"title": "Resources (CPU & RAM)",
|
|
49
|
-
"properties": {
|
|
50
|
-
"limits": {
|
|
51
|
-
"type": "object",
|
|
52
|
-
"required": ["cpu", "memory"],
|
|
53
|
-
"properties": {
|
|
54
|
-
"cpu": {
|
|
55
|
-
"type": "string"
|
|
56
|
-
},
|
|
57
|
-
"memory": {
|
|
58
|
-
"type": "string"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"requests": {
|
|
63
|
-
"type": "object",
|
|
64
|
-
"properties": {
|
|
65
|
-
"cpu": {
|
|
66
|
-
"type": "string"
|
|
67
|
-
},
|
|
68
|
-
"memory": {
|
|
69
|
-
"type": "string"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"EnvVariables": {
|
|
76
|
-
"type": "array",
|
|
77
|
-
"items": {
|
|
78
|
-
"type": "object",
|
|
79
|
-
"properties": {
|
|
80
|
-
"key": {
|
|
81
|
-
"type": "string"
|
|
82
|
-
},
|
|
83
|
-
"value": {
|
|
84
|
-
"type": "string"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
"title": "Environment Variables"
|
|
89
|
-
},
|
|
90
|
-
"service": {
|
|
91
|
-
"type": "object",
|
|
92
|
-
"title": "Service",
|
|
93
|
-
"properties": {
|
|
94
|
-
"type": {
|
|
95
|
-
"type": "string",
|
|
96
|
-
"title": "Type"
|
|
97
|
-
},
|
|
98
|
-
"annotations": {
|
|
99
|
-
"type": "object",
|
|
100
|
-
"additionalProperties": {
|
|
101
|
-
"type": "string"
|
|
102
|
-
},
|
|
103
|
-
"title": "Annotations"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
"ReadinessProbe": {
|
|
108
|
-
"type": "object",
|
|
109
|
-
"title": "Readiness Probe",
|
|
110
|
-
"properties": {
|
|
111
|
-
"Path": {
|
|
112
|
-
"type": "string"
|
|
113
|
-
},
|
|
114
|
-
"port": {
|
|
115
|
-
"type": ["integer", "string"]
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
"LivenessProbe": {
|
|
120
|
-
"type": "object",
|
|
121
|
-
"title": "Liveness Probe",
|
|
122
|
-
"properties": {
|
|
123
|
-
"Path": {
|
|
124
|
-
"type": "string"
|
|
125
|
-
},
|
|
126
|
-
"port": {
|
|
127
|
-
"type": ["integer", "string"]
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
"tolerations": {
|
|
132
|
-
"type": "array",
|
|
133
|
-
"items": {
|
|
134
|
-
"type": "object",
|
|
135
|
-
"properties": {
|
|
136
|
-
"key": {
|
|
137
|
-
"type": "string"
|
|
138
|
-
},
|
|
139
|
-
"operator": {
|
|
140
|
-
"type": "string",
|
|
141
|
-
"pattern": "Equal|Exists"
|
|
142
|
-
},
|
|
143
|
-
"value": {
|
|
144
|
-
"type": "string"
|
|
145
|
-
},
|
|
146
|
-
"effect": {
|
|
147
|
-
"type": "string",
|
|
148
|
-
"pattern": "NoSchedule|PreferNoSchedule|NoExecute"
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
;
|
|
156
|
-
|
|
157
|
-
export default _default;
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { SelectPickerProps } from './type';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Generic component for select picker
|
|
5
|
-
*
|
|
6
|
-
* @example With icon in control
|
|
7
|
-
* ```tsx
|
|
8
|
-
* <SelectPicker ... icon={<CustomIcon />} />
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* @example Medium menu list width
|
|
12
|
-
* ```tsx
|
|
13
|
-
* <SelectPicker ... menuSize={ComponentSizeType.medium} />
|
|
14
|
-
* ```
|
|
15
|
-
*
|
|
16
|
-
* @example Large menu list width
|
|
17
|
-
* ```tsx
|
|
18
|
-
* <SelectPicker ... menuSize={ComponentSizeType.large} />
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @example Required label
|
|
22
|
-
* ```tsx
|
|
23
|
-
* <SelectPicker ... required label="Label" />
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* @example Custom label
|
|
27
|
-
* ```tsx
|
|
28
|
-
* <SelectPicker ... label={<div>Label</div>} />
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* @example Error state
|
|
32
|
-
* ```tsx
|
|
33
|
-
* <SelectPicker ... error="Something went wrong" />
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @example Helper text
|
|
37
|
-
* ```tsx
|
|
38
|
-
* <SelectPicker ... helperText="Help information" />
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* @example Menu list footer
|
|
42
|
-
* The footer is sticky by default
|
|
43
|
-
* ```tsx
|
|
44
|
-
* <SelectPicker
|
|
45
|
-
* ...
|
|
46
|
-
* renderMenuListFooter={() => (
|
|
47
|
-
* <div className="px-8 py-6 dc__border-top bcn-50 cn-6">
|
|
48
|
-
* <div>Foot note</div>
|
|
49
|
-
* </div>
|
|
50
|
-
* )}
|
|
51
|
-
* />
|
|
52
|
-
* ```
|
|
53
|
-
*
|
|
54
|
-
* @example Loading state
|
|
55
|
-
* ```tsx
|
|
56
|
-
* <SelectPicker ... isLoading />
|
|
57
|
-
* ```
|
|
58
|
-
*
|
|
59
|
-
* @example Disabled state
|
|
60
|
-
* ```tsx
|
|
61
|
-
* <SelectPicker ... isDisabled />
|
|
62
|
-
* ```
|
|
63
|
-
*
|
|
64
|
-
* @example Loading & disabled state
|
|
65
|
-
* ```tsx
|
|
66
|
-
* <SelectPicker ... isLoading isDisabled />
|
|
67
|
-
* ```
|
|
68
|
-
*
|
|
69
|
-
* @example Hide selected option icon in control
|
|
70
|
-
* ```tsx
|
|
71
|
-
* <SelectPicker ... showSelectedOptionIcon={false} />
|
|
72
|
-
* ```
|
|
73
|
-
*
|
|
74
|
-
* @example Selected option clearable
|
|
75
|
-
* ```tsx
|
|
76
|
-
* <SelectPicker ... isClearable />
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* @example Selected option clearable
|
|
80
|
-
* ```tsx
|
|
81
|
-
* <SelectPicker ... showSelectedOptionsCount />
|
|
82
|
-
* ```
|
|
83
|
-
* @example Multi Select
|
|
84
|
-
* ```tsx
|
|
85
|
-
* <SelectPicker ... isMulti />
|
|
86
|
-
* ```
|
|
87
|
-
*
|
|
88
|
-
* @example Creatable Multi Select
|
|
89
|
-
* ```tsx
|
|
90
|
-
* <SelectPicker
|
|
91
|
-
* ...
|
|
92
|
-
* isMulti
|
|
93
|
-
* multiSelectProps={{
|
|
94
|
-
* isCreatable: true
|
|
95
|
-
* }}
|
|
96
|
-
* />
|
|
97
|
-
* ```
|
|
98
|
-
*
|
|
99
|
-
* @example Multi Select with group heading selectable
|
|
100
|
-
* ```tsx
|
|
101
|
-
* <SelectPicker
|
|
102
|
-
* ...
|
|
103
|
-
* isMulti
|
|
104
|
-
* multiSelectProps={{
|
|
105
|
-
* isGroupHeadingSelectable: true
|
|
106
|
-
* }}
|
|
107
|
-
* />
|
|
108
|
-
* ```
|
|
109
|
-
*
|
|
110
|
-
* @example Multi Select with selected option validator
|
|
111
|
-
* ```tsx
|
|
112
|
-
* <SelectPicker
|
|
113
|
-
* ...
|
|
114
|
-
* isMulti
|
|
115
|
-
* multiSelectProps={{
|
|
116
|
-
* getIsOptionValid: (option) => boolean
|
|
117
|
-
* }}
|
|
118
|
-
* />
|
|
119
|
-
* ```
|
|
120
|
-
*
|
|
121
|
-
* @example Custom options rendering support (menuIsOpen needs to be handled by consumer)
|
|
122
|
-
* ```tsx
|
|
123
|
-
* <SelectPicker
|
|
124
|
-
* ...
|
|
125
|
-
* shouldRenderCustomOptions
|
|
126
|
-
* renderCustomOptions={() => <div />}
|
|
127
|
-
* />
|
|
128
|
-
* ```
|
|
129
|
-
*
|
|
130
|
-
* @example Align the menu at the right most end
|
|
131
|
-
* ```tsx
|
|
132
|
-
* <SelectPicker
|
|
133
|
-
* ...
|
|
134
|
-
* shouldMenuAlignRight
|
|
135
|
-
* />
|
|
136
|
-
* ```
|
|
137
|
-
*/
|
|
138
|
-
declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, renderMenuListFooter, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, renderCustomOptions, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
|
|
139
|
-
export default SelectPicker;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DropdownIndicatorProps, ControlProps, OptionProps, ClearIndicatorProps, ValueContainerProps, MenuListProps, MultiValueRemoveProps, MultiValueProps } from 'react-select';
|
|
2
|
-
import { SelectPickerGroupHeadingProps, SelectPickerOptionType, SelectPickerProps } from './type';
|
|
3
|
-
|
|
4
|
-
export declare const SelectPickerDropdownIndicator: <OptionValue>(props: DropdownIndicatorProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>>) => JSX.Element;
|
|
5
|
-
export declare const SelectPickerClearIndicator: <OptionValue>(props: ClearIndicatorProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>>) => JSX.Element;
|
|
6
|
-
export declare const SelectPickerControl: <OptionValue, IsMulti extends boolean>({ icon, showSelectedOptionIcon, ...props }: ControlProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "icon" | "showSelectedOptionIcon">) => JSX.Element;
|
|
7
|
-
export declare const SelectPickerValueContainer: <OptionValue, IsMulti extends boolean>({ showSelectedOptionsCount, customSelectedOptionsCount, ...props }: ValueContainerProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "showSelectedOptionsCount" | "customSelectedOptionsCount">) => JSX.Element;
|
|
8
|
-
export declare const SelectPickerLoadingIndicator: () => JSX.Element;
|
|
9
|
-
export declare const SelectPickerOption: <OptionValue, IsMulti extends boolean>({ disableDescriptionEllipsis, ...props }: OptionProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "disableDescriptionEllipsis">) => JSX.Element;
|
|
10
|
-
export declare const SelectPickerMenuList: <OptionValue, IsMulti extends boolean>({ renderMenuListFooter, shouldRenderCustomOptions, renderCustomOptions, ...props }: MenuListProps<SelectPickerOptionType<OptionValue>, boolean, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "renderMenuListFooter" | "shouldRenderCustomOptions" | "renderCustomOptions">) => JSX.Element;
|
|
11
|
-
export declare const SelectPickerMultiValueLabel: <OptionValue, IsMulti extends boolean>({ getIsOptionValid, ...props }: MultiValueProps<SelectPickerOptionType<OptionValue>, true, import('react-select').GroupBase<SelectPickerOptionType<OptionValue>>> & Pick<SelectPickerProps<OptionValue, IsMulti>["multiSelectProps"], "getIsOptionValid">) => JSX.Element;
|
|
12
|
-
export declare const SelectPickerMultiValueRemove: (props: MultiValueRemoveProps) => JSX.Element;
|
|
13
|
-
export declare const SelectPickerGroupHeading: <OptionValue>({ isGroupHeadingSelectable, ...props }: SelectPickerGroupHeadingProps<OptionValue>) => JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { default as SelectPickerCustom } from './SelectPicker.component';
|
|
2
|
-
export { default as FilterSelectPickerCustom } from './FilterSelectPicker';
|
|
3
|
-
export type { SelectPickerOptionType as SelectPickerCustomOptionType, SelectPickerVariantType as SelectPickerCustomVariantType, SelectPickerProps as SelectPickerCustomProps, FilterSelectPickerProps as FilterSelectPickerCustomProps, } from './type';
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { OptionType } from '../../../Common/Types';
|
|
2
|
-
import { ComponentSizeType } from '../../constants';
|
|
3
|
-
import { MutableRefObject, ReactElement, ReactNode } from 'react';
|
|
4
|
-
import { GroupBase, GroupHeadingProps, Props as ReactSelectProps, SelectInstance } from 'react-select';
|
|
5
|
-
import { CreatableProps } from 'react-select/creatable';
|
|
6
|
-
|
|
7
|
-
export interface SelectPickerOptionType<OptionValue = string | number> extends OptionType<OptionValue, ReactNode> {
|
|
8
|
-
/**
|
|
9
|
-
* Description to be displayed for the option
|
|
10
|
-
*/
|
|
11
|
-
description?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Icon at the start of the option
|
|
14
|
-
*/
|
|
15
|
-
startIcon?: ReactElement;
|
|
16
|
-
/**
|
|
17
|
-
* Icon at the end of the option
|
|
18
|
-
*/
|
|
19
|
-
endIcon?: ReactElement;
|
|
20
|
-
}
|
|
21
|
-
export declare enum SelectPickerVariantType {
|
|
22
|
-
DEFAULT = "default",
|
|
23
|
-
BORDER_LESS = "border-less"
|
|
24
|
-
}
|
|
25
|
-
type SelectProps<OptionValue, IsMulti extends boolean> = ReactSelectProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>;
|
|
26
|
-
export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'isLoading' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus'> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & {
|
|
27
|
-
/**
|
|
28
|
-
* Icon to be rendered in the control
|
|
29
|
-
*/
|
|
30
|
-
icon?: ReactElement;
|
|
31
|
-
/**
|
|
32
|
-
* Error message for the select
|
|
33
|
-
*/
|
|
34
|
-
error?: ReactNode;
|
|
35
|
-
/**
|
|
36
|
-
* Render function for the footer at the bottom of menu list. It is sticky by default
|
|
37
|
-
*/
|
|
38
|
-
renderMenuListFooter?: (selectedOptions: SelectProps<OptionValue, IsMulti>['value']) => ReactNode;
|
|
39
|
-
/**
|
|
40
|
-
* Info text for the select, if any
|
|
41
|
-
*/
|
|
42
|
-
helperText?: ReactNode;
|
|
43
|
-
/**
|
|
44
|
-
* Label for the select. if required is added, the corresponding * is also added
|
|
45
|
-
*/
|
|
46
|
-
label?: ReactNode;
|
|
47
|
-
/**
|
|
48
|
-
* If true, the selected option icon is shown in the container.
|
|
49
|
-
* startIcon has higher priority than endIcon.
|
|
50
|
-
*
|
|
51
|
-
* @default 'true'
|
|
52
|
-
*/
|
|
53
|
-
showSelectedOptionIcon?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Custom selected options count for use cases like filters
|
|
56
|
-
*/
|
|
57
|
-
customSelectedOptionsCount?: number;
|
|
58
|
-
/**
|
|
59
|
-
* Height of the dropdown
|
|
60
|
-
*
|
|
61
|
-
* @default 'ComponentSizeType.medium'
|
|
62
|
-
*/
|
|
63
|
-
size?: Extract<ComponentSizeType, ComponentSizeType.medium | ComponentSizeType.large>;
|
|
64
|
-
/**
|
|
65
|
-
* Content to be shown in a tippy when disabled
|
|
66
|
-
*/
|
|
67
|
-
disabledTippyContent?: ReactNode;
|
|
68
|
-
/**
|
|
69
|
-
* If true, the selected options count is shown in a chip inside ValueContainer
|
|
70
|
-
*
|
|
71
|
-
* @default 'false'
|
|
72
|
-
*/
|
|
73
|
-
showSelectedOptionsCount?: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Width of the menu list
|
|
76
|
-
*
|
|
77
|
-
* Note: the overflow needs to be handled explicitly for non-small variants
|
|
78
|
-
*
|
|
79
|
-
* @default 'ComponentSizeType.small'
|
|
80
|
-
*/
|
|
81
|
-
menuSize?: ComponentSizeType;
|
|
82
|
-
/**
|
|
83
|
-
* Variant of the select.
|
|
84
|
-
*
|
|
85
|
-
* @default SelectPickerVariantType.DEFAULT
|
|
86
|
-
*/
|
|
87
|
-
variant?: SelectPickerVariantType;
|
|
88
|
-
/**
|
|
89
|
-
* Disables the ellipsis on description, it will be shown in full width, wrapped if required.
|
|
90
|
-
*
|
|
91
|
-
* @default false
|
|
92
|
-
*/
|
|
93
|
-
disableDescriptionEllipsis?: boolean;
|
|
94
|
-
/**
|
|
95
|
-
* Ref for the select picker
|
|
96
|
-
*/
|
|
97
|
-
selectRef?: IsMulti extends true ? MutableRefObject<SelectInstance<SelectPickerOptionType<OptionValue>, true>> : MutableRefObject<SelectInstance<SelectPickerOptionType<OptionValue>>>;
|
|
98
|
-
/**
|
|
99
|
-
* If true, the menu is aligned at the right end to prevent going outside of viewport
|
|
100
|
-
* in case of menu being larger than the control
|
|
101
|
-
*
|
|
102
|
-
* @default false
|
|
103
|
-
*/
|
|
104
|
-
shouldMenuAlignRight?: boolean;
|
|
105
|
-
/**
|
|
106
|
-
* If true, the select spans to the max available width
|
|
107
|
-
*
|
|
108
|
-
* @default false
|
|
109
|
-
*/
|
|
110
|
-
fullWidth?: boolean;
|
|
111
|
-
} & (IsMulti extends true ? {
|
|
112
|
-
isMulti: IsMulti | boolean;
|
|
113
|
-
multiSelectProps?: Pick<CreatableProps<SelectPickerOptionType<OptionValue>, true, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'> & {
|
|
114
|
-
/**
|
|
115
|
-
* If true, the select picker creates the new option
|
|
116
|
-
* Only applicable for IsMulti: true
|
|
117
|
-
*
|
|
118
|
-
* @default false
|
|
119
|
-
*/
|
|
120
|
-
isCreatable?: boolean;
|
|
121
|
-
/**
|
|
122
|
-
* If true, the group heading can be selected
|
|
123
|
-
*
|
|
124
|
-
* Only applicable for IsMulti: true
|
|
125
|
-
*
|
|
126
|
-
* @default false
|
|
127
|
-
*/
|
|
128
|
-
isGroupHeadingSelectable?: boolean;
|
|
129
|
-
/**
|
|
130
|
-
* Callback handler to check if the given selection is valid or not
|
|
131
|
-
*/
|
|
132
|
-
getIsOptionValid?: (option: SelectPickerOptionType<OptionValue>) => boolean;
|
|
133
|
-
};
|
|
134
|
-
} : {
|
|
135
|
-
isMulti?: never;
|
|
136
|
-
multiSelectProps?: never;
|
|
137
|
-
}) & ({
|
|
138
|
-
/**
|
|
139
|
-
* If true, custom options are rendered in the menuList component of react select
|
|
140
|
-
*
|
|
141
|
-
* Note: renderCustomOptions is required to be passed; renderMenuListFooter is also not called
|
|
142
|
-
*
|
|
143
|
-
* @default false
|
|
144
|
-
*/
|
|
145
|
-
shouldRenderCustomOptions: boolean;
|
|
146
|
-
/**
|
|
147
|
-
* Callback handler for custom options
|
|
148
|
-
*
|
|
149
|
-
* Imp Note: The menu open/close needs to handled by the consumer in this case
|
|
150
|
-
*/
|
|
151
|
-
renderCustomOptions: () => ReactElement;
|
|
152
|
-
} | {
|
|
153
|
-
shouldRenderCustomOptions?: never;
|
|
154
|
-
renderCustomOptions?: never;
|
|
155
|
-
});
|
|
156
|
-
export type SelectPickerGroupHeadingProps<OptionValue> = GroupHeadingProps<SelectPickerOptionType<OptionValue>> & {
|
|
157
|
-
isGroupHeadingSelectable: boolean;
|
|
158
|
-
};
|
|
159
|
-
export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps<number | string, true>, 'options' | 'isDisabled' | 'placeholder' | 'isLoading'>>, Pick<SelectPickerProps<number | string, true>, 'selectRef' | 'inputId' | 'menuPosition' | 'autoFocus' | 'shouldMenuAlignRight'> {
|
|
160
|
-
appliedFilterOptions: SelectPickerOptionType[];
|
|
161
|
-
handleApplyFilter: (filtersToApply: SelectPickerOptionType<number | string>[]) => void;
|
|
162
|
-
}
|
|
163
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CHECKBOX_VALUE } from '../../../Common/Types';
|
|
2
|
-
import { GroupBase, MultiValue, OptionsOrGroups, StylesConfig } from 'react-select';
|
|
3
|
-
import { SelectPickerOptionType, SelectPickerProps } from './type';
|
|
4
|
-
|
|
5
|
-
export declare const getCommonSelectStyle: <OptionValue, IsMulti extends boolean>({ error, size, menuSize, variant, getIsOptionValid, isGroupHeadingSelectable, shouldMenuAlignRight, }: Pick<SelectPickerProps<OptionValue, IsMulti>, "error" | "size" | "menuSize" | "shouldMenuAlignRight" | "variant"> & Pick<SelectPickerProps<OptionValue, IsMulti>["multiSelectProps"], "getIsOptionValid" | "isGroupHeadingSelectable">) => StylesConfig<SelectPickerOptionType<OptionValue>, boolean, GroupBase<SelectPickerOptionType<OptionValue>>>;
|
|
6
|
-
export declare const getGroupCheckboxValue: <OptionValue>(groupHeadingOptions: readonly SelectPickerOptionType<OptionValue>[], selectedOptions: MultiValue<SelectPickerOptionType<OptionValue>>, getOptionValue: (option: SelectPickerOptionType<OptionValue>) => string) => CHECKBOX_VALUE.CHECKED | CHECKBOX_VALUE.INTERMEDIATE;
|
|
7
|
-
/**
|
|
8
|
-
* Retrieves an option from the options list based on the provided value.
|
|
9
|
-
*
|
|
10
|
-
* @param optionsList - The list of options or groups of options.
|
|
11
|
-
* @param value - The value to compare against the options' values.
|
|
12
|
-
* @param defaultOption - The default option to return if no match is found.
|
|
13
|
-
* @returns The matched option or the default option if no match is found.
|
|
14
|
-
*/
|
|
15
|
-
export declare const getSelectPickerOptionByValue: <OptionValue>(optionsList: OptionsOrGroups<SelectPickerOptionType<OptionValue>, GroupBase<SelectPickerOptionType<OptionValue>>>, value: string | number, defaultOption?: SelectPickerOptionType<OptionValue>) => SelectPickerOptionType<OptionValue>;
|