@antscorp/antsomi-ui 2.0.3 → 2.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.
Files changed (42) hide show
  1. package/es/components/icons/ArticleIcon.d.ts +3 -0
  2. package/es/components/icons/ArticleIcon.js +10 -0
  3. package/es/components/icons/CustomerInformationIcon.d.ts +3 -0
  4. package/es/components/icons/CustomerInformationIcon.js +13 -0
  5. package/es/components/icons/EditFilledIcon.d.ts +3 -0
  6. package/es/components/icons/EditFilledIcon.js +8 -0
  7. package/es/components/icons/ItemRecommendationIcon.d.ts +3 -0
  8. package/es/components/icons/ItemRecommendationIcon.js +10 -0
  9. package/es/components/icons/LazyIcon/LazyIcon.d.ts +5 -0
  10. package/es/components/icons/LazyIcon/LazyIcon.js +5 -0
  11. package/es/components/icons/UserActivityIcon.d.ts +3 -0
  12. package/es/components/icons/UserActivityIcon.js +16 -0
  13. package/es/components/icons/index.d.ts +5 -0
  14. package/es/components/icons/index.js +5 -0
  15. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +23 -0
  16. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +38 -24
  17. package/es/components/molecules/EditableName/EditableName.d.ts +1 -0
  18. package/es/components/molecules/EditableName/EditableName.js +5 -6
  19. package/es/components/molecules/EditorTab/EditorTab.js +48 -51
  20. package/es/components/molecules/EditorTab/styled.js +19 -12
  21. package/es/components/molecules/MatchAnySelect/MatchesAnySelect.d.ts +2 -2
  22. package/es/components/molecules/MatchAnySelect/MatchesAnySelect.js +92 -96
  23. package/es/components/molecules/MatchAnySelect/constants.js +0 -20
  24. package/es/components/molecules/MatchAnySelect/mock.d.ts +21 -0
  25. package/es/components/molecules/MatchAnySelect/mock.js +3309 -0
  26. package/es/components/molecules/MatchAnySelect/styled.d.ts +17 -1
  27. package/es/components/molecules/MatchAnySelect/styled.js +8 -1
  28. package/es/components/molecules/MatchAnySelect/types.d.ts +8 -6
  29. package/es/components/molecules/MatchAnySelect/utils.d.ts +2 -0
  30. package/es/components/molecules/MatchAnySelect/utils.js +42 -0
  31. package/es/components/molecules/SearchPopover/components/PopoverSelect/PopoverSelect.js +6 -2
  32. package/es/components/molecules/Tree/Tree.d.ts +4 -12
  33. package/es/components/molecules/Tree/Tree.js +6 -3
  34. package/es/components/molecules/Tree/styled.js +24 -5
  35. package/es/components/organism/DataTable/hooks/useAddFilterButton.d.ts +1 -1
  36. package/es/constants/theme.js +16 -15
  37. package/es/index.d.ts +1 -1
  38. package/es/index.js +1 -1
  39. package/es/providers/ConfigProvider/GlobalStyle.js +8 -0
  40. package/es/utils/common.d.ts +11 -0
  41. package/es/utils/common.js +28 -0
  42. package/package.json +2 -1
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IconProps } from './types';
3
+ export declare const ArticleIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,10 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { useIcon } from './hooks/useIcon';
3
+ export const ArticleIcon = forwardRef((props, ref) => {
4
+ const { width, height } = useIcon(props);
5
+ return (React.createElement("svg", Object.assign({ viewBox: "0 0 30 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { ref: ref, width: width, height: height }),
6
+ React.createElement("rect", { x: "7", y: "2", width: "16", height: "16", rx: "2", stroke: "#595959", strokeWidth: "2" }),
7
+ React.createElement("rect", { x: "10", y: "5", width: "10", height: "2", fill: "#EF3340" }),
8
+ React.createElement("rect", { x: "10", y: "9", width: "10", height: "2", fill: "#005EB8" }),
9
+ React.createElement("rect", { x: "10", y: "13", width: "7", height: "2", fill: "#7F7F7F" })));
10
+ });
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IconProps } from './types';
3
+ export declare const CustomerInformationIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,13 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { useIcon } from './hooks/useIcon';
3
+ export const CustomerInformationIcon = forwardRef((props, ref) => {
4
+ const { width, height } = useIcon(props);
5
+ return (React.createElement("svg", Object.assign({ viewBox: "0 0 30 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { ref: ref, width: width, height: height }),
6
+ React.createElement("path", { d: "M1 15V13.75C1 13.75 2.188 11.25 6 11.25C9.812 11.25 11 13.75 11 13.75V15H1ZM3.5 7.5C3.5 7.00555 3.64662 6.52221 3.92133 6.11109C4.19603 5.69996 4.58646 5.37953 5.04327 5.19031C5.50009 5.00109 6.00278 4.95157 6.48773 5.04804C6.97268 5.1445 7.41813 5.38261 7.76776 5.73224C8.11739 6.08187 8.3555 6.52732 8.45197 7.01227C8.54843 7.49722 8.49891 7.99991 8.30969 8.45673C8.12047 8.91354 7.80004 9.30397 7.38892 9.57868C6.97779 9.85338 6.49445 10 6 10C5.33696 10 4.70108 9.7366 4.23224 9.26776C3.7634 8.79892 3.5 8.16304 3.5 7.5Z", fill: "#595959" }),
7
+ React.createElement("rect", { x: "14", y: "5", width: "5", height: "2", fill: "#005EB8" }),
8
+ React.createElement("rect", { x: "21", y: "5", width: "7", height: "2", fill: "#595959" }),
9
+ React.createElement("rect", { x: "14", y: "9", width: "5", height: "2", fill: "#005EB8" }),
10
+ React.createElement("rect", { x: "21", y: "9", width: "8", height: "2", fill: "#595959" }),
11
+ React.createElement("rect", { x: "14", y: "13", width: "5", height: "2", fill: "#005EB8" }),
12
+ React.createElement("rect", { x: "21", y: "13", width: "6", height: "2", fill: "#595959" })));
13
+ });
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IconProps } from './types';
3
+ export declare const EditFilledIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,8 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { useIcon } from './hooks/useIcon';
3
+ export const EditFilledIcon = forwardRef((props, ref) => {
4
+ const { width, height } = useIcon(props);
5
+ return (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor" }, props, { ref: ref, width: width, height: height }),
6
+ React.createElement("path", { d: "M0 0h24v24H0z", fill: "none" }),
7
+ React.createElement("path", { d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" })));
8
+ });
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IconProps } from './types';
3
+ export declare const ItemRecommendationIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,10 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { useIcon } from './hooks/useIcon';
3
+ export const ItemRecommendationIcon = forwardRef((props, ref) => {
4
+ const { width, height } = useIcon(props);
5
+ return (React.createElement("svg", Object.assign({ viewBox: "0 0 30 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { ref: ref, width: width, height: height }),
6
+ React.createElement("path", { d: "M19 10.5C19.7188 10.5 20.3438 11.0938 20.3438 11.8438V19.8438C20.3438 20.5625 19.7188 21.1562 19 21.1562H11C10.2812 21.1562 9.65625 20.5625 9.65625 19.8438V11.8438C9.65625 11.0938 10.2812 10.5 11 10.5H12.3438C12.3438 9.03125 13.5312 7.84375 15 7.84375C16.4688 7.84375 17.6562 9.03125 17.6562 10.5H19ZM15 9.15625C14.2812 9.15625 13.6562 9.78125 13.6562 10.5H16.3438C16.3438 9.78125 15.7188 9.15625 15 9.15625ZM19 19.8438V11.8438H17.6562V13.1562C17.6562 13.5312 17.375 13.8438 17 13.8438C16.625 13.8438 16.3438 13.5312 16.3438 13.1562V11.8438H13.6562V13.1562C13.6562 13.5312 13.375 13.8438 13 13.8438C12.625 13.8438 12.3438 13.5312 12.3438 13.1562V11.8438H11V19.8438H19Z", fill: "#595959" }),
7
+ React.createElement("path", { d: "M8 8.25L5.9375 9.5L6.48438 7.15625L4.67188 5.57812L7.0625 5.375L8 3.17188L8.9375 5.375L11.3281 5.57812L9.51562 7.15625L10.0625 9.5L8 8.25Z", fill: "#005EB8" }),
8
+ React.createElement("path", { d: "M15 5.25L12.9375 6.5L13.4844 4.15625L11.6719 2.57812L14.0625 2.375L15 0.171875L15.9375 2.375L18.3281 2.57812L16.5156 4.15625L17.0625 6.5L15 5.25Z", fill: "#005EB8" }),
9
+ React.createElement("path", { d: "M22 8.25L19.9375 9.5L20.4844 7.15625L18.6719 5.57812L21.0625 5.375L22 3.17188L22.9375 5.375L25.3281 5.57812L23.5156 7.15625L24.0625 9.5L22 8.25Z", fill: "#005EB8" })));
10
+ });
@@ -22,6 +22,7 @@ export declare const LazyIcon: {
22
22
  AnlyticModelsIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
23
23
  ArrowGrowIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
24
24
  ArrowLineIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
25
+ ArticleIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
25
26
  AssignmentIndIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
26
27
  AttachmentIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
27
28
  AudioRecordIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
@@ -84,6 +85,7 @@ export declare const LazyIcon: {
84
85
  CursorIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
85
86
  CurvedConnectorIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
86
87
  CustomerIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
88
+ CustomerInformationIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
87
89
  CustomerJourney30Icon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
88
90
  CustomerJourneyIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
89
91
  Customers30Icon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
@@ -120,6 +122,7 @@ export declare const LazyIcon: {
120
122
  DynamicFormIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
121
123
  DynamicImageIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
122
124
  DynamicTextIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
125
+ EditFilledIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
123
126
  EditIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
124
127
  ElbowConnectorIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
125
128
  EmailTemplate30Icon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
@@ -191,6 +194,7 @@ export declare const LazyIcon: {
191
194
  InvisibleIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
192
195
  InvitePeopleIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
193
196
  IssueBugIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
197
+ ItemRecommendationIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
194
198
  JourneyTactic30Icon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
195
199
  JourneyTacticIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
196
200
  LayerIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
@@ -334,6 +338,7 @@ export declare const LazyIcon: {
334
338
  Unknown30Icon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
335
339
  UploadIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
336
340
  UploadMenuIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
341
+ UserActivityIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
337
342
  UserAttributesIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
338
343
  UserIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
339
344
  ValidateFormatIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
@@ -22,6 +22,7 @@ export const LazyIcon = {
22
22
  AnlyticModelsIcon: lazy(() => import('../AnlyticModelsIcon').then(m => ({ default: m.AnlyticModelsIcon }))),
23
23
  ArrowGrowIcon: lazy(() => import('../ArrowGrowIcon').then(m => ({ default: m.ArrowGrowIcon }))),
24
24
  ArrowLineIcon: lazy(() => import('../ArrowLineIcon').then(m => ({ default: m.ArrowLineIcon }))),
25
+ ArticleIcon: lazy(() => import('../ArticleIcon').then(m => ({ default: m.ArticleIcon }))),
25
26
  AssignmentIndIcon: lazy(() => import('../AssignmentIndIcon').then(m => ({ default: m.AssignmentIndIcon }))),
26
27
  AttachmentIcon: lazy(() => import('../AttachmentIcon').then(m => ({ default: m.AttachmentIcon }))),
27
28
  AudioRecordIcon: lazy(() => import('../AudioRecordIcon').then(m => ({ default: m.AudioRecordIcon }))),
@@ -90,6 +91,7 @@ export const LazyIcon = {
90
91
  CursorIcon: lazy(() => import('../CursorIcon').then(m => ({ default: m.CursorIcon }))),
91
92
  CurvedConnectorIcon: lazy(() => import('../CurvedConnectorIcon').then(m => ({ default: m.CurvedConnectorIcon }))),
92
93
  CustomerIcon: lazy(() => import('../CustomerIcon').then(m => ({ default: m.CustomerIcon }))),
94
+ CustomerInformationIcon: lazy(() => import('../CustomerInformationIcon').then(m => ({ default: m.CustomerInformationIcon }))),
93
95
  CustomerJourney30Icon: lazy(() => import('../CustomerJourney30Icon').then(m => ({ default: m.CustomerJourney30Icon }))),
94
96
  CustomerJourneyIcon: lazy(() => import('../CustomerJourneyIcon').then(m => ({ default: m.CustomerJourneyIcon }))),
95
97
  Customers30Icon: lazy(() => import('../Customers30Icon').then(m => ({ default: m.Customers30Icon }))),
@@ -126,6 +128,7 @@ export const LazyIcon = {
126
128
  DynamicFormIcon: lazy(() => import('../DynamicFormIcon').then(m => ({ default: m.DynamicFormIcon }))),
127
129
  DynamicImageIcon: lazy(() => import('../DynamicImageIcon').then(m => ({ default: m.DynamicImageIcon }))),
128
130
  DynamicTextIcon: lazy(() => import('../DynamicTextIcon').then(m => ({ default: m.DynamicTextIcon }))),
131
+ EditFilledIcon: lazy(() => import('../EditFilledIcon').then(m => ({ default: m.EditFilledIcon }))),
129
132
  EditIcon: lazy(() => import('../EditIcon').then(m => ({ default: m.EditIcon }))),
130
133
  ElbowConnectorIcon: lazy(() => import('../ElbowConnectorIcon').then(m => ({ default: m.ElbowConnectorIcon }))),
131
134
  EmailTemplate30Icon: lazy(() => import('../EmailTemplate30Icon').then(m => ({ default: m.EmailTemplate30Icon }))),
@@ -197,6 +200,7 @@ export const LazyIcon = {
197
200
  InvisibleIcon: lazy(() => import('../InvisibleIcon').then(m => ({ default: m.InvisibleIcon }))),
198
201
  InvitePeopleIcon: lazy(() => import('../InvitePeopleIcon').then(m => ({ default: m.InvitePeopleIcon }))),
199
202
  IssueBugIcon: lazy(() => import('../IssueBugIcon').then(m => ({ default: m.IssueBugIcon }))),
203
+ ItemRecommendationIcon: lazy(() => import('../ItemRecommendationIcon').then(m => ({ default: m.ItemRecommendationIcon }))),
200
204
  JourneyTactic30Icon: lazy(() => import('../JourneyTactic30Icon').then(m => ({ default: m.JourneyTactic30Icon }))),
201
205
  JourneyTacticIcon: lazy(() => import('../JourneyTacticIcon').then(m => ({ default: m.JourneyTacticIcon }))),
202
206
  LayerIcon: lazy(() => import('../LayerIcon').then(m => ({ default: m.LayerIcon }))),
@@ -340,6 +344,7 @@ export const LazyIcon = {
340
344
  Unknown30Icon: lazy(() => import('../Unknown30Icon').then(m => ({ default: m.Unknown30Icon }))),
341
345
  UploadIcon: lazy(() => import('../UploadIcon').then(m => ({ default: m.UploadIcon }))),
342
346
  UploadMenuIcon: lazy(() => import('../UploadMenuIcon').then(m => ({ default: m.UploadMenuIcon }))),
347
+ UserActivityIcon: lazy(() => import('../UserActivityIcon').then(m => ({ default: m.UserActivityIcon }))),
343
348
  UserAttributesIcon: lazy(() => import('../UserAttributesIcon').then(m => ({ default: m.UserAttributesIcon }))),
344
349
  UserIcon: lazy(() => import('../UserIcon').then(m => ({ default: m.UserIcon }))),
345
350
  ValidateFormatIcon: lazy(() => import('../ValidateFormatIcon').then(m => ({ default: m.ValidateFormatIcon }))),
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IconProps } from './types';
3
+ export declare const UserActivityIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,16 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { useIcon } from './hooks/useIcon';
3
+ export const UserActivityIcon = forwardRef((props, ref) => {
4
+ const { width, height } = useIcon(props);
5
+ return (React.createElement("svg", Object.assign({ viewBox: "0 0 30 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { ref: ref, width: width, height: height }),
6
+ React.createElement("circle", { cx: "22", cy: "17", r: "3", fill: "#EF3340" }),
7
+ React.createElement("circle", { cx: "15", cy: "3", r: "3", fill: "#EF3340" }),
8
+ React.createElement("circle", { cx: "22", cy: "3", r: "2", fill: "#595959" }),
9
+ React.createElement("circle", { cx: "8", cy: "10", r: "2", fill: "#595959" }),
10
+ React.createElement("circle", { cx: "8", cy: "10", r: "3", fill: "#EF3340" }),
11
+ React.createElement("circle", { cx: "15", cy: "17", r: "2", fill: "#005EB8" }),
12
+ React.createElement("circle", { cx: "15", cy: "10", r: "2", fill: "#005EB8" }),
13
+ React.createElement("circle", { cx: "8", cy: "17", r: "1", fill: "#595959" }),
14
+ React.createElement("circle", { cx: "8", cy: "3", r: "1", fill: "#595959" }),
15
+ React.createElement("circle", { cx: "22", cy: "10", r: "2", fill: "#005EB8" })));
16
+ });
@@ -20,6 +20,7 @@ export { AnlysisIcon } from './AnlysisIcon';
20
20
  export { AnlyticModelsIcon } from './AnlyticModelsIcon';
21
21
  export { ArrowGrowIcon } from './ArrowGrowIcon';
22
22
  export { ArrowLineIcon } from './ArrowLineIcon';
23
+ export { ArticleIcon } from './ArticleIcon';
23
24
  export { AssignmentIndIcon } from './AssignmentIndIcon';
24
25
  export { AttachmentIcon } from './AttachmentIcon';
25
26
  export { AudioRecordIcon } from './AudioRecordIcon';
@@ -82,6 +83,7 @@ export { CropIcon } from './CropIcon';
82
83
  export { CursorIcon } from './CursorIcon';
83
84
  export { CurvedConnectorIcon } from './CurvedConnectorIcon';
84
85
  export { CustomerIcon } from './CustomerIcon';
86
+ export { CustomerInformationIcon } from './CustomerInformationIcon';
85
87
  export { CustomerJourney30Icon } from './CustomerJourney30Icon';
86
88
  export { CustomerJourneyIcon } from './CustomerJourneyIcon';
87
89
  export { Customers30Icon } from './Customers30Icon';
@@ -118,6 +120,7 @@ export { DuplicateIcon } from './DuplicateIcon';
118
120
  export { DynamicFormIcon } from './DynamicFormIcon';
119
121
  export { DynamicImageIcon } from './DynamicImageIcon';
120
122
  export { DynamicTextIcon } from './DynamicTextIcon';
123
+ export { EditFilledIcon } from './EditFilledIcon';
121
124
  export { EditIcon } from './EditIcon';
122
125
  export { ElbowConnectorIcon } from './ElbowConnectorIcon';
123
126
  export { EmailTemplate30Icon } from './EmailTemplate30Icon';
@@ -189,6 +192,7 @@ export { InteractiveIcon } from './InteractiveIcon';
189
192
  export { InvisibleIcon } from './InvisibleIcon';
190
193
  export { InvitePeopleIcon } from './InvitePeopleIcon';
191
194
  export { IssueBugIcon } from './IssueBugIcon';
195
+ export { ItemRecommendationIcon } from './ItemRecommendationIcon';
192
196
  export { JourneyTactic30Icon } from './JourneyTactic30Icon';
193
197
  export { JourneyTacticIcon } from './JourneyTacticIcon';
194
198
  export { LayerIcon } from './LayerIcon';
@@ -330,6 +334,7 @@ export { UndoIcon } from './UndoIcon';
330
334
  export { Unknown30Icon } from './Unknown30Icon';
331
335
  export { UploadIcon } from './UploadIcon';
332
336
  export { UploadMenuIcon } from './UploadMenuIcon';
337
+ export { UserActivityIcon } from './UserActivityIcon';
333
338
  export { UserAttributesIcon } from './UserAttributesIcon';
334
339
  export { UserIcon } from './UserIcon';
335
340
  export { ValidateFormatIcon } from './ValidateFormatIcon';
@@ -20,6 +20,7 @@ export { AnlysisIcon } from './AnlysisIcon';
20
20
  export { AnlyticModelsIcon } from './AnlyticModelsIcon';
21
21
  export { ArrowGrowIcon } from './ArrowGrowIcon';
22
22
  export { ArrowLineIcon } from './ArrowLineIcon';
23
+ export { ArticleIcon } from './ArticleIcon';
23
24
  export { AssignmentIndIcon } from './AssignmentIndIcon';
24
25
  export { AttachmentIcon } from './AttachmentIcon';
25
26
  export { AudioRecordIcon } from './AudioRecordIcon';
@@ -82,6 +83,7 @@ export { CropIcon } from './CropIcon';
82
83
  export { CursorIcon } from './CursorIcon';
83
84
  export { CurvedConnectorIcon } from './CurvedConnectorIcon';
84
85
  export { CustomerIcon } from './CustomerIcon';
86
+ export { CustomerInformationIcon } from './CustomerInformationIcon';
85
87
  export { CustomerJourney30Icon } from './CustomerJourney30Icon';
86
88
  export { CustomerJourneyIcon } from './CustomerJourneyIcon';
87
89
  export { Customers30Icon } from './Customers30Icon';
@@ -118,6 +120,7 @@ export { DuplicateIcon } from './DuplicateIcon';
118
120
  export { DynamicFormIcon } from './DynamicFormIcon';
119
121
  export { DynamicImageIcon } from './DynamicImageIcon';
120
122
  export { DynamicTextIcon } from './DynamicTextIcon';
123
+ export { EditFilledIcon } from './EditFilledIcon';
121
124
  export { EditIcon } from './EditIcon';
122
125
  export { ElbowConnectorIcon } from './ElbowConnectorIcon';
123
126
  export { EmailTemplate30Icon } from './EmailTemplate30Icon';
@@ -189,6 +192,7 @@ export { InteractiveIcon } from './InteractiveIcon';
189
192
  export { InvisibleIcon } from './InvisibleIcon';
190
193
  export { InvitePeopleIcon } from './InvitePeopleIcon';
191
194
  export { IssueBugIcon } from './IssueBugIcon';
195
+ export { ItemRecommendationIcon } from './ItemRecommendationIcon';
192
196
  export { JourneyTactic30Icon } from './JourneyTactic30Icon';
193
197
  export { JourneyTacticIcon } from './JourneyTacticIcon';
194
198
  export { LayerIcon } from './LayerIcon';
@@ -330,6 +334,7 @@ export { UndoIcon } from './UndoIcon';
330
334
  export { Unknown30Icon } from './Unknown30Icon';
331
335
  export { UploadIcon } from './UploadIcon';
332
336
  export { UploadMenuIcon } from './UploadMenuIcon';
337
+ export { UserActivityIcon } from './UserActivityIcon';
333
338
  export { UserAttributesIcon } from './UserAttributesIcon';
334
339
  export { UserIcon } from './UserIcon';
335
340
  export { ValidateFormatIcon } from './ValidateFormatIcon';
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import type { Dayjs } from 'dayjs';
2
3
  import { TAdvancedType, TCalculationType, TOperatorKey, TOption, TShowCalculationTypeCondition, ValueTypes } from './types';
3
4
  export interface AdvancedPickerProps {
4
5
  label?: string;
@@ -22,6 +23,28 @@ export interface AdvancedPickerProps {
22
23
  showTime?: boolean;
23
24
  timezone?: string;
24
25
  isViewMode?: boolean;
26
+ /**
27
+ *
28
+ * @example const disabledTime = (date?: Dayjs) => {
29
+ if (date?.get('date') !== 31)
30
+ return {
31
+ disabledHours: () => [],
32
+ disabledMinutes: () => [],
33
+ disabledSeconds: () => [],
34
+ };
35
+
36
+ return {
37
+ disabledHours: () => range(0, 24).splice(4, 20),
38
+ disabledMinutes: () => range(30, 60),
39
+ disabledSeconds: () => [55, 56],
40
+ };
41
+ };
42
+ */
43
+ disabledTime?: (date?: Dayjs) => {
44
+ disabledHours: () => number[];
45
+ disabledMinutes: () => number[];
46
+ disabledSeconds: () => number[];
47
+ };
25
48
  /**
26
49
  * Only show fixed calendar (hide dynamic and )
27
50
  */
@@ -22,15 +22,29 @@ import { calculationDateAdvanced, getCellRender, getFormatDisplay, getPickerRend
22
22
  import { DatePickerCustomInput, DatePickerHeader, DropdownContent, DropdownHeader, DatePickerFooter, DropdownFooter, CalendarIconWrapper, InputStyled, TimeLabel, } from './styled';
23
23
  // Constants
24
24
  import { CALCULATION_DATES, CALCULATION_TYPES, DATE_TYPES, DEFAULT_DATE_FORMAT, VALUE_TYPES, ADVANCED_PICKER_TYPE, WEEK_ARR, QUARTER_PLACEHOLDER, WEEK_PLACEHOLDER, DAY_LABEL_SHORT, MONTH_LABEL_FULL, DAY_OF_MONTH, ANCHOR_LEAP_YEAR, GRANULARITY_MAPPING, } from './constants';
25
- import { THEME } from '@antscorp/antsomi-ui/es/constants';
25
+ import { globalToken, THEME } from '@antscorp/antsomi-ui/es/constants';
26
26
  import { useOutsideClick } from '@antscorp/antsomi-ui/es/hooks/useOutsideClick';
27
+ const isDisabledSpecificTime = (current, info, disabledTime, date) => {
28
+ if (typeof current !== 'number' || !disabledTime)
29
+ return false;
30
+ switch (info.subType) {
31
+ case 'hour':
32
+ return disabledTime(date).disabledHours().includes(current);
33
+ case 'minute':
34
+ return disabledTime(date).disabledMinutes().includes(current);
35
+ case 'second':
36
+ return disabledTime(date).disabledSeconds().includes(current);
37
+ default:
38
+ return false;
39
+ }
40
+ };
27
41
  const PATH = '@antscorp/antsomi-ui/es/components/molecules/DatePicker/components/Advanced/DatePickerAdvanced.tsx';
28
42
  const { useToken } = theme;
29
43
  const { Text } = Typography;
30
44
  export const AdvancedPicker = props => {
31
45
  var _a, _b;
32
46
  // Props
33
- const { label, inputStyle, popupStyle, dateTypeKeysShow, calculationTypeKeysShow, showCalculationTypeCondition, defaultDateTypeKey, valueType, option: propsOption, operatorKey, type, date: propsDate, format, formatInputDisplay, errorMessage, disableAfterDate, disableBeforeDate, showTime, disabled, timezone, isViewMode, onlyShowFixed, onUpdatedNewDate, onApply, } = props;
47
+ const { label, inputStyle, popupStyle, dateTypeKeysShow, calculationTypeKeysShow, showCalculationTypeCondition, defaultDateTypeKey, valueType, option: propsOption, operatorKey, type, date: propsDate, format, formatInputDisplay, errorMessage, disableAfterDate, disableBeforeDate, showTime, disabled, timezone, isViewMode, onlyShowFixed, disabledTime, onUpdatedNewDate, onApply, } = props;
34
48
  // Memo
35
49
  const newDateTypes = useMemo(() => {
36
50
  if (dateTypeKeysShow && dateTypeKeysShow.length) {
@@ -343,19 +357,20 @@ export const AdvancedPicker = props => {
343
357
  renderDropdownFooter()));
344
358
  };
345
359
  const cellRender = useCallback((current, info) => {
346
- const onChangeDatePicker = (value) => {
347
- try {
348
- setState(state => (Object.assign(Object.assign({}, state), { date: dayjs(value).format(format) })));
349
- }
350
- catch (error) {
351
- handleError(error, {
352
- path: PATH,
353
- name: 'onChangeDatePicker',
354
- args: { value },
355
- });
356
- }
357
- };
358
- return (React.createElement("div", { className: "antsomi-picker-cell-inner", style: { pointerEvents: 'all', width: '100%' }, onClick: e => {
360
+ const isDisabledTime = isDisabledSpecificTime(current, info, disabledTime, dayjs(date));
361
+ return (React.createElement("div", { className: "antsomi-picker-cell-inner", style: Object.assign({ pointerEvents: 'all', width: '100%' }, (isDisabledTime
362
+ ? {
363
+ color: globalToken === null || globalToken === void 0 ? void 0 : globalToken.colorTextDisabled,
364
+ opacity: 0.5,
365
+ background: globalToken === null || globalToken === void 0 ? void 0 : globalToken.bw2,
366
+ cursor: 'default',
367
+ }
368
+ : {})), onClick: e => {
369
+ if (isDisabledTime) {
370
+ e.preventDefault();
371
+ e.stopPropagation();
372
+ return;
373
+ }
359
374
  if (info.type === 'time' && typeof current === 'number') {
360
375
  e.preventDefault();
361
376
  e.stopPropagation();
@@ -373,8 +388,10 @@ export const AdvancedPicker = props => {
373
388
  default:
374
389
  break;
375
390
  }
376
- if (newDate)
377
- onChangeDatePicker(newDate);
391
+ if (newDate) {
392
+ setState(state => (Object.assign(Object.assign({}, state), { date: dayjs(newDate).format(format) })));
393
+ }
394
+ // if (newDate) onChangeDatePicker(newDate);
378
395
  return;
379
396
  }
380
397
  if (info.type === 'decade' ||
@@ -383,9 +400,10 @@ export const AdvancedPicker = props => {
383
400
  return;
384
401
  e.preventDefault();
385
402
  e.stopPropagation();
386
- onChangeDatePicker(current);
403
+ setState(state => (Object.assign(Object.assign({}, state), { date: dayjs(current).format(format) })));
404
+ // onChangeDatePicker(current);
387
405
  } }, getCellRender(current, valueType, info)));
388
- }, [valueType, format, date]);
406
+ }, [valueType, format, date, disabledTime]);
389
407
  if (isViewMode)
390
408
  return (React.createElement(Space, { direction: "vertical", size: 5, className: "antsomi-advanced-picker-container", ref: ref },
391
409
  !!label && typeof label === 'string' ? (React.createElement(Text, { style: { color: '#666666' } }, label)) : (label),
@@ -393,11 +411,7 @@ export const AdvancedPicker = props => {
393
411
  return (React.createElement(Space, { direction: "vertical", size: 5, className: "antsomi-advanced-picker-container", ref: onlyShowFixed ? undefined : ref },
394
412
  !!label && typeof label === 'string' ? (React.createElement(Text, { style: { color: '#666666' } }, label)) : (label),
395
413
  isShowFixed && !['WEEK', 'DAY_OF_WEEK', 'MONTH_DAY', 'DAY'].includes(valueType) ? (React.createElement(Tooltip, { title: selectedDateTitle },
396
- React.createElement(DatePicker, { disabled: disabled, open: !disabled && isOpen, popupStyle: popupStyle, allowClear: false, inputReadOnly: true, style: Object.assign({ textOverflow: 'ellipsis' }, inputStyle), status: errorMessage ? 'error' : '', inputRender: () => (React.createElement(DatePickerCustomInput, { readOnly: true, placeholder: "Select Date", value: selectedDateTitle, onClick: () => toggleOpenDropdown() })), value: currDate,
397
- // style={{
398
- // width: 120,
399
- // }}
400
- disabledDate: disableDate, format: formatDisplay, showToday: false, popupClassName: clsx('antsomi-picker-dropdown__advanced', {
414
+ React.createElement(DatePicker, { disabled: disabled, open: !disabled && isOpen, popupStyle: popupStyle, allowClear: false, inputReadOnly: true, style: Object.assign({ textOverflow: 'ellipsis' }, inputStyle), status: errorMessage ? 'error' : '', inputRender: () => (React.createElement(DatePickerCustomInput, { readOnly: true, placeholder: "Select Date", value: selectedDateTitle, onClick: () => toggleOpenDropdown() })), value: currDate, disabledDate: disableDate, format: formatDisplay, showToday: false, popupClassName: clsx('antsomi-picker-dropdown__advanced', {
401
415
  '--error': errorMessage,
402
416
  'hide-picker-header': ['QUARTER', 'MONTH'].includes(valueType),
403
417
  'only-show-time-picker': ['HOUR', 'MINUTE'].includes(valueType),
@@ -12,6 +12,7 @@ interface EditableNameProps {
12
12
  style?: React.CSSProperties;
13
13
  readonly?: boolean;
14
14
  maxLength?: number;
15
+ editIcon?: React.ReactNode;
15
16
  onBlur?: React.FocusEventHandler<HTMLInputElement>;
16
17
  onChange?: (value: string) => void;
17
18
  }
@@ -8,7 +8,7 @@ import { Spin } from '../../atoms';
8
8
  import { EditIcon } from '../../icons';
9
9
  export const EditableName = React.forwardRef((props, ref) => {
10
10
  var _a;
11
- const { className, isLoading, required, error, value, style, readonly, maxLength = 255, onBlur, onChange, } = props;
11
+ const { className, isLoading, required, error, value, style, readonly, maxLength = 255, editIcon, onBlur, onChange, } = props;
12
12
  const defaultValue = useRef(props.defaultValue);
13
13
  const [inputWidth, setInputWidth] = useState(1);
14
14
  const [internalValue, setInternalValue] = useState(value || defaultValue.current || '');
@@ -70,10 +70,9 @@ export const EditableName = React.forwardRef((props, ref) => {
70
70
  isLoading ? (React.createElement(Spin, { indicatorSize: 20, style: { paddingLeft: '5px', marginLeft: '10px', alignSelf: 'center' } })) : null,
71
71
  (error || requiredError) && !isLoading ? (React.createElement("div", { className: "suffix-icon-error" },
72
72
  React.createElement(Tooltip, { title: error || requiredError },
73
- React.createElement(Icon, { type: "icon-ants-warning-circle", style: { color: '#F44336', fontSize: '19.2px' } })))) : readonly ? null : (React.createElement("div", { className: "suffix-icon" },
74
- React.createElement(EditIcon, { style: { color: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.blue7 }, onClick: () => {
75
- var _a;
76
- (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
77
- } }))),
73
+ React.createElement(Icon, { type: "icon-ants-warning-circle", style: { color: '#F44336', fontSize: '19.2px' } })))) : readonly ? null : (React.createElement("div", { className: "suffix-icon" }, editIcon || (React.createElement(EditIcon, { style: { color: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.blue7 }, onClick: () => {
74
+ var _a;
75
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
76
+ } })))),
78
77
  React.createElement("span", { ref: spanRef, className: "hidden-span" })));
79
78
  });
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  // Lib
11
11
  import React, { useCallback, useEffect, useRef, useState } from 'react';
12
12
  import classnames from 'classnames';
13
+ import { useInView } from 'react-intersection-observer';
13
14
  // Components
14
15
  import Icon from '@antscorp/icons/main';
15
16
  import { Button, Typography, Dropdown, ContentEditable, Modal, } from '@antscorp/antsomi-ui/es/components';
@@ -19,7 +20,7 @@ import { EditorTabStyled } from './styled';
19
20
  import { handleError } from '@antscorp/antsomi-ui/es/utils';
20
21
  const PATH = 'src/components/EditorTab/index.jsx';
21
22
  export const EditorTab = props => {
22
- var _a, _b, _c, _d, _e;
23
+ var _a;
23
24
  const { listTab = [], activeId = '', showArrow, showDropdown, editNameOnConfigure,
24
25
  // disabledScroll,
25
26
  onCloseTab, onClickRemoveTab, onConfirmRemove, onActiveTab, onAddTab, onConfigure, onSaveName, newTabText, showComposeNewQuery, className, leftBlockClassName, tabItemClassName, confirmOnRemoveTab, modalFuncProps, } = props;
@@ -28,17 +29,10 @@ export const EditorTab = props => {
28
29
  const [isEditable, setIsEditable] = useState();
29
30
  const [modal, contextModal] = Modal.useModal();
30
31
  // Ref
31
- const [offsetWidth, setOffsetWidth] = useState(0);
32
- const [scrollWidth, setScrollWidth] = useState(0);
33
32
  const leftBlockRef = useRef(null);
34
- const isLeftBlockOverflow = ((_b = leftBlockRef.current) === null || _b === void 0 ? void 0 : _b.offsetWidth) && ((_c = leftBlockRef.current) === null || _c === void 0 ? void 0 : _c.scrollWidth)
35
- ? ((_d = leftBlockRef.current) === null || _d === void 0 ? void 0 : _d.offsetWidth) < ((_e = leftBlockRef.current) === null || _e === void 0 ? void 0 : _e.scrollWidth)
36
- : offsetWidth < scrollWidth;
37
- useEffect(() => {
38
- var _a, _b;
39
- setOffsetWidth(((_a = leftBlockRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) || 0);
40
- setScrollWidth(((_b = leftBlockRef.current) === null || _b === void 0 ? void 0 : _b.scrollWidth) || 0);
41
- }, []);
33
+ const { ref: anchorLeftElRef, inView: anchorLeftElRefInView } = useInView();
34
+ const { ref: anchorRightElRef, inView: anchorRightElRefInView } = useInView();
35
+ const isLeftBlockOverflow = !anchorLeftElRefInView || !anchorRightElRefInView;
42
36
  useEffect(() => {
43
37
  if (listTab.length - arrTabs.length === 1) {
44
38
  setActiveTabId(listTab[listTab.length - 1].id);
@@ -104,7 +98,7 @@ export const EditorTab = props => {
104
98
  onActiveTab(tabId);
105
99
  }, [onActiveTab]);
106
100
  const handleCloseTab = (e, tab, idx) => __awaiter(void 0, void 0, void 0, function* () {
107
- var _f, _g;
101
+ var _b, _c;
108
102
  e.stopPropagation();
109
103
  // if (arrTabs.length < 2) {
110
104
  // return;
@@ -120,10 +114,10 @@ export const EditorTab = props => {
120
114
  return;
121
115
  if (activeTabId === tab.id) {
122
116
  if (idx === arrTabs.length - 1) {
123
- handleActiveTab((_f = arrTabs[idx - 1]) === null || _f === void 0 ? void 0 : _f.id);
117
+ handleActiveTab((_b = arrTabs[idx - 1]) === null || _b === void 0 ? void 0 : _b.id);
124
118
  }
125
119
  else if (arrTabs.length > 1) {
126
- handleActiveTab((_g = arrTabs[idx + 1]) === null || _g === void 0 ? void 0 : _g.id);
120
+ handleActiveTab((_c = arrTabs[idx + 1]) === null || _c === void 0 ? void 0 : _c.id);
127
121
  }
128
122
  }
129
123
  onCloseTab === null || onCloseTab === void 0 ? void 0 : onCloseTab(tab, idx, newTabs);
@@ -165,43 +159,46 @@ export const EditorTab = props => {
165
159
  contextModal,
166
160
  showArrow && isLeftBlockOverflow && (React.createElement("div", { className: "navigate-button", onClick: () => onClickArrow('left') },
167
161
  React.createElement(Icon, { type: "icon-ants-angle-left" }))),
168
- React.createElement("div", { ref: leftBlockRef, className: classnames('left-block', leftBlockClassName), onWheel: onWheelLeftBlock }, arrTabs && arrTabs.length
169
- ? arrTabs.map((tab, idx) => {
170
- const { showIcon = true, showDropdown = true, hideRemoveOption, closable = true, } = tab;
171
- return (React.createElement("div", { key: tab.id, onClick: () => handleActiveTab(tab.id), className: classnames('tab-item', tabItemClassName, {
172
- active: tab.id === activeTabId,
173
- }) },
174
- showIcon &&
175
- (tab.type === 'query' ? (React.createElement(Icon, { type: "icon-ants-material-outline-manage-search", overlayStyle: { fontSize: 21 } })) : (React.createElement(Icon, { type: "icon-ants-table-vertical", overlayStyle: { fontSize: 21 } }))),
176
- isEditable === tab.id ? (React.createElement(ContentEditable, { value: tab.name, onSave: newValue => {
177
- setIsEditable(undefined);
178
- onSaveName === null || onSaveName === void 0 ? void 0 : onSaveName(tab.id, newValue);
179
- } })) : (React.createElement(Typography.Text, { ellipsis: { tooltip: true } }, tab.name)),
180
- showDropdown ? (React.createElement(Dropdown, { menu: {
181
- items: [
182
- { label: 'Configure', key: 'configure', style: { minWidth: '135px' } },
183
- ...(hideRemoveOption
184
- ? []
185
- : [{ label: 'Remove', key: 'remove', style: { minWidth: '135px' } }]),
186
- ],
187
- onClick: (_a) => __awaiter(void 0, [_a], void 0, function* ({ key, domEvent }) {
188
- switch (key) {
189
- case 'configure':
190
- if (editNameOnConfigure)
191
- setIsEditable(tab.id);
192
- onConfigure === null || onConfigure === void 0 ? void 0 : onConfigure(tab.id);
193
- break;
194
- case 'remove':
195
- yield handleCloseTab(domEvent, tab, idx);
196
- break;
197
- default:
198
- break;
199
- }
200
- }),
201
- }, placement: "bottomLeft", trigger: ['click'], destroyPopupOnHide: true },
202
- React.createElement(Button, { icon: React.createElement(Icon, { type: "icon-ants-three-dot-vertical", overlayStyle: { fontSize: 12 } }), size: "small" }))) : closable ? (React.createElement(Button, { onClick: e => handleCloseTab(e, tab, idx), icon: React.createElement(Icon, { type: "icon-ants-remove-slim", overlayStyle: { fontSize: 12 } }), size: "small" })) : null));
203
- })
204
- : null),
162
+ React.createElement("div", { ref: leftBlockRef, className: classnames('left-block', leftBlockClassName), onWheel: onWheelLeftBlock },
163
+ React.createElement("div", { ref: anchorLeftElRef }),
164
+ arrTabs && arrTabs.length
165
+ ? arrTabs.map((tab, idx) => {
166
+ const { showIcon = true, showDropdown = true, hideRemoveOption, closable = true, } = tab;
167
+ return (React.createElement("div", { key: tab.id, onClick: () => handleActiveTab(tab.id), className: classnames('tab-item', tabItemClassName, {
168
+ active: tab.id === activeTabId,
169
+ }) },
170
+ showIcon &&
171
+ (tab.type === 'query' ? (React.createElement(Icon, { type: "icon-ants-material-outline-manage-search", overlayStyle: { fontSize: 21 } })) : (React.createElement(Icon, { type: "icon-ants-table-vertical", overlayStyle: { fontSize: 21 } }))),
172
+ isEditable === tab.id ? (React.createElement(ContentEditable, { value: tab.name, onSave: newValue => {
173
+ setIsEditable(undefined);
174
+ onSaveName === null || onSaveName === void 0 ? void 0 : onSaveName(tab.id, newValue);
175
+ } })) : (React.createElement(Typography.Text, { ellipsis: { tooltip: true } }, tab.name)),
176
+ showDropdown ? (React.createElement(Dropdown, { menu: {
177
+ items: [
178
+ { label: 'Configure', key: 'configure', style: { minWidth: '135px' } },
179
+ ...(hideRemoveOption
180
+ ? []
181
+ : [{ label: 'Remove', key: 'remove', style: { minWidth: '135px' } }]),
182
+ ],
183
+ onClick: (_a) => __awaiter(void 0, [_a], void 0, function* ({ key, domEvent }) {
184
+ switch (key) {
185
+ case 'configure':
186
+ if (editNameOnConfigure)
187
+ setIsEditable(tab.id);
188
+ onConfigure === null || onConfigure === void 0 ? void 0 : onConfigure(tab.id);
189
+ break;
190
+ case 'remove':
191
+ yield handleCloseTab(domEvent, tab, idx);
192
+ break;
193
+ default:
194
+ break;
195
+ }
196
+ }),
197
+ }, placement: "bottomLeft", trigger: ['click'], destroyPopupOnHide: true },
198
+ React.createElement(Button, { icon: React.createElement(Icon, { type: "icon-ants-three-dot-vertical", overlayStyle: { fontSize: 12 } }), size: "small" }))) : closable ? (React.createElement(Button, { onClick: e => handleCloseTab(e, tab, idx), icon: React.createElement(Icon, { type: "icon-ants-remove-slim", overlayStyle: { fontSize: 12 } }), size: "small" })) : null));
199
+ })
200
+ : null,
201
+ React.createElement("div", { ref: anchorRightElRef })),
205
202
  showArrow && isLeftBlockOverflow && (React.createElement("div", { className: "navigate-button", onClick: () => onClickArrow('right') },
206
203
  React.createElement(Icon, { type: "icon-ants-angle-right" }))),
207
204
  showComposeNewQuery || newTabText ? (React.createElement(Button, { onClick: handleAddNew, className: "new-query-button" },