@hiver/connector-admin 0.0.8 → 0.0.9

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,14 @@
1
+ import { default as React } from 'react';
2
+ import { ActionMeta } from 'react-select';
3
+ import { FormFieldProps, ElementValidation } from '../../../types/form';
4
+ type FormField = FormFieldProps & {
5
+ validation?: ElementValidation;
6
+ validateOnBlur?: boolean;
7
+ validateOnChange?: boolean;
8
+ selectChangeHandler?: (event: unknown, action: ActionMeta<unknown>) => void;
9
+ inputChangeHandler?: (event: React.ChangeEvent<HTMLInputElement>) => void;
10
+ onValidationError?: (name: string, error: string | boolean) => void;
11
+ };
12
+ export declare const FormFields: (props: FormField) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/form-fields/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtE,KAAK,SAAS,GAAG,cAAc,GAAG;IAChC,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5E,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC1E,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,KAAK,IAAI,CAAC;CACrE,CAAC;AAEF,eAAO,MAAM,UAAU,UAAW,SAAS,4CA+H1C,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { StyledComponent } from '@emotion/styled';
2
+ import { BoxProps, OutlinedInputProps } from '@hiver/hiver-ui-kit';
3
+ export declare const OutlinedInput: StyledComponent<OutlinedInputProps>;
4
+ export declare const SelectWrapper: StyledComponent<BoxProps>;
5
+ export declare const HelperText: StyledComponent<BoxProps>;
6
+ export declare const InputWrapper: StyledComponent<BoxProps>;
7
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/form-fields/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAExE,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,kBAAkB,CAQ7D,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,CAAC,QAAQ,CA8BnD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,QAAQ,CAUhD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAAe,CAAC,QAAQ,CAMlD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Props as SelectProps } from 'react-select';
2
+ export declare const Select: (props: SelectProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/select/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,IAAI,WAAW,EAA0B,MAAM,cAAc,CAAC;AAUjF,eAAO,MAAM,MAAM,UAAW,WAAW,4CAExC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const REQUIRED_FIELD = "Required Field";
2
+ export declare const VALIDATION_FAILED = "Validation Failed";
3
+ //# sourceMappingURL=app-constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-constants.d.ts","sourceRoot":"","sources":["../../src/constants/app-constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,eAAO,MAAM,iBAAiB,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-admin",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",
@@ -9,7 +9,8 @@
9
9
  ],
10
10
  "dependencies": {
11
11
  "@reduxjs/toolkit": "^2.2.5",
12
- "react-redux": "^9.1.0"
12
+ "react-redux": "^9.1.0",
13
+ "react-select": "^5.8.0"
13
14
  },
14
15
  "devDependencies": {
15
16
  "react": "^18.3.1",
@@ -0,0 +1,36 @@
1
+ import { default as React } from 'react';
2
+ import { OutlinedInputProps } from '@hiver/hiver-ui-kit';
3
+ import { Props as SelectProps } from 'react-select';
4
+ export interface BaseFormFieldProps {
5
+ helperText?: string;
6
+ error?: boolean;
7
+ name: string;
8
+ toolTipTitle?: string;
9
+ }
10
+ export interface TextFieldProps extends BaseFormFieldProps, Omit<OutlinedInputProps, 'name'> {
11
+ type: 'text' | 'number' | 'password';
12
+ label?: React.ReactNode;
13
+ }
14
+ export interface SelectFieldProps extends BaseFormFieldProps, Omit<SelectProps, 'name'> {
15
+ type: 'select';
16
+ label?: string;
17
+ }
18
+ export type FormFieldProps = TextFieldProps | SelectFieldProps;
19
+ export interface IFormConfig {
20
+ id: string | number;
21
+ title?: string;
22
+ formFields: FormFieldProps[];
23
+ }
24
+ export interface IValidateConfig {
25
+ id?: string;
26
+ name: string;
27
+ label?: React.ReactNode | string;
28
+ }
29
+ export interface ElementValidation {
30
+ isRequired?: boolean;
31
+ validate?: (values: unknown, appConfigs: IValidateConfig) => boolean | string;
32
+ }
33
+ export interface FormValidation {
34
+ [x: string]: ElementValidation;
35
+ }
36
+ //# sourceMappingURL=form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/types/form.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,cAAe,SAAQ,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC;IAC1F,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;IACrC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;AAED,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC;IACrF,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAE/D,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,KAAK,OAAO,GAAG,MAAM,CAAC;CAC/E;AACD,MAAM,WAAW,cAAc;IAC7B,CAAC,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC;CAChC"}