@omegagrid/grid-core 0.4.8 → 0.4.9

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/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as gridConstants } from './constants';
2
+ export * as utils from './utils';
2
3
  export * from './calculations';
3
4
  export * from './common';
4
5
  export * from './model';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,aAAa,CAAC;AACrD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -10,6 +10,18 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
10
10
  if (k2 === undefined) k2 = k;
11
11
  o[k2] = m[k];
12
12
  }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
13
25
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
27
  };
@@ -17,9 +29,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
29
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
30
  };
19
31
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.gridConstants = void 0;
32
+ exports.utils = exports.gridConstants = void 0;
21
33
  var constants_1 = require("./constants");
22
34
  Object.defineProperty(exports, "gridConstants", { enumerable: true, get: function () { return __importDefault(constants_1).default; } });
35
+ exports.utils = __importStar(require("./utils"));
23
36
  __exportStar(require("./calculations"), exports);
24
37
  __exportStar(require("./common"), exports);
25
38
  __exportStar(require("./model"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,yCAAqD;AAA7C,2HAAA,OAAO,OAAiB;AAChC,iDAA+B;AAC/B,2CAAyB;AACzB,0CAAwB;AACxB,+CAA6B;AAC7B,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAqD;AAA7C,2HAAA,OAAO,OAAiB;AAChC,iDAAiC;AACjC,iDAA+B;AAC/B,2CAAyB;AACzB,0CAAwB;AACxB,+CAA6B;AAC7B,0CAAwB"}
@@ -0,0 +1,4 @@
1
+ export declare const SHEET_NAME_REGEX: RegExp;
2
+ export declare function isSheetNameValid(name: string): boolean;
3
+ export declare function sanitizeSheetName(name: string): string;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,QAAuC,CAAC;AAErE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,WAE5C;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAItD"}
package/dist/utils.js ADDED
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /* eslint-disable no-useless-escape */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.sanitizeSheetName = exports.isSheetNameValid = exports.SHEET_NAME_REGEX = void 0;
5
+ exports.SHEET_NAME_REGEX = /^(?!.*[\\\/\*\[\]\:\?"])(.{1,31})$/;
6
+ function isSheetNameValid(name) {
7
+ return exports.SHEET_NAME_REGEX.test(name);
8
+ }
9
+ exports.isSheetNameValid = isSheetNameValid;
10
+ function sanitizeSheetName(name) {
11
+ const invalidChars = ['\\', '/', '*', '[', ']', ':', '?', '"'];
12
+ invalidChars.forEach(char => name = name.replace(new RegExp(`\\${char}`, 'g'), ''));
13
+ return name;
14
+ }
15
+ exports.sanitizeSheetName = sanitizeSheetName;
16
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA,sCAAsC;;;AAEzB,QAAA,gBAAgB,GAAG,oCAAoC,CAAC;AAErE,SAAgB,gBAAgB,CAAC,IAAY;IAC5C,OAAO,wBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC;AAFD,4CAEC;AAED,SAAgB,iBAAiB,CAAC,IAAY;IAC7C,MAAM,YAAY,GAAa,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACzE,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpF,OAAO,IAAI,CAAC;AACb,CAAC;AAJD,8CAIC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omegagrid/grid-core",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Grid model, no ui components",
6
6
  "main": "./dist/index.js",
@@ -28,8 +28,8 @@
28
28
  "generate-functions-docs": "node ./scripts/generate-functions-docs.cjs"
29
29
  },
30
30
  "dependencies": {
31
- "@omegagrid/core": "^0.4.8",
32
- "@omegagrid/localize": "^0.4.8",
31
+ "@omegagrid/core": "^0.4.9",
32
+ "@omegagrid/localize": "^0.4.9",
33
33
  "@stdlib/stats": "^0.0.13",
34
34
  "color": "^4.2.3",
35
35
  "date-fns": "^3.2.0",