gm-printer 10.28.4-beta.4 → 10.28.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/.github/workflows/release.yml +4 -5
- package/package.json +1 -1
- package/src/common/editor_customize_config.js +2 -47
- package/src/common/editor_select.js +2 -1
- package/src/common/editor_store.js +5 -63
- package/src/components/index.js +0 -3
- package/src/editor/context_menu.js +0 -2
- package/src/printer/printer.js +15 -47
- package/src/printer/store.js +19 -63
- package/src/printer/table.js +6 -8
- package/build/demo.js +0 -54
- package/build/index.html +0 -1
- package/src/components/radio/Radio.js +0 -76
- package/src/components/radio/RadioGroup.js +0 -52
- package/src/components/radio/index.js +0 -4
- package/src/components/radio/style.less +0 -63
package/build/index.html
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!doctype html><html><head></head><body><div id="appContainer"></div><script src="/demo.js"></script><script src="/demo.js"></script></body></html>
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import _ from 'lodash'
|
|
4
|
-
import classNames from 'classnames'
|
|
5
|
-
import './style.less'
|
|
6
|
-
class Radio extends React.Component {
|
|
7
|
-
render() {
|
|
8
|
-
const {
|
|
9
|
-
value,
|
|
10
|
-
checked,
|
|
11
|
-
onChange,
|
|
12
|
-
onClick,
|
|
13
|
-
children,
|
|
14
|
-
inline,
|
|
15
|
-
block,
|
|
16
|
-
name,
|
|
17
|
-
disabled,
|
|
18
|
-
className,
|
|
19
|
-
...rest
|
|
20
|
-
} = this.props
|
|
21
|
-
|
|
22
|
-
const inner = (
|
|
23
|
-
<label
|
|
24
|
-
{...rest}
|
|
25
|
-
className={classNames(
|
|
26
|
-
'gm-radio',
|
|
27
|
-
{
|
|
28
|
-
'gm-radio-inline': inline,
|
|
29
|
-
'gm-radio-block': block,
|
|
30
|
-
disabled
|
|
31
|
-
},
|
|
32
|
-
className
|
|
33
|
-
)}
|
|
34
|
-
>
|
|
35
|
-
<input
|
|
36
|
-
type='radio'
|
|
37
|
-
className='gm-radio-input'
|
|
38
|
-
name={name}
|
|
39
|
-
value={value}
|
|
40
|
-
checked={checked || false}
|
|
41
|
-
onChange={onChange}
|
|
42
|
-
onClick={onClick}
|
|
43
|
-
disabled={disabled}
|
|
44
|
-
/>
|
|
45
|
-
<span className='gm-radio-span' />
|
|
46
|
-
{children}
|
|
47
|
-
</label>
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
if (!inline) {
|
|
51
|
-
return <div>{inner}</div>
|
|
52
|
-
}
|
|
53
|
-
return inner
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
Radio.propTypes = {
|
|
58
|
-
checked: PropTypes.bool,
|
|
59
|
-
onChange: PropTypes.func,
|
|
60
|
-
value: PropTypes.any,
|
|
61
|
-
children: PropTypes.any,
|
|
62
|
-
disabled: PropTypes.bool,
|
|
63
|
-
inline: PropTypes.bool,
|
|
64
|
-
block: PropTypes.bool,
|
|
65
|
-
name: PropTypes.string,
|
|
66
|
-
onClick: PropTypes.func,
|
|
67
|
-
className: PropTypes.string,
|
|
68
|
-
style: PropTypes.object
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
Radio.defaultProps = {
|
|
72
|
-
onChange: _.noop,
|
|
73
|
-
onClick: _.noop
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export default Radio
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import classNames from 'classnames'
|
|
4
|
-
import _ from 'lodash'
|
|
5
|
-
import './style.less'
|
|
6
|
-
|
|
7
|
-
class RadioGroup extends React.Component {
|
|
8
|
-
render() {
|
|
9
|
-
const {
|
|
10
|
-
onChange,
|
|
11
|
-
value,
|
|
12
|
-
inline,
|
|
13
|
-
className,
|
|
14
|
-
children,
|
|
15
|
-
name,
|
|
16
|
-
...rest
|
|
17
|
-
} = this.props
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<div {...rest} className={classNames('gm-radio-group', className)}>
|
|
21
|
-
{_.map(React.Children.toArray(children), (child, i) => {
|
|
22
|
-
return React.cloneElement(child, {
|
|
23
|
-
key: i,
|
|
24
|
-
index: i,
|
|
25
|
-
checked: child.props.value === value,
|
|
26
|
-
inline,
|
|
27
|
-
onChange: () => {
|
|
28
|
-
onChange(child.props.value)
|
|
29
|
-
},
|
|
30
|
-
name
|
|
31
|
-
})
|
|
32
|
-
})}
|
|
33
|
-
</div>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
RadioGroup.propTypes = {
|
|
39
|
-
name: PropTypes.string.isRequired,
|
|
40
|
-
value: PropTypes.any,
|
|
41
|
-
onChange: PropTypes.func,
|
|
42
|
-
inline: PropTypes.bool,
|
|
43
|
-
children: PropTypes.any,
|
|
44
|
-
className: PropTypes.string,
|
|
45
|
-
style: PropTypes.object
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
RadioGroup.defaultProps = {
|
|
49
|
-
onChange: _.noop
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export default RadioGroup
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
//cover bootstrap.style for radio
|
|
2
|
-
.gm-radio {
|
|
3
|
-
cursor: pointer;
|
|
4
|
-
margin: 0;
|
|
5
|
-
|
|
6
|
-
&.gm-radio-block {
|
|
7
|
-
display: block;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&.gm-radio-inline {
|
|
11
|
-
display: inline-block;
|
|
12
|
-
padding-right: 10px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.gm-radio-input {
|
|
16
|
-
display: none;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&.disabled {
|
|
20
|
-
cursor: not-allowed;
|
|
21
|
-
|
|
22
|
-
.gm-radio-input + .gm-radio-span {
|
|
23
|
-
cursor: not-allowed;
|
|
24
|
-
border: 1px solid #d4d8d8;
|
|
25
|
-
background: #eee;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.gm-radio-input:checked + .gm-radio-span {
|
|
29
|
-
border: 1px solid #d4d8d8;
|
|
30
|
-
|
|
31
|
-
&::after {
|
|
32
|
-
border: 3px solid #d4d8d8;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.gm-radio-input + .gm-radio-span {
|
|
38
|
-
margin-right: 5px;
|
|
39
|
-
top: 2px;
|
|
40
|
-
-webkit-appearance: none;
|
|
41
|
-
border: 1px solid #d4d8d8;
|
|
42
|
-
border-radius: 7px;
|
|
43
|
-
display: inline-block;
|
|
44
|
-
position: relative;
|
|
45
|
-
width: 14px;
|
|
46
|
-
height: 14px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.gm-radio-input:checked + .gm-radio-span {
|
|
50
|
-
border: 1px solid #56a3f2;
|
|
51
|
-
|
|
52
|
-
&::after {
|
|
53
|
-
content: '';
|
|
54
|
-
position: absolute;
|
|
55
|
-
width: 0;
|
|
56
|
-
height: 0;
|
|
57
|
-
top: 2px;
|
|
58
|
-
left: 2px;
|
|
59
|
-
border-radius: 4px;
|
|
60
|
-
border: 4px solid #56a3f2;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|