@innoways/drip-form-theme-antd 9.0.5 → 9.0.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: prevent duplicate year entries in StyledFlatPicker 9.0.6
8
+ - Updated dependencies
9
+ - @innoways/hooks@9.0.6
10
+ - @innoways/utils@9.0.6
11
+
3
12
  ## 9.0.5
4
13
 
5
14
  ### Patch Changes
package/dist/index.js CHANGED
@@ -22070,8 +22070,17 @@ var StyledFlatPicker = function StyledFlatPicker(props) {
22070
22070
  var startYear = firstYear - 10;
22071
22071
  var endYear = startYear + 11;
22072
22072
 
22073
+ var _loop = function _loop(year) {
22074
+ // Prevent duplicates: only insert if a node with same year text doesn't exist
22075
+ if (!Array.from(list.children).some(function (item) {
22076
+ return item.textContent === String(year);
22077
+ })) {
22078
+ list.insertBefore(createYearItem(instance, list, year, false), list.firstElementChild);
22079
+ }
22080
+ };
22081
+
22073
22082
  for (var year = endYear; year >= startYear; year--) {
22074
- list.insertBefore(createYearItem(instance, list, year, false), list.firstElementChild);
22083
+ _loop(year);
22075
22084
  }
22076
22085
 
22077
22086
  list.scrollTop = 240;
@@ -22084,8 +22093,17 @@ var StyledFlatPicker = function StyledFlatPicker(props) {
22084
22093
  var startYear = lastYear + 1;
22085
22094
  var endYear = startYear + 11;
22086
22095
 
22096
+ var _loop2 = function _loop2(year) {
22097
+ // Prevent duplicates: only append if not already present
22098
+ if (!Array.from(list.children).some(function (item) {
22099
+ return item.textContent === String(year);
22100
+ })) {
22101
+ list.appendChild(createYearItem(instance, list, year, false));
22102
+ }
22103
+ };
22104
+
22087
22105
  for (var year = startYear; year <= endYear; year++) {
22088
- list.appendChild(createYearItem(instance, list, year, false));
22106
+ _loop2(year);
22089
22107
  }
22090
22108
  }
22091
22109
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innoways/drip-form-theme-antd",
3
- "version": "9.0.5",
3
+ "version": "9.0.6",
4
4
  "author": "JDFED",
5
5
  "description": "drip-form antd主题包",
6
6
  "main": "dist/index.js",
@@ -31,8 +31,8 @@
31
31
  "dependencies": {
32
32
  "@ant-design/icons": "^4.7.0",
33
33
  "@babel/runtime": "^7.10.2",
34
- "@innoways/hooks": "^9.0.5",
35
- "@innoways/utils": "^9.0.5",
34
+ "@innoways/hooks": "^9.0.6",
35
+ "@innoways/utils": "^9.0.6",
36
36
  "antd": "^4.16.13",
37
37
  "flatpickr": "^4.6.13",
38
38
  "moment": "^2.26.0",