@fctc/sme-widget-ui 3.10.7 → 3.10.8

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/types.d.ts DELETED
@@ -1,62 +0,0 @@
1
- import { Dispatch, SetStateAction } from 'react';
2
- import z from 'zod';
3
-
4
- interface ValuePropsType {
5
- id: number | string;
6
- display_name: number | string;
7
- [key: string]: any;
8
- }
9
- interface IInputFieldProps {
10
- name?: string;
11
- type?: string;
12
- readonly?: boolean;
13
- required?: boolean;
14
- placeholder?: string;
15
- defaultValue?: string | number | ValuePropsType | any;
16
- invisible?: boolean;
17
- methods?: any;
18
- onChange?: (name: string, value: any) => void;
19
- onBlur?: Function;
20
- onRefetch?: Function;
21
- isForm?: boolean;
22
- className?: string;
23
- value?: string | number | ValuePropsType | null | Record<any, any> | any;
24
- string?: string;
25
- isEditTable?: boolean;
26
- formValues?: any;
27
- model?: string;
28
- relation?: string;
29
- domain?: any;
30
- idForm?: boolean;
31
- widget?: string;
32
- options?: any;
33
- filename?: string;
34
- baseClassName?: string;
35
- }
36
- declare const loginSchema: z.ZodObject<{
37
- username: z.ZodString;
38
- password: z.ZodString;
39
- }, "strip", z.ZodTypeAny, {
40
- username: string;
41
- password: string;
42
- }, {
43
- username: string;
44
- password: string;
45
- }>;
46
- type LoginData = z.infer<typeof loginSchema>;
47
- type Provider = 'google';
48
- type LoginProps = {
49
- forgotPasswordUrl?: string;
50
- providers?: Provider[];
51
- buttonClassName?: string;
52
- isLoading?: boolean;
53
- db?: string;
54
- stayLoginIn?: boolean;
55
- hideForgotPassword?: boolean;
56
- onSubmit?: (data: LoginData) => void;
57
- setStayLoginIn?: Dispatch<SetStateAction<boolean>>;
58
- onLoginSocial?: (db: string) => void;
59
- onLoginGoogle?: (db: string) => void;
60
- };
61
-
62
- export { type IInputFieldProps, type LoginData, type LoginProps, type Provider, type ValuePropsType, loginSchema };
package/dist/types.js DELETED
@@ -1,50 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/types.ts
31
- var types_exports = {};
32
- __export(types_exports, {
33
- loginSchema: () => loginSchema
34
- });
35
- module.exports = __toCommonJS(types_exports);
36
-
37
- // src/types/widget-type/index.ts
38
- var import_zod = __toESM(require("zod"));
39
- var loginSchema = import_zod.default.object({
40
- username: import_zod.default.string().min(1, { message: "Vui l\xF2ng nh\u1EADp t\xEAn \u0111\u0103ng nh\u1EADp" }).max(255, { message: "T\xEAn \u0111\u0103ng nh\u1EADp kh\xF4ng \u0111\u01B0\u1EE3c qu\xE1 255 k\xFD t\u1EF1" }),
41
- password: import_zod.default.string().min(1, {
42
- message: "Vui l\xF2ng nh\u1EADp m\u1EADt kh\u1EA9u"
43
- }).max(255, {
44
- message: "M\u1EADt kh\u1EA9u kh\xF4ng \u0111\u01B0\u1EE3c qu\xE1 255 k\xFD t\u1EF1"
45
- })
46
- });
47
- // Annotate the CommonJS export names for ESM import in node:
48
- 0 && (module.exports = {
49
- loginSchema
50
- });
package/dist/utils.d.ts DELETED
@@ -1,30 +0,0 @@
1
- declare const useFormatDate: () => {
2
- getRelativeTime: (dateString: string) => string;
3
- };
4
- declare function validateInput(value: string, type: 'text' | 'number' | 'phone' | 'email'): boolean;
5
- declare function getPasswordMessage(min?: string, max?: string, upcase?: string, digit?: string, special?: string): string;
6
- declare const range: (start: number, end: number) => number[];
7
- declare const formatNumberOnly: (num: number) => string;
8
- declare const parseFormattedNumber: (val: string) => number | "" | "0";
9
- declare const validateAndParseDate: (input: string, isDateTime?: boolean) => string | null;
10
- declare const isObjectEmpty: (obj: object) => boolean;
11
- declare const convertFloatToTime: (floatValue: number) => string;
12
- declare const isBase64Image: (str: any) => boolean;
13
- declare const checkIsImageLink: (url: any) => boolean;
14
- declare const formatFileSize: (size: any) => string;
15
- declare const convertTimeToFloat: (timeString: string) => number;
16
- declare const formatFloatNumber: (value: number | string) => string;
17
-
18
- declare const COLORS: {
19
- name: string;
20
- color: string;
21
- id: number;
22
- }[];
23
- declare const DOTS = "...";
24
- declare const SearchType: {
25
- FILTER: string;
26
- SEARCH: string;
27
- GROUP: string;
28
- };
29
-
30
- export { COLORS, DOTS, SearchType, checkIsImageLink, convertFloatToTime, convertTimeToFloat, formatFileSize, formatFloatNumber, formatNumberOnly, getPasswordMessage, isBase64Image, isObjectEmpty, parseFormattedNumber, range, useFormatDate, validateAndParseDate, validateInput };