@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260423070204 → 0.8.1-dev.20260423090220
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/dist/index.d.mts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +45 -2
- package/dist/index.mjs +44 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -366,4 +366,16 @@ declare const EmailInput: React.FC<InputControlProps>;
|
|
|
366
366
|
|
|
367
367
|
declare const TimeInput: React.FC<InputControlProps>;
|
|
368
368
|
|
|
369
|
-
|
|
369
|
+
interface TabItem {
|
|
370
|
+
tabTitle: string;
|
|
371
|
+
displayOrder: number;
|
|
372
|
+
landingPageUrl: string;
|
|
373
|
+
isActive: boolean;
|
|
374
|
+
}
|
|
375
|
+
interface NavigationTabsV2Props {
|
|
376
|
+
tabs: TabItem[];
|
|
377
|
+
params?: Record<string, any>;
|
|
378
|
+
}
|
|
379
|
+
declare const NavigationTabsV2: React.FC<NavigationTabsV2Props>;
|
|
380
|
+
|
|
381
|
+
export { type ActionResponse, BooleanSelect, CheckboxInput, ColorInput, DataList, DataListRenderer, DateTimeInput, EmailInput, InputControl, type InputControlProps, InputControlType, LineTextInput, MoneyInput, MultilineTextInput, NavigationTabsV2, NumberInput, OtpInput, PageBodyRenderer, PercentageInput, PhoneInput, TimeInput, Toast, ToastService, ViewControl, type ViewControlProps, ViewControlTypes };
|
package/dist/index.d.ts
CHANGED
|
@@ -366,4 +366,16 @@ declare const EmailInput: React.FC<InputControlProps>;
|
|
|
366
366
|
|
|
367
367
|
declare const TimeInput: React.FC<InputControlProps>;
|
|
368
368
|
|
|
369
|
-
|
|
369
|
+
interface TabItem {
|
|
370
|
+
tabTitle: string;
|
|
371
|
+
displayOrder: number;
|
|
372
|
+
landingPageUrl: string;
|
|
373
|
+
isActive: boolean;
|
|
374
|
+
}
|
|
375
|
+
interface NavigationTabsV2Props {
|
|
376
|
+
tabs: TabItem[];
|
|
377
|
+
params?: Record<string, any>;
|
|
378
|
+
}
|
|
379
|
+
declare const NavigationTabsV2: React.FC<NavigationTabsV2Props>;
|
|
380
|
+
|
|
381
|
+
export { type ActionResponse, BooleanSelect, CheckboxInput, ColorInput, DataList, DataListRenderer, DateTimeInput, EmailInput, InputControl, type InputControlProps, InputControlType, LineTextInput, MoneyInput, MultilineTextInput, NavigationTabsV2, NumberInput, OtpInput, PageBodyRenderer, PercentageInput, PhoneInput, TimeInput, Toast, ToastService, ViewControl, type ViewControlProps, ViewControlTypes };
|
package/dist/index.js
CHANGED
|
@@ -1123,6 +1123,7 @@ __export(index_exports, {
|
|
|
1123
1123
|
LineTextInput: () => LineTextInput_default,
|
|
1124
1124
|
MoneyInput: () => MoneyInput_default,
|
|
1125
1125
|
MultilineTextInput: () => MultilineTextInput_default,
|
|
1126
|
+
NavigationTabsV2: () => NavigationTabsV2_default,
|
|
1126
1127
|
NumberInput: () => NumberInput_default,
|
|
1127
1128
|
OtpInput: () => OtpInput_default,
|
|
1128
1129
|
PageBodyRenderer: () => PageBodyRenderer_default,
|
|
@@ -2852,7 +2853,7 @@ function Hyperlink(props) {
|
|
|
2852
2853
|
{
|
|
2853
2854
|
href: props.href,
|
|
2854
2855
|
prefetch: false,
|
|
2855
|
-
className:
|
|
2856
|
+
className: [linkClass, props.className].filter(Boolean).join(" "),
|
|
2856
2857
|
...additionalProps,
|
|
2857
2858
|
target,
|
|
2858
2859
|
children: props.children
|
|
@@ -3643,7 +3644,7 @@ var DataListRenderer = ({
|
|
|
3643
3644
|
(0, import_react34.useEffect)(() => {
|
|
3644
3645
|
const fetchData = async () => {
|
|
3645
3646
|
if (!serviceRoute) return;
|
|
3646
|
-
|
|
3647
|
+
const resolvedRoute = resolveRoutePlaceholders(serviceRoute, params);
|
|
3647
3648
|
const queryString = OdataBuilder.getOdataQueryString(query);
|
|
3648
3649
|
const separator = resolvedRoute.includes("?") ? "&" : "?";
|
|
3649
3650
|
const finalUrl = resolvedRoute + (queryString ? separator + queryString : "");
|
|
@@ -6005,6 +6006,47 @@ var Toast_default = Toast;
|
|
|
6005
6006
|
|
|
6006
6007
|
// src/index.ts
|
|
6007
6008
|
init_ToastService();
|
|
6009
|
+
|
|
6010
|
+
// src/components/NavigationTabsV2.tsx
|
|
6011
|
+
var import_link3 = __toESM(require("next/link"));
|
|
6012
|
+
var import_navigation3 = require("next/navigation");
|
|
6013
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
6014
|
+
function resolveRoutePlaceholders2(route, params) {
|
|
6015
|
+
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
6016
|
+
const value = params[key];
|
|
6017
|
+
if (value === void 0 || value === null) {
|
|
6018
|
+
console.warn(`No value found for route param: ${key}`);
|
|
6019
|
+
return "";
|
|
6020
|
+
}
|
|
6021
|
+
return value;
|
|
6022
|
+
});
|
|
6023
|
+
}
|
|
6024
|
+
var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
6025
|
+
const pathname = (0, import_navigation3.usePathname)();
|
|
6026
|
+
const shouldHideTabs = pathname?.includes("/add");
|
|
6027
|
+
if (shouldHideTabs) return null;
|
|
6028
|
+
const mappedTabs = tabs?.sort((a, b) => a.displayOrder - b.displayOrder)?.map((tab) => ({
|
|
6029
|
+
tabTitle: tab.tabTitle,
|
|
6030
|
+
displayOrder: tab.displayOrder,
|
|
6031
|
+
landingPageUrl: resolveRoutePlaceholders2(
|
|
6032
|
+
tab.landingPageUrl,
|
|
6033
|
+
params
|
|
6034
|
+
),
|
|
6035
|
+
isActive: tab.isActive
|
|
6036
|
+
})) || [];
|
|
6037
|
+
if (mappedTabs.length === 0) return null;
|
|
6038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
6039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6040
|
+
"div",
|
|
6041
|
+
{
|
|
6042
|
+
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
6043
|
+
${isActive ? "bg-info-base" : "bg-neutral-weak "}`,
|
|
6044
|
+
children: tabTitle
|
|
6045
|
+
}
|
|
6046
|
+
) }, landingPageUrl);
|
|
6047
|
+
}) });
|
|
6048
|
+
};
|
|
6049
|
+
var NavigationTabsV2_default = NavigationTabsV2;
|
|
6008
6050
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6009
6051
|
0 && (module.exports = {
|
|
6010
6052
|
BooleanSelect,
|
|
@@ -6019,6 +6061,7 @@ init_ToastService();
|
|
|
6019
6061
|
LineTextInput,
|
|
6020
6062
|
MoneyInput,
|
|
6021
6063
|
MultilineTextInput,
|
|
6064
|
+
NavigationTabsV2,
|
|
6022
6065
|
NumberInput,
|
|
6023
6066
|
OtpInput,
|
|
6024
6067
|
PageBodyRenderer,
|
package/dist/index.mjs
CHANGED
|
@@ -1730,7 +1730,7 @@ function Hyperlink(props) {
|
|
|
1730
1730
|
{
|
|
1731
1731
|
href: props.href,
|
|
1732
1732
|
prefetch: false,
|
|
1733
|
-
className:
|
|
1733
|
+
className: [linkClass, props.className].filter(Boolean).join(" "),
|
|
1734
1734
|
...additionalProps,
|
|
1735
1735
|
target,
|
|
1736
1736
|
children: props.children
|
|
@@ -2517,7 +2517,7 @@ var DataListRenderer = ({
|
|
|
2517
2517
|
useEffect7(() => {
|
|
2518
2518
|
const fetchData = async () => {
|
|
2519
2519
|
if (!serviceRoute) return;
|
|
2520
|
-
|
|
2520
|
+
const resolvedRoute = resolveRoutePlaceholders(serviceRoute, params);
|
|
2521
2521
|
const queryString = OdataBuilder.getOdataQueryString(query);
|
|
2522
2522
|
const separator = resolvedRoute.includes("?") ? "&" : "?";
|
|
2523
2523
|
const finalUrl = resolvedRoute + (queryString ? separator + queryString : "");
|
|
@@ -4868,6 +4868,47 @@ var Toast = () => {
|
|
|
4868
4868
|
] }) }) });
|
|
4869
4869
|
};
|
|
4870
4870
|
var Toast_default = Toast;
|
|
4871
|
+
|
|
4872
|
+
// src/components/NavigationTabsV2.tsx
|
|
4873
|
+
import Link3 from "next/link";
|
|
4874
|
+
import { usePathname as usePathname2 } from "next/navigation";
|
|
4875
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
4876
|
+
function resolveRoutePlaceholders2(route, params) {
|
|
4877
|
+
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
4878
|
+
const value = params[key];
|
|
4879
|
+
if (value === void 0 || value === null) {
|
|
4880
|
+
console.warn(`No value found for route param: ${key}`);
|
|
4881
|
+
return "";
|
|
4882
|
+
}
|
|
4883
|
+
return value;
|
|
4884
|
+
});
|
|
4885
|
+
}
|
|
4886
|
+
var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
4887
|
+
const pathname = usePathname2();
|
|
4888
|
+
const shouldHideTabs = pathname?.includes("/add");
|
|
4889
|
+
if (shouldHideTabs) return null;
|
|
4890
|
+
const mappedTabs = tabs?.sort((a, b) => a.displayOrder - b.displayOrder)?.map((tab) => ({
|
|
4891
|
+
tabTitle: tab.tabTitle,
|
|
4892
|
+
displayOrder: tab.displayOrder,
|
|
4893
|
+
landingPageUrl: resolveRoutePlaceholders2(
|
|
4894
|
+
tab.landingPageUrl,
|
|
4895
|
+
params
|
|
4896
|
+
),
|
|
4897
|
+
isActive: tab.isActive
|
|
4898
|
+
})) || [];
|
|
4899
|
+
if (mappedTabs.length === 0) return null;
|
|
4900
|
+
return /* @__PURE__ */ jsx64("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
4901
|
+
return /* @__PURE__ */ jsx64(Link3, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ jsx64(
|
|
4902
|
+
"div",
|
|
4903
|
+
{
|
|
4904
|
+
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
4905
|
+
${isActive ? "bg-info-base" : "bg-neutral-weak "}`,
|
|
4906
|
+
children: tabTitle
|
|
4907
|
+
}
|
|
4908
|
+
) }, landingPageUrl);
|
|
4909
|
+
}) });
|
|
4910
|
+
};
|
|
4911
|
+
var NavigationTabsV2_default = NavigationTabsV2;
|
|
4871
4912
|
export {
|
|
4872
4913
|
BooleanSelect_default as BooleanSelect,
|
|
4873
4914
|
CheckboxInput_default as CheckboxInput,
|
|
@@ -4881,6 +4922,7 @@ export {
|
|
|
4881
4922
|
LineTextInput_default as LineTextInput,
|
|
4882
4923
|
MoneyInput_default as MoneyInput,
|
|
4883
4924
|
MultilineTextInput_default as MultilineTextInput,
|
|
4925
|
+
NavigationTabsV2_default as NavigationTabsV2,
|
|
4884
4926
|
NumberInput_default as NumberInput,
|
|
4885
4927
|
OtpInput_default as OtpInput,
|
|
4886
4928
|
PageBodyRenderer_default as PageBodyRenderer,
|
package/package.json
CHANGED