feffery_utils_components 0.1.3 → 0.1.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.
@@ -3152,75 +3152,95 @@
3152
3152
  "name": "number"
3153
3153
  },
3154
3154
  "required": false,
3155
- "description": ""
3155
+ "description": "",
3156
+ "defaultValue": {
3157
+ "value": "500",
3158
+ "computed": false
3159
+ }
3156
3160
  },
3157
3161
  "smooth": {
3158
3162
  "type": {
3159
- "name": "enum",
3163
+ "name": "union",
3160
3164
  "value": [
3161
3165
  {
3162
- "value": "'linear'",
3163
- "computed": false
3164
- },
3165
- {
3166
- "value": "'easeInQuad'",
3167
- "computed": false
3168
- },
3169
- {
3170
- "value": "'easeOutQuad'",
3171
- "computed": false
3172
- },
3173
- {
3174
- "value": "'easeInOutQuad'",
3175
- "computed": false
3176
- },
3177
- {
3178
- "value": "'easeInCubic'",
3179
- "computed": false
3180
- },
3181
- {
3182
- "value": "'easeOutCubic'",
3183
- "computed": false
3184
- },
3185
- {
3186
- "value": "'easeInOutCubic'",
3187
- "computed": false
3188
- },
3189
- {
3190
- "value": "'easeInQuart'",
3191
- "computed": false
3192
- },
3193
- {
3194
- "value": "'easeOutQuart'",
3195
- "computed": false
3196
- },
3197
- {
3198
- "value": "'easeInOutQuart'",
3199
- "computed": false
3200
- },
3201
- {
3202
- "value": "'easeInQuint'",
3203
- "computed": false
3204
- },
3205
- {
3206
- "value": "'easeOutQuint'",
3207
- "computed": false
3166
+ "name": "bool"
3208
3167
  },
3209
3168
  {
3210
- "value": "'easeInOutQuint'",
3211
- "computed": false
3169
+ "name": "enum",
3170
+ "value": [
3171
+ {
3172
+ "value": "'linear'",
3173
+ "computed": false
3174
+ },
3175
+ {
3176
+ "value": "'easeInQuad'",
3177
+ "computed": false
3178
+ },
3179
+ {
3180
+ "value": "'easeOutQuad'",
3181
+ "computed": false
3182
+ },
3183
+ {
3184
+ "value": "'easeInOutQuad'",
3185
+ "computed": false
3186
+ },
3187
+ {
3188
+ "value": "'easeInCubic'",
3189
+ "computed": false
3190
+ },
3191
+ {
3192
+ "value": "'easeOutCubic'",
3193
+ "computed": false
3194
+ },
3195
+ {
3196
+ "value": "'easeInOutCubic'",
3197
+ "computed": false
3198
+ },
3199
+ {
3200
+ "value": "'easeInQuart'",
3201
+ "computed": false
3202
+ },
3203
+ {
3204
+ "value": "'easeOutQuart'",
3205
+ "computed": false
3206
+ },
3207
+ {
3208
+ "value": "'easeInOutQuart'",
3209
+ "computed": false
3210
+ },
3211
+ {
3212
+ "value": "'easeInQuint'",
3213
+ "computed": false
3214
+ },
3215
+ {
3216
+ "value": "'easeOutQuint'",
3217
+ "computed": false
3218
+ },
3219
+ {
3220
+ "value": "'easeInOutQuint'",
3221
+ "computed": false
3222
+ }
3223
+ ]
3212
3224
  }
3213
3225
  ]
3214
3226
  },
3215
3227
  "required": false,
3216
- "description": ""
3228
+ "description": "",
3229
+ "defaultValue": {
3230
+ "value": "true",
3231
+ "computed": false
3232
+ }
3217
3233
  },
3218
3234
  "delay": {
3219
3235
  "type": {
3220
3236
  "name": "number"
3221
3237
  },
3222
3238
  "required": false,
3223
- "description": ""
3239
+ "description": "",
3240
+ "defaultValue": {
3241
+ "value": "0",
3242
+ "computed": false
3243
+ }
3224
3244
  },
3225
3245
  "containerId": {
3226
3246
  "type": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feffery_utils_components",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Build more utility components for Plotly Dash.",
5
5
  "repository": {
6
6
  "type": "git",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feffery_utils_components",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Build more utility components for Plotly Dash.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -3,7 +3,7 @@ module FefferyUtilsComponents
3
3
  using Dash
4
4
 
5
5
  const resources_path = realpath(joinpath( @__DIR__, "..", "deps"))
6
- const version = "0.1.3"
6
+ const version = "0.1.4"
7
7
 
8
8
  include("jl/''_fefferyblockcolorpicker.jl")
9
9
  include("jl/''_fefferycirclecolorpicker.jl")
@@ -61,14 +61,14 @@ function __init__()
61
61
  [
62
62
  DashBase.Resource(
63
63
  relative_package_path = "feffery_utils_components.min.js",
64
- external_url = "https://unpkg.com/feffery_utils_components@0.1.3/feffery_utils_components/feffery_utils_components.min.js",
64
+ external_url = "https://unpkg.com/feffery_utils_components@0.1.4/feffery_utils_components/feffery_utils_components.min.js",
65
65
  dynamic = nothing,
66
66
  async = nothing,
67
67
  type = :js
68
68
  ),
69
69
  DashBase.Resource(
70
70
  relative_package_path = "feffery_utils_components.min.js.map",
71
- external_url = "https://unpkg.com/feffery_utils_components@0.1.3/feffery_utils_components/feffery_utils_components.min.js.map",
71
+ external_url = "https://unpkg.com/feffery_utils_components@0.1.4/feffery_utils_components/feffery_utils_components.min.js.map",
72
72
  dynamic = true,
73
73
  async = nothing,
74
74
  type = :js
@@ -23,7 +23,7 @@ Those elements have the following types:
23
23
  - `scrollRelativeOffset` (Real; optional)
24
24
  - `scrollTargetId` (String; optional)
25
25
  - `scrollTopOffset` (Real; optional)
26
- - `smooth` (a value equal to: 'linear', 'easeInQuad', 'easeOutQuad', 'easeInOutQuad', 'easeInCubic', 'easeOutCubic', 'easeInOutCubic', 'easeInQuart', 'easeOutQuart', 'easeInOutQuart', 'easeInQuint', 'easeOutQuint', 'easeInOutQuint'; optional)
26
+ - `smooth` (Bool | a value equal to: 'linear', 'easeInQuad', 'easeOutQuad', 'easeInOutQuad', 'easeInCubic', 'easeOutCubic', 'easeInOutCubic', 'easeInQuart', 'easeOutQuart', 'easeInOutQuart', 'easeInQuint', 'easeOutQuint', 'easeInOutQuint'; optional)
27
27
  """
28
28
  function ''_fefferyscroll(; kwargs...)
29
29
  available_props = Symbol[:id, :containerId, :delay, :duration, :executeScroll, :loading_state, :offset, :scrollMode, :scrollRelativeOffset, :scrollTargetId, :scrollTopOffset, :smooth]
@@ -92,14 +92,14 @@ FefferyScroll.propTypes = {
92
92
  // 部件id
93
93
  id: PropTypes.string,
94
94
 
95
- // 设置页面滚动模式,可选的有'top'、'bottom'、'top-offset'、'relative-offset'、'target'
95
+ // 设置页面滚动模式,可选的有'to-top'、'to-bottom'、'top-offset'、'relative-offset'、'target'
96
96
  scrollMode: PropTypes.oneOf([
97
97
  'to-top', 'to-bottom', 'top-offset', 'relative-offset', 'target'
98
- ]),
98
+ ]).isRequired,
99
99
 
100
100
  // 用于指示是否进行滚动操作,默认为false
101
101
  // 在回调中可executeScroll参数Output为true从而触发新一次滚动
102
- // 每次由executeScroll=true触发的滚动完成后,executeScroll会自动恢复为false
102
+ // 每次由executeScroll=true触发的滚动完成后,executeScroll会自动重置为false
103
103
  executeScroll: PropTypes.bool,
104
104
 
105
105
  // 当scrollMode='top-offset'时,用于设置滚动终点距离页面顶端的像素
@@ -111,27 +111,30 @@ FefferyScroll.propTypes = {
111
111
  // 当scrollMode='target'时,用于设置滚动目标元素的id信息
112
112
  scrollTargetId: PropTypes.string,
113
113
 
114
- // 用于设置滚动过程耗时(单位:毫秒)
114
+ // 用于设置滚动过程耗时(单位:毫秒),默认为500
115
115
  duration: PropTypes.number,
116
116
 
117
- // 用于设置滚动过程动画模式
118
- smooth: PropTypes.oneOf([
119
- 'linear',
120
- 'easeInQuad',
121
- 'easeOutQuad',
122
- 'easeInOutQuad',
123
- 'easeInCubic',
124
- 'easeOutCubic',
125
- 'easeInOutCubic',
126
- 'easeInQuart',
127
- 'easeOutQuart',
128
- 'easeInOutQuart',
129
- 'easeInQuint',
130
- 'easeOutQuint',
131
- 'easeInOutQuint'
117
+ // 用于设置滚动过程动画模式,默认为true
118
+ smooth: PropTypes.oneOfType([
119
+ PropTypes.bool,
120
+ PropTypes.oneOf([
121
+ 'linear',
122
+ 'easeInQuad',
123
+ 'easeOutQuad',
124
+ 'easeInOutQuad',
125
+ 'easeInCubic',
126
+ 'easeOutCubic',
127
+ 'easeInOutCubic',
128
+ 'easeInQuart',
129
+ 'easeOutQuart',
130
+ 'easeInOutQuart',
131
+ 'easeInQuint',
132
+ 'easeOutQuint',
133
+ 'easeInOutQuint'
134
+ ])
132
135
  ]),
133
136
 
134
- // 用于设置滚动延时(单位:毫秒)
137
+ // 用于设置滚动延时(单位:毫秒),默认为0
135
138
  delay: PropTypes.number,
136
139
 
137
140
  // 当滚动目标位于局部滚动条内时,用于设置局部滚动条所在的容器id信息
@@ -165,7 +168,10 @@ FefferyScroll.propTypes = {
165
168
  // 设置默认参数
166
169
  FefferyScroll.defaultProps = {
167
170
  executeScroll: false,
168
- scrollMode: 'to-top'
171
+ scrollMode: 'to-top',
172
+ duration: 500,
173
+ delay: 0,
174
+ smooth: true
169
175
  }
170
176
 
171
- export default FefferyScroll;
177
+ export default React.memo(FefferyScroll);