@foris/avocado-not-front 4.4.0 → 4.6.0
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/avocado-not-front.es.js +2133 -1635
- package/dist/avocado-not-front.umd.js +3 -3
- package/dist/src/components/box/Box.d.ts +7 -0
- package/dist/src/components/dropdown-button/DropdownButton.d.ts +7 -0
- package/dist/src/components/index.d.ts +13 -6
- package/dist/src/components/layout-card/LayoutCard.d.ts +7 -0
- package/dist/src/components/menu/Menu.d.ts +7 -0
- package/dist/src/components/radio-group/RadioGroup.d.ts +8 -0
- package/dist/src/components/stepper/Stepper.d.ts +7 -0
- package/dist/src/components/table/table.util.d.ts +10 -0
- package/dist/src/components/textarea/Textarea.d.ts +7 -0
- package/dist/src/hooks/useDependencies.d.ts +6 -2
- package/dist/src/hooks/useNotFrontButtonActionRunner.d.ts +10 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/types/components.type.d.ts +713 -97
- package/dist/src/types/componentsCore.type.d.ts +5 -1
- package/dist/src/types/dynamicRouteDefinition.type.d.ts +6 -0
- package/dist/src/types/index.d.ts +1 -0
- package/dist/src/utils/dataSource.util.d.ts +2 -1
- package/dist/src/utils/dynamicRouting/index.d.ts +5 -0
- package/dist/src/utils/dynamicRouting/normalizePathname.d.ts +2 -0
- package/dist/src/utils/dynamicRouting/normalizePathname.test.d.ts +1 -0
- package/dist/src/utils/dynamicRouting/pathBelongsToPrefix.d.ts +6 -0
- package/dist/src/utils/dynamicRouting/pathBelongsToPrefix.test.d.ts +1 -0
- package/dist/src/utils/dynamicRouting/selectDynamicRoutesUnderPrefix.d.ts +9 -0
- package/dist/src/utils/dynamicRouting/selectDynamicRoutesUnderPrefix.test.d.ts +1 -0
- package/dist/src/utils/dynamicRouting/stripPrefixFromPathname.d.ts +6 -0
- package/dist/src/utils/dynamicRouting/stripPrefixFromPathname.test.d.ts +1 -0
- package/dist/src/utils/dynamicRouting/userCanAccessDynamicRoute.d.ts +9 -0
- package/dist/src/utils/dynamicRouting/userCanAccessDynamicRoute.test.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -41,8 +41,12 @@ export interface ChartDataSource {
|
|
|
41
41
|
mapperData: DataSourceMapperData;
|
|
42
42
|
}
|
|
43
43
|
export interface TableDataSource {
|
|
44
|
-
jsonPathData: string;
|
|
45
44
|
mapperData: DataSourceMapperData;
|
|
45
|
+
jsonPathData: string;
|
|
46
|
+
jsonPathCursorPagination?: {
|
|
47
|
+
extractionJsonPath: string;
|
|
48
|
+
injectionJsonPath: string;
|
|
49
|
+
};
|
|
46
50
|
jsonPathPagination?: {
|
|
47
51
|
size?: string;
|
|
48
52
|
total: string;
|
|
@@ -20,7 +20,8 @@ export declare const buildQueryParams: (dataSource: NotFrontDataSourceRest, page
|
|
|
20
20
|
* @param dataSource - The original dataSource configuration (REST or GraphQL)
|
|
21
21
|
* @param page - The page number for pagination (default: 1)
|
|
22
22
|
* @param search - Optional search string (used for filtering, e.g., in selects)
|
|
23
|
+
* @param cursorPayload - Optional cursor object built from the previous response; merged into the REST request `data` after the flow's original `data`.
|
|
23
24
|
* @returns A NotFrontDataSource object ready for fetchDataSource
|
|
24
25
|
* @throws If the dataSource type is not supported
|
|
25
26
|
*/
|
|
26
|
-
export declare const buildRequestDataSource: (dataSource: NotFrontDataSource, page: number, search?: string) => NotFrontDataSource;
|
|
27
|
+
export declare const buildRequestDataSource: (dataSource: NotFrontDataSource, page: number, search?: string, cursorPayload?: Record<string, unknown> | null) => NotFrontDataSource;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { normalizePathname } from './normalizePathname';
|
|
2
|
+
export { userCanAccessDynamicRoute } from './userCanAccessDynamicRoute';
|
|
3
|
+
export { pathBelongsToPrefix } from './pathBelongsToPrefix';
|
|
4
|
+
export { selectDynamicRoutesUnderPrefix } from './selectDynamicRoutesUnderPrefix';
|
|
5
|
+
export { stripPrefixFromPathname } from './stripPrefixFromPathname';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single ownership predicate: a path belongs to a prefix when it is the prefix
|
|
3
|
+
* itself or any descendant of it. A static MFE owns the paths this returns `true`
|
|
4
|
+
* for; a fallback host (e.g. not-front) owns the complement.
|
|
5
|
+
*/
|
|
6
|
+
export declare function pathBelongsToPrefix(path: string, prefix: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DynamicRouteDefinition } from '../../types/dynamicRouteDefinition.type';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the dynamic routes under a single static prefix, for a static MFE that
|
|
4
|
+
* owns a URL prefix (e.g. MOPs under `/mops`). Stays correct when a host has more
|
|
5
|
+
* than one static MFE with dynamic routes.
|
|
6
|
+
*
|
|
7
|
+
* Preserves input order; does not mutate the input.
|
|
8
|
+
*/
|
|
9
|
+
export declare function selectDynamicRoutesUnderPrefix(routes: DynamicRouteDefinition[], prefix: string): DynamicRouteDefinition[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the pathname relative to a host prefix, for routers mounted with
|
|
3
|
+
* `basename={prefix}`: `/` when it equals the prefix, the suffix (starting with
|
|
4
|
+
* `/`) when it is a descendant, otherwise the normalized pathname unchanged.
|
|
5
|
+
*/
|
|
6
|
+
export declare function stripPrefixFromPathname(absolutePath: string, prefix: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DynamicRouteDefinition } from '../../types/dynamicRouteDefinition.type';
|
|
2
|
+
/**
|
|
3
|
+
* Pure permission check for a dynamic route.
|
|
4
|
+
*
|
|
5
|
+
* - An empty `requiredPermissions` array means **open** (no permission needed).
|
|
6
|
+
* - Otherwise the user is granted access if they have **at least one** of the
|
|
7
|
+
* required permissions (OR semantics).
|
|
8
|
+
*/
|
|
9
|
+
export declare function userCanAccessDynamicRoute(permissions: string[], route: Pick<DynamicRouteDefinition, 'requiredPermissions'>): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._summaryCard_jva4h_1
|
|
1
|
+
._accordion_1ri2t_1{flex-shrink:0}._accordion_1ri2t_1 [class*=cardNotificationNotFront]{max-width:100%}._accordionBody_1ri2t_8{display:flex;flex-direction:column;gap:.75rem}._promptCodeEditor_1d57s_1,._summaryCard_jva4h_1{display:flex}._body_14tsv_1{padding:2rem 2.75rem;width:100%}._body_content_14tsv_5{display:flex;flex-direction:column;gap:.75rem;margin:0 auto;max-width:1440px}._slotStack_1b4wy_1{display:flex;flex-direction:column;gap:.75rem;width:100%}._fieldset_1xrth_1{border:none;margin:0;padding:0;min-width:0}._fieldsetColumn_1xrth_8{display:flex;flex-direction:column;align-items:flex-start}._legend_1xrth_14{padding:0;margin-bottom:.5rem;font-size:inherit}._options_1xrth_20{display:flex;gap:.75rem}._optionsRow_1xrth_25{flex-direction:row;flex-wrap:wrap;align-items:center}._optionsRow_1xrth_25>.container_row{width:auto;flex-wrap:nowrap}._optionsColumn_1xrth_36{flex-direction:column;align-items:flex-start}._slotStack_12u4t_5{display:flex;flex-direction:column;gap:.75rem;width:100%}._slotStack_ivk5b_1{display:flex;flex-direction:column;gap:var(--avocado-spacing-sm, .5rem)}._codeEditor_1wi2p_1:not(:first-child){margin:1rem 0 0}._codeEditor_label_1wi2p_4{color:var(--color-neutral-90);display:block;font-family:Roboto,sans-serif;font-size:.75rem;font-weight:700;line-height:.875rem;margin:0 0 .5rem}._codeEditor_wrapper_1wi2p_13{display:grid;gap:1rem}._codeEditor_wrapper_1wi2p_13 ._input_1wi2p_17,._codeEditor_wrapper_1wi2p_13 ._preview_1wi2p_18{flex:1}._codeEditor_wrapper_1wi2p_13 ._input_1wi2p_17{border-radius:.25rem;border:1px solid var(--color-neutral-30);overflow:hidden}._codeEditor_wrapper_1wi2p_13 ._preview_1wi2p_18{border-radius:.25rem;border:1px solid var(--color-neutral-30);display:flex;flex-direction:column;overflow:hidden}._codeEditor_wrapper_1wi2p_13 ._preview_inner_1wi2p_33{flex:1 1 auto;min-height:0;overflow-y:auto;padding:.75rem}._slotStack_6n2wy_5{display:flex;flex-direction:column;gap:.75rem;width:100%}._dividerNotFront_tze3j_1{margin:1.25rem 0}._drawer_13pxo_1{z-index:9}._drawerBody_13pxo_5{display:flex;flex-direction:column;gap:.75rem}._drawerFooter_13pxo_11{display:flex;gap:.75rem}._header_g1eri_1{padding:1.5rem 2.75rem;background-color:var(--color-gray-80)}._header_content_g1eri_5{display:flex;flex-direction:column;gap:.75rem;margin:0 auto;max-width:1440px}._modalContent_p06ci_1{display:flex;flex-direction:column;gap:.75rem;padding:0 .25rem .5rem 0;width:calc(100% - .25rem)}._row_1bqj4_1{display:flex;width:100%}._row__gap-none_1bqj4_5{gap:0}._row__gap-xxs_1bqj4_8{gap:.25rem}._row__gap-xs_1bqj4_11{gap:.5rem}._row__gap-sm_1bqj4_14{gap:.75rem}._row__gap-md_1bqj4_17{gap:1rem}._row__gap-lg_1bqj4_20{gap:1.25rem}._row__gap-xl_1bqj4_23{gap:1.5rem}._row__gap-xxl_1bqj4_26{gap:2rem}._row__gap-xxxl_1bqj4_29{gap:2.75rem}._row__justify-start_1bqj4_32{justify-content:flex-start}._row__justify-end_1bqj4_35{justify-content:flex-end}._row__justify-center_1bqj4_38{justify-content:center}._row__justify-space-between_1bqj4_41{justify-content:space-between}._row__justify-space-around_1bqj4_44{justify-content:space-around}._row__justify-space-evenly_1bqj4_47{justify-content:space-evenly}._row__align-start_1bqj4_50{align-items:flex-start}._row__align-end_1bqj4_53{align-items:flex-end}._row__align-center_1bqj4_56{align-items:center}._row__align-stretch_1bqj4_59{align-items:stretch}._row__align-baseline_1bqj4_62{align-items:baseline}._row_column_1bqj4_65{display:flex;flex-direction:column;min-height:1px;overflow-wrap:break-word;word-wrap:break-word}._row_column__gap-none_1bqj4_72{gap:0}._row_column__gap-xxs_1bqj4_75{gap:.25rem}._row_column__gap-xs_1bqj4_78{gap:.5rem}._row_column__gap-sm_1bqj4_81{gap:.75rem}._row_column__gap-md_1bqj4_84{gap:1rem}._row_column__gap-lg_1bqj4_87{gap:1.25rem}._row_column__gap-xl_1bqj4_90{gap:1.5rem}._row_column__gap-xxl_1bqj4_93{gap:2rem}._row_column__gap-xxxl_1bqj4_96{gap:2.75rem}._row_column__justify-start_1bqj4_99{justify-content:flex-start}._row_column__justify-end_1bqj4_102{justify-content:flex-end}._row_column__justify-center_1bqj4_105{justify-content:center}._row_column__justify-space-between_1bqj4_108{justify-content:space-between}._row_column__justify-space-around_1bqj4_111{justify-content:space-around}._row_column__justify-space-evenly_1bqj4_114{justify-content:space-evenly}._row_column__align-start_1bqj4_117{align-items:flex-start}._row_column__align-end_1bqj4_120{align-items:flex-end}._row_column__align-center_1bqj4_123{align-items:center}._row_column__align-stretch_1bqj4_126{align-items:stretch}._row_column__align-baseline_1bqj4_129{align-items:baseline}._selectNotFront_ch3v5_1{max-width:364px;width:100%}._spacing_19hqa_1._spacing__xxs_19hqa_1{margin:.25rem 0 0}._spacing_19hqa_1._spacing__xs_19hqa_4{margin:.5rem 0 0}._spacing_19hqa_1._spacing__sm_19hqa_7{margin:.75rem 0 0}._spacing_19hqa_1._spacing__md_19hqa_10{margin:1rem 0 0}._spacing_19hqa_1._spacing__lg_19hqa_13{margin:1.25rem 0 0}._spacing_19hqa_1._spacing__xl_19hqa_16{margin:1.5rem 0 0}._spacing_19hqa_1._spacing__xxl_19hqa_19{margin:2rem 0 0}._spacing_19hqa_1._spacing__xxxl_19hqa_22{margin:2.75rem 0 0}._tableSkeleton_3nr9n_1{display:flex;flex-direction:column;gap:.5rem}._tableArrayPills_3nr9n_7{display:flex;gap:.5rem;flex-wrap:wrap}._tabsPanel_kvslb_1{display:flex;flex-direction:column;gap:.75rem}._textFieldNotFront_1n8fy_1{max-width:364px;width:100%}._tooltipNotFront_106iw_1{align-self:flex-start;max-width:100%}._tooltipNotFront_content_106iw_5{display:flex;flex-direction:column;gap:.75rem;width:fit-content}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foris/avocado-not-front",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"recharts": "3.1.0",
|
|
52
52
|
"zustand": "4.5.4",
|
|
53
53
|
"@uiw/react-codemirror": "4.23.12",
|
|
54
|
-
"@foris/ai-agent": "1.0.7",
|
|
55
54
|
"@foris/avocado-core": "1.3.0",
|
|
56
55
|
"@foris/avocado-icons": "1.16.6",
|
|
57
|
-
"@foris/
|
|
58
|
-
"@foris/tsconfig": "0.0.2"
|
|
56
|
+
"@foris/ai-agent": "1.0.7",
|
|
57
|
+
"@foris/tsconfig": "0.0.2",
|
|
58
|
+
"@foris/avocado-suite": "1.8.12"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@codemirror/lang-json": ">=6.0.0",
|