infinity-forge 3.3.9 → 3.4.1

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,3 +1,4 @@
1
1
  export * from './ui/index.js';
2
2
  export * from './menu/index.js';
3
+ export * from './locales/index.js';
3
4
  export * from './notifications/index.js';
@@ -16,5 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ui/index.js"), exports);
18
18
  __exportStar(require("./menu/index.js"), exports);
19
+ __exportStar(require("./locales/index.js"), exports);
19
20
  __exportStar(require("./notifications/index.js"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/system/presentation/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAAoB;AACpB,yCAAsB;AACtB,kDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/system/presentation/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAAoB;AACpB,yCAAsB;AACtB,4CAAyB;AACzB,kDAA+B"}
@@ -0,0 +1 @@
1
+ export * from './use-load-cities-by-uf/index.js';
@@ -0,0 +1,18 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./use-load-cities-by-uf/index.js"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/system/presentation/hooks/locales/ibge/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC"}
@@ -0,0 +1,3 @@
1
+ export declare function useLoadCities({ uf }: {
2
+ uf: string;
3
+ }): Required<import("../../../../../../ui/index.js").QueryState<any>>;
@@ -0,0 +1,60 @@
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;
13
+ return g = { next: verb(0), "throw": verb(1), "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
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.useLoadCities = void 0;
40
+ var sites_1 = require("../../../../../../sites/index.js");
41
+ var ui_1 = require("../../../../../../ui/index.js");
42
+ function useLoadCities(_a) {
43
+ var _this = this;
44
+ var uf = _a.uf;
45
+ return (0, ui_1.useQuery)({
46
+ queryFn: 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, sites_1.api)({ method: 'get', url: "localidades/estados/".concat(uf, "/municipios") }, 'https://servicodados.ibge.gov.br/api/v1/')];
50
+ case 1: return [2 /*return*/, _a.sent()];
51
+ }
52
+ });
53
+ }); },
54
+ queryKey: ['cities', uf],
55
+ enabled: !!uf,
56
+ enableCache: true,
57
+ });
58
+ }
59
+ exports.useLoadCities = useLoadCities;
60
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/system/presentation/hooks/locales/ibge/use-load-cities-by-uf/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA6B;AAC7B,2BAA+B;AAE/B,SAAgB,aAAa,CAAC,EAAsB;IAApD,iBAYC;QAZ+B,EAAE,QAAA;IAChC,OAAO,IAAA,aAAQ,EAAC;QACd,OAAO,EAAE;;;4BACA,qBAAM,IAAA,WAAG,EACd,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,8BAAuB,EAAE,gBAAa,EAAE,EAC9D,0CAA0C,CAC3C,EAAA;4BAHD,sBAAO,SAGN,EAAA;;;aACF;QACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC,CAAC,EAAE;QACb,WAAW,EAAE,IAAI;KAClB,CAAC,CAAA;AACJ,CAAC;AAZD,sCAYC"}
@@ -0,0 +1,2 @@
1
+ export * from './ibge/index.js';
2
+ export * from "./use-load-cities/index.js";
@@ -0,0 +1,19 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ibge/index.js"), exports);
18
+ __exportStar(require("./use-load-cities/index.js"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/system/presentation/hooks/locales/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,oDAAiC"}
@@ -0,0 +1,4 @@
1
+ export declare function useLoadStates(): Required<import("../../../../../ui/index.js").QueryState<{
2
+ value: string;
3
+ label: string;
4
+ }[]>>;
@@ -0,0 +1,164 @@
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;
13
+ return g = { next: verb(0), "throw": verb(1), "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
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.useLoadStates = void 0;
40
+ var ui_1 = require("../../../../../ui/index.js");
41
+ function useLoadStates() {
42
+ return (0, ui_1.useQuery)({
43
+ queryFn: fetchStates,
44
+ queryKey: 'states',
45
+ });
46
+ }
47
+ exports.useLoadStates = useLoadStates;
48
+ function fetchStates() {
49
+ return __awaiter(this, void 0, void 0, function () {
50
+ return __generator(this, function (_a) {
51
+ return [2 /*return*/, [
52
+ {
53
+ value: 'RO',
54
+ label: 'Rondônia',
55
+ },
56
+ {
57
+ value: 'AC',
58
+ label: 'Acre',
59
+ },
60
+ {
61
+ value: 'AM',
62
+ label: 'Amazonas',
63
+ },
64
+ {
65
+ value: 'RR',
66
+ label: 'Roraima',
67
+ },
68
+ {
69
+ value: 'PA',
70
+ label: 'Pará',
71
+ },
72
+ {
73
+ value: 'AP',
74
+ label: 'Amapá',
75
+ },
76
+ {
77
+ value: 'TO',
78
+ label: 'Tocantins',
79
+ },
80
+ {
81
+ value: 'MA',
82
+ label: 'Maranhão',
83
+ },
84
+ {
85
+ value: 'PI',
86
+ label: 'Piauí',
87
+ },
88
+ {
89
+ value: 'CE',
90
+ label: 'Ceará',
91
+ },
92
+ {
93
+ value: 'RN',
94
+ label: 'Rio Grande do Norte',
95
+ },
96
+ {
97
+ value: 'PB',
98
+ label: 'Paraíba',
99
+ },
100
+ {
101
+ value: 'PE',
102
+ label: 'Pernambuco',
103
+ },
104
+ {
105
+ value: 'AL',
106
+ label: 'Alagoas',
107
+ },
108
+ {
109
+ value: 'SE',
110
+ label: 'Sergipe',
111
+ },
112
+ {
113
+ value: 'BA',
114
+ label: 'Bahia',
115
+ },
116
+ {
117
+ value: 'MG',
118
+ label: 'Minas Gerais',
119
+ },
120
+ {
121
+ value: 'ES',
122
+ label: 'Espírito Santo',
123
+ },
124
+ {
125
+ value: 'RJ',
126
+ label: 'Rio de Janeiro',
127
+ },
128
+ {
129
+ value: 'SP',
130
+ label: 'São Paulo',
131
+ },
132
+ {
133
+ value: 'PR',
134
+ label: 'Paraná',
135
+ },
136
+ {
137
+ value: 'SC',
138
+ label: 'Santa Catarina',
139
+ },
140
+ {
141
+ value: 'RS',
142
+ label: 'Rio Grande do Sul',
143
+ },
144
+ {
145
+ value: 'MS',
146
+ label: 'Mato Grosso do Sul',
147
+ },
148
+ {
149
+ value: 'MT',
150
+ label: 'Mato Grosso',
151
+ },
152
+ {
153
+ value: 'GO',
154
+ label: 'Goiás',
155
+ },
156
+ {
157
+ value: 'DF',
158
+ label: 'Distrito Federal',
159
+ },
160
+ ]];
161
+ });
162
+ });
163
+ }
164
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/system/presentation/hooks/locales/use-load-cities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA+B;AAG/B,SAAgB,aAAa;IAC3B,OAAO,IAAA,aAAQ,EAAC;QACd,OAAO,EAAE,WAAW;QACpB,QAAQ,EAAE,QAAQ;KACnB,CAAC,CAAA;AACJ,CAAC;AALD,sCAKC;AAED,SAAe,WAAW;;;YACxB,sBAAO;oBACL;wBACE,KAAK,EAAE,IAAI;wBACX,KAAK,EAAE,UAAU;qBAClB;oBACD;wBACE,KAAK,EAAE,IAAI;wBACX,KAAK,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AE,gBAAgB;qBACxB;oBACD;wBACE,KAAK,EAAE,IAAI;wBACX,KAAK,EAAE,mBAAmB;qBAC3B;oBACD;wBACE,KAAK,EAAE,IAAI;wBACX,KAAK,EAAE,oBAAoB;qBAC5B;oBACD;wBACE,KAAK,EAAE,IAAI;wBACX,KAAK,EAAE,aAAa;qBACrB;oBACD;wBACE,KAAK,EAAE,IAAI;wBACX,KAAK,EAAE,OAAO;qBACf;oBACD;wBACE,KAAK,EAAE,IAAI;wBACX,KAAK,EAAE,kBAAkB;qBAC1B;iBACF,EAAA;;;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "infinity-forge",
3
- "version": "3.3.9",
3
+ "version": "3.4.1",
4
4
  "description": "codie Library",
5
5
  "main": "./dist/index",
6
6
  "module": "./dist/index",