infinity-forge 6.5.1 → 6.5.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.
- package/dist/system/hooks/locales/ibge/use-load-cities-by-uf/hook.d.ts +10 -0
- package/dist/system/hooks/locales/ibge/use-load-cities-by-uf/hook.js +67 -0
- package/dist/system/hooks/locales/ibge/use-load-cities-by-uf/hook.js.map +1 -0
- package/dist/system/hooks/locales/ibge/use-load-cities-by-uf/index.d.ts +2 -3
- package/dist/system/hooks/locales/ibge/use-load-cities-by-uf/index.js +14 -53
- package/dist/system/hooks/locales/ibge/use-load-cities-by-uf/index.js.map +1 -1
- package/dist/system/hooks/locales/ibge/use-load-cities-by-uf/interfaces.d.ts +40 -0
- package/dist/system/hooks/locales/ibge/use-load-cities-by-uf/interfaces.js +3 -0
- package/dist/system/hooks/locales/ibge/use-load-cities-by-uf/interfaces.js.map +1 -0
- package/package.json +1 -1
- package/dist/ui/components/form/text-editor/react-quill.css +0 -922
- package/dist/ui/styles/fonts.css +0 -763
- package/dist/ui/styles/reset.css +0 -351
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CitieIBGE } from './interfaces.js';
|
|
2
|
+
export declare function useLoadCities({ uf }: {
|
|
3
|
+
uf: string;
|
|
4
|
+
}): Required<import("../../../../../ui/index.js").QueryState<{
|
|
5
|
+
citiesIBGE: CitieIBGE[];
|
|
6
|
+
options: {
|
|
7
|
+
label: string;
|
|
8
|
+
valu: string;
|
|
9
|
+
}[];
|
|
10
|
+
}>>;
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.useLoadCities = useLoadCities;
|
|
40
|
+
var ui_1 = require("../../../../../ui/index.js");
|
|
41
|
+
function useLoadCities(_a) {
|
|
42
|
+
var _this = this;
|
|
43
|
+
var uf = _a.uf;
|
|
44
|
+
return (0, ui_1.useQuery)({
|
|
45
|
+
queryFn: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
46
|
+
var citiesIBGE, _a;
|
|
47
|
+
return __generator(this, function (_b) {
|
|
48
|
+
switch (_b.label) {
|
|
49
|
+
case 0:
|
|
50
|
+
_b.trys.push([0, 2, , 3]);
|
|
51
|
+
return [4 /*yield*/, (0, ui_1.api)({ method: 'get', url: "localidades/estados/".concat(uf, "/municipios") }, 'https://servicodados.ibge.gov.br/api/v1/')];
|
|
52
|
+
case 1:
|
|
53
|
+
citiesIBGE = _b.sent();
|
|
54
|
+
return [2 /*return*/, { citiesIBGE: citiesIBGE, options: citiesIBGE.map(function (citie) { return ({ label: citie.nome, valu: citie.nome }); }) }];
|
|
55
|
+
case 2:
|
|
56
|
+
_a = _b.sent();
|
|
57
|
+
return [2 /*return*/, { citiesIBGE: [], options: [] }];
|
|
58
|
+
case 3: return [2 /*return*/];
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}); },
|
|
62
|
+
queryKey: ['cities', uf],
|
|
63
|
+
enabled: !!uf,
|
|
64
|
+
enableCache: true,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=hook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../../../../../../src/system/hooks/locales/ibge/use-load-cities-by-uf/hook.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,sCAkBC;AAtBD,2BAAoC;AAIpC,SAAgB,aAAa,CAAC,EAAsB;IAApD,iBAkBC;QAlB+B,EAAE,QAAA;IAChC,OAAO,IAAA,aAAQ,EAAC;QACd,OAAO,EAAE;;;;;;wBAEc,qBAAM,IAAA,QAAG,EAC1B,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,8BAAuB,EAAE,gBAAa,EAAE,EAC9D,0CAA0C,CAC3C,EAAA;;wBAHK,UAAU,GAAG,SAGlB;wBAED,sBAAO,EAAE,UAAU,YAAA,EAAE,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,EAAzC,CAAyC,CAAC,EAAE,EAAA;;;wBAEpG,sBAAO,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAA;;;;aAEzC;QACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC,CAAC,EAAE;QACb,WAAW,EAAE,IAAI;KAClB,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
}): Required<import("../../../../../ui/index.js").QueryState<any>>;
|
|
1
|
+
export * from "./hook.js";
|
|
2
|
+
export * from "./interfaces.js";
|
|
@@ -1,58 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 };
|
|
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]; } };
|
|
36
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);
|
|
37
15
|
};
|
|
38
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
function useLoadCities(_a) {
|
|
42
|
-
var _this = this;
|
|
43
|
-
var uf = _a.uf;
|
|
44
|
-
return (0, ui_1.useQuery)({
|
|
45
|
-
queryFn: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
46
|
-
return __generator(this, function (_a) {
|
|
47
|
-
switch (_a.label) {
|
|
48
|
-
case 0: return [4 /*yield*/, (0, ui_1.api)({ method: 'get', url: "localidades/estados/".concat(uf, "/municipios") }, 'https://servicodados.ibge.gov.br/api/v1/')];
|
|
49
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}); },
|
|
53
|
-
queryKey: ['cities', uf],
|
|
54
|
-
enabled: !!uf,
|
|
55
|
-
enableCache: true,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
17
|
+
__exportStar(require("./hook.js"), exports);
|
|
18
|
+
__exportStar(require("./interfaces.js"), exports);
|
|
58
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/system/hooks/locales/ibge/use-load-cities-by-uf/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/system/hooks/locales/ibge/use-load-cities-by-uf/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,+CAA4B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type CitieIBGE = {
|
|
2
|
+
id: number;
|
|
3
|
+
nome: string;
|
|
4
|
+
microrregiao: {
|
|
5
|
+
id: number;
|
|
6
|
+
nome: string;
|
|
7
|
+
mesorregiao: {
|
|
8
|
+
id: number;
|
|
9
|
+
nome: string;
|
|
10
|
+
UF: {
|
|
11
|
+
id: number;
|
|
12
|
+
sigla: string;
|
|
13
|
+
nome: string;
|
|
14
|
+
regiao: {
|
|
15
|
+
id: number;
|
|
16
|
+
sigla: string;
|
|
17
|
+
nome: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
'regiao-imediata': {
|
|
23
|
+
id: number;
|
|
24
|
+
nome: string;
|
|
25
|
+
'regiao-intermediaria': {
|
|
26
|
+
id: number;
|
|
27
|
+
nome: string;
|
|
28
|
+
UF: {
|
|
29
|
+
id: number;
|
|
30
|
+
sigla: string;
|
|
31
|
+
nome: string;
|
|
32
|
+
regiao: {
|
|
33
|
+
id: number;
|
|
34
|
+
sigla: string;
|
|
35
|
+
nome: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../../src/system/hooks/locales/ibge/use-load-cities-by-uf/interfaces.ts"],"names":[],"mappings":""}
|