infinity-forge 6.1.3 → 6.1.4

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.
@@ -10,17 +10,57 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || (function () {
30
+ var ownKeys = function(o) {
31
+ ownKeys = Object.getOwnPropertyNames || function (o) {
32
+ var ar = [];
33
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
+ return ar;
35
+ };
36
+ return ownKeys(o);
37
+ };
38
+ return function (mod) {
39
+ if (mod && mod.__esModule) return mod;
40
+ var result = {};
41
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
+ __setModuleDefault(result, mod);
43
+ return result;
44
+ };
45
+ })();
46
+ var __importDefault = (this && this.__importDefault) || function (mod) {
47
+ return (mod && mod.__esModule) ? mod : { "default": mod };
48
+ };
13
49
  Object.defineProperty(exports, "__esModule", { value: true });
14
50
  exports.TextEditor = TextEditor;
15
51
  var jsx_runtime_1 = require("react/jsx-runtime");
16
52
  var formik_1 = require("formik");
17
53
  var input_control_1 = require("../input-control/index.js");
18
- var quill_1 = require("./quill.js");
54
+ var dynamic_1 = __importDefault(require("next/dynamic"));
55
+ var EditorQuill = (0, dynamic_1.default)(function () { return Promise.resolve().then(function () { return __importStar(require("./quill.js")); }).then(function (r) { return r.EditorQuill; }); }, {
56
+ loading: function () { return (0, jsx_runtime_1.jsx)("div", { children: "loading..." }); },
57
+ ssr: false,
58
+ });
19
59
  function TextEditor(props) {
20
60
  var _a = (0, formik_1.useField)(props), field = _a[0], helpers = _a[2];
21
61
  var handleOnChange = function (value) {
22
62
  helpers.setValue(value);
23
63
  };
24
- return ((0, jsx_runtime_1.jsx)("div", { id: 'text-editor', children: (0, jsx_runtime_1.jsx)(input_control_1.InputControl, __assign({}, props, { children: (0, jsx_runtime_1.jsx)(quill_1.Quill, { value: field.value, handleOnChange: handleOnChange }) })) }));
64
+ return ((0, jsx_runtime_1.jsx)("div", { id: 'text-editor', children: (0, jsx_runtime_1.jsx)(input_control_1.InputControl, __assign({}, props, { children: (0, jsx_runtime_1.jsx)(EditorQuill, { value: field.value || "", handleOnChange: handleOnChange }) })) }));
25
65
  }
26
66
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/text-editor/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAQA,gCAcC;;AAtBD,iCAAiC;AAEjC,kDAA+C;AAG/C,iCAA+B;AAG/B,SAAgB,UAAU,CAAC,KAAiB;IACpC,IAAA,KAAqB,IAAA,iBAAQ,EAAC,KAAK,CAAC,EAAnC,KAAK,QAAA,EAAI,OAAO,QAAmB,CAAA;IAE1C,IAAM,cAAc,GAAG,UAAC,KAAa;QACnC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IACzB,CAAC,CAAA;IAED,OAAO,CACL,gCAAK,EAAE,EAAC,aAAa,YACnB,uBAAC,4BAAY,eAAK,KAAK,cACrB,uBAAC,aAAK,IAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,cAAc,EAAE,cAAc,GAAI,IACjD,GACX,CACP,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/text-editor/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,gCAcC;;AA1BD,iCAAiC;AAEjC,kDAA+C;AAG/C,yDAAkC;AAElC,IAAM,WAAW,GAAG,IAAA,iBAAO,EAAC,cAAM,OAAA,iEAAO,SAAS,OAAE,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,WAAW,EAAb,CAAa,CAAC,EAA1C,CAA0C,EAAE;IAC5E,OAAO,EAAE,cAAM,OAAA,yDAAqB,EAArB,CAAqB;IACpC,GAAG,EAAE,KAAK;CACX,CAAC,CAAC;AAEH,SAAgB,UAAU,CAAC,KAAiB;IACpC,IAAA,KAAqB,IAAA,iBAAQ,EAAC,KAAK,CAAC,EAAnC,KAAK,QAAA,EAAI,OAAO,QAAmB,CAAA;IAE1C,IAAM,cAAc,GAAG,UAAC,KAAa;QACnC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IACzB,CAAC,CAAA;IAED,OAAO,CACL,gCAAK,EAAE,EAAC,aAAa,YACnB,uBAAC,4BAAY,eAAK,KAAK,cACrB,uBAAC,WAAW,IAAE,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE,cAAc,EAAE,cAAc,GAAI,IAC7D,GACX,CACP,CAAA;AACH,CAAC"}
@@ -1 +1,4 @@
1
- export declare function Quill(props: any): import("react/jsx-runtime").JSX.Element;
1
+ export declare function EditorQuill(props: {
2
+ value?: string;
3
+ handleOnChange: (value: string) => void;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,48 +1,31 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
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 () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
36
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
4
  };
38
5
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.Quill = Quill;
6
+ exports.EditorQuill = EditorQuill;
40
7
  var jsx_runtime_1 = require("react/jsx-runtime");
41
- var dynamic_1 = __importDefault(require("next/dynamic"));
42
- var ReactQuill = (0, dynamic_1.default)(function () { return Promise.resolve().then(function () { return __importStar(require('react-quill')); }); }, {
43
- ssr: false,
44
- });
45
- function Quill(props) {
46
- return (0, jsx_runtime_1.jsx)(ReactQuill, { theme: "snow", value: props.value, onChange: props.handleOnChange });
8
+ var react_1 = require("react");
9
+ var error_boundary_1 = require("../../error-boundary/index.js");
10
+ var quill_1 = __importDefault(require("quill"));
11
+ function EditorQuill(props) {
12
+ var ID = 'id-' + Math.random().toString(36).substr(2, 9);
13
+ var quillRef = (0, react_1.useRef)(null);
14
+ (0, react_1.useEffect)(function () {
15
+ if (!quillRef.current) {
16
+ var reference_1 = new quill_1.default('#' + ID, {
17
+ theme: 'snow',
18
+ });
19
+ quillRef.current = reference_1;
20
+ if (props.value) {
21
+ reference_1.root.innerHTML = props.value;
22
+ }
23
+ reference_1.on(quill_1.default.events.TEXT_CHANGE, function () {
24
+ var html = reference_1.root.innerHTML;
25
+ props.handleOnChange(html);
26
+ });
27
+ }
28
+ }, []);
29
+ return ((0, jsx_runtime_1.jsx)(error_boundary_1.Error, { name: 'react-quill', children: (0, jsx_runtime_1.jsx)("div", { id: ID }) }));
47
30
  }
48
31
  //# sourceMappingURL=quill.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"quill.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/text-editor/quill.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,sBAMC;;AAZD,yDAAkC;AAElC,IAAM,UAAU,GAAG,IAAA,iBAAO,EAAC,cAAM,wEAAO,aAAa,QAApB,CAAqB,EAAE;IACtD,GAAG,EAAE,KAAK;CACX,CAAC,CAAA;AAEF,SAAgB,KAAK,CAAC,KAAK;IACvB,OAAO,uBAAC,UAAU,IACZ,KAAK,EAAC,MAAM,EACZ,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,KAAK,CAAC,cAAc,GAC9B,CAAA;AACV,CAAC"}
1
+ {"version":3,"file":"quill.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/text-editor/quill.tsx"],"names":[],"mappings":";;;;;AAMA,kCA8BC;;AApCD,+BAAyC;AAEzC,uDAA4C;AAE5C,gDAAyB;AAEzB,SAAgB,WAAW,CAAC,KAAkE;IAC5F,IAAM,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAE1D,IAAM,QAAQ,GAAG,IAAA,cAAM,EAAQ,IAAI,CAAC,CAAA;IAEpC,IAAA,iBAAS,EAAC;QACR,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtB,IAAM,WAAS,GAAG,IAAI,eAAK,CAAC,GAAG,GAAG,EAAE,EAAE;gBACpC,KAAK,EAAE,MAAM;aACd,CAAC,CAAA;YAEF,QAAQ,CAAC,OAAO,GAAG,WAAS,CAAA;YAE5B,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;gBAChB,WAAS,CAAC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,KAAK,CAAA;YACxC,CAAC;YAED,WAAS,CAAC,EAAE,CAAC,eAAK,CAAC,MAAM,CAAC,WAAW,EAAE;gBACrC,IAAM,IAAI,GAAG,WAAS,CAAC,IAAI,CAAC,SAAS,CAAA;gBAErC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;YAC5B,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,CACL,uBAAC,sBAAK,IAAC,IAAI,EAAC,aAAa,YACvB,gCAAK,EAAE,EAAE,EAAE,GAAI,GACT,CACT,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,74 +1,74 @@
1
- {
2
- "name": "infinity-forge",
3
- "version": "6.1.3",
4
- "description": "codie Library",
5
- "main": "./dist/index",
6
- "module": "./dist/index",
7
- "types": "./dist/index.d.ts",
8
- "repository": {
9
- "type": "git",
10
- "url": "https://github.com/CodieDigital/codiedigital-library"
11
- },
12
- "scripts": {
13
- "dev": "next -p 3053",
14
- "deploy": "npm version patch && npm publish",
15
- "next": "next build",
16
- "start": "next start -p 3015",
17
- "build": "tsc && tsc-alias --resolve-full-paths && npm run build:CSS",
18
- "build:CSS": "npm run minify-css && node combine-css.ts && cpx \"src/**/*.css\" dist --watch",
19
- "minify-css": "postcss src/**/*.css --use cssnano -d dist --no-map"
20
- },
21
- "peerDependencies": {
22
- "react": ">=16"
23
- },
24
- "files": [
25
- "dist",
26
- "LICENSE",
27
- "README.md"
28
- ],
29
- "keywords": [
30
- "react",
31
- "typescript",
32
- "awesome-project"
33
- ],
34
- "author": "Codie Digital",
35
- "license": "MIT",
36
- "devDependencies": {
37
- "@types/node": "^22.10.2",
38
- "@types/react": "^19.0.2",
39
- "@types/react-dom": "^19.0.2",
40
- "@types/styled-components": "^5.1.34",
41
- "concurrently": "^9.1.1",
42
- "copyfiles": "^2.4.1",
43
- "cssnano": "^7.0.6",
44
- "fs-extra": "^11.2.0",
45
- "postcss": "^8.4.49",
46
- "postcss-cli": "^11.0.0",
47
- "tsc-alias": "^1.8.10",
48
- "typescript": "^5.7.2",
49
- "@types/lodash": "^4.17.13"
50
- },
51
- "dependencies": {
52
- "@monaco-editor/react": "^4.6.0",
53
- "@wojtekmaj/react-daterange-picker": "^6.0.0",
54
- "axios": "^1.7.9",
55
- "chroma-js": "^3.1.2",
56
- "cpx": "^1.5.0",
57
- "formik": "^2.4.6",
58
- "lodash": "^4.17.21",
59
- "moment": "^2.30.1",
60
- "next": "^14.2.3",
61
- "react": "19.0.0",
62
- "react-date-picker": "^11.0.0",
63
- "react-dom": "19.0.0",
64
- "react-ga": "^3.3.1",
65
- "react-is": "^19.0.0",
66
- "react-quill": "^2.0.0",
67
- "react-select": "^5.9.0",
68
- "react-share": "^5.1.2",
69
- "styled-components": "^6.1.13",
70
- "tinycolor2": "^1.6.0",
71
- "yup": "^1.6.1",
72
- "zustand": "^5.0.2"
73
- }
74
- }
1
+ {
2
+ "name": "infinity-forge",
3
+ "version": "6.1.4",
4
+ "description": "codie Library",
5
+ "main": "./dist/index",
6
+ "module": "./dist/index",
7
+ "types": "./dist/index.d.ts",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/CodieDigital/codiedigital-library"
11
+ },
12
+ "scripts": {
13
+ "dev": "next -p 3053",
14
+ "deploy": "npm version patch && npm publish",
15
+ "next": "next build",
16
+ "start": "next start -p 3015",
17
+ "build": "tsc && tsc-alias --resolve-full-paths && npm run build:CSS",
18
+ "build:CSS": "npm run minify-css && node combine-css.ts && cpx \"src/**/*.css\" dist --watch",
19
+ "minify-css": "postcss src/**/*.css --use cssnano -d dist --no-map"
20
+ },
21
+ "peerDependencies": {
22
+ "react": ">=16"
23
+ },
24
+ "files": [
25
+ "dist",
26
+ "LICENSE",
27
+ "README.md"
28
+ ],
29
+ "keywords": [
30
+ "react",
31
+ "typescript",
32
+ "awesome-project"
33
+ ],
34
+ "author": "Codie Digital",
35
+ "license": "MIT",
36
+ "devDependencies": {
37
+ "@types/lodash": "^4.17.13",
38
+ "@types/node": "^22.10.2",
39
+ "@types/react": "^19.0.2",
40
+ "@types/react-dom": "^19.0.2",
41
+ "@types/styled-components": "^5.1.34",
42
+ "concurrently": "^9.1.1",
43
+ "copyfiles": "^2.4.1",
44
+ "cssnano": "^7.0.6",
45
+ "fs-extra": "^11.2.0",
46
+ "postcss": "^8.4.49",
47
+ "postcss-cli": "^11.0.0",
48
+ "tsc-alias": "^1.8.10",
49
+ "typescript": "^5.7.2"
50
+ },
51
+ "dependencies": {
52
+ "@monaco-editor/react": "^4.6.0",
53
+ "@wojtekmaj/react-daterange-picker": "^6.0.0",
54
+ "axios": "^1.7.9",
55
+ "chroma-js": "^3.1.2",
56
+ "cpx": "^1.5.0",
57
+ "formik": "^2.4.6",
58
+ "lodash": "^4.17.21",
59
+ "moment": "^2.30.1",
60
+ "next": "^14.2.3",
61
+ "quill": "^2.0.3",
62
+ "react": "19.0.0",
63
+ "react-date-picker": "^11.0.0",
64
+ "react-dom": "19.0.0",
65
+ "react-ga": "^3.3.1",
66
+ "react-is": "^19.0.0",
67
+ "react-select": "^5.9.0",
68
+ "react-share": "^5.1.2",
69
+ "styled-components": "^6.1.13",
70
+ "tinycolor2": "^1.6.0",
71
+ "yup": "^1.6.1",
72
+ "zustand": "^5.0.2"
73
+ }
74
+ }