sevago-sso-fe 1.0.55 → 1.0.57
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/README.md +252 -23
- package/dist/common/constant/apps.data.d.ts +19 -0
- package/dist/common/constant/color.constant.d.ts +40 -0
- package/dist/common/constant/hierarchical.constant.d.ts +8 -0
- package/dist/common/constant/index.d.ts +4 -2
- package/dist/common/enums/app-category.enum.d.ts +6 -0
- package/dist/common/index.d.ts +1 -0
- package/dist/common/interfaces/image-with-preview.interface.d.ts +3 -0
- package/dist/common/interfaces/index.d.ts +1 -0
- package/dist/common/utils/index.d.ts +1 -3
- package/dist/common/utils/other/hierarchical.utils.d.ts +1 -0
- package/dist/common/utils/validator.utils.d.ts +2 -0
- package/dist/components/app-grid/app-grid.component.d.ts +1 -3
- package/dist/components/banner/banner.component.d.ts +5 -0
- package/dist/components/banner/index.d.ts +1 -0
- package/dist/components/bread-cumbs/bread-cumbs.d.ts +9 -0
- package/dist/components/bread-cumbs/index.d.ts +1 -0
- package/dist/components/elements/avatar/avatar-online-status.element.d.ts +12 -0
- package/dist/components/elements/avatar/avatar-user-info.element.d.ts +14 -0
- package/dist/components/elements/avatar/avatar.element.d.ts +9 -0
- package/dist/components/elements/avatar/index.d.ts +3 -0
- package/dist/components/elements/button/button-icon-circle.element.d.ts +5 -0
- package/dist/components/elements/button/button-icon-content-opacity.element.d.ts +9 -0
- package/dist/components/elements/button/button-icon-square.element.d.ts +7 -0
- package/dist/components/elements/button/button-icon.element.d.ts +6 -0
- package/dist/components/elements/button/button-image.element.d.ts +10 -0
- package/dist/components/elements/button/button-upload-file.element.d.ts +9 -0
- package/dist/components/elements/button/button.element.d.ts +10 -0
- package/dist/components/elements/button/index.d.ts +7 -0
- package/dist/components/elements/check-box/check-box.element.d.ts +8 -0
- package/dist/components/elements/check-box/index.d.ts +1 -0
- package/dist/components/elements/dialog/dialog-confirm-action.element.d.ts +16 -0
- package/dist/components/elements/dialog/dialog.element.d.ts +30 -0
- package/dist/components/elements/dialog/index.d.ts +2 -0
- package/dist/components/elements/divider/dashed-divider.element.d.ts +11 -0
- package/dist/components/elements/divider/index.d.ts +1 -0
- package/dist/components/elements/icon/icon-button.element.d.ts +10 -0
- package/dist/components/elements/icon/icon-content-badge-count-subs.element.d.ts +9 -0
- package/dist/components/elements/icon/icon-content-badge-count.element.d.ts +10 -0
- package/dist/components/elements/icon/icon-content-opacity.element.d.ts +10 -0
- package/dist/components/elements/icon/icon-content-subs.element.d.ts +8 -0
- package/dist/components/elements/icon/icon-content.element.d.ts +15 -0
- package/dist/components/elements/icon/index.d.ts +6 -0
- package/dist/components/elements/image/image-content-caption.component.d.ts +15 -0
- package/dist/components/elements/image/image-name-time.component.d.ts +9 -0
- package/dist/components/elements/image/image.element.d.ts +1 -1
- package/dist/components/elements/image/index.d.ts +2 -0
- package/dist/components/elements/index.d.ts +12 -4
- package/dist/components/elements/link/index.d.ts +2 -0
- package/dist/components/elements/link/link-internal.element.d.ts +8 -0
- package/dist/components/elements/link/link.element.d.ts +7 -0
- package/dist/components/elements/pagination/index.d.ts +1 -0
- package/dist/components/elements/pagination/pagination.element.d.ts +14 -0
- package/dist/components/elements/radio/index.d.ts +1 -0
- package/dist/components/elements/radio/radio-group.element.d.ts +16 -0
- package/dist/components/elements/switch/index.d.ts +2 -0
- package/dist/components/elements/switch/switch-content.element.d.ts +10 -0
- package/dist/components/elements/switch/switch.element.d.ts +7 -0
- package/dist/components/elements/tabs/index.d.ts +5 -0
- package/dist/components/elements/tabs/tabs-badge-count-subs.component.d.ts +17 -0
- package/dist/components/elements/tabs/tabs-badge-count.component.d.ts +13 -0
- package/dist/components/elements/tabs/tabs-subs.component.d.ts +16 -0
- package/dist/components/elements/tabs/tabs.component.d.ts +21 -0
- package/dist/components/elements/tabs/tabs.constant.d.ts +21 -0
- package/dist/components/elements/tag/index.d.ts +2 -0
- package/dist/components/elements/tag/tag-on-click.element.d.ts +8 -0
- package/dist/components/elements/tag/tag.element.d.ts +18 -0
- package/dist/components/elements/text-field/index.d.ts +1 -0
- package/dist/components/elements/text-field/text-field-date.element.d.ts +0 -0
- package/dist/components/elements/text-field/text-field-label.element.d.ts +9 -0
- package/dist/components/elements/text-field/text-field-month-year.element.d.ts +0 -0
- package/dist/components/elements/text-field/text-field-number.element.d.ts +0 -0
- package/dist/components/elements/text-field/text-field-search-custom.element.d.ts +9 -0
- package/dist/components/elements/text-field/text-field-search.element.d.ts +9 -0
- package/dist/components/elements/text-field/text-field-select-search-object.element.d.ts +0 -0
- package/dist/components/elements/text-field/text-field-select-search.element.d.ts +0 -0
- package/dist/components/elements/text-field/text-field.element.d.ts +13 -0
- package/dist/components/elements/text-field/text-highlight.element.d.ts +3 -0
- package/dist/components/elements/time-ago/index.d.ts +2 -0
- package/dist/components/elements/time-ago/time-ago-content.component.d.ts +7 -0
- package/dist/components/elements/time-ago/time-ago.component.d.ts +6 -0
- package/dist/components/elements/tooltip/index.d.ts +2 -0
- package/dist/components/elements/tooltip/tooltip-on-click.element.d.ts +7 -0
- package/dist/components/elements/tooltip/tooltip-on-hover.element.d.ts +9 -0
- package/dist/components/elements/typography/index.d.ts +1 -0
- package/dist/components/elements/typography/typography-content-caption.component.d.ts +1 -0
- package/dist/components/elements/typography/typography-grid-info-row.component.d.ts +14 -0
- package/dist/components/elements/typography/typography-info-row.component.d.ts +11 -0
- package/dist/components/elements/typography/typography-info-user.component.d.ts +19 -0
- package/dist/components/elements/typography/typography-limit-one-line.component.d.ts +7 -0
- package/dist/components/elements/wrapper/index.d.ts +3 -0
- package/dist/components/elements/wrapper/wrapper-chart.element.d.ts +9 -0
- package/dist/components/elements/wrapper/wrapper-content.element.d.ts +18 -0
- package/dist/components/elements/wrapper/wrapper.element.d.ts +23 -0
- package/dist/components/index.d.ts +5 -2
- package/dist/components/loading/index.d.ts +1 -0
- package/dist/components/loading/loading.component.d.ts +7 -0
- package/dist/components/sidebar/apps-sidebar.component.d.ts +2 -0
- package/dist/components/sidebar/system-monitor-sidebar.part.d.ts +2 -0
- package/dist/components/system-monitor/system-monitor.screen.d.ts +2 -0
- package/dist/index.cjs.js +4284 -1251
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +4123 -1090
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/common/utils/string.utils.d.ts +0 -10
package/README.md
CHANGED
|
@@ -79,42 +79,193 @@ import App from 'sevago-sso-fe';
|
|
|
79
79
|
#### System Monitor Screen
|
|
80
80
|
|
|
81
81
|
```tsx
|
|
82
|
-
import { SystemMonitorScreen } from 'sevago-sso-fe';
|
|
82
|
+
import { SystemMonitorScreen, Environment, getCurrentEnvironment } from 'sevago-sso-fe';
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
const env = getCurrentEnvironment();
|
|
85
|
+
|
|
86
|
+
<SystemMonitorScreen
|
|
87
|
+
env={env}
|
|
88
|
+
blacklist={[]} // Optional: list of paths to exclude
|
|
89
|
+
/>
|
|
85
90
|
```
|
|
86
91
|
|
|
87
92
|
#### App Grid
|
|
88
93
|
|
|
89
94
|
```tsx
|
|
90
|
-
import { AppGrid } from 'sevago-sso-fe';
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
import { AppGrid, Environment, getCurrentEnvironment } from 'sevago-sso-fe';
|
|
96
|
+
|
|
97
|
+
// AppGrid automatically handles URL routing:
|
|
98
|
+
// - If env is valid (develop/staging/production): uses configured URLs
|
|
99
|
+
// - If env is not valid (e.g., localhost): uses localhost with path
|
|
100
|
+
|
|
101
|
+
const env = getCurrentEnvironment(); // or Environment.DEVELOP, etc.
|
|
102
|
+
|
|
103
|
+
<AppGrid
|
|
104
|
+
apps={apps}
|
|
105
|
+
env={env}
|
|
106
|
+
columns={5}
|
|
107
|
+
rows={3}
|
|
108
|
+
iconSize={80}
|
|
109
|
+
showPagination={true}
|
|
110
|
+
/>
|
|
93
111
|
```
|
|
94
112
|
|
|
95
113
|
#### Sidebar Components
|
|
96
114
|
|
|
97
115
|
```tsx
|
|
98
|
-
import { AppsSidebar, SystemMonitorSidebarPart } from 'sevago-sso-fe';
|
|
116
|
+
import { AppsSidebar, SystemMonitorSidebarPart, Environment, getCurrentEnvironment } from 'sevago-sso-fe';
|
|
99
117
|
|
|
100
|
-
|
|
118
|
+
const env = getCurrentEnvironment();
|
|
119
|
+
|
|
120
|
+
<AppsSidebar
|
|
121
|
+
isOpen={true}
|
|
122
|
+
onClose={() => {}}
|
|
123
|
+
env={env}
|
|
124
|
+
blacklist={[]} // Optional
|
|
125
|
+
/>
|
|
101
126
|
<SystemMonitorSidebarPart />
|
|
102
127
|
```
|
|
103
128
|
|
|
104
129
|
#### UI Elements
|
|
105
130
|
|
|
131
|
+
##### Avatar Elements
|
|
132
|
+
```tsx
|
|
133
|
+
import {
|
|
134
|
+
AvatarElement,
|
|
135
|
+
AvatarOnlineStatusElement,
|
|
136
|
+
AvatarUserInfo
|
|
137
|
+
} from 'sevago-sso-fe';
|
|
138
|
+
|
|
139
|
+
<AvatarElement src="/avatar.jpg" alt="User" />
|
|
140
|
+
<AvatarOnlineStatusElement src="/avatar.jpg" isOnline={true} />
|
|
141
|
+
<AvatarUserInfo name="John Doe" avatar="/avatar.jpg" />
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
##### Button Elements
|
|
145
|
+
```tsx
|
|
146
|
+
import {
|
|
147
|
+
ButtonElement,
|
|
148
|
+
ButtonIconElement,
|
|
149
|
+
ButtonIconCircleElement,
|
|
150
|
+
ButtonIconSquareElement,
|
|
151
|
+
ButtonIconContentOpacityElement,
|
|
152
|
+
ButtonImageElement,
|
|
153
|
+
ButtonUploadFileElement
|
|
154
|
+
} from 'sevago-sso-fe';
|
|
155
|
+
|
|
156
|
+
<ButtonElement onClick={handleClick}>Click me</ButtonElement>
|
|
157
|
+
<ButtonIconElement icon="home" onClick={handleClick} />
|
|
158
|
+
<ButtonIconCircleElement icon="user" onClick={handleClick} />
|
|
159
|
+
<ButtonUploadFileElement onUpload={handleUpload} />
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
##### Icon Elements
|
|
163
|
+
```tsx
|
|
164
|
+
import {
|
|
165
|
+
IconElement,
|
|
166
|
+
IconContentElement,
|
|
167
|
+
IconContentBadgeCountElement,
|
|
168
|
+
IconContentBadgeCountSubsElement,
|
|
169
|
+
IconButtonElement,
|
|
170
|
+
IconContentSubsElement,
|
|
171
|
+
IconContentOpacityElement
|
|
172
|
+
} from 'sevago-sso-fe';
|
|
173
|
+
|
|
174
|
+
<IconElement icon="home" />
|
|
175
|
+
<IconContentElement icon="user" content="Profile" />
|
|
176
|
+
<IconContentBadgeCountElement icon="notifications" count={5} />
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
##### Image Elements
|
|
106
180
|
```tsx
|
|
107
181
|
import {
|
|
108
182
|
ImageElement,
|
|
183
|
+
ImageContentCaptionComponent,
|
|
184
|
+
ImageContentTimeComponent,
|
|
185
|
+
ImageSizeType
|
|
186
|
+
} from 'sevago-sso-fe';
|
|
187
|
+
|
|
188
|
+
<ImageElement url="/image.jpg" sizeType={ImageSizeType.SQUARE} />
|
|
189
|
+
<ImageContentCaptionComponent image="/image.jpg" caption="Caption text" />
|
|
190
|
+
<ImageContentTimeComponent image="/image.jpg" time={new Date()} />
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
##### Link Elements
|
|
194
|
+
```tsx
|
|
195
|
+
import {
|
|
196
|
+
LinkElement,
|
|
197
|
+
LinkInternalElement
|
|
198
|
+
} from 'sevago-sso-fe';
|
|
199
|
+
|
|
200
|
+
<LinkElement href="/path" target="_blank">External Link</LinkElement>
|
|
201
|
+
<LinkInternalElement to="/internal">Internal Link</LinkInternalElement>
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
##### Form Elements
|
|
205
|
+
```tsx
|
|
206
|
+
import {
|
|
109
207
|
RadioElement,
|
|
110
|
-
|
|
111
|
-
MotionBox
|
|
208
|
+
CheckboxElement
|
|
112
209
|
} from 'sevago-sso-fe';
|
|
113
210
|
|
|
114
|
-
<ImageElement src="/path/to/image.jpg" alt="Image" />
|
|
115
211
|
<RadioElement value="option1" checked={true} onChange={handleChange} />
|
|
212
|
+
<CheckboxElement checked={false} onChange={handleChange} />
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
##### Typography Elements
|
|
216
|
+
```tsx
|
|
217
|
+
import {
|
|
218
|
+
TypographyContentCaption,
|
|
219
|
+
TypographyOneLine
|
|
220
|
+
} from 'sevago-sso-fe';
|
|
221
|
+
|
|
116
222
|
<TypographyContentCaption>Caption text</TypographyContentCaption>
|
|
117
|
-
<
|
|
223
|
+
<TypographyOneLine>Long text that will be truncated...</TypographyOneLine>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
##### Tabs Elements
|
|
227
|
+
```tsx
|
|
228
|
+
import {
|
|
229
|
+
TabsComponent,
|
|
230
|
+
TabsSubsComponent,
|
|
231
|
+
TabsBadgeCountComponent,
|
|
232
|
+
TabsBadgeCountSubsComponent,
|
|
233
|
+
TAB_STYLES,
|
|
234
|
+
TAB_BACKGROUND_STYLES
|
|
235
|
+
} from 'sevago-sso-fe';
|
|
236
|
+
|
|
237
|
+
<TabsComponent tabs={tabs} value={value} onChange={handleChange} />
|
|
238
|
+
<TabsBadgeCountComponent tabs={tabs} badgeCounts={[5, 3, 2]} />
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
##### Time Ago Elements
|
|
242
|
+
```tsx
|
|
243
|
+
import {
|
|
244
|
+
TimeAgoComponent,
|
|
245
|
+
TimeAgoContentComponent
|
|
246
|
+
} from 'sevago-sso-fe';
|
|
247
|
+
|
|
248
|
+
<TimeAgoComponent date={new Date()} />
|
|
249
|
+
<TimeAgoContentComponent date={new Date()} content="Posted" />
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
##### Other Elements
|
|
253
|
+
```tsx
|
|
254
|
+
import {
|
|
255
|
+
DialogElement,
|
|
256
|
+
DialogConfirmActionElement,
|
|
257
|
+
DashedDividerElement,
|
|
258
|
+
MotionBox
|
|
259
|
+
} from 'sevago-sso-fe';
|
|
260
|
+
|
|
261
|
+
<DialogElement open={open} onClose={handleClose}>Content</DialogElement>
|
|
262
|
+
<DialogConfirmActionElement
|
|
263
|
+
open={open}
|
|
264
|
+
onConfirm={handleConfirm}
|
|
265
|
+
onCancel={handleCancel}
|
|
266
|
+
/>
|
|
267
|
+
<DashedDividerElement />
|
|
268
|
+
<MotionBox preset="fadeInUp" hover>Animated content</MotionBox>
|
|
118
269
|
```
|
|
119
270
|
|
|
120
271
|
### Constants
|
|
@@ -171,20 +322,28 @@ import { stringUtils } from 'sevago-sso-fe';
|
|
|
171
322
|
#### App Utils
|
|
172
323
|
|
|
173
324
|
```tsx
|
|
174
|
-
import {
|
|
325
|
+
import { Environment, getCurrentEnvironment } from 'sevago-sso-fe';
|
|
326
|
+
|
|
327
|
+
// Get current environment based on hostname
|
|
328
|
+
const env = getCurrentEnvironment();
|
|
329
|
+
// Returns: Environment.DEVELOP | Environment.STAGING | Environment.PRODUCTION
|
|
175
330
|
|
|
176
|
-
//
|
|
331
|
+
// Environment enum values
|
|
332
|
+
const develop = Environment.DEVELOP; // "develop"
|
|
333
|
+
const staging = Environment.STAGING; // "staging"
|
|
334
|
+
const production = Environment.PRODUCTION; // "production"
|
|
177
335
|
```
|
|
178
336
|
|
|
179
337
|
### Enums
|
|
180
338
|
|
|
181
339
|
```tsx
|
|
182
|
-
import { AppCategory, Mode, OrderType } from 'sevago-sso-fe';
|
|
340
|
+
import { AppCategory, Mode, OrderType, Environment } from 'sevago-sso-fe';
|
|
183
341
|
|
|
184
342
|
// Use enums
|
|
185
343
|
const category = AppCategory.ALL;
|
|
186
344
|
const mode = Mode.LIGHT;
|
|
187
345
|
const order = OrderType.ASC;
|
|
346
|
+
const env = Environment.DEVELOP;
|
|
188
347
|
```
|
|
189
348
|
|
|
190
349
|
---
|
|
@@ -196,14 +355,60 @@ const order = OrderType.ASC;
|
|
|
196
355
|
| Component | Description | Props |
|
|
197
356
|
|-----------|-------------|-------|
|
|
198
357
|
| `App` | Main application component with theme provider | None |
|
|
199
|
-
| `SystemMonitorScreen` | System monitoring dashboard screen |
|
|
200
|
-
| `AppGrid` | Application grid component | `apps`, `
|
|
201
|
-
| `AppsSidebar` | Applications sidebar component |
|
|
358
|
+
| `SystemMonitorScreen` | System monitoring dashboard screen | `env: Environment`, `blacklist?: string[]` |
|
|
359
|
+
| `AppGrid` | Application grid component with smart URL routing | `apps: AppInfo[]`, `env: Environment`, `columns?: number`, `rows?: number`, `iconSize?: number`, `iconRadius?: number`, `gap?: number \| string`, `showPagination?: boolean`, `titleVariant?`, `titleColor?`, `captionColor?` |
|
|
360
|
+
| `AppsSidebar` | Applications sidebar component | `isOpen: boolean`, `onClose: () => void`, `env: Environment`, `position?: "left" \| "right"`, `blacklist?: string[]` |
|
|
202
361
|
| `SystemMonitorSidebarPart` | System monitor sidebar part | - |
|
|
203
|
-
|
|
|
204
|
-
| `
|
|
205
|
-
| `
|
|
206
|
-
| `
|
|
362
|
+
| **Avatar Elements** | | |
|
|
363
|
+
| `AvatarElement` | Basic avatar element | `src`, `alt`, `sx?` |
|
|
364
|
+
| `AvatarOnlineStatusElement` | Avatar with online status indicator | `src`, `isOnline`, `sx?` |
|
|
365
|
+
| `AvatarUserInfo` | Avatar with user information | `name`, `avatar`, `sx?` |
|
|
366
|
+
| **Button Elements** | | |
|
|
367
|
+
| `ButtonElement` | Standard button | `onClick`, `children`, `variant?`, `sx?` |
|
|
368
|
+
| `ButtonIconElement` | Button with icon | `icon`, `onClick`, `sx?` |
|
|
369
|
+
| `ButtonIconCircleElement` | Circular icon button | `icon`, `onClick`, `sx?` |
|
|
370
|
+
| `ButtonIconSquareElement` | Square icon button | `icon`, `onClick`, `sx?` |
|
|
371
|
+
| `ButtonIconContentOpacityElement` | Button with icon and opacity content | `icon`, `content`, `onClick`, `sx?` |
|
|
372
|
+
| `ButtonImageElement` | Button with image | `image`, `onClick`, `sx?` |
|
|
373
|
+
| `ButtonUploadFileElement` | File upload button | `onUpload`, `accept?`, `sx?` |
|
|
374
|
+
| **Icon Elements** | | |
|
|
375
|
+
| `IconElement` | Basic icon | `icon`, `sx?` |
|
|
376
|
+
| `IconContentElement` | Icon with content | `icon`, `content`, `sx?` |
|
|
377
|
+
| `IconContentBadgeCountElement` | Icon with badge count | `icon`, `count`, `sx?` |
|
|
378
|
+
| `IconContentBadgeCountSubsElement` | Icon with badge count and subtitle | `icon`, `count`, `subtitle`, `sx?` |
|
|
379
|
+
| `IconButtonElement` | Icon button | `icon`, `onClick`, `sx?` |
|
|
380
|
+
| `IconContentSubsElement` | Icon with content and subtitle | `icon`, `content`, `subtitle`, `sx?` |
|
|
381
|
+
| `IconContentOpacityElement` | Icon with opacity content | `icon`, `content`, `opacity?`, `sx?` |
|
|
382
|
+
| **Image Elements** | | |
|
|
383
|
+
| `ImageElement` | Image element | `url: string`, `sizeType?: ImageSizeType`, `sx?` |
|
|
384
|
+
| `ImageContentCaptionComponent` | Image with caption | `image`, `caption`, `sx?` |
|
|
385
|
+
| `ImageContentTimeComponent` | Image with time | `image`, `time`, `sx?` |
|
|
386
|
+
| **Link Elements** | | |
|
|
387
|
+
| `LinkElement` | External link | `href`, `target?`, `children`, `sx?` |
|
|
388
|
+
| `LinkInternalElement` | Internal router link | `to`, `children`, `sx?` |
|
|
389
|
+
| **Form Elements** | | |
|
|
390
|
+
| `RadioElement` | Radio button | `value`, `checked`, `onChange`, `sx?` |
|
|
391
|
+
| `CheckboxElement` | Checkbox | `checked`, `onChange`, `label?`, `sx?` |
|
|
392
|
+
| **Typography Elements** | | |
|
|
393
|
+
| `TypographyContentCaption` | Typography with caption | `children`, `variant?`, `color?`, `sx?` |
|
|
394
|
+
| `TypographyOneLine` | Single line typography (truncated) | `children`, `variant?`, `sx?` |
|
|
395
|
+
| **Tabs Elements** | | |
|
|
396
|
+
| `TabsComponent` | Basic tabs | `tabs`, `value`, `onChange`, `sx?` |
|
|
397
|
+
| `TabsSubsComponent` | Tabs with subtitles | `tabs`, `value`, `onChange`, `sx?` |
|
|
398
|
+
| `TabsBadgeCountComponent` | Tabs with badge counts | `tabs`, `badgeCounts`, `value`, `onChange`, `sx?` |
|
|
399
|
+
| `TabsBadgeCountSubsComponent` | Tabs with badge counts and subtitles | `tabs`, `badgeCounts`, `value`, `onChange`, `sx?` |
|
|
400
|
+
| **Time Elements** | | |
|
|
401
|
+
| `TimeAgoComponent` | Time ago display | `date`, `sx?` |
|
|
402
|
+
| `TimeAgoContentComponent` | Time ago with content | `date`, `content?`, `sx?` |
|
|
403
|
+
| **Other Elements** | | |
|
|
404
|
+
| `DialogElement` | Dialog/modal | `open`, `onClose`, `children`, `sx?` |
|
|
405
|
+
| `DialogConfirmActionElement` | Confirmation dialog | `open`, `onConfirm`, `onCancel`, `title?`, `content?`, `sx?` |
|
|
406
|
+
| `DashedDividerElement` | Dashed divider line | `sx?` |
|
|
407
|
+
| `MotionBox` | Framer Motion animated box | `preset?`, `animate?`, `transition?`, `children`, `hover?`, `index?`, `sx?` |
|
|
408
|
+
|
|
409
|
+
**Note:** `AppGrid` automatically handles URL routing:
|
|
410
|
+
- If `env` is a valid Environment enum value (develop/staging/production): uses configured URLs from `app.path[env]`
|
|
411
|
+
- If `env` is not valid (e.g., localhost development): extracts path and uses `window.location.origin` with the path
|
|
207
412
|
|
|
208
413
|
### Constants
|
|
209
414
|
|
|
@@ -227,14 +432,21 @@ const order = OrderType.ASC;
|
|
|
227
432
|
- `isDateString(str)`
|
|
228
433
|
|
|
229
434
|
- **`stringUtils`** - String utility functions
|
|
230
|
-
- **`appUtils`** - Application utility functions
|
|
231
435
|
- **`getLimitLineCss`** - CSS utility for limiting lines
|
|
436
|
+
- **`Environment`** - Environment enum (DEVELOP, STAGING, PRODUCTION)
|
|
437
|
+
- **`getCurrentEnvironment()`** - Detects current environment based on hostname
|
|
438
|
+
- Returns `Environment.DEVELOP` if hostname includes "dev."
|
|
439
|
+
- Returns `Environment.STAGING` if hostname includes "sta."
|
|
440
|
+
- Returns `Environment.PRODUCTION` otherwise
|
|
232
441
|
|
|
233
442
|
### Enums
|
|
234
443
|
|
|
235
444
|
- **`AppCategory`** - Application category enum
|
|
236
445
|
- **`Mode`** - Theme mode enum
|
|
237
446
|
- **`OrderType`** - Order type enum
|
|
447
|
+
- **`Environment`** - Environment enum (DEVELOP, STAGING, PRODUCTION)
|
|
448
|
+
- **`AppGroup`** - Application group enum (ALL, HRM, WORKFLOW_ENGINE, PLATFORM_AND_INFO, B2B, OTHER, CLIENT)
|
|
449
|
+
- **`ImageSizeType`** - Image size type enum
|
|
238
450
|
|
|
239
451
|
---
|
|
240
452
|
|
|
@@ -244,8 +456,25 @@ Full TypeScript support with comprehensive type definitions:
|
|
|
244
456
|
|
|
245
457
|
```tsx
|
|
246
458
|
import type {
|
|
247
|
-
|
|
459
|
+
AppInfo,
|
|
460
|
+
AppGridProps,
|
|
461
|
+
SystemMonitorScreenProps,
|
|
462
|
+
AppsSidebarProps,
|
|
463
|
+
Environment
|
|
248
464
|
} from 'sevago-sso-fe';
|
|
465
|
+
|
|
466
|
+
// AppInfo interface
|
|
467
|
+
interface AppInfo {
|
|
468
|
+
path: {
|
|
469
|
+
develop: string;
|
|
470
|
+
staging: string;
|
|
471
|
+
production: string;
|
|
472
|
+
};
|
|
473
|
+
content: string;
|
|
474
|
+
color: string;
|
|
475
|
+
icon: string;
|
|
476
|
+
group: AppGroup;
|
|
477
|
+
}
|
|
249
478
|
```
|
|
250
479
|
|
|
251
480
|
---
|
|
@@ -9,6 +9,7 @@ export declare enum AppGroup {
|
|
|
9
9
|
}
|
|
10
10
|
export interface AppInfo {
|
|
11
11
|
path: {
|
|
12
|
+
local: string;
|
|
12
13
|
develop: string;
|
|
13
14
|
staging: string;
|
|
14
15
|
production: string;
|
|
@@ -27,6 +28,7 @@ export declare const APP_GROUP_COLOR: {
|
|
|
27
28
|
Khác: string;
|
|
28
29
|
};
|
|
29
30
|
export declare const SSO: {
|
|
31
|
+
local: string;
|
|
30
32
|
develop: string;
|
|
31
33
|
staging: string;
|
|
32
34
|
production: string;
|
|
@@ -34,6 +36,7 @@ export declare const SSO: {
|
|
|
34
36
|
export declare const APP_OBJ: {
|
|
35
37
|
E_HIRING: {
|
|
36
38
|
path: {
|
|
39
|
+
local: string;
|
|
37
40
|
develop: string;
|
|
38
41
|
staging: string;
|
|
39
42
|
production: string;
|
|
@@ -45,6 +48,7 @@ export declare const APP_OBJ: {
|
|
|
45
48
|
};
|
|
46
49
|
HR: {
|
|
47
50
|
path: {
|
|
51
|
+
local: string;
|
|
48
52
|
develop: string;
|
|
49
53
|
staging: string;
|
|
50
54
|
production: string;
|
|
@@ -56,6 +60,7 @@ export declare const APP_OBJ: {
|
|
|
56
60
|
};
|
|
57
61
|
PAYROLL: {
|
|
58
62
|
path: {
|
|
63
|
+
local: string;
|
|
59
64
|
develop: string;
|
|
60
65
|
staging: string;
|
|
61
66
|
production: string;
|
|
@@ -67,6 +72,7 @@ export declare const APP_OBJ: {
|
|
|
67
72
|
};
|
|
68
73
|
ORG: {
|
|
69
74
|
path: {
|
|
75
|
+
local: string;
|
|
70
76
|
develop: string;
|
|
71
77
|
staging: string;
|
|
72
78
|
production: string;
|
|
@@ -78,6 +84,7 @@ export declare const APP_OBJ: {
|
|
|
78
84
|
};
|
|
79
85
|
CHECKIN: {
|
|
80
86
|
path: {
|
|
87
|
+
local: string;
|
|
81
88
|
develop: string;
|
|
82
89
|
staging: string;
|
|
83
90
|
production: string;
|
|
@@ -89,6 +96,7 @@ export declare const APP_OBJ: {
|
|
|
89
96
|
};
|
|
90
97
|
CHAT: {
|
|
91
98
|
path: {
|
|
99
|
+
local: string;
|
|
92
100
|
develop: string;
|
|
93
101
|
staging: string;
|
|
94
102
|
production: string;
|
|
@@ -100,6 +108,7 @@ export declare const APP_OBJ: {
|
|
|
100
108
|
};
|
|
101
109
|
TRAINING: {
|
|
102
110
|
path: {
|
|
111
|
+
local: string;
|
|
103
112
|
develop: string;
|
|
104
113
|
staging: string;
|
|
105
114
|
production: string;
|
|
@@ -111,6 +120,7 @@ export declare const APP_OBJ: {
|
|
|
111
120
|
};
|
|
112
121
|
FORM: {
|
|
113
122
|
path: {
|
|
123
|
+
local: string;
|
|
114
124
|
develop: string;
|
|
115
125
|
staging: string;
|
|
116
126
|
production: string;
|
|
@@ -122,6 +132,7 @@ export declare const APP_OBJ: {
|
|
|
122
132
|
};
|
|
123
133
|
INSIDE: {
|
|
124
134
|
path: {
|
|
135
|
+
local: string;
|
|
125
136
|
develop: string;
|
|
126
137
|
staging: string;
|
|
127
138
|
production: string;
|
|
@@ -133,6 +144,7 @@ export declare const APP_OBJ: {
|
|
|
133
144
|
};
|
|
134
145
|
BOOKING: {
|
|
135
146
|
path: {
|
|
147
|
+
local: string;
|
|
136
148
|
develop: string;
|
|
137
149
|
staging: string;
|
|
138
150
|
production: string;
|
|
@@ -144,6 +156,7 @@ export declare const APP_OBJ: {
|
|
|
144
156
|
};
|
|
145
157
|
PROJECT: {
|
|
146
158
|
path: {
|
|
159
|
+
local: string;
|
|
147
160
|
develop: string;
|
|
148
161
|
staging: string;
|
|
149
162
|
production: string;
|
|
@@ -155,6 +168,7 @@ export declare const APP_OBJ: {
|
|
|
155
168
|
};
|
|
156
169
|
REQUEST: {
|
|
157
170
|
path: {
|
|
171
|
+
local: string;
|
|
158
172
|
develop: string;
|
|
159
173
|
staging: string;
|
|
160
174
|
production: string;
|
|
@@ -166,6 +180,7 @@ export declare const APP_OBJ: {
|
|
|
166
180
|
};
|
|
167
181
|
TRACKING: {
|
|
168
182
|
path: {
|
|
183
|
+
local: string;
|
|
169
184
|
develop: string;
|
|
170
185
|
staging: string;
|
|
171
186
|
production: string;
|
|
@@ -177,6 +192,7 @@ export declare const APP_OBJ: {
|
|
|
177
192
|
};
|
|
178
193
|
PROCESS: {
|
|
179
194
|
path: {
|
|
195
|
+
local: string;
|
|
180
196
|
develop: string;
|
|
181
197
|
staging: string;
|
|
182
198
|
production: string;
|
|
@@ -188,6 +204,7 @@ export declare const APP_OBJ: {
|
|
|
188
204
|
};
|
|
189
205
|
FORMULA_PRICE: {
|
|
190
206
|
path: {
|
|
207
|
+
local: string;
|
|
191
208
|
develop: string;
|
|
192
209
|
staging: string;
|
|
193
210
|
production: string;
|
|
@@ -199,6 +216,7 @@ export declare const APP_OBJ: {
|
|
|
199
216
|
};
|
|
200
217
|
E_CATALOGUE: {
|
|
201
218
|
path: {
|
|
219
|
+
local: string;
|
|
202
220
|
develop: string;
|
|
203
221
|
staging: string;
|
|
204
222
|
production: string;
|
|
@@ -210,6 +228,7 @@ export declare const APP_OBJ: {
|
|
|
210
228
|
};
|
|
211
229
|
LANDING_PAGE: {
|
|
212
230
|
path: {
|
|
231
|
+
local: string;
|
|
213
232
|
develop: string;
|
|
214
233
|
staging: string;
|
|
215
234
|
production: string;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const COLOR_CONSTANT: {
|
|
2
|
+
error: string;
|
|
3
|
+
successLight: string;
|
|
4
|
+
success: string;
|
|
5
|
+
main: string;
|
|
6
|
+
mainLight: string;
|
|
7
|
+
info: string;
|
|
8
|
+
warning: string;
|
|
9
|
+
secondary: string;
|
|
10
|
+
white: string;
|
|
11
|
+
gray: string;
|
|
12
|
+
gray2: string;
|
|
13
|
+
gray3: string;
|
|
14
|
+
gray4: string;
|
|
15
|
+
gray5: string;
|
|
16
|
+
gray6: string;
|
|
17
|
+
gray7: string;
|
|
18
|
+
gray8: string;
|
|
19
|
+
gray9: string;
|
|
20
|
+
gray10: string;
|
|
21
|
+
green: string;
|
|
22
|
+
green2: string;
|
|
23
|
+
green3: string;
|
|
24
|
+
green4: string;
|
|
25
|
+
green5: string;
|
|
26
|
+
blue: string;
|
|
27
|
+
blue2: string;
|
|
28
|
+
red: string;
|
|
29
|
+
red2: string;
|
|
30
|
+
black: string;
|
|
31
|
+
yellow: string;
|
|
32
|
+
new: string;
|
|
33
|
+
pending: string;
|
|
34
|
+
overDue: string;
|
|
35
|
+
primary: string;
|
|
36
|
+
};
|
|
37
|
+
export declare const colorMap: Record<string, {
|
|
38
|
+
backgroundColor: string;
|
|
39
|
+
color: string;
|
|
40
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const columnWidth = 250;
|
|
2
|
+
export declare const columnHeight = 400;
|
|
3
|
+
export declare const visibleCount = 3;
|
|
4
|
+
export declare const rowHeight = 40;
|
|
5
|
+
export declare const COLOR_HIERARCHIAL: {
|
|
6
|
+
COLOR_HIGHLIGHT_ROW: string;
|
|
7
|
+
COLOR_HIGHLIGHT_TEXT: string;
|
|
8
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
export * from './apps.data';
|
|
2
|
+
export * from './color.constant';
|
|
3
|
+
export * from './icons.constant';
|
|
1
4
|
export * from './mode.constant';
|
|
2
5
|
export * from './opacity.constant';
|
|
3
6
|
export * from './reg-exp.constant';
|
|
4
|
-
export * from './typography.constant';
|
|
5
7
|
export * as STYLE from './style.constant';
|
|
6
|
-
export * from './
|
|
8
|
+
export * from './typography.constant';
|
package/dist/common/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './image-with-preview.interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const normalizeText: (text: string) => string;
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { AppInfo } from '../../common/constant/apps.data';
|
|
3
|
-
import { Environment } from '../../common';
|
|
4
3
|
export interface AppGridProps {
|
|
5
4
|
apps: AppInfo[];
|
|
6
5
|
columns?: number;
|
|
7
6
|
rows?: number;
|
|
8
7
|
iconSize?: number;
|
|
9
8
|
iconRadius?: number;
|
|
10
|
-
iconShadow?: string;
|
|
11
9
|
gap?: number | string;
|
|
12
10
|
titleVariant?: "subtitle1" | "body1" | "caption";
|
|
13
11
|
captionVariant?: "caption" | "body2";
|
|
14
12
|
titleColor?: string;
|
|
15
13
|
captionColor?: string;
|
|
16
14
|
showPagination?: boolean;
|
|
17
|
-
|
|
15
|
+
onClickApp: (appInfo: AppInfo) => void;
|
|
18
16
|
}
|
|
19
17
|
export declare const AppGrid: React.FC<AppGridProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BannerComponent } from './banner.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Breadcrumbs } from './bread-cumbs';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface AvatarOnlineStatusElementProps {
|
|
3
|
+
url?: string | null;
|
|
4
|
+
size?: "small" | "medium" | "large" | "extra_large";
|
|
5
|
+
online?: boolean;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const OnlineBadge: import('@emotion/styled').StyledComponent<import('@mui/material').BadgeOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "components" | "color" | "className" | "style" | "classes" | "children" | "sx" | "variant" | "slots" | "slotProps" | "componentsProps" | "max" | "invisible" | "anchorOrigin" | "badgeContent" | "overlap" | "showZero"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
|
|
9
|
+
component?: React.ElementType;
|
|
10
|
+
}, {}, {}>;
|
|
11
|
+
export declare const AvatarOnlineStatusElement: React.FC<AvatarOnlineStatusElementProps>;
|
|
12
|
+
export default AvatarOnlineStatusElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { SizeProps } from '../../../common';
|
|
4
|
+
export interface AvatarUserInfoProps {
|
|
5
|
+
name: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
positions?: string[];
|
|
8
|
+
maxWidth?: string | number;
|
|
9
|
+
isTag?: boolean;
|
|
10
|
+
sxName?: SxProps;
|
|
11
|
+
sxPosition?: SxProps;
|
|
12
|
+
sizeAvatar?: SizeProps;
|
|
13
|
+
}
|
|
14
|
+
export declare const AvatarUserInfo: React.FC<AvatarUserInfoProps>;
|