infinity-forge 0.49.6 → 0.49.8

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.
@@ -54,11 +54,12 @@ var ui_1 = require("../../../ui/index.js");
54
54
  var S = __importStar(require("./styles.js"));
55
55
  var ModalContext = (0, react_1.createContext)({
56
56
  createModal: function () { },
57
- closeModal: function () { }
57
+ closeModal: function () { },
58
58
  });
59
59
  function ModalProvider(_a) {
60
60
  var children = _a.children;
61
61
  var _b = (0, react_1.useState)([]), modal = _b[0], setModal = _b[1];
62
+ var refContainer = (0, react_1.useRef)(null);
62
63
  function createModal(item) {
63
64
  var id = (0, ui_1.uid)(32);
64
65
  setModal(function (state) { return __spreadArray(__spreadArray([], state, true), [__assign(__assign({}, item), { id: item.id || id })], false); });
@@ -69,13 +70,14 @@ function ModalProvider(_a) {
69
70
  setModal(function (state) { return state.filter(function (item) { return item.id !== findModal.id; }); });
70
71
  }
71
72
  }
72
- return ((0, jsx_runtime_1.jsxs)(ModalContext.Provider, { value: { createModal: createModal, closeModal: closeModal }, children: [children, react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)(S.Modal, { children: modal === null || modal === void 0 ? void 0 : modal.map(function (modal_props) {
73
- function close() {
74
- (modal_props === null || modal_props === void 0 ? void 0 : modal_props.onClose) && modal_props.onClose();
75
- closeModal(modal_props.id);
76
- }
77
- return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'Modal', children: (0, jsx_runtime_1.jsxs)(S.Modal, { children: [(0, jsx_runtime_1.jsx)("div", { className: 'overlay', onClick: close }), (0, jsx_runtime_1.jsxs)("div", { className: 'modal_content', style: __assign({}, modal_props.style), children: [(0, jsx_runtime_1.jsx)("button", { type: 'button', onClick: close, className: 'close_modal_infinity_forge', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'CloseIcon', fill: '#000' }) }), (0, jsx_runtime_1.jsx)(modal_props.ModalContent, { closeModal: close })] })] }) }, modal_props.id));
78
- }) }), document.body)] }));
73
+ return ((0, jsx_runtime_1.jsxs)(ModalContext.Provider, { value: { createModal: createModal, closeModal: closeModal }, children: [children, refContainer.current &&
74
+ react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)(S.Modal, { children: modal === null || modal === void 0 ? void 0 : modal.map(function (modal_props) {
75
+ function close() {
76
+ (modal_props === null || modal_props === void 0 ? void 0 : modal_props.onClose) && modal_props.onClose();
77
+ closeModal(modal_props.id);
78
+ }
79
+ return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'Modal', children: (0, jsx_runtime_1.jsxs)(S.Modal, { children: [(0, jsx_runtime_1.jsx)("div", { className: 'overlay', onClick: close }), (0, jsx_runtime_1.jsxs)("div", { className: 'modal_content', style: __assign({}, modal_props.style), children: [(0, jsx_runtime_1.jsx)("button", { type: 'button', onClick: close, className: 'close_modal_infinity_forge', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'CloseIcon', fill: '#000' }) }), (0, jsx_runtime_1.jsx)(modal_props.ModalContent, { closeModal: close })] })] }) }, modal_props.id));
80
+ }) }), refContainer.current), (0, jsx_runtime_1.jsx)("div", { ref: refContainer })] }));
79
81
  }
80
82
  exports.ModalProvider = ModalProvider;
81
83
  function useModal() {
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/ui/contexts/modal/context.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA0E;AAC1E,wDAAiC;AAEjC,2BAAuC;AAIvC,0CAA6B;AAE7B,IAAM,YAAY,GAAG,IAAA,qBAAa,EAA6E;IAC7G,WAAW,EAAE,cAAO,CAAC;IACrB,UAAU,EAAE,cAAO,CAAC;CACrB,CAAC,CAAA;AAEF,SAAS,aAAa,CAAC,EAAY;QAAV,QAAQ,cAAA;IACzB,IAAA,KAAoB,IAAA,gBAAQ,EAAW,EAAE,CAAC,EAAzC,KAAK,QAAA,EAA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B,YAC1E,uBAAC,SAAI,IAAC,IAAI,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,GAAG,GAC9B,EAER,uBAAC,WAAW,CAAC,YAAY,IAAC,UAAU,EAAE,KAAK,GAAI,IAC5C,IACE,IAXa,WAAW,CAAC,EAAE,CAY/B,CACT,CAAA;oBACH,CAAC,CAAC,GACM,EACV,YAAY,CAAC,OAAO,CACrB,EAEH,gCAAK,GAAG,EAAE,YAAY,GAAQ,IACR,CACzB,CAAA;AACH,CAAC;AAQQ,sCAAa;AANtB,SAAS,QAAQ;IACf,IAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,YAAY,CAAC,CAAA;IAExC,OAAO,OAAO,CAAA;AAChB,CAAC;AAEuB,4BAAQ"}
package/package.json CHANGED
@@ -1,84 +1,87 @@
1
- {
2
- "name": "infinity-forge",
3
- "version": "0.49.6",
4
- "description": "codie Library",
5
- "main": "./dist/index.js",
6
- "module": "./dist/index.js",
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 3050",
14
- "deploy": "npm version patch && npm publish",
15
- "start": "next start -p 3015",
16
- "build": "concurrently --kill-others-on-fail \"tsc -w\" \"tsc-alias -w --resolve-full-paths\" \"npm run build:CSS\" \"npm run fonts\"",
17
- "build:CSS": "npm run minify-css && node combine-css.ts && cpx \"src/**/*.css\" dist --watch",
18
- "minify-css": "postcss src/**/*.css --use cssnano -d dist --no-map",
19
- "fonts": "tsc-alias -p tsconfig.json && mkdir dist\\fonts && for /r src %i in (*.otf, *.ttf) do copy \"%i\" dist\\fonts\\"
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": "^20.12.12",
38
- "@types/react": "^18.2.0",
39
- "@types/react-date-range": "^1.4.9",
40
- "@types/react-datepicker": "^6.2.0",
41
- "@types/react-dom": "^18.2.0",
42
- "@types/styled-components": "^5.1.34",
43
- "concurrently": "^8.2.2",
44
- "copyfiles": "^2.4.1",
45
- "cpx": "^1.5.0",
46
- "cssnano": "^7.0.1",
47
- "postcss-cli": "^11.0.0",
48
- "tsc-alias": "^1.8.10",
49
- "tslib": "^2.6.2"
50
- },
51
- "dependencies": {
52
- "@ckeditor/ckeditor5-react": "^7.0.0",
53
- "@types/react-slick": "^0.23.13",
54
- "axios": "^1.7.2",
55
- "chroma-js": "^2.4.2",
56
- "ckeditor5-custom-build": "^0.0.6",
57
- "date-fns": "^3.6.0",
58
- "formik": "^2.4.6",
59
- "framer-motion": "^11.2.6",
60
- "fs": "0.0.1-security",
61
- "fs-extra": "^11.2.0",
62
- "inversify": "^6.0.2",
63
- "moment": "^2.30.1",
64
- "next": "^14.2.3",
65
- "postcss": "^8.4.38",
66
- "react": "^18.2.0",
67
- "react-currency-input-field": "^3.8.0",
68
- "react-date-range": "^2.0.1",
69
- "react-datepicker": "^6.9.0",
70
- "react-dom": "^18.2.0",
71
- "react-error-boundary": "^4.0.13",
72
- "react-ga": "^3.3.1",
73
- "react-select": "^5.8.0",
74
- "react-share": "^5.1.0",
75
- "react-slick": "^0.30.2",
76
- "react-tooltip": "^5.26.4",
77
- "reflect-metadata": "^0.2.2",
78
- "sharp": "^0.33.4",
79
- "styled-components": "^6.1.11",
80
- "swr": "^2.2.5",
81
- "typescript": "^5.4.5",
82
- "yup": "^1.4.0"
83
- }
84
- }
1
+ {
2
+ "name": "infinity-forge",
3
+ "version": "0.49.8",
4
+ "description": "codie Library",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.js",
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 3050",
14
+ "deploy": "npm version patch && npm publish",
15
+ "start": "next start -p 3015",
16
+ "build": "concurrently --kill-others-on-fail \"tsc -w\" \"tsc-alias -w --resolve-full-paths\" \"npm run build:CSS\" \"npm run fonts\"",
17
+ "build:CSS": "npm run minify-css && node combine-css.ts && cpx \"src/**/*.css\" dist --watch",
18
+ "minify-css": "postcss src/**/*.css --use cssnano -d dist --no-map",
19
+ "fonts": "tsc-alias -p tsconfig.json && mkdir dist\\fonts && for /r src %i in (*.otf, *.ttf) do copy \"%i\" dist\\fonts\\"
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": "^20.12.12",
38
+ "@types/react": "^18.2.0",
39
+ "@types/react-date-range": "^1.4.9",
40
+ "@types/react-datepicker": "^6.2.0",
41
+ "@types/react-dom": "^18.2.0",
42
+ "@types/styled-components": "^5.1.34",
43
+ "concurrently": "^8.2.2",
44
+ "copyfiles": "^2.4.1",
45
+ "cpx": "^1.5.0",
46
+ "cssnano": "^7.0.1",
47
+ "postcss-cli": "^11.0.0",
48
+ "tsc-alias": "^1.8.10",
49
+ "tslib": "^2.6.2"
50
+ },
51
+ "dependencies": {
52
+ "@ckeditor/ckeditor5-react": "^7.0.0",
53
+ "@types/react-slick": "^0.23.13",
54
+ "axios": "^1.7.2",
55
+ "chroma-js": "^2.4.2",
56
+ "ckeditor5-custom-build": "^0.0.6",
57
+ "date-fns": "^3.6.0",
58
+ "exenv": "^1.2.2",
59
+ "formik": "^2.4.6",
60
+ "framer-motion": "^11.2.6",
61
+ "fs": "0.0.1-security",
62
+ "fs-extra": "^11.2.0",
63
+ "inversify": "^6.0.2",
64
+ "moment": "^2.30.1",
65
+ "next": "^14.2.3",
66
+ "postcss": "^8.4.38",
67
+ "prop-types": "^15.8.1",
68
+ "react": "^18.2.0",
69
+ "react-currency-input-field": "^3.8.0",
70
+ "react-date-range": "^2.0.1",
71
+ "react-datepicker": "^6.9.0",
72
+ "react-dom": "^18.2.0",
73
+ "react-error-boundary": "^4.0.13",
74
+ "react-ga": "^3.3.1",
75
+ "react-lifecycles-compat": "^3.0.4",
76
+ "react-select": "^5.8.0",
77
+ "react-share": "^5.1.0",
78
+ "react-slick": "^0.30.2",
79
+ "react-tooltip": "^5.26.4",
80
+ "reflect-metadata": "^0.2.2",
81
+ "sharp": "^0.33.4",
82
+ "styled-components": "^6.1.11",
83
+ "swr": "^2.2.5",
84
+ "typescript": "^5.4.5",
85
+ "yup": "^1.4.0"
86
+ }
87
+ }