infinity-forge 11.1.1 → 11.1.2

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.
@@ -1,60 +1,11 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
2
  Object.defineProperty(exports, "__esModule", { value: true });
39
3
  exports.NaoRemoverDaHomeUsadaParaTesteTestarAquiDentro = NaoRemoverDaHomeUsadaParaTesteTestarAquiDentro;
40
4
  var jsx_runtime_1 = require("react/jsx-runtime");
41
5
  var system_1 = require("../system/index.js");
42
6
  var ui_1 = require("../ui/index.js");
43
7
  function NaoRemoverDaHomeUsadaParaTesteTestarAquiDentro() {
44
- var _this = this;
45
8
  var loadUser = (0, system_1.useAuthAdmin)().loadUser;
46
- return ((0, jsx_runtime_1.jsx)(system_1.PrivatePage, { children: (0, jsx_runtime_1.jsx)("button", { type: 'button', onClick: function () { return __awaiter(_this, void 0, void 0, function () {
47
- return __generator(this, function (_a) {
48
- switch (_a.label) {
49
- case 0: return [4 /*yield*/, (0, ui_1.api)({
50
- url: 'Users/me',
51
- method: 'get',
52
- })];
53
- case 1:
54
- _a.sent();
55
- return [2 /*return*/];
56
- }
57
- });
58
- }); }, children: "AA" }) }));
9
+ return ((0, jsx_runtime_1.jsx)(ui_1.FormHandler, { children: (0, jsx_runtime_1.jsx)(ui_1.InputWeekAvailability, { name: 'weekAvailability' }) }));
59
10
  }
60
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/test/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wGAiBC;;AArBD,mCAAoD;AACpD,2BAAmD;AAGnD,SAAgB,8CAA8C;IAA9D,iBAiBC;IAhBS,IAAA,QAAQ,GAAK,IAAA,qBAAY,GAAE,SAAnB,CAAmB;IAEnC,OAAO,CACL,uBAAC,oBAAW,cACV,mCACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE;;;gCACH,qBAAM,IAAA,QAAG,EAAC;gCACR,GAAG,EAAE,UAAU;gCACf,MAAM,EAAE,KAAK;6BACd,CAAC,EAAA;;4BAHF,SAGE,CAAA;;;;iBAEP,mBACS,GACA,CACf,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/test/index.tsx"],"names":[],"mappings":";;AAGA,wGAQC;;AAXD,mCAAoD;AACpD,2BAA0E;AAE1E,SAAgB,8CAA8C;IACpD,IAAA,QAAQ,GAAK,IAAA,qBAAY,GAAE,SAAnB,CAAmB;IAEnC,OAAO,CACL,uBAAC,gBAAW,cACV,uBAAC,0BAAqB,IAAC,IAAI,EAAC,kBAAkB,GAAG,GACrC,CACf,CAAA;AACH,CAAC"}
@@ -1,2 +1,2 @@
1
1
  export * from './input.js';
2
- export * from "./availability-preview/index.js";
2
+ export * from './availability-preview/index.js';
@@ -50,10 +50,13 @@ var react_1 = require("react");
50
50
  var ui_1 = require("../../../../ui/index.js");
51
51
  var mock_1 = require("./mock.js");
52
52
  var formik_1 = require("formik");
53
+ var use_window_1 = require("../../../../ui/hooks/use-window.js");
53
54
  var S = __importStar(require("./styles.js"));
54
55
  function InputWeekAvailability(_a) {
55
56
  var name = _a.name, label = _a.label, readOnly = _a.readOnly;
56
57
  var _b = (0, formik_1.useFormikContext)(), values = _b.values, setFieldValue = _b.setFieldValue;
58
+ var windowObj = (0, use_window_1.useWindow)();
59
+ var isMobile = windowObj && windowObj.innerWidth <= 768;
57
60
  var initialValue = mock_1.days.reduce(function (reducer, day) {
58
61
  var _a;
59
62
  return __assign(__assign({}, reducer), (_a = {}, _a[day.value] = mock_1.periods.reduce(function (reducerPeriod, period) {
@@ -67,16 +70,32 @@ function InputWeekAvailability(_a) {
67
70
  setFieldValue(nameInput, initialValue);
68
71
  }
69
72
  }, []);
70
- return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'InputWeekAvailability', children: (0, jsx_runtime_1.jsxs)(S.InputWeekAvailability, { className: 'input_week_availability', children: [label && (0, jsx_runtime_1.jsx)("label", { className: 'font-18-bold', children: label }), (0, jsx_runtime_1.jsxs)("table", { className: 'tabela-disponibilidade', children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", {}), mock_1.days.map(function (day, i) { return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("th", {}), (0, jsx_runtime_1.jsx)("th", { className: 'dia font-14', children: (0, jsx_runtime_1.jsx)("span", { children: day.label }) }, i)] })); })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: mock_1.periods.map(function (period) { return ((0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { className: 'periodo font-14', children: period.label }), mock_1.days.map(function (day) {
71
- var key = "".concat(nameInput, ".").concat(day.value, ".").concat(period.value, ".active");
72
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("td", {}), (0, jsx_runtime_1.jsx)("td", { className: 'celula', children: (0, jsx_runtime_1.jsx)(ui_1.InputSwitch, { name: key, readOnly: readOnly, design: 'checkbox', inputSwitchCheckbox: {
73
- valueIsFalse: {
74
- Icon: function () { return ((0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)("svg", { className: 'icon-close', xmlns: 'http://www.w3.org/2000/svg', width: '20', height: '21', viewBox: '0 0 20 21', fill: 'none', children: (0, jsx_runtime_1.jsx)("path", { d: 'M9.99959 9.32208L14.1244 5.19727L15.3029 6.37577L11.1781 10.5006L15.3029 14.6253L14.1244 15.8038L9.99959 11.6791L5.87481 15.8038L4.69629 14.6253L8.82109 10.5006L4.69629 6.37577L5.87481 5.19727L9.99959 9.32208Z', fill: '#DCDCDC' }) }) })); },
75
- },
76
- valueIsTrue: {
77
- Icon: function () { return ((0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)("svg", { className: 'icon-check', xmlns: 'http://www.w3.org/2000/svg', width: '20', height: '21', viewBox: '0 0 20 21', fill: 'none', children: (0, jsx_runtime_1.jsx)("path", { d: 'M8.33308 13.1424L15.9934 5.48206L17.1719 6.66056L8.33308 15.4994L3.02979 10.1961L4.2083 9.01762L8.33308 13.1424Z', fill: '#50C0BB' }) }) })); },
78
- },
79
- } }) }, key)] }));
80
- })] }, period.value)); }) })] })] }) }));
73
+ function renderDesktopLayout() {
74
+ return ((0, jsx_runtime_1.jsxs)("table", { className: 'tabela-disponibilidade', children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", {}), mock_1.days.map(function (day, i) { return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("th", { className: 'dia font-14', children: (0, jsx_runtime_1.jsx)("span", { className: 'font-14-regular', children: day.label }) }, i) })); })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: mock_1.periods.map(function (period) { return ((0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { className: 'periodo font-14', children: period.label }), mock_1.days.map(function (day) {
75
+ var key = "".concat(nameInput, ".").concat(day.value, ".").concat(period.value, ".active");
76
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("td", { className: 'celula', children: (0, jsx_runtime_1.jsx)(ui_1.InputSwitch, { name: key, readOnly: readOnly, design: 'checkbox', inputSwitchCheckbox: {
77
+ valueIsFalse: {
78
+ Icon: function () { return ((0, jsx_runtime_1.jsx)("svg", { className: 'icon-close', xmlns: 'http://www.w3.org/2000/svg', width: '20', height: '21', viewBox: '0 0 20 21', fill: 'none', children: (0, jsx_runtime_1.jsx)("path", { d: 'M9.99959 9.32208L14.1244 5.19727L15.3029 6.37577L11.1781 10.5006L15.3029 14.6253L14.1244 15.8038L9.99959 11.6791L5.87481 15.8038L4.69629 14.6253L8.82109 10.5006L4.69629 6.37577L5.87481 5.19727L9.99959 9.32208Z', fill: '#DCDCDC' }) })); },
79
+ },
80
+ valueIsTrue: {
81
+ Icon: function () { return ((0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'Checked', color: '#50C0BB' }) })); },
82
+ },
83
+ } }) }, key) }));
84
+ })] }, period.value)); }) })] }));
85
+ }
86
+ function renderMobileLayout() {
87
+ return ((0, jsx_runtime_1.jsx)("div", { className: 'week-availability-mobile', children: mock_1.days.map(function (day) { return ((0, jsx_runtime_1.jsxs)("div", { className: 'day-card', children: [(0, jsx_runtime_1.jsx)("div", { className: 'day-title', children: day.label }), (0, jsx_runtime_1.jsx)("div", { className: 'periods', children: mock_1.periods.map(function (period) {
88
+ var key = "".concat(nameInput, ".").concat(day.value, ".").concat(period.value, ".active");
89
+ return ((0, jsx_runtime_1.jsxs)("div", { className: 'period-row', children: [(0, jsx_runtime_1.jsx)("span", { className: 'period-label', children: period.label }), (0, jsx_runtime_1.jsx)(ui_1.InputSwitch, { name: key, readOnly: readOnly, design: 'checkbox', inputSwitchCheckbox: {
90
+ valueIsFalse: {
91
+ Icon: function () { return ((0, jsx_runtime_1.jsx)("svg", { className: 'icon-close', xmlns: 'http://www.w3.org/2000/svg', width: '20', height: '21', viewBox: '0 0 20 21', fill: 'none', children: (0, jsx_runtime_1.jsx)("path", { d: 'M9.99959 9.32208L14.1244 5.19727L15.3029 6.37577L11.1781 10.5006L15.3029 14.6253L14.1244 15.8038L9.99959 11.6791L5.87481 15.8038L4.69629 14.6253L8.82109 10.5006L4.69629 6.37577L5.87481 5.19727L9.99959 9.32208Z', fill: '#DCDCDC' }) })); },
92
+ },
93
+ valueIsTrue: {
94
+ Icon: function () { return (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'Checked', color: '#50C0BB' }); },
95
+ },
96
+ } })] }, period.value));
97
+ }) })] }, day.value)); }) }));
98
+ }
99
+ return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'InputWeekAvailability', children: (0, jsx_runtime_1.jsxs)(S.InputWeekAvailability, { className: 'input_week_availability', children: [label && (0, jsx_runtime_1.jsx)("label", { className: 'font-18-bold', children: label }), isMobile ? renderMobileLayout() : renderDesktopLayout()] }) }));
81
100
  }
82
101
  //# sourceMappingURL=input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/input-week-availability/input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,sDA0GC;;AA9HD,+BAAiC;AAEjC,2BAAqD;AAErD,+BAAsC;AACtC,iCAAyC;AAEzC,0CAA6B;AAa7B,SAAgB,qBAAqB,CAAC,EAAqC;QAAnC,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,QAAQ,cAAA;IACrD,IAAA,KAA4B,IAAA,yBAAgB,GAAE,EAA5C,MAAM,YAAA,EAAE,aAAa,mBAAuB,CAAA;IAEpD,IAAM,YAAY,GAA2B,WAAI,CAAC,MAAM,CAAC,UAAC,OAAO,EAAE,GAAG;;QACpE,6BACK,OAAO,gBACT,GAAG,CAAC,KAAK,IAAG,cAAO,CAAC,MAAM,CACzB,UAAC,aAAa,EAAE,MAAM;;YAAK,OAAA,uBAAM,aAAa,gBAAG,MAAM,CAAC,KAAK,IAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAG;QAAzD,CAAyD,EACpF,EAAE,CACH,OACF;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,IAAM,SAAS,GAAG,IAAI,IAAI,kBAAkB,CAAA;IAE5C,IAAA,iBAAS,EAAC;QACR,IAAI,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X,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,YAEX,iCACE,CAAC,EAAC,mNAAmN,EACrN,IAAI,EAAC,SAAS,GACd,GACE,GACD,CACR,EAhBW,CAgBX;6DACF;4DACD,WAAW,EAAE;gEACX,IAAI,EAAE,cAAM,OAAA,CACV,2CACE,gCACE,SAAS,EAAC,YAAY,EACtB,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,YAEX,iCACE,CAAC,EAAC,kHAAkH,EACpH,IAAI,EAAC,SAAS,GACd,GACE,GACD,CACR,EAhBW,CAgBX;6DACF;yDACF,GACD,IA7CK,GAAG,CA8CP,IACJ,CACJ,CAAA;oCACH,CAAC,CAAC,KAzDK,MAAM,CAAC,KAAK,CA0DhB,CACN,EA5DwB,CA4DxB,CAAC,GACI,IACF,IACgB,GACpB,CACT,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/input-week-availability/input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,sDAmJC;;AAxKD,+BAAiC;AAEjC,2BAA2D;AAE3D,+BAAsC;AACtC,iCAAyC;AACzC,oDAAiD;AAEjD,0CAA6B;AAa7B,SAAgB,qBAAqB,CAAC,EAAqC;QAAnC,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,QAAQ,cAAA;IACrD,IAAA,KAA4B,IAAA,yBAAgB,GAAE,EAA5C,MAAM,YAAA,EAAE,aAAa,mBAAuB,CAAA;IACpD,IAAM,SAAS,GAAG,IAAA,sBAAS,GAAE,CAAA;IAC7B,IAAM,QAAQ,GAAG,SAAS,IAAI,SAAS,CAAC,UAAU,IAAI,GAAG,CAAA;IAEzD,IAAM,YAAY,GAA2B,WAAI,CAAC,MAAM,CAAC,UAAC,OAAO,EAAE,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UAAU,EACjB,mBAAmB,EAAE;4CACnB,YAAY,EAAE;gDACZ,IAAI,EAAE,cAAM,OAAA,CACV,gCACE,SAAS,EAAC,YAAY,EACtB,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,YAEX,iCACE,CAAC,EAAC,mNAAmN,EACrN,IAAI,EAAC,SAAS,GACd,GACE,CACP,EAdW,CAcX;6CACF;4CACD,WAAW,EAAE;gDACX,IAAI,EAAE,cAAM,OAAA,uBAAC,SAAI,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,SAAS,GAAG,EAAvC,CAAuC;6CACpD;yCACF,GACD,KA5B6B,MAAM,CAAC,KAAK,CA6BvC,CACP,CAAA;wBACH,CAAC,CAAC,GACE,KAtCuB,GAAG,CAAC,KAAK,CAuClC,CACP,EAzCkB,CAyClB,CAAC,GACE,CACP,CAAA;IACH,CAAC;IAED,OAAO,CACL,uBAAC,UAAK,IAAC,IAAI,EAAC,uBAAuB,YACjC,wBAAC,CAAC,CAAC,qBAAqB,IAAC,SAAS,EAAC,yBAAyB,aACzD,KAAK,IAAI,kCAAO,SAAS,EAAC,cAAc,YAAE,KAAK,GAAS,EACxD,QAAQ,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,mBAAmB,EAAE,IAChC,GACpB,CACT,CAAA;AACH,CAAC"}
@@ -3,46 +3,46 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.periods = exports.days = void 0;
4
4
  exports.days = [
5
5
  {
6
- label: "S",
7
- value: "segunda",
6
+ label: 'Seg',
7
+ value: 'segunda',
8
8
  },
9
9
  {
10
- label: "T",
11
- value: "terca",
10
+ label: 'Ter',
11
+ value: 'terca',
12
12
  },
13
13
  {
14
- label: "Q",
15
- value: "quarta",
14
+ label: 'Qua',
15
+ value: 'quarta',
16
16
  },
17
17
  {
18
- label: "Q",
19
- value: "quinta",
18
+ label: 'Qui',
19
+ value: 'quinta',
20
20
  },
21
21
  {
22
- label: "S",
23
- value: "sexta",
22
+ label: 'Sex',
23
+ value: 'sexta',
24
24
  },
25
25
  {
26
- label: "S",
27
- value: "sabado",
26
+ label: 'Sab',
27
+ value: 'sabado',
28
28
  },
29
29
  {
30
- label: "D",
31
- value: "domingo",
30
+ label: 'Dom',
31
+ value: 'domingo',
32
32
  },
33
33
  ];
34
34
  exports.periods = [
35
35
  {
36
- label: "Manhã",
37
- value: "manha",
36
+ label: 'Manhã',
37
+ value: 'manha',
38
38
  },
39
39
  {
40
- label: "Tarde",
41
- value: "tarde",
40
+ label: 'Tarde',
41
+ value: 'tarde',
42
42
  },
43
43
  {
44
- label: "Noite",
45
- value: "noite",
44
+ label: 'Noite',
45
+ value: 'noite',
46
46
  },
47
47
  ];
48
48
  //# sourceMappingURL=mock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mock.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/input-week-availability/mock.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG;IAClB;QACE,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,SAAS;KACjB;IACD;QACE,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,OAAO;KACf;IACD;QACE,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,QAAQ;KAChB;IACD;QACE,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,QAAQ;KAChB;IACD;QACE,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,OAAO;KACf;IACD;QACE,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,QAAQ;KAChB;IACD;QACE,KAAK,EAAE,GAAG;QACV,KAAK,EAAE,SAAS;KACjB;CACF,CAAC;AAEW,QAAA,OAAO,GAAG;IACrB;QACE,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,OAAO;KACf;IACD;QACE,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,OAAO;KACf;IACD;QACE,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,OAAO;KACf;CACF,CAAC"}
1
+ {"version":3,"file":"mock.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/input-week-availability/mock.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG;IAClB;QACE,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,SAAS;KACjB;IACD;QACE,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,OAAO;KACf;IACD;QACE,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,QAAQ;KAChB;IACD;QACE,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,QAAQ;KAChB;IACD;QACE,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,OAAO;KACf;IACD;QACE,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,QAAQ;KAChB;IACD;QACE,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,SAAS;KACjB;CACF,CAAA;AAEY,QAAA,OAAO,GAAG;IACrB;QACE,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,OAAO;KACf;IACD;QACE,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,OAAO;KACf;IACD;QACE,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,OAAO;KACf;CACF,CAAA"}
@@ -9,6 +9,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.InputWeekAvailability = void 0;
11
11
  var styled_components_1 = __importDefault(require("styled-components"));
12
- exports.InputWeekAvailability = (0, styled_components_1.default)('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n > label {\n margin-bottom: clamp(10px, 1vw, 15px);\n }\n\n th {\n text-align: center;\n }\n\n thead {\n background-color: transparent !important;\n\n th:not(:first-child) {\n padding: 1px 5px 5px;\n border-radius: 5px 5px 0 0;\n }\n }\n\n tr:not(:last-child) {\n td,\n th {\n padding: 1px 5px 5px;\n }\n }\n\n tr:last-child td {\n border-radius: 0 0 5px 5px;\n padding: 1px 5px;\n }\n\n th,\n td {\n &:not(:first-child):not(:empty) {\n background-color: #f2f2f2;\n }\n\n &:empty {\n padding: 1px 3px !important;\n }\n\n &:first-child {\n padding-right: 15px !important;\n }\n }\n\n td > div {\n height: 100%;\n margin: auto;\n }\n\n table label {\n width: 20px !important;\n height: 20px !important;\n border: none !important;\n background: transparent !important;\n margin-bottom: 0 !important;\n cursor: pointer;\n\n svg {\n width: 100% !important;\n height: 100% !important;\n }\n }\n\n .input_control {\n margin-bottom: 2px !important;\n }\n\n .input-wrapper {\n display: flex;\n align-items: center;\n }\n\n @media only screen and (max-width: 1600px) {\n thead th:not(:first-child),\n tr:not(:last-child) td,\n tr:not(:last-child) th,\n tr:last-child td {\n padding: 1px 4px 4px;\n }\n\n th,\n td {\n &:empty {\n padding: 1px 2px !important;\n }\n\n &:first-child {\n padding-right: 10px !important;\n }\n }\n\n tr:last-child td {\n padding-bottom: 1px !important;\n }\n\n table label {\n width: 18px !important;\n height: 18px !important;\n }\n }\n\n @media only screen and (max-width: 1024px) {\n > label {\n width: 100%;\n text-align: center;\n max-width: 242px;\n margin-bottom: 10px;\n }\n\n table label {\n width: 16px !important;\n height: 16px !important;\n }\n\n th,\n td {\n font-size: 12px;\n\n &:first-child {\n padding-right: 5px !important;\n }\n }\n }\n"], ["\n > label {\n margin-bottom: clamp(10px, 1vw, 15px);\n }\n\n th {\n text-align: center;\n }\n\n thead {\n background-color: transparent !important;\n\n th:not(:first-child) {\n padding: 1px 5px 5px;\n border-radius: 5px 5px 0 0;\n }\n }\n\n tr:not(:last-child) {\n td,\n th {\n padding: 1px 5px 5px;\n }\n }\n\n tr:last-child td {\n border-radius: 0 0 5px 5px;\n padding: 1px 5px;\n }\n\n th,\n td {\n &:not(:first-child):not(:empty) {\n background-color: #f2f2f2;\n }\n\n &:empty {\n padding: 1px 3px !important;\n }\n\n &:first-child {\n padding-right: 15px !important;\n }\n }\n\n td > div {\n height: 100%;\n margin: auto;\n }\n\n table label {\n width: 20px !important;\n height: 20px !important;\n border: none !important;\n background: transparent !important;\n margin-bottom: 0 !important;\n cursor: pointer;\n\n svg {\n width: 100% !important;\n height: 100% !important;\n }\n }\n\n .input_control {\n margin-bottom: 2px !important;\n }\n\n .input-wrapper {\n display: flex;\n align-items: center;\n }\n\n @media only screen and (max-width: 1600px) {\n thead th:not(:first-child),\n tr:not(:last-child) td,\n tr:not(:last-child) th,\n tr:last-child td {\n padding: 1px 4px 4px;\n }\n\n th,\n td {\n &:empty {\n padding: 1px 2px !important;\n }\n\n &:first-child {\n padding-right: 10px !important;\n }\n }\n\n tr:last-child td {\n padding-bottom: 1px !important;\n }\n\n table label {\n width: 18px !important;\n height: 18px !important;\n }\n }\n\n @media only screen and (max-width: 1024px) {\n > label {\n width: 100%;\n text-align: center;\n max-width: 242px;\n margin-bottom: 10px;\n }\n\n table label {\n width: 16px !important;\n height: 16px !important;\n }\n\n th,\n td {\n font-size: 12px;\n\n &:first-child {\n padding-right: 5px !important;\n }\n }\n }\n"])));
12
+ exports.InputWeekAvailability = (0, styled_components_1.default)('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n > label {\n margin-bottom: clamp(10px, 1vw, 15px);\n }\n\n th {\n text-align: center;\n }\n\n thead {\n background-color: transparent !important;\n\n th:not(:first-child) {\n padding: 1px 5px 5px;\n border-radius: 5px 5px 0 0;\n }\n }\n\n tr:not(:last-child) {\n td,\n th {\n padding: 1px 5px 5px;\n }\n }\n\n tr:last-child td {\n border-radius: 0 0 5px 5px;\n padding: 1px 5px;\n }\n\n th,\n td {\n &:not(:first-child):not(:empty) {\n background-color: #f2f2f2;\n }\n\n &:empty {\n padding: 1px 3px !important;\n }\n\n &:first-child {\n padding-right: 15px !important;\n }\n }\n\n td > div {\n height: 100%;\n margin: auto;\n }\n\n table label {\n width: 20px !important;\n height: 20px !important;\n border: none !important;\n background: transparent !important;\n margin-bottom: 0 !important;\n cursor: pointer;\n\n svg {\n width: 100% !important;\n height: 100% !important;\n }\n }\n\n .input_control {\n margin-bottom: 2px !important;\n }\n\n .input-wrapper {\n display: flex;\n align-items: center;\n }\n\n @media only screen and (max-width: 1600px) {\n thead th:not(:first-child),\n tr:not(:last-child) td,\n tr:not(:last-child) th,\n tr:last-child td {\n padding: 1px 4px 4px;\n }\n\n th,\n td {\n &:empty {\n padding: 1px 2px !important;\n }\n\n &:first-child {\n padding-right: 10px !important;\n }\n }\n\n tr:last-child td {\n padding-bottom: 1px !important;\n }\n\n table label {\n width: 18px !important;\n height: 18px !important;\n }\n }\n\n @media only screen and (max-width: 1024px) {\n > label {\n width: 100%;\n text-align: center;\n max-width: 242px;\n margin-bottom: 10px;\n }\n\n table label {\n width: 16px !important;\n height: 16px !important;\n }\n\n th,\n td {\n font-size: 12px;\n\n &:first-child {\n padding-right: 5px !important;\n }\n }\n }\n\n .week-availability-mobile {\n display: none;\n }\n\n @media only screen and (max-width: 768px) {\n .tabela-disponibilidade {\n display: none !important;\n }\n .week-availability-mobile {\n display: flex;\n flex-direction: row;\n gap: 24px;\n width: 100%;\n align-items: flex-start;\n justify-content: center;\n }\n .day-card {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n padding: 24px 10px;\n border-radius: 10px;\n border: 1px solid #ccc;\n background: #fff;\n flex: 1 0 0;\n min-width: 80px;\n box-sizing: border-box;\n }\n .day-title {\n color: #1a1a1a;\n text-align: center;\n font-family: 'Poppins', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n margin-bottom: 0;\n }\n .periods {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n }\n .period-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 8px;\n }\n .period-label {\n display: block;\n color: #1a1a1a;\n font-family: 'Poppins', sans-serif;\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n text-align: left;\n }\n .day-card label {\n width: 24px !important;\n height: 24px !important;\n margin: 0 !important;\n background: transparent !important;\n box-shadow: none !important;\n }\n .day-card label[aria-checked='true'],\n .day-card label input:checked + span {\n background: transparent !important;\n box-shadow: none !important;\n }\n }\n\n @media only screen and (min-width: 769px) {\n .tabela-disponibilidade {\n border-collapse: separate;\n border-spacing: 24px 0;\n width: 100%;\n table-layout: fixed;\n }\n .tabela-disponibilidade th.dia {\n background: #fff;\n border: 1px solid #ccc;\n border-bottom: none;\n border-radius: 10px 10px 0 0;\n padding: 16px 0 8px 0;\n text-align: center;\n color: #1a1a1a;\n }\n .tabela-disponibilidade td.celula {\n background: #fff;\n border-left: 1px solid #ccc;\n border-right: 1px solid #ccc;\n text-align: center;\n padding: 1rem 0;\n }\n .tabela-disponibilidade tr:last-child td.celula {\n border-radius: 0 0 10px 10px;\n border-bottom: 1px solid #ccc;\n }\n .tabela-disponibilidade th,\n .tabela-disponibilidade td {\n vertical-align: middle;\n }\n .tabela-disponibilidade td.periodo {\n font-size: 14px;\n font-weight: 400;\n color: #1a1a1a;\n background: transparent;\n text-align: right;\n padding-right: 12px;\n min-width: 60px;\n }\n .tabela-disponibilidade label {\n width: 24px !important;\n height: 24px !important;\n margin: 0 auto !important;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .tabela-disponibilidade .icon-check,\n .tabela-disponibilidade .icon-close {\n width: 24px !important;\n height: 24px !important;\n }\n .tabela-disponibilidade th:not(.dia),\n .tabela-disponibilidade td:not(.celula):not(.periodo) {\n background: transparent !important;\n border: none !important;\n padding: 0 !important;\n }\n }\n"], ["\n > label {\n margin-bottom: clamp(10px, 1vw, 15px);\n }\n\n th {\n text-align: center;\n }\n\n thead {\n background-color: transparent !important;\n\n th:not(:first-child) {\n padding: 1px 5px 5px;\n border-radius: 5px 5px 0 0;\n }\n }\n\n tr:not(:last-child) {\n td,\n th {\n padding: 1px 5px 5px;\n }\n }\n\n tr:last-child td {\n border-radius: 0 0 5px 5px;\n padding: 1px 5px;\n }\n\n th,\n td {\n &:not(:first-child):not(:empty) {\n background-color: #f2f2f2;\n }\n\n &:empty {\n padding: 1px 3px !important;\n }\n\n &:first-child {\n padding-right: 15px !important;\n }\n }\n\n td > div {\n height: 100%;\n margin: auto;\n }\n\n table label {\n width: 20px !important;\n height: 20px !important;\n border: none !important;\n background: transparent !important;\n margin-bottom: 0 !important;\n cursor: pointer;\n\n svg {\n width: 100% !important;\n height: 100% !important;\n }\n }\n\n .input_control {\n margin-bottom: 2px !important;\n }\n\n .input-wrapper {\n display: flex;\n align-items: center;\n }\n\n @media only screen and (max-width: 1600px) {\n thead th:not(:first-child),\n tr:not(:last-child) td,\n tr:not(:last-child) th,\n tr:last-child td {\n padding: 1px 4px 4px;\n }\n\n th,\n td {\n &:empty {\n padding: 1px 2px !important;\n }\n\n &:first-child {\n padding-right: 10px !important;\n }\n }\n\n tr:last-child td {\n padding-bottom: 1px !important;\n }\n\n table label {\n width: 18px !important;\n height: 18px !important;\n }\n }\n\n @media only screen and (max-width: 1024px) {\n > label {\n width: 100%;\n text-align: center;\n max-width: 242px;\n margin-bottom: 10px;\n }\n\n table label {\n width: 16px !important;\n height: 16px !important;\n }\n\n th,\n td {\n font-size: 12px;\n\n &:first-child {\n padding-right: 5px !important;\n }\n }\n }\n\n .week-availability-mobile {\n display: none;\n }\n\n @media only screen and (max-width: 768px) {\n .tabela-disponibilidade {\n display: none !important;\n }\n .week-availability-mobile {\n display: flex;\n flex-direction: row;\n gap: 24px;\n width: 100%;\n align-items: flex-start;\n justify-content: center;\n }\n .day-card {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n padding: 24px 10px;\n border-radius: 10px;\n border: 1px solid #ccc;\n background: #fff;\n flex: 1 0 0;\n min-width: 80px;\n box-sizing: border-box;\n }\n .day-title {\n color: #1a1a1a;\n text-align: center;\n font-family: 'Poppins', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n margin-bottom: 0;\n }\n .periods {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n }\n .period-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 8px;\n }\n .period-label {\n display: block;\n color: #1a1a1a;\n font-family: 'Poppins', sans-serif;\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n text-align: left;\n }\n .day-card label {\n width: 24px !important;\n height: 24px !important;\n margin: 0 !important;\n background: transparent !important;\n box-shadow: none !important;\n }\n .day-card label[aria-checked='true'],\n .day-card label input:checked + span {\n background: transparent !important;\n box-shadow: none !important;\n }\n }\n\n @media only screen and (min-width: 769px) {\n .tabela-disponibilidade {\n border-collapse: separate;\n border-spacing: 24px 0;\n width: 100%;\n table-layout: fixed;\n }\n .tabela-disponibilidade th.dia {\n background: #fff;\n border: 1px solid #ccc;\n border-bottom: none;\n border-radius: 10px 10px 0 0;\n padding: 16px 0 8px 0;\n text-align: center;\n color: #1a1a1a;\n }\n .tabela-disponibilidade td.celula {\n background: #fff;\n border-left: 1px solid #ccc;\n border-right: 1px solid #ccc;\n text-align: center;\n padding: 1rem 0;\n }\n .tabela-disponibilidade tr:last-child td.celula {\n border-radius: 0 0 10px 10px;\n border-bottom: 1px solid #ccc;\n }\n .tabela-disponibilidade th,\n .tabela-disponibilidade td {\n vertical-align: middle;\n }\n .tabela-disponibilidade td.periodo {\n font-size: 14px;\n font-weight: 400;\n color: #1a1a1a;\n background: transparent;\n text-align: right;\n padding-right: 12px;\n min-width: 60px;\n }\n .tabela-disponibilidade label {\n width: 24px !important;\n height: 24px !important;\n margin: 0 auto !important;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .tabela-disponibilidade .icon-check,\n .tabela-disponibilidade .icon-close {\n width: 24px !important;\n height: 24px !important;\n }\n .tabela-disponibilidade th:not(.dia),\n .tabela-disponibilidade td:not(.celula):not(.periodo) {\n background: transparent !important;\n border: none !important;\n padding: 0 !important;\n }\n }\n"])));
13
13
  var templateObject_1;
14
14
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/input-week-availability/styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAsC;AAEzB,QAAA,qBAAqB,GAAG,IAAA,2BAAM,EAAC,KAAK,CAAC,gnEAAA,6iEA4HjD,KAAA"}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/input-week-availability/styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAsC;AAEzB,QAAA,qBAAqB,GAAG,IAAA,2BAAM,EAAC,KAAK,CAAC,0jLAAA,u/KAqQjD,KAAA"}
@@ -1,9 +1,9 @@
1
- import { useQueryProps } from "../../../../ui/index.js";
1
+ import { useQueryProps } from '../../../../ui/index.js';
2
2
  export type DeepPartial<T> = {
3
3
  [P in keyof T]?: T[P] extends object ? T[P] extends Array<infer U> ? Array<DeepPartial<U>> : DeepPartial<T[P]> : T[P];
4
4
  };
5
- export declare function createClient<Swagger>({ fetcher, defaultHeaders, arrayFormat }: {
6
- arrayFormat?: "repeat";
5
+ export declare function createClient<Swagger>({ fetcher, defaultHeaders, arrayFormat, }: {
6
+ arrayFormat?: 'repeat';
7
7
  defaultHeaders?: Record<string, string>;
8
8
  fetcher: (params: {
9
9
  url?: string;
@@ -70,25 +70,30 @@ function createClient(_a) {
70
70
  if (!params)
71
71
  return url.slice(1);
72
72
  var usedParams = new Set();
73
- var replacedUrl = url.replace(/\{(\w+)\}/g, function (_, key) {
73
+ var replacedUrl = url
74
+ .replace(/\{(\w+)\}/g, function (_, key) {
74
75
  if (params[key] !== undefined) {
75
76
  usedParams.add(key);
76
77
  return encodeURIComponent(params[key]);
77
78
  }
78
79
  return "{".concat(key, "}");
79
- }).slice(1);
80
+ })
81
+ .slice(1);
80
82
  var unusedParams = Object.keys(params).reduce(function (acc, key) {
81
83
  if (!usedParams.has(key)) {
82
84
  acc[key] = params[key];
83
85
  }
84
86
  return acc;
85
87
  }, {});
86
- var query = qs_1.default.stringify(unusedParams, { arrayFormat: arrayFormat || 'brackets', skipNulls: true });
88
+ var query = qs_1.default.stringify(unusedParams, {
89
+ arrayFormat: arrayFormat || 'brackets',
90
+ skipNulls: true,
91
+ });
87
92
  return query ? "".concat(replacedUrl, "?").concat(query) : replacedUrl;
88
93
  }
89
94
  function client(_a) {
90
95
  return __awaiter(this, arguments, void 0, function (_b) {
91
- var finalUrl, res;
96
+ var finalUrl, response;
92
97
  var url = _b.url, method = _b.method, body = _b.body, _c = _b.headers, headers = _c === void 0 ? {} : _c;
93
98
  return __generator(this, function (_d) {
94
99
  switch (_d.label) {
@@ -101,8 +106,8 @@ function createClient(_a) {
101
106
  headers: __assign(__assign({}, defaultHeaders), headers),
102
107
  })];
103
108
  case 1:
104
- res = _d.sent();
105
- return [2 /*return*/, res];
109
+ response = _d.sent();
110
+ return [2 /*return*/, response];
106
111
  }
107
112
  });
108
113
  });
@@ -110,13 +115,16 @@ function createClient(_a) {
110
115
  function useSwagger(_a) {
111
116
  var _this = this;
112
117
  var url = _a.url, method = _a.method, body = _a.body, rest = __rest(_a, ["url", "method", "body"]);
113
- return (0, ui_1.useQuery)(__assign(__assign({ queryKey: [url, method] }, rest), { queryFn: function () { return __awaiter(_this, void 0, void 0, function () {
118
+ return (0, ui_1.useQuery)(__assign(__assign({ queryKey: [url, method, body] }, rest), { queryFn: function () { return __awaiter(_this, void 0, void 0, function () {
114
119
  var res;
115
120
  return __generator(this, function (_a) {
116
121
  switch (_a.label) {
117
122
  case 0: return [4 /*yield*/, client({ url: url, method: method, body: body })];
118
123
  case 1:
119
124
  res = _a.sent();
125
+ if (res && typeof res === 'object' && 'error' in res) {
126
+ throw new Error(res.error);
127
+ }
120
128
  return [2 /*return*/, res];
121
129
  }
122
130
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/hooks/use-swagger/client/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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 -1,6 +1,6 @@
1
1
  {
2
2
  "name": "infinity-forge",
3
- "version": "11.1.1",
3
+ "version": "11.1.2",
4
4
  "description": "codie Library",
5
5
  "main": "./dist/index",
6
6
  "module": "./dist/index",