@signalplus/params-about 0.1.0 → 0.1.3
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/README-CN.md +19 -14
- package/README.md +19 -14
- package/index.d.ts +172 -96
- package/lib/css/Bool.scss +19 -0
- package/lib/css/Expiries.scss +110 -0
- package/lib/css/ExpiriesLimit.scss +80 -0
- package/lib/css/Num.scss +42 -0
- package/lib/css/NumRange.scss +38 -0
- package/lib/css/ParamForm/ParentSelector.scss +20 -0
- package/lib/css/ParamForm/index.scss +56 -0
- package/lib/css/TextArray.scss +52 -0
- package/lib/css/index.css +1 -1
- package/lib/css/index.scss +11 -277
- package/lib/css/var.scss +8 -0
- package/lib/es/index.js +704 -94
- package/lib/umd/index.js +4861 -0
- package/package.json +7 -43
- package/pnpm-lock.yaml +0 -11087
package/README-CN.md
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# @signalplus/params-about
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/@signalplus/params-about)
|
|
4
|
-

|
|
5
|
-

|
|
6
|
-

|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@signalplus/params-about) [](https://www.npmjs.com/package/@signalplus/params-about)   
|
|
7
4
|
|
|
8
5
|
> `pkg.module supported`, 天然支持 tree-shaking, 使用 es module 引用即可
|
|
9
6
|
|
|
@@ -13,11 +10,10 @@ A description for the module
|
|
|
13
10
|
|
|
14
11
|
## repository
|
|
15
12
|
|
|
16
|
-
|
|
17
13
|
## Demo
|
|
18
14
|
|
|
19
|
-
|
|
20
15
|
## Run Example
|
|
16
|
+
|
|
21
17
|
你可以通过运行项目的 example 来了解这个组件的使用,以下是启动步骤:
|
|
22
18
|
|
|
23
19
|
1. 克隆项目到本地 `git clone `
|
|
@@ -27,49 +23,58 @@ A description for the module
|
|
|
27
23
|
5. 在你的浏览器看 example (地址通常是 `http://127.0.0.1:3000/examples/test.html`)
|
|
28
24
|
|
|
29
25
|
## Installation
|
|
26
|
+
|
|
30
27
|
```bash
|
|
31
28
|
npm i -S @signalplus/params-about
|
|
32
29
|
```
|
|
33
30
|
|
|
34
31
|
## Global name - The variable the module exported in `umd` bundle
|
|
32
|
+
|
|
35
33
|
`ParamsAbout`
|
|
36
34
|
|
|
37
35
|
## Interface
|
|
36
|
+
|
|
38
37
|
去 [index.d.ts](./index.d.ts) 查看可用方法和参数
|
|
39
38
|
|
|
40
39
|
## Usage
|
|
40
|
+
|
|
41
41
|
```js
|
|
42
|
-
import * as ParamsAbout from '@signalplus/params-about'
|
|
42
|
+
import * as ParamsAbout from '@signalplus/params-about';
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
## CDN
|
|
46
|
+
|
|
46
47
|
在 HTML 文件中直接引用,你可以在 [CDN: unpkg](https://unpkg.com/@signalplus/params-about/lib/umd/) 看到你能用到的所有 js 脚本
|
|
48
|
+
|
|
47
49
|
```html
|
|
48
50
|
<-- 然后使用你需要的 -->
|
|
49
51
|
<script src="https://unpkg.com/@signalplus/params-about/lib/umd/<--module-->.js"></script>
|
|
50
52
|
```
|
|
51
53
|
|
|
52
54
|
或者,你也可以使用 [CDN: jsdelivr](https://cdn.jsdelivr.net/npm/@signalplus/params-about/lib/umd/) 看到你能用到的所有 js 脚本
|
|
55
|
+
|
|
53
56
|
```html
|
|
54
57
|
<script src="https://cdn.jsdelivr.net/npm/@signalplus/params-about/lib/umd/<--module-->.js"></script>
|
|
55
58
|
```
|
|
56
59
|
|
|
57
60
|
## style
|
|
61
|
+
|
|
58
62
|
你可能需要主动引入样式文件来应用组件的样式:
|
|
63
|
+
|
|
59
64
|
```js
|
|
60
65
|
// scss
|
|
61
|
-
import '@signalplus/params-about/lib/css/index.scss'
|
|
66
|
+
import '@signalplus/params-about/lib/css/index.scss';
|
|
62
67
|
|
|
63
68
|
// css
|
|
64
|
-
import '@signalplus/params-about/lib/css/index.css'
|
|
69
|
+
import '@signalplus/params-about/lib/css/index.css';
|
|
65
70
|
```
|
|
71
|
+
|
|
66
72
|
Or
|
|
73
|
+
|
|
67
74
|
```scss
|
|
68
75
|
// scss
|
|
69
|
-
@import '~@signalplus/params-about/lib/css/index.scss'
|
|
70
|
-
|
|
71
|
-
// css
|
|
72
|
-
@import '~@signalplus/params-about/lib/css/index.css'
|
|
76
|
+
@import '~@signalplus/params-about/lib/css/index.scss' // css
|
|
77
|
+
@import '~@signalplus/params-about/lib/css/index.css';
|
|
73
78
|
```
|
|
74
79
|
|
|
75
80
|
你也可以通过引入自定义的组件样式文件来自定义样式,文件可以通过复制并修改 `node_modules/@signalplus/params-about/lib/css/index.scss` 得到
|
package/README.md
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# @signalplus/params-about
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/@signalplus/params-about)
|
|
4
|
-

|
|
5
|
-

|
|
6
|
-

|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@signalplus/params-about) [](https://www.npmjs.com/package/@signalplus/params-about)   
|
|
7
4
|
|
|
8
5
|
> `pkg.module supported`, which means that you can apply tree-shaking in you project
|
|
9
6
|
|
|
@@ -13,11 +10,10 @@ A description for the module
|
|
|
13
10
|
|
|
14
11
|
## repository
|
|
15
12
|
|
|
16
|
-
|
|
17
13
|
## Demo
|
|
18
14
|
|
|
19
|
-
|
|
20
15
|
## Run Example
|
|
16
|
+
|
|
21
17
|
you can see the usage by run the example of the module, here is the step:
|
|
22
18
|
|
|
23
19
|
1. Clone the library `git clone `
|
|
@@ -27,49 +23,58 @@ you can see the usage by run the example of the module, here is the step:
|
|
|
27
23
|
5. See the example(usually is `http://127.0.0.1:3000/examples/test.html`) in your browser
|
|
28
24
|
|
|
29
25
|
## Installation
|
|
26
|
+
|
|
30
27
|
```bash
|
|
31
28
|
npm i -S @signalplus/params-about
|
|
32
29
|
```
|
|
33
30
|
|
|
34
31
|
## Global name - The variable the module exported in `umd` bundle
|
|
32
|
+
|
|
35
33
|
`ParamsAbout`
|
|
36
34
|
|
|
37
35
|
## Interface
|
|
36
|
+
|
|
38
37
|
See what method or params you can use in [index.d.ts](./index.d.ts)
|
|
39
38
|
|
|
40
39
|
## Usage
|
|
40
|
+
|
|
41
41
|
```js
|
|
42
|
-
import * as ParamsAbout from '@signalplus/params-about'
|
|
42
|
+
import * as ParamsAbout from '@signalplus/params-about';
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
## CDN
|
|
46
|
+
|
|
46
47
|
Use in html, see what you can use in [CDN: unpkg](https://unpkg.com/@signalplus/params-about/lib/umd/)
|
|
48
|
+
|
|
47
49
|
```html
|
|
48
50
|
<-- use what you want -->
|
|
49
51
|
<script src="https://unpkg.com/@signalplus/params-about/lib/umd/<--module-->.js"></script>
|
|
50
52
|
```
|
|
51
53
|
|
|
52
54
|
Or,see what you can use in [CDN: jsdelivr](https://cdn.jsdelivr.net/npm/@signalplus/params-about/lib/umd/)
|
|
55
|
+
|
|
53
56
|
```html
|
|
54
57
|
<script src="https://cdn.jsdelivr.net/npm/@signalplus/params-about/lib/umd/<--module-->.js"></script>
|
|
55
58
|
```
|
|
56
59
|
|
|
57
60
|
## style
|
|
61
|
+
|
|
58
62
|
For building style, you may need to import the css or scss file:
|
|
63
|
+
|
|
59
64
|
```js
|
|
60
65
|
// scss
|
|
61
|
-
import '@signalplus/params-about/lib/css/index.scss'
|
|
66
|
+
import '@signalplus/params-about/lib/css/index.scss';
|
|
62
67
|
|
|
63
68
|
// css
|
|
64
|
-
import '@signalplus/params-about/lib/css/index.css'
|
|
69
|
+
import '@signalplus/params-about/lib/css/index.css';
|
|
65
70
|
```
|
|
71
|
+
|
|
66
72
|
Or
|
|
73
|
+
|
|
67
74
|
```scss
|
|
68
75
|
// scss
|
|
69
|
-
@import '~@signalplus/params-about/lib/css/index.scss'
|
|
70
|
-
|
|
71
|
-
// css
|
|
72
|
-
@import '~@signalplus/params-about/lib/css/index.css'
|
|
76
|
+
@import '~@signalplus/params-about/lib/css/index.scss' // css
|
|
77
|
+
@import '~@signalplus/params-about/lib/css/index.css';
|
|
73
78
|
```
|
|
74
79
|
|
|
75
80
|
Or, you can build your custom style by copying, editing and importing `node_modules/@signalplus/params-about/lib/css/index.scss`
|
package/index.d.ts
CHANGED
|
@@ -1,114 +1,190 @@
|
|
|
1
|
-
import React, { PureComponent } from 'react'
|
|
1
|
+
import React, { PureComponent, ComponentProps } from 'react';
|
|
2
|
+
import ReactGlobalComp from 'react-global-comp';
|
|
2
3
|
|
|
3
4
|
declare enum ParamType {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
ParamGroup = -1,
|
|
6
|
+
Number = 1,
|
|
7
|
+
Percentage = 2,
|
|
8
|
+
Bool = 3,
|
|
9
|
+
NumberRange = 4,
|
|
10
|
+
PercentageRange = 5,
|
|
11
|
+
ExpiryLimit = 6,
|
|
12
|
+
Expiry = 7,
|
|
13
|
+
Phone = 8
|
|
13
14
|
}
|
|
14
15
|
interface BaseInputProps {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
value?: any;
|
|
17
|
+
onChange?(val: any): void;
|
|
18
|
+
onBlur?(): void;
|
|
19
|
+
readonly?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
style?: any;
|
|
22
|
+
[key: string]: any | undefined | null;
|
|
21
23
|
}
|
|
22
24
|
interface ValidateInfo {
|
|
23
|
-
|
|
25
|
+
[key: string]: undefined | string | ValidateInfo;
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
interface ParamValueStruct {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
valueId?: string;
|
|
30
|
+
[key: string]: any;
|
|
29
31
|
}
|
|
30
32
|
interface ParamRendererProps extends BaseInputProps {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
valueType?: ParamType;
|
|
34
|
+
value?: ParamValueStruct;
|
|
35
|
+
onChange?(val: ParamValueStruct): void;
|
|
34
36
|
}
|
|
35
37
|
declare class ParamRenderer extends PureComponent<ParamRendererProps> {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
get value(): any
|
|
47
|
-
onChange: (val: any) => void
|
|
48
|
-
render(): JSX.Element
|
|
38
|
+
get typeConfig(): {
|
|
39
|
+
name: string;
|
|
40
|
+
key?: string | undefined;
|
|
41
|
+
defaultValue?: any;
|
|
42
|
+
Comp: React.ComponentType<BaseInputProps>;
|
|
43
|
+
validator?(value: any): string;
|
|
44
|
+
};
|
|
45
|
+
get value(): any;
|
|
46
|
+
onChange: (val: any) => void;
|
|
47
|
+
render(): JSX.Element;
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
interface ParentSelectorOption {
|
|
51
|
+
label: string;
|
|
52
|
+
value: string;
|
|
53
|
+
children?: ParentSelectorOption[];
|
|
54
|
+
}
|
|
55
|
+
interface ParentSelectorProps extends BaseInputProps {
|
|
56
|
+
parentOptions?: ParentSelectorOption[];
|
|
57
|
+
value?: string;
|
|
58
|
+
onChange?(val: string): void;
|
|
59
|
+
}
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
61
|
+
interface ParamFormData {
|
|
62
|
+
parentId?: string;
|
|
63
|
+
paramId?: string;
|
|
64
|
+
key: string;
|
|
65
|
+
name?: string;
|
|
66
|
+
valueType: ParamType;
|
|
67
|
+
defaultValue?: {
|
|
68
|
+
valueId?: string;
|
|
69
|
+
[key: string]: any;
|
|
70
|
+
};
|
|
71
|
+
description?: string;
|
|
72
|
+
}
|
|
73
|
+
interface ParamFormProps {
|
|
74
|
+
parentOptions: ParentSelectorProps['parentOptions'];
|
|
75
|
+
expiriesOptions: string[];
|
|
76
|
+
initialValues?: ParamFormData;
|
|
77
|
+
onChange?(data: ParamFormData): void;
|
|
78
|
+
onSubmit?(data: ParamFormData): Promise<any>;
|
|
79
|
+
}
|
|
80
|
+
declare class ParamForm extends PureComponent<ParamFormProps> {
|
|
81
|
+
ref: React.RefObject<any>;
|
|
82
|
+
formItems: {
|
|
83
|
+
label: string;
|
|
84
|
+
name: string;
|
|
85
|
+
Comp: React.ComponentType<BaseInputProps>;
|
|
86
|
+
required?: boolean;
|
|
87
|
+
validator?(_: any, val: any): Promise<any>;
|
|
88
|
+
}[];
|
|
89
|
+
onChange: (changed: any, data: any) => void;
|
|
90
|
+
render(): JSX.Element;
|
|
91
|
+
}
|
|
92
|
+
declare class ParamFormModalEl extends PureComponent<ParamFormProps & Required<Pick<ParamFormProps, 'onSubmit'>>> {
|
|
93
|
+
ref: React.RefObject<ParamForm>;
|
|
94
|
+
state: {
|
|
95
|
+
visible: boolean;
|
|
96
|
+
};
|
|
97
|
+
onShow: () => void;
|
|
98
|
+
onHide: () => void;
|
|
99
|
+
onSubmit: () => any;
|
|
100
|
+
render(): JSX.Element;
|
|
101
|
+
}
|
|
102
|
+
declare class ParamFormModal {
|
|
103
|
+
static el: ReactGlobalComp<ParamFormProps & Required<Pick<ParamFormProps, "onSubmit">>>;
|
|
104
|
+
static show(props: Omit<ComponentProps<typeof ParamFormModalEl>, 'visible'>): Promise<void>;
|
|
105
|
+
static hide(): Promise<void>;
|
|
106
|
+
}
|
|
98
107
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
formatNum,
|
|
111
|
-
isExpired,
|
|
112
|
-
isNullLike,
|
|
113
|
-
numRangeValidator,
|
|
108
|
+
interface ParamValueEditorData {
|
|
109
|
+
paramId: string;
|
|
110
|
+
description?: string;
|
|
111
|
+
valueBefore: {
|
|
112
|
+
valueId?: string;
|
|
113
|
+
[key: string]: any;
|
|
114
|
+
};
|
|
115
|
+
value?: {
|
|
116
|
+
valueId?: string;
|
|
117
|
+
[key: string]: any;
|
|
118
|
+
};
|
|
114
119
|
}
|
|
120
|
+
interface ParamValueEditorProps {
|
|
121
|
+
allParams: ParentSelectorProps['parentOptions'];
|
|
122
|
+
expiriesOptions: string[];
|
|
123
|
+
valueType: ParamType;
|
|
124
|
+
initialValues: ParamValueEditorData;
|
|
125
|
+
onChange?(data: ParamValueEditorData): void;
|
|
126
|
+
onSubmit?(data: ParamValueEditorData): Promise<any>;
|
|
127
|
+
}
|
|
128
|
+
declare class ParamValueEditor extends PureComponent<ParamValueEditorProps> {
|
|
129
|
+
componentDidMount(): void;
|
|
130
|
+
ref: React.RefObject<any>;
|
|
131
|
+
formItems: {
|
|
132
|
+
label: string;
|
|
133
|
+
name: string;
|
|
134
|
+
Comp: React.ComponentType<BaseInputProps>;
|
|
135
|
+
required?: boolean;
|
|
136
|
+
validator?(_: any, val: any): Promise<any>;
|
|
137
|
+
}[];
|
|
138
|
+
onChange: (changed: any, data: any) => void;
|
|
139
|
+
render(): JSX.Element;
|
|
140
|
+
}
|
|
141
|
+
declare class ParamValueEditorModalEl extends PureComponent<ParamValueEditorProps & Required<Pick<ParamValueEditorProps, 'onSubmit'>>> {
|
|
142
|
+
ref: React.RefObject<ParamValueEditor>;
|
|
143
|
+
state: {
|
|
144
|
+
visible: boolean;
|
|
145
|
+
};
|
|
146
|
+
onShow: () => void;
|
|
147
|
+
onHide: () => void;
|
|
148
|
+
onSubmit: () => any;
|
|
149
|
+
render(): JSX.Element;
|
|
150
|
+
}
|
|
151
|
+
declare class ParamValueEditorModal {
|
|
152
|
+
static el: ReactGlobalComp<ParamValueEditorProps & Required<Pick<ParamValueEditorProps, "onSubmit">>>;
|
|
153
|
+
static show(props: Omit<ComponentProps<typeof ParamValueEditorModalEl>, 'visible'>): Promise<void>;
|
|
154
|
+
static hide(): Promise<void>;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
declare const ParamTypeConfig: Record<ParamType, {
|
|
158
|
+
name: string;
|
|
159
|
+
key?: string;
|
|
160
|
+
defaultValue?: any;
|
|
161
|
+
Comp: React.ComponentType<BaseInputProps>;
|
|
162
|
+
validator?(value: any): string;
|
|
163
|
+
}>;
|
|
164
|
+
declare function paramValidator(val: any, values: {
|
|
165
|
+
valueType: ParamType;
|
|
166
|
+
}): string;
|
|
167
|
+
declare const ParamTypeOptions: {
|
|
168
|
+
value: string;
|
|
169
|
+
label: string;
|
|
170
|
+
name: string;
|
|
171
|
+
key?: string | undefined;
|
|
172
|
+
defaultValue?: any;
|
|
173
|
+
Comp: React.ComponentType<BaseInputProps>;
|
|
174
|
+
validator?(value: any): string;
|
|
175
|
+
}[];
|
|
176
|
+
|
|
177
|
+
declare function formatNum(val: string): number | undefined;
|
|
178
|
+
declare function isNullLike(val: any): val is undefined | null;
|
|
179
|
+
declare function emptyValidator(val: any, enableEmpty?: boolean): "Should not be empty" | "";
|
|
180
|
+
declare function numRangeValidator(val: {
|
|
181
|
+
min?: string;
|
|
182
|
+
max?: string;
|
|
183
|
+
}, enableEmpty?: boolean): string;
|
|
184
|
+
declare function expiryValidator(val: string, enableEmpty?: boolean): "Should not be empty" | "" | "Out of format";
|
|
185
|
+
declare function expiriesValidator(val: string[]): string;
|
|
186
|
+
declare function keyValidator(val: string): string;
|
|
187
|
+
declare function isExpired(val?: string): boolean;
|
|
188
|
+
declare function validatorCvt(validator: (val: any, values: any) => ValidateInfo['string'], form?: () => any): (_: any, val: any) => Promise<any>;
|
|
189
|
+
|
|
190
|
+
export { BaseInputProps, ParamForm, ParamFormData, ParamFormModal, ParamFormProps, ParamRenderer, ParamRendererProps, ParamType, ParamTypeConfig, ParamTypeOptions, ParamValueEditor, ParamValueEditorData, ParamValueEditorModal, ParamValueEditorModalEl, ParamValueEditorProps, ParamValueStruct, ValidateInfo, emptyValidator, expiriesValidator, expiryValidator, formatNum, isExpired, isNullLike, keyValidator, numRangeValidator, paramValidator, validatorCvt };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@import "./var";
|
|
2
|
+
|
|
3
|
+
.param-bool {
|
|
4
|
+
flex: 1;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
height: $input-height;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.param-bool-option {
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
margin: 0 16px 0 0;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
|
|
16
|
+
> svg {
|
|
17
|
+
margin: 0 5px 0 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
@import "./var";
|
|
2
|
+
|
|
3
|
+
.param-expiries {
|
|
4
|
+
position: relative;
|
|
5
|
+
flex: 1;
|
|
6
|
+
max-width: 100%;
|
|
7
|
+
min-width: calc(7em + 24px + 2px);
|
|
8
|
+
height: $input-height;
|
|
9
|
+
padding: 0 calc(1em + 14px) 0 10px;
|
|
10
|
+
line-height: 0;
|
|
11
|
+
border: 1px solid $border-color;
|
|
12
|
+
border-radius: 2px;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
background: $bg;
|
|
15
|
+
|
|
16
|
+
&.readonly {
|
|
17
|
+
padding: 0;
|
|
18
|
+
border-color: transparent;
|
|
19
|
+
overflow: initial;
|
|
20
|
+
white-space: initial;
|
|
21
|
+
cursor: default;
|
|
22
|
+
background: transparent;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.multiple {
|
|
26
|
+
text-overflow: ellipsis;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.param-expiries-arrow {
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: 50%;
|
|
35
|
+
right: 7px;
|
|
36
|
+
margin: -0.5em 0 0;
|
|
37
|
+
color: $border-color !important;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.param-expiries-val {
|
|
41
|
+
display: inline-block;
|
|
42
|
+
margin: calc((#{$input-height} - 20px - 2px) / 2) 6px 0 0;
|
|
43
|
+
line-height: 20px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.param-expiries-placeholder {
|
|
47
|
+
display: inline-block;
|
|
48
|
+
margin: calc((#{$input-height} - 20px - 2px) / 2) 6px 0 0;
|
|
49
|
+
line-height: 20px;
|
|
50
|
+
color: $placeholder-color;
|
|
51
|
+
max-width: 100%;
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
text-overflow: ellipsis;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.param-expiries-multi-val {
|
|
58
|
+
display: inline-block;
|
|
59
|
+
margin: calc((#{$input-height} - 20px - 2px) / 2) 6px 0 0;
|
|
60
|
+
padding: 0 3px 0 8px;
|
|
61
|
+
line-height: 20px;
|
|
62
|
+
border-radius: 2px;
|
|
63
|
+
background: rgba(0, 0, 0, 0.1);
|
|
64
|
+
|
|
65
|
+
svg {
|
|
66
|
+
display: inline-block;
|
|
67
|
+
margin: 0 0 0 4px;
|
|
68
|
+
color: #999;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.param-expiries-popover {
|
|
74
|
+
|
|
75
|
+
.ant-popover-inner-content {
|
|
76
|
+
max-height: 50vh;
|
|
77
|
+
overflow-y: auto;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.param-expiries-option {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
justify-content: space-between;
|
|
85
|
+
width: 240px;
|
|
86
|
+
margin: 0 -16px;
|
|
87
|
+
padding: 0 16px;
|
|
88
|
+
line-height: 30px;
|
|
89
|
+
color: rgba($text-color, 0.6);
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
|
|
92
|
+
&.param-expiries-option-checked {
|
|
93
|
+
font-weight: bold;
|
|
94
|
+
color: $text-color;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&.param-expiries-option-disabled {
|
|
98
|
+
cursor: not-allowed;
|
|
99
|
+
opacity: 0.5;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&:hover {
|
|
103
|
+
color: $text-color;
|
|
104
|
+
background: rgba(0, 0, 0, 0.1);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
svg {
|
|
108
|
+
color: #57be6a;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
@import "./var";
|
|
2
|
+
|
|
3
|
+
.param-expiries-limit {
|
|
4
|
+
padding: calc((#{$input-height} - 20px) / 2) 0;
|
|
5
|
+
|
|
6
|
+
.param-number-range {
|
|
7
|
+
margin: 0 0 0 10px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.param-number-range-prefix {
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.param-number-suffix {
|
|
15
|
+
padding: 0 7px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.param-expiries-limit-val {
|
|
20
|
+
display: block;
|
|
21
|
+
|
|
22
|
+
&:after {
|
|
23
|
+
content: ';'
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.param-expiries-limit-val-sep {
|
|
28
|
+
padding: 0 4px;
|
|
29
|
+
color: #999;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.param-expiries-limit-inputs {
|
|
33
|
+
display: grid;
|
|
34
|
+
grid-row-gap: 10px;
|
|
35
|
+
grid-column-gap: 10px;
|
|
36
|
+
grid-template-rows: auto;
|
|
37
|
+
grid-template-columns: auto auto auto auto;
|
|
38
|
+
|
|
39
|
+
.param-expiries, .param-number-range, .param-arr-ops {
|
|
40
|
+
height: 30px;
|
|
41
|
+
margin: 0;
|
|
42
|
+
|
|
43
|
+
&.readonly {
|
|
44
|
+
height: 20px;
|
|
45
|
+
line-height: 18px;
|
|
46
|
+
|
|
47
|
+
.param-expiries-val {
|
|
48
|
+
margin-top: 0;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.param-expiries-placeholder, .param-expiries-val {
|
|
53
|
+
margin-top: 4px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.param-number-range-sep {
|
|
57
|
+
margin: 0 6px;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.param-arr-ops {
|
|
62
|
+
padding: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
//.param-arr-ops:nth-child(8):last-child {
|
|
66
|
+
//
|
|
67
|
+
// .param-arr-ops-del {
|
|
68
|
+
// visibility: hidden;
|
|
69
|
+
// pointer-events: none;
|
|
70
|
+
// }
|
|
71
|
+
//}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.param-expiries-popover {
|
|
75
|
+
padding: 0 !important;
|
|
76
|
+
|
|
77
|
+
.ant-popover-arrow {
|
|
78
|
+
display: none;
|
|
79
|
+
}
|
|
80
|
+
}
|