@visns-studio/visns-components 4.7.11 → 4.8.0

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
@@ -14,11 +14,11 @@
14
14
  "akar-icons": "^1.9.31",
15
15
  "array-move": "^4.0.0",
16
16
  "awesome-debounce-promise": "^2.1.0",
17
- "axios": "^1.7.4",
17
+ "axios": "^1.7.5",
18
18
  "dayjs": "^1.11.13",
19
19
  "file-saver": "^2.0.5",
20
- "framer-motion": "^11.3.28",
21
- "html-react-parser": "^5.1.12",
20
+ "framer-motion": "^11.3.31",
21
+ "html-react-parser": "^5.1.15",
22
22
  "lodash": "^4.17.21",
23
23
  "lodash.debounce": "^4.0.8",
24
24
  "moment": "^2.30.1",
@@ -32,7 +32,7 @@
32
32
  "react-datepicker": "^7.3.0",
33
33
  "react-dropzone": "^14.2.3",
34
34
  "react-grid-gallery": "^1.0.1",
35
- "react-number-format": "^5.4.0",
35
+ "react-number-format": "^5.4.1",
36
36
  "react-password-strength-bar": "^0.4.1",
37
37
  "react-promise-tracker": "^2.1.1",
38
38
  "react-quill": "^2.0.0",
@@ -57,8 +57,8 @@
57
57
  },
58
58
  "devDependencies": {
59
59
  "@babel/core": "^7.25.2",
60
- "@babel/plugin-transform-runtime": "^7.24.7",
61
- "@babel/preset-env": "^7.25.3",
60
+ "@babel/plugin-transform-runtime": "^7.25.4",
61
+ "@babel/preset-env": "^7.25.4",
62
62
  "@babel/preset-react": "^7.24.7",
63
63
  "babel-loader": "^9.1.3",
64
64
  "copy-webpack-plugin": "^12.0.2",
@@ -75,7 +75,7 @@
75
75
  "react-dom": "^17.0.0 || ^18.0.0"
76
76
  },
77
77
  "name": "@visns-studio/visns-components",
78
- "version": "4.7.11",
78
+ "version": "4.8.0",
79
79
  "description": "Various packages to assist in the development of our Custom Applications.",
80
80
  "main": "src/index.js",
81
81
  "files": [
@@ -379,6 +379,17 @@ const DataGrid = forwardRef(
379
379
  toast.success(result.message);
380
380
  });
381
381
  break;
382
+ case 'clone':
383
+ if (s.url && s.url !== '') {
384
+ const cloneUrl = `${s.url}/${d[s.key]}/clone`;
385
+
386
+ CustomFetch(cloneUrl, 'POST', {}, (result) => {
387
+ toast.success(result.message);
388
+
389
+ handleReload();
390
+ });
391
+ }
392
+ break;
382
393
  case 'oauth2':
383
394
  let oauth2Payload = d;
384
395
 
@@ -1085,6 +1096,8 @@ const DataGrid = forwardRef(
1085
1096
  return getIconComponent(ShippingBoxV1);
1086
1097
  case 'oauth2':
1087
1098
  return getIconComponent(LockOn);
1099
+ case 'clone':
1100
+ return getIconComponent(Copy);
1088
1101
  case 'complete':
1089
1102
  return getIconComponent(Check);
1090
1103
  case 'copy':
@@ -1147,6 +1147,35 @@ function Field({
1147
1147
  'removeformat | table',
1148
1148
  content_style:
1149
1149
  'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }',
1150
+ setup: (editor) => {
1151
+ // Check if insertText exists and is an array of objects
1152
+ if (
1153
+ settings.insertText &&
1154
+ Array.isArray(settings.insertText) &&
1155
+ settings.insertText.length > 0
1156
+ ) {
1157
+ editor.ui.registry.addMenuButton(
1158
+ 'myCustomDropdown',
1159
+ {
1160
+ text: 'Insert Text',
1161
+ fetch: (callback) => {
1162
+ const items =
1163
+ settings.insertText.map(
1164
+ (textObj) => ({
1165
+ type: 'menuitem',
1166
+ text: textObj.text,
1167
+ onAction: () =>
1168
+ editor.insertContent(
1169
+ textObj.content
1170
+ ),
1171
+ })
1172
+ );
1173
+ callback(items);
1174
+ },
1175
+ }
1176
+ );
1177
+ }
1178
+ },
1150
1179
  }}
1151
1180
  />
1152
1181
  );