@spteck/react-controls-v2 2.6.1 → 2.6.3
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 +64 -30
- package/dist/LocalizationProvider-BUBYkX-c.cjs +2 -0
- package/dist/{LocalizationProvider-D13keh6K.js → LocalizationProvider-DZ7gAJ1G.js} +205 -23
- package/dist/abstractions/index.d.ts +1 -0
- package/dist/components/BackgroundVideo/BackgroundVideo.d.ts +25 -0
- package/dist/components/BackgroundVideo/IBackgroundVideoProps.d.ts +9 -0
- package/dist/components/BackgroundVideo/index.d.ts +3 -0
- package/dist/components/Dropzone/mime-types.d.ts +1 -1
- package/dist/components/Hero/Hero.d.ts +7 -0
- package/dist/components/Hero/HeroItem.d.ts +13 -0
- package/dist/components/Hero/HeroOverlay.d.ts +10 -0
- package/dist/components/Hero/IHeroProps.d.ts +106 -0
- package/dist/components/Hero/index.d.ts +3 -0
- package/dist/components/Hero/layouts/HeroCarousel.d.ts +4 -0
- package/dist/components/Hero/layouts/HeroFeatured.d.ts +4 -0
- package/dist/components/Hero/layouts/HeroFilmstrip.d.ts +4 -0
- package/dist/components/Hero/layouts/HeroFullscreen.d.ts +4 -0
- package/dist/components/Hero/layouts/HeroGrid.d.ts +4 -0
- package/dist/components/Hero/layouts/HeroMosaic.d.ts +4 -0
- package/dist/components/Hero/layouts/HeroSplit.d.ts +4 -0
- package/dist/components/Hero/useHeroLayout.d.ts +12 -0
- package/dist/components/Hero/useHeroStyles.d.ts +26 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/components/stackv2/IStackV2Props.d.ts +9 -1
- package/dist/components/videoPlayer/VideoPlayer.d.ts +2 -2
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useAIAssistant.d.ts +3 -24
- package/dist/hooks/useAIAssistantParser.d.ts +3 -29
- package/dist/hooks/useAppToast.d.ts +4 -24
- package/dist/hooks/useBrandCenterFonts.d.ts +2 -30
- package/dist/hooks/useExportData.d.ts +25 -0
- package/dist/hooks/useFluentEmoji.d.ts +3 -7
- package/dist/hooks/useGraphAPI.d.ts +3 -19
- package/dist/hooks/useHeroRotation.d.ts +18 -0
- package/dist/hooks/useIndexedDB.d.ts +4 -11
- package/dist/hooks/useLocalizationStrings.d.ts +2 -12
- package/dist/hooks/useLogging.d.ts +3 -10
- package/dist/hooks/usePolling.d.ts +3 -5
- package/dist/hooks/useTimeZoneHelper.d.ts +3 -12
- package/dist/index.cjs +63 -56
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4773 -3994
- package/dist/models/IExportData.d.ts +75 -0
- package/dist/models/IUseAIAssistant.d.ts +48 -0
- package/dist/models/IUseAIAssistantParser.d.ts +28 -0
- package/dist/models/IUseAppToast.d.ts +81 -0
- package/dist/models/IUseBrandCenterFonts.d.ts +30 -0
- package/dist/models/IUseFluentEmoji.d.ts +25 -0
- package/dist/models/IUseGraphAPI.d.ts +39 -0
- package/dist/models/IUseHeroRotation.d.ts +11 -0
- package/dist/models/IUseIndexedDB.d.ts +31 -0
- package/dist/models/IUseLocalizationStrings.d.ts +17 -0
- package/dist/models/IUseLogging.d.ts +40 -0
- package/dist/models/IUsePolling.d.ts +9 -0
- package/dist/models/IUseTimeZoneHelper.d.ts +50 -0
- package/dist/models/index.d.ts +15 -0
- package/dist/providers.cjs +1 -2
- package/dist/providers.js +2 -189
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/useExportDataUtils.d.ts +23 -0
- package/package.json +5 -2
- package/dist/LocalizationProvider-DEmAXWvz.cjs +0 -2
- package/dist/components/Stack/IStackProps.d.ts +0 -12
- package/dist/components/Stack/Stack.d.ts +0 -4
- package/dist/components/Stack/StackItem.d.ts +0 -12
- package/dist/components/Stack/index.d.ts +0 -5
- package/dist/components/Stack/useStackStyles.d.ts +0 -6
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @spteck/react-controls-v2
|
|
2
2
|
|
|
3
|
-
A comprehensive, framework-agnostic React component library built on **Fluent UI 9**, designed for enterprise applications. Works seamlessly with **Vite**, **Next.js**, **Create React App**, and **SharePoint Framework (SPFx)**.
|
|
3
|
+
**v2.6.2** — A comprehensive, framework-agnostic React component library built on **Fluent UI 9**, designed for enterprise applications. Works seamlessly with **Vite**, **Next.js**, **Create React App**, and **SharePoint Framework (SPFx)**.
|
|
4
|
+
|
|
5
|
+
> 🔗 **Live Showcase & Docs:** [reactcontrols.spteckapps.com](https://reactcontrols.spteckapps.com)
|
|
4
6
|
|
|
5
7
|
---
|
|
6
8
|
|
|
@@ -16,6 +18,8 @@ A comprehensive, framework-agnostic React component library built on **Fluent UI
|
|
|
16
18
|
- **Accessible** — WCAG-compliant via Fluent UI
|
|
17
19
|
- **Adaptive Cards** — Full Adaptive Cards rendering with Fluent UI styling
|
|
18
20
|
- **AI Components** — Chat assistant and AI-powered search out of the box
|
|
21
|
+
- **Rich Text Editing** — TipTap-based editor with full formatting toolbar
|
|
22
|
+
- **Export Utilities** — One-hook Excel / CSV / JSON export with async paginated fetchers
|
|
19
23
|
|
|
20
24
|
---
|
|
21
25
|
|
|
@@ -95,31 +99,49 @@ If you are also using app context and localization, the recommended provider ord
|
|
|
95
99
|
|
|
96
100
|
| Component | Description |
|
|
97
101
|
|-----------|-------------|
|
|
98
|
-
| `
|
|
99
|
-
| `StackV2` | Extended stack with responsive spacing, alignment, and wrapping |
|
|
102
|
+
| `StackV2` | Extended flexbox stack with responsive spacing, alignment, and wrapping |
|
|
100
103
|
| `Grid` | CSS Grid layout with responsive columns and auto-flow |
|
|
101
104
|
| `Layout` | Named grid-area template layout (e.g., Holy Grail) |
|
|
102
|
-
| `Card` | Fluent UI Card with header, body, footer and preview |
|
|
105
|
+
| `Card` | Fluent UI Card with header, body, footer, and preview slots |
|
|
103
106
|
| `Space` | Inline spacing / visual gap utility |
|
|
104
107
|
| `AspectRatio` | Constrain content to a fixed aspect ratio |
|
|
105
108
|
| `Center` | Center content horizontally and/or vertically |
|
|
106
109
|
| `Container` | Responsive max-width container |
|
|
107
110
|
| `Carousel` | Horizontally scrollable item carousel |
|
|
111
|
+
| `SplitPane` | Resizable two-pane split layout |
|
|
108
112
|
| `Popup` | Floating popover / popup panel |
|
|
109
113
|
|
|
114
|
+
### Hero
|
|
115
|
+
|
|
116
|
+
| Component | Description |
|
|
117
|
+
|-----------|-------------|
|
|
118
|
+
| `Hero` | Full-bleed media hero with 7 layouts: fullscreen, split, featured, mosaic, grid, filmstrip, and carousel. Supports image and video items with optional overlays. |
|
|
119
|
+
|
|
110
120
|
### Forms & Input
|
|
111
121
|
|
|
112
122
|
| Component | Description |
|
|
113
123
|
|-----------|-------------|
|
|
114
|
-
| `SelectDate` | Date picker with calendar dropdown |
|
|
115
|
-
| `SelectTime` | Time picker with configurable intervals |
|
|
116
|
-
| `SelectView` | View mode switcher (list, grid, compact) |
|
|
117
124
|
| `InputField` | Text input with validation and labels |
|
|
118
125
|
| `DropdownField` | Drop-down select with validation, custom rendering, default value, and message support |
|
|
119
126
|
| `SearchControl` | Search box with filtering |
|
|
127
|
+
| `CalendarControl` | Full calendar with month, week, and day views |
|
|
128
|
+
| `CompactCalendar` | Compact inline date picker |
|
|
129
|
+
| `SelectTime` | Time picker with configurable intervals |
|
|
130
|
+
| `SelectView` | View mode switcher (list, grid, compact) |
|
|
120
131
|
| `IconButton` | Icon-only button with tooltip |
|
|
121
|
-
| `ItemPicker` | Tag-based item picker with suggestions |
|
|
122
|
-
| `
|
|
132
|
+
| `ItemPicker` | Tag-based item picker with suggestions and paging |
|
|
133
|
+
| `Spotlight` | Command palette overlay with search, keyboard navigation, grouped actions, and configurable shortcuts |
|
|
134
|
+
| `Dropzone` | Drag-and-drop file upload with MIME-type filtering, size limits, and preview |
|
|
135
|
+
| `RichTextEditor` | TipTap-based editor with formatting toolbar, links, colours, image upload, and more |
|
|
136
|
+
| `OTPField` | One-time password / PIN input field |
|
|
137
|
+
| `Mentions` | @mention input with suggestions |
|
|
138
|
+
|
|
139
|
+
### Pickers
|
|
140
|
+
|
|
141
|
+
| Component | Description |
|
|
142
|
+
|-----------|-------------|
|
|
143
|
+
| `ColorPicker` | Sketch, Chrome, Colorful, Wheel, Circle, Compact, Block, Material, Github, and Slider pickers |
|
|
144
|
+
| `EmojiPicker` | Self-contained emoji picker popup with category tabs, search, and configurable dimensions |
|
|
123
145
|
|
|
124
146
|
### Data Display
|
|
125
147
|
|
|
@@ -127,7 +149,9 @@ If you are also using app context and localization, the recommended provider ord
|
|
|
127
149
|
|-----------|-------------|
|
|
128
150
|
| `DataGrid` | Sortable, selectable, resizable data table |
|
|
129
151
|
| `DataGridV2` | Virtualized high-performance data grid with infinite scroll, sorting, resizing, row selection, and imperative handle API |
|
|
130
|
-
| `KPICard` | Key performance indicator card (default and compact) |
|
|
152
|
+
| `KPICard` | Key performance indicator card (default and compact variants) |
|
|
153
|
+
| `KPICardCompact` | Compact KPI card for dense dashboards |
|
|
154
|
+
| `Skeleton` | Auto-extracting skeleton screens with pixel-perfect placeholders |
|
|
131
155
|
|
|
132
156
|
### Navigation
|
|
133
157
|
|
|
@@ -137,6 +161,8 @@ If you are also using app context and localization, the recommended provider ord
|
|
|
137
161
|
| `Breadcrumb` | Navigation breadcrumb with overflow support |
|
|
138
162
|
| `ButtonMenu` | Button with a dropdown list of options |
|
|
139
163
|
| `CustomControlBar` | Configurable toolbar for custom actions |
|
|
164
|
+
| `GenericOverFlowMenu` | Overflow-aware menu that collapses items automatically |
|
|
165
|
+
| `ListToolbar` | SharePoint-style list action toolbar |
|
|
140
166
|
|
|
141
167
|
### Dialogs & Overlays
|
|
142
168
|
|
|
@@ -145,6 +171,8 @@ If you are also using app context and localization, the recommended provider ord
|
|
|
145
171
|
| `RenderDialog` | Fluent UI modal dialog with title and actions |
|
|
146
172
|
| `RenderDrawer` | Side-panel drawer (start or end position) |
|
|
147
173
|
| `RenderHeader` | StackV2-based header with icon, title, description, and optional close button |
|
|
174
|
+
| `Popup` | Floating popover panel |
|
|
175
|
+
| `ShareDialog` | Share link / people picker dialog |
|
|
148
176
|
|
|
149
177
|
### Feedback & Status
|
|
150
178
|
|
|
@@ -154,14 +182,22 @@ If you are also using app context and localization, the recommended provider ord
|
|
|
154
182
|
| `ShowMessage` | Info / success / warning status banner |
|
|
155
183
|
| `RenderSpinner` | Loading spinner |
|
|
156
184
|
|
|
157
|
-
### Typography
|
|
185
|
+
### Typography & Content
|
|
158
186
|
|
|
159
187
|
| Component | Description |
|
|
160
188
|
|-----------|-------------|
|
|
161
|
-
| `TypographyControl` | Fluent-styled text with variant, size and
|
|
189
|
+
| `TypographyControl` | Fluent-styled text with variant, size, weight, and colour support |
|
|
162
190
|
| `RenderLabel` | Field label with optional required indicator |
|
|
163
191
|
| `MarkdownRenderer` | Converts Markdown to styled HTML |
|
|
164
192
|
| `ContentRenderer` | Auto-detects and renders Markdown, HTML, Adaptive Cards, or plain text |
|
|
193
|
+
| `MermaidDiagram` | Renders Mermaid diagram syntax as SVG |
|
|
194
|
+
| `Blockquote` | Styled quotation block with icon badge and semantic colours |
|
|
195
|
+
| `Marquee` | Infinitely scrolling content strip with configurable direction, speed, pause-on-hover, and fade edges |
|
|
196
|
+
| `Spoiler` | Toggle visibility of long content with show/hide control and smooth collapse animation |
|
|
197
|
+
| `Timeline` | Vertical timeline with active state tracking, custom bullets, line variants, and configurable alignment |
|
|
198
|
+
| `Stepper` | Progress through a sequence of steps with active highlighting, custom icons, and completed-state content |
|
|
199
|
+
| `InlineSVG` | Load, sanitize, and render SVG from URLs, data URIs, and raw markup |
|
|
200
|
+
| `BackgroundImage` | Full-width background images with cover sizing and overlay support |
|
|
165
201
|
|
|
166
202
|
### Media & Content
|
|
167
203
|
|
|
@@ -178,34 +214,32 @@ If you are also using app context and localization, the recommended provider ord
|
|
|
178
214
|
| `UserCard` | User persona with live presence status from Graph API |
|
|
179
215
|
| `LivePersona` | Persona wrapper with SPFx hover card support |
|
|
180
216
|
| `StackedUsers` | Overlapping avatar stack for groups of users |
|
|
181
|
-
| `ListItemActivityMessage` | SharePoint list item activity/audit trail |
|
|
217
|
+
| `ListItemActivityMessage` | SharePoint list item activity / audit trail |
|
|
182
218
|
|
|
183
|
-
### AI & Advanced
|
|
184
|
-
|
|
185
|
-
| Component | Description |
|
|
186
|
-
|-----------|-------------|
|
|
187
|
-
| `AIAssistant` | Full streaming AI chat assistant |
|
|
188
|
-
| `AISearchControl` | Natural language search powered by Azure OpenAI |
|
|
189
219
|
|
|
190
220
|
### Hooks
|
|
191
221
|
|
|
192
222
|
| Hook | Description |
|
|
193
223
|
|------|-------------|
|
|
194
224
|
| `useApplicationContext()` | Access application context anywhere inside `UniversalProvider` |
|
|
195
|
-
| `
|
|
196
|
-
| `
|
|
197
|
-
| `
|
|
198
|
-
| `
|
|
199
|
-
| `
|
|
225
|
+
| `useAppToast()` | Consolidated toast notifications — success, error, warning, info, action buttons, and programmatic dismiss |
|
|
226
|
+
| `useExportData()` | Export data to Excel, JSON, and CSV with optional header styling, async paginated fetchers, and a built-in progress dialog |
|
|
227
|
+
| `useFluentEmoji()` | Resolve reaction types to Fluent emoji image URLs with style and skin-tone support |
|
|
228
|
+
| `useIndexedDBCache()` | IndexedDB-backed caching with TTL support |
|
|
229
|
+
| `useLogging()` | Structured logging with info, warn, error, and verbose — pluggable transport via `UniversalProvider` |
|
|
230
|
+
| `usePolling(fn, interval)` | Repeatedly call a function at a fixed interval with manual start/stop control |
|
|
231
|
+
| `useTimeZoneHelper()` | DST-safe timezone conversions and locale-aware date/time formatting |
|
|
232
|
+
| `useBrandCenterFonts()` | Load and apply brand fonts from the Microsoft Brand Center |
|
|
200
233
|
|
|
201
234
|
### Core & Utilities
|
|
202
235
|
|
|
203
|
-
|
|
|
204
|
-
|
|
205
|
-
| `UniversalProvider` | Root context provider
|
|
206
|
-
| `FluentUIProvider` | Fluent UI theme root with portal styling and scoped IDs |
|
|
207
|
-
| `
|
|
208
|
-
| `
|
|
236
|
+
| Item | Description |
|
|
237
|
+
|------|-------------|
|
|
238
|
+
| `UniversalProvider` | Root context provider — supplies app context, logging, storage, and Graph client |
|
|
239
|
+
| `FluentUIProvider` | Fluent UI theme root with portal styling and scoped generated IDs |
|
|
240
|
+
| `LocalizationProvider` | Locale-aware date / number / string formatting provider |
|
|
241
|
+
| `BaseComponentProps` | Shared responsive spacing and sizing interface |
|
|
242
|
+
| `LocalStorageProvider` | `IStorageProvider` implementation using `localStorage` |
|
|
209
243
|
|
|
210
244
|
---
|
|
211
245
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`react`);c=s(c);let l=require(`react/jsx-runtime`);var u=function(e){return e[e.Verbose=0]=`Verbose`,e[e.Info=1]=`Info`,e[e.Warning=2]=`Warning`,e[e.Error=3]=`Error`,e}({}),d=function(e){return e.Error=`Error`,e.Warning=`Warning`,e.Info=`Info`,e}({}),f=class{componentName;constructor(e=`ReactControlsUniversal`){this.componentName=e}log(e,t,n){let r=`[${this.componentName}]`;switch(t){case u.Verbose:console.debug(r,e,n);break;case u.Info:console.info(r,e,n);break;case u.Warning:console.warn(r,e,n);break;case u.Error:console.error(r,e,n);break;default:console.log(r,e,n)}}error(e,t,n){console.error(`[${this.componentName}]`,e,t,n)}warn(e,t){console.warn(`[${this.componentName}]`,e,t)}info(e,t){console.info(`[${this.componentName}]`,e,t)}verbose(e,t){console.debug(`[${this.componentName}]`,e,t)}},p=class{baseUrl;accessToken;getAccessToken;constructor(e){this.baseUrl=e.baseUrl||`https://graph.microsoft.com/v1.0`,this.accessToken=e.accessToken,this.getAccessToken=e.getAccessToken}async getHeaders(){let e=this.accessToken;if(this.getAccessToken)try{e=await this.getAccessToken([`User.Read`])}catch(e){console.error(`Failed to get access token:`,e)}return{Authorization:e?`Bearer ${e}`:``,"Content-Type":`application/json`}}buildUrl(e){let t=e.startsWith(`/`)?e.slice(1):e;return`${this.baseUrl}/${t}`}async get(e){let t=await this.getHeaders(),n=await fetch(this.buildUrl(e),{method:`GET`,headers:t});if(!n.ok)throw Error(`Graph API error: ${n.status} ${n.statusText}`);return n.json()}async post(e,t){let n=await this.getHeaders(),r=await fetch(this.buildUrl(e),{method:`POST`,headers:n,body:JSON.stringify(t)});if(!r.ok)throw Error(`Graph API error: ${r.status} ${r.statusText}`);return r.json()}async patch(e,t){let n=await this.getHeaders(),r=await fetch(this.buildUrl(e),{method:`PATCH`,headers:n,body:JSON.stringify(t)});if(!r.ok)throw Error(`Graph API error: ${r.status} ${r.statusText}`);return r.json()}async delete(e){let t=await this.getHeaders(),n=await fetch(this.buildUrl(e),{method:`DELETE`,headers:t});if(!n.ok)throw Error(`Graph API error: ${n.status} ${n.statusText}`)}async getWithMetadata(e){let t=await this.getHeaders(),n=await fetch(this.buildUrl(e),{method:`GET`,headers:t});if(!n.ok)throw Error(`Graph API error: ${n.status} ${n.statusText}`);return n.json()}async getBlob(e){let t=this.accessToken;if(this.getAccessToken)try{t=await this.getAccessToken([`User.Read`])}catch(e){console.error(`Failed to get access token:`,e)}let n={Authorization:t?`Bearer ${t}`:``},r=await fetch(this.buildUrl(e),{method:`GET`,headers:n});if(!r.ok){if(r.status===404)return;throw Error(`Graph API error: ${r.status} ${r.statusText}`)}return r.blob()}},m={common:{loading:`Loading...`,error:`Error`,noData:`No data`,close:`Close`,save:`Save`,cancel:`Cancel`,ok:`OK`,searchPlaceholder:`Search...`},kpi:{noDescription:`No description available`,defaultTitle:`KPI`,lowerIsBetter:`Lower is better`,higherIsBetter:`Higher is better`,withinGoalThreshold:`Within goal threshold`,exceedsGoalThreshold:`Exceeds goal threshold`,goal:`Goal`,progressGoal:`Progress to goal`,maxAllowedThreshold:`Max allowed threshold`,totalItemsInScope:`Total items in scope`,totalItems:`Total`,currentValueAsPercent:`Current value as percentage of total`,percentOfTotal:`%`,onTrack:`On Track`,exceedGoal:`Exceeds Goal`},noKpis:{title:`No KPIs Configured`,subtitle:`Start tracking your team's performance by configuring {highlight} in the App Configuration list.`,highlightText:`KPI parameters`,configureButton:`Configure KPIs`},calendar:{calendarControl:{daysOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},selectCalendarView:{month:`Month`,week:`Week`,day:`Day`},eventPopoverCard:{timeSeparator:` - `,hourSuffix:`h`},eventDetailsPopover:{start:`Start`,end:`End`,location:`Location`,attendees:`Attendees`,details:`Details`},dayView:{allDay:`All Day`},toolbar:{today:`Today`,previous:`Previous`,next:`Next`},weekView:{allDay:`All Day`},calendarMonth:{months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],goToToday:`Go to today`},selectWeek:{selectWeekPlaceholder:`Select a Week`}},mensions:{placeholder:`Type a message...`,noResults:`No results found`,send:`Send`},shareDialog:{title:`Share`,copyLink:`Copy link`,linkCopied:`Link copied!`,share:`Share`,cancel:`Cancel`},userCard:{available:`Available`,availableIdle:`Available, idle`,away:`Away`,busy:`Busy`,busyIdle:`Busy, idle`,doNotDisturb:`Do not disturb`,beRightBack:`Be right back`,appearOffline:`Appear offline`,unknown:`Unknown`,outOfOffice:`Out of office`,offline:`Offline`,userAvatar:`User Avatar`,unknownUser:`Unknown User`},appDashboard:{noDashboardsAvailable:`No Dashboards Available`,clickToSetSpan:`Click to set span`,configure:`Configure`},aiAssistant:{processingError:`There was an error processing your request.`,noUsersFound:`No users found`,typeAMessage:`Type a message`},worldMap:{loadingMapStyle:`Loading map style…`,coordinates:`Coordinates:`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,resetMap:`Reset map`,reset:`Reset`},aiSearchControl:{placeholder:`Ask AI to generate search query... (e.g., 'Find engineers in the Seattle office')`,notConfiguredError:`Azure OpenAI is not properly configured. Please check your configuration.`,generationError:`An error occurred during AI search query generation`},itemPicker:{placeholder:`Search…`,noResultsFound:`No results found`,searching:`Searching…`,loadingMore:`Loading more…`,selectedItems:`Selected items`,searchItems:`Search items`},listItemActivity:{you:`You`,accessed:`accessed this`,commented:`commented on this`,created:`created this`,deleted:`deleted this`,edited:`edited this`,mentioned:`mentioned you in this`,moved:`moved this`,renamed:`renamed this`,restored:`restored this`,shared:`shared this`,versioned:`versioned this`},inputField:{fieldRequired:`This field is required`,numberRequired:`A number is required`,invalidNumber:`Please enter a valid number`,valueMustBeAtLeast:`Value must be at least {0}`,valueMustBeAtMost:`Value must be at most {0}`},searchControl:{placeholder:`Search…`},mermaidDiagram:{loading:`Loading diagram…`,errorTitle:`Diagram Error`,errorMessage:`An error occurred while rendering the diagram.`,noSource:`No diagram source provided`},dropzone:{dropHere:`Drop files here or click to select`,dragActive:`Drop the files here`,fileRejected:`File type not accepted`,fileTooLarge:`File is too large`,tooManyFiles:`Too many files`,loading:`Loading…`},richTextEditor:{boldControlLabel:`Bold`,italicControlLabel:`Italic`,underlineControlLabel:`Underline`,strikeControlLabel:`Strikethrough`,clearFormattingControlLabel:`Clear formatting`,linkControlLabel:`Link`,unlinkControlLabel:`Unlink`,bulletListControlLabel:`Bullet list`,orderedListControlLabel:`Ordered list`,h1ControlLabel:`Heading 1`,h2ControlLabel:`Heading 2`,h3ControlLabel:`Heading 3`,h4ControlLabel:`Heading 4`,h5ControlLabel:`Heading 5`,h6ControlLabel:`Heading 6`,blockquoteControlLabel:`Blockquote`,alignLeftControlLabel:`Align left`,alignCenterControlLabel:`Align center`,alignRightControlLabel:`Align right`,alignJustifyControlLabel:`Align justify`,codeControlLabel:`Code`,codeBlockControlLabel:`Code block`,subscriptControlLabel:`Subscript`,superscriptControlLabel:`Superscript`,colorPickerControlLabel:`Text color`,unsetColorControlLabel:`Unset color`,highlightControlLabel:`Highlight`,hrControlLabel:`Horizontal rule`,undoControlLabel:`Undo`,redoControlLabel:`Redo`,sourceCodeControlLabel:`Source code`,linkEditorInputLabel:`Enter URL`,linkEditorInputPlaceholder:`https://example.com`,linkEditorExternalLink:`Open link in a new tab`,linkEditorInternalLink:`Open link in the same tab`,linkEditorSave:`Save`,colorPickerCancel:`Cancel`,colorPickerClear:`Clear color`,colorPickerColorPicker:`Color picker`,colorPickerPalette:`Color palette`,colorPickerSave:`Save`,tasksControlLabel:`Task list`,tasksSinkLabel:`Increase indent`,tasksLiftLabel:`Decrease indent`,fontFamilyControlLabel:`Font family`},compactCalendar:{noEvents:`No events`,allDay:`All day`,shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],today:`Today`,previous:`Previous`,next:`Next`},spotlight:{searchPlaceholder:`Search…`,nothingFound:`Nothing found`},colorPicker:{red:`Red`,green:`Green`,blue:`Blue`,alpha:`Alpha`,hue:`Hue`,saturation:`Saturation`,lightness:`Lightness`,hex:`Hex`,copy:`Copy`,saturationPanel:`Saturation and brightness`,hueSlider:`Hue`,alphaSlider:`Opacity`,eyeDropper:`Pick color from screen`,swatchColor:`Color swatch`,themeBrand:`Brand`,themeNeutral:`Neutral`,themeStatus:`Status`,themeColors:`Theme colors`}};function h(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];typeof i==`object`&&i&&!Array.isArray(i)&&typeof a==`object`&&!Array.isArray(a)&&a!==null?n[r]=h(a,i):i!==void 0&&(n[r]=i)}return n}var g={ar:()=>Promise.resolve().then(()=>require(`./ar-DbkaJtO2.cjs`)).then(e=>e.ar),az:()=>Promise.resolve().then(()=>require(`./az-Cf7y5UC1.cjs`)).then(e=>e.az),bg:()=>Promise.resolve().then(()=>require(`./bg-nghgX11u.cjs`)).then(e=>e.bg),bs:()=>Promise.resolve().then(()=>require(`./bs-CMdfvb33.cjs`)).then(e=>e.bs),ca:()=>Promise.resolve().then(()=>require(`./ca-C8cBXf9y.cjs`)).then(e=>e.ca),cs:()=>Promise.resolve().then(()=>require(`./cs-B_90ZpDL.cjs`)).then(e=>e.cs),cy:()=>Promise.resolve().then(()=>require(`./cy-YdAkRgN7.cjs`)).then(e=>e.cy),da:()=>Promise.resolve().then(()=>require(`./da-3S6dCKx6.cjs`)).then(e=>e.da),de:()=>Promise.resolve().then(()=>require(`./de-cBD6cQjC.cjs`)).then(e=>e.de),el:()=>Promise.resolve().then(()=>require(`./el-C861pBjb.cjs`)).then(e=>e.el),es:()=>Promise.resolve().then(()=>require(`./es-7wJEQTAK.cjs`)).then(e=>e.es),et:()=>Promise.resolve().then(()=>require(`./et-BDQwGJeu.cjs`)).then(e=>e.et),eu:()=>Promise.resolve().then(()=>require(`./eu-Bis1mMYp.cjs`)).then(e=>e.eu),fi:()=>Promise.resolve().then(()=>require(`./fi-Bish9bFy.cjs`)).then(e=>e.fi),fr:()=>Promise.resolve().then(()=>require(`./fr-mNj_7F7p.cjs`)).then(e=>e.fr),ga:()=>Promise.resolve().then(()=>require(`./ga-DHGpUClX.cjs`)).then(e=>e.ga),gl:()=>Promise.resolve().then(()=>require(`./gl-BaGwE_dH.cjs`)).then(e=>e.gl),he:()=>Promise.resolve().then(()=>require(`./he-CyBuj0mX.cjs`)).then(e=>e.he),hi:()=>Promise.resolve().then(()=>require(`./hi-C9Y--qfd.cjs`)).then(e=>e.hi),hr:()=>Promise.resolve().then(()=>require(`./hr-_DB2jbdD.cjs`)).then(e=>e.hr),hu:()=>Promise.resolve().then(()=>require(`./hu-B6P_13vr.cjs`)).then(e=>e.hu),id:()=>Promise.resolve().then(()=>require(`./id-CD6_OeAS.cjs`)).then(e=>e.id),it:()=>Promise.resolve().then(()=>require(`./it-BqWJuJRG.cjs`)).then(e=>e.it),ja:()=>Promise.resolve().then(()=>require(`./ja-_IB67CHC.cjs`)).then(e=>e.ja),kk:()=>Promise.resolve().then(()=>require(`./kk-1zP-M5hA.cjs`)).then(e=>e.kk),ko:()=>Promise.resolve().then(()=>require(`./ko-Bh_npcwe.cjs`)).then(e=>e.ko),lt:()=>Promise.resolve().then(()=>require(`./lt-Bcs_RvUC.cjs`)).then(e=>e.lt),lv:()=>Promise.resolve().then(()=>require(`./lv-DXbttzfD.cjs`)).then(e=>e.lv),mk:()=>Promise.resolve().then(()=>require(`./mk-CwexdV8N.cjs`)).then(e=>e.mk),ms:()=>Promise.resolve().then(()=>require(`./ms-DbohV4fa.cjs`)).then(e=>e.ms),nb:()=>Promise.resolve().then(()=>require(`./nb-XSnogBcy.cjs`)).then(e=>e.nb),nl:()=>Promise.resolve().then(()=>require(`./nl-C3fB4nMe.cjs`)).then(e=>e.nl),pl:()=>Promise.resolve().then(()=>require(`./pl-BJHabrpe.cjs`)).then(e=>e.pl),pt:()=>Promise.resolve().then(()=>require(`./pt-BqRRasV7.cjs`)).then(e=>e.pt),ro:()=>Promise.resolve().then(()=>require(`./ro-BCq9yIk8.cjs`)).then(e=>e.ro),ru:()=>Promise.resolve().then(()=>require(`./ru-B-TiRA2D.cjs`)).then(e=>e.ru),sk:()=>Promise.resolve().then(()=>require(`./sk-Btf7EoeH.cjs`)).then(e=>e.sk),sl:()=>Promise.resolve().then(()=>require(`./sl-Cs0S-Rru.cjs`)).then(e=>e.sl),sr:()=>Promise.resolve().then(()=>require(`./sr-Jxn52mZC.cjs`)).then(e=>e.sr),sv:()=>Promise.resolve().then(()=>require(`./sv-DqwVwzYH.cjs`)).then(e=>e.sv),th:()=>Promise.resolve().then(()=>require(`./th-CnqYsyp5.cjs`)).then(e=>e.th),tr:()=>Promise.resolve().then(()=>require(`./tr-BiSE3U_v.cjs`)).then(e=>e.tr),uk:()=>Promise.resolve().then(()=>require(`./uk-YsR97h-O.cjs`)).then(e=>e.uk),vi:()=>Promise.resolve().then(()=>require(`./vi-BqlBS0CX.cjs`)).then(e=>e.vi),zh:()=>Promise.resolve().then(()=>require(`./zh-C3amwoRq.cjs`)).then(e=>e.zh)},_=new Set([`ar`,`he`,`fa`,`ur`]),v=class e{_locale;_isRtl;_loadedBundles;_overrides;constructor(t){this._locale=t||e.detectLocale(),this._isRtl=e.isRtlLocale(this._locale),this._loadedBundles=new Map,this._loadedBundles.set(`en`,m),this._overrides={}}get locale(){return this._locale}get isRtl(){return this._isRtl}getStrings(){let e=this.getLanguageKey(this._locale),t=this._loadedBundles.get(e)||m;if(e===`en`&&Object.keys(this._overrides).length===0)return m;let n=m;return e!==`en`&&(n=h(m,t)),Object.keys(this._overrides).length>0&&(n=h(n,this._overrides)),n}getComponentStrings(e){return this.getStrings()[e]}async loadBundle(e){let t=this.getLanguageKey(e);if(t===`en`||this._loadedBundles.has(t))return;let n=g[t];if(n)try{let e=await n();this._loadedBundles.set(t,e)}catch(e){console.warn(`[DefaultLocalizationProvider] Failed to load bundle for locale "${t}". Falling back to English.`,e)}else console.warn(`[DefaultLocalizationProvider] No bundle available for locale "${t}". Using English.`)}setOverrides(e){this._overrides=e}async setLocale(t){this._locale=t,this._isRtl=e.isRtlLocale(t),await this.loadBundle(t)}static detectLocale(){return typeof navigator<`u`&&navigator.language?navigator.language:`en`}static detectLocaleFromCulture(t){return t?.currentUICultureName?t.currentUICultureName:t?.currentCultureName?t.currentCultureName:e.detectLocale()}static isRtlLocale(e){let t=e.split(`-`)[0].toLowerCase();return _.has(t)}getLanguageKey(e){return e.split(`-`)[0].toLowerCase()}},y=class{prefix;memoryFallback;isLocalStorageAvailable;constructor(e=`rcu_`){this.prefix=e,this.memoryFallback=new Map,this.isLocalStorageAvailable=this.checkLocalStorageAvailability()}checkLocalStorageAvailability(){try{let e=`__localStorage_test__`;return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch{return!1}}getKey(e){return`${this.prefix}${e}`}async get(e){let t=this.getKey(e);try{let n=null;if(n=this.isLocalStorageAvailable?localStorage.getItem(t):this.memoryFallback.get(t),!n)return;let r=JSON.parse(n);if(r.expiration&&Date.now()>r.expiration){await this.remove(e);return}return r.value}catch(e){console.error(`Error reading from storage:`,e);return}}async set(e,t,n){let r=this.getKey(e);try{let e={value:t,expiration:n?Date.now()+n*60*1e3:void 0},i=JSON.stringify(e);this.isLocalStorageAvailable?localStorage.setItem(r,i):this.memoryFallback.set(r,i)}catch(e){console.error(`Error writing to storage:`,e)}}async remove(e){let t=this.getKey(e);try{this.isLocalStorageAvailable?localStorage.removeItem(t):this.memoryFallback.delete(t)}catch(e){console.error(`Error removing from storage:`,e)}}async clear(){try{this.isLocalStorageAvailable?Object.keys(localStorage).forEach(e=>{e.startsWith(this.prefix)&&localStorage.removeItem(e)}):this.memoryFallback.clear()}catch(e){console.error(`Error clearing storage:`,e)}}async has(e){return await this.get(e)!==void 0}},b=(0,c.createContext)(void 0),x=()=>(0,c.useContext)(b),S=()=>(0,c.useContext)(b)?.strings??m;function C(e){return S()[e]}var w=()=>C(`kpi`),T=()=>C(`noKpis`),E=()=>C(`calendar`),D=()=>C(`mensions`),O=()=>C(`shareDialog`),k=()=>C(`common`),A=()=>C(`userCard`),j=()=>C(`appDashboard`),M=()=>C(`aiAssistant`),N=()=>C(`worldMap`),P=()=>C(`aiSearchControl`),F=()=>C(`itemPicker`),I=()=>C(`listItemActivity`),L=()=>C(`inputField`),R=()=>C(`searchControl`),z=()=>C(`mermaidDiagram`),B=()=>C(`dropzone`),V=()=>C(`compactCalendar`),H=()=>C(`spotlight`),U=({provider:e,locale:t,overrides:n,children:r})=>{let[i]=(0,c.useState)(()=>e||new v(t)),[a,o]=(0,c.useState)(()=>(n&&i.setOverrides(n),i.getStrings())),[s,u]=(0,c.useState)(i.locale),[d,f]=(0,c.useState)(i.isRtl);(0,c.useEffect)(()=>{let e=!1;return(async()=>{await i.loadBundle(i.locale),e||o(i.getStrings())})(),()=>{e=!0}},[]),(0,c.useEffect)(()=>{n&&(i.setOverrides(n),o(i.getStrings()))},[n]);let p={provider:i,strings:a,locale:s,isRtl:d,setLocale:(0,c.useCallback)(async e=>{await i.setLocale(e),u(i.locale),f(i.isRtl),o(i.getStrings())},[i])};return(0,l.jsx)(b.Provider,{value:p,children:r})};Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return O}});
|
|
2
|
+
//# sourceMappingURL=LocalizationProvider-BUBYkX-c.cjs.map
|
|
@@ -5,7 +5,123 @@ var o = /* @__PURE__ */ function(e) {
|
|
|
5
5
|
return e[e.Verbose = 0] = "Verbose", e[e.Info = 1] = "Info", e[e.Warning = 2] = "Warning", e[e.Error = 3] = "Error", e;
|
|
6
6
|
}({}), s = /* @__PURE__ */ function(e) {
|
|
7
7
|
return e.Error = "Error", e.Warning = "Warning", e.Info = "Info", e;
|
|
8
|
-
}({}), c = {
|
|
8
|
+
}({}), c = class {
|
|
9
|
+
componentName;
|
|
10
|
+
constructor(e = "ReactControlsUniversal") {
|
|
11
|
+
this.componentName = e;
|
|
12
|
+
}
|
|
13
|
+
log(e, t, n) {
|
|
14
|
+
let r = `[${this.componentName}]`;
|
|
15
|
+
switch (t) {
|
|
16
|
+
case o.Verbose:
|
|
17
|
+
console.debug(r, e, n);
|
|
18
|
+
break;
|
|
19
|
+
case o.Info:
|
|
20
|
+
console.info(r, e, n);
|
|
21
|
+
break;
|
|
22
|
+
case o.Warning:
|
|
23
|
+
console.warn(r, e, n);
|
|
24
|
+
break;
|
|
25
|
+
case o.Error:
|
|
26
|
+
console.error(r, e, n);
|
|
27
|
+
break;
|
|
28
|
+
default: console.log(r, e, n);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
error(e, t, n) {
|
|
32
|
+
console.error(`[${this.componentName}]`, e, t, n);
|
|
33
|
+
}
|
|
34
|
+
warn(e, t) {
|
|
35
|
+
console.warn(`[${this.componentName}]`, e, t);
|
|
36
|
+
}
|
|
37
|
+
info(e, t) {
|
|
38
|
+
console.info(`[${this.componentName}]`, e, t);
|
|
39
|
+
}
|
|
40
|
+
verbose(e, t) {
|
|
41
|
+
console.debug(`[${this.componentName}]`, e, t);
|
|
42
|
+
}
|
|
43
|
+
}, l = class {
|
|
44
|
+
baseUrl;
|
|
45
|
+
accessToken;
|
|
46
|
+
getAccessToken;
|
|
47
|
+
constructor(e) {
|
|
48
|
+
this.baseUrl = e.baseUrl || "https://graph.microsoft.com/v1.0", this.accessToken = e.accessToken, this.getAccessToken = e.getAccessToken;
|
|
49
|
+
}
|
|
50
|
+
async getHeaders() {
|
|
51
|
+
let e = this.accessToken;
|
|
52
|
+
if (this.getAccessToken) try {
|
|
53
|
+
e = await this.getAccessToken(["User.Read"]);
|
|
54
|
+
} catch (e) {
|
|
55
|
+
console.error("Failed to get access token:", e);
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
Authorization: e ? `Bearer ${e}` : "",
|
|
59
|
+
"Content-Type": "application/json"
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
buildUrl(e) {
|
|
63
|
+
let t = e.startsWith("/") ? e.slice(1) : e;
|
|
64
|
+
return `${this.baseUrl}/${t}`;
|
|
65
|
+
}
|
|
66
|
+
async get(e) {
|
|
67
|
+
let t = await this.getHeaders(), n = await fetch(this.buildUrl(e), {
|
|
68
|
+
method: "GET",
|
|
69
|
+
headers: t
|
|
70
|
+
});
|
|
71
|
+
if (!n.ok) throw Error(`Graph API error: ${n.status} ${n.statusText}`);
|
|
72
|
+
return n.json();
|
|
73
|
+
}
|
|
74
|
+
async post(e, t) {
|
|
75
|
+
let n = await this.getHeaders(), r = await fetch(this.buildUrl(e), {
|
|
76
|
+
method: "POST",
|
|
77
|
+
headers: n,
|
|
78
|
+
body: JSON.stringify(t)
|
|
79
|
+
});
|
|
80
|
+
if (!r.ok) throw Error(`Graph API error: ${r.status} ${r.statusText}`);
|
|
81
|
+
return r.json();
|
|
82
|
+
}
|
|
83
|
+
async patch(e, t) {
|
|
84
|
+
let n = await this.getHeaders(), r = await fetch(this.buildUrl(e), {
|
|
85
|
+
method: "PATCH",
|
|
86
|
+
headers: n,
|
|
87
|
+
body: JSON.stringify(t)
|
|
88
|
+
});
|
|
89
|
+
if (!r.ok) throw Error(`Graph API error: ${r.status} ${r.statusText}`);
|
|
90
|
+
return r.json();
|
|
91
|
+
}
|
|
92
|
+
async delete(e) {
|
|
93
|
+
let t = await this.getHeaders(), n = await fetch(this.buildUrl(e), {
|
|
94
|
+
method: "DELETE",
|
|
95
|
+
headers: t
|
|
96
|
+
});
|
|
97
|
+
if (!n.ok) throw Error(`Graph API error: ${n.status} ${n.statusText}`);
|
|
98
|
+
}
|
|
99
|
+
async getWithMetadata(e) {
|
|
100
|
+
let t = await this.getHeaders(), n = await fetch(this.buildUrl(e), {
|
|
101
|
+
method: "GET",
|
|
102
|
+
headers: t
|
|
103
|
+
});
|
|
104
|
+
if (!n.ok) throw Error(`Graph API error: ${n.status} ${n.statusText}`);
|
|
105
|
+
return n.json();
|
|
106
|
+
}
|
|
107
|
+
async getBlob(e) {
|
|
108
|
+
let t = this.accessToken;
|
|
109
|
+
if (this.getAccessToken) try {
|
|
110
|
+
t = await this.getAccessToken(["User.Read"]);
|
|
111
|
+
} catch (e) {
|
|
112
|
+
console.error("Failed to get access token:", e);
|
|
113
|
+
}
|
|
114
|
+
let n = { Authorization: t ? `Bearer ${t}` : "" }, r = await fetch(this.buildUrl(e), {
|
|
115
|
+
method: "GET",
|
|
116
|
+
headers: n
|
|
117
|
+
});
|
|
118
|
+
if (!r.ok) {
|
|
119
|
+
if (r.status === 404) return;
|
|
120
|
+
throw Error(`Graph API error: ${r.status} ${r.statusText}`);
|
|
121
|
+
}
|
|
122
|
+
return r.blob();
|
|
123
|
+
}
|
|
124
|
+
}, u = {
|
|
9
125
|
common: {
|
|
10
126
|
loading: "Loading...",
|
|
11
127
|
error: "Error",
|
|
@@ -307,17 +423,17 @@ var o = /* @__PURE__ */ function(e) {
|
|
|
307
423
|
};
|
|
308
424
|
//#endregion
|
|
309
425
|
//#region src/localization/utils.ts
|
|
310
|
-
function
|
|
426
|
+
function d(e, t) {
|
|
311
427
|
let n = { ...e };
|
|
312
428
|
for (let r of Object.keys(t)) {
|
|
313
429
|
let i = t[r], a = e[r];
|
|
314
|
-
typeof i == "object" && i && !Array.isArray(i) && typeof a == "object" && !Array.isArray(a) && a !== null ? n[r] =
|
|
430
|
+
typeof i == "object" && i && !Array.isArray(i) && typeof a == "object" && !Array.isArray(a) && a !== null ? n[r] = d(a, i) : i !== void 0 && (n[r] = i);
|
|
315
431
|
}
|
|
316
432
|
return n;
|
|
317
433
|
}
|
|
318
434
|
//#endregion
|
|
319
435
|
//#region src/abstractions/providers/DefaultLocalizationProvider.ts
|
|
320
|
-
var
|
|
436
|
+
var f = {
|
|
321
437
|
ar: () => import("./ar-D78_ioot.js").then((e) => e.ar),
|
|
322
438
|
az: () => import("./az-OomGCL5f.js").then((e) => e.az),
|
|
323
439
|
bg: () => import("./bg-OQDPULfM.js").then((e) => e.bg),
|
|
@@ -363,18 +479,18 @@ var u = {
|
|
|
363
479
|
uk: () => import("./uk-B2JY5Ka3.js").then((e) => e.uk),
|
|
364
480
|
vi: () => import("./vi-By1JUTa6.js").then((e) => e.vi),
|
|
365
481
|
zh: () => import("./zh-SZ0W4ZGV.js").then((e) => e.zh)
|
|
366
|
-
},
|
|
482
|
+
}, p = new Set([
|
|
367
483
|
"ar",
|
|
368
484
|
"he",
|
|
369
485
|
"fa",
|
|
370
486
|
"ur"
|
|
371
|
-
]),
|
|
487
|
+
]), m = class e {
|
|
372
488
|
_locale;
|
|
373
489
|
_isRtl;
|
|
374
490
|
_loadedBundles;
|
|
375
491
|
_overrides;
|
|
376
492
|
constructor(t) {
|
|
377
|
-
this._locale = t || e.detectLocale(), this._isRtl = e.isRtlLocale(this._locale), this._loadedBundles = /* @__PURE__ */ new Map(), this._loadedBundles.set("en",
|
|
493
|
+
this._locale = t || e.detectLocale(), this._isRtl = e.isRtlLocale(this._locale), this._loadedBundles = /* @__PURE__ */ new Map(), this._loadedBundles.set("en", u), this._overrides = {};
|
|
378
494
|
}
|
|
379
495
|
get locale() {
|
|
380
496
|
return this._locale;
|
|
@@ -383,10 +499,10 @@ var u = {
|
|
|
383
499
|
return this._isRtl;
|
|
384
500
|
}
|
|
385
501
|
getStrings() {
|
|
386
|
-
let e = this.getLanguageKey(this._locale), t = this._loadedBundles.get(e) ||
|
|
387
|
-
if (e === "en" && Object.keys(this._overrides).length === 0) return
|
|
388
|
-
let n =
|
|
389
|
-
return e !== "en" && (n =
|
|
502
|
+
let e = this.getLanguageKey(this._locale), t = this._loadedBundles.get(e) || u;
|
|
503
|
+
if (e === "en" && Object.keys(this._overrides).length === 0) return u;
|
|
504
|
+
let n = u;
|
|
505
|
+
return e !== "en" && (n = d(u, t)), Object.keys(this._overrides).length > 0 && (n = d(n, this._overrides)), n;
|
|
390
506
|
}
|
|
391
507
|
getComponentStrings(e) {
|
|
392
508
|
return this.getStrings()[e];
|
|
@@ -394,7 +510,7 @@ var u = {
|
|
|
394
510
|
async loadBundle(e) {
|
|
395
511
|
let t = this.getLanguageKey(e);
|
|
396
512
|
if (t === "en" || this._loadedBundles.has(t)) return;
|
|
397
|
-
let n =
|
|
513
|
+
let n = f[t];
|
|
398
514
|
if (n) try {
|
|
399
515
|
let e = await n();
|
|
400
516
|
this._loadedBundles.set(t, e);
|
|
@@ -417,17 +533,83 @@ var u = {
|
|
|
417
533
|
}
|
|
418
534
|
static isRtlLocale(e) {
|
|
419
535
|
let t = e.split("-")[0].toLowerCase();
|
|
420
|
-
return
|
|
536
|
+
return p.has(t);
|
|
421
537
|
}
|
|
422
538
|
getLanguageKey(e) {
|
|
423
539
|
return e.split("-")[0].toLowerCase();
|
|
424
540
|
}
|
|
425
|
-
},
|
|
426
|
-
|
|
427
|
-
|
|
541
|
+
}, h = class {
|
|
542
|
+
prefix;
|
|
543
|
+
memoryFallback;
|
|
544
|
+
isLocalStorageAvailable;
|
|
545
|
+
constructor(e = "rcu_") {
|
|
546
|
+
this.prefix = e, this.memoryFallback = /* @__PURE__ */ new Map(), this.isLocalStorageAvailable = this.checkLocalStorageAvailability();
|
|
547
|
+
}
|
|
548
|
+
checkLocalStorageAvailability() {
|
|
549
|
+
try {
|
|
550
|
+
let e = "__localStorage_test__";
|
|
551
|
+
return localStorage.setItem(e, e), localStorage.removeItem(e), !0;
|
|
552
|
+
} catch {
|
|
553
|
+
return !1;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
getKey(e) {
|
|
557
|
+
return `${this.prefix}${e}`;
|
|
558
|
+
}
|
|
559
|
+
async get(e) {
|
|
560
|
+
let t = this.getKey(e);
|
|
561
|
+
try {
|
|
562
|
+
let n = null;
|
|
563
|
+
if (n = this.isLocalStorageAvailable ? localStorage.getItem(t) : this.memoryFallback.get(t), !n) return;
|
|
564
|
+
let r = JSON.parse(n);
|
|
565
|
+
if (r.expiration && Date.now() > r.expiration) {
|
|
566
|
+
await this.remove(e);
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
return r.value;
|
|
570
|
+
} catch (e) {
|
|
571
|
+
console.error("Error reading from storage:", e);
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
async set(e, t, n) {
|
|
576
|
+
let r = this.getKey(e);
|
|
577
|
+
try {
|
|
578
|
+
let e = {
|
|
579
|
+
value: t,
|
|
580
|
+
expiration: n ? Date.now() + n * 60 * 1e3 : void 0
|
|
581
|
+
}, i = JSON.stringify(e);
|
|
582
|
+
this.isLocalStorageAvailable ? localStorage.setItem(r, i) : this.memoryFallback.set(r, i);
|
|
583
|
+
} catch (e) {
|
|
584
|
+
console.error("Error writing to storage:", e);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
async remove(e) {
|
|
588
|
+
let t = this.getKey(e);
|
|
589
|
+
try {
|
|
590
|
+
this.isLocalStorageAvailable ? localStorage.removeItem(t) : this.memoryFallback.delete(t);
|
|
591
|
+
} catch (e) {
|
|
592
|
+
console.error("Error removing from storage:", e);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
async clear() {
|
|
596
|
+
try {
|
|
597
|
+
this.isLocalStorageAvailable ? Object.keys(localStorage).forEach((e) => {
|
|
598
|
+
e.startsWith(this.prefix) && localStorage.removeItem(e);
|
|
599
|
+
}) : this.memoryFallback.clear();
|
|
600
|
+
} catch (e) {
|
|
601
|
+
console.error("Error clearing storage:", e);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
async has(e) {
|
|
605
|
+
return await this.get(e) !== void 0;
|
|
606
|
+
}
|
|
607
|
+
}, g = e(void 0), _ = () => n(g), v = () => n(g)?.strings ?? u;
|
|
608
|
+
function y(e) {
|
|
609
|
+
return v()[e];
|
|
428
610
|
}
|
|
429
|
-
var
|
|
430
|
-
let [c] = i(() => e || new
|
|
611
|
+
var b = () => y("kpi"), x = () => y("noKpis"), S = () => y("calendar"), C = () => y("mensions"), w = () => y("shareDialog"), T = () => y("common"), E = () => y("userCard"), D = () => y("appDashboard"), O = () => y("aiAssistant"), k = () => y("worldMap"), A = () => y("aiSearchControl"), j = () => y("itemPicker"), M = () => y("listItemActivity"), N = () => y("inputField"), P = () => y("searchControl"), F = () => y("mermaidDiagram"), I = () => y("dropzone"), L = () => y("compactCalendar"), R = () => y("spotlight"), z = ({ provider: e, locale: n, overrides: o, children: s }) => {
|
|
612
|
+
let [c] = i(() => e || new m(n)), [l, u] = i(() => (o && c.setOverrides(o), c.getStrings())), [d, f] = i(c.locale), [p, h] = i(c.isRtl);
|
|
431
613
|
r(() => {
|
|
432
614
|
let e = !1;
|
|
433
615
|
return (async () => {
|
|
@@ -442,17 +624,17 @@ var _ = () => g("kpi"), v = () => g("noKpis"), y = () => g("calendar"), b = () =
|
|
|
442
624
|
provider: c,
|
|
443
625
|
strings: l,
|
|
444
626
|
locale: d,
|
|
445
|
-
isRtl:
|
|
627
|
+
isRtl: p,
|
|
446
628
|
setLocale: t(async (e) => {
|
|
447
|
-
await c.setLocale(e),
|
|
629
|
+
await c.setLocale(e), f(c.locale), h(c.isRtl), u(c.getStrings());
|
|
448
630
|
}, [c])
|
|
449
631
|
};
|
|
450
|
-
return /* @__PURE__ */ a(
|
|
632
|
+
return /* @__PURE__ */ a(g.Provider, {
|
|
451
633
|
value: _,
|
|
452
634
|
children: s
|
|
453
635
|
});
|
|
454
636
|
};
|
|
455
637
|
//#endregion
|
|
456
|
-
export {
|
|
638
|
+
export { s as A, k as C, u as D, d as E, l as O, E as S, m as T, x as _, S as a, R as b, y as c, j as d, b as f, F as g, C as h, D as i, o as j, c as k, I as l, _ as m, O as n, T as o, M as p, A as r, L as s, z as t, N as u, P as v, h as w, v as x, w as y };
|
|
457
639
|
|
|
458
|
-
//# sourceMappingURL=LocalizationProvider-
|
|
640
|
+
//# sourceMappingURL=LocalizationProvider-DZ7gAJ1G.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IBackgroundVideoProps } from './IBackgroundVideoProps';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Renders an auto-playing, muted, full-cover background video.
|
|
5
|
+
*
|
|
6
|
+
* Supports:
|
|
7
|
+
* - **YouTube** (`youtube.com/watch?v=…` or `youtu.be/…`) — raw iframe embed
|
|
8
|
+
* - **Vimeo** (`vimeo.com/…`) — raw iframe with `background=1` (Vimeo's
|
|
9
|
+
* built-in ambient mode: silent, auto-play, no UI chrome)
|
|
10
|
+
* - **Direct file** (`.mp4`, `.webm`, etc.) — native `<video>` element with
|
|
11
|
+
* `objectFit: cover`
|
|
12
|
+
*
|
|
13
|
+
* The component always fills its nearest `position: relative` ancestor.
|
|
14
|
+
* Wrap it in a positioned container and place your overlay content on top.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <div style={{ position: 'relative', height: 400 }}>
|
|
19
|
+
* <BackgroundVideo src="https://www.youtube.com/watch?v=Lu4cWjsS_Po" loop />
|
|
20
|
+
* <MyOverlay />
|
|
21
|
+
* </div>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const BackgroundVideo: React.FC<IBackgroundVideoProps>;
|
|
25
|
+
//# sourceMappingURL=BackgroundVideo.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface IBackgroundVideoProps {
|
|
2
|
+
/** Video URL — YouTube, Vimeo, or any direct file (MP4 / WebM / etc.) */
|
|
3
|
+
src: string;
|
|
4
|
+
/** Loop the video continuously. Default: true */
|
|
5
|
+
loop?: boolean;
|
|
6
|
+
/** Accessible label for the underlying iframe / video element */
|
|
7
|
+
title?: string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=IBackgroundVideoProps.d.ts.map
|
|
@@ -31,7 +31,7 @@ export declare const PDF_MIME_TYPE: "application/pdf"[];
|
|
|
31
31
|
/** Microsoft Word MIME types */
|
|
32
32
|
export declare const MS_WORD_MIME_TYPE: ("application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document")[];
|
|
33
33
|
/** Microsoft Excel MIME types */
|
|
34
|
-
export declare const MS_EXCEL_MIME_TYPE: ("application/vnd.
|
|
34
|
+
export declare const MS_EXCEL_MIME_TYPE: ("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.ms-excel")[];
|
|
35
35
|
/** Microsoft PowerPoint MIME types */
|
|
36
36
|
export declare const MS_POWERPOINT_MIME_TYPE: ("application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation")[];
|
|
37
37
|
/** Executable MIME type */
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IHeroItem, IHeroProps } from './IHeroProps';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface IHeroItemProps {
|
|
4
|
+
item: IHeroItem;
|
|
5
|
+
heroProps: IHeroProps;
|
|
6
|
+
containerWidth: number;
|
|
7
|
+
/** Optional extra class for the outer wrapper (e.g. mosaicPrimary span) */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Explicit pixel height for the cell (used in grid / filmstrip) */
|
|
10
|
+
itemHeight?: string | number;
|
|
11
|
+
}
|
|
12
|
+
export declare const HeroItem: React.FC<IHeroItemProps>;
|
|
13
|
+
//# sourceMappingURL=HeroItem.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IHeroItem, IHeroProps } from './IHeroProps';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface IHeroOverlayProps {
|
|
4
|
+
item: IHeroItem;
|
|
5
|
+
heroProps: IHeroProps;
|
|
6
|
+
containerWidth: number;
|
|
7
|
+
mediaType?: 'image' | 'video';
|
|
8
|
+
}
|
|
9
|
+
export declare const HeroOverlay: React.FC<IHeroOverlayProps>;
|
|
10
|
+
//# sourceMappingURL=HeroOverlay.d.ts.map
|