funda-ui 4.6.388 → 4.7.101

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,167 @@
1
+ /* ======================================================
2
+ <!-- Stepper -->
3
+ /* ====================================================== */
4
+ .stepper-container {
5
+ --stepper-color-default: #333;
6
+ --stepper-color-active: white;
7
+ --stepper-color-complete: #2563eb;
8
+ --stepper-bg-default: white;
9
+ --stepper-bg-active: #2563eb;
10
+ --stepper-bg-complete: #22c55e;
11
+ --stepper-border-default: #ccc;
12
+ --stepper-border-active: #2563eb;
13
+ --stepper-border-complete: #22c55e;
14
+ --stepper-indicator-size: 0.875rem;
15
+ --stepper-title-size: 0.875rem;
16
+ position: relative;
17
+ /* NAvigation Header (only horizontal) */
18
+ /* Main Navigation */
19
+ /* Each step item (with circle + title) */
20
+ /* Step Indicator */
21
+ /* Title */
22
+ /* Panels Area */
23
+ /* Buttons */
24
+ /* Panel */
25
+ }
26
+ .stepper-container .stepper-header {
27
+ display: flex;
28
+ align-items: center;
29
+ margin-bottom: 1.5rem;
30
+ flex-wrap: nowrap;
31
+ }
32
+ .stepper-container .step-item {
33
+ flex: none;
34
+ display: flex;
35
+ flex-direction: column;
36
+ align-items: center;
37
+ max-width: 100px;
38
+ position: relative;
39
+ z-index: 1;
40
+ }
41
+ .stepper-container .step-item.step-item--clickable {
42
+ cursor: pointer;
43
+ }
44
+ .stepper-container .step-line {
45
+ flex: 1;
46
+ height: 2px;
47
+ background-color: #ddd;
48
+ margin: 0 4px;
49
+ position: relative;
50
+ top: -10px;
51
+ z-index: 0;
52
+ }
53
+ .stepper-container .step-line--complete {
54
+ background-color: var(--stepper-bg-complete);
55
+ }
56
+ .stepper-container .step-line--active {
57
+ background-color: var(--stepper-bg-complete);
58
+ }
59
+ .stepper-container .step-indicator {
60
+ width: 32px;
61
+ height: 32px;
62
+ margin: 0 auto 0.25rem;
63
+ border-radius: 9999px;
64
+ display: flex;
65
+ align-items: center;
66
+ justify-content: center;
67
+ border: 2px solid #ccc;
68
+ font-size: var(--stepper-indicator-size);
69
+ /* default */
70
+ background-color: var(--stepper-bg-default);
71
+ color: var(--stepper-color-default);
72
+ border-color: var(--stepper-border-default);
73
+ }
74
+ .stepper-container .step-indicator--active {
75
+ background-color: var(--stepper-bg-active);
76
+ color: var(--stepper-color-active);
77
+ border-color: var(--stepper-border-active);
78
+ }
79
+ .stepper-container .step-indicator--complete {
80
+ background-color: var(--stepper-bg-complete);
81
+ color: var(--stepper-color-active);
82
+ border-color: var(--stepper-border-complete);
83
+ }
84
+ .stepper-container .step-title {
85
+ font-size: var(--stepper-title-size);
86
+ /* default */
87
+ color: var(--stepper-color-default);
88
+ }
89
+ .stepper-container .step-title--active {
90
+ font-weight: bold;
91
+ }
92
+ .stepper-container .stepper-buttons {
93
+ display: flex;
94
+ justify-content: space-between;
95
+ margin-top: 1rem;
96
+ }
97
+ .stepper-container .stepper-panel {
98
+ width: 100%;
99
+ }
100
+ .stepper-container .stepper-panel-header {
101
+ font-size: 1.25rem;
102
+ font-weight: bold;
103
+ margin-bottom: 1rem;
104
+ display: none;
105
+ }
106
+ .stepper-container .stepper-panel-content {
107
+ width: 100%;
108
+ }
109
+
110
+ /*------ Verticle ------*/
111
+ .stepper-container.stepper-container--vertical {
112
+ display: flex;
113
+ flex-direction: column;
114
+ gap: 1rem;
115
+ }
116
+ .stepper-container.stepper-container--vertical .vertical-step-row {
117
+ display: flex;
118
+ align-items: flex-start;
119
+ margin-bottom: 1rem;
120
+ }
121
+ .stepper-container.stepper-container--vertical .vertical-step-left {
122
+ flex-shrink: 0;
123
+ width: 50px;
124
+ position: relative;
125
+ }
126
+ .stepper-container.stepper-container--vertical .vertical-step-left .step-item {
127
+ margin-top: 20px;
128
+ }
129
+ .stepper-container.stepper-container--vertical .vertical-step-left .step-line {
130
+ position: absolute;
131
+ left: 20px;
132
+ }
133
+ .stepper-container.stepper-container--vertical .vertical-step-right {
134
+ flex: 1;
135
+ left: 70px;
136
+ width: calc(100% - 70px);
137
+ position: absolute;
138
+ top: 1.5rem;
139
+ }
140
+ .stepper-container.stepper-container--vertical .step-title {
141
+ display: none;
142
+ margin-left: 0.3rem;
143
+ }
144
+ .stepper-container.stepper-container--vertical .stepper-panel-header {
145
+ display: block;
146
+ }
147
+ .stepper-container.stepper-container--vertical .stepper-header {
148
+ display: flex;
149
+ flex-direction: column;
150
+ position: relative;
151
+ padding-left: 2rem;
152
+ }
153
+ .stepper-container.stepper-container--vertical .stepper-header .step-item {
154
+ flex-direction: row;
155
+ max-width: 150px;
156
+ }
157
+ .stepper-container.stepper-container--vertical .stepper-header .step-item:not(:first-child) {
158
+ margin-top: 8px;
159
+ }
160
+ .stepper-container.stepper-container--vertical .step-line {
161
+ flex: auto;
162
+ width: 2px;
163
+ height: 40px;
164
+ margin-top: 4px;
165
+ top: auto;
166
+ left: -24px;
167
+ }
@@ -516,7 +516,7 @@
516
516
  min-width: auto !important;
517
517
  width: auto !important;
518
518
  }
519
- .syntable__wrapper.table-enhanced-responsive-scrolled table thead th:not(last-child) {
519
+ .syntable__wrapper.table-enhanced-responsive-scrolled table thead th:not(:last-child) {
520
520
  border-bottom: 0;
521
521
  }
522
522
  .syntable__wrapper.table-enhanced-responsive-scrolled table tbody {
@@ -568,9 +568,9 @@
568
568
  .syntable__wrapper.table-enhanced-responsive-scrolled table tbody th:first-child {
569
569
  border-top: 0;
570
570
  }
571
- .syntable__wrapper.table-enhanced-responsive-scrolled table th:not(last-child),
572
- .syntable__wrapper.table-enhanced-responsive-scrolled table tbody td:not(last-child),
573
- .syntable__wrapper.table-enhanced-responsive-scrolled table tbody th:not(last-child) {
571
+ .syntable__wrapper.table-enhanced-responsive-scrolled table th:not(:last-child),
572
+ .syntable__wrapper.table-enhanced-responsive-scrolled table tbody td:not(:last-child),
573
+ .syntable__wrapper.table-enhanced-responsive-scrolled table tbody th:not(:last-child) {
574
574
  border-bottom: 0;
575
575
  border-right: 0;
576
576
  }
@@ -171,6 +171,9 @@
171
171
  --custom-balloon-text-color: #fff;
172
172
  --custom-balloon-font-size: 12px;
173
173
  --custom-balloon-move: 4px;
174
+ --custom-toolkit-select-options-container-min-w: 135px;
175
+ --custom-toolkit-select-options-container-max-h: 300px;
176
+
174
177
 
175
178
 
176
179
  min-width: var(--custom-chatbox-w);
@@ -662,22 +665,22 @@
662
665
  .toolkit-select-arrow.active {
663
666
  transform: rotate(180deg);
664
667
  }
665
-
668
+
666
669
  .toolkit-select-options-container {
667
670
  z-index: 1000;
668
671
  width: 100%;
669
- min-width: 120px;
672
+ min-width: var(--custom-toolkit-select-options-container-min-w);
670
673
  transform: translateY(-100%);
671
674
  }
672
-
675
+
673
676
  .toolkit-select-options {
674
677
  background-color: var(--custom-chatbox-toolkit-opt-color);
675
678
  border: 1px solid var(--custom-chatbox-toolkit-opt-border-color);
676
679
  border-radius: 4px;
677
680
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
678
681
  margin-bottom: 10px;
679
- max-height: 300px;
680
- min-width: 120px;
682
+ max-height: var(--custom-toolkit-select-options-container-max-h);
683
+ min-width: var(--custom-toolkit-select-options-container-min-w);
681
684
  overflow-y: auto;
682
685
  animation: dropupAnimation 0.2s ease;
683
686
 
@@ -13,6 +13,7 @@ import { htmlEncode } from 'funda-utils/dist/cjs/sanitize';
13
13
 
14
14
 
15
15
 
16
+
16
17
  // loader
17
18
  import PureLoader from './PureLoader';
18
19
  import TypingEffect from "./TypingEffect";
@@ -80,7 +81,9 @@ export type CustomRequestResponse = {
80
81
 
81
82
  export type CustomRequestFunction = (
82
83
  message: string,
83
- config: CustomRequestConfig
84
+ config: CustomRequestConfig,
85
+ customMethods: CustomMethod[],
86
+ conversationHistory: MessageDetail[],
84
87
  ) => Promise<CustomRequestResponse>;
85
88
 
86
89
 
@@ -1041,11 +1044,16 @@ const Chatbox = (props: ChatboxProps) => {
1041
1044
  // Update stream mode
1042
1045
  setEnableStreamMode(false);
1043
1046
 
1044
- let customResponse: any = await args().customRequest(msg, {
1045
- requestBody: requestBodyRes,
1046
- apiUrl: args().requestApiUrl || '',
1047
- headers: args().headerConfigRes
1048
- });
1047
+ let customResponse: any = await args().customRequest(
1048
+ msg,
1049
+ {
1050
+ requestBody: requestBodyRes,
1051
+ apiUrl: args().requestApiUrl || '',
1052
+ headers: args().headerConfigRes
1053
+ },
1054
+ customMethodsRef.current,
1055
+ conversationHistory.current
1056
+ );
1049
1057
 
1050
1058
  const { content, isStream } = customResponse;
1051
1059
  let contentRes: any = content;
@@ -0,0 +1,206 @@
1
+
2
+ /* ======================================================
3
+ <!-- Stepper -->
4
+ /* ====================================================== */
5
+
6
+ .stepper-container {
7
+
8
+ --stepper-color-default: #333;
9
+ --stepper-color-active: white;
10
+ --stepper-color-complete: #2563eb;
11
+ --stepper-bg-default: white;
12
+ --stepper-bg-active: #2563eb;
13
+ --stepper-bg-complete: #22c55e;
14
+ --stepper-border-default: #ccc;
15
+ --stepper-border-active: #2563eb;
16
+ --stepper-border-complete: #22c55e;
17
+ --stepper-indicator-size: 0.875rem;
18
+ --stepper-title-size: 0.875rem;
19
+
20
+
21
+ position: relative;
22
+
23
+ /* NAvigation Header (only horizontal) */
24
+ .stepper-header {
25
+ display: flex;
26
+ align-items: center;
27
+ margin-bottom: 1.5rem;
28
+ flex-wrap: nowrap;
29
+ }
30
+
31
+ /* Main Navigation */
32
+ /* Each step item (with circle + title) */
33
+ .step-item {
34
+ flex: none;
35
+ display: flex;
36
+ flex-direction: column;
37
+ align-items: center;
38
+ max-width: 100px;
39
+ position: relative;
40
+ z-index: 1;
41
+
42
+ &.step-item--clickable {
43
+ cursor: pointer;
44
+ }
45
+
46
+ }
47
+
48
+ .step-line {
49
+ flex: 1;
50
+ height: 2px;
51
+ background-color: #ddd;
52
+ margin: 0 4px;
53
+ position: relative;
54
+ top: -10px;
55
+ z-index: 0;
56
+
57
+ &--complete {
58
+ background-color: var(--stepper-bg-complete);
59
+ }
60
+
61
+ &--active {
62
+ background-color: var(--stepper-bg-complete);
63
+ }
64
+
65
+ }
66
+
67
+ /* Step Indicator */
68
+ .step-indicator {
69
+ width: 32px;
70
+ height: 32px;
71
+ margin: 0 auto 0.25rem;
72
+ border-radius: 9999px;
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ border: 2px solid #ccc;
77
+ font-size: var(--stepper-indicator-size);
78
+
79
+ /* default */
80
+ background-color: var(--stepper-bg-default);
81
+ color: var(--stepper-color-default);
82
+ border-color: var(--stepper-border-default);
83
+
84
+ &--active {
85
+ background-color: var(--stepper-bg-active);
86
+ color: var(--stepper-color-active);
87
+ border-color: var(--stepper-border-active);
88
+ }
89
+
90
+ &--complete {
91
+ background-color: var(--stepper-bg-complete);
92
+ color: var(--stepper-color-active);
93
+ border-color: var(--stepper-border-complete);
94
+ }
95
+
96
+ }
97
+
98
+
99
+ /* Title */
100
+ .step-title {
101
+ font-size: var(--stepper-title-size);
102
+
103
+ /* default */
104
+ color: var(--stepper-color-default);
105
+
106
+ &--active {
107
+ font-weight: bold;
108
+ }
109
+ }
110
+
111
+
112
+
113
+ /* Panels Area */
114
+ .stepper-panels {
115
+
116
+ }
117
+
118
+ /* Buttons */
119
+ .stepper-buttons {
120
+ display: flex;
121
+ justify-content: space-between;
122
+ margin-top: 1rem;
123
+ }
124
+
125
+ /* Panel */
126
+ .stepper-panel {
127
+ width: 100%;
128
+ }
129
+ .stepper-panel-header {
130
+ font-size: 1.25rem;
131
+ font-weight: bold;
132
+ margin-bottom: 1rem;
133
+ display: none;
134
+ }
135
+ .stepper-panel-content {
136
+ width: 100%;
137
+ }
138
+
139
+
140
+
141
+ }
142
+
143
+
144
+ /*------ Verticle ------*/
145
+ .stepper-container.stepper-container--vertical {
146
+ display: flex;
147
+ flex-direction: column;
148
+ gap: 1rem;
149
+
150
+
151
+ .vertical-step-row {
152
+ display: flex;
153
+ align-items: flex-start;
154
+ margin-bottom: 1rem;
155
+ }
156
+ .vertical-step-left {
157
+ flex-shrink: 0;
158
+ width: 50px;
159
+ position: relative;
160
+
161
+ .step-item {
162
+ margin-top: 20px;
163
+ }
164
+ .step-line {
165
+ position: absolute;
166
+ left: 20px;
167
+ }
168
+ }
169
+
170
+ .vertical-step-right {
171
+ flex: 1;
172
+ left: 70px;
173
+ width: calc(100% - 70px);
174
+ position: absolute;
175
+ top: 1.5rem;
176
+ }
177
+
178
+ .step-title {
179
+ display: none;
180
+ margin-left: .3rem;
181
+ }
182
+ .stepper-panel-header {
183
+ display: block;
184
+ }
185
+ .stepper-header {
186
+ display: flex;
187
+ flex-direction: column;
188
+ position: relative;
189
+ padding-left: 2rem;
190
+ .step-item {
191
+ flex-direction: row;
192
+ max-width: 150px;
193
+ &:not(:first-child) {
194
+ margin-top: 8px;
195
+ }
196
+ }
197
+ }
198
+ .step-line {
199
+ flex: auto;
200
+ width: 2px;
201
+ height: 40px;
202
+ margin-top: 4px;
203
+ top: auto;
204
+ left: -24px;
205
+ }
206
+ }