infinity-forge 0.51.3 → 0.51.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.
@@ -35,7 +35,7 @@ function InputControl(_a) {
35
35
  var icon = _a.icon, name = _a.name, label = _a.label, loading = _a.loading, children = _a.children;
36
36
  var errors = (0, formik_1.useFormikContext)().errors;
37
37
  var error = (0, formik_1.getIn)(errors, name);
38
- return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: "input-control-".concat(name), children: (0, jsx_runtime_1.jsxs)(S.InputControl, { "$loading": loading, "$error": !!error, className: 'input_control', "$inputIconSize": (icon === null || icon === void 0 ? void 0 : icon.size) || 20, "$inputIconDirection": (icon === null || icon === void 0 ? void 0 : icon.direction) || 'left', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'container-switch', children: [label && (0, jsx_runtime_1.jsx)(label_1.Label, { inputId: name, label: label }), (0, jsx_runtime_1.jsxs)("div", { className: 'input-content', children: [loading && (0, jsx_runtime_1.jsx)(loader_input_1.LoaderInput, {}), icon && ((0, jsx_runtime_1.jsx)("div", { className: 'input-icon', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: icon.name, fill: icon.color }) })), (0, jsx_runtime_1.jsx)("div", { className: 'input-wrapper', children: children })] })] }), error && (0, jsx_runtime_1.jsx)(error_1.ErrorMessage, { error: error })] }) }));
38
+ return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: "input-control-".concat(name), children: (0, jsx_runtime_1.jsxs)(S.InputControl, { "$loading": loading, "$error": !!error, className: 'input_control', "$inputIconSize": (icon === null || icon === void 0 ? void 0 : icon.size) || 20, "$inputIconDirection": (icon === null || icon === void 0 ? void 0 : icon.direction) || 'left', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'container-switch', children: [label && (0, jsx_runtime_1.jsx)(label_1.Label, { inputId: name, label: label }), (0, jsx_runtime_1.jsxs)("div", { className: 'input-content', children: [loading && (0, jsx_runtime_1.jsx)(loader_input_1.LoaderInput, {}), icon.element ? ((0, jsx_runtime_1.jsx)("div", { className: 'input-icon', children: icon.element })) : ((0, jsx_runtime_1.jsx)("div", { className: 'input-icon', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: icon.name, fill: icon.color }) })), (0, jsx_runtime_1.jsx)("div", { className: 'input-wrapper', children: children })] })] }), error && (0, jsx_runtime_1.jsx)(error_1.ErrorMessage, { error: error })] }) }));
39
39
  }
40
40
  exports.InputControl = InputControl;
41
41
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/input-control/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAgD;AAEhD,2BAAkC;AAClC,iCAA+B;AAC/B,iCAAsC;AACtC,+CAA4C;AAI5C,0CAA6B;AAE7B,SAAgB,YAAY,CAAC,EAAoD;QAAlD,IAAI,UAAA,EAAE,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,OAAO,aAAA,EAAE,QAAQ,cAAA;IACzD,IAAA,MAAM,GAAK,IAAA,yBAAgB,GAAE,OAAvB,CAAuB;IAErC,IAAM,KAAK,GAAG,IAAA,cAAK,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAEjC,OAAO,CACL,uBAAC,UAAK,IAAC,IAAI,EAAE,wBAAiB,IAAI,CAAE,YAClC,wBAAC,CAAC,CAAC,YAAY,gBACH,OAAO,YACT,CAAC,CAAC,KAAK,EACf,SAAS,EAAC,eAAe,oBACT,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,KAAI,EAAE,yBACX,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,KAAI,MAAM,aAE9C,iCAAK,SAAS,EAAC,kBAAkB,aAC9B,KAAK,IAAI,uBAAC,aAAK,IAAC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,EAEhD,iCAAK,SAAS,EAAC,eAAe,aAC3B,OAAO,IAAI,uBAAC,0BAAW,KAAG,EAC1B,IAAI,IAAI,CACP,gCAAK,SAAS,EAAC,YAAY,YACzB,uBAAC,SAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,GAAI,GACvC,CACP,EAED,gCAAK,SAAS,EAAC,eAAe,YAAE,QAAQ,GAAO,IAC3C,IACF,EAEL,KAAK,IAAI,uBAAC,oBAAY,IAAC,KAAK,EAAE,KAAK,GAAI,IACzB,GACX,CACT,CAAA;AACH,CAAC;AAjCD,oCAiCC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/input-control/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAgD;AAEhD,2BAAkC;AAClC,iCAA+B;AAC/B,iCAAsC;AACtC,+CAA4C;AAI5C,0CAA6B;AAE7B,SAAgB,YAAY,CAAC,EAAoD;QAAlD,IAAI,UAAA,EAAE,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,OAAO,aAAA,EAAE,QAAQ,cAAA;IACzD,IAAA,MAAM,GAAK,IAAA,yBAAgB,GAAE,OAAvB,CAAuB;IAErC,IAAM,KAAK,GAAG,IAAA,cAAK,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAEjC,OAAO,CACL,uBAAC,UAAK,IAAC,IAAI,EAAE,wBAAiB,IAAI,CAAE,YAClC,wBAAC,CAAC,CAAC,YAAY,gBACH,OAAO,YACT,CAAC,CAAC,KAAK,EACf,SAAS,EAAC,eAAe,oBACT,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,KAAI,EAAE,yBACX,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,KAAI,MAAM,aAE9C,iCAAK,SAAS,EAAC,kBAAkB,aAC9B,KAAK,IAAI,uBAAC,aAAK,IAAC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,EAEhD,iCAAK,SAAS,EAAC,eAAe,aAC3B,OAAO,IAAI,uBAAC,0BAAW,KAAG,EAC1B,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CACd,gCAAK,SAAS,EAAC,YAAY,YAAE,IAAI,CAAC,OAAO,GAAO,CACjD,CAAC,CAAC,CAAC,CACF,gCAAK,SAAS,EAAC,YAAY,YACzB,uBAAC,SAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,GAAI,GACvC,CACP,EAED,gCAAK,SAAS,EAAC,eAAe,YAAE,QAAQ,GAAO,IAC3C,IACF,EAEL,KAAK,IAAI,uBAAC,oBAAY,IAAC,KAAK,EAAE,KAAK,GAAI,IACzB,GACX,CACT,CAAA;AACH,CAAC;AAnCD,oCAmCC"}
@@ -5,9 +5,10 @@ interface Props {
5
5
  label?: string;
6
6
  loading?: boolean;
7
7
  icon?: {
8
- name: IconsNames;
9
- size: number;
10
- color: string;
8
+ name?: IconsNames;
9
+ element?: React.ReactNode;
10
+ size?: number;
11
+ color?: string;
11
12
  direction?: 'left' | 'right';
12
13
  };
13
14
  iconDirection?: 'left' | 'right';
@@ -15,4 +15,3 @@ export * from './menu-mobile/index.js';
15
15
  export * from './loader-circle/index.js';
16
16
  export * from './error-boundary/index.js';
17
17
  export * from './loading-screen/index.js';
18
- export * from './menu-mobile-ecommerce/index.js';
@@ -31,5 +31,4 @@ __exportStar(require("./menu-mobile/index.js"), exports);
31
31
  __exportStar(require("./loader-circle/index.js"), exports);
32
32
  __exportStar(require("./error-boundary/index.js"), exports);
33
33
  __exportStar(require("./loading-screen/index.js"), exports);
34
- __exportStar(require("./menu-mobile-ecommerce/index.js"), exports);
35
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,0CAAuB;AACvB,2CAAwB;AACxB,4CAAyB;AACzB,4CAAyB;AACzB,6CAA0B;AAC1B,6CAA0B;AAC1B,8CAA2B;AAC3B,8CAA2B;AAC3B,8CAA2B;AAC3B,+CAA4B;AAC5B,+CAA4B;AAC5B,+CAA4B;AAC5B,gDAA6B;AAC7B,kDAA+B;AAC/B,mDAAgC;AAChC,mDAAgC;AAChC,0DAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,0CAAuB;AACvB,2CAAwB;AACxB,4CAAyB;AACzB,4CAAyB;AACzB,6CAA0B;AAC1B,6CAA0B;AAC1B,8CAA2B;AAC3B,8CAA2B;AAC3B,8CAA2B;AAC3B,+CAA4B;AAC5B,+CAA4B;AAC5B,+CAA4B;AAC5B,gDAA6B;AAC7B,kDAA+B;AAC/B,mDAAgC;AAChC,mDAAgC"}
package/package.json CHANGED
@@ -1,87 +1,87 @@
1
- {
2
- "name": "infinity-forge",
3
- "version": "0.51.3",
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
- }
1
+ {
2
+ "name": "infinity-forge",
3
+ "version": "0.51.4",
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
+ }
@@ -1,2 +0,0 @@
1
- import { IMenuMobileEcommerce } from './interfaces.js';
2
- export declare function MenuMobileEcommerce({ useAuth, useConfigEcommerce }: IMenuMobileEcommerce): import("react/jsx-runtime").JSX.Element;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MenuMobileEcommerce = void 0;
4
- var jsx_runtime_1 = require("react/jsx-runtime");
5
- var utils_1 = require("./utils/index.js");
6
- var menu_mobile_1 = require("../menu-mobile/index.js");
7
- function MenuMobileEcommerce(_a) {
8
- var useAuth = _a.useAuth, useConfigEcommerce = _a.useConfigEcommerce;
9
- var _b = useAuth(), user = _b.user, signOut = _b.signOut;
10
- var configs = useConfigEcommerce();
11
- var MENU_LINKS = [
12
- {
13
- id: 1,
14
- titulo: 'Mapa do site',
15
- links: [
16
- { id: 1, titulo: 'Início', url: '/' },
17
- // { id: 2, titulo: "Produtos", url: "/produtos" },
18
- {
19
- id: 3,
20
- titulo: 'Categorias',
21
- links: (0, utils_1.generateLinksCategories)(configs === null || configs === void 0 ? void 0 : configs.categories),
22
- },
23
- ],
24
- },
25
- ];
26
- var TOP_CONFIGS = {
27
- loginURL: '/login',
28
- topText: (user === null || user === void 0 ? void 0 : user.nome) || '',
29
- profileURL: '/perfil',
30
- orderdURL: '/perfil/minhas-ordens/',
31
- exitFunction: function () { return signOut(''); },
32
- registerURL: '/criar-conta',
33
- };
34
- return (0, jsx_runtime_1.jsx)(menu_mobile_1.MenuMobile, { linksMenu: MENU_LINKS, topConfigs: TOP_CONFIGS });
35
- }
36
- exports.MenuMobileEcommerce = MenuMobileEcommerce;
37
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/components/menu-mobile-ecommerce/index.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiD;AAEjD,8CAA2C;AAK3C,SAAgB,mBAAmB,CAAC,EAAqD;QAAnD,OAAO,aAAA,EAAE,kBAAkB,wBAAA;IACzD,IAAA,KAAoB,OAAO,EAAE,EAA3B,IAAI,UAAA,EAAE,OAAO,aAAc,CAAA;IACnC,IAAM,OAAO,GAA6B,kBAAkB,EAAE,CAAA;IAE9D,IAAM,UAAU,GAAwB;QACtC;YACE,EAAE,EAAE,CAAC;YACL,MAAM,EAAE,cAAc;YACtB,KAAK,EAAE;gBACL,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE;gBACrC,mDAAmD;gBACnD;oBACE,EAAE,EAAE,CAAC;oBACL,MAAM,EAAE,YAAY;oBACpB,KAAK,EAAE,IAAA,+BAAuB,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,CAAC;iBACpD;aACF;SACF;KACF,CAAA;IAED,IAAM,WAAW,GAAe;QAC9B,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,KAAI,EAAE;QACzB,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,wBAAwB;QACnC,YAAY,EAAE,cAAM,OAAA,OAAO,CAAC,EAAE,CAAC,EAAX,CAAW;QAC/B,WAAW,EAAE,cAAc;KAC5B,CAAA;IAED,OAAO,uBAAC,wBAAU,IAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,GAAI,CAAA;AACvE,CAAC;AA9BD,kDA8BC"}
@@ -1,41 +0,0 @@
1
- export interface IEcommerceSubCategoryItem {
2
- id: number;
3
- titulo: string;
4
- url: string;
5
- isDestaque: boolean;
6
- items: IEcommerceSubCategoryItem[];
7
- imagens: [
8
- {
9
- id: number;
10
- link?: string;
11
- targetBlank?: boolean;
12
- fileData: string;
13
- }
14
- ];
15
- }
16
- export interface IConfigsEcommerceContext {
17
- categories: IEcommerceSubCategoryItem[];
18
- configsEcommerce: IEcommerceSubCategoryItem | undefined;
19
- }
20
- export interface IUser {
21
- birthday: string;
22
- email: string;
23
- gender: string;
24
- name: string;
25
- nome: string;
26
- surname: string;
27
- phone: string;
28
- token: string;
29
- }
30
- export interface ISignInData {
31
- email: string;
32
- password: string;
33
- }
34
- export interface IMenuMobileEcommerce {
35
- useAuth: () => {
36
- user: IUser | null;
37
- signIn(data: ISignInData): Promise<void>;
38
- signOut(location: string): void;
39
- };
40
- useConfigEcommerce: () => IConfigsEcommerceContext;
41
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=interfaces.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/ui/components/menu-mobile-ecommerce/interfaces.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import { IEcommerceSubCategoryItem } from '../interfaces.js';
2
- export declare function generateLinksCategories(categories?: IEcommerceSubCategoryItem[]): any;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateLinksCategories = void 0;
4
- function generateLinksCategories(categories) {
5
- return categories === null || categories === void 0 ? void 0 : categories.map(function (category) {
6
- var links = category.items && category.items.length > 0 ? generateLinksCategories(category.items) : undefined;
7
- if (!category.url && links) {
8
- return links;
9
- }
10
- return {
11
- id: category.id,
12
- titulo: category.titulo,
13
- url: category.url ? "/".concat(category.url) : undefined,
14
- links: links,
15
- };
16
- }).flat();
17
- }
18
- exports.generateLinksCategories = generateLinksCategories;
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/components/menu-mobile-ecommerce/utils/index.ts"],"names":[],"mappings":";;;AAEA,SAAgB,uBAAuB,CAAC,UAAwC;IAC9E,OAAO,UAAU,aAAV,UAAU,uBAAV,UAAU,CACb,GAAG,CAAC,UAAC,QAAQ;QACb,IAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;QAE/G,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,KAAK,EAAE,CAAC;YAC3B,OAAO,KAAK,CAAA;QACd,CAAC;QAED,OAAO;YACL,EAAE,EAAE,QAAQ,CAAC,EAAE;YACf,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,GAAG,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,WAAI,QAAQ,CAAC,GAAG,CAAE,CAAC,CAAC,CAAC,SAAS;YAClD,KAAK,OAAA;SACN,CAAA;IACH,CAAC,EACA,IAAI,EAAE,CAAA;AACX,CAAC;AAjBD,0DAiBC"}