@comet/cms-admin 8.11.0-canary-20251222095236 → 8.11.0-canary-20251222101016

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.
@@ -95,6 +95,12 @@ var FinalFormFileUpload = exports.FinalFormFileUpload = function FinalFormFileUp
95
95
  });
96
96
  });
97
97
  setTooManyFilesSelected(tooManyFilesWereDropped);
98
+ if (!(tooManyFilesWereDropped || !acceptedFiles.length)) {
99
+ _context2.n = 1;
100
+ break;
101
+ }
102
+ return _context2.a(2);
103
+ case 1:
98
104
  rejectedFiles.map(function (rejection) {
99
105
  var failedFile = {
100
106
  name: rejection.file.name,
@@ -117,12 +123,6 @@ var FinalFormFileUpload = exports.FinalFormFileUpload = function FinalFormFileUp
117
123
  if (singleFile) {
118
124
  onChange(undefined);
119
125
  }
120
- if (!(tooManyFilesWereDropped || !acceptedFiles.length)) {
121
- _context2.n = 1;
122
- break;
123
- }
124
- return _context2.a(2);
125
- case 1:
126
126
  setUploadingFiles(acceptedFiles.map(function (file) {
127
127
  return {
128
128
  name: file.name,
@@ -251,7 +251,7 @@ var FinalFormFileUpload = exports.FinalFormFileUpload = function FinalFormFileUp
251
251
  files: files,
252
252
  multiple: multiple,
253
253
  maxFiles: maxFiles,
254
- error: typeof maxFiles !== "undefined" && tooManyFilesSelected ? _admin.commonFileErrorMessages.tooManyFiles(maxFiles) : undefined,
254
+ error: tooManyFilesSelected ? _admin.commonFileErrorMessages.tooManyFiles(maxFiles ? maxFiles : 1) : undefined,
255
255
  getDownloadUrl: function getDownloadUrl(file) {
256
256
  return isDownloadableFile(file) && file.downloadUrl ? "".concat(apiUrl).concat(file.downloadUrl) : undefined;
257
257
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comet/cms-admin",
3
- "version": "8.11.0-canary-20251222095236",
3
+ "version": "8.11.0-canary-20251222101016",
4
4
  "description": "Comet CMS Admin package",
5
5
  "repository": {
6
6
  "directory": "packages/admin/cms-admin",
@@ -40,10 +40,10 @@
40
40
  "slugify": "^1.6.6",
41
41
  "use-debounce": "^10.0.5",
42
42
  "uuid": "^11.1.0",
43
- "@comet/admin": "8.11.0-canary-20251222095236",
44
- "@comet/admin-date-time": "8.11.0-canary-20251222095236",
45
- "@comet/admin-icons": "8.11.0-canary-20251222095236",
46
- "@comet/admin-rte": "8.11.0-canary-20251222095236"
43
+ "@comet/admin": "8.11.0-canary-20251222101016",
44
+ "@comet/admin-date-time": "8.11.0-canary-20251222101016",
45
+ "@comet/admin-icons": "8.11.0-canary-20251222101016",
46
+ "@comet/admin-rte": "8.11.0-canary-20251222101016"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@apollo/client": "^3.14.0",
@@ -64,7 +64,6 @@
64
64
  "@types/draft-js": "^0.11.20",
65
65
  "@types/file-saver": "^2.0.7",
66
66
  "@types/final-form-set-field-touched": "^1.0.3",
67
- "@types/jest": "^29.5.14",
68
67
  "@types/js-cookie": "^3.0.6",
69
68
  "@types/lodash.escaperegexp": "^4.1.9",
70
69
  "@types/lodash.isequal": "^4.5.8",
@@ -80,9 +79,6 @@
80
79
  "eslint": "^9.30.1",
81
80
  "final-form": "^4.20.10",
82
81
  "graphql": "^16.0.0",
83
- "jest": "^29.7.0",
84
- "jest-environment-jsdom": "^29.7.0",
85
- "jest-junit": "^16.0.0",
86
82
  "npm-run-all2": "^8.0.0",
87
83
  "prettier": "^3.6.2",
88
84
  "react": "^18.3.1",
@@ -93,11 +89,11 @@
93
89
  "react-intl": "^7.1.11",
94
90
  "react-router": "^5.3.4",
95
91
  "react-router-dom": "^5.3.4",
96
- "ts-jest": "^29.4.0",
97
92
  "typescript": "5.9.3",
98
- "@comet/admin-babel-preset": "8.11.0-canary-20251222095236",
99
- "@comet/cli": "8.11.0-canary-20251222095236",
100
- "@comet/eslint-config": "8.11.0-canary-20251222095236"
93
+ "vitest": "^4.0.16",
94
+ "@comet/admin-babel-preset": "8.11.0-canary-20251222101016",
95
+ "@comet/cli": "8.11.0-canary-20251222101016",
96
+ "@comet/eslint-config": "8.11.0-canary-20251222101016"
101
97
  },
102
98
  "peerDependencies": {
103
99
  "@apollo/client": "^3.7.0",
@@ -140,7 +136,7 @@
140
136
  "start": "run-p gql:types generate-block-types && run-p start:babel start:types",
141
137
  "start:babel": "pnpm exec babel ./src -x \".ts,.tsx\" -d lib -w",
142
138
  "start:types": "tsc --project ./tsconfig.json --emitDeclarationOnly --watch --preserveWatchOutput",
143
- "test": "jest --verbose=true",
144
- "test:watch": "jest --watch"
139
+ "test": "vitest --run",
140
+ "test:watch": "vitest --watch"
145
141
  }
146
142
  }
@@ -1,3 +0,0 @@
1
- declare const _default: "";
2
- export default _default;
3
- //# sourceMappingURL=stub-file.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stub-file.d.ts","sourceRoot":"","sources":["../../src/testing/stub-file.ts"],"names":[],"mappings":"wBAGe,EAAE;AAAjB,wBAAkB"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- // This is a stub file for testing purposes. It is used in the jest.config.ts (moduleNameMapper) in order to mock certain file types, or modules that are in ESM format
8
- // Documentation of the use of stub files in jest's moduleNameMapper can be found here: https://jestjs.io/docs/configuration#modulenamemapper-objectstring-string--arraystring
9
- var _default = exports["default"] = "";