.
This commit is contained in:
parent
21a1b27d35
commit
4ed3d82bb2
9 changed files with 49 additions and 143 deletions
|
|
@ -1,57 +0,0 @@
|
||||||
"use strict";
|
|
||||||
var __create = Object.create;
|
|
||||||
var __defProp = Object.defineProperty;
|
|
||||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
||||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
||||||
var __getProtoOf = Object.getPrototypeOf;
|
|
||||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
||||||
var __export = (target, all) => {
|
|
||||||
for (var name in all)
|
|
||||||
__defProp(target, name, { get: all[name], enumerable: true });
|
|
||||||
};
|
|
||||||
var __copyProps = (to, from, except, desc) => {
|
|
||||||
if (from && typeof from === "object" || typeof from === "function") {
|
|
||||||
for (let key of __getOwnPropNames(from))
|
|
||||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
||||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
||||||
}
|
|
||||||
return to;
|
|
||||||
};
|
|
||||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
||||||
// If the importer is in node compatibility mode or this is not an ESM
|
|
||||||
// file that has been converted to a CommonJS file using a Babel-
|
|
||||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
||||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
||||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
||||||
mod
|
|
||||||
));
|
|
||||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
||||||
var dayjs_exports = {};
|
|
||||||
__export(dayjs_exports, {
|
|
||||||
dayjsbr: () => dayjsbr
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(dayjs_exports);
|
|
||||||
var import_dayjs = __toESM(require("dayjs"));
|
|
||||||
var import_duration = __toESM(require("dayjs/plugin/duration"));
|
|
||||||
var import_isSameOrAfter = __toESM(require("dayjs/plugin/isSameOrAfter"));
|
|
||||||
var import_isSameOrBefore = __toESM(require("dayjs/plugin/isSameOrBefore"));
|
|
||||||
var import_minMax = __toESM(require("dayjs/plugin/minMax"));
|
|
||||||
var import_relativeTime = __toESM(require("dayjs/plugin/relativeTime"));
|
|
||||||
var import_timezone = __toESM(require("dayjs/plugin/timezone"));
|
|
||||||
var import_utc = __toESM(require("dayjs/plugin/utc"));
|
|
||||||
var import_weekOfYear = __toESM(require("dayjs/plugin/weekOfYear"));
|
|
||||||
var import_pt_br = require("dayjs/locale/pt-br");
|
|
||||||
const dayjsbr = import_dayjs.default;
|
|
||||||
dayjsbr.locale("pt-br");
|
|
||||||
dayjsbr.extend(import_utc.default);
|
|
||||||
dayjsbr.extend(import_timezone.default);
|
|
||||||
dayjsbr.extend(import_weekOfYear.default);
|
|
||||||
dayjsbr.extend(import_isSameOrBefore.default);
|
|
||||||
dayjsbr.extend(import_isSameOrAfter.default);
|
|
||||||
dayjsbr.extend(import_minMax.default);
|
|
||||||
dayjsbr.extend(import_relativeTime.default);
|
|
||||||
dayjsbr.extend(import_duration.default);
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
dayjsbr
|
|
||||||
});
|
|
||||||
|
|
@ -19,7 +19,6 @@ __reExport(index_exports, require("./aleatorio"), module.exports);
|
||||||
__reExport(index_exports, require("./cacheMemoria"), module.exports);
|
__reExport(index_exports, require("./cacheMemoria"), module.exports);
|
||||||
__reExport(index_exports, require("./constantes"), module.exports);
|
__reExport(index_exports, require("./constantes"), module.exports);
|
||||||
__reExport(index_exports, require("./consulta"), module.exports);
|
__reExport(index_exports, require("./consulta"), module.exports);
|
||||||
__reExport(index_exports, require("./dayjs"), module.exports);
|
|
||||||
__reExport(index_exports, require("./dayjs26"), module.exports);
|
__reExport(index_exports, require("./dayjs26"), module.exports);
|
||||||
__reExport(index_exports, require("./ecosistema"), module.exports);
|
__reExport(index_exports, require("./ecosistema"), module.exports);
|
||||||
__reExport(index_exports, require("./extensoes"), module.exports);
|
__reExport(index_exports, require("./extensoes"), module.exports);
|
||||||
|
|
@ -42,7 +41,6 @@ __reExport(index_exports, require("./variaveisComuns"), module.exports);
|
||||||
...require("./cacheMemoria"),
|
...require("./cacheMemoria"),
|
||||||
...require("./constantes"),
|
...require("./constantes"),
|
||||||
...require("./consulta"),
|
...require("./consulta"),
|
||||||
...require("./dayjs"),
|
|
||||||
...require("./dayjs26"),
|
...require("./dayjs26"),
|
||||||
...require("./ecosistema"),
|
...require("./ecosistema"),
|
||||||
...require("./extensoes"),
|
...require("./extensoes"),
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,6 @@ declare const zFiltro: z.ZodObject<{
|
||||||
ou: z.ZodOptional<z.ZodBoolean>;
|
ou: z.ZodOptional<z.ZodBoolean>;
|
||||||
}, z.core.$strip>;
|
}, z.core.$strip>;
|
||||||
|
|
||||||
declare const dayjsbr: typeof _dayjs;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utilitário de configuração do Dayjs focado em compatibilidade com SSR.
|
* Utilitário de configuração do Dayjs focado em compatibilidade com SSR.
|
||||||
*
|
*
|
||||||
|
|
@ -130,30 +128,29 @@ declare const dayjsbr: typeof _dayjs;
|
||||||
* @example
|
* @example
|
||||||
* ```ts
|
* ```ts
|
||||||
* // Em seu arquivo de configuração (ex: plugins/dayjs.ts):
|
* // Em seu arquivo de configuração (ex: plugins/dayjs.ts):
|
||||||
* import dayjs from "dayjs";
|
* import dayjs from "dayjs"
|
||||||
* import duration from "dayjs/plugin/duration";
|
* import duration from "dayjs/plugin/duration"
|
||||||
* import isSameOrAfter from "dayjs/plugin/isSameOrAfter";
|
* import isSameOrAfter from "dayjs/plugin/isSameOrAfter"
|
||||||
* import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
* import isSameOrBefore from "dayjs/plugin/isSameOrBefore"
|
||||||
* import minMax from "dayjs/plugin/minMax";
|
* import minMax from "dayjs/plugin/minMax"
|
||||||
* import relativeTime from "dayjs/plugin/relativeTime";
|
* import relativeTime from "dayjs/plugin/relativeTime"
|
||||||
* import timezone from "dayjs/plugin/timezone";
|
* import timezone from "dayjs/plugin/timezone"
|
||||||
* import utc from "dayjs/plugin/utc";
|
* import utc from "dayjs/plugin/utc"
|
||||||
* import weekOfYear from "dayjs/plugin/weekOfYear";
|
* import weekOfYear from "dayjs/plugin/weekOfYear"
|
||||||
* import "dayjs/locale/pt-br"; // Importante: importar o locale!
|
* import { defineDayjsBr } from "p-comuns"
|
||||||
*
|
* import "dayjs/locale/pt-br" // Importante: importar o locale!
|
||||||
* import { defineDayjsBr } from "@comuns/src/dayjs26";
|
|
||||||
*
|
* export const dayjsbr = defineDayjsBr({
|
||||||
* export const dayjsbr = defineDayjsBr({
|
* dayjs,
|
||||||
* dayjs,
|
* duration,
|
||||||
* duration,
|
* isSameOrAfter,
|
||||||
* isSameOrAfter,
|
* isSameOrBefore,
|
||||||
* isSameOrBefore,
|
* minMax,
|
||||||
* minMax,
|
* relativeTime,
|
||||||
* relativeTime,
|
* timezone,
|
||||||
* timezone,
|
* utc,
|
||||||
* utc,
|
* weekOfYear,
|
||||||
* weekOfYear,
|
* })
|
||||||
* });
|
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
declare const defineDayjsBr: ({ dayjs, duration, isSameOrAfter, isSameOrBefore, minMax, relativeTime, timezone, utc, weekOfYear, }: {
|
declare const defineDayjsBr: ({ dayjs, duration, isSameOrAfter, isSameOrBefore, minMax, relativeTime, timezone, utc, weekOfYear, }: {
|
||||||
|
|
@ -540,4 +537,4 @@ declare const nomeVariavel: (v: {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}) => string;
|
}) => string;
|
||||||
|
|
||||||
export { Produtos, TipagemRotas, agrupadores26, aleatorio, cacheM, cacheMFixo, cacheMemoria, camposComuns, criarFiltro26, dayjsbr, defineDayjsBr, erUuid, esperar, extensoes, type interfaceConsulta, link_paiol, localValor, nomeVariavel, objetoPg, operadores, operadores26, paraObjetoRegistroPg, pgObjeto, siglas_unidades_medida, texto_busca, tipoArquivo, type tipoFiltro, type tipoFiltro26, tipoUsuarioResiduos, tiposSituacoesElicencie, tx, umaFuncao, umaVariavel, unidades_medida, uuid, uuidV3, uuidV4, uuid_null, validarUuid, verCacheM, zFiltro, zFiltro26, zOperadores };
|
export { Produtos, TipagemRotas, agrupadores26, aleatorio, cacheM, cacheMFixo, cacheMemoria, camposComuns, criarFiltro26, defineDayjsBr, erUuid, esperar, extensoes, type interfaceConsulta, link_paiol, localValor, nomeVariavel, objetoPg, operadores, operadores26, paraObjetoRegistroPg, pgObjeto, siglas_unidades_medida, texto_busca, tipoArquivo, type tipoFiltro, type tipoFiltro26, tipoUsuarioResiduos, tiposSituacoesElicencie, tx, umaFuncao, umaVariavel, unidades_medida, uuid, uuidV3, uuidV4, uuid_null, validarUuid, verCacheM, zFiltro, zFiltro26, zOperadores };
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "p-comuns",
|
"name": "p-comuns",
|
||||||
"version": "0.316.0",
|
"version": "0.317.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./dist-front/index.mjs",
|
"main": "./dist-front/index.mjs",
|
||||||
"module": "./dist-front/index.mjs",
|
"module": "./dist-front/index.mjs",
|
||||||
|
|
|
||||||
BIN
pacote.tgz
BIN
pacote.tgz
Binary file not shown.
30
src/dayjs.ts
30
src/dayjs.ts
|
|
@ -1,30 +0,0 @@
|
||||||
import type { Dayjs } from "dayjs"
|
|
||||||
import dayjs from "dayjs"
|
|
||||||
|
|
||||||
const dayjsbr = dayjs
|
|
||||||
|
|
||||||
export type { ManipulateType } from "dayjs"
|
|
||||||
|
|
||||||
import duration from "dayjs/plugin/duration"
|
|
||||||
import isSameOrAfter from "dayjs/plugin/isSameOrAfter"
|
|
||||||
import isSameOrBefore from "dayjs/plugin/isSameOrBefore"
|
|
||||||
import minMax from "dayjs/plugin/minMax"
|
|
||||||
import relativeTime from "dayjs/plugin/relativeTime"
|
|
||||||
import timezone from "dayjs/plugin/timezone"
|
|
||||||
import utc from "dayjs/plugin/utc"
|
|
||||||
import weekOfYear from "dayjs/plugin/weekOfYear"
|
|
||||||
import "dayjs/locale/pt-br"
|
|
||||||
dayjsbr.locale("pt-br")
|
|
||||||
|
|
||||||
dayjsbr.extend(utc)
|
|
||||||
dayjsbr.extend(timezone)
|
|
||||||
dayjsbr.extend(weekOfYear)
|
|
||||||
dayjsbr.extend(isSameOrBefore)
|
|
||||||
dayjsbr.extend(isSameOrAfter)
|
|
||||||
dayjsbr.extend(minMax)
|
|
||||||
dayjsbr.extend(relativeTime)
|
|
||||||
dayjsbr.extend(duration)
|
|
||||||
|
|
||||||
export { dayjsbr }
|
|
||||||
|
|
||||||
export type { Dayjs }
|
|
||||||
|
|
@ -40,30 +40,29 @@ import type _weekOfYear from "dayjs/plugin/weekOfYear"
|
||||||
* @example
|
* @example
|
||||||
* ```ts
|
* ```ts
|
||||||
* // Em seu arquivo de configuração (ex: plugins/dayjs.ts):
|
* // Em seu arquivo de configuração (ex: plugins/dayjs.ts):
|
||||||
* import dayjs from "dayjs";
|
* import dayjs from "dayjs"
|
||||||
* import duration from "dayjs/plugin/duration";
|
* import duration from "dayjs/plugin/duration"
|
||||||
* import isSameOrAfter from "dayjs/plugin/isSameOrAfter";
|
* import isSameOrAfter from "dayjs/plugin/isSameOrAfter"
|
||||||
* import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
* import isSameOrBefore from "dayjs/plugin/isSameOrBefore"
|
||||||
* import minMax from "dayjs/plugin/minMax";
|
* import minMax from "dayjs/plugin/minMax"
|
||||||
* import relativeTime from "dayjs/plugin/relativeTime";
|
* import relativeTime from "dayjs/plugin/relativeTime"
|
||||||
* import timezone from "dayjs/plugin/timezone";
|
* import timezone from "dayjs/plugin/timezone"
|
||||||
* import utc from "dayjs/plugin/utc";
|
* import utc from "dayjs/plugin/utc"
|
||||||
* import weekOfYear from "dayjs/plugin/weekOfYear";
|
* import weekOfYear from "dayjs/plugin/weekOfYear"
|
||||||
* import "dayjs/locale/pt-br"; // Importante: importar o locale!
|
* import { defineDayjsBr } from "p-comuns"
|
||||||
*
|
* import "dayjs/locale/pt-br" // Importante: importar o locale!
|
||||||
* import { defineDayjsBr } from "@comuns/src/dayjs26";
|
|
||||||
*
|
* export const dayjsbr = defineDayjsBr({
|
||||||
* export const dayjsbr = defineDayjsBr({
|
* dayjs,
|
||||||
* dayjs,
|
* duration,
|
||||||
* duration,
|
* isSameOrAfter,
|
||||||
* isSameOrAfter,
|
* isSameOrBefore,
|
||||||
* isSameOrBefore,
|
* minMax,
|
||||||
* minMax,
|
* relativeTime,
|
||||||
* relativeTime,
|
* timezone,
|
||||||
* timezone,
|
* utc,
|
||||||
* utc,
|
* weekOfYear,
|
||||||
* weekOfYear,
|
* })
|
||||||
* });
|
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
const defineDayjsBr = ({
|
const defineDayjsBr = ({
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ export * from "./aleatorio"
|
||||||
export * from "./cacheMemoria"
|
export * from "./cacheMemoria"
|
||||||
export * from "./constantes"
|
export * from "./constantes"
|
||||||
export * from "./consulta"
|
export * from "./consulta"
|
||||||
export * from "./dayjs"
|
|
||||||
export * from "./dayjs26"
|
export * from "./dayjs26"
|
||||||
export * from "./ecosistema"
|
export * from "./ecosistema"
|
||||||
export * from "./extensoes"
|
export * from "./extensoes"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue