@visns-studio/visns-components 5.11.19 → 5.11.20

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/package.json CHANGED
@@ -65,10 +65,10 @@
65
65
  "validator": "^13.15.15",
66
66
  "vite": "^6.3.5",
67
67
  "yarn": "^1.22.22",
68
- "yet-another-react-lightbox": "^3.23.3"
68
+ "yet-another-react-lightbox": "^3.23.4"
69
69
  },
70
70
  "devDependencies": {
71
- "@babel/core": "^7.27.4",
71
+ "@babel/core": "^7.27.7",
72
72
  "@babel/plugin-transform-runtime": "^7.27.4",
73
73
  "@babel/preset-env": "^7.27.2",
74
74
  "@babel/preset-react": "^7.27.1",
@@ -87,7 +87,7 @@
87
87
  "react-dom": "^17.0.0 || ^18.0.0"
88
88
  },
89
89
  "name": "@visns-studio/visns-components",
90
- "version": "5.11.19",
90
+ "version": "5.11.20",
91
91
  "description": "Various packages to assist in the development of our Custom Applications.",
92
92
  "main": "src/index.js",
93
93
  "files": [
@@ -134,7 +134,20 @@ export const renderDateTimeColumn = ({
134
134
  moment(data[column.id]).isValid() &&
135
135
  moment(data[column.id]).format('YYYY-MM-DD') !== '1970-01-01'
136
136
  ) {
137
- const formattedValue = moment(data[column.id]).format(
137
+ let dateValue = moment(data[column.id]);
138
+
139
+ // Apply modifier if present
140
+ if (column.modifier) {
141
+ const { operator, value, unit } = column.modifier;
142
+
143
+ if (operator === '+') {
144
+ dateValue = dateValue.add(value, unit);
145
+ } else if (operator === '-') {
146
+ dateValue = dateValue.subtract(value, unit);
147
+ }
148
+ }
149
+
150
+ const formattedValue = dateValue.format(
138
151
  column.format ? column.format : 'DD-MM-YYYY hh:mm A'
139
152
  );
140
153