@spring-systems/core 0.8.7 → 0.8.10
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/auth/index.d.ts +2 -2
- package/dist/config/index.d.ts +3 -3
- package/dist/devtools/index.d.ts +2 -2
- package/dist/{framework-config-types-Cmy83YS6.d.ts → framework-config-types-yp56moM9.d.ts} +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/instance/index.d.ts +3 -3
- package/dist/logger/index.d.ts +2 -2
- package/dist/plugins/index.d.ts +2 -2
- package/dist/{runtime-env-config-B7vf3XX5.d.ts → runtime-env-config-CPaucNjg.d.ts} +1 -1
- package/dist/{spring-instance-CZk8Ju5T.d.ts → spring-instance-Br1A8BdJ.d.ts} +1 -1
- package/dist/testing/index.d.ts +2 -2
- package/dist/utils/index.d.ts +42 -1
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LogoutHandler, a as LogoutReason } from '../spring-instance-
|
|
2
|
-
import '../framework-config-types-
|
|
1
|
+
import { L as LogoutHandler, a as LogoutReason } from '../spring-instance-Br1A8BdJ.js';
|
|
2
|
+
import '../framework-config-types-yp56moM9.js';
|
|
3
3
|
import '../middleware-types-DVG9C1qJ.js';
|
|
4
4
|
import '../form-types-D3MdGpjA.js';
|
|
5
5
|
import '../security-sanitize-Bb0PExM6.js';
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as ConfigValidationResult, D as DEFAULT_FRAMEWORK_CONFIG, R as RUNTIME_ENV_KEYS, e as RuntimeEnv, f as RuntimeEnvKey, i as applyFallbackConfig, j as clearCapabilities, k as clearFrameworkConfig, l as clearRuntimeEnvKeys, c as configureCapabilities, a as configureFramework, m as createFrameworkConfig, n as getApiDefaultPageSize, o as getApiTimeoutMs, p as getAutocompleteDebounceMs, g as getCapabilities, b as getCapability, d as getFrameworkConfig, q as getIdleSessionTimeoutMs, r as getImageTag, s as getMaxFileSize, t as getRegisteredCapabilityNames, u as getRuntimeEnvKeys, v as getRuntimeVar, w as getSecureSessionCookieName, x as getSessionCookieName, y as getSignalrIdleTimeoutMs, z as getSignalrKeepAliveIntervalMs, A as getSignalrReconnectDelaysMs, B as getSignalrServerTimeoutMs, h as hasCapability, E as registerRuntimeEnvKeys, F as validateFrameworkConfig } from '../runtime-env-config-
|
|
2
|
-
import { F as FrameworkConfigOverrides, L as LayoutVariant, b as LayoutConfig } from '../framework-config-types-
|
|
3
|
-
export { C as CAMEL_TO_CSS, c as CapabilityMap, d as CodeList, e as CodeListFullName, f as CodeListNumber, D as DEFAULT_DARK_THEME, g as DEFAULT_THEME, h as DIALOG_CONTENT_SELECTOR, i as DND_TOUCH_CONSTRAINT, j as DateFormatConfig, a as FrameworkConfig, N as NavigationMenuItem, O as Operator, S as STORAGE_KEYS, k as SpringComponentTokens, l as SpringCssVariable, m as SpringThemeVariables, n as StorageKey, o as createTheme, p as emptyGuid, q as getResolvedTheme, t as themeToCSS, r as themeToCSSDark, s as themeToCSSVariables } from '../framework-config-types-
|
|
1
|
+
export { C as ConfigValidationResult, D as DEFAULT_FRAMEWORK_CONFIG, R as RUNTIME_ENV_KEYS, e as RuntimeEnv, f as RuntimeEnvKey, i as applyFallbackConfig, j as clearCapabilities, k as clearFrameworkConfig, l as clearRuntimeEnvKeys, c as configureCapabilities, a as configureFramework, m as createFrameworkConfig, n as getApiDefaultPageSize, o as getApiTimeoutMs, p as getAutocompleteDebounceMs, g as getCapabilities, b as getCapability, d as getFrameworkConfig, q as getIdleSessionTimeoutMs, r as getImageTag, s as getMaxFileSize, t as getRegisteredCapabilityNames, u as getRuntimeEnvKeys, v as getRuntimeVar, w as getSecureSessionCookieName, x as getSessionCookieName, y as getSignalrIdleTimeoutMs, z as getSignalrKeepAliveIntervalMs, A as getSignalrReconnectDelaysMs, B as getSignalrServerTimeoutMs, h as hasCapability, E as registerRuntimeEnvKeys, F as validateFrameworkConfig } from '../runtime-env-config-CPaucNjg.js';
|
|
2
|
+
import { F as FrameworkConfigOverrides, L as LayoutVariant, b as LayoutConfig } from '../framework-config-types-yp56moM9.js';
|
|
3
|
+
export { C as CAMEL_TO_CSS, c as CapabilityMap, d as CodeList, e as CodeListFullName, f as CodeListNumber, D as DEFAULT_DARK_THEME, g as DEFAULT_THEME, h as DIALOG_CONTENT_SELECTOR, i as DND_TOUCH_CONSTRAINT, j as DateFormatConfig, a as FrameworkConfig, N as NavigationMenuItem, O as Operator, S as STORAGE_KEYS, k as SpringComponentTokens, l as SpringCssVariable, m as SpringThemeVariables, n as StorageKey, o as createTheme, p as emptyGuid, q as getResolvedTheme, t as themeToCSS, r as themeToCSSDark, s as themeToCSSVariables } from '../framework-config-types-yp56moM9.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Environment-specific configuration presets for enterprise deployments.
|
package/dist/devtools/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as SpringInstance } from '../spring-instance-
|
|
2
|
-
import '../framework-config-types-
|
|
1
|
+
import { d as SpringInstance } from '../spring-instance-Br1A8BdJ.js';
|
|
2
|
+
import '../framework-config-types-yp56moM9.js';
|
|
3
3
|
import '../middleware-types-DVG9C1qJ.js';
|
|
4
4
|
import '../form-types-D3MdGpjA.js';
|
|
5
5
|
import '../security-sanitize-Bb0PExM6.js';
|
|
@@ -449,6 +449,8 @@ interface NavigationMenuItem {
|
|
|
449
449
|
permissions?: string[];
|
|
450
450
|
/** Capability key — item is hidden when the capability is disabled */
|
|
451
451
|
capability?: keyof CapabilityMap;
|
|
452
|
+
/** When true, the menu group starts expanded. Default: false. */
|
|
453
|
+
defaultExpanded?: boolean;
|
|
452
454
|
}
|
|
453
455
|
interface FrameworkConfig {
|
|
454
456
|
app: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { c as configureCapabilities, a as configureFramework, g as getCapabilities, b as getCapability, d as getFrameworkConfig, h as hasCapability } from './runtime-env-config-
|
|
1
|
+
export { c as configureCapabilities, a as configureFramework, g as getCapabilities, b as getCapability, d as getFrameworkConfig, h as hasCapability } from './runtime-env-config-CPaucNjg.js';
|
|
2
2
|
export { eventBus } from './events/index.js';
|
|
3
3
|
export { g as getMiddlewareRunner, r as registerMiddleware } from './middleware-registry-DT002qRd.js';
|
|
4
|
-
import './framework-config-types-
|
|
4
|
+
import './framework-config-types-yp56moM9.js';
|
|
5
5
|
import './middleware-types-DVG9C1qJ.js';
|
|
6
6
|
|
|
7
7
|
declare const SPRING_CORE_VERSION: string;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-F3VXVDPQ.js";import{a as _}from"./chunk-RKLYBW3O.js";import{b as n,c as g}from"./chunk-3OMNT22N.js";import"./chunk-MNLYYTGZ.js";import"./chunk-PNDXLNCU.js";import{a as e,b as r,c as i,d as t}from"./chunk-UT6X6RQM.js";import"./chunk-GSQE2NEY.js";import{d as o,e as a}from"./chunk-RVQHSQYF.js";import"./chunk-R3XYEEGR.js";import"./chunk-YMSSF2ZU.js";import"./chunk-EVDFSWPU.js";import"./chunk-JRHMAY5G.js";import"./chunk-OOVZTF74.js";var p="0.8.
|
|
1
|
+
import"./chunk-F3VXVDPQ.js";import{a as _}from"./chunk-RKLYBW3O.js";import{b as n,c as g}from"./chunk-3OMNT22N.js";import"./chunk-MNLYYTGZ.js";import"./chunk-PNDXLNCU.js";import{a as e,b as r,c as i,d as t}from"./chunk-UT6X6RQM.js";import"./chunk-GSQE2NEY.js";import{d as o,e as a}from"./chunk-RVQHSQYF.js";import"./chunk-R3XYEEGR.js";import"./chunk-YMSSF2ZU.js";import"./chunk-EVDFSWPU.js";import"./chunk-JRHMAY5G.js";import"./chunk-OOVZTF74.js";var p="0.8.10";export{p as SPRING_CORE_VERSION,e as configureCapabilities,o as configureFramework,_ as eventBus,t as getCapabilities,i as getCapability,a as getFrameworkConfig,g as getMiddlewareRunner,r as hasCapability,n as registerMiddleware};
|
package/dist/instance/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as FrameworkConfigOverrides } from '../framework-config-types-
|
|
2
|
-
import { d as SpringInstance } from '../spring-instance-
|
|
3
|
-
export { H as HandlerEntry, I as InstanceContentAdapter, e as InstanceLifecycleState, c as InstanceLogAdapter, b as InstanceNotificationAdapter, L as LogoutHandler, a as LogoutReason, R as RequestHook, f as ResponseHook, S as SecurityEventType, g as SpringApiState, h as SpringCoreState, i as SpringUIState } from '../spring-instance-
|
|
1
|
+
import { F as FrameworkConfigOverrides } from '../framework-config-types-yp56moM9.js';
|
|
2
|
+
import { d as SpringInstance } from '../spring-instance-Br1A8BdJ.js';
|
|
3
|
+
export { H as HandlerEntry, I as InstanceContentAdapter, e as InstanceLifecycleState, c as InstanceLogAdapter, b as InstanceNotificationAdapter, L as LogoutHandler, a as LogoutReason, R as RequestHook, f as ResponseHook, S as SecurityEventType, g as SpringApiState, h as SpringCoreState, i as SpringUIState } from '../spring-instance-Br1A8BdJ.js';
|
|
4
4
|
import '../middleware-types-DVG9C1qJ.js';
|
|
5
5
|
import '../form-types-D3MdGpjA.js';
|
|
6
6
|
import '../security-sanitize-Bb0PExM6.js';
|
package/dist/logger/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as SecurityEventType } from '../spring-instance-
|
|
1
|
+
import { S as SecurityEventType } from '../spring-instance-Br1A8BdJ.js';
|
|
2
2
|
import { S as SecurityLogData } from '../security-sanitize-Bb0PExM6.js';
|
|
3
|
-
import '../framework-config-types-
|
|
3
|
+
import '../framework-config-types-yp56moM9.js';
|
|
4
4
|
import '../middleware-types-DVG9C1qJ.js';
|
|
5
5
|
import '../form-types-D3MdGpjA.js';
|
|
6
6
|
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as SpringInstance } from '../spring-instance-
|
|
1
|
+
import { d as SpringInstance } from '../spring-instance-Br1A8BdJ.js';
|
|
2
2
|
import { a as FormDataValue, b as FormStoreState, c as ColumnType } from '../form-types-D3MdGpjA.js';
|
|
3
|
-
import '../framework-config-types-
|
|
3
|
+
import '../framework-config-types-yp56moM9.js';
|
|
4
4
|
import '../middleware-types-DVG9C1qJ.js';
|
|
5
5
|
import '../security-sanitize-Bb0PExM6.js';
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as CapabilityMap, F as FrameworkConfigOverrides, a as FrameworkConfig } from './framework-config-types-
|
|
1
|
+
import { c as CapabilityMap, F as FrameworkConfigOverrides, a as FrameworkConfig } from './framework-config-types-yp56moM9.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Feature capability system for enterprise SPRING deployments.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as FrameworkConfig } from './framework-config-types-
|
|
1
|
+
import { a as FrameworkConfig } from './framework-config-types-yp56moM9.js';
|
|
2
2
|
import { M as MiddlewareSlot, b as MiddlewareEntry } from './middleware-types-DVG9C1qJ.js';
|
|
3
3
|
import { V as ValidatorFn } from './form-types-D3MdGpjA.js';
|
|
4
4
|
import { S as SecurityLogData } from './security-sanitize-Bb0PExM6.js';
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FrameworkConfigOverrides } from '../framework-config-types-
|
|
2
|
-
import { I as InstanceContentAdapter, b as InstanceNotificationAdapter, c as InstanceLogAdapter, d as SpringInstance } from '../spring-instance-
|
|
1
|
+
import { F as FrameworkConfigOverrides } from '../framework-config-types-yp56moM9.js';
|
|
2
|
+
import { I as InstanceContentAdapter, b as InstanceNotificationAdapter, c as InstanceLogAdapter, d as SpringInstance } from '../spring-instance-Br1A8BdJ.js';
|
|
3
3
|
import { SpringPlugin } from '../plugins/index.js';
|
|
4
4
|
import { S as SecurityLogData } from '../security-sanitize-Bb0PExM6.js';
|
|
5
5
|
import '../middleware-types-DVG9C1qJ.js';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -13,6 +13,47 @@ declare function getBrightness(r: number, g: number, b: number): number;
|
|
|
13
13
|
declare function hexToRgb(hex: string): [number, number, number];
|
|
14
14
|
declare function rgbToHex(rgb: string): string;
|
|
15
15
|
declare function getContrastYIQ(hex: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Background → text contrast pairs for automatic text color derivation.
|
|
18
|
+
*
|
|
19
|
+
* Only includes the sidebar menu — the one component where projects routinely
|
|
20
|
+
* override the background independently of `--spring-color-primary`.
|
|
21
|
+
*
|
|
22
|
+
* List headers and buttons are intentionally excluded: their text colors are
|
|
23
|
+
* derived from the CSS variable chain (`text-secondary` / `text-on-accent`)
|
|
24
|
+
* which already produces correct results for both light and dark modes.
|
|
25
|
+
* Auto-deriving them would override intentional design choices (e.g. white
|
|
26
|
+
* text on a medium-toned gold that the YIQ formula classifies as "light").
|
|
27
|
+
*/
|
|
28
|
+
declare const CONTRAST_PAIRS: ReadonlyArray<{
|
|
29
|
+
bg: string;
|
|
30
|
+
text: string;
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Resolve a CSS custom property to a hex color value.
|
|
34
|
+
* Uses a probe element to force the browser to resolve `var()` chains
|
|
35
|
+
* and named colors (e.g. "white") to computed `rgb()` values.
|
|
36
|
+
*
|
|
37
|
+
* @returns Hex color string (e.g. "#2563eb") or null if unresolvable.
|
|
38
|
+
*/
|
|
39
|
+
declare function resolveColorVar(cssVar: string, root?: HTMLElement): string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Auto-derive text colors from background colors using YIQ contrast.
|
|
42
|
+
*
|
|
43
|
+
* For each pair: resolves the computed background color, determines if it is
|
|
44
|
+
* light or dark, and sets the text variable to `--spring-color-text` (for
|
|
45
|
+
* light backgrounds) or `#ffffff` (for dark backgrounds).
|
|
46
|
+
*
|
|
47
|
+
* Called automatically by the theme store after dark mode init and on
|
|
48
|
+
* theme changes. Projects can also call it after runtime CSS variable changes.
|
|
49
|
+
*
|
|
50
|
+
* @param pairs — Override default pairs. Defaults to {@link CONTRAST_PAIRS}.
|
|
51
|
+
* @param root — Override root element. Defaults to `document.documentElement`.
|
|
52
|
+
*/
|
|
53
|
+
declare function applyContrastColors(pairs?: ReadonlyArray<{
|
|
54
|
+
bg: string;
|
|
55
|
+
text: string;
|
|
56
|
+
}>, root?: HTMLElement): void;
|
|
16
57
|
|
|
17
58
|
declare function isValueNotEmpty(value: string | number | boolean | null | undefined | FormDataValue[]): boolean;
|
|
18
59
|
/** Returns a deep copy of an object, removing unwanted references. */
|
|
@@ -140,4 +181,4 @@ declare function removeNode<T extends BaseTreeNode>(nodes: T[], id: string, chil
|
|
|
140
181
|
declare function addNode<T extends BaseTreeNode>(nodes: T[], parentId: string | null, newNode: T, childrenField?: string): T[];
|
|
141
182
|
declare function findParentId<T extends BaseTreeNode>(nodes: T[], id: string, childrenField?: string, parentId?: string | null): string | null;
|
|
142
183
|
|
|
143
|
-
export { type BaseTreeNode, type ValueType, __DEV__, addNode, clearDeprecationWarnings, dateManager, deepCopy, deepEqual, deepMerge, devAssert, devThrow, devWarn, findNode, findParentId, generateGUID, getAllIds, getBrightness, getChildren, getContrastYIQ, getFilterFieldType, getValueByPath, getValueType, hexToRgb, isValueNotEmpty, normalizeString, normalizeSystemFilter, onKeyActivate, parseFilter, parseJSONSafely, prefersReducedMotion, removeNode, rgbToHex, sanitizeContent, sanitizeEditorContent, setColumnBodyType, setDateLocale, setDefaultStructure, springDeprecate, toNumber, truncateString, updateNode };
|
|
184
|
+
export { type BaseTreeNode, CONTRAST_PAIRS, type ValueType, __DEV__, addNode, applyContrastColors, clearDeprecationWarnings, dateManager, deepCopy, deepEqual, deepMerge, devAssert, devThrow, devWarn, findNode, findParentId, generateGUID, getAllIds, getBrightness, getChildren, getContrastYIQ, getFilterFieldType, getValueByPath, getValueType, hexToRgb, isValueNotEmpty, normalizeString, normalizeSystemFilter, onKeyActivate, parseFilter, parseJSONSafely, prefersReducedMotion, removeNode, resolveColorVar, rgbToHex, sanitizeContent, sanitizeEditorContent, setColumnBodyType, setDateLocale, setDefaultStructure, springDeprecate, toNumber, truncateString, updateNode };
|
package/dist/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as x}from"../chunk-GSQE2NEY.js";import{e as f}from"../chunk-RVQHSQYF.js";import{b as p}from"../chunk-7P4BJDQR.js";import"../chunk-HUASNNWD.js";import"../chunk-YMSSF2ZU.js";import{a as Z,b as Q}from"../chunk-EVDFSWPU.js";import{a as m,b as S,c as Y,d as k}from"../chunk-JRHMAY5G.js";import{c as T}from"../chunk-OOVZTF74.js";function X(e){if(e)return t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),e(t))}}function v(){return typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function w(e,t,n){return(e*299+t*587+n*114)/1e3}function A(e){let t=parseInt(e.slice(1),16),n=t>>16&255,r=t>>8&255,o=t&255;return[n,r,o]}function te(e){let t=e.match(/\d+/g);return t?`#${t.map(r=>parseInt(r).toString(16).padStart(2,"0")).join("")}`:"#000000"}function re(e){let[t,n,r]=A(e);return w(t,n,r)>150?"black":"white"}import g from"dayjs";import F from"dayjs/plugin/customParseFormat";g.extend(F);var N=new Set(["__proto__","prototype","constructor"]);function ue(e){return e!==0&&e!==null&&e!==void 0&&e!==!1&&e!==""&&!(Array.isArray(e)&&e.length===0)}function M(e,t){if(!t&&typeof structuredClone=="function")try{return structuredClone(e)}catch{}let n=t??new WeakMap;if(typeof e=="object"&&e!==null&&n.has(e))return n.get(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(e===null||typeof e!="object")return e;let r=Array.isArray(e)?[]:{};n.set(e,r);for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=M(e[o],n));return r}function _(e,t){if(e===t||e===null&&t===""||e===""&&t===null)return!0;if(e==null||t==null||typeof e!="object"&&typeof e!="function"||typeof t!="object"&&typeof t!="function"||Array.isArray(e)!==Array.isArray(t))return!1;let n=e,r=t,o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return!1;let u=new Set(i);for(let d of o)if(!u.has(d)||!_(n[d],r[d]))return!1;return!0}function I(e,t){let n={...e};return Object.keys(t).forEach(r=>{if(N.has(r))return;let o=r;t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?n[o]=I(e[o]&&typeof e[o]=="object"?e[o]:{},t[o]):n[o]=t[o]}),n}function le(e,t){let n=t.split("."),r=e;for(let o of n){if(r==null||typeof r!="object"||r instanceof Date||Array.isArray(r))return;r=r[o]}return r}function fe(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function ce(){let e=globalThis.crypto;if(e&&typeof e.randomUUID=="function")return e.randomUUID();if(e&&typeof e.getRandomValues=="function"){let t=new Uint8Array(16);e.getRandomValues(t);let n=t[6]??0,r=t[8]??0;t[6]=n&15|64,t[8]=r&63|128;let o=Array.from(t,i=>i.toString(16).padStart(2,"0")).join("");return`${o.slice(0,8)}-${o.slice(8,12)}-${o.slice(12,16)}-${o.slice(16,20)}-${o.slice(20)}`}throw new T("generateGUID(): secure random source unavailable. Provide Web Crypto (crypto.randomUUID or crypto.getRandomValues).","generateGUID")}function de(e){let t={id_public:x},n=r=>{switch(r){case"boolean":return!1;case"string":return"";case"number":return"";case"object":case"date":case"datetime":case"time":return null;default:return}};return e.forEach(r=>{r.field&&(t[r.field]=n(r.type))}),t}function E(e){if(typeof e=="string"){if(e.toLowerCase()==="true")return!0;if(e.toLowerCase()==="false")return!1;try{return JSON.parse(e)}catch{return e}}return e}function y(e){let t=E(e);if(t==null)return"string";if(t instanceof Date)return"date";if(typeof t=="string"){let r=t.trim();if(/[0-9]/.test(r)&&/[-./]/.test(r)&&r.length>=6&&(g(r,["D.M.YYYY","DD.MM.YYYY","D. M. YYYY","DD. MM. YYYY","DD.MM.YYYY HH:mm","D.M.YYYY HH:mm","DD.MM.YYYY H:mm","D.M.YYYY H:mm","YYYY-MM-DD","YYYY-MM-DDTHH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSS","YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DDTHH:mm:ss.SSSZ"],!0).isValid()||g(r).isValid()&&/^\d{4}-\d{2}-\d{2}/.test(r)))return"date"}if(Array.isArray(t))return t.length===0?"object":y(t[0]);let n=typeof t;return n==="number"?"number":n==="boolean"?"boolean":n==="object"?"object":"string"}import s from"dayjs";import V from"dayjs/plugin/customParseFormat";import C from"dayjs/plugin/isBetween";s.extend(V);s.extend(C);var D=null;function $(){let e=f().i18n.dayjsLocale;e&&e!==D&&(s.locale(e),D=e)}function be(e){D=e,s.locale(e)}function a(){return $(),f().i18n.dateFormats}var c={formatDateCustom(e,t){return e?s(e).format(t):""},formatDate(e){return e?s(e).format(a().date):""},formatDateTime(e){return e?s(e).format(a().dateTime):""},formatTime(e){return e?s(e).format(a().time):""},formatDateRange(e,t,n=a().date){let r=s(e),o=s(t),i=a().dateTime;return r.isSame(o,"day")?n.includes("H")||n.includes("h")?`${r.format(i)}-${o.format(a().time)}`:n===a().time?`${r.format(a().time)}-${o.format(a().time)}`:r.format(n):n.includes("H")||n.includes("h")?`${r.format(i)} - ${o.format(i)}`:n===a().time?`${r.format(a().time)} - ${o.format(a().time)}`:`${r.format(a().date)} - ${o.format(a().date)}`},formatDateTimeWithSeconds(e){return e?s(e).format(a().dateTimeSeconds):""},formatDateTimeShort(e){return e?s(e).isSame(Date.now(),"day")?s(e).format(a().time):this.formatDateTime(e):""},getAgeFromDate(e){return s().diff(e,"years")},formatMonthName(e,t){return s(e).format(t)},formatMonthNumber(e){return s(e).month()+1},getPreviousMonth(e,t){return s(e).subtract(t,"months").toDate()},setTimeFromString(e,t,n){let r=s(e).toDate(),o=t.split(":");return n?r.setSeconds(0):r.setHours(Number(o[0]??0)),r.setMinutes(Number(o[1]??0)),r},formatDateString(e){return e?e.split("-")[0]?.length===4?s(e).toDate():e.split(".")[0]?.length===4||e.split("/")[0]?.length===4?s(e,"YYYY. M. D.").toDate():s(e,"D. M. YYYY").toDate():null},getDuration(e,t,n){if(!e||!t)return null;{let r=s(e);return s(t).diff(r,n)}},getStartOfDate(e,t){return s(e).startOf(t).toDate()},getEndOfDay(e){return s(e).endOf("day").toDate()},getDateRange(e,t){let n=s(e).startOf(t).toDate(),r=s(e).endOf(t).toDate();return{dateFrom:n,dateTo:r}},isDateInRange(e,t,n){return t?s(n).isBetween(e,t,null,"[]"):s(n).isSame(e,"day")},add(e,t,n){return s(e).add(t,n||"days").toDate()},substractDaysFromDate(e,t){return s(t).subtract(e,"days").toDate()}};var b=new Set;function he(e,t,n){if(!m)return;let r=`${e}:${t}`;if(b.has(r))return;b.add(r);let o=n?` It will be removed in v${n}.`:"";console.warn(`[SPRING Deprecation] "${e}" is deprecated. Use ${t} instead.${o}`)}function Se(){b.clear()}function H(e){return e instanceof Date?e.toISOString():Array.isArray(e)?JSON.stringify(e):typeof e=="boolean"?e:e!=null?e.toString():""}function we(e){if(!e)return null;if(typeof e=="object"&&e!==null&&("logic"in e||"field"in e))return e;if(typeof e=="object"&&e!==null){let n=Object.entries(e).filter(([r,o])=>r&&o!==void 0&&o!==null&&o!=="").map(([r,o])=>{let i=H(o);return{field:r,operator:"eq",value:i}});return n.length===0?null:{logic:"and",filters:n}}return null}function Ae(e,t,n){let r=t&&t[e];return r&&typeof r.type=="string"?r.type:y(n)}import h from"sanitize-html";function Ee(e){return e?h(e,{allowedTags:[],allowedAttributes:{}}):""}var O=["p","br","div","ul","ol","li","b","i","em","strong","u","s","sub","sup","h1","h2","h3","h4","h5","h6","span","a","table","thead","tbody","tr","th","td"],R={a:["href","title","target","rel"],td:["colspan","rowspan"],th:["colspan","rowspan"],span:["style"]},B=/^(?!.*(?:url|expression)\s*\()[a-z0-9#(),.%\s-]{1,80}$/i,j=new Set(["_blank","_self","_parent","_top"]);function U(e){if(!e)return[];let t=new Set,n=[];for(let r of e.split(/\s+/)){let o=r.trim().toLowerCase();!o||o==="opener"||t.has(o)||(t.add(o),n.push(o))}return n}var z={a:(e,t)=>{let n={...t};if(typeof n.target=="string"){let r=n.target.trim().toLowerCase();j.has(r)?n.target=r:delete n.target}if(n.target==="_blank"){let r=U(n.rel);r.includes("noopener")||r.push("noopener"),r.includes("noreferrer")||r.push("noreferrer"),n.rel=r.join(" ")}return{tagName:e,attribs:n}}},P={span:{"text-decoration":[B]}};function Ve(e){return e?h(e,{allowedTags:O,allowedAttributes:R,allowedStyles:P,transformTags:z,allowedSchemes:["http","https","mailto"]}):""}function Ce(e,t){return e.length<=t?e:t<3?e.slice(0,t):e.slice(0,t-3)+"..."}function L(e,t){let n=f().i18n.numberLocale;return Number(e).toLocaleString(n,{minimumFractionDigits:t||0,maximumFractionDigits:t||0})}function $e(e,t){let n=t.field,r=e,o=r[n];switch(t.type){case"date":o=c.formatDate(r[n]);break;case"datetime":o=c.formatDateTime(r[n]);break;case"time":o=c.formatTime(r[n]);break;case"boolean":o=r[n]?p("admin-yes"):p("admin-no");break;case"number":{let i=r[n];o=i!==void 0?t.decimals?L(i,t.decimals):i:"";break}case"object":{let i=r[n];o=i?t.textField?i[t.textField]:i.full_name||i.name||"":"";break}case"string":case"color":break;default:{let i=t.type}}return o}function l(e,t){let n=e[t];return Array.isArray(n)?n:void 0}function G(e,t,n="childrenNodes"){for(let r of e){if(r.id_public===t)return r;let o=l(r,n);if(o&&o.length>0){let i=G(o,t,n);if(i)return i}}return null}function Oe(e,t="childrenNodes"){let n=[],r=o=>{for(let i of o){n.push(i.id_public);let u=l(i,t);u&&u.length>0&&r(u)}};return r(e),n}function K(e,t,n,r="childrenNodes"){return e.map(o=>{if(o.id_public===t)return n(o);let i=l(o,r);return i&&i.length>0?{...o,[r]:K(i,t,n,r)}:o})}function W(e,t,n="childrenNodes"){return e.filter(r=>r.id_public!==t).map(r=>{let o=l(r,n);return o&&o.length>0?{...r,[n]:W(o,t,n)}:r})}function J(e,t,n,r="childrenNodes"){return t===null?[...e,n]:e.map(o=>{if(o.id_public===t){let u=l(o,r)||[];return{...o,[r]:[...u,n]}}let i=l(o,r);return i&&i.length>0?{...o,[r]:J(i,t,n,r)}:o})}function q(e,t,n="childrenNodes",r=null){for(let o of e){if(o.id_public===t)return r;let i=l(o,n);if(i&&i.length>0){let u=q(i,t,n,o.id_public);if(u!==null)return u}}return null}export{m as __DEV__,J as addNode,Se as clearDeprecationWarnings,c as dateManager,M as deepCopy,_ as deepEqual,I as deepMerge,k as devAssert,Y as devThrow,S as devWarn,G as findNode,q as findParentId,ce as generateGUID,Oe as getAllIds,w as getBrightness,l as getChildren,re as getContrastYIQ,Ae as getFilterFieldType,le as getValueByPath,y as getValueType,A as hexToRgb,Z as isSensitiveSecurityKey,ue as isValueNotEmpty,fe as normalizeString,we as normalizeSystemFilter,X as onKeyActivate,H as parseFilter,E as parseJSONSafely,v as prefersReducedMotion,W as removeNode,te as rgbToHex,Ee as sanitizeContent,Ve as sanitizeEditorContent,Q as sanitizeSecurityData,$e as setColumnBodyType,be as setDateLocale,de as setDefaultStructure,he as springDeprecate,L as toNumber,Ce as truncateString,K as updateNode};
|
|
1
|
+
import{a as x}from"../chunk-GSQE2NEY.js";import{e as c}from"../chunk-RVQHSQYF.js";import{b as p}from"../chunk-7P4BJDQR.js";import"../chunk-HUASNNWD.js";import"../chunk-YMSSF2ZU.js";import{a as ee,b as te}from"../chunk-EVDFSWPU.js";import{a as m,b as Y,c as w,d as A}from"../chunk-JRHMAY5G.js";import{c as T}from"../chunk-OOVZTF74.js";function re(e){if(e)return t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),e(t))}}function ne(){return typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function k(e,t,n){return(e*299+t*587+n*114)/1e3}function F(e){let t=parseInt(e.slice(1),16),n=t>>16&255,r=t>>8&255,o=t&255;return[n,r,o]}function M(e){let t=e.match(/\d+/g);return t?`#${t.map(r=>parseInt(r).toString(16).padStart(2,"0")).join("")}`:"#000000"}function N(e){let[t,n,r]=F(e);return k(t,n,r)>150?"black":"white"}var _=[{bg:"--spring-page-menu-bg",text:"--spring-page-menu-color"}];function h(e,t){if(typeof document>"u")return null;let n=t??document.documentElement,r=getComputedStyle(n).getPropertyValue(e).trim();if(!r||r==="transparent"||r==="initial"||r==="inherit")return null;if(/^#[0-9a-fA-F]{6}$/.test(r))return r;let o=document.createElement("div");o.style.display="none",o.style.color=`var(${e})`,n.appendChild(o);let i=getComputedStyle(o).color;return o.remove(),i?M(i):null}function ie(e=_,t){if(typeof document>"u")return;let n=t??document.documentElement,r=h("--spring-color-text",n)??"#374151";for(let{bg:o,text:i}of e){let u=h(o,n);if(!u)continue;let f=N(u);n.style.setProperty(i,f==="white"?"#ffffff":r)}}import g from"dayjs";import E from"dayjs/plugin/customParseFormat";g.extend(E);var C=new Set(["__proto__","prototype","constructor"]);function ce(e){return e!==0&&e!==null&&e!==void 0&&e!==!1&&e!==""&&!(Array.isArray(e)&&e.length===0)}function I(e,t){if(!t&&typeof structuredClone=="function")try{return structuredClone(e)}catch{}let n=t??new WeakMap;if(typeof e=="object"&&e!==null&&n.has(e))return n.get(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(e===null||typeof e!="object")return e;let r=Array.isArray(e)?[]:{};n.set(e,r);for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=I(e[o],n));return r}function R(e,t){if(e===t||e===null&&t===""||e===""&&t===null)return!0;if(e==null||t==null||typeof e!="object"&&typeof e!="function"||typeof t!="object"&&typeof t!="function"||Array.isArray(e)!==Array.isArray(t))return!1;let n=e,r=t,o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return!1;let u=new Set(i);for(let f of o)if(!u.has(f)||!R(n[f],r[f]))return!1;return!0}function V(e,t){let n={...e};return Object.keys(t).forEach(r=>{if(C.has(r))return;let o=r;t[o]&&typeof t[o]=="object"&&!Array.isArray(t[o])?n[o]=V(e[o]&&typeof e[o]=="object"?e[o]:{},t[o]):n[o]=t[o]}),n}function de(e,t){let n=t.split("."),r=e;for(let o of n){if(r==null||typeof r!="object"||r instanceof Date||Array.isArray(r))return;r=r[o]}return r}function me(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function pe(){let e=globalThis.crypto;if(e&&typeof e.randomUUID=="function")return e.randomUUID();if(e&&typeof e.getRandomValues=="function"){let t=new Uint8Array(16);e.getRandomValues(t);let n=t[6]??0,r=t[8]??0;t[6]=n&15|64,t[8]=r&63|128;let o=Array.from(t,i=>i.toString(16).padStart(2,"0")).join("");return`${o.slice(0,8)}-${o.slice(8,12)}-${o.slice(12,16)}-${o.slice(16,20)}-${o.slice(20)}`}throw new T("generateGUID(): secure random source unavailable. Provide Web Crypto (crypto.randomUUID or crypto.getRandomValues).","generateGUID")}function ge(e){let t={id_public:x},n=r=>{switch(r){case"boolean":return!1;case"string":return"";case"number":return"";case"object":case"date":case"datetime":case"time":return null;default:return}};return e.forEach(r=>{r.field&&(t[r.field]=n(r.type))}),t}function H(e){if(typeof e=="string"){if(e.toLowerCase()==="true")return!0;if(e.toLowerCase()==="false")return!1;try{return JSON.parse(e)}catch{return e}}return e}function y(e){let t=H(e);if(t==null)return"string";if(t instanceof Date)return"date";if(typeof t=="string"){let r=t.trim();if(/[0-9]/.test(r)&&/[-./]/.test(r)&&r.length>=6&&(g(r,["D.M.YYYY","DD.MM.YYYY","D. M. YYYY","DD. MM. YYYY","DD.MM.YYYY HH:mm","D.M.YYYY HH:mm","DD.MM.YYYY H:mm","D.M.YYYY H:mm","YYYY-MM-DD","YYYY-MM-DDTHH:mm:ss","YYYY-MM-DDTHH:mm:ss.SSS","YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DDTHH:mm:ss.SSSZ"],!0).isValid()||g(r).isValid()&&/^\d{4}-\d{2}-\d{2}/.test(r)))return"date"}if(Array.isArray(t))return t.length===0?"object":y(t[0]);let n=typeof t;return n==="number"?"number":n==="boolean"?"boolean":n==="object"?"object":"string"}import s from"dayjs";import $ from"dayjs/plugin/customParseFormat";import O from"dayjs/plugin/isBetween";s.extend($);s.extend(O);var D=null;function B(){let e=c().i18n.dayjsLocale;e&&e!==D&&(s.locale(e),D=e)}function he(e){D=e,s.locale(e)}function a(){return B(),c().i18n.dateFormats}var d={formatDateCustom(e,t){return e?s(e).format(t):""},formatDate(e){return e?s(e).format(a().date):""},formatDateTime(e){return e?s(e).format(a().dateTime):""},formatTime(e){return e?s(e).format(a().time):""},formatDateRange(e,t,n=a().date){let r=s(e),o=s(t),i=a().dateTime;return r.isSame(o,"day")?n.includes("H")||n.includes("h")?`${r.format(i)}-${o.format(a().time)}`:n===a().time?`${r.format(a().time)}-${o.format(a().time)}`:r.format(n):n.includes("H")||n.includes("h")?`${r.format(i)} - ${o.format(i)}`:n===a().time?`${r.format(a().time)} - ${o.format(a().time)}`:`${r.format(a().date)} - ${o.format(a().date)}`},formatDateTimeWithSeconds(e){return e?s(e).format(a().dateTimeSeconds):""},formatDateTimeShort(e){return e?s(e).isSame(Date.now(),"day")?s(e).format(a().time):this.formatDateTime(e):""},getAgeFromDate(e){return s().diff(e,"years")},formatMonthName(e,t){return s(e).format(t)},formatMonthNumber(e){return s(e).month()+1},getPreviousMonth(e,t){return s(e).subtract(t,"months").toDate()},setTimeFromString(e,t,n){let r=s(e).toDate(),o=t.split(":");return n?r.setSeconds(0):r.setHours(Number(o[0]??0)),r.setMinutes(Number(o[1]??0)),r},formatDateString(e){return e?e.split("-")[0]?.length===4?s(e).toDate():e.split(".")[0]?.length===4||e.split("/")[0]?.length===4?s(e,"YYYY. M. D.").toDate():s(e,"D. M. YYYY").toDate():null},getDuration(e,t,n){if(!e||!t)return null;{let r=s(e);return s(t).diff(r,n)}},getStartOfDate(e,t){return s(e).startOf(t).toDate()},getEndOfDay(e){return s(e).endOf("day").toDate()},getDateRange(e,t){let n=s(e).startOf(t).toDate(),r=s(e).endOf(t).toDate();return{dateFrom:n,dateTo:r}},isDateInRange(e,t,n){return t?s(n).isBetween(e,t,null,"[]"):s(n).isSame(e,"day")},add(e,t,n){return s(e).add(t,n||"days").toDate()},substractDaysFromDate(e,t){return s(t).subtract(e,"days").toDate()}};var b=new Set;function we(e,t,n){if(!m)return;let r=`${e}:${t}`;if(b.has(r))return;b.add(r);let o=n?` It will be removed in v${n}.`:"";console.warn(`[SPRING Deprecation] "${e}" is deprecated. Use ${t} instead.${o}`)}function Ae(){b.clear()}function j(e){return e instanceof Date?e.toISOString():Array.isArray(e)?JSON.stringify(e):typeof e=="boolean"?e:e!=null?e.toString():""}function Me(e){if(!e)return null;if(typeof e=="object"&&e!==null&&("logic"in e||"field"in e))return e;if(typeof e=="object"&&e!==null){let n=Object.entries(e).filter(([r,o])=>r&&o!==void 0&&o!==null&&o!=="").map(([r,o])=>{let i=j(o);return{field:r,operator:"eq",value:i}});return n.length===0?null:{logic:"and",filters:n}}return null}function Ne(e,t,n){let r=t&&t[e];return r&&typeof r.type=="string"?r.type:y(n)}import S from"sanitize-html";function Ve(e){return e?S(e,{allowedTags:[],allowedAttributes:{}}):""}var P=["p","br","div","ul","ol","li","b","i","em","strong","u","s","sub","sup","h1","h2","h3","h4","h5","h6","span","a","table","thead","tbody","tr","th","td"],U={a:["href","title","target","rel"],td:["colspan","rowspan"],th:["colspan","rowspan"],span:["style"]},z=/^(?!.*(?:url|expression)\s*\()[a-z0-9#(),.%\s-]{1,80}$/i,L=new Set(["_blank","_self","_parent","_top"]);function G(e){if(!e)return[];let t=new Set,n=[];for(let r of e.split(/\s+/)){let o=r.trim().toLowerCase();!o||o==="opener"||t.has(o)||(t.add(o),n.push(o))}return n}var K={a:(e,t)=>{let n={...t};if(typeof n.target=="string"){let r=n.target.trim().toLowerCase();L.has(r)?n.target=r:delete n.target}if(n.target==="_blank"){let r=G(n.rel);r.includes("noopener")||r.push("noopener"),r.includes("noreferrer")||r.push("noreferrer"),n.rel=r.join(" ")}return{tagName:e,attribs:n}}},W={span:{"text-decoration":[z]}};function He(e){return e?S(e,{allowedTags:P,allowedAttributes:U,allowedStyles:W,transformTags:K,allowedSchemes:["http","https","mailto"]}):""}function $e(e,t){return e.length<=t?e:t<3?e.slice(0,t):e.slice(0,t-3)+"..."}function v(e,t){let n=c().i18n.numberLocale;return Number(e).toLocaleString(n,{minimumFractionDigits:t||0,maximumFractionDigits:t||0})}function Oe(e,t){let n=t.field,r=e,o=r[n];switch(t.type){case"date":o=d.formatDate(r[n]);break;case"datetime":o=d.formatDateTime(r[n]);break;case"time":o=d.formatTime(r[n]);break;case"boolean":o=r[n]?p("admin-yes"):p("admin-no");break;case"number":{let i=r[n];o=i!==void 0?t.decimals?v(i,t.decimals):i:"";break}case"object":{let i=r[n];o=i?t.textField?i[t.textField]:i.full_name||i.name||"":"";break}case"string":case"color":break;default:{let i=t.type}}return o}function l(e,t){let n=e[t];return Array.isArray(n)?n:void 0}function J(e,t,n="childrenNodes"){for(let r of e){if(r.id_public===t)return r;let o=l(r,n);if(o&&o.length>0){let i=J(o,t,n);if(i)return i}}return null}function je(e,t="childrenNodes"){let n=[],r=o=>{for(let i of o){n.push(i.id_public);let u=l(i,t);u&&u.length>0&&r(u)}};return r(e),n}function q(e,t,n,r="childrenNodes"){return e.map(o=>{if(o.id_public===t)return n(o);let i=l(o,r);return i&&i.length>0?{...o,[r]:q(i,t,n,r)}:o})}function Z(e,t,n="childrenNodes"){return e.filter(r=>r.id_public!==t).map(r=>{let o=l(r,n);return o&&o.length>0?{...r,[n]:Z(o,t,n)}:r})}function Q(e,t,n,r="childrenNodes"){return t===null?[...e,n]:e.map(o=>{if(o.id_public===t){let u=l(o,r)||[];return{...o,[r]:[...u,n]}}let i=l(o,r);return i&&i.length>0?{...o,[r]:Q(i,t,n,r)}:o})}function X(e,t,n="childrenNodes",r=null){for(let o of e){if(o.id_public===t)return r;let i=l(o,n);if(i&&i.length>0){let u=X(i,t,n,o.id_public);if(u!==null)return u}}return null}export{_ as CONTRAST_PAIRS,m as __DEV__,Q as addNode,ie as applyContrastColors,Ae as clearDeprecationWarnings,d as dateManager,I as deepCopy,R as deepEqual,V as deepMerge,A as devAssert,w as devThrow,Y as devWarn,J as findNode,X as findParentId,pe as generateGUID,je as getAllIds,k as getBrightness,l as getChildren,N as getContrastYIQ,Ne as getFilterFieldType,de as getValueByPath,y as getValueType,F as hexToRgb,ee as isSensitiveSecurityKey,ce as isValueNotEmpty,me as normalizeString,Me as normalizeSystemFilter,re as onKeyActivate,j as parseFilter,H as parseJSONSafely,ne as prefersReducedMotion,Z as removeNode,h as resolveColorVar,M as rgbToHex,Ve as sanitizeContent,He as sanitizeEditorContent,te as sanitizeSecurityData,Oe as setColumnBodyType,he as setDateLocale,ge as setDefaultStructure,we as springDeprecate,v as toNumber,$e as truncateString,q as updateNode};
|