@bluemarble/bm-components 0.0.51 → 0.0.53

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/esm/index.js CHANGED
@@ -3816,7 +3816,7 @@ function getPropertyValue(obj, property) {
3816
3816
  return String(property.split('.').reduce((o, k) => o && o[k], obj));
3817
3817
  }
3818
3818
 
3819
- /*! *****************************************************************************
3819
+ /******************************************************************************
3820
3820
  Copyright (c) Microsoft Corporation.
3821
3821
 
3822
3822
  Permission to use, copy, modify, and/or distribute this software for any
@@ -15237,5 +15237,103 @@ const Dialog = (_a) => {
15237
15237
  })))));
15238
15238
  };
15239
15239
 
15240
- export { Autocomplete, BaseGrid, Checkbox, Dialog, EditableTableCell, GetInputLabel, Grid, Input, InputMask, LargeButton, Modal, Radio, Select, Switch, TabPanel, Td, Tr, createFilter, filterData, getTabProps, useEvent, useFilter, useGrid, useLoading };
15240
+ (function (module, exports) {
15241
+ (function (global, factory) {
15242
+ typeof commonjsRequire === 'function' ? factory(moment$1.exports) :
15243
+ factory(global.moment);
15244
+ }(commonjsGlobal, (function (moment) {
15245
+ //! moment.js locale configuration
15246
+
15247
+ var ptBr = moment.defineLocale('pt-br', {
15248
+ months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
15249
+ '_'
15250
+ ),
15251
+ monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
15252
+ weekdays:
15253
+ 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
15254
+ '_'
15255
+ ),
15256
+ weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
15257
+ weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
15258
+ weekdaysParseExact: true,
15259
+ longDateFormat: {
15260
+ LT: 'HH:mm',
15261
+ LTS: 'HH:mm:ss',
15262
+ L: 'DD/MM/YYYY',
15263
+ LL: 'D [de] MMMM [de] YYYY',
15264
+ LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
15265
+ LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',
15266
+ },
15267
+ calendar: {
15268
+ sameDay: '[Hoje às] LT',
15269
+ nextDay: '[Amanhã às] LT',
15270
+ nextWeek: 'dddd [às] LT',
15271
+ lastDay: '[Ontem às] LT',
15272
+ lastWeek: function () {
15273
+ return this.day() === 0 || this.day() === 6
15274
+ ? '[Último] dddd [às] LT' // Saturday + Sunday
15275
+ : '[Última] dddd [às] LT'; // Monday - Friday
15276
+ },
15277
+ sameElse: 'L',
15278
+ },
15279
+ relativeTime: {
15280
+ future: 'em %s',
15281
+ past: 'há %s',
15282
+ s: 'poucos segundos',
15283
+ ss: '%d segundos',
15284
+ m: 'um minuto',
15285
+ mm: '%d minutos',
15286
+ h: 'uma hora',
15287
+ hh: '%d horas',
15288
+ d: 'um dia',
15289
+ dd: '%d dias',
15290
+ M: 'um mês',
15291
+ MM: '%d meses',
15292
+ y: 'um ano',
15293
+ yy: '%d anos',
15294
+ },
15295
+ dayOfMonthOrdinalParse: /\d{1,2}º/,
15296
+ ordinal: '%dº',
15297
+ invalidDate: 'Data inválida',
15298
+ });
15299
+
15300
+ return ptBr;
15301
+
15302
+ })));
15303
+ }());
15304
+
15305
+ moment.locale('pt-br');
15306
+ function DateFormat(date) {
15307
+ function momentWithDate(utc = false) {
15308
+ return Object.assign(Object.assign({}, moment(date).utc(utc)), { toDateOrUndefined: () => !date ? undefined : moment(date).utc(utc).toDate() });
15309
+ }
15310
+ function convertDateFromClient(forceUTC = undefined) {
15311
+ let utc = forceUTC || true;
15312
+ if (String(date).endsWith('Z'))
15313
+ utc = false;
15314
+ return Object.assign(Object.assign({}, momentWithDate(utc)), { toDateOrUndefined: () => !date ? undefined : momentWithDate(utc).toDate() });
15315
+ }
15316
+ return {
15317
+ from: {
15318
+ db: momentWithDate(),
15319
+ client: convertDateFromClient()
15320
+ }
15321
+ };
15322
+ }
15323
+ DateFormat.now = () => {
15324
+ if (process.env.NODE_ENV === 'development')
15325
+ return moment().utc(true);
15326
+ return moment().subtract(3, 'hours');
15327
+ };
15328
+
15329
+ function RouteHelper(methods, middlewares = []) {
15330
+ return (req, res) => {
15331
+ const handler = methods[req.method];
15332
+ if (!handler)
15333
+ return res.status(405).json({ error: 'Método inválido' });
15334
+ return middlewares.reduce((func, middleware) => middleware(func), handler)(req, res);
15335
+ };
15336
+ }
15337
+
15338
+ export { Autocomplete, BaseGrid, Checkbox, DateFormat, Dialog, EditableTableCell, GetInputLabel, Grid, Input, InputMask, LargeButton, Modal, Radio, RouteHelper, Select, Switch, TabPanel, Td, Tr, createFilter, filterData, getTabProps, useEvent, useFilter, useGrid, useLoading };
15241
15339
  //# sourceMappingURL=index.js.map