@magmonium/one 0.0.7 → 0.0.8
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/fesm2022/{magmonium-one-magmonium-one-CCzzYU2z.mjs → magmonium-one-magmonium-one-B5J36xup.mjs} +33 -13
- package/fesm2022/magmonium-one-magmonium-one-B5J36xup.mjs.map +1 -0
- package/fesm2022/{magmonium-one-otp-2KL7aM-S.mjs → magmonium-one-otp-Dlp8arYw.mjs} +2 -2
- package/fesm2022/{magmonium-one-otp-2KL7aM-S.mjs.map → magmonium-one-otp-Dlp8arYw.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-password-a-Le8Z1I.mjs → magmonium-one-password-CVkPkspf.mjs} +2 -2
- package/fesm2022/{magmonium-one-password-a-Le8Z1I.mjs.map → magmonium-one-password-CVkPkspf.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-toggle-B7q3Vvpg.mjs → magmonium-one-toggle-Bk1Z74Ii.mjs} +2 -2
- package/fesm2022/{magmonium-one-toggle-B7q3Vvpg.mjs.map → magmonium-one-toggle-Bk1Z74Ii.mjs.map} +1 -1
- package/fesm2022/magmonium-one.mjs +1 -1
- package/package.json +1 -1
- package/types/magmonium-one.d.ts +13 -2
- package/fesm2022/magmonium-one-magmonium-one-CCzzYU2z.mjs.map +0 -1
|
@@ -167,9 +167,12 @@ function buildWcBaseUrl(apiUrl, remoteId) {
|
|
|
167
167
|
return `${apiUrl}/store/v1/wc/${remoteId}`;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
/** Access domains — routed to Auth URL when it differs from Backend URL (ADR 0012). */
|
|
171
|
+
const ACCESS_DOMAINS = new Set(['auth', 'user', 'admin']);
|
|
170
172
|
class HttpService {
|
|
171
173
|
http = inject(HttpClient);
|
|
172
174
|
url = 'http://localhost:8000';
|
|
175
|
+
authUrl = 'http://localhost:8000';
|
|
173
176
|
assetUrl = inject(ASSET_BASE_URL, { optional: true }) ?? './assets';
|
|
174
177
|
oneAssetUrl = inject(ONE_ASSET_BASE_URL, { optional: true }) ?? './assets';
|
|
175
178
|
publicUrl = './';
|
|
@@ -224,6 +227,12 @@ class HttpService {
|
|
|
224
227
|
getUrl() {
|
|
225
228
|
return this.url;
|
|
226
229
|
}
|
|
230
|
+
setAuthUrl(url) {
|
|
231
|
+
this.authUrl = url;
|
|
232
|
+
}
|
|
233
|
+
getAuthUrl() {
|
|
234
|
+
return this.authUrl;
|
|
235
|
+
}
|
|
227
236
|
buildUrl(domain, path, version) {
|
|
228
237
|
return this.createUrl(domain, path, version);
|
|
229
238
|
}
|
|
@@ -313,7 +322,8 @@ class HttpService {
|
|
|
313
322
|
return this.http.get(url, requestOptions);
|
|
314
323
|
}
|
|
315
324
|
createUrl(domain, path, version) {
|
|
316
|
-
|
|
325
|
+
const base = ACCESS_DOMAINS.has(domain) ? this.authUrl : this.url;
|
|
326
|
+
return `${base}/${domain}/${version ?? 'v1'}/${path.join('/')}`;
|
|
317
327
|
}
|
|
318
328
|
/**
|
|
319
329
|
* The query, built by hand rather than handed to `fromObject`: an unset
|
|
@@ -3604,7 +3614,7 @@ const NavStore = signalStore({ providedIn: 'root' }, withState(initialState$2),
|
|
|
3604
3614
|
};
|
|
3605
3615
|
}));
|
|
3606
3616
|
|
|
3607
|
-
function initMagmoniumApp({ backend, socketUrl, }) {
|
|
3617
|
+
function initMagmoniumApp({ backend, authUrl, socketUrl, }) {
|
|
3608
3618
|
return () => {
|
|
3609
3619
|
inject(FreezeService); // ensure the loading effect is always active
|
|
3610
3620
|
const httpService = inject(HttpService);
|
|
@@ -3628,7 +3638,10 @@ function initMagmoniumApp({ backend, socketUrl, }) {
|
|
|
3628
3638
|
console.warn('initMagmoniumApp: No backend URL provided, defaulting to http://localhost:8000. ' +
|
|
3629
3639
|
'Check your environment configuration if this is unexpected.');
|
|
3630
3640
|
}
|
|
3641
|
+
// Auth URL defaults to Backend URL so single-host apps stay unchanged (ADR 0012).
|
|
3642
|
+
const effectiveAuth = authUrl || effectiveBackend;
|
|
3631
3643
|
httpService.setUrl(effectiveBackend);
|
|
3644
|
+
httpService.setAuthUrl(effectiveAuth);
|
|
3632
3645
|
themeStore.init();
|
|
3633
3646
|
if (socketUrl) {
|
|
3634
3647
|
const socketStore = inject(SocketStore);
|
|
@@ -14549,7 +14562,7 @@ class WrapperInputComponent extends ConfigComponent {
|
|
|
14549
14562
|
break;
|
|
14550
14563
|
}
|
|
14551
14564
|
case InputType.TOGGLE: {
|
|
14552
|
-
const { ToggleInputComponent } = await import('./magmonium-one-toggle-
|
|
14565
|
+
const { ToggleInputComponent } = await import('./magmonium-one-toggle-Bk1Z74Ii.mjs');
|
|
14553
14566
|
this.createDynamicComponent(seq, ToggleInputComponent, [], true);
|
|
14554
14567
|
break;
|
|
14555
14568
|
}
|
|
@@ -14561,12 +14574,12 @@ class WrapperInputComponent extends ConfigComponent {
|
|
|
14561
14574
|
break;
|
|
14562
14575
|
}
|
|
14563
14576
|
case InputType.PASSWORD: {
|
|
14564
|
-
const { PasswordInputComponent } = await import('./magmonium-one-password-
|
|
14577
|
+
const { PasswordInputComponent } = await import('./magmonium-one-password-CVkPkspf.mjs');
|
|
14565
14578
|
this.createDynamicComponent(seq, PasswordInputComponent);
|
|
14566
14579
|
break;
|
|
14567
14580
|
}
|
|
14568
14581
|
case InputType.OTP: {
|
|
14569
|
-
const { OtpInputComponent } = await import('./magmonium-one-otp-
|
|
14582
|
+
const { OtpInputComponent } = await import('./magmonium-one-otp-Dlp8arYw.mjs');
|
|
14570
14583
|
this.createDynamicComponent(seq, OtpInputComponent);
|
|
14571
14584
|
break;
|
|
14572
14585
|
}
|
|
@@ -17049,7 +17062,7 @@ class SectionFormItemComponent extends ConfigComponent {
|
|
|
17049
17062
|
break;
|
|
17050
17063
|
}
|
|
17051
17064
|
case InputType.TOGGLE: {
|
|
17052
|
-
const { ToggleInputComponent } = await import('./magmonium-one-toggle-
|
|
17065
|
+
const { ToggleInputComponent } = await import('./magmonium-one-toggle-Bk1Z74Ii.mjs');
|
|
17053
17066
|
this.createDynamicComponent(seq, ToggleInputComponent, [], true);
|
|
17054
17067
|
break;
|
|
17055
17068
|
}
|
|
@@ -17061,12 +17074,12 @@ class SectionFormItemComponent extends ConfigComponent {
|
|
|
17061
17074
|
break;
|
|
17062
17075
|
}
|
|
17063
17076
|
case InputType.PASSWORD: {
|
|
17064
|
-
const { PasswordInputComponent } = await import('./magmonium-one-password-
|
|
17077
|
+
const { PasswordInputComponent } = await import('./magmonium-one-password-CVkPkspf.mjs');
|
|
17065
17078
|
this.createDynamicComponent(seq, PasswordInputComponent);
|
|
17066
17079
|
break;
|
|
17067
17080
|
}
|
|
17068
17081
|
case InputType.OTP: {
|
|
17069
|
-
const { OtpInputComponent } = await import('./magmonium-one-otp-
|
|
17082
|
+
const { OtpInputComponent } = await import('./magmonium-one-otp-Dlp8arYw.mjs');
|
|
17070
17083
|
this.createDynamicComponent(seq, OtpInputComponent);
|
|
17071
17084
|
break;
|
|
17072
17085
|
}
|
|
@@ -22877,7 +22890,8 @@ const mInterceptor = (request, next) => {
|
|
|
22877
22890
|
const httpService = inject(HttpService);
|
|
22878
22891
|
const injector = inject(Injector);
|
|
22879
22892
|
const baseUrl = httpService.getUrl();
|
|
22880
|
-
const
|
|
22893
|
+
const authBaseUrl = httpService.getAuthUrl();
|
|
22894
|
+
const isBackend = request.url.startsWith(baseUrl) || request.url.startsWith(authBaseUrl);
|
|
22881
22895
|
const authenticate = injectAuthenticate();
|
|
22882
22896
|
const installApp = injectInstallApp();
|
|
22883
22897
|
const store = inject(LOGIN_STORE);
|
|
@@ -22887,7 +22901,7 @@ const mInterceptor = (request, next) => {
|
|
|
22887
22901
|
if (!isBackend) {
|
|
22888
22902
|
return next(request);
|
|
22889
22903
|
}
|
|
22890
|
-
const isAuth = request.url.includes(`${
|
|
22904
|
+
const isAuth = request.url.includes(`${authBaseUrl}/auth/`);
|
|
22891
22905
|
const isInitCall = request.url === httpService.buildUrl('auth', ['init']);
|
|
22892
22906
|
const isRefreshCall = request.url === httpService.buildUrl('auth', ['refresh']);
|
|
22893
22907
|
const actions = SharedStoreRegistry.getLoadingActions() ?? loadingActions;
|
|
@@ -23575,7 +23589,11 @@ function provideMagWcConfig(options) {
|
|
|
23575
23589
|
provideZonelessChangeDetection(),
|
|
23576
23590
|
provideRouter(options.routes, withComponentInputBinding()),
|
|
23577
23591
|
provideHttpClient(withFetch(), withInterceptors([mInterceptor])),
|
|
23578
|
-
provideAppInitializer(initMagmoniumApp({
|
|
23592
|
+
provideAppInitializer(initMagmoniumApp({
|
|
23593
|
+
backend: options.backend,
|
|
23594
|
+
authUrl: options.authUrl,
|
|
23595
|
+
socketUrl: options.socketUrl,
|
|
23596
|
+
})),
|
|
23579
23597
|
provideAppInitializer(() => { inject(APP_CONTEXT_REF); }),
|
|
23580
23598
|
provideModalComponents(),
|
|
23581
23599
|
ThemeStore,
|
|
@@ -26091,6 +26109,7 @@ function provideMagAppConfig(options) {
|
|
|
26091
26109
|
provideHttpClient(withFetch(), withInterceptors([mInterceptor])),
|
|
26092
26110
|
provideAppInitializer(initMagmoniumApp({
|
|
26093
26111
|
backend: options.backend,
|
|
26112
|
+
authUrl: options.authUrl,
|
|
26094
26113
|
socketUrl: options.socketUrl,
|
|
26095
26114
|
})),
|
|
26096
26115
|
provideModalComponents(),
|
|
@@ -26169,6 +26188,7 @@ function bootstrapMagApp(routesOrOptions, maybeOptions) {
|
|
|
26169
26188
|
}
|
|
26170
26189
|
const config = provideMagAppConfig({
|
|
26171
26190
|
backend: options.backend,
|
|
26191
|
+
authUrl: options.authUrl,
|
|
26172
26192
|
socketUrl: options.socketUrl,
|
|
26173
26193
|
routes: finalRoutes,
|
|
26174
26194
|
providers: options.providers,
|
|
@@ -29617,5 +29637,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
29617
29637
|
* Generated bundle index. Do not edit.
|
|
29618
29638
|
*/
|
|
29619
29639
|
|
|
29620
|
-
export {
|
|
29621
|
-
//# sourceMappingURL=magmonium-one-magmonium-one-
|
|
29640
|
+
export { DomService as $, ACCESS_DOMAINS as A, BaseInputComponent as B, COLOR_SCHEMES$1 as C, ChartComponent as D, ErrorsComponent as E, CheckboxInputComponent as F, ClearableInputComponent as G, ColComponent as H, ColorPickerInputComponent as I, CommentItemComponent as J, CommentsApiService as K, LabelComponent as L, CommentsComponent as M, CommentsStore as N, ComponentInputComponent as O, ComponentStepperComponent as P, ConfigComponent as Q, ConfirmComponent as R, ContextMenuComponent as S, TranslatePipe as T, CustomIconClass as U, CustomIconEditComponent as V, DEFAULT_SIZE as W, DashboardCardComponent as X, DateInputComponent as Y, DatePickerComponent as Z, DeviceService as _, BaseTextInputComponent as a, NavComponent as a$, Domain as a0, DotGridComponent as a1, DragListDirective as a2, DragListItemDirective as a3, DraggableDirective as a4, DropdownInputComponent as a5, FLEX_VARIANTS as a6, FOLDER_PICK_LISTENER as a7, FORM_ASSET_FOLDER as a8, FileService as a9, LOGIN_PROCESS as aA, LOGIN_STORE as aB, LanguageComponent as aC, LoginDataService as aD, LoginOneComponent as aE, LoginStore as aF, LogoComponent as aG, MAG_SOCKET_EVENT as aH, MHeroColorDirective as aI, MHeroComponent as aJ, MODAL_REF as aK, MODAL_STORE_REF as aL, MRefDirective$1 as aM, MStepComponent as aN, ManifestEnrichmentService as aO, MenuComponent as aP, ModalDirective as aQ, ModalRef as aR, ModalStore as aS, MoneyPipe as aT, MultiRangeInputComponent as aU, NAV_DEFAULT_MURL as aV, NAV_DISPLAY_ORDER as aW, NAV_MAIN_BUTTONS as aX, NAV_STORE_REF as aY, NAV_WC_COMPONENTS as aZ, NAV_WIDGET_MAP as a_, FileUploadDirective as aa, FileUploadInputComponent as ab, FlexComponent as ac, FlexItemComponent as ad, FormGroupComponent as ae, FrameComponent as af, FreezeService as ag, GEN_NAV_DISPLAY_ORDER as ah, GRID_BREAKPOINTS as ai, GetNavService as aj, HeaderComponent$1 as ak, HighlightDirective as al, HttpService as am, ICON_SOURCE as an, IS_DESIGN_MODE as ao, IS_SIDE_PANEL as ap, IconComponent as aq, ImgComponent as ar, InputType as as, InstrumentScoreComponent as at, InterceptorObservables as au, JumbotronComponent as av, KeyValueComponent as aw, LAYOUT_ASSET_FOLDER as ax, LOGIN_COMPONENT as ay, LOGIN_FORM_GROUP as az, ButtonComponent as b, SectionToggleItemDirective as b$, NavDetailsComponent as b0, NavMenuComponent as b1, NavStore as b2, NavTrailComponent as b3, NothingComponent as b4, NotificationElementComponent as b5, NotificationGroupComponent as b6, NotificationPopupComponent as b7, NotificationService as b8, NotificationStore as b9, SEARCH_RESULTS_EVENT as bA, SECTION_ACCORDION_GROUP as bB, SECTION_FORM_CONTEXT as bC, SHARED_ICONS as bD, SIZE_CONTEXT as bE, ScoreComponent as bF, ScrollComponent as bG, ScrollService as bH, SearchPanelComponent as bI, SearchStore as bJ, SearchUserPanelComponent as bK, SectionAccordionDirective as bL, SectionAccordionGroupDirective as bM, SectionBackComponent as bN, SectionBadgesComponent as bO, SectionButtonGroupComponent as bP, SectionCardComponent as bQ, SectionComponent as bR, SectionFilterComponent as bS, SectionFooterComponent as bT, SectionFormComponent as bU, SectionFormItemComponent as bV, SectionHeaderComponent as bW, SectionSearchComponent as bX, SectionStepperComponent as bY, SectionTabsComponent as bZ, SectionToggleComponent as b_, NotificationType as ba, NotificationWidgetComponent as bb, ONE_ASSET_BASE_URL as bc, OPTIONS_SOURCE as bd, OneApp as be, OptionsSourceDirective as bf, OverlayBodyComponent as bg, OverlayRef as bh, OverlayService as bi, PaginationComponent as bj, PanelComponent as bk, PlaygroundComponent as bl, PositionDirective as bm, PwaInstallComponent as bn, ROOT_NAV$1 as bo, RadioGroupComponent as bp, RadioInputComponent as bq, RangeInputComponent as br, RatingInputComponent as bs, ReactiveElementComponent as bt, RemoteComponent as bu, RemoteLoaderService as bv, ResizeElementComponent as bw, RouteContainer as bx, RowComponent as by, SEARCH_QUERY as bz, APP_CONTEXT_REF as c, checkFilterCondition as c$, SelectableCardInputComponent as c0, SelectorDirective as c1, SettingsSearchBarComponent as c2, SettingsSearchService as c3, Sex as c4, ShapeComponent as c5, SharedStoreRegistry as c6, SidePanelDirective as c7, Size as c8, SocketStore as c9, ToolTipDirective as cA, TooltipComponent as cB, TranslateService as cC, USER_STORE_REF as cD, USER_TAB_MAP as cE, UlComponent as cF, UniverseComponent as cG, UserApiService as cH, UserAvatarComponent as cI, UserComponent as cJ, UserNavComponent as cK, UserSettingsComponent as cL, UserStore as cM, WC_ROUTE_CHANGED_EVENT as cN, WC_SEARCH_GROUPS as cO, WIN_USER_TAB_HOOK as cP, WIN_USER_TAB_KEY as cQ, WatermarkComponent as cR, WcRouterStore as cS, WrapperInputComponent as cT, applyColorsToElement as cU, authGuard as cV, bootstrapMagApp as cW, bootstrapPwaInstall as cX, buildWcBaseUrl as cY, calculateLuminance as cZ, calculateRanks as c_, SortComponent as ca, StepComponent as cb, StepperComponent as cc, StepsComponent as cd, StorageService as ce, StrokeLinecap as cf, StrokeLinejoin as cg, SummaryComponent as ch, SvgGeneratorComponent as ci, SvgGeneratorService as cj, SvgService as ck, TOTAL_COLUMNS as cl, TRANSLATION_SOURCE as cm, TableComponent as cn, TechnicalMeterComponent as co, TextInputComponent as cp, TextOutputComponent as cq, TextareaInputComponent as cr, ThemeComponent as cs, ThemeService as ct, ThemeStore as cu, TimeAgoPipe as cv, TimelineComponent as cw, ToggleButtonComponent as cx, ToggleInputComponent as cy, ToggleRadioInputComponent as cz, ASSET_BASE_URL as d, provideMagWcRoutes as d$, classListSignal as d0, createMap as d1, deriveAvatarGradient as d2, deriveContrastColor as d3, deriveOppositeColor as d4, derivePropertyName as d5, emailValidation as d6, evaluate as d7, evaluateBool as d8, formatBadgeCount as d9, isTierPreview as dA, isUrlLocalhost as dB, isWebComponent as dC, linkToId as dD, linkToNav as dE, loadingActions as dF, loginState as dG, mInterceptor as dH, manualValidation as dI, matchFieldValidation as dJ, maxLengthValidation as dK, maxValidation as dL, mergeUnique as dM, mergeUniqueBy as dN, mergeUniqueWith as dO, minAgeValidation as dP, minLengthValidation as dQ, minValidation as dR, miniMarkToHtml as dS, navToId as dT, parseColor as dU, patternValidation as dV, privateGuard as dW, processImageToSvg as dX, provideAppContext as dY, provideMagAppConfig as dZ, provideMagWcConfig as d_, fullName as da, generateClipPath as db, generateTransform as dc, getClassList as dd, getProperty as de, getScrollParent as df, getTierFromPreviewPath as dg, getUniqueId as dh, getValue as di, hasErrorComputed as dj, hexToRgb as dk, hslToRgb$1 as dl, initMagmoniumApp as dm, initialNotificationState as dn, initials as dp, injectAuthenticate as dq, injectInstallApp as dr, injectParentSize as ds, injectScrollSticky as dt, isButtonName as du, isCancelledComputed as dv, isJson as dw, isLoadingComputed as dx, isLocalhost as dy, isSize as dz, AccordionBodyDirective as e, provideModalComponents as e0, provideNavWidgets as e1, provideSearch as e2, provideSizeContext as e3, provideUserTabs as e4, publicGuard as e5, requiredValidation as e6, resolveConfigAsset as e7, resolvePallet as e8, resolveSize as e9, rgbToHex as ea, rgbToHsl as eb, setProperty as ec, settingsWidgets as ed, shouldShowBadge as ee, stringToColor as ef, toAttrBool as eg, toAttrNumber as eh, toCssLength as ei, toLength$1 as ej, urlValidation as ek, AccordionComponent as f, AccordionGroupComponent as g, ActionComponent as h, AnimatedGraphsComponent as i, AppCardComponent as j, AppRelationType as k, AppTileComponent as l, AssetStore as m, AssetUrlPipe as n, Assets as o, AutosizeDirective as p, BadgeComponent as q, BandingComponent as r, BaseArrayInputComponent as s, BaseRootWebComponent as t, BaseWebComponent as u, ButtonGroupComponent as v, COMPONENT_INPUT_REGISTRY as w, CardComponent as x, CardWrapperComponent as y, CarouselComponent as z };
|
|
29641
|
+
//# sourceMappingURL=magmonium-one-magmonium-one-B5J36xup.mjs.map
|