maquinaweb-ui 2.65.1 → 2.67.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/_virtual/rolldown_runtime.js +31 -0
- package/dist/actions.js +16 -0
- package/dist/actions.js.map +1 -0
- package/dist/container-animation/container-animation.d.ts +2 -2
- package/dist/container-animation/container-animation.d.ts.map +1 -1
- package/dist/date-field/DateField.d.ts +2 -2
- package/dist/date-hour-field/DateHourField.d.ts +2 -2
- package/dist/input-suggest/input-suggest.d.ts +2 -2
- package/dist/landing-content.d.ts +3 -2
- package/dist/landing-content.js +2 -2
- package/dist/landing-text/client-landing-text.js +7 -4
- package/dist/landing-text/client-landing-text.js.map +1 -1
- package/dist/landing-text/landing-content.d.ts +2 -37
- package/dist/landing-text/landing-content.d.ts.map +1 -1
- package/dist/landing-text/landing-content.js +34 -37
- package/dist/landing-text/landing-content.js.map +1 -1
- package/dist/landing-text/landing-text.d.ts +4 -22
- package/dist/landing-text/landing-text.d.ts.map +1 -1
- package/dist/landing-text/landing-text.js.map +1 -1
- package/dist/landing-text/server-landing-text.d.ts +4 -14
- package/dist/landing-text/server-landing-text.d.ts.map +1 -1
- package/dist/landing-text/server-landing-text.js.map +1 -1
- package/dist/landing-text/types.d.ts +68 -0
- package/dist/landing-text/types.d.ts.map +1 -0
- package/dist/landing-text.d.ts +3 -2
- package/dist/node_modules/next/cache.js +79 -0
- package/dist/node_modules/next/cache.js.map +1 -0
- package/dist/node_modules/next/dist/build/output/log.js +119 -0
- package/dist/node_modules/next/dist/build/output/log.js.map +1 -0
- package/dist/node_modules/next/dist/client/components/app-router-headers.js +119 -0
- package/dist/node_modules/next/dist/client/components/app-router-headers.js.map +1 -0
- package/dist/node_modules/next/dist/client/components/hooks-server-context.js +41 -0
- package/dist/node_modules/next/dist/client/components/hooks-server-context.js.map +1 -0
- package/dist/node_modules/next/dist/client/components/static-generation-bailout.js +41 -0
- package/dist/node_modules/next/dist/client/components/static-generation-bailout.js.map +1 -0
- package/dist/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js +312 -0
- package/dist/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js.map +1 -0
- package/dist/node_modules/next/dist/compiled/@opentelemetry/api/index.js +1286 -0
- package/dist/node_modules/next/dist/compiled/@opentelemetry/api/index.js.map +1 -0
- package/dist/node_modules/next/dist/lib/batcher.js +63 -0
- package/dist/node_modules/next/dist/lib/batcher.js.map +1 -0
- package/dist/node_modules/next/dist/lib/constants.js +325 -0
- package/dist/node_modules/next/dist/lib/constants.js.map +1 -0
- package/dist/node_modules/next/dist/lib/detached-promise.js +30 -0
- package/dist/node_modules/next/dist/lib/detached-promise.js.map +1 -0
- package/dist/node_modules/next/dist/lib/framework/boundary-constants.js +36 -0
- package/dist/node_modules/next/dist/lib/framework/boundary-constants.js.map +1 -0
- package/dist/node_modules/next/dist/lib/picocolors.js +141 -0
- package/dist/node_modules/next/dist/lib/picocolors.js.map +1 -0
- package/dist/node_modules/next/dist/lib/scheduler.js +49 -0
- package/dist/node_modules/next/dist/lib/scheduler.js.map +1 -0
- package/dist/node_modules/next/dist/server/app-render/async-local-storage.js +67 -0
- package/dist/node_modules/next/dist/server/app-render/async-local-storage.js.map +1 -0
- package/dist/node_modules/next/dist/server/app-render/dynamic-rendering.js +763 -0
- package/dist/node_modules/next/dist/server/app-render/dynamic-rendering.js.map +1 -0
- package/dist/node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js +19 -0
- package/dist/node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js.map +1 -0
- package/dist/node_modules/next/dist/server/app-render/staged-rendering.js +215 -0
- package/dist/node_modules/next/dist/server/app-render/staged-rendering.js.map +1 -0
- package/dist/node_modules/next/dist/server/app-render/work-async-storage-instance.js +20 -0
- package/dist/node_modules/next/dist/server/app-render/work-async-storage-instance.js.map +1 -0
- package/dist/node_modules/next/dist/server/app-render/work-async-storage.external.js +20 -0
- package/dist/node_modules/next/dist/server/app-render/work-async-storage.external.js.map +1 -0
- package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js +20 -0
- package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js.map +1 -0
- package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js +214 -0
- package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js.map +1 -0
- package/dist/node_modules/next/dist/server/base-http/helpers.js +36 -0
- package/dist/node_modules/next/dist/server/base-http/helpers.js.map +1 -0
- package/dist/node_modules/next/dist/server/client-component-renderer-logger.js +65 -0
- package/dist/node_modules/next/dist/server/client-component-renderer-logger.js.map +1 -0
- package/dist/node_modules/next/dist/server/dynamic-rendering-utils.js +85 -0
- package/dist/node_modules/next/dist/server/dynamic-rendering-utils.js.map +1 -0
- package/dist/node_modules/next/dist/server/lib/clone-response.js +55 -0
- package/dist/node_modules/next/dist/server/lib/clone-response.js.map +1 -0
- package/dist/node_modules/next/dist/server/lib/dedupe-fetch.js +106 -0
- package/dist/node_modules/next/dist/server/lib/dedupe-fetch.js.map +1 -0
- package/dist/node_modules/next/dist/server/lib/lru-cache.js +179 -0
- package/dist/node_modules/next/dist/server/lib/lru-cache.js.map +1 -0
- package/dist/node_modules/next/dist/server/lib/patch-fetch.js +703 -0
- package/dist/node_modules/next/dist/server/lib/patch-fetch.js.map +1 -0
- package/dist/node_modules/next/dist/server/lib/trace/constants.js +186 -0
- package/dist/node_modules/next/dist/server/lib/trace/constants.js.map +1 -0
- package/dist/node_modules/next/dist/server/lib/trace/tracer.js +229 -0
- package/dist/node_modules/next/dist/server/lib/trace/tracer.js.map +1 -0
- package/dist/node_modules/next/dist/server/pipe-readable.js +112 -0
- package/dist/node_modules/next/dist/server/pipe-readable.js.map +1 -0
- package/dist/node_modules/next/dist/server/render-result.js +156 -0
- package/dist/node_modules/next/dist/server/render-result.js.map +1 -0
- package/dist/node_modules/next/dist/server/request-meta.js +54 -0
- package/dist/node_modules/next/dist/server/request-meta.js.map +1 -0
- package/dist/node_modules/next/dist/server/response-cache/index.js +255 -0
- package/dist/node_modules/next/dist/server/response-cache/index.js.map +1 -0
- package/dist/node_modules/next/dist/server/response-cache/types.js +43 -0
- package/dist/node_modules/next/dist/server/response-cache/types.js.map +1 -0
- package/dist/node_modules/next/dist/server/response-cache/utils.js +100 -0
- package/dist/node_modules/next/dist/server/response-cache/utils.js.map +1 -0
- package/dist/node_modules/next/dist/server/route-kind.js +38 -0
- package/dist/node_modules/next/dist/server/route-kind.js.map +1 -0
- package/dist/node_modules/next/dist/server/stream-utils/encoded-tags.js +115 -0
- package/dist/node_modules/next/dist/server/stream-utils/encoded-tags.js.map +1 -0
- package/dist/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +635 -0
- package/dist/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js.map +1 -0
- package/dist/node_modules/next/dist/server/stream-utils/uint8array-helpers.js +58 -0
- package/dist/node_modules/next/dist/server/stream-utils/uint8array-helpers.js.map +1 -0
- package/dist/node_modules/next/dist/server/use-cache/cache-life.js +140 -0
- package/dist/node_modules/next/dist/server/use-cache/cache-life.js.map +1 -0
- package/dist/node_modules/next/dist/server/use-cache/cache-tag.js +52 -0
- package/dist/node_modules/next/dist/server/use-cache/cache-tag.js.map +1 -0
- package/dist/node_modules/next/dist/server/web/error.js +55 -0
- package/dist/node_modules/next/dist/server/web/error.js.map +1 -0
- package/dist/node_modules/next/dist/server/web/next-url.js +203 -0
- package/dist/node_modules/next/dist/server/web/next-url.js.map +1 -0
- package/dist/node_modules/next/dist/server/web/spec-extension/adapters/next-request.js +103 -0
- package/dist/node_modules/next/dist/server/web/spec-extension/adapters/next-request.js.map +1 -0
- package/dist/node_modules/next/dist/server/web/spec-extension/cookies.js +31 -0
- package/dist/node_modules/next/dist/server/web/spec-extension/cookies.js.map +1 -0
- package/dist/node_modules/next/dist/server/web/spec-extension/request.js +98 -0
- package/dist/node_modules/next/dist/server/web/spec-extension/request.js.map +1 -0
- package/dist/node_modules/next/dist/server/web/spec-extension/revalidate.js +162 -0
- package/dist/node_modules/next/dist/server/web/spec-extension/revalidate.js.map +1 -0
- package/dist/node_modules/next/dist/server/web/spec-extension/unstable-cache.js +187 -0
- package/dist/node_modules/next/dist/server/web/spec-extension/unstable-cache.js.map +1 -0
- package/dist/node_modules/next/dist/server/web/spec-extension/unstable-no-store.js +49 -0
- package/dist/node_modules/next/dist/server/web/spec-extension/unstable-no-store.js.map +1 -0
- package/dist/node_modules/next/dist/server/web/utils.js +113 -0
- package/dist/node_modules/next/dist/server/web/utils.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/action-revalidation-kind.js +32 -0
- package/dist/node_modules/next/dist/shared/lib/action-revalidation-kind.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/errors/constants.js +24 -0
- package/dist/node_modules/next/dist/shared/lib/errors/constants.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/get-hostname.js +25 -0
- package/dist/node_modules/next/dist/shared/lib/get-hostname.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/hash.js +37 -0
- package/dist/node_modules/next/dist/shared/lib/hash.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +23 -0
- package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +43 -0
- package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/invariant-error.js +24 -0
- package/dist/node_modules/next/dist/shared/lib/invariant-error.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/is-thenable.js +21 -0
- package/dist/node_modules/next/dist/shared/lib/is-thenable.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js +36 -0
- package/dist/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +21 -0
- package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/promise-with-resolvers.js +31 -0
- package/dist/node_modules/next/dist/shared/lib/promise-with-resolvers.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +31 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +25 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js +25 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +52 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js +29 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js +33 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js +52 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +33 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/index.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +93 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +27 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +33 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +25 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js +26 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +21 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +168 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js.map +1 -0
- package/dist/node_modules/next/dist/shared/lib/segment.js +85 -0
- package/dist/node_modules/next/dist/shared/lib/segment.js.map +1 -0
- package/dist/page-header/page-header.d.ts +2 -2
- package/dist/remote-selector/remote-selector.d.ts +3 -3
- package/dist/remote-selector/remote-selector.d.ts.map +1 -1
- package/dist/text-field/TextField.d.ts +5 -5
- package/dist/toggle-field/ToggleGroup.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __commonJS = (cb, mod) => function() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
13
|
+
key = keys[i];
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: ((k) => from[k]).bind(null, key),
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
22
|
+
value: mod,
|
|
23
|
+
enumerable: true
|
|
24
|
+
}) : target, mod));
|
|
25
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
|
|
26
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
27
|
+
throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function.");
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { __commonJS, __require, __toESM };
|
package/dist/actions.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use server';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { __toESM } from "./_virtual/rolldown_runtime.js";
|
|
5
|
+
import { require_cache } from "./node_modules/next/cache.js";
|
|
6
|
+
|
|
7
|
+
//#region src/components/actions.ts
|
|
8
|
+
var import_cache = /* @__PURE__ */ __toESM(require_cache(), 1);
|
|
9
|
+
async function refreshTag(tag) {
|
|
10
|
+
if (Array.isArray(tag)) tag.forEach((t) => (0, import_cache.updateTag)(t));
|
|
11
|
+
else (0, import_cache.updateTag)(tag);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { refreshTag };
|
|
16
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","names":[],"sources":["../src/components/actions.ts"],"sourcesContent":["'use server';\n\nimport { updateTag } from 'next/cache';\n\nexport async function refreshTag(tag: string | string[]) {\n if (Array.isArray(tag)) {\n tag.forEach((t) => updateTag(t));\n } else {\n updateTag(tag);\n }\n}\n"],"mappings":";;;;;;;;AAIA,eAAsB,WAAW,KAAwB;AACvD,KAAI,MAAM,QAAQ,IAAI,CACpB,KAAI,SAAS,kCAAgB,EAAE,CAAC;KAEhC,6BAAU,IAAI"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, ElementType } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/container-animation/container-animation.d.ts
|
|
5
5
|
type ContainerAnimationProps<T extends ElementType = 'div'> = ComponentProps<'div'> & ComponentProps<T> & {
|
|
@@ -23,7 +23,7 @@ declare const ContainerAnimation: <T extends ElementType = "div">({
|
|
|
23
23
|
distance,
|
|
24
24
|
hideNotInView,
|
|
25
25
|
...props
|
|
26
|
-
}: ContainerAnimationProps<T>) =>
|
|
26
|
+
}: ContainerAnimationProps<T>) => react_jsx_runtime11.JSX.Element;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { ContainerAnimation, ContainerAnimationProps };
|
|
29
29
|
//# sourceMappingURL=container-animation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-animation.d.ts","names":[],"sources":["../../src/components/container-animation/container-animation.tsx"],"sourcesContent":[],"mappings":";;;;KAiDY,kCAAkC,uBAC5C,wBACE,eAAe;;;EAFP,KAAA,CAAA,EAAA,MAAA;EAAkC,QAAA,CAAA,EAAA,MAAA;EAC5C,QAAA,CAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA;EACiB,aAAA,CAAA,EAAA,OAAA;EAAf,EAAA,CAAA,EAOO,CAPP,GAAA,MAAA;EAOO,SAAA,CAAA,EAAA,MAAA;CAAC;AAEN,cAEA,kBAkCL,EAAA,CAAA,UAlCqC,WAkCrC,GAAA,KAAA,CAAA,CAAA;EAAA,SAAA;EAAA,QAAA;EAAA,QAAA;EAAA,KAAA;EAAA,KAAA;EAAA,QAAA;EAAA,EAAA,EAlC0D,EAkC1D;EAAA,QAAA;EAAA,aAAA;EAAA,GAAA;AAAA,CAAA,EAvBE,uBAuBF,CAvB0B,CAuB1B,CAAA,EAAA,GAvB4B,
|
|
1
|
+
{"version":3,"file":"container-animation.d.ts","names":[],"sources":["../../src/components/container-animation/container-animation.tsx"],"sourcesContent":[],"mappings":";;;;KAiDY,kCAAkC,uBAC5C,wBACE,eAAe;;;EAFP,KAAA,CAAA,EAAA,MAAA;EAAkC,QAAA,CAAA,EAAA,MAAA;EAC5C,QAAA,CAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA;EACiB,aAAA,CAAA,EAAA,OAAA;EAAf,EAAA,CAAA,EAOO,CAPP,GAAA,MAAA;EAOO,SAAA,CAAA,EAAA,MAAA;CAAC;AAEN,cAEA,kBAkCL,EAAA,CAAA,UAlCqC,WAkCrC,GAAA,KAAA,CAAA,CAAA;EAAA,SAAA;EAAA,QAAA;EAAA,QAAA;EAAA,KAAA;EAAA,KAAA;EAAA,QAAA;EAAA,EAAA,EAlC0D,EAkC1D;EAAA,QAAA;EAAA,aAAA;EAAA,GAAA;AAAA,CAAA,EAvBE,uBAuBF,CAvB0B,CAuB1B,CAAA,EAAA,GAvB4B,mBAAA,CAAA,GAAA,CAAA,OAuB5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldPath, FieldValues, UseControllerProps } from "react-hook-form";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
3
3
|
import { Matcher } from "react-day-picker";
|
|
4
4
|
|
|
5
5
|
//#region src/components/date-field/DateField.d.ts
|
|
@@ -29,7 +29,7 @@ declare function DateField<TFieldValues extends FieldValues = FieldValues, TFiel
|
|
|
29
29
|
required,
|
|
30
30
|
help,
|
|
31
31
|
dateOnly
|
|
32
|
-
}: DateFieldProps<TFieldValues, TFieldName>):
|
|
32
|
+
}: DateFieldProps<TFieldValues, TFieldName>): react_jsx_runtime2.JSX.Element;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { DateField, DateFieldProps };
|
|
35
35
|
//# sourceMappingURL=DateField.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldPath, FieldValues, UseControllerProps } from "react-hook-form";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
3
3
|
import { Matcher } from "react-day-picker";
|
|
4
4
|
|
|
5
5
|
//#region src/components/date-hour-field/DateHourField.d.ts
|
|
@@ -29,7 +29,7 @@ declare function DateHourField<TFieldValues extends FieldValues = FieldValues, T
|
|
|
29
29
|
help,
|
|
30
30
|
hourPlaceholder,
|
|
31
31
|
valueType
|
|
32
|
-
}: DateHourFieldProps<TFieldValues, TFieldName>):
|
|
32
|
+
}: DateHourFieldProps<TFieldValues, TFieldName>): react_jsx_runtime7.JSX.Element;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { DateHourField, DateHourFieldProps };
|
|
35
35
|
//# sourceMappingURL=DateHourField.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Mask, Options } from "../src/hooks/with-mask.js";
|
|
2
2
|
import { FieldPath, FieldValues, UseControllerProps } from "react-hook-form";
|
|
3
3
|
import { Dispatch, SetStateAction } from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
5
5
|
import { PopoverProps } from "@radix-ui/react-popover";
|
|
6
6
|
|
|
7
7
|
//#region src/components/input-suggest/input-suggest.d.ts
|
|
@@ -71,7 +71,7 @@ declare function InputSuggest<TFieldValues extends FieldValues = FieldValues, TF
|
|
|
71
71
|
debounceTime,
|
|
72
72
|
maxWait,
|
|
73
73
|
...props
|
|
74
|
-
}: InputSuggestProps<TFieldValues, TFieldName> & PopoverProps):
|
|
74
|
+
}: InputSuggestProps<TFieldValues, TFieldName> & PopoverProps): react_jsx_runtime1.JSX.Element;
|
|
75
75
|
//#endregion
|
|
76
76
|
export { InputSuggest, InputSuggestProps };
|
|
77
77
|
//# sourceMappingURL=input-suggest.d.ts.map
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { LandingContentDefinitionItem, LandingContentDefinitionSection, LandingContentName, LandingPageContentApiItem, LandingPageContentDefinition, LandingPageKey, ResolvedLandingContentItem, ResolvedLandingPageContent
|
|
2
|
-
|
|
1
|
+
import { LandingContentDefinitionItem, LandingContentDefinitionSection, LandingContentName, LandingPageContentApiItem, LandingPageContentDefinition, LandingPageKey, ResolvedLandingContentItem, ResolvedLandingPageContent } from "./landing-text/types.js";
|
|
2
|
+
import { buildContentId, getLandingContentByName, getLandingContentItem, getLandingPageContent, parseLandingContentName, setLandingPageDefaults } from "./landing-text/landing-content.js";
|
|
3
|
+
export { type LandingContentDefinitionItem, type LandingContentDefinitionSection, type LandingContentName, type LandingPageContentApiItem, type LandingPageContentDefinition, type LandingPageKey, type ResolvedLandingContentItem, type ResolvedLandingPageContent, buildContentId, getLandingContentByName, getLandingContentItem, getLandingPageContent, parseLandingContentName, setLandingPageDefaults };
|
package/dist/landing-content.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { buildContentId, getLandingContentByName, getLandingContentItem, getLandingPageContent,
|
|
1
|
+
import { buildContentId, getLandingContentByName, getLandingContentItem, getLandingPageContent, parseLandingContentName, setLandingPageDefaults } from "./landing-text/landing-content.js";
|
|
2
2
|
|
|
3
|
-
export { buildContentId, getLandingContentByName, getLandingContentItem, getLandingPageContent,
|
|
3
|
+
export { buildContentId, getLandingContentByName, getLandingContentItem, getLandingPageContent, parseLandingContentName, setLandingPageDefaults };
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "../src/lib/utils.js";
|
|
5
5
|
import { Button } from "../ui/button.js";
|
|
6
|
+
import { refreshTag } from "../actions.js";
|
|
6
7
|
import { useRef, useState } from "react";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { Check, X } from "lucide-react";
|
|
@@ -31,7 +32,7 @@ async function persistLandingContent(item, value) {
|
|
|
31
32
|
if (!baseUrl) return;
|
|
32
33
|
const token = getCookieValue("token");
|
|
33
34
|
if (!token || !organization) throw new Error("Credenciais de edição indisponíveis para salvar conteúdo.");
|
|
34
|
-
|
|
35
|
+
const response = await fetch(`${normalizeBaseUrl(baseUrl)}/landing-page-contents/upsert/`, {
|
|
35
36
|
method: "POST",
|
|
36
37
|
headers: {
|
|
37
38
|
"Content-Type": "application/json",
|
|
@@ -50,7 +51,9 @@ async function persistLandingContent(item, value) {
|
|
|
50
51
|
metadata: item.metadata
|
|
51
52
|
}),
|
|
52
53
|
credentials: "include"
|
|
53
|
-
})
|
|
54
|
+
});
|
|
55
|
+
await refreshTag(`landing-page-content-${item.pageKey}`);
|
|
56
|
+
if (!response.ok) throw new Error("Nao foi possivel salvar o conteudo.");
|
|
54
57
|
}
|
|
55
58
|
function ClientLandingText({ item, editable, children }) {
|
|
56
59
|
const [isEditing, setIsEditing] = useState(false);
|
|
@@ -93,7 +96,7 @@ function ClientLandingText({ item, editable, children }) {
|
|
|
93
96
|
children: [editable && isEditing && /* @__PURE__ */ jsxs("div", {
|
|
94
97
|
className: "absolute right-0 z-10 h-fit -top-7 flex",
|
|
95
98
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
96
|
-
className: "
|
|
99
|
+
className: "size-6 rounded-none p-0",
|
|
97
100
|
disabled: isSaving,
|
|
98
101
|
onClick: handleCancel,
|
|
99
102
|
size: "icon",
|
|
@@ -101,7 +104,7 @@ function ClientLandingText({ item, editable, children }) {
|
|
|
101
104
|
variant: "outline",
|
|
102
105
|
children: /* @__PURE__ */ jsx(X, {})
|
|
103
106
|
}), /* @__PURE__ */ jsx(Button, {
|
|
104
|
-
className: "
|
|
107
|
+
className: "size-6 rounded-none p-0",
|
|
105
108
|
disabled: isSaving,
|
|
106
109
|
onClick: handleSave,
|
|
107
110
|
size: "icon",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-landing-text.js","names":[],"sources":["../../src/components/landing-text/client-landing-text.tsx"],"sourcesContent":["'use client';\n\nimport { useRef, useState } from 'react';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { Button } from '../ui/button';\n\nimport { Check, X } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport type { LandingTextItem } from './
|
|
1
|
+
{"version":3,"file":"client-landing-text.js","names":[],"sources":["../../src/components/landing-text/client-landing-text.tsx"],"sourcesContent":["'use client';\n\nimport { useRef, useState } from 'react';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { Button } from '../ui/button';\n\nimport { Check, X } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { refreshTag } from '../actions';\nimport type { LandingTextItem } from './types';\n\ninterface ClientLandingTextProps {\n item: LandingTextItem;\n editable: boolean;\n children: React.ReactNode;\n}\n\nfunction labelFromKey(value: string) {\n if (!value) {\n return '';\n }\n\n return value\n .split(/[-_\\.]/g)\n .filter(Boolean)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n}\n\nfunction normalizeBaseUrl(baseUrl: string): string {\n return baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl;\n}\n\nfunction getCookieValue(name: string): string | undefined {\n if (typeof document === 'undefined') {\n return undefined;\n }\n\n const key = `${encodeURIComponent(name)}=`;\n const cookies = document.cookie ? document.cookie.split('; ') : [];\n\n for (const cookie of cookies) {\n if (!cookie.startsWith(key)) {\n continue;\n }\n\n return decodeURIComponent(cookie.slice(key.length));\n }\n\n return undefined;\n}\n\nasync function persistLandingContent(item: LandingTextItem, value: string) {\n const baseUrl = String(process.env.NEXT_PUBLIC_BASE_URL || '');\n const organization = process.env.NEXT_PUBLIC_ORGANIZATION_ID || '';\n\n if (!baseUrl) {\n return;\n }\n\n const token = getCookieValue('token');\n\n if (!token || !organization) {\n throw new Error(\n 'Credenciais de edição indisponíveis para salvar conteúdo.'\n );\n }\n\n const endpoint = '/landing-page-contents/upsert/';\n const response = await fetch(`${normalizeBaseUrl(baseUrl)}${endpoint}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Token ${token}`,\n 'X-Organization': organization,\n },\n body: JSON.stringify({\n page_key: item.pageKey,\n page_title: labelFromKey(item.pageKey),\n section_key: item.sectionKey,\n section_title: labelFromKey(item.sectionKey),\n content_key: item.contentKey,\n content_title: labelFromKey(item.contentKey),\n value,\n default_value: item.defaultValue,\n metadata: item.metadata,\n }),\n credentials: 'include',\n });\n\n await refreshTag(`landing-page-content-${item.pageKey}`);\n\n if (!response.ok) {\n throw new Error('Nao foi possivel salvar o conteudo.');\n }\n}\n\nfunction ClientLandingText({\n item,\n editable,\n children,\n}: ClientLandingTextProps) {\n const [isEditing, setIsEditing] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const [currentValue, setCurrentValue] = useState(item.value);\n const [draftValue, setDraftValue] = useState(item.value);\n const ref = useRef<HTMLElement | null>(null);\n\n const handleEdit = (event: React.MouseEvent<HTMLElement>) => {\n if (!editable || isSaving) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n const nextDraft = ref.current?.innerText ?? currentValue;\n setDraftValue(nextDraft);\n setIsEditing(true);\n\n requestAnimationFrame(() => {\n ref.current?.focus();\n });\n };\n\n const handleCancel = () => {\n if (ref.current) {\n ref.current.innerText = currentValue;\n }\n setDraftValue(currentValue);\n setIsEditing(false);\n };\n\n const handleSave = async () => {\n try {\n setIsSaving(true);\n await persistLandingContent(item, draftValue);\n setCurrentValue(draftValue);\n if (ref.current) {\n ref.current.innerText = draftValue;\n }\n setIsEditing(false);\n } finally {\n setIsSaving(false);\n }\n };\n\n const handleInput = (event: React.FormEvent<HTMLElement>) => {\n if (!isEditing) {\n return;\n }\n setDraftValue(event.currentTarget.innerText);\n };\n\n return (\n <div className=\"relative\">\n {editable && isEditing && (\n <div className=\"absolute right-0 z-10 h-fit -top-7 flex\">\n <Button\n className=\"size-6 rounded-none p-0\"\n disabled={isSaving}\n onClick={handleCancel}\n size=\"icon\"\n type=\"button\"\n variant=\"outline\"\n >\n <X />\n </Button>\n <Button\n className=\"size-6 rounded-none p-0\"\n disabled={isSaving}\n onClick={handleSave}\n size=\"icon\"\n type=\"button\"\n >\n <Check />\n </Button>\n </div>\n )}\n\n <Slot\n className={cn(\n 'relative',\n 'after:z-10 after:w-full after:h-full after:absolute after:left-1/2 after:-translate-x-1/2 after:top-1/2 after:-translate-y-1/2 after:box-content after:p-1',\n editable && 'hover:after:border hover:after:border-input',\n isEditing && 'after:border after:border-input',\n isEditing && 'outline-none cursor-text before:bg-red-500',\n !editable && 'after:hidden'\n )}\n contentEditable={editable && isEditing}\n onClick={handleEdit}\n onInput={handleInput}\n ref={ref}\n suppressContentEditableWarning\n >\n {children}\n </Slot>\n </div>\n );\n}\n\nexport { ClientLandingText };\n"],"mappings":"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"}
|
|
@@ -1,45 +1,10 @@
|
|
|
1
|
+
import { LandingContentName, LandingPageContentDefinition, LandingPageKey, ResolvedLandingContentItem, ResolvedLandingPageContent } from "./types.js";
|
|
1
2
|
import "server-only";
|
|
2
3
|
|
|
3
4
|
//#region src/components/landing-text/landing-content.d.ts
|
|
4
|
-
type LandingPageKey = string;
|
|
5
|
-
type LandingContentName = `${string}.${string}.${string}`;
|
|
6
|
-
interface LandingContentDefinitionItem {
|
|
7
|
-
contentKey: string;
|
|
8
|
-
value: string;
|
|
9
|
-
metadata?: Record<string, unknown>;
|
|
10
|
-
}
|
|
11
|
-
interface LandingContentDefinitionSection {
|
|
12
|
-
sectionKey: string;
|
|
13
|
-
contents: LandingContentDefinitionItem[];
|
|
14
|
-
}
|
|
15
|
-
interface LandingPageContentDefinition {
|
|
16
|
-
pageKey: string;
|
|
17
|
-
sections: LandingContentDefinitionSection[];
|
|
18
|
-
}
|
|
19
|
-
interface LandingPageContentApiItem {
|
|
20
|
-
page_key: string;
|
|
21
|
-
section_key: string;
|
|
22
|
-
content_key: string;
|
|
23
|
-
value: string;
|
|
24
|
-
metadata?: Record<string, unknown>;
|
|
25
|
-
}
|
|
26
|
-
interface ResolvedLandingContentItem {
|
|
27
|
-
pageKey: string;
|
|
28
|
-
sectionKey: string;
|
|
29
|
-
contentKey: string;
|
|
30
|
-
value: string;
|
|
31
|
-
defaultValue: string;
|
|
32
|
-
metadata: Record<string, unknown>;
|
|
33
|
-
}
|
|
34
|
-
interface ResolvedLandingPageContent {
|
|
35
|
-
pageKey: string;
|
|
36
|
-
editable: boolean;
|
|
37
|
-
contents: Record<string, ResolvedLandingContentItem>;
|
|
38
|
-
}
|
|
39
5
|
declare function setLandingPageDefaults(defaults: Record<LandingPageKey, LandingPageContentDefinition>): void;
|
|
40
6
|
declare function buildContentId(sectionKey: string, contentKey: string): string;
|
|
41
7
|
declare function getLandingPageContent(pageKey: LandingPageKey): Promise<ResolvedLandingPageContent>;
|
|
42
|
-
declare const getLandingPageContentCached: (pageKey: LandingPageKey) => Promise<ResolvedLandingPageContent>;
|
|
43
8
|
declare function parseLandingContentName(name: string): {
|
|
44
9
|
pageKey: string;
|
|
45
10
|
sectionKey: string;
|
|
@@ -51,5 +16,5 @@ declare function getLandingContentByName(name: LandingContentName): Promise<{
|
|
|
51
16
|
item: ResolvedLandingContentItem;
|
|
52
17
|
}>;
|
|
53
18
|
//#endregion
|
|
54
|
-
export {
|
|
19
|
+
export { buildContentId, getLandingContentByName, getLandingContentItem, getLandingPageContent, parseLandingContentName, setLandingPageDefaults };
|
|
55
20
|
//# sourceMappingURL=landing-content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landing-content.d.ts","names":[],"sources":["../../src/components/landing-text/landing-content.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"landing-content.d.ts","names":[],"sources":["../../src/components/landing-text/landing-content.ts"],"sourcesContent":[],"mappings":";;;;iBAsBgB,sBAAA,WACJ,OAAO,gBAAgB;iBAQnB,cAAA;AATA,iBA4DM,qBAAA,CA5DgB,OAAA,EA6D3B,cA7D2B,CAAA,EA8DnC,OA9DmC,CA8D3B,0BA9D2B,CAAA;AACnB,iBA6GH,uBAAA,CA7GG,IAAA,EAAA,MAAA,CAAA,EAAA;EAAgB,OAAA,EAAA,MAAA;EAAvB,UAAA,EAAA,MAAA;EAAM,UAAA,EAAA,MAAA;AAQlB,CAAA,GAAgB,IAAA;AAmDM,iBAsEN,qBAAA,CAtE2B,OAAA,EAuEhC,0BAvEgC,EAAA,UAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,CAAA,EAyEvB,0BAzEuB;AAChC,iBAsFW,uBAAA,CAtFX,IAAA,EAsFyC,kBAtFzC,CAAA,EAsF2D,OAtF3D,CAAA;EACA,QAAA,EAAA,OAAA;EAAR,IAAA,EAkGQ,0BAlGR;CAAO,CAAA"}
|
|
@@ -13,61 +13,61 @@ function setLandingPageDefaults(defaults) {
|
|
|
13
13
|
function buildContentId(sectionKey, contentKey) {
|
|
14
14
|
return `${sectionKey}.${contentKey}`;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
16
|
+
function toApiUrl(path) {
|
|
17
|
+
const baseUrl = String(process.env.NEXT_PUBLIC_BASE_URL || "").replace(/\/$/, "");
|
|
18
|
+
return baseUrl ? `${baseUrl}${path}` : "";
|
|
18
19
|
}
|
|
19
|
-
async function
|
|
20
|
-
const defaults = pageDefaults[pageKey] || {
|
|
21
|
-
pageKey,
|
|
22
|
-
sections: []
|
|
23
|
-
};
|
|
24
|
-
const organizationId = process.env.NEXT_PUBLIC_ORGANIZATION_ID;
|
|
25
|
-
const baseUrl = normalizeBaseUrl(String(process.env.NEXT_PUBLIC_BASE_URL || ""));
|
|
20
|
+
async function getEditableState() {
|
|
26
21
|
const cookieStore = await cookies();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
return Boolean(cookieStore.get("token")?.value && cookieStore.get("organization")?.value);
|
|
23
|
+
}
|
|
24
|
+
async function getLandingOverrides(pageKey) {
|
|
25
|
+
const organizationId = process.env.NEXT_PUBLIC_ORGANIZATION_ID;
|
|
26
|
+
const url = toApiUrl(`/public/landing-page-contents/?page_key=${encodeURIComponent(pageKey)}`);
|
|
27
|
+
if (!organizationId || !url) return [];
|
|
28
|
+
try {
|
|
29
|
+
const response = await fetch(url, {
|
|
33
30
|
headers: { "X-Organization": organizationId },
|
|
34
31
|
next: { tags: ["landing-page-content", `landing-page-content-${pageKey}`] }
|
|
35
32
|
});
|
|
36
|
-
if (response.ok)
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
if (!response.ok) return [];
|
|
34
|
+
return response.json();
|
|
35
|
+
} catch {
|
|
36
|
+
return [];
|
|
39
37
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
38
|
+
}
|
|
39
|
+
async function getLandingPageContent(pageKey) {
|
|
40
|
+
const defaults = pageDefaults[pageKey] ?? {
|
|
41
|
+
pageKey,
|
|
42
|
+
sections: []
|
|
43
|
+
};
|
|
44
|
+
const [editable, overrides] = await Promise.all([getEditableState(), getLandingOverrides(pageKey)]);
|
|
45
|
+
const byId = new Map(overrides.map((item) => [buildContentId(item.section_key, item.content_key), item]));
|
|
46
|
+
const contents = Object.fromEntries(defaults.sections.flatMap((section) => section.contents.map((item) => {
|
|
44
47
|
const id = buildContentId(section.sectionKey, item.contentKey);
|
|
45
48
|
const override = byId.get(id);
|
|
46
|
-
|
|
49
|
+
return [id, {
|
|
47
50
|
pageKey: defaults.pageKey,
|
|
48
51
|
sectionKey: section.sectionKey,
|
|
49
52
|
contentKey: item.contentKey,
|
|
50
|
-
value: override
|
|
53
|
+
value: override?.value ?? item.value,
|
|
51
54
|
defaultValue: item.value,
|
|
52
|
-
metadata: override?.metadata
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
+
metadata: override?.metadata ?? item.metadata ?? {}
|
|
56
|
+
}];
|
|
57
|
+
})));
|
|
55
58
|
return {
|
|
56
59
|
pageKey: defaults.pageKey,
|
|
57
60
|
editable,
|
|
58
61
|
contents
|
|
59
62
|
};
|
|
60
63
|
}
|
|
61
|
-
const getLandingPageContentCached = cache(
|
|
62
|
-
function isLandingPageKey(value) {
|
|
63
|
-
return value in pageDefaults;
|
|
64
|
-
}
|
|
64
|
+
const getLandingPageContentCached = cache(getLandingPageContent);
|
|
65
65
|
function parseLandingContentName(name) {
|
|
66
66
|
const [rawPageKey, rawSectionKey, ...contentParts] = name.split(".").map((part) => part.trim());
|
|
67
67
|
const pageKey = rawPageKey || "";
|
|
68
68
|
const sectionKey = rawSectionKey || "";
|
|
69
69
|
const contentKey = contentParts.join(".").trim();
|
|
70
|
-
if (!
|
|
70
|
+
if (!pageDefaults[pageKey] || !sectionKey || !contentKey) return null;
|
|
71
71
|
return {
|
|
72
72
|
pageKey,
|
|
73
73
|
sectionKey,
|
|
@@ -75,10 +75,7 @@ function parseLandingContentName(name) {
|
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
function getLandingContentItem(content, sectionKey, contentKey) {
|
|
78
|
-
|
|
79
|
-
const existing = content.contents[id];
|
|
80
|
-
if (existing) return existing;
|
|
81
|
-
return {
|
|
78
|
+
return content.contents[buildContentId(sectionKey, contentKey)] ?? {
|
|
82
79
|
pageKey: content.pageKey,
|
|
83
80
|
sectionKey,
|
|
84
81
|
contentKey,
|
|
@@ -108,5 +105,5 @@ async function getLandingContentByName(name) {
|
|
|
108
105
|
}
|
|
109
106
|
|
|
110
107
|
//#endregion
|
|
111
|
-
export { buildContentId, getLandingContentByName, getLandingContentItem, getLandingPageContent,
|
|
108
|
+
export { buildContentId, getLandingContentByName, getLandingContentItem, getLandingPageContent, parseLandingContentName, setLandingPageDefaults };
|
|
112
109
|
//# sourceMappingURL=landing-content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landing-content.js","names":["pageDefaults: Record<LandingPageKey, LandingPageContentDefinition>"
|
|
1
|
+
{"version":3,"file":"landing-content.js","names":["pageDefaults: Record<LandingPageKey, LandingPageContentDefinition>"],"sources":["../../src/components/landing-text/landing-content.ts"],"sourcesContent":["import 'server-only';\n\nimport { cache } from 'react';\nimport { cookies } from 'next/headers';\n\nimport type {\n LandingContentName,\n LandingPageContentApiItem,\n LandingPageContentDefinition,\n LandingPageKey,\n ResolvedLandingContentItem,\n ResolvedLandingPageContent,\n} from './types';\n\ntype NextFetchInit = RequestInit & {\n next?: {\n tags?: string[];\n };\n};\n\nlet pageDefaults: Record<LandingPageKey, LandingPageContentDefinition> = {};\n\nexport function setLandingPageDefaults(\n defaults: Record<LandingPageKey, LandingPageContentDefinition>\n) {\n pageDefaults = {\n ...pageDefaults,\n ...defaults,\n };\n}\n\nexport function buildContentId(sectionKey: string, contentKey: string) {\n return `${sectionKey}.${contentKey}`;\n}\n\nfunction toApiUrl(path: string) {\n const baseUrl = String(process.env.NEXT_PUBLIC_BASE_URL || '').replace(\n /\\/$/,\n ''\n );\n return baseUrl ? `${baseUrl}${path}` : '';\n}\n\nasync function getEditableState() {\n const cookieStore = await cookies();\n return Boolean(\n cookieStore.get('token')?.value && cookieStore.get('organization')?.value\n );\n}\n\nasync function getLandingOverrides(\n pageKey: LandingPageKey\n): Promise<LandingPageContentApiItem[]> {\n const organizationId = process.env.NEXT_PUBLIC_ORGANIZATION_ID;\n const url = toApiUrl(\n `/public/landing-page-contents/?page_key=${encodeURIComponent(pageKey)}`\n );\n\n if (!organizationId || !url) {\n return [];\n }\n\n try {\n const response = await fetch(url, {\n headers: {\n 'X-Organization': organizationId,\n },\n next: {\n tags: ['landing-page-content', `landing-page-content-${pageKey}`],\n },\n } satisfies NextFetchInit);\n\n if (!response.ok) {\n return [];\n }\n\n return response.json();\n } catch {\n return [];\n }\n}\n\nexport async function getLandingPageContent(\n pageKey: LandingPageKey\n): Promise<ResolvedLandingPageContent> {\n const defaults = pageDefaults[pageKey] ?? {\n pageKey,\n sections: [],\n };\n\n const [editable, overrides] = await Promise.all([\n getEditableState(),\n getLandingOverrides(pageKey),\n ]);\n\n const byId = new Map<string, LandingPageContentApiItem>(\n overrides.map((item) => [\n buildContentId(item.section_key, item.content_key),\n item,\n ])\n );\n\n const contents = Object.fromEntries(\n defaults.sections.flatMap((section) =>\n section.contents.map((item) => {\n const id = buildContentId(section.sectionKey, item.contentKey);\n const override = byId.get(id);\n\n return [\n id,\n {\n pageKey: defaults.pageKey,\n sectionKey: section.sectionKey,\n contentKey: item.contentKey,\n value: override?.value ?? item.value,\n defaultValue: item.value,\n metadata: override?.metadata ?? item.metadata ?? {},\n },\n ] as const;\n })\n )\n );\n\n return {\n pageKey: defaults.pageKey,\n editable,\n contents,\n };\n}\n\nconst getLandingPageContentCached = cache(getLandingPageContent);\n\nexport function parseLandingContentName(name: string) {\n const [rawPageKey, rawSectionKey, ...contentParts] = name\n .split('.')\n .map((part) => part.trim());\n\n const pageKey = rawPageKey || '';\n const sectionKey = rawSectionKey || '';\n const contentKey = contentParts.join('.').trim();\n\n if (!pageDefaults[pageKey] || !sectionKey || !contentKey) {\n return null;\n }\n\n return {\n pageKey,\n sectionKey,\n contentKey,\n };\n}\n\nexport function getLandingContentItem(\n content: ResolvedLandingPageContent,\n sectionKey: string,\n contentKey: string\n) {\n return (\n content.contents[buildContentId(sectionKey, contentKey)] ?? {\n pageKey: content.pageKey,\n sectionKey,\n contentKey,\n value: '',\n defaultValue: '',\n metadata: {},\n }\n );\n}\n\nexport async function getLandingContentByName(name: LandingContentName) {\n const parsed = parseLandingContentName(name);\n\n if (!parsed) {\n return {\n editable: false,\n item: {\n pageKey: 'unknown',\n sectionKey: 'invalid',\n contentKey: name,\n value: '',\n defaultValue: '',\n metadata: {},\n } as ResolvedLandingContentItem,\n };\n }\n\n const content = await getLandingPageContentCached(parsed.pageKey);\n\n return {\n editable: content.editable,\n item: getLandingContentItem(content, parsed.sectionKey, parsed.contentKey),\n };\n}\n"],"mappings":"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"}
|
|
@@ -1,26 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
1
|
+
import { LandingTextProps } from "./types.js";
|
|
2
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
4
3
|
|
|
5
4
|
//#region src/components/landing-text/landing-text.d.ts
|
|
6
|
-
|
|
7
|
-
value: string;
|
|
8
|
-
defaultValue: string;
|
|
9
|
-
metadata: Record<string, unknown>;
|
|
10
|
-
}
|
|
11
|
-
interface LandingTextBaseProps {
|
|
12
|
-
className?: string;
|
|
13
|
-
as?: 'p' | 'span' | 'h1' | 'h2' | 'h3' | 'div';
|
|
14
|
-
}
|
|
15
|
-
interface LandingTextWithItemProps extends LandingTextBaseProps {
|
|
16
|
-
item: LandingTextItem;
|
|
17
|
-
editable: boolean;
|
|
18
|
-
}
|
|
19
|
-
interface LandingTextWithNameProps extends LandingTextBaseProps {
|
|
20
|
-
name: LandingContentName;
|
|
21
|
-
}
|
|
22
|
-
type LandingTextProps = LandingTextWithItemProps | LandingTextWithNameProps;
|
|
23
|
-
declare function LandingText(props: LandingTextProps): Promise<react_jsx_runtime1.JSX.Element>;
|
|
5
|
+
declare function LandingText(props: LandingTextProps): Promise<react_jsx_runtime10.JSX.Element>;
|
|
24
6
|
//#endregion
|
|
25
|
-
export { LandingText
|
|
7
|
+
export { LandingText };
|
|
26
8
|
//# sourceMappingURL=landing-text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landing-text.d.ts","names":[],"sources":["../../src/components/landing-text/landing-text.tsx"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"landing-text.d.ts","names":[],"sources":["../../src/components/landing-text/landing-text.tsx"],"sourcesContent":[],"mappings":";;;;iBAWe,WAAA,QAAmB,mBAAgB,QAAA,mBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landing-text.js","names":[],"sources":["../../src/components/landing-text/landing-text.tsx"],"sourcesContent":["import { ClientLandingText } from './client-landing-text';\nimport {
|
|
1
|
+
{"version":3,"file":"landing-text.js","names":[],"sources":["../../src/components/landing-text/landing-text.tsx"],"sourcesContent":["import { ClientLandingText } from './client-landing-text';\nimport { getLandingContentByName } from './landing-content';\nimport { ServerLandingText } from './server-landing-text';\nimport type { LandingTextProps, LandingTextWithNameProps } from './types';\n\nfunction isLandingTextWithName(\n props: LandingTextProps\n): props is LandingTextWithNameProps {\n return 'name' in props;\n}\n\nasync function LandingText(props: LandingTextProps) {\n const { className, as } = props;\n\n const { item, editable } = isLandingTextWithName(props)\n ? await getLandingContentByName(props.name)\n : {\n item: props.item,\n editable: props.editable,\n };\n\n return (\n <ClientLandingText editable={editable} item={item}>\n <ServerLandingText\n as={as}\n className={className}\n registration={{\n pageKey: item.pageKey,\n sectionKey: item.sectionKey,\n contentKey: item.contentKey,\n }}\n value={item.value}\n />\n </ClientLandingText>\n );\n}\n\nexport { LandingText };\n"],"mappings":";;;;;;AAKA,SAAS,sBACP,OACmC;AACnC,QAAO,UAAU;;AAGnB,eAAe,YAAY,OAAyB;CAClD,MAAM,EAAE,WAAW,OAAO;CAE1B,MAAM,EAAE,MAAM,aAAa,sBAAsB,MAAM,GACnD,MAAM,wBAAwB,MAAM,KAAK,GACzC;EACE,MAAM,MAAM;EACZ,UAAU,MAAM;EACjB;AAEL,QACE,oBAAC;EAA4B;EAAgB;YAC3C,oBAAC;GACK;GACO;GACX,cAAc;IACZ,SAAS,KAAK;IACd,YAAY,KAAK;IACjB,YAAY,KAAK;IAClB;GACD,OAAO,KAAK;IACZ;GACgB"}
|
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
1
|
+
import { ServerLandingTextProps } from "./types.js";
|
|
2
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/landing-text/server-landing-text.d.ts
|
|
5
|
-
interface LandingTextRegistration {
|
|
6
|
-
pageKey: string;
|
|
7
|
-
sectionKey: string;
|
|
8
|
-
contentKey: string;
|
|
9
|
-
}
|
|
10
|
-
interface ServerLandingTextProps extends HTMLAttributes<HTMLElement> {
|
|
11
|
-
as?: ElementType;
|
|
12
|
-
value: string;
|
|
13
|
-
registration?: LandingTextRegistration;
|
|
14
|
-
}
|
|
15
5
|
declare function ServerLandingText({
|
|
16
6
|
as: As,
|
|
17
7
|
value,
|
|
18
8
|
className,
|
|
19
9
|
registration,
|
|
20
10
|
...props
|
|
21
|
-
}: ServerLandingTextProps):
|
|
11
|
+
}: ServerLandingTextProps): react_jsx_runtime9.JSX.Element;
|
|
22
12
|
//#endregion
|
|
23
|
-
export {
|
|
13
|
+
export { ServerLandingText };
|
|
24
14
|
//# sourceMappingURL=server-landing-text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-landing-text.d.ts","names":[],"sources":["../../src/components/landing-text/server-landing-text.tsx"],"sourcesContent":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"server-landing-text.d.ts","names":[],"sources":["../../src/components/landing-text/server-landing-text.tsx"],"sourcesContent":[],"mappings":";;;;iBAGS,iBAAA;MACH;;;;;GAKH,yBAAsB,kBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-landing-text.js","names":[],"sources":["../../src/components/landing-text/server-landing-text.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"server-landing-text.js","names":[],"sources":["../../src/components/landing-text/server-landing-text.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\nimport type { ServerLandingTextProps } from './types';\n\nfunction ServerLandingText({\n as: As = 'span',\n value,\n className,\n registration,\n ...props\n}: ServerLandingTextProps) {\n return (\n <As\n className={cn(className)}\n data-content-key={registration?.contentKey}\n data-page-key={registration?.pageKey}\n data-section-key={registration?.sectionKey}\n {...props}\n >\n {value}\n </As>\n );\n}\n\nexport { ServerLandingText };\n"],"mappings":";;;;AAGA,SAAS,kBAAkB,EACzB,IAAI,KAAK,QACT,OACA,WACA,aACA,GAAG,SACsB;AACzB,QACE,oBAAC;EACC,WAAW,GAAG,UAAU;EACxB,oBAAkB,cAAc;EAChC,iBAAe,cAAc;EAC7B,oBAAkB,cAAc;EAChC,GAAI;YAEH;GACE"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/landing-text/types.d.ts
|
|
4
|
+
type LandingPageKey = string;
|
|
5
|
+
type LandingContentName = `${string}.${string}.${string}`;
|
|
6
|
+
interface LandingContentDefinitionItem {
|
|
7
|
+
contentKey: string;
|
|
8
|
+
value: string;
|
|
9
|
+
metadata?: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
interface LandingContentDefinitionSection {
|
|
12
|
+
sectionKey: string;
|
|
13
|
+
contents: LandingContentDefinitionItem[];
|
|
14
|
+
}
|
|
15
|
+
interface LandingPageContentDefinition {
|
|
16
|
+
pageKey: string;
|
|
17
|
+
sections: LandingContentDefinitionSection[];
|
|
18
|
+
}
|
|
19
|
+
interface LandingPageContentApiItem {
|
|
20
|
+
page_key: string;
|
|
21
|
+
section_key: string;
|
|
22
|
+
content_key: string;
|
|
23
|
+
value: string;
|
|
24
|
+
metadata?: Record<string, unknown>;
|
|
25
|
+
}
|
|
26
|
+
interface ResolvedLandingContentItem {
|
|
27
|
+
pageKey: string;
|
|
28
|
+
sectionKey: string;
|
|
29
|
+
contentKey: string;
|
|
30
|
+
value: string;
|
|
31
|
+
defaultValue: string;
|
|
32
|
+
metadata: Record<string, unknown>;
|
|
33
|
+
}
|
|
34
|
+
interface ResolvedLandingPageContent {
|
|
35
|
+
pageKey: string;
|
|
36
|
+
editable: boolean;
|
|
37
|
+
contents: Record<string, ResolvedLandingContentItem>;
|
|
38
|
+
}
|
|
39
|
+
interface LandingTextRegistration {
|
|
40
|
+
pageKey: string;
|
|
41
|
+
sectionKey: string;
|
|
42
|
+
contentKey: string;
|
|
43
|
+
}
|
|
44
|
+
interface LandingTextItem extends LandingTextRegistration {
|
|
45
|
+
value: string;
|
|
46
|
+
defaultValue: string;
|
|
47
|
+
metadata: Record<string, unknown>;
|
|
48
|
+
}
|
|
49
|
+
interface LandingTextBaseProps {
|
|
50
|
+
className?: string;
|
|
51
|
+
as?: 'p' | 'span' | 'h1' | 'h2' | 'h3' | 'div';
|
|
52
|
+
}
|
|
53
|
+
interface LandingTextWithItemProps extends LandingTextBaseProps {
|
|
54
|
+
item: LandingTextItem;
|
|
55
|
+
editable: boolean;
|
|
56
|
+
}
|
|
57
|
+
interface LandingTextWithNameProps extends LandingTextBaseProps {
|
|
58
|
+
name: LandingContentName;
|
|
59
|
+
}
|
|
60
|
+
type LandingTextProps = LandingTextWithItemProps | LandingTextWithNameProps;
|
|
61
|
+
interface ServerLandingTextProps extends HTMLAttributes<HTMLElement> {
|
|
62
|
+
as?: ElementType;
|
|
63
|
+
value: string;
|
|
64
|
+
registration?: LandingTextRegistration;
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { LandingContentDefinitionItem, LandingContentDefinitionSection, LandingContentName, LandingPageContentApiItem, LandingPageContentDefinition, LandingPageKey, LandingTextItem, LandingTextProps, LandingTextRegistration, ResolvedLandingContentItem, ResolvedLandingPageContent, ServerLandingTextProps };
|
|
68
|
+
//# sourceMappingURL=types.d.ts.map
|