@circle-vibe/shared 1.1.32 → 1.1.34
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/build/index.js +1 -1
- package/build/src/components/form/form-control-textarea/form-control-textarea.d.ts +5 -0
- package/build/src/components/form/form-control-textarea/form-control-textarea.js +58 -0
- package/build/src/components/form/form-control-textarea/form-control-textarea.js.map +1 -0
- package/build/src/components/form/form-control-textarea/index.d.ts +1 -0
- package/build/src/components/form/form-control-textarea/index.js +18 -0
- package/build/src/components/form/form-control-textarea/index.js.map +1 -0
- package/build/src/components/form/index.d.ts +1 -0
- package/build/src/components/form/index.js +1 -0
- package/build/src/components/form/index.js.map +1 -1
- package/build/src/enums/gateway-namespaces.js +1 -1
- package/build/src/types/chat-socket-params.d.ts +9 -2
- package/build/src/types/index.d.ts +3 -0
- package/build/src/types/index.js +3 -0
- package/build/src/types/index.js.map +1 -1
- package/build/src/types/upload-file-output.dto.d.ts +3 -0
- package/build/src/types/upload-file-output.dto.js +3 -0
- package/build/src/types/upload-file-output.dto.js.map +1 -0
- package/build/src/types/upload-image-output.dto.d.ts +4 -0
- package/build/src/types/upload-image-output.dto.js +3 -0
- package/build/src/types/upload-image-output.dto.js.map +1 -0
- package/build/src/types/upload-videos-output.dto.d.ts +4 -0
- package/build/src/types/upload-videos-output.dto.js +3 -0
- package/build/src/types/upload-videos-output.dto.js.map +1 -0
- package/build/src/utils/get-formik-form-control-value/get-formik-form-control-value.d.ts +1 -0
- package/build/src/utils/get-formik-form-control-value/get-formik-form-control-value.js +9 -1
- package/build/src/utils/get-formik-form-control-value/get-formik-form-control-value.js.map +1 -1
- package/package.json +4 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ExtendedReactFunctionalComponent } from '../../../types/extended-react-functional-component';
|
|
3
|
+
import 'src/styles/text-input-generic-styles.scss';
|
|
4
|
+
export type TextAreaInputProps = Omit<React.InputHTMLAttributes<HTMLTextAreaElement>, 'value' | 'onChange'>;
|
|
5
|
+
export declare const FormControlTextarea: ExtendedReactFunctionalComponent<React.InputHTMLAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.FormControlTextarea = void 0;
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
31
|
+
const react_textarea_autosize_1 = __importDefault(require("react-textarea-autosize"));
|
|
32
|
+
const field_context_1 = require("../field-context/field-context");
|
|
33
|
+
const utils_1 = require("src/utils");
|
|
34
|
+
require("src/styles/text-input-generic-styles.scss");
|
|
35
|
+
const FormControlTextarea = (props) => {
|
|
36
|
+
const fieldProvider = (0, react_1.useContext)(field_context_1.FieldContext);
|
|
37
|
+
return (react_1.default.createElement(react_textarea_autosize_1.default, { ...props, ...fieldProvider, inputMode: props.inputMode ?? 'text', onChange: (e) => {
|
|
38
|
+
const value = (0, utils_1.getFormikTextreaFormControlValue)(e);
|
|
39
|
+
fieldProvider.setValue(value);
|
|
40
|
+
}, className: "text-input-generic-styles",
|
|
41
|
+
// @ts-ignore
|
|
42
|
+
style: {
|
|
43
|
+
'--text-input-border-color': (fieldProvider.errors ?? '')?.length > 0
|
|
44
|
+
? 'var(--text-input-error-border-color)'
|
|
45
|
+
: 'var(--text-input-default-border-color)',
|
|
46
|
+
'--text-input-text-color': `var(${(fieldProvider.errors ?? '')?.length > 0
|
|
47
|
+
? '--text-input-error-text-color'
|
|
48
|
+
: '--text-input-default-text-color'})`,
|
|
49
|
+
'--text-input-outline-color': (fieldProvider.errors ?? '')?.length > 0
|
|
50
|
+
? 'var(--text-input-error-outline-color)'
|
|
51
|
+
: 'transparent',
|
|
52
|
+
'--text-input-background': `var(${(fieldProvider.errors ?? '')?.length > 0
|
|
53
|
+
? '--text-input-error-bg-color'
|
|
54
|
+
: '--text-input-default-bg-color'})`,
|
|
55
|
+
} }));
|
|
56
|
+
};
|
|
57
|
+
exports.FormControlTextarea = FormControlTextarea;
|
|
58
|
+
//# sourceMappingURL=form-control-textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-control-textarea.js","sourceRoot":"","sources":["../../../../../src/components/form/form-control-textarea/form-control-textarea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAC1C,sFAAuD;AAIvD,kEAA8D;AAC9D,qCAA6D;AAE7D,qDAAmD;AAI5C,MAAM,mBAAmB,GAE5B,CAAC,KAAK,EAAE,EAAE;IACZ,MAAM,aAAa,GAAG,IAAA,kBAAU,EAAC,4BAAY,CAAC,CAAC;IAE/C,OAAO,CACL,8BAAC,iCAAgB,OACX,KAAK,KACL,aAAa,EACjB,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,MAAM,EACpC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;YACd,MAAM,KAAK,GAAG,IAAA,wCAAgC,EAAC,CAAC,CAAC,CAAC;YAClD,aAAa,CAAC,QAAQ,CAAC,KAA0B,CAAC,CAAC;QACrD,CAAC,EACD,SAAS,EAAC,2BAA2B;QACrC,aAAa;QACb,KAAK,EACH;YACE,2BAA2B,EACzB,CAAC,aAAa,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC;gBACtC,CAAC,CAAC,sCAAsC;gBACxC,CAAC,CAAC,wCAAwC;YAC9C,yBAAyB,EAAE,OACzB,CAAC,aAAa,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC;gBACtC,CAAC,CAAC,+BAA+B;gBACjC,CAAC,CAAC,iCACN,GAAG;YACH,4BAA4B,EAC1B,CAAC,aAAa,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC;gBACtC,CAAC,CAAC,uCAAuC;gBACzC,CAAC,CAAC,aAAa;YACnB,yBAAyB,EAAE,OACzB,CAAC,aAAa,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC;gBACtC,CAAC,CAAC,6BAA6B;gBAC/B,CAAC,CAAC,+BACN,GAAG;SACkB,GAEzB,CACH,CAAC;AACJ,CAAC,CAAC;AAxCW,QAAA,mBAAmB,uBAwC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './form-control-textarea';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./form-control-textarea"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/form/form-control-textarea/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC"}
|
|
@@ -30,4 +30,5 @@ __exportStar(require("./form-control-select"), exports);
|
|
|
30
30
|
__exportStar(require("./select"), exports);
|
|
31
31
|
__exportStar(require("./checkbox"), exports);
|
|
32
32
|
__exportStar(require("./form-control-checkbox"), exports);
|
|
33
|
+
__exportStar(require("./form-control-textarea"), exports);
|
|
33
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/form/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,gDAA8B;AAC9B,uDAAqC;AACrC,+CAA6B;AAC7B,uDAAqC;AACrC,iDAA+B;AAC/B,uDAAqC;AACrC,0CAAwB;AACxB,+CAA6B;AAC7B,uDAAqC;AACrC,yCAAuB;AACvB,uDAAqC;AACrC,wDAAsC;AACtC,2CAAyB;AACzB,6CAA2B;AAC3B,0DAAwC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/form/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,gDAA8B;AAC9B,uDAAqC;AACrC,+CAA6B;AAC7B,uDAAqC;AACrC,iDAA+B;AAC/B,uDAAqC;AACrC,0CAAwB;AACxB,+CAA6B;AAC7B,uDAAqC;AACrC,yCAAuB;AACvB,uDAAqC;AACrC,wDAAsC;AACtC,2CAAyB;AACzB,6CAA2B;AAC3B,0DAAwC;AACxC,0DAAwC"}
|
|
@@ -35,8 +35,15 @@ export interface SendFileMessagePartChatSocketParams {
|
|
|
35
35
|
fileMeta: SendFileMessageMetaInput;
|
|
36
36
|
}
|
|
37
37
|
export interface SendFileMessageChatSocketParams {
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
content: string;
|
|
39
|
+
chatId: number;
|
|
40
|
+
senderId: number;
|
|
41
|
+
threadId?: number;
|
|
42
|
+
hidden: boolean;
|
|
43
|
+
messageType: MessageType;
|
|
44
|
+
fileUrl: string;
|
|
45
|
+
optimizedUrl: string;
|
|
46
|
+
fileMeta: SendFileMessageMetaInput;
|
|
40
47
|
}
|
|
41
48
|
export interface SendMessageSocketParams {
|
|
42
49
|
content: string;
|
|
@@ -2,3 +2,6 @@ export * from './custom-css-variables';
|
|
|
2
2
|
export * from './extended-react-functional-component';
|
|
3
3
|
export * from './chat-socket-params';
|
|
4
4
|
export * from './file-video-socket-params';
|
|
5
|
+
export * from './upload-file-output.dto';
|
|
6
|
+
export * from './upload-image-output.dto';
|
|
7
|
+
export * from './upload-videos-output.dto';
|
package/build/src/types/index.js
CHANGED
|
@@ -18,4 +18,7 @@ __exportStar(require("./custom-css-variables"), exports);
|
|
|
18
18
|
__exportStar(require("./extended-react-functional-component"), exports);
|
|
19
19
|
__exportStar(require("./chat-socket-params"), exports);
|
|
20
20
|
__exportStar(require("./file-video-socket-params"), exports);
|
|
21
|
+
__exportStar(require("./upload-file-output.dto"), exports);
|
|
22
|
+
__exportStar(require("./upload-image-output.dto"), exports);
|
|
23
|
+
__exportStar(require("./upload-videos-output.dto"), exports);
|
|
21
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,wEAAsD;AACtD,uDAAqC;AACrC,6DAA2C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,wEAAsD;AACtD,uDAAqC;AACrC,6DAA2C;AAC3C,2DAAyC;AACzC,4DAA0C;AAC1C,6DAA2C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-file-output.dto.js","sourceRoot":"","sources":["../../../src/types/upload-file-output.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-image-output.dto.js","sourceRoot":"","sources":["../../../src/types/upload-image-output.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-videos-output.dto.js","sourceRoot":"","sources":["../../../src/types/upload-videos-output.dto.ts"],"names":[],"mappings":""}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { SyntheticEvent } from 'react';
|
|
2
2
|
export declare const getFormikFormControlValue: (event: SyntheticEvent<HTMLInputElement>) => string | boolean | File | undefined;
|
|
3
|
+
export declare const getFormikTextreaFormControlValue: (event: SyntheticEvent<HTMLTextAreaElement>) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFormikFormControlValue = void 0;
|
|
3
|
+
exports.getFormikTextreaFormControlValue = exports.getFormikFormControlValue = void 0;
|
|
4
4
|
const getFormikFormControlValue = (event) => {
|
|
5
5
|
const target = event.currentTarget;
|
|
6
6
|
if (target.type === 'file') {
|
|
@@ -9,7 +9,15 @@ const getFormikFormControlValue = (event) => {
|
|
|
9
9
|
if (target.type === 'checkbox') {
|
|
10
10
|
return target.checked;
|
|
11
11
|
}
|
|
12
|
+
if (target.type === 'textearea') {
|
|
13
|
+
return target.value;
|
|
14
|
+
}
|
|
12
15
|
return target.value;
|
|
13
16
|
};
|
|
14
17
|
exports.getFormikFormControlValue = getFormikFormControlValue;
|
|
18
|
+
const getFormikTextreaFormControlValue = (event) => {
|
|
19
|
+
const target = event.currentTarget;
|
|
20
|
+
return target.value;
|
|
21
|
+
};
|
|
22
|
+
exports.getFormikTextreaFormControlValue = getFormikTextreaFormControlValue;
|
|
15
23
|
//# sourceMappingURL=get-formik-form-control-value.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-formik-form-control-value.js","sourceRoot":"","sources":["../../../../src/utils/get-formik-form-control-value/get-formik-form-control-value.ts"],"names":[],"mappings":";;;AAEO,MAAM,yBAAyB,GAAG,CAAC,KAAuC,EAAE,EAAE;IACnF,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC;IAEnC,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,EAAE;QAC1B,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;KAC5E;IAED,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU,EAAE;QAC9B,OAAO,MAAM,CAAC,OAAO,CAAC;KACvB;IAED,OAAO,MAAM,CAAC,KAAK,CAAC;AACtB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"get-formik-form-control-value.js","sourceRoot":"","sources":["../../../../src/utils/get-formik-form-control-value/get-formik-form-control-value.ts"],"names":[],"mappings":";;;AAEO,MAAM,yBAAyB,GAAG,CAAC,KAAuC,EAAE,EAAE;IACnF,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC;IAEnC,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,EAAE;QAC1B,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;KAC5E;IAED,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU,EAAE;QAC9B,OAAO,MAAM,CAAC,OAAO,CAAC;KACvB;IAED,IAAI,MAAM,CAAC,IAAI,KAAK,WAAW,EAAE;QAC/B,OAAO,MAAM,CAAC,KAAK,CAAC;KACrB;IAED,OAAO,MAAM,CAAC,KAAK,CAAC;AACtB,CAAC,CAAC;AAhBW,QAAA,yBAAyB,6BAgBpC;AAGK,MAAM,gCAAgC,GAAG,CAAC,KAA0C,EAAE,EAAE;IAC7F,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC;IACnC,OAAO,MAAM,CAAC,KAAK,CAAC;AACtB,CAAC,CAAA;AAHY,QAAA,gCAAgC,oCAG5C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@circle-vibe/shared",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.34",
|
|
4
4
|
"types": "./build/index.d.ts",
|
|
5
5
|
"description": "Shared componenets, utils, hooks",
|
|
6
6
|
"scripts": {
|
|
@@ -70,5 +70,8 @@
|
|
|
70
70
|
"typescript-eslint": "^8.31.1",
|
|
71
71
|
"webpack": "^5.91.0",
|
|
72
72
|
"webpack-cli": "^5.1.4"
|
|
73
|
+
},
|
|
74
|
+
"optionalDependencies": {
|
|
75
|
+
"react-textarea-autosize": "^8.5.9"
|
|
73
76
|
}
|
|
74
77
|
}
|