siam-ui-utils 1.0.2 → 1.0.4

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.
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.Separator = exports.Colxx = void 0;
15
+ var React = require("react");
16
+ var reactstrap_1 = require("reactstrap");
17
+ var Colxx = function (props) { return (React.createElement(reactstrap_1.Col, __assign({}, props, { widths: ['xxs', 'xs', 'sm', 'md', 'lg', 'xl', 'xxl'] }))); };
18
+ exports.Colxx = Colxx;
19
+ var Separator = function (_a) {
20
+ var className = _a.className;
21
+ return (React.createElement("div", { className: "separator ".concat(className) }));
22
+ };
23
+ exports.Separator = Separator;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.CustomSelectInput = void 0;
15
+ var React = require("react");
16
+ var react_select_1 = require("react-select");
17
+ var CustomSelectInput = function (props) {
18
+ var customProps = __assign({}, props);
19
+ delete customProps.autoCorrect;
20
+ delete customProps.autoCapitalize;
21
+ return React.createElement(react_select_1.components.Input, __assign({}, customProps));
22
+ };
23
+ exports.CustomSelectInput = CustomSelectInput;
package/index.d.ts CHANGED
@@ -1,107 +1,9 @@
1
- declare module "siam-utils" {
2
- //UTILS-CURRENCY
3
- export function currencyToNumber(
4
- currencyValue: string,
5
- returnZero?: boolean
6
- ): number;
1
+ declare module "siam-ui-utils" {
2
+ //CUSTOMBOOSTRAP
3
+ export function Colxx(props: JSX.IntrinsicAttributes & JSX.IntrinsicClassAttributes<Col> & Readonly<ColProps>);
4
+ export function Separator ({ className }: { className: string });
7
5
 
8
- export function fieldToCurrency(field: number): string;
6
+ //CUSTOMSELECTINPUT
7
+ export function CustomSelectInput (props: any);
9
8
 
10
- export function fieldToNumber(field: string): number;
11
-
12
- export function currencyToNumber(
13
- currencyValue: string,
14
- returnZero?: boolean
15
- ): number;
16
-
17
- export function currencyToPersistence(currencyValue: string): string;
18
-
19
- //UTILS-DATES
20
-
21
- export function fieldToDate(field: string): Date;
22
-
23
- export function dateToPersistence(date: Date): string;
24
-
25
- export function periodToPersistence(date: Date): string;
26
-
27
- export function fieldToPersistence(field: string): string;
28
-
29
- export function dateToDisplay(date: Date, format: string): string;
30
-
31
- export function fieldToDisplay(field: string, format: string): string;
32
-
33
- export function fieldPeriodoToDate(field: string): Date;
34
-
35
- export function dateToDisplayPeriodo(date: Date): string;
36
-
37
- export function dateToDisplayDiaMes(date: string): string;
38
-
39
- export function dateToDisplayHoraMinuto(date: string): string;
40
-
41
- export function fieldPeriodoToDisplay(field: string): string;
42
-
43
- export function subtractDays(date: Date, days: number): Date;
44
-
45
- export function addDays(date: Date, days: number): Date;
46
-
47
- export function diffDateDays(firstDate: any, secondDate: any): number;
48
-
49
- export function truncDate(date: Date): Date;
50
-
51
- //UTILS-ERROR
52
- export function errorMessage(error: {
53
- message: any;
54
- response: { data: { message: any; error: any } };
55
- }): string;
56
-
57
- //UTILS-NUMBER
58
-
59
- export function numberToDisplay(
60
- number: number,
61
- fractionDigits: number
62
- ): string;
63
-
64
- export function numberToDisplayCurrency(number: number): string;
65
-
66
- export function numberToPersistence(number: string): string | null;
67
-
68
- export function numberToStringifyPersistence(number: number): string;
69
-
70
- export function comprobanteToPersistence(comprobanteStr: string): string;
71
-
72
- //UTILS-PERCENT
73
-
74
- export function insertSimbol(
75
- field: string,
76
- simbol: string,
77
- position?: string
78
- ): string;
79
-
80
- export function persistenceToDisplayPercent(
81
- field: string,
82
- position?: string
83
- ): string;
84
-
85
- //UTILS
86
-
87
- export function mapOrder(array: any, order: any, key: any): any;
88
-
89
- export function getDateWithFormat(): string;
90
-
91
- export function getCurrentTime(): string;
92
-
93
- export function idAyudaToKeyAyuda(idAyuda: string): any;
94
-
95
- export const isLocalhost: boolean;
96
-
97
- //UTILS-BOOLEAN
98
-
99
- export function booleanToPersistence(valueBoolean: boolean): string;
100
-
101
- export function persistenceToBoolean(valueChar: string): boolean;
102
-
103
- //AUTH-HEADER
104
- export function authHeader(): any;
105
-
106
- export function getAuthUser(): any;
107
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siam-ui-utils",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "keywords": [
5
5
  "ampf-react",
6
6
  "ampf-utils",
@@ -19,12 +19,12 @@
19
19
  },
20
20
  "moduleResolution": "nodenext",
21
21
  "scripts": {
22
- "build-node": "npx tsc src/index.ts --jsx perserve --outDir dist_node",
23
- "build-browser": "npx tsc src/index.ts --jsx perserve --outDir dist_browser",
22
+ "build-node": "npx tsc src/index.ts --jsx reat --outDir dist_node",
23
+ "build-browser": "npx tsc src/index.ts --jsx react --outDir dist_browser",
24
24
  "build": "npm run build-node & npm run build-browser",
25
25
  "test": "vitest --clearScreen",
26
26
  "test-without-stopping": "vitest --clearScreen --run",
27
- "publish-npm": "npm run test-without-stopping & npm run build & npm publish"
27
+ "publish-npm": "npm run build & npm publish"
28
28
  },
29
29
  "dependencies": {
30
30
  "@types/react-intl": "^3.0.0",