@cnc-ti/layout-basic 8.8.0 → 8.8.2
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 +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -116,8 +116,14 @@ interface AppInput {
|
|
|
116
116
|
}
|
|
117
117
|
interface AppsMenuProps {
|
|
118
118
|
apps?: AppInput[];
|
|
119
|
+
/**
|
|
120
|
+
* Controla a exibição do AppsMenu no header.
|
|
121
|
+
*
|
|
122
|
+
* @defaultValue false
|
|
123
|
+
*/
|
|
124
|
+
show?: boolean;
|
|
119
125
|
}
|
|
120
|
-
declare function AppsMenu({ apps, }: AppsMenuProps): react_jsx_runtime.JSX.Element;
|
|
126
|
+
declare function AppsMenu({ apps, show, }: AppsMenuProps): react_jsx_runtime.JSX.Element | null;
|
|
121
127
|
|
|
122
128
|
type ModalProps = {
|
|
123
129
|
title?: string;
|
|
@@ -1269,7 +1275,7 @@ interface AlertasProps {
|
|
|
1269
1275
|
* entidade que vincula o alerta não se chama "evento" — a chave precisa
|
|
1270
1276
|
* bater com o que foi salvo em `metadados` na criação do alerta.
|
|
1271
1277
|
*/
|
|
1272
|
-
filtros?: Record<string, string
|
|
1278
|
+
filtros?: Record<string, string>;
|
|
1273
1279
|
/** Falha ao buscar a lista (GET) ou ao salvar/concluir/excluir (erro relançado por onCriar/onAtualizar/onConcluir/onExcluir). */
|
|
1274
1280
|
onErro?: (erro: Error) => void;
|
|
1275
1281
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -116,8 +116,14 @@ interface AppInput {
|
|
|
116
116
|
}
|
|
117
117
|
interface AppsMenuProps {
|
|
118
118
|
apps?: AppInput[];
|
|
119
|
+
/**
|
|
120
|
+
* Controla a exibição do AppsMenu no header.
|
|
121
|
+
*
|
|
122
|
+
* @defaultValue false
|
|
123
|
+
*/
|
|
124
|
+
show?: boolean;
|
|
119
125
|
}
|
|
120
|
-
declare function AppsMenu({ apps, }: AppsMenuProps): react_jsx_runtime.JSX.Element;
|
|
126
|
+
declare function AppsMenu({ apps, show, }: AppsMenuProps): react_jsx_runtime.JSX.Element | null;
|
|
121
127
|
|
|
122
128
|
type ModalProps = {
|
|
123
129
|
title?: string;
|
|
@@ -1269,7 +1275,7 @@ interface AlertasProps {
|
|
|
1269
1275
|
* entidade que vincula o alerta não se chama "evento" — a chave precisa
|
|
1270
1276
|
* bater com o que foi salvo em `metadados` na criação do alerta.
|
|
1271
1277
|
*/
|
|
1272
|
-
filtros?: Record<string, string
|
|
1278
|
+
filtros?: Record<string, string>;
|
|
1273
1279
|
/** Falha ao buscar a lista (GET) ou ao salvar/concluir/excluir (erro relançado por onCriar/onAtualizar/onConcluir/onExcluir). */
|
|
1274
1280
|
onErro?: (erro: Error) => void;
|
|
1275
1281
|
}
|
package/dist/index.js
CHANGED
|
@@ -3349,7 +3349,8 @@ var availableApps = {
|
|
|
3349
3349
|
CDD: { name: "Or\xE1culoS", url: process.env.NEXT_PUBLIC_CDD_APP_URL ?? "https://oraculos.cnc.org.br/", icon: "fa-solid fa-database", color: "#00B8D9" }
|
|
3350
3350
|
};
|
|
3351
3351
|
function AppsMenu({
|
|
3352
|
-
apps = Object.keys(availableApps).map((key) => ({ code: key, url: availableApps[key].url }))
|
|
3352
|
+
apps = Object.keys(availableApps).map((key) => ({ code: key, url: availableApps[key].url })),
|
|
3353
|
+
show = false
|
|
3353
3354
|
}) {
|
|
3354
3355
|
const [isOpen, setIsOpen] = (0, import_react4.useState)(false);
|
|
3355
3356
|
const menuRef = (0, import_react4.useRef)(null);
|
|
@@ -3371,6 +3372,9 @@ function AppsMenu({
|
|
|
3371
3372
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
3372
3373
|
};
|
|
3373
3374
|
}, [isOpen]);
|
|
3375
|
+
if (!show) {
|
|
3376
|
+
return null;
|
|
3377
|
+
}
|
|
3374
3378
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "cnc-relative cnc-flex cnc-items-center cnc-h-full", ref: menuRef, children: [
|
|
3375
3379
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3376
3380
|
"button",
|