@praxisui/core 9.0.0-beta.21 → 9.0.0-beta.25
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/ai/component-registry.json +2 -2
- package/fesm2022/praxisui-core.mjs +870 -190
- package/package.json +1 -1
- package/types/praxisui-core.d.ts +171 -67
|
@@ -202,9 +202,12 @@ function collectEntityLookupIds(value) {
|
|
|
202
202
|
}
|
|
203
203
|
function buildEntityLookupEntityRef(value, entityType) {
|
|
204
204
|
const id = extractEntityLookupId(value);
|
|
205
|
-
if (id === null
|
|
206
|
-
return
|
|
207
|
-
|
|
205
|
+
if (id === null)
|
|
206
|
+
return null;
|
|
207
|
+
if (id === undefined)
|
|
208
|
+
return undefined;
|
|
209
|
+
if (id === '')
|
|
210
|
+
return '';
|
|
208
211
|
const explicitType = typeof value === 'object' &&
|
|
209
212
|
value !== null &&
|
|
210
213
|
!Array.isArray(value) &&
|
|
@@ -8587,6 +8590,7 @@ const DEFAULT_JSON_LOGIC_OPERATORS = [
|
|
|
8587
8590
|
const ALL_RULE_CONTEXT_ROOTS = [
|
|
8588
8591
|
'form',
|
|
8589
8592
|
'row',
|
|
8593
|
+
'rowData',
|
|
8590
8594
|
'computed',
|
|
8591
8595
|
'meta',
|
|
8592
8596
|
'source',
|
|
@@ -11691,7 +11695,7 @@ class ResourceDiscoveryService {
|
|
|
11691
11695
|
throw new Error('ResourceDiscoveryService cannot resolve an empty href.');
|
|
11692
11696
|
}
|
|
11693
11697
|
if (/^https?:\/\//i.test(normalizedHref)) {
|
|
11694
|
-
return normalizedHref;
|
|
11698
|
+
return this.resolveTrustedAbsoluteHref(normalizedHref, options);
|
|
11695
11699
|
}
|
|
11696
11700
|
const apiBaseUrl = this.resolveApiBaseHref(options);
|
|
11697
11701
|
if (!apiBaseUrl) {
|
|
@@ -11744,6 +11748,69 @@ class ResourceDiscoveryService {
|
|
|
11744
11748
|
const entry = this.resolveApiEntry(options);
|
|
11745
11749
|
return String(buildApiUrl(entry) || '').trim();
|
|
11746
11750
|
}
|
|
11751
|
+
resolveTrustedAbsoluteHref(href, options) {
|
|
11752
|
+
const runtimeOrigin = this.getRuntimeOrigin();
|
|
11753
|
+
const baseUrl = this.resolveApiBaseUrl(options);
|
|
11754
|
+
if (!runtimeOrigin || !baseUrl || this.isAbsoluteHttpUrl(baseUrl)) {
|
|
11755
|
+
return href;
|
|
11756
|
+
}
|
|
11757
|
+
let parsed;
|
|
11758
|
+
try {
|
|
11759
|
+
parsed = new URL(href);
|
|
11760
|
+
}
|
|
11761
|
+
catch {
|
|
11762
|
+
return href;
|
|
11763
|
+
}
|
|
11764
|
+
if (!this.isTrustedOrigin(parsed.origin, options)) {
|
|
11765
|
+
return href;
|
|
11766
|
+
}
|
|
11767
|
+
if (!this.isProxyableApiPath(parsed.pathname, baseUrl)) {
|
|
11768
|
+
return href;
|
|
11769
|
+
}
|
|
11770
|
+
return new URL(`${parsed.pathname}${parsed.search}${parsed.hash}`, `${runtimeOrigin}/`).toString();
|
|
11771
|
+
}
|
|
11772
|
+
isTrustedOrigin(origin, options) {
|
|
11773
|
+
const normalizedOrigin = this.normalizeOrigin(origin);
|
|
11774
|
+
if (!normalizedOrigin) {
|
|
11775
|
+
return false;
|
|
11776
|
+
}
|
|
11777
|
+
return this.getTrustedOrigins(options).some((trustedOrigin) => trustedOrigin === normalizedOrigin);
|
|
11778
|
+
}
|
|
11779
|
+
getTrustedOrigins(options) {
|
|
11780
|
+
const origins = this.resolveApiEntry(options).trustedOrigins || [];
|
|
11781
|
+
return origins
|
|
11782
|
+
.map((origin) => this.normalizeOrigin(origin))
|
|
11783
|
+
.filter((origin) => !!origin);
|
|
11784
|
+
}
|
|
11785
|
+
normalizeOrigin(origin) {
|
|
11786
|
+
try {
|
|
11787
|
+
return new URL(origin).origin;
|
|
11788
|
+
}
|
|
11789
|
+
catch {
|
|
11790
|
+
return null;
|
|
11791
|
+
}
|
|
11792
|
+
}
|
|
11793
|
+
isProxyableApiPath(pathname, baseUrl) {
|
|
11794
|
+
const basePath = this.normalizePathPrefix(baseUrl);
|
|
11795
|
+
if (basePath && (pathname === basePath || pathname.startsWith(`${basePath}/`))) {
|
|
11796
|
+
return true;
|
|
11797
|
+
}
|
|
11798
|
+
return pathname === '/schemas'
|
|
11799
|
+
|| pathname.startsWith('/schemas/')
|
|
11800
|
+
|| pathname === '/v3/api-docs'
|
|
11801
|
+
|| pathname.startsWith('/v3/api-docs/');
|
|
11802
|
+
}
|
|
11803
|
+
normalizePathPrefix(baseUrl) {
|
|
11804
|
+
const path = String(baseUrl || '').split(/[?#]/u)[0]?.trim() || '';
|
|
11805
|
+
if (!path.startsWith('/')) {
|
|
11806
|
+
return '';
|
|
11807
|
+
}
|
|
11808
|
+
const normalized = `/${path.replace(/^\/+|\/+$/g, '')}`;
|
|
11809
|
+
return normalized === '/' ? '' : normalized;
|
|
11810
|
+
}
|
|
11811
|
+
isAbsoluteHttpUrl(value) {
|
|
11812
|
+
return /^https?:\/\//i.test(String(value || '').trim());
|
|
11813
|
+
}
|
|
11747
11814
|
resolveApiBaseHref(options) {
|
|
11748
11815
|
const baseUrl = this.resolveApiBaseUrl(options);
|
|
11749
11816
|
if (!baseUrl) {
|
|
@@ -12599,18 +12666,24 @@ class SurfaceOpenMaterializerService {
|
|
|
12599
12666
|
if (data && typeof data === 'object' && !Array.isArray(data)) {
|
|
12600
12667
|
const objectData = data;
|
|
12601
12668
|
if (payload.widget.id === 'praxis-dynamic-form') {
|
|
12602
|
-
const schemaFields = await this.resolveSchemaFields(payload, discoveryOptions);
|
|
12603
12669
|
return {
|
|
12604
12670
|
...payload,
|
|
12605
12671
|
widget: {
|
|
12606
12672
|
...payload.widget,
|
|
12607
12673
|
inputs: {
|
|
12608
12674
|
...this.projectMaterializedFormInputs(payload.widget.inputs || {}),
|
|
12609
|
-
configPersistenceStrategy: 'input-first',
|
|
12610
12675
|
mode: payload.widget.inputs?.['mode'] || 'view',
|
|
12611
12676
|
initialValue: objectData,
|
|
12612
12677
|
resourceId,
|
|
12613
|
-
|
|
12678
|
+
layoutPolicy: payload.widget.inputs?.['layoutPolicy'] || {
|
|
12679
|
+
source: 'schema',
|
|
12680
|
+
intent: 'detail',
|
|
12681
|
+
preset: 'compactPresentation',
|
|
12682
|
+
lifecycle: 'live',
|
|
12683
|
+
persistence: 'transient',
|
|
12684
|
+
schemaOperation: 'detail',
|
|
12685
|
+
schemaType: 'response',
|
|
12686
|
+
},
|
|
12614
12687
|
},
|
|
12615
12688
|
},
|
|
12616
12689
|
context: this.mergeMaterializationContext(payload, {
|
|
@@ -12648,11 +12721,14 @@ class SurfaceOpenMaterializerService {
|
|
|
12648
12721
|
'resourceId',
|
|
12649
12722
|
'apiEndpointKey',
|
|
12650
12723
|
'apiUrlEntry',
|
|
12724
|
+
'schemaUrl',
|
|
12725
|
+
'readUrl',
|
|
12651
12726
|
'submitUrl',
|
|
12652
12727
|
'submitMethod',
|
|
12653
12728
|
'responseSchemaUrl',
|
|
12654
12729
|
'customEndpoints',
|
|
12655
12730
|
'configPersistenceStrategy',
|
|
12731
|
+
'layoutPolicy',
|
|
12656
12732
|
'mode',
|
|
12657
12733
|
'actions',
|
|
12658
12734
|
'enableCustomization',
|
|
@@ -12660,6 +12736,7 @@ class SurfaceOpenMaterializerService {
|
|
|
12660
12736
|
'readonlyModeGlobal',
|
|
12661
12737
|
'disabledModeGlobal',
|
|
12662
12738
|
'presentationModeGlobal',
|
|
12739
|
+
'fieldIconPolicy',
|
|
12663
12740
|
'visibleGlobal',
|
|
12664
12741
|
'layout',
|
|
12665
12742
|
'backConfig',
|
|
@@ -12673,186 +12750,6 @@ class SurfaceOpenMaterializerService {
|
|
|
12673
12750
|
]);
|
|
12674
12751
|
return Object.fromEntries(Object.entries(inputs).filter(([key]) => supported.has(key)));
|
|
12675
12752
|
}
|
|
12676
|
-
buildLocalFormConfig(data, schemaFields = []) {
|
|
12677
|
-
const fields = this.buildMaterializedFormFields(data, schemaFields);
|
|
12678
|
-
const sections = this.buildMaterializedFormSections(fields);
|
|
12679
|
-
return {
|
|
12680
|
-
sections,
|
|
12681
|
-
fieldMetadata: fields,
|
|
12682
|
-
};
|
|
12683
|
-
}
|
|
12684
|
-
buildMaterializedFormFields(data, schemaFields) {
|
|
12685
|
-
const schemaByName = new Map(schemaFields
|
|
12686
|
-
.filter((field) => !!field?.name)
|
|
12687
|
-
.map((field) => [field.name, field]));
|
|
12688
|
-
const orderedNames = schemaFields.length
|
|
12689
|
-
? [
|
|
12690
|
-
...schemaFields
|
|
12691
|
-
.filter((field) => field?.name && Object.prototype.hasOwnProperty.call(data, field.name))
|
|
12692
|
-
.sort((left, right) => (left.order ?? Number.MAX_SAFE_INTEGER) - (right.order ?? Number.MAX_SAFE_INTEGER))
|
|
12693
|
-
.map((field) => field.name),
|
|
12694
|
-
...Object.keys(data).filter((key) => !schemaByName.has(key)),
|
|
12695
|
-
]
|
|
12696
|
-
: Object.keys(data);
|
|
12697
|
-
return orderedNames
|
|
12698
|
-
.filter((key, index, keys) => keys.indexOf(key) === index)
|
|
12699
|
-
.filter((key) => this.shouldRenderMaterializedFormField(key, data[key], schemaByName.get(key), data))
|
|
12700
|
-
.map((key) => {
|
|
12701
|
-
const field = schemaByName.get(key);
|
|
12702
|
-
if (field) {
|
|
12703
|
-
return {
|
|
12704
|
-
...mapFieldDefinitionToMetadata({
|
|
12705
|
-
...field,
|
|
12706
|
-
hidden: false,
|
|
12707
|
-
formHidden: false,
|
|
12708
|
-
readOnly: true,
|
|
12709
|
-
}),
|
|
12710
|
-
readOnly: true,
|
|
12711
|
-
};
|
|
12712
|
-
}
|
|
12713
|
-
return {
|
|
12714
|
-
name: key,
|
|
12715
|
-
label: this.humanizeFieldName(key),
|
|
12716
|
-
controlType: this.inferFormControlType(data[key]),
|
|
12717
|
-
readOnly: true,
|
|
12718
|
-
};
|
|
12719
|
-
});
|
|
12720
|
-
}
|
|
12721
|
-
buildMaterializedFormSections(fields) {
|
|
12722
|
-
const groups = new Map();
|
|
12723
|
-
for (const field of fields) {
|
|
12724
|
-
const group = String(field.group || '').trim() || 'Detalhes';
|
|
12725
|
-
groups.set(group, [...(groups.get(group) || []), field]);
|
|
12726
|
-
}
|
|
12727
|
-
return Array.from(groups.entries()).map(([group, groupFields], sectionIndex) => {
|
|
12728
|
-
const fieldNames = groupFields.map((field) => field.name);
|
|
12729
|
-
const rows = this.chunk(fieldNames, 2).map((names, rowIndex) => ({
|
|
12730
|
-
id: `row-${sectionIndex + 1}-${rowIndex + 1}`,
|
|
12731
|
-
columns: names.map((name) => ({
|
|
12732
|
-
id: `col-${name}`,
|
|
12733
|
-
fields: [name],
|
|
12734
|
-
})),
|
|
12735
|
-
}));
|
|
12736
|
-
return {
|
|
12737
|
-
id: this.stableSectionId(group, sectionIndex),
|
|
12738
|
-
title: group,
|
|
12739
|
-
rows,
|
|
12740
|
-
};
|
|
12741
|
-
});
|
|
12742
|
-
}
|
|
12743
|
-
shouldRenderMaterializedFormField(key, value, field, data) {
|
|
12744
|
-
if (!key || key.startsWith('_'))
|
|
12745
|
-
return false;
|
|
12746
|
-
if (field?.hidden === true)
|
|
12747
|
-
return false;
|
|
12748
|
-
if (this.isTechnicalRelationIdField(key, field, data))
|
|
12749
|
-
return false;
|
|
12750
|
-
if (this.isDuplicateMediaUrlField(key, value, field, data))
|
|
12751
|
-
return false;
|
|
12752
|
-
if (field?.formHidden === true && !this.isResolvedDisplayCompanionField(key, data)) {
|
|
12753
|
-
return false;
|
|
12754
|
-
}
|
|
12755
|
-
if (value == null)
|
|
12756
|
-
return true;
|
|
12757
|
-
return typeof value !== 'object' || value instanceof Date;
|
|
12758
|
-
}
|
|
12759
|
-
isTechnicalRelationIdField(key, field, data) {
|
|
12760
|
-
if (key === 'id' || !/Id$/.test(key))
|
|
12761
|
-
return false;
|
|
12762
|
-
const base = key.slice(0, -2);
|
|
12763
|
-
const hasDisplayCompanion = this.hasDisplayCompanion(base, data);
|
|
12764
|
-
if (!hasDisplayCompanion)
|
|
12765
|
-
return false;
|
|
12766
|
-
const controlType = String(field?.controlType || '').toLowerCase();
|
|
12767
|
-
return Boolean(field?.endpoint
|
|
12768
|
-
|| field?.resourcePath
|
|
12769
|
-
|| field?.optionSource
|
|
12770
|
-
|| controlType.includes('select')
|
|
12771
|
-
|| field?.tableHidden === true);
|
|
12772
|
-
}
|
|
12773
|
-
isResolvedDisplayCompanionField(key, data) {
|
|
12774
|
-
const base = this.resolveDisplayCompanionBase(key);
|
|
12775
|
-
return !!base && Object.prototype.hasOwnProperty.call(data, `${base}Id`);
|
|
12776
|
-
}
|
|
12777
|
-
resolveDisplayCompanionBase(key) {
|
|
12778
|
-
const suffixes = ['Nome', 'Name', 'Label', 'Descricao', 'Description', 'Title', 'Text'];
|
|
12779
|
-
const suffix = suffixes.find((candidate) => key.endsWith(candidate));
|
|
12780
|
-
return suffix ? key.slice(0, -suffix.length) : null;
|
|
12781
|
-
}
|
|
12782
|
-
hasDisplayCompanion(base, data) {
|
|
12783
|
-
const suffixes = ['Nome', 'Name', 'Label', 'Descricao', 'Description', 'Title', 'Text'];
|
|
12784
|
-
return suffixes.some((suffix) => {
|
|
12785
|
-
const value = data[`${base}${suffix}`];
|
|
12786
|
-
return value != null && String(value).trim().length > 0;
|
|
12787
|
-
});
|
|
12788
|
-
}
|
|
12789
|
-
isDuplicateMediaUrlField(key, value, field, data) {
|
|
12790
|
-
if (typeof value !== 'string' || !this.looksLikeMediaUrlField(key, field)) {
|
|
12791
|
-
return false;
|
|
12792
|
-
}
|
|
12793
|
-
return Object.entries(data).some(([candidateKey, candidateValue]) => {
|
|
12794
|
-
if (candidateKey === key || candidateValue !== value) {
|
|
12795
|
-
return false;
|
|
12796
|
-
}
|
|
12797
|
-
return this.looksLikeAvatarFieldName(candidateKey);
|
|
12798
|
-
});
|
|
12799
|
-
}
|
|
12800
|
-
looksLikeMediaUrlField(key, field) {
|
|
12801
|
-
const type = String(field?.type || '').toLowerCase();
|
|
12802
|
-
const controlType = String(field?.controlType || '').toLowerCase();
|
|
12803
|
-
const normalized = key.toLowerCase();
|
|
12804
|
-
return Boolean(type === 'url'
|
|
12805
|
-
|| controlType.includes('url')
|
|
12806
|
-
|| normalized.includes('url')
|
|
12807
|
-
|| normalized.includes('foto')
|
|
12808
|
-
|| normalized.includes('photo')
|
|
12809
|
-
|| normalized.includes('image')
|
|
12810
|
-
|| normalized.includes('imagem'));
|
|
12811
|
-
}
|
|
12812
|
-
looksLikeAvatarFieldName(key) {
|
|
12813
|
-
const normalized = key.toLowerCase();
|
|
12814
|
-
return normalized.includes('avatar') || normalized.includes('portrait');
|
|
12815
|
-
}
|
|
12816
|
-
inferFormControlType(value) {
|
|
12817
|
-
if (typeof value === 'boolean')
|
|
12818
|
-
return 'checkbox';
|
|
12819
|
-
if (typeof value === 'number')
|
|
12820
|
-
return 'numericTextBox';
|
|
12821
|
-
if (typeof value === 'string') {
|
|
12822
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(value))
|
|
12823
|
-
return 'dateInput';
|
|
12824
|
-
if (/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(value))
|
|
12825
|
-
return 'email';
|
|
12826
|
-
}
|
|
12827
|
-
return 'input';
|
|
12828
|
-
}
|
|
12829
|
-
humanizeFieldName(key) {
|
|
12830
|
-
return key
|
|
12831
|
-
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
12832
|
-
.replace(/[_-]+/g, ' ')
|
|
12833
|
-
.replace(/\s+/g, ' ')
|
|
12834
|
-
.trim()
|
|
12835
|
-
.replace(/^./, (char) => char.toUpperCase());
|
|
12836
|
-
}
|
|
12837
|
-
stableSectionId(group, index) {
|
|
12838
|
-
if (group === 'Detalhes') {
|
|
12839
|
-
return 'details';
|
|
12840
|
-
}
|
|
12841
|
-
const normalized = group
|
|
12842
|
-
.normalize('NFD')
|
|
12843
|
-
.replace(/[\u0300-\u036f]/g, '')
|
|
12844
|
-
.toLowerCase()
|
|
12845
|
-
.replace(/[^a-z0-9]+/g, '-')
|
|
12846
|
-
.replace(/^-+|-+$/g, '');
|
|
12847
|
-
return normalized || `details-${index + 1}`;
|
|
12848
|
-
}
|
|
12849
|
-
chunk(items, size) {
|
|
12850
|
-
const result = [];
|
|
12851
|
-
for (let index = 0; index < items.length; index += size) {
|
|
12852
|
-
result.push(items.slice(index, index + size));
|
|
12853
|
-
}
|
|
12854
|
-
return result;
|
|
12855
|
-
}
|
|
12856
12753
|
shouldMaterializeItemReadProjection(payload) {
|
|
12857
12754
|
const surface = payload.context?.['surface'];
|
|
12858
12755
|
const kind = String(surface?.['kind'] || '').toUpperCase();
|
|
@@ -12935,6 +12832,8 @@ class SurfaceOpenMaterializerService {
|
|
|
12935
12832
|
bindingOrder: [
|
|
12936
12833
|
'tableId',
|
|
12937
12834
|
'componentInstanceId',
|
|
12835
|
+
'configPersistenceStrategy',
|
|
12836
|
+
'resourcePath',
|
|
12938
12837
|
'title',
|
|
12939
12838
|
'subtitle',
|
|
12940
12839
|
'icon',
|
|
@@ -12942,11 +12841,17 @@ class SurfaceOpenMaterializerService {
|
|
|
12942
12841
|
'config',
|
|
12943
12842
|
'enableCustomization',
|
|
12944
12843
|
],
|
|
12844
|
+
outputs: {
|
|
12845
|
+
rowClick: 'emit',
|
|
12846
|
+
selectionChange: 'emit',
|
|
12847
|
+
widgetEvent: 'emit',
|
|
12848
|
+
},
|
|
12945
12849
|
inputs: {
|
|
12946
12850
|
...tableInputOverrides,
|
|
12947
12851
|
resourcePath: '',
|
|
12948
12852
|
tableId: String(previousInputs['tableId'] || this.stableSurfaceId(payload)),
|
|
12949
12853
|
componentInstanceId: `${this.stableSurfaceId(payload)}.${resourceId}`,
|
|
12854
|
+
configPersistenceStrategy: previousInputs['configPersistenceStrategy'] ?? 'volatile',
|
|
12950
12855
|
title: payload.title,
|
|
12951
12856
|
subtitle: payload.subtitle,
|
|
12952
12857
|
icon: payload.icon,
|
|
@@ -12998,6 +12903,11 @@ class SurfaceOpenMaterializerService {
|
|
|
12998
12903
|
behavior: {
|
|
12999
12904
|
localDataMode: { enabled: true },
|
|
13000
12905
|
pagination: { enabled: true, pageSize: 10 },
|
|
12906
|
+
selection: {
|
|
12907
|
+
enabled: true,
|
|
12908
|
+
type: 'single',
|
|
12909
|
+
mode: 'both',
|
|
12910
|
+
},
|
|
13001
12911
|
},
|
|
13002
12912
|
};
|
|
13003
12913
|
}
|
|
@@ -16180,10 +16090,16 @@ const VISUALIZATION_TONES = new Set([
|
|
|
16180
16090
|
'critical',
|
|
16181
16091
|
]);
|
|
16182
16092
|
const TABLE_SAFE_KINDS = new Set([
|
|
16093
|
+
'line',
|
|
16094
|
+
'area',
|
|
16095
|
+
'column',
|
|
16183
16096
|
'comparison',
|
|
16184
16097
|
'stackedBar',
|
|
16098
|
+
'radial',
|
|
16099
|
+
'harveyBall',
|
|
16185
16100
|
'bullet',
|
|
16186
16101
|
'delta',
|
|
16102
|
+
'processFlow',
|
|
16187
16103
|
]);
|
|
16188
16104
|
function normalizePraxisPresentationVisualization(value) {
|
|
16189
16105
|
if (!value || typeof value !== 'object') {
|
|
@@ -16198,6 +16114,7 @@ function normalizePraxisPresentationVisualization(value) {
|
|
|
16198
16114
|
const size = normalizeEnum$1(value.size, VISUALIZATION_SIZES);
|
|
16199
16115
|
const tone = normalizeEnum$1(value.tone, VISUALIZATION_TONES);
|
|
16200
16116
|
const ariaLabel = normalizeText$1(value.ariaLabel);
|
|
16117
|
+
const valueSuffix = normalizeText$1(value.valueSuffix);
|
|
16201
16118
|
return {
|
|
16202
16119
|
kind,
|
|
16203
16120
|
fallbackText,
|
|
@@ -16205,20 +16122,206 @@ function normalizePraxisPresentationVisualization(value) {
|
|
|
16205
16122
|
...(size ? { size } : {}),
|
|
16206
16123
|
...(tone ? { tone } : {}),
|
|
16207
16124
|
...(ariaLabel ? { ariaLabel } : {}),
|
|
16125
|
+
...(valueSuffix ? { valueSuffix } : {}),
|
|
16208
16126
|
...(Object.prototype.hasOwnProperty.call(value, 'value') ? { value: value.value } : {}),
|
|
16127
|
+
...(normalizeExpression(value.valueExpr, 'valueExpr') ?? {}),
|
|
16128
|
+
...(normalizeExpression(value.valueSuffixExpr, 'valueSuffixExpr') ?? {}),
|
|
16209
16129
|
...(normalizeNumber(value.total, 'total') ?? {}),
|
|
16130
|
+
...(normalizeExpression(value.totalExpr, 'totalExpr') ?? {}),
|
|
16210
16131
|
...(normalizeNumber(value.target, 'target') ?? {}),
|
|
16132
|
+
...(normalizeExpression(value.targetExpr, 'targetExpr') ?? {}),
|
|
16211
16133
|
...(normalizeNumber(value.baseline, 'baseline') ?? {}),
|
|
16134
|
+
...(normalizeExpression(value.baselineExpr, 'baselineExpr') ?? {}),
|
|
16212
16135
|
...(normalizePoints(value.points) ?? {}),
|
|
16136
|
+
...(normalizeExpression(value.pointsExpr, 'pointsExpr') ?? {}),
|
|
16213
16137
|
...(normalizeSegments(value.segments) ?? {}),
|
|
16138
|
+
...(normalizeExpression(value.segmentsExpr, 'segmentsExpr') ?? {}),
|
|
16214
16139
|
...(normalizeThresholds(value.thresholds) ?? {}),
|
|
16140
|
+
...(normalizeExpression(value.thresholdsExpr, 'thresholdsExpr') ?? {}),
|
|
16215
16141
|
...(normalizeItems(value.items) ?? {}),
|
|
16142
|
+
...(normalizeExpression(value.itemsExpr, 'itemsExpr') ?? {}),
|
|
16143
|
+
...(normalizeExpression(value.toneExpr, 'toneExpr') ?? {}),
|
|
16144
|
+
...(normalizeExpression(value.ariaLabelExpr, 'ariaLabelExpr') ?? {}),
|
|
16145
|
+
...(normalizeExpression(value.fallbackTextExpr, 'fallbackTextExpr') ?? {}),
|
|
16216
16146
|
};
|
|
16217
16147
|
}
|
|
16218
16148
|
function isPraxisPresentationVisualizationTableSafe(value) {
|
|
16219
16149
|
const normalized = normalizePraxisPresentationVisualization(value);
|
|
16220
16150
|
return !!normalized && TABLE_SAFE_KINDS.has(normalized.kind);
|
|
16221
16151
|
}
|
|
16152
|
+
function renderPraxisPresentationVisualizationHtml(value, options = {}) {
|
|
16153
|
+
const visualization = normalizePraxisPresentationVisualization(value);
|
|
16154
|
+
if (!visualization) {
|
|
16155
|
+
return '';
|
|
16156
|
+
}
|
|
16157
|
+
switch (visualization.kind) {
|
|
16158
|
+
case 'comparison':
|
|
16159
|
+
return renderComparisonVisualizationHtml(visualization, options);
|
|
16160
|
+
case 'stackedBar':
|
|
16161
|
+
return renderStackedBarVisualizationHtml(visualization, options);
|
|
16162
|
+
case 'bullet':
|
|
16163
|
+
return renderBulletVisualizationHtml(visualization, options);
|
|
16164
|
+
case 'delta':
|
|
16165
|
+
return renderDeltaVisualizationHtml(visualization, options);
|
|
16166
|
+
case 'radial':
|
|
16167
|
+
return renderRadialVisualizationHtml(visualization, options);
|
|
16168
|
+
case 'harveyBall':
|
|
16169
|
+
return renderHarveyBallVisualizationHtml(visualization, options);
|
|
16170
|
+
case 'line':
|
|
16171
|
+
return renderLineVisualizationHtml(visualization, options);
|
|
16172
|
+
case 'area':
|
|
16173
|
+
return renderAreaVisualizationHtml(visualization, options);
|
|
16174
|
+
case 'column':
|
|
16175
|
+
return renderColumnVisualizationHtml(visualization, options);
|
|
16176
|
+
case 'processFlow':
|
|
16177
|
+
return renderProcessFlowVisualizationHtml(visualization, options);
|
|
16178
|
+
default:
|
|
16179
|
+
return `<span class="pfx-micro-viz__fallback">${escapeHtml$1(visualization.fallbackText)}</span>`;
|
|
16180
|
+
}
|
|
16181
|
+
}
|
|
16182
|
+
function renderComparisonVisualizationHtml(visualization, options) {
|
|
16183
|
+
const points = visualization.points ?? [];
|
|
16184
|
+
const max = Math.max(1, ...points.map((point) => Math.max(0, point.value)));
|
|
16185
|
+
const rows = points
|
|
16186
|
+
.map((point) => {
|
|
16187
|
+
const width = percent(point.value, max);
|
|
16188
|
+
return `
|
|
16189
|
+
<span class="pfx-micro-viz__row" data-tone="${escapeHtml$1(point.tone ?? visualization.tone ?? 'info')}">
|
|
16190
|
+
<span class="pfx-micro-viz__label">${escapeHtml$1(point.label ?? '')}</span>
|
|
16191
|
+
<span class="pfx-micro-viz__track">
|
|
16192
|
+
<span class="pfx-micro-viz__bar" style="width:${width}%"></span>
|
|
16193
|
+
</span>
|
|
16194
|
+
<span class="pfx-micro-viz__value">${escapeHtml$1(formatMicroNumber(point.value, options.locale))}</span>
|
|
16195
|
+
</span>`;
|
|
16196
|
+
})
|
|
16197
|
+
.join('');
|
|
16198
|
+
return `<span class="pfx-micro-viz" role="img" aria-label="${escapeHtml$1(visualization.ariaLabel ?? visualization.fallbackText)}">${rows}</span>`;
|
|
16199
|
+
}
|
|
16200
|
+
function renderStackedBarVisualizationHtml(visualization, options) {
|
|
16201
|
+
const segments = visualization.segments ?? [];
|
|
16202
|
+
const total = visualization.total && visualization.total > 0
|
|
16203
|
+
? visualization.total
|
|
16204
|
+
: Math.max(1, segments.reduce((sum, segment) => sum + Math.max(0, segment.value), 0));
|
|
16205
|
+
const bars = segments
|
|
16206
|
+
.map((segment) => `
|
|
16207
|
+
<span
|
|
16208
|
+
class="pfx-micro-viz__segment"
|
|
16209
|
+
data-tone="${escapeHtml$1(segment.tone ?? visualization.tone ?? 'info')}"
|
|
16210
|
+
style="width:${percent(segment.value, total)}%"
|
|
16211
|
+
title="${escapeHtml$1(`${segment.label ?? ''} ${formatMicroNumber(segment.value, options.locale)}`.trim())}"
|
|
16212
|
+
></span>`)
|
|
16213
|
+
.join('');
|
|
16214
|
+
const meta = segments
|
|
16215
|
+
.slice(0, 3)
|
|
16216
|
+
.map((segment) => `<span>${escapeHtml$1(segment.label ?? '')}: ${escapeHtml$1(formatMicroNumber(segment.value, options.locale))}</span>`)
|
|
16217
|
+
.join('');
|
|
16218
|
+
return `
|
|
16219
|
+
<span class="pfx-micro-viz" role="img" aria-label="${escapeHtml$1(visualization.ariaLabel ?? visualization.fallbackText)}">
|
|
16220
|
+
<span class="pfx-micro-viz__segments">${bars}</span>
|
|
16221
|
+
<span class="pfx-micro-viz__meta">${meta}</span>
|
|
16222
|
+
</span>`;
|
|
16223
|
+
}
|
|
16224
|
+
function resolveBulletMax(visualization) {
|
|
16225
|
+
const thresholds = visualization.thresholds ?? [];
|
|
16226
|
+
const values = [
|
|
16227
|
+
toFiniteNumber(visualization.value) ?? 0,
|
|
16228
|
+
visualization.target ?? 0,
|
|
16229
|
+
visualization.total ?? 0,
|
|
16230
|
+
...thresholds.map(t => t.value)
|
|
16231
|
+
].filter(v => Number.isFinite(v) && v > 0);
|
|
16232
|
+
return Math.max(...values, 100);
|
|
16233
|
+
}
|
|
16234
|
+
function renderBulletVisualizationHtml(visualization, options) {
|
|
16235
|
+
const currentValue = toFiniteNumber(visualization.value) ?? 0;
|
|
16236
|
+
const max = resolveBulletMax(visualization);
|
|
16237
|
+
const target = toFiniteNumber(visualization.target);
|
|
16238
|
+
const targetLeft = target === undefined ? null : percent(target, max);
|
|
16239
|
+
const isTable = visualization.surface === 'table-cell';
|
|
16240
|
+
// thresholds
|
|
16241
|
+
const thresholds = visualization.thresholds ?? [];
|
|
16242
|
+
let previous = 0;
|
|
16243
|
+
const bands = thresholds.map(t => {
|
|
16244
|
+
const current = Math.max(t.value, previous);
|
|
16245
|
+
const left = max > 0 ? percent(previous, max) : '0';
|
|
16246
|
+
const width = max > 0 ? percent(current - previous, max) : '0';
|
|
16247
|
+
previous = current;
|
|
16248
|
+
return { left, width, tone: t.tone ?? 'info' };
|
|
16249
|
+
}).filter(b => parseFloat(b.width) > 0);
|
|
16250
|
+
const bandsHtml = bands.map(b => `<span class="pfx-micro-bullet__range" data-tone="${escapeHtml$1(b.tone)}" style="left: ${b.left}%; width: ${b.width}%;"></span>`).join('');
|
|
16251
|
+
const topHtml = isTable ? '' : `
|
|
16252
|
+
<div class="pfx-micro-bullet__top">
|
|
16253
|
+
<span class="pfx-micro-bullet__label">${escapeHtml$1(visualization.fallbackText)}</span>
|
|
16254
|
+
<span class="pfx-micro-bullet__value">
|
|
16255
|
+
${escapeHtml$1(formatMicroNumber(currentValue, options.locale))}
|
|
16256
|
+
${target === undefined ? '' : `<span class="pfx-micro-bullet__target-val">/ Target: ${escapeHtml$1(formatMicroNumber(target, options.locale))}</span>`}
|
|
16257
|
+
</span>
|
|
16258
|
+
</div>`;
|
|
16259
|
+
const bottomHtml = isTable ? '' : `
|
|
16260
|
+
<div class="pfx-micro-bullet__bottom">
|
|
16261
|
+
<span>${escapeHtml$1(formatMicroNumber(visualization.baseline ?? 0, options.locale))}</span>
|
|
16262
|
+
<span>${escapeHtml$1(formatMicroNumber(max, options.locale))}</span>
|
|
16263
|
+
</div>`;
|
|
16264
|
+
return `
|
|
16265
|
+
<span class="pfx-micro-viz pfx-micro-viz__bullet" data-tone="${escapeHtml$1(visualization.tone ?? 'info')}" role="img" aria-label="${escapeHtml$1(visualization.ariaLabel ?? visualization.fallbackText)}">
|
|
16266
|
+
${topHtml}
|
|
16267
|
+
<span class="pfx-micro-bullet__track">
|
|
16268
|
+
${bandsHtml}
|
|
16269
|
+
<span class="pfx-micro-bullet__actual" data-tone="${escapeHtml$1(visualization.tone ?? 'info')}" style="width: ${percent(currentValue, max)}%;"></span>
|
|
16270
|
+
${targetLeft === null ? '' : `<span class="pfx-micro-bullet__target" style="left: ${targetLeft}%;"></span>`}
|
|
16271
|
+
</span>
|
|
16272
|
+
${bottomHtml}
|
|
16273
|
+
</span>`;
|
|
16274
|
+
}
|
|
16275
|
+
function renderDeltaVisualizationHtml(visualization, options) {
|
|
16276
|
+
const value = toFiniteNumber(visualization.value);
|
|
16277
|
+
const direction = value === undefined ? 'neutral' : value < 0 ? 'down' : value > 0 ? 'up' : 'neutral';
|
|
16278
|
+
const symbol = direction === 'up' ? '▲' : direction === 'down' ? '▼' : '→';
|
|
16279
|
+
const tone = visualization.tone ??
|
|
16280
|
+
(value === undefined
|
|
16281
|
+
? 'neutral'
|
|
16282
|
+
: value < 0
|
|
16283
|
+
? 'danger'
|
|
16284
|
+
: value > 0
|
|
16285
|
+
? 'success'
|
|
16286
|
+
: 'neutral');
|
|
16287
|
+
const valueSuffix = visualization.valueSuffix ?? '';
|
|
16288
|
+
const text = value === undefined
|
|
16289
|
+
? visualization.fallbackText
|
|
16290
|
+
: `${formatMicroNumber(Math.abs(value), options.locale)}${valueSuffix}`;
|
|
16291
|
+
const directionLabel = direction === 'up'
|
|
16292
|
+
? 'up'
|
|
16293
|
+
: direction === 'down'
|
|
16294
|
+
? 'down'
|
|
16295
|
+
: 'stable';
|
|
16296
|
+
const aria = visualization.ariaLabel ?? `${visualization.fallbackText}: ${directionLabel} ${text}`;
|
|
16297
|
+
return `
|
|
16298
|
+
<span class="pfx-micro-viz pfx-micro-viz__delta" data-tone="${escapeHtml$1(tone)}" data-direction="${escapeHtml$1(direction)}" role="img" aria-label="${escapeHtml$1(aria)}">
|
|
16299
|
+
<span class="pfx-micro-viz__delta-symbol" aria-hidden="true">${symbol}</span>
|
|
16300
|
+
<span>${escapeHtml$1(text)}</span>
|
|
16301
|
+
</span>`;
|
|
16302
|
+
}
|
|
16303
|
+
function percent(value, total) {
|
|
16304
|
+
if (!Number.isFinite(value) || !Number.isFinite(total) || total <= 0) {
|
|
16305
|
+
return '0';
|
|
16306
|
+
}
|
|
16307
|
+
return Math.max(0, Math.min(100, (value / total) * 100)).toFixed(2);
|
|
16308
|
+
}
|
|
16309
|
+
function toFiniteNumber(value) {
|
|
16310
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
16311
|
+
}
|
|
16312
|
+
function formatMicroNumber(value, locale) {
|
|
16313
|
+
return new Intl.NumberFormat(locale || undefined, {
|
|
16314
|
+
maximumFractionDigits: Math.abs(value) < 10 ? 2 : 0,
|
|
16315
|
+
}).format(value);
|
|
16316
|
+
}
|
|
16317
|
+
function escapeHtml$1(value) {
|
|
16318
|
+
return String(value ?? '')
|
|
16319
|
+
.replace(/&/g, '&')
|
|
16320
|
+
.replace(/</g, '<')
|
|
16321
|
+
.replace(/>/g, '>')
|
|
16322
|
+
.replace(/"/g, '"')
|
|
16323
|
+
.replace(/'/g, ''');
|
|
16324
|
+
}
|
|
16222
16325
|
function normalizePoints(value) {
|
|
16223
16326
|
const points = normalizeNumericEntries(value);
|
|
16224
16327
|
return points.length ? { points } : undefined;
|
|
@@ -16240,6 +16343,16 @@ function normalizeItems(value) {
|
|
|
16240
16343
|
.filter((item) => !!item);
|
|
16241
16344
|
return items.length ? { items } : undefined;
|
|
16242
16345
|
}
|
|
16346
|
+
function normalizeExpression(value, key) {
|
|
16347
|
+
if (typeof value === 'string') {
|
|
16348
|
+
const normalized = value.trim();
|
|
16349
|
+
return normalized ? { [key]: normalized } : undefined;
|
|
16350
|
+
}
|
|
16351
|
+
if (value && typeof value === 'object') {
|
|
16352
|
+
return { [key]: value };
|
|
16353
|
+
}
|
|
16354
|
+
return undefined;
|
|
16355
|
+
}
|
|
16243
16356
|
function normalizeNumericEntries(value) {
|
|
16244
16357
|
if (!Array.isArray(value)) {
|
|
16245
16358
|
return [];
|
|
@@ -16298,6 +16411,268 @@ function normalizeText$1(value) {
|
|
|
16298
16411
|
const trimmed = value.trim();
|
|
16299
16412
|
return trimmed.length ? trimmed : undefined;
|
|
16300
16413
|
}
|
|
16414
|
+
function renderRadialVisualizationHtml(visualization, options) {
|
|
16415
|
+
const value = toFiniteNumber(visualization.value) ?? 0;
|
|
16416
|
+
const total = visualization.total && visualization.total > 0 ? visualization.total : 100;
|
|
16417
|
+
const pct = Math.max(0, Math.min(100, (value / total) * 100));
|
|
16418
|
+
const tone = visualization.tone ?? 'info';
|
|
16419
|
+
const dashArray = `${pct.toFixed(1)}, 100`;
|
|
16420
|
+
const pctText = `${Math.round(pct)}%`;
|
|
16421
|
+
const aria = visualization.ariaLabel ?? `${visualization.fallbackText} (${pctText})`;
|
|
16422
|
+
const isTable = visualization.surface === 'table-cell';
|
|
16423
|
+
const svgText = isTable
|
|
16424
|
+
? ''
|
|
16425
|
+
: `<text x="18" y="21" class="pfx-micro-radial-svg__text">${escapeHtml$1(pctText)}</text>`;
|
|
16426
|
+
const externalText = isTable
|
|
16427
|
+
? `<span class="pfx-micro-radial-value">${escapeHtml$1(pctText)}</span>`
|
|
16428
|
+
: '';
|
|
16429
|
+
return `
|
|
16430
|
+
<span class="pfx-micro-viz pfx-micro-viz__radial" data-tone="${escapeHtml$1(tone)}" role="img" aria-label="${escapeHtml$1(aria)}">
|
|
16431
|
+
<svg class="pfx-micro-radial-svg" viewBox="0 0 36 36">
|
|
16432
|
+
<circle class="pfx-micro-radial-svg__track" cx="18" cy="18" r="15.9155" />
|
|
16433
|
+
<circle class="pfx-micro-radial-svg__bar" cx="18" cy="18" r="15.9155" stroke-dasharray="${dashArray}" transform="rotate(-90 18 18)" />
|
|
16434
|
+
${svgText}
|
|
16435
|
+
</svg>
|
|
16436
|
+
${externalText}
|
|
16437
|
+
</span>`;
|
|
16438
|
+
}
|
|
16439
|
+
function renderHarveyBallVisualizationHtml(visualization, options) {
|
|
16440
|
+
const value = toFiniteNumber(visualization.value) ?? 0;
|
|
16441
|
+
const total = visualization.total && visualization.total > 0 ? visualization.total : 100;
|
|
16442
|
+
const pct = Math.max(0, Math.min(100, (value / total) * 100));
|
|
16443
|
+
const tone = visualization.tone ?? 'info';
|
|
16444
|
+
const strokeLength = pct * 0.50265;
|
|
16445
|
+
const dashArray = `${strokeLength.toFixed(3)} 50.265`;
|
|
16446
|
+
const aria = visualization.ariaLabel ?? `${visualization.fallbackText} (${Math.round(pct)}%)`;
|
|
16447
|
+
return `
|
|
16448
|
+
<span class="pfx-micro-viz pfx-micro-viz__harvey" data-tone="${escapeHtml$1(tone)}" role="img" aria-label="${escapeHtml$1(aria)}">
|
|
16449
|
+
<svg class="pfx-micro-harvey-svg" viewBox="0 0 36 36">
|
|
16450
|
+
<circle class="pfx-micro-harvey-svg__track" cx="18" cy="18" r="16" />
|
|
16451
|
+
<circle class="pfx-micro-harvey-svg__bar" cx="18" cy="18" r="8" stroke-dasharray="${dashArray}" transform="rotate(-90 18 18)" />
|
|
16452
|
+
</svg>
|
|
16453
|
+
<span class="pfx-micro-harvey-fraction">
|
|
16454
|
+
<strong>${escapeHtml$1(formatMicroNumber(value, options.locale))}</strong>
|
|
16455
|
+
<span class="pfx-separator">/</span>
|
|
16456
|
+
<span class="pfx-total">${escapeHtml$1(formatMicroNumber(total, options.locale))}</span>
|
|
16457
|
+
</span>
|
|
16458
|
+
</span>`;
|
|
16459
|
+
}
|
|
16460
|
+
function getPointsCoordinates(points, width, height, padding) {
|
|
16461
|
+
if (points.length < 2)
|
|
16462
|
+
return [];
|
|
16463
|
+
const values = points.map(p => p.value);
|
|
16464
|
+
const minVal = Math.min(...values);
|
|
16465
|
+
const maxVal = Math.max(...values);
|
|
16466
|
+
const valRange = maxVal - minVal === 0 ? 1 : maxVal - minVal;
|
|
16467
|
+
return points.map((p, index) => {
|
|
16468
|
+
const x = padding + (index / (points.length - 1)) * (width - 2 * padding);
|
|
16469
|
+
const y = height - padding - ((p.value - minVal) / valRange) * (height - 2 * padding);
|
|
16470
|
+
return { x, y };
|
|
16471
|
+
});
|
|
16472
|
+
}
|
|
16473
|
+
function renderLineVisualizationHtml(visualization, options) {
|
|
16474
|
+
const points = visualization.points ?? [];
|
|
16475
|
+
const tone = visualization.tone ?? 'info';
|
|
16476
|
+
if (points.length < 2) {
|
|
16477
|
+
return renderFallbackVisualizationHtml(visualization, tone);
|
|
16478
|
+
}
|
|
16479
|
+
const width = 100;
|
|
16480
|
+
const height = 30;
|
|
16481
|
+
const padding = 4;
|
|
16482
|
+
const coords = getPointsCoordinates(points, width, height, padding);
|
|
16483
|
+
const pathD = coords.map((c, i) => `${i === 0 ? 'M' : 'L'} ${c.x.toFixed(1)} ${c.y.toFixed(1)}`).join(' ');
|
|
16484
|
+
// Highlight extreme/boundary values
|
|
16485
|
+
let minIdx = 0;
|
|
16486
|
+
let maxIdx = 0;
|
|
16487
|
+
for (let i = 1; i < points.length; i++) {
|
|
16488
|
+
if (points[i].value < points[minIdx].value)
|
|
16489
|
+
minIdx = i;
|
|
16490
|
+
if (points[i].value > points[maxIdx].value)
|
|
16491
|
+
maxIdx = i;
|
|
16492
|
+
}
|
|
16493
|
+
const markers = [
|
|
16494
|
+
{ x: coords[0].x, y: coords[0].y, tone: points[0].tone ?? tone },
|
|
16495
|
+
{ x: coords[coords.length - 1].x, y: coords[coords.length - 1].y, tone: points[points.length - 1].tone ?? tone }
|
|
16496
|
+
];
|
|
16497
|
+
if (minIdx !== 0 && minIdx !== coords.length - 1) {
|
|
16498
|
+
markers.push({ x: coords[minIdx].x, y: coords[minIdx].y, tone: points[minIdx].tone ?? 'danger' });
|
|
16499
|
+
}
|
|
16500
|
+
if (maxIdx !== 0 && maxIdx !== coords.length - 1) {
|
|
16501
|
+
markers.push({ x: coords[maxIdx].x, y: coords[maxIdx].y, tone: points[maxIdx].tone ?? 'success' });
|
|
16502
|
+
}
|
|
16503
|
+
const circlesHtml = markers.map(c => `<circle cx="${c.x.toFixed(1)}" cy="${c.y.toFixed(1)}" r="2.5" class="pfx-micro-trend__marker" data-tone="${escapeHtml$1(c.tone)}" />`).join('');
|
|
16504
|
+
const isTable = visualization.surface === 'table-cell';
|
|
16505
|
+
const firstPoint = points[0];
|
|
16506
|
+
const lastPoint = points[points.length - 1];
|
|
16507
|
+
const leftHtml = isTable ? '' : `
|
|
16508
|
+
<div class="pfx-micro-trend__label-col pfx-micro-trend__label-col--start">
|
|
16509
|
+
<span class="pfx-micro-trend__value">${escapeHtml$1(formatMicroNumber(firstPoint.value, options.locale))}</span>
|
|
16510
|
+
${firstPoint.label ? `<span class="pfx-micro-trend__label">${escapeHtml$1(firstPoint.label)}</span>` : ''}
|
|
16511
|
+
</div>`;
|
|
16512
|
+
const rightHtml = isTable ? '' : `
|
|
16513
|
+
<div class="pfx-micro-trend__label-col pfx-micro-trend__label-col--end">
|
|
16514
|
+
<span class="pfx-micro-trend__value">${escapeHtml$1(formatMicroNumber(lastPoint.value, options.locale))}</span>
|
|
16515
|
+
${lastPoint.label ? `<span class="pfx-micro-trend__label">${escapeHtml$1(lastPoint.label)}</span>` : ''}
|
|
16516
|
+
</div>`;
|
|
16517
|
+
return `
|
|
16518
|
+
<span class="pfx-micro-viz-container">
|
|
16519
|
+
${leftHtml}
|
|
16520
|
+
<span class="pfx-micro-viz pfx-micro-viz__line" data-tone="${escapeHtml$1(tone)}" role="img" aria-label="${escapeHtml$1(visualization.ariaLabel ?? visualization.fallbackText)}">
|
|
16521
|
+
<svg class="pfx-micro-line__svg" viewBox="0 0 100 30">
|
|
16522
|
+
<path class="pfx-micro-line__path" d="${pathD}" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
16523
|
+
${circlesHtml}
|
|
16524
|
+
</svg>
|
|
16525
|
+
</span>
|
|
16526
|
+
${rightHtml}
|
|
16527
|
+
</span>`;
|
|
16528
|
+
}
|
|
16529
|
+
function renderAreaVisualizationHtml(visualization, options) {
|
|
16530
|
+
const points = visualization.points ?? [];
|
|
16531
|
+
const tone = visualization.tone ?? 'info';
|
|
16532
|
+
if (points.length < 2) {
|
|
16533
|
+
return renderFallbackVisualizationHtml(visualization, tone);
|
|
16534
|
+
}
|
|
16535
|
+
const width = 100;
|
|
16536
|
+
const height = 30;
|
|
16537
|
+
const padding = 4;
|
|
16538
|
+
const coords = getPointsCoordinates(points, width, height, padding);
|
|
16539
|
+
const lineD = coords.map((c, i) => `${i === 0 ? 'M' : 'L'} ${c.x.toFixed(1)} ${c.y.toFixed(1)}`).join(' ');
|
|
16540
|
+
const firstX = coords[0].x.toFixed(1);
|
|
16541
|
+
const lastX = coords[coords.length - 1].x.toFixed(1);
|
|
16542
|
+
const areaD = `${lineD} L ${lastX} ${height} L ${firstX} ${height} Z`;
|
|
16543
|
+
// Highlight extreme/boundary values
|
|
16544
|
+
let minIdx = 0;
|
|
16545
|
+
let maxIdx = 0;
|
|
16546
|
+
for (let i = 1; i < points.length; i++) {
|
|
16547
|
+
if (points[i].value < points[minIdx].value)
|
|
16548
|
+
minIdx = i;
|
|
16549
|
+
if (points[i].value > points[maxIdx].value)
|
|
16550
|
+
maxIdx = i;
|
|
16551
|
+
}
|
|
16552
|
+
const markers = [
|
|
16553
|
+
{ x: coords[0].x, y: coords[0].y, tone: points[0].tone ?? tone },
|
|
16554
|
+
{ x: coords[coords.length - 1].x, y: coords[coords.length - 1].y, tone: points[points.length - 1].tone ?? tone }
|
|
16555
|
+
];
|
|
16556
|
+
if (minIdx !== 0 && minIdx !== coords.length - 1) {
|
|
16557
|
+
markers.push({ x: coords[minIdx].x, y: coords[minIdx].y, tone: points[minIdx].tone ?? 'danger' });
|
|
16558
|
+
}
|
|
16559
|
+
if (maxIdx !== 0 && maxIdx !== coords.length - 1) {
|
|
16560
|
+
markers.push({ x: coords[maxIdx].x, y: coords[maxIdx].y, tone: points[maxIdx].tone ?? 'success' });
|
|
16561
|
+
}
|
|
16562
|
+
const circlesHtml = markers.map(c => `<circle cx="${c.x.toFixed(1)}" cy="${c.y.toFixed(1)}" r="2.5" class="pfx-micro-trend__marker" data-tone="${escapeHtml$1(c.tone)}" />`).join('');
|
|
16563
|
+
const isTable = visualization.surface === 'table-cell';
|
|
16564
|
+
const firstPoint = points[0];
|
|
16565
|
+
const lastPoint = points[points.length - 1];
|
|
16566
|
+
const leftHtml = isTable ? '' : `
|
|
16567
|
+
<div class="pfx-micro-trend__label-col pfx-micro-trend__label-col--start">
|
|
16568
|
+
<span class="pfx-micro-trend__value">${escapeHtml$1(formatMicroNumber(firstPoint.value, options.locale))}</span>
|
|
16569
|
+
${firstPoint.label ? `<span class="pfx-micro-trend__label">${escapeHtml$1(firstPoint.label)}</span>` : ''}
|
|
16570
|
+
</div>`;
|
|
16571
|
+
const rightHtml = isTable ? '' : `
|
|
16572
|
+
<div class="pfx-micro-trend__label-col pfx-micro-trend__label-col--end">
|
|
16573
|
+
<span class="pfx-micro-trend__value">${escapeHtml$1(formatMicroNumber(lastPoint.value, options.locale))}</span>
|
|
16574
|
+
${lastPoint.label ? `<span class="pfx-micro-trend__label">${escapeHtml$1(lastPoint.label)}</span>` : ''}
|
|
16575
|
+
</div>`;
|
|
16576
|
+
return `
|
|
16577
|
+
<span class="pfx-micro-viz-container">
|
|
16578
|
+
${leftHtml}
|
|
16579
|
+
<span class="pfx-micro-viz pfx-micro-viz__area" data-tone="${escapeHtml$1(tone)}" role="img" aria-label="${escapeHtml$1(visualization.ariaLabel ?? visualization.fallbackText)}">
|
|
16580
|
+
<svg class="pfx-micro-area__svg" viewBox="0 0 100 30">
|
|
16581
|
+
<path class="pfx-micro-area__fill" d="${areaD}" fill="currentColor" fill-opacity="0.15" />
|
|
16582
|
+
<path class="pfx-micro-area__path" d="${lineD}" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
16583
|
+
${circlesHtml}
|
|
16584
|
+
</svg>
|
|
16585
|
+
</span>
|
|
16586
|
+
${rightHtml}
|
|
16587
|
+
</span>`;
|
|
16588
|
+
}
|
|
16589
|
+
function renderColumnVisualizationHtml(visualization, options) {
|
|
16590
|
+
const points = visualization.points ?? [];
|
|
16591
|
+
const tone = visualization.tone ?? 'info';
|
|
16592
|
+
if (points.length === 0) {
|
|
16593
|
+
return renderFallbackVisualizationHtml(visualization, tone);
|
|
16594
|
+
}
|
|
16595
|
+
const width = 100;
|
|
16596
|
+
const height = 30;
|
|
16597
|
+
const padding = 4;
|
|
16598
|
+
const values = points.map(p => p.value);
|
|
16599
|
+
const maxVal = Math.max(...values, 0);
|
|
16600
|
+
const minVal = Math.min(...values, 0);
|
|
16601
|
+
const valRange = maxVal - minVal === 0 ? 1 : maxVal - minVal;
|
|
16602
|
+
const colWidth = Math.max(2, (width - 2 * padding) / points.length - 2);
|
|
16603
|
+
const columnsHtml = points.map((p, i) => {
|
|
16604
|
+
const x = padding + i * ((width - 2 * padding) / points.length) + 1;
|
|
16605
|
+
const rectHeight = Math.max(2, ((p.value - minVal) / valRange) * (height - 2 * padding));
|
|
16606
|
+
const rectY = height - padding - rectHeight;
|
|
16607
|
+
const itemTone = p.tone ?? tone;
|
|
16608
|
+
return `<rect class="pfx-micro-column__bar" x="${x.toFixed(1)}" y="${rectY.toFixed(1)}" width="${colWidth.toFixed(1)}" height="${rectHeight.toFixed(1)}" fill="currentColor" data-tone="${escapeHtml$1(itemTone)}" />`;
|
|
16609
|
+
}).join('');
|
|
16610
|
+
const isTable = visualization.surface === 'table-cell';
|
|
16611
|
+
const firstPoint = points[0];
|
|
16612
|
+
const lastPoint = points[points.length - 1];
|
|
16613
|
+
const leftHtml = isTable ? '' : `
|
|
16614
|
+
<div class="pfx-micro-trend__label-col pfx-micro-trend__label-col--start">
|
|
16615
|
+
<span class="pfx-micro-trend__value">${escapeHtml$1(formatMicroNumber(firstPoint.value, options.locale))}</span>
|
|
16616
|
+
${firstPoint.label ? `<span class="pfx-micro-trend__label">${escapeHtml$1(firstPoint.label)}</span>` : ''}
|
|
16617
|
+
</div>`;
|
|
16618
|
+
const rightHtml = isTable ? '' : `
|
|
16619
|
+
<div class="pfx-micro-trend__label-col pfx-micro-trend__label-col--end">
|
|
16620
|
+
<span class="pfx-micro-trend__value">${escapeHtml$1(formatMicroNumber(lastPoint.value, options.locale))}</span>
|
|
16621
|
+
${lastPoint.label ? `<span class="pfx-micro-trend__label">${escapeHtml$1(lastPoint.label)}</span>` : ''}
|
|
16622
|
+
</div>`;
|
|
16623
|
+
return `
|
|
16624
|
+
<span class="pfx-micro-viz-container">
|
|
16625
|
+
${leftHtml}
|
|
16626
|
+
<span class="pfx-micro-viz pfx-micro-viz__column" data-tone="${escapeHtml$1(tone)}" role="img" aria-label="${escapeHtml$1(visualization.ariaLabel ?? visualization.fallbackText)}">
|
|
16627
|
+
<svg class="pfx-micro-column__svg" viewBox="0 0 100 30">
|
|
16628
|
+
${columnsHtml}
|
|
16629
|
+
</svg>
|
|
16630
|
+
</span>
|
|
16631
|
+
${rightHtml}
|
|
16632
|
+
</span>`;
|
|
16633
|
+
}
|
|
16634
|
+
function renderProcessFlowVisualizationHtml(visualization, options) {
|
|
16635
|
+
const items = visualization.items ?? [];
|
|
16636
|
+
if (items.length === 0) {
|
|
16637
|
+
return renderFallbackVisualizationHtml(visualization, visualization.tone ?? 'neutral');
|
|
16638
|
+
}
|
|
16639
|
+
const isTable = visualization.surface === 'table-cell';
|
|
16640
|
+
const stepLabels = items.map((item, index) => item.label ?? item.id ?? `${index + 1}`);
|
|
16641
|
+
const aria = visualization.ariaLabel ?? `${visualization.fallbackText}: ${stepLabels.join(' > ')}`;
|
|
16642
|
+
const stepsHtml = items.map((item, index) => {
|
|
16643
|
+
const itemTone = item.tone ?? 'neutral';
|
|
16644
|
+
const itemState = item.state ?? '';
|
|
16645
|
+
const isLast = index === items.length - 1;
|
|
16646
|
+
const itemLabel = stepLabels[index];
|
|
16647
|
+
const label = !isTable && item.label ? `<span class="pfx-micro-step__label">${escapeHtml$1(item.label)}</span>` : '';
|
|
16648
|
+
const connector = !isLast ? `<span class="pfx-micro-step__connector" data-tone="${escapeHtml$1(itemTone)}"></span>` : '';
|
|
16649
|
+
const stepCircle = `
|
|
16650
|
+
<span class="pfx-micro-step__node" data-tone="${escapeHtml$1(itemTone)}" aria-hidden="true">
|
|
16651
|
+
${item.icon ? `<span class="material-icons pfx-micro-step__icon" aria-hidden="true">${escapeHtml$1(item.icon)}</span>` : `${index + 1}`}
|
|
16652
|
+
</span>`;
|
|
16653
|
+
return `
|
|
16654
|
+
<div class="pfx-micro-step" data-state="${escapeHtml$1(itemState)}" data-tone="${escapeHtml$1(itemTone)}">
|
|
16655
|
+
<div class="pfx-micro-step__node-wrapper" title="${escapeHtml$1(itemLabel)}">
|
|
16656
|
+
${stepCircle}
|
|
16657
|
+
${label}
|
|
16658
|
+
</div>
|
|
16659
|
+
${connector}
|
|
16660
|
+
</div>`;
|
|
16661
|
+
}).join('');
|
|
16662
|
+
return `
|
|
16663
|
+
<span class="pfx-micro-viz pfx-micro-viz__process" role="img" aria-label="${escapeHtml$1(aria)}">
|
|
16664
|
+
${stepsHtml}
|
|
16665
|
+
</span>`;
|
|
16666
|
+
}
|
|
16667
|
+
function renderFallbackVisualizationHtml(visualization, tone) {
|
|
16668
|
+
return `
|
|
16669
|
+
<span
|
|
16670
|
+
class="pfx-micro-viz pfx-micro-viz__fallback"
|
|
16671
|
+
data-tone="${escapeHtml$1(tone)}"
|
|
16672
|
+
role="img"
|
|
16673
|
+
aria-label="${escapeHtml$1(visualization.ariaLabel ?? visualization.fallbackText)}"
|
|
16674
|
+
>${escapeHtml$1(visualization.fallbackText)}</span>`;
|
|
16675
|
+
}
|
|
16301
16676
|
|
|
16302
16677
|
const TONES = new Set([
|
|
16303
16678
|
'neutral',
|
|
@@ -20000,6 +20375,274 @@ const ValidationPattern = {
|
|
|
20000
20375
|
CUSTOM: '',
|
|
20001
20376
|
};
|
|
20002
20377
|
|
|
20378
|
+
function materializeFormLayoutFromMetadata(fields, options = {}) {
|
|
20379
|
+
const policy = normalizeLayoutPolicy(options.policy);
|
|
20380
|
+
const visibleFields = normalizeFields(fields, options.includeHidden === true);
|
|
20381
|
+
const groupedFields = groupFields(visibleFields);
|
|
20382
|
+
const sections = groupedFields.map(([groupKey, groupFields], sectionIndex) => createSection(groupKey, groupFields, sectionIndex, policy, options));
|
|
20383
|
+
return ensureIds({
|
|
20384
|
+
sections,
|
|
20385
|
+
fieldMetadata: fieldsForPolicy(visibleFields, policy),
|
|
20386
|
+
metadata: {
|
|
20387
|
+
version: '1.0.0',
|
|
20388
|
+
lastUpdated: new Date(),
|
|
20389
|
+
source: 'schema',
|
|
20390
|
+
generatedLayoutPreset: policy.preset,
|
|
20391
|
+
schemaLayoutPolicy: policy,
|
|
20392
|
+
...(policy.preset === 'compactPresentation'
|
|
20393
|
+
? { presentationDensity: 'compact' }
|
|
20394
|
+
: {}),
|
|
20395
|
+
},
|
|
20396
|
+
});
|
|
20397
|
+
}
|
|
20398
|
+
function normalizeLayoutPolicy(policy) {
|
|
20399
|
+
const intent = policy?.intent ?? (policy?.preset === 'groupedCommand' ? 'command' : 'detail');
|
|
20400
|
+
const preset = policy?.preset ?? (intent === 'command' ? 'groupedCommand' : 'compactPresentation');
|
|
20401
|
+
return {
|
|
20402
|
+
source: policy?.source ?? 'authored',
|
|
20403
|
+
preset,
|
|
20404
|
+
intent,
|
|
20405
|
+
lifecycle: policy?.lifecycle ?? 'initial',
|
|
20406
|
+
persistence: policy?.persistence ?? 'authorable',
|
|
20407
|
+
detachBehavior: policy?.detachBehavior ?? 'none',
|
|
20408
|
+
schemaOperation: policy?.schemaOperation,
|
|
20409
|
+
schemaType: policy?.schemaType,
|
|
20410
|
+
};
|
|
20411
|
+
}
|
|
20412
|
+
function normalizeFields(fields, includeHidden) {
|
|
20413
|
+
return (fields || [])
|
|
20414
|
+
.filter((field) => !!field?.name)
|
|
20415
|
+
.filter((field) => includeHidden || !isFormHidden(field))
|
|
20416
|
+
.sort(compareFields);
|
|
20417
|
+
}
|
|
20418
|
+
function isFormHidden(field) {
|
|
20419
|
+
const anyField = field;
|
|
20420
|
+
return anyField.formHidden === true || anyField.hidden === true || anyField.visible === false;
|
|
20421
|
+
}
|
|
20422
|
+
function groupFields(fields) {
|
|
20423
|
+
const groups = new Map();
|
|
20424
|
+
for (const field of fields) {
|
|
20425
|
+
const groupKey = normalizeGroupLabel(field.group);
|
|
20426
|
+
groups.set(groupKey, [...(groups.get(groupKey) || []), field]);
|
|
20427
|
+
}
|
|
20428
|
+
return Array.from(groups.entries()).sort(([, left], [, right]) => compareGroupFields(left, right));
|
|
20429
|
+
}
|
|
20430
|
+
function createSection(groupKey, groupFields, sectionIndex, policy, options) {
|
|
20431
|
+
const title = groupKey === 'default'
|
|
20432
|
+
? options.defaultSectionTitle || 'Informacoes'
|
|
20433
|
+
: groupKey;
|
|
20434
|
+
const sectionId = stableSectionId(groupKey);
|
|
20435
|
+
const presentationRole = resolvePresentationRole(groupKey, groupFields, options.presentationRoleMap);
|
|
20436
|
+
return {
|
|
20437
|
+
id: sectionId,
|
|
20438
|
+
title,
|
|
20439
|
+
...(policy.preset === 'compactPresentation'
|
|
20440
|
+
? {
|
|
20441
|
+
icon: resolvePresentationSectionIcon(presentationRole),
|
|
20442
|
+
sectionHeader: {
|
|
20443
|
+
mode: 'icon',
|
|
20444
|
+
size: 'sm',
|
|
20445
|
+
fallbackIcon: resolvePresentationSectionIcon(presentationRole),
|
|
20446
|
+
},
|
|
20447
|
+
className: [
|
|
20448
|
+
'pdx-presentation-section',
|
|
20449
|
+
`pdx-presentation-section--${presentationRole}`,
|
|
20450
|
+
].join(' '),
|
|
20451
|
+
presentationRole,
|
|
20452
|
+
appearance: 'plain',
|
|
20453
|
+
}
|
|
20454
|
+
: {}),
|
|
20455
|
+
rows: policy.preset === 'groupedCommand'
|
|
20456
|
+
? createCommandRows(groupFields, sectionId)
|
|
20457
|
+
: createPresentationRows(groupFields, sectionId),
|
|
20458
|
+
};
|
|
20459
|
+
}
|
|
20460
|
+
function createPresentationRows(fields, sectionId) {
|
|
20461
|
+
const rows = [];
|
|
20462
|
+
let pending = [];
|
|
20463
|
+
let pendingSpan = 0;
|
|
20464
|
+
let rowIndex = 0;
|
|
20465
|
+
const flush = () => {
|
|
20466
|
+
if (!pending.length)
|
|
20467
|
+
return;
|
|
20468
|
+
rows.push({ id: `${sectionId}-row-${++rowIndex}`, columns: pending });
|
|
20469
|
+
pending = [];
|
|
20470
|
+
pendingSpan = 0;
|
|
20471
|
+
};
|
|
20472
|
+
for (const field of fields) {
|
|
20473
|
+
const span = hasExplicitWidth(field)
|
|
20474
|
+
? resolveCommandSpan(field)
|
|
20475
|
+
: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 };
|
|
20476
|
+
const mdSpan = span.md ?? 12;
|
|
20477
|
+
const column = {
|
|
20478
|
+
id: `${sectionId}-col-${field.name}`,
|
|
20479
|
+
fields: [field.name],
|
|
20480
|
+
items: [{ id: `${sectionId}-item-${field.name}`, kind: 'field', fieldName: field.name }],
|
|
20481
|
+
span,
|
|
20482
|
+
};
|
|
20483
|
+
if (mdSpan >= 12) {
|
|
20484
|
+
flush();
|
|
20485
|
+
pending = [column];
|
|
20486
|
+
flush();
|
|
20487
|
+
continue;
|
|
20488
|
+
}
|
|
20489
|
+
if (pendingSpan + mdSpan > 12) {
|
|
20490
|
+
flush();
|
|
20491
|
+
}
|
|
20492
|
+
pending.push(column);
|
|
20493
|
+
pendingSpan += mdSpan;
|
|
20494
|
+
}
|
|
20495
|
+
flush();
|
|
20496
|
+
return rows;
|
|
20497
|
+
}
|
|
20498
|
+
function createCommandRows(fields, sectionId) {
|
|
20499
|
+
const rows = [];
|
|
20500
|
+
let pending = [];
|
|
20501
|
+
let pendingSpan = 0;
|
|
20502
|
+
let rowIndex = 0;
|
|
20503
|
+
const flush = () => {
|
|
20504
|
+
if (!pending.length)
|
|
20505
|
+
return;
|
|
20506
|
+
rows.push({ id: `${sectionId}-row-${++rowIndex}`, columns: pending });
|
|
20507
|
+
pending = [];
|
|
20508
|
+
pendingSpan = 0;
|
|
20509
|
+
};
|
|
20510
|
+
for (const field of fields) {
|
|
20511
|
+
const span = resolveCommandSpan(field);
|
|
20512
|
+
const mdSpan = span.md ?? 12;
|
|
20513
|
+
const column = {
|
|
20514
|
+
id: `${sectionId}-col-${field.name}`,
|
|
20515
|
+
fields: [field.name],
|
|
20516
|
+
items: [{ id: `${sectionId}-item-${field.name}`, kind: 'field', fieldName: field.name }],
|
|
20517
|
+
span,
|
|
20518
|
+
};
|
|
20519
|
+
if (mdSpan >= 12) {
|
|
20520
|
+
flush();
|
|
20521
|
+
pending = [column];
|
|
20522
|
+
flush();
|
|
20523
|
+
continue;
|
|
20524
|
+
}
|
|
20525
|
+
if (pendingSpan + mdSpan > 12) {
|
|
20526
|
+
flush();
|
|
20527
|
+
}
|
|
20528
|
+
pending.push(column);
|
|
20529
|
+
pendingSpan += mdSpan;
|
|
20530
|
+
}
|
|
20531
|
+
flush();
|
|
20532
|
+
return rows;
|
|
20533
|
+
}
|
|
20534
|
+
function resolveCommandSpan(field) {
|
|
20535
|
+
const rawWidth = field.width;
|
|
20536
|
+
const numericWidth = typeof rawWidth === 'number'
|
|
20537
|
+
? rawWidth
|
|
20538
|
+
: typeof rawWidth === 'string' && /^\d+$/.test(rawWidth.trim())
|
|
20539
|
+
? Number(rawWidth.trim())
|
|
20540
|
+
: null;
|
|
20541
|
+
if (numericWidth != null && Number.isFinite(numericWidth)) {
|
|
20542
|
+
const span = Math.max(1, Math.min(12, Math.round(numericWidth)));
|
|
20543
|
+
return {
|
|
20544
|
+
xs: 12,
|
|
20545
|
+
sm: span >= 6 ? 12 : 6,
|
|
20546
|
+
md: span,
|
|
20547
|
+
lg: span,
|
|
20548
|
+
xl: span,
|
|
20549
|
+
};
|
|
20550
|
+
}
|
|
20551
|
+
const width = String(rawWidth || '').toLowerCase();
|
|
20552
|
+
const controlType = String(field.controlType || field.type || '').toLowerCase();
|
|
20553
|
+
if (width === 'full' ||
|
|
20554
|
+
width === 'xl' ||
|
|
20555
|
+
controlType.includes('textarea') ||
|
|
20556
|
+
controlType.includes('rich') ||
|
|
20557
|
+
controlType.includes('file') ||
|
|
20558
|
+
controlType.includes('autocomplete') ||
|
|
20559
|
+
controlType.includes('lookup')) {
|
|
20560
|
+
return { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 };
|
|
20561
|
+
}
|
|
20562
|
+
if (width === 'lg')
|
|
20563
|
+
return { xs: 12, sm: 12, md: 8, lg: 8, xl: 8 };
|
|
20564
|
+
if (width === 'md')
|
|
20565
|
+
return { xs: 12, sm: 12, md: 6, lg: 6, xl: 6 };
|
|
20566
|
+
if (width === 'sm')
|
|
20567
|
+
return { xs: 12, sm: 6, md: 4, lg: 4, xl: 4 };
|
|
20568
|
+
if (width === 'xs' || controlType.includes('checkbox') || controlType.includes('toggle')) {
|
|
20569
|
+
return { xs: 12, sm: 6, md: 3, lg: 3, xl: 3 };
|
|
20570
|
+
}
|
|
20571
|
+
return { xs: 12, sm: 12, md: 6, lg: 6, xl: 6 };
|
|
20572
|
+
}
|
|
20573
|
+
function hasExplicitWidth(field) {
|
|
20574
|
+
const rawWidth = field.width;
|
|
20575
|
+
return rawWidth !== undefined && rawWidth !== null && String(rawWidth).trim() !== '';
|
|
20576
|
+
}
|
|
20577
|
+
function fieldsForPolicy(fields, policy) {
|
|
20578
|
+
if (policy.preset !== 'compactPresentation') {
|
|
20579
|
+
return fields;
|
|
20580
|
+
}
|
|
20581
|
+
return fields.map((field) => ({
|
|
20582
|
+
...field,
|
|
20583
|
+
readOnly: true,
|
|
20584
|
+
presentationMode: field.presentationMode ?? true,
|
|
20585
|
+
valuePresentation: {
|
|
20586
|
+
...(field.valuePresentation || {}),
|
|
20587
|
+
density: (field.valuePresentation || {}).density ?? 'compact',
|
|
20588
|
+
},
|
|
20589
|
+
}));
|
|
20590
|
+
}
|
|
20591
|
+
function compareGroupFields(left, right) {
|
|
20592
|
+
return compareFields(left[0], right[0]);
|
|
20593
|
+
}
|
|
20594
|
+
function compareFields(left, right) {
|
|
20595
|
+
const leftOrder = typeof left?.order === 'number' ? left.order : Number.MAX_SAFE_INTEGER;
|
|
20596
|
+
const rightOrder = typeof right?.order === 'number' ? right.order : Number.MAX_SAFE_INTEGER;
|
|
20597
|
+
if (leftOrder !== rightOrder)
|
|
20598
|
+
return leftOrder - rightOrder;
|
|
20599
|
+
return String(left?.name || '').localeCompare(String(right?.name || ''));
|
|
20600
|
+
}
|
|
20601
|
+
function normalizeGroupLabel(group) {
|
|
20602
|
+
const value = String(group || '').trim();
|
|
20603
|
+
return value || 'default';
|
|
20604
|
+
}
|
|
20605
|
+
function resolvePresentationRole(groupName, fields, map) {
|
|
20606
|
+
const direct = map?.[groupName];
|
|
20607
|
+
if (direct)
|
|
20608
|
+
return direct;
|
|
20609
|
+
const normalized = stableToken(groupName);
|
|
20610
|
+
if (normalized.includes('ident'))
|
|
20611
|
+
return 'identity';
|
|
20612
|
+
if (normalized.includes('marc') || normalized.includes('status'))
|
|
20613
|
+
return 'markers';
|
|
20614
|
+
if (normalized.includes('regra') || normalized.includes('rule'))
|
|
20615
|
+
return 'rules';
|
|
20616
|
+
if (fields.some((field) => String(field.controlType || '').toLowerCase().includes('checkbox'))) {
|
|
20617
|
+
return 'markers';
|
|
20618
|
+
}
|
|
20619
|
+
return 'default';
|
|
20620
|
+
}
|
|
20621
|
+
function resolvePresentationSectionIcon(role) {
|
|
20622
|
+
switch (role) {
|
|
20623
|
+
case 'identity':
|
|
20624
|
+
return 'badge';
|
|
20625
|
+
case 'rules':
|
|
20626
|
+
return 'rule';
|
|
20627
|
+
case 'markers':
|
|
20628
|
+
return 'fact_check';
|
|
20629
|
+
default:
|
|
20630
|
+
return 'info';
|
|
20631
|
+
}
|
|
20632
|
+
}
|
|
20633
|
+
function stableSectionId(groupName) {
|
|
20634
|
+
const token = stableToken(groupName) || 'default';
|
|
20635
|
+
return `section-${token}`;
|
|
20636
|
+
}
|
|
20637
|
+
function stableToken(value) {
|
|
20638
|
+
return String(value || '')
|
|
20639
|
+
.normalize('NFD')
|
|
20640
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
20641
|
+
.toLowerCase()
|
|
20642
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
20643
|
+
.replace(/^-+|-+$/g, '');
|
|
20644
|
+
}
|
|
20645
|
+
|
|
20003
20646
|
function resolveSpan(span) {
|
|
20004
20647
|
const xs = clamp(span?.xs ?? 12, 'xs');
|
|
20005
20648
|
const sm = clamp(span?.sm ?? xs, 'sm');
|
|
@@ -25561,7 +26204,19 @@ class DynamicWidgetLoaderDirective {
|
|
|
25561
26204
|
const defaultOrderMap = {
|
|
25562
26205
|
'praxis-table': ['tableId', 'componentInstanceId', 'configPersistenceStrategy', 'resourcePath', 'data', 'config'],
|
|
25563
26206
|
'praxis-crud': ['crudId', 'componentInstanceId', 'metadata'],
|
|
25564
|
-
'praxis-dynamic-form': [
|
|
26207
|
+
'praxis-dynamic-form': [
|
|
26208
|
+
'formId',
|
|
26209
|
+
'componentInstanceId',
|
|
26210
|
+
'resourcePath',
|
|
26211
|
+
'schemaUrl',
|
|
26212
|
+
'submitUrl',
|
|
26213
|
+
'submitMethod',
|
|
26214
|
+
'apiEndpointKey',
|
|
26215
|
+
'apiUrlEntry',
|
|
26216
|
+
'initialValue',
|
|
26217
|
+
'mode',
|
|
26218
|
+
'layoutPolicy',
|
|
26219
|
+
],
|
|
25565
26220
|
'praxis-tabs': ['tabsId', 'componentInstanceId', 'configPersistenceStrategy', 'config'],
|
|
25566
26221
|
'praxis-list': ['listId', 'componentInstanceId', 'enableCustomization', 'config'],
|
|
25567
26222
|
'praxis-expansion': ['expansionId', 'componentInstanceId', 'config'],
|
|
@@ -31865,9 +32520,16 @@ class DynamicWidgetPageComponent {
|
|
|
31865
32520
|
origin: 'dynamic-page.rich-content',
|
|
31866
32521
|
componentId: 'praxis-dynamic-page',
|
|
31867
32522
|
},
|
|
32523
|
+
}).then((result) => {
|
|
32524
|
+
if (!result?.success) {
|
|
32525
|
+
this.emitRichContentCustomAction(widgetKey, actionId, payload);
|
|
32526
|
+
}
|
|
31868
32527
|
});
|
|
31869
32528
|
return;
|
|
31870
32529
|
}
|
|
32530
|
+
this.emitRichContentCustomAction(widgetKey, actionId, payload);
|
|
32531
|
+
}
|
|
32532
|
+
emitRichContentCustomAction(widgetKey, actionId, payload) {
|
|
31871
32533
|
this.onWidgetEvent(widgetKey, {
|
|
31872
32534
|
ownerWidgetKey: widgetKey,
|
|
31873
32535
|
sourceComponentId: 'praxis-rich-content',
|
|
@@ -34831,6 +35493,8 @@ class PraxisSurfaceHostComponent {
|
|
|
34831
35493
|
*/
|
|
34832
35494
|
renderTitleInsideBody = false;
|
|
34833
35495
|
widgetEvent = new EventEmitter();
|
|
35496
|
+
rowClick = new EventEmitter();
|
|
35497
|
+
selectionChange = new EventEmitter();
|
|
34834
35498
|
beforeWidgetLoader;
|
|
34835
35499
|
mainWidgetLoader;
|
|
34836
35500
|
afterWidgetLoader;
|
|
@@ -34944,13 +35608,19 @@ class PraxisSurfaceHostComponent {
|
|
|
34944
35608
|
}
|
|
34945
35609
|
}
|
|
34946
35610
|
onSlotWidgetEvent(ownerWidgetKey, event) {
|
|
35611
|
+
if (event.output === 'rowClick') {
|
|
35612
|
+
this.rowClick.emit(event.payload);
|
|
35613
|
+
}
|
|
35614
|
+
if (event.output === 'selectionChange') {
|
|
35615
|
+
this.selectionChange.emit(event.payload);
|
|
35616
|
+
}
|
|
34947
35617
|
this.widgetEvent.emit({
|
|
34948
35618
|
...event,
|
|
34949
35619
|
ownerWidgetKey: event.ownerWidgetKey || ownerWidgetKey,
|
|
34950
35620
|
});
|
|
34951
35621
|
}
|
|
34952
35622
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisSurfaceHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34953
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PraxisSurfaceHostComponent, isStandalone: true, selector: "praxis-surface-host", inputs: { title: "title", subtitle: "subtitle", icon: "icon", beforeWidget: "beforeWidget", widget: "widget", afterWidget: "afterWidget", context: "context", strictValidation: "strictValidation", renderTitleInsideBody: "renderTitleInsideBody" }, outputs: { widgetEvent: "widgetEvent" }, viewQueries: [{ propertyName: "beforeWidgetLoader", first: true, predicate: ["beforeWidgetLoader"], descendants: true, read: DynamicWidgetLoaderDirective }, { propertyName: "mainWidgetLoader", first: true, predicate: ["mainWidgetLoader"], descendants: true, read: DynamicWidgetLoaderDirective }, { propertyName: "afterWidgetLoader", first: true, predicate: ["afterWidgetLoader"], descendants: true, read: DynamicWidgetLoaderDirective }], usesOnChanges: true, ngImport: i0, template: `
|
|
35623
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PraxisSurfaceHostComponent, isStandalone: true, selector: "praxis-surface-host", inputs: { title: "title", subtitle: "subtitle", icon: "icon", beforeWidget: "beforeWidget", widget: "widget", afterWidget: "afterWidget", context: "context", strictValidation: "strictValidation", renderTitleInsideBody: "renderTitleInsideBody" }, outputs: { widgetEvent: "widgetEvent", rowClick: "rowClick", selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "beforeWidgetLoader", first: true, predicate: ["beforeWidgetLoader"], descendants: true, read: DynamicWidgetLoaderDirective }, { propertyName: "mainWidgetLoader", first: true, predicate: ["mainWidgetLoader"], descendants: true, read: DynamicWidgetLoaderDirective }, { propertyName: "afterWidgetLoader", first: true, predicate: ["afterWidgetLoader"], descendants: true, read: DynamicWidgetLoaderDirective }], usesOnChanges: true, ngImport: i0, template: `
|
|
34954
35624
|
<div class="pdx-surface-host">
|
|
34955
35625
|
@if (subtitle || (title && renderTitleInsideBody)) {
|
|
34956
35626
|
<header class="pdx-surface-host__header">
|
|
@@ -34977,6 +35647,7 @@ class PraxisSurfaceHostComponent {
|
|
|
34977
35647
|
[ownerWidgetKey]="beforeWidgetKey"
|
|
34978
35648
|
[context]="context"
|
|
34979
35649
|
[strictValidation]="strictValidation"
|
|
35650
|
+
[autoWireOutputs]="true"
|
|
34980
35651
|
(widgetEvent)="onSlotWidgetEvent(beforeWidgetKey, $event)"
|
|
34981
35652
|
></ng-container>
|
|
34982
35653
|
</div>
|
|
@@ -34989,6 +35660,7 @@ class PraxisSurfaceHostComponent {
|
|
|
34989
35660
|
[ownerWidgetKey]="mainWidgetKey"
|
|
34990
35661
|
[context]="context"
|
|
34991
35662
|
[strictValidation]="strictValidation"
|
|
35663
|
+
[autoWireOutputs]="true"
|
|
34992
35664
|
(widgetEvent)="onSlotWidgetEvent(mainWidgetKey, $event)"
|
|
34993
35665
|
></ng-container>
|
|
34994
35666
|
}
|
|
@@ -35001,6 +35673,7 @@ class PraxisSurfaceHostComponent {
|
|
|
35001
35673
|
[ownerWidgetKey]="afterWidgetKey"
|
|
35002
35674
|
[context]="context"
|
|
35003
35675
|
[strictValidation]="strictValidation"
|
|
35676
|
+
[autoWireOutputs]="true"
|
|
35004
35677
|
(widgetEvent)="onSlotWidgetEvent(afterWidgetKey, $event)"
|
|
35005
35678
|
></ng-container>
|
|
35006
35679
|
</div>
|
|
@@ -35038,6 +35711,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
35038
35711
|
[ownerWidgetKey]="beforeWidgetKey"
|
|
35039
35712
|
[context]="context"
|
|
35040
35713
|
[strictValidation]="strictValidation"
|
|
35714
|
+
[autoWireOutputs]="true"
|
|
35041
35715
|
(widgetEvent)="onSlotWidgetEvent(beforeWidgetKey, $event)"
|
|
35042
35716
|
></ng-container>
|
|
35043
35717
|
</div>
|
|
@@ -35050,6 +35724,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
35050
35724
|
[ownerWidgetKey]="mainWidgetKey"
|
|
35051
35725
|
[context]="context"
|
|
35052
35726
|
[strictValidation]="strictValidation"
|
|
35727
|
+
[autoWireOutputs]="true"
|
|
35053
35728
|
(widgetEvent)="onSlotWidgetEvent(mainWidgetKey, $event)"
|
|
35054
35729
|
></ng-container>
|
|
35055
35730
|
}
|
|
@@ -35062,6 +35737,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
35062
35737
|
[ownerWidgetKey]="afterWidgetKey"
|
|
35063
35738
|
[context]="context"
|
|
35064
35739
|
[strictValidation]="strictValidation"
|
|
35740
|
+
[autoWireOutputs]="true"
|
|
35065
35741
|
(widgetEvent)="onSlotWidgetEvent(afterWidgetKey, $event)"
|
|
35066
35742
|
></ng-container>
|
|
35067
35743
|
</div>
|
|
@@ -35089,6 +35765,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
35089
35765
|
type: Input
|
|
35090
35766
|
}], widgetEvent: [{
|
|
35091
35767
|
type: Output
|
|
35768
|
+
}], rowClick: [{
|
|
35769
|
+
type: Output
|
|
35770
|
+
}], selectionChange: [{
|
|
35771
|
+
type: Output
|
|
35092
35772
|
}], beforeWidgetLoader: [{
|
|
35093
35773
|
type: ViewChild,
|
|
35094
35774
|
args: ['beforeWidgetLoader', { read: DynamicWidgetLoaderDirective }]
|
|
@@ -36558,4 +37238,4 @@ function provideHookWhitelist(allowed) {
|
|
|
36558
37238
|
* Generated bundle index. Do not edit.
|
|
36559
37239
|
*/
|
|
36560
37240
|
|
|
36561
|
-
export { API_CONFIG_STORAGE_OPTIONS, API_URL, ASYNC_CONFIG_STORAGE, AllowedFileTypes, AnalyticsPresentationResolver, AnalyticsSchemaContractService, AnalyticsStatsRequestBuilderService, ApiConfigStorage, ApiEndpoint, BUILTIN_PAGE_LAYOUT_PRESETS, BUILTIN_PAGE_THEME_PRESETS, BUILTIN_SHELL_PRESETS, CONFIG_STORAGE, CONNECTION_STORAGE, ComponentKeyService, ComponentMetadataRegistry, CompositionRuntimeFacade, ConsoleLoggerSink, CrudOperationResolutionService, DEFAULT_FIELD_SELECTOR_CONTROL_TYPE_MAP, DEFAULT_JSON_LOGIC_OPERATORS, DEFAULT_TABLE_CONFIG, DOMAIN_CATALOG_COMPONENT_CONTEXT_PACK, DOMAIN_CATALOG_CONTEXT_HINT_SCHEMA_VERSION, DYNAMIC_PAGE_AI_CAPABILITIES, DYNAMIC_PAGE_COMPONENT_CONTEXT_PACK, DYNAMIC_PAGE_CONFIG_EDITOR, DYNAMIC_PAGE_SHELL_EDITOR, DefaultLoadingRenderer, DeferredAsyncConfigStorage, DomainCatalogService, DomainKnowledgeService, DomainRuleService, DynamicFormService, DynamicWidgetLoaderDirective, DynamicWidgetPageComponent, EDITORIAL_ALLOWED_CONTENT_FORMATS, EDITORIAL_COMPLIANCE_PRESETS, EDITORIAL_EXTERNAL_LINK_REL, EDITORIAL_FORM_TEMPLATE_CATALOG, EDITORIAL_HTML_ENABLED, EDITORIAL_MARKDOWN_IMAGES_ENABLED, EDITORIAL_SOLUTION_CATALOG, EDITORIAL_SOLUTION_PRESETS, EDITORIAL_THEME_PRESETS, EDITORIAL_WIDGET_CONVENTION_INPUTS, EDITORIAL_WIDGET_TAG, EMPLOYEE_ONBOARDING_EDITORIAL_SOLUTION, EMPLOYEE_ONBOARDING_EDITORIAL_TEMPLATE, EMPLOYEE_ONBOARDING_GUIDED_EDITORIAL_SOLUTION, EMPLOYEE_ONBOARDING_GUIDED_EDITORIAL_TEMPLATE, EVENT_REGISTRATION_EDITORIAL_SOLUTION, EVENT_REGISTRATION_EDITORIAL_TEMPLATE, EmptyStateCardComponent, ErrorMessageService, FIELD_METADATA_CAPABILITIES, FIELD_SELECTOR_REGISTRY_BASE, FIELD_SELECTOR_REGISTRY_DISABLE_DEFAULTS, FIELD_SELECTOR_REGISTRY_OVERRIDES, FORM_HOOKS, FORM_HOOKS_PRESETS, FORM_HOOKS_WHITELIST, FORM_HOOK_RESOLVERS, FieldControlType, FieldDataType, FieldSelectorRegistry, FormHooksRegistry, GLOBAL_ACTION_CATALOG, GLOBAL_ACTION_HANDLERS, GLOBAL_ACTION_UI_SCHEMAS, GLOBAL_ANALYTICS_SERVICE, GLOBAL_API_CLIENT, GLOBAL_CONFIG, GLOBAL_DIALOG_SERVICE, GLOBAL_ROUTE_GUARD_RESOLVER, GLOBAL_SURFACE_SERVICE, GLOBAL_TOAST_SERVICE, GenericCrudService, GlobalActionService, GlobalConfigService, INLINE_FILTER_ALIAS_TOKENS, INLINE_FILTER_CONTROL_TYPES, INLINE_FILTER_CONTROL_TYPE_SET, INLINE_FILTER_CONTROL_TYPE_VALUES, INLINE_FILTER_TOKEN_TO_BASE_CONTROL_TYPE, INLINE_FILTER_TOKEN_TO_CONTROL_TYPE, IconPickerService, IconPosition, IconSize, LOGGER_LEVEL_BY_ENV, LOGGER_LEVEL_PRIORITY, LoadingOrchestrator, LocalConnectionStorage, LocalStorageAsyncAdapter, LocalStorageCacheAdapter, LocalStorageConfigService, LoggerService, LoggerThrottleTracker, LoggerWarnOnceTracker, MemoryCacheAdapter, NestedPortCatalogService, NestedWidgetConfigAccessor, NumericFormat, OVERLAY_DECIDER_DEBUG, OVERLAY_DECISION_MATRIX, ObservabilityDashboardService, OverlayDeciderService, PRAXIS_COLLECTION_EXPORT_HTTP_OPTIONS, PRAXIS_COLLECTION_EXPORT_PROVIDER, PRAXIS_CORPORATE_SENSITIVE_KEYS, PRAXIS_DEFAULT_EXPORT_SECURITY_POLICY, PRAXIS_DEFAULT_OBSERVABILITY_ALERT_RULES, PRAXIS_DYNAMIC_PAGE_COMPONENT_METADATA, PRAXIS_EXPORT_FORMULA_PREFIXES, PRAXIS_EXPORT_SECURITY_POLICY, PRAXIS_FOOTER_LINKS_METADATA, PRAXIS_GLOBAL_ACTION_CATALOG, PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_OPTIONS, PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_READY, PRAXIS_GLOBAL_CONFIG_TENANT_RESOLVER, PRAXIS_HERO_BANNER_METADATA, PRAXIS_I18N_CONFIG, PRAXIS_I18N_TRANSLATOR, PRAXIS_JSON_LOGIC_OPERATORS, PRAXIS_LAYER_SCALE_DEFAULTS, PRAXIS_LAYER_SCALE_VARS, PRAXIS_LEGAL_NOTICE_METADATA, PRAXIS_LOADING_CTX, PRAXIS_LOADING_RENDERER, PRAXIS_LOGGER_CONFIG, PRAXIS_LOGGER_SINKS, PRAXIS_OBSERVABILITY_DASHBOARD_OPTIONS, PRAXIS_QUERY_FILTER_EXPRESSION_SCHEMA_VERSION, PRAXIS_RICH_TEXT_BLOCK_METADATA, PRAXIS_TELEMETRY_TRANSPORT, PRAXIS_USER_CONTEXT_SUMMARY_METADATA, PRIVACY_CONSENT_EDITORIAL_SOLUTION, PRIVACY_CONSENT_EDITORIAL_TEMPLATE, PraxisCollectionExportService, PraxisCore, PraxisFooterLinksComponent, PraxisGlobalErrorHandler, PraxisHeroBannerComponent, PraxisHttpCollectionExportProvider, PraxisI18nService, PraxisIconDirective, PraxisIconPickerComponent, PraxisJsonLogicError, PraxisJsonLogicService, PraxisLayerScaleStyleService, PraxisLegalNoticeComponent, PraxisLoadingInterceptor, PraxisRichTextBlockComponent, PraxisRuntimeComponentObservationRegistryService, PraxisSurfaceHostComponent, PraxisUserContextSummaryComponent, RESOURCE_DISCOVERY_I18N_CONFIG, RESOURCE_DISCOVERY_I18N_NAMESPACE, RULE_PROPERTY_SCHEMA, RemoteConfigStorage, ResourceActionOpenAdapterService, ResourceDiscoveryService, ResourceQuickConnectComponent, ResourceSurfaceOpenAdapterService, SCHEMA_VIEWER_CONTEXT, SETTINGS_PANEL_BRIDGE, SETTINGS_PANEL_DATA, STEPPER_CONFIG_EDITOR, SURFACE_DRAWER_BRIDGE, SURFACE_OPEN_I18N_CONFIG, SURFACE_OPEN_I18N_NAMESPACE, SURFACE_OPEN_PRESETS, SchemaMetadataClient, SchemaNormalizerService, SchemaViewerComponent, SurfaceBindingRuntimeService, SurfaceOpenActionEditorComponent, SurfaceOpenMaterializerService, TABLE_CONFIG_EDITOR, TableConfigService, TelemetryLoggerSink, TelemetryService, ValidationPattern, WidgetPageStateRuntimeService, WidgetShellComponent, applyLocalCustomizations$2 as applyLocalCustomizations, applyLocalCustomizations$1 as applyLocalFormCustomizations, assertPraxisCollectionExportArtifact, assertPraxisRuntimeComponentObservationSerializable, buildAngularValidators, buildApiUrl, buildBaseColumnFromDef, buildBaseFormField, buildFormConfigFromEditorialTemplate, buildHeaders, buildPageKey, buildPraxisEffectDistinctKey, buildPraxisLayerScaleCss, buildSchemaId, buildSchemaIdStorageKeySegment, buildValidatorsFromValidatorOptions, cancelIfCpfInvalidHook, clampRange, classifyEntityLookupResult, clonePraxisRuntimeComponentObservation, cloneTableConfig, cnpjAlphaValidator, collapseWhitespace, composeHeadersWithVersion, conditionalAsyncValidator, convertFormLayoutToConfig, createCorporateLoggerConfig, createCorporateObservabilityOptions, createCpfCnpjValidator, createDefaultFormConfig, createDefaultTableConfig, createEmptyFormConfig, createEmptyRichContentDocument, createFieldLayoutItem, createPersistedPage, customAsyncValidatorFn, customValidatorFn, debounceAsyncValidator, deepMerge, domainKnowledgeTimelineToRichContentDocument, domainRuleTimelineToRichContentDocument, ensureIds, ensureNoConflictsHookFactory, ensurePageIds, escapePraxisExportCell, extractNormalizedError, fetchWithETag, fileTypeValidator, fillUndefined, generateId, getDefaultFormHints, getEditorialCompliancePresetById, getEditorialFormTemplateById, getEditorialFormTemplateCatalog, getEditorialSolutionById, getEditorialSolutionCatalog, getEditorialSolutionPresetById, getEditorialThemePresetById, getEssentialConfig, getFieldMetadataCapabilities, getFormColumnFieldNames, getFormLayoutFieldNames, getGlobalActionCatalog, getGlobalActionPayloadActualType, getGlobalActionPayloadTypeIssue, getGlobalActionUiSchema, getMissingGlobalActionPayloadKeys, getReferencedFieldMetadata, getRequiredGlobalActionPayloadKeys, getTextTransformer, hasMeaningfulGlobalActionPayloadValue, hasPraxisCollectionExportArtifact, interpolatePraxisTranslation, isAllowedEditorialContentFormat, isAllowedEditorialHref, isCssTextTransform, isEditorialComponentMeta, isEntityLookupMultiplePayloadMode, isEntityLookupPayloadMode, isEntityLookupPayloadModeCompatible, isEntityLookupResultSelectable, isEntityLookupSinglePayloadMode, isFormLayoutItem, isGlobalActionRef, isInlineFilterControlType, isLookupDialogSize, isLookupFilterFieldType, isLookupFilterOperator, isPraxisPresentationVisualizationTableSafe, isPraxisRuntimeGlobalActionEffect, isRangeValidForFilter, isRequiredGlobalActionParamPayloadMissing, isRequiredGlobalActionPayloadMissing, isTableConfigV2, isValidFormConfig, isValidTableConfig, legacyCnpjValidator, legacyCpfValidator, logOnErrorHook, mapFieldDefinitionToMetadata, mapFieldDefinitionsToMetadata, matchFieldValidator, maxFileSizeValidator, mergeFieldMetadata, mergePraxisI18nConfigs, mergeTableConfigs, migrateFormLayoutRule, migrateLegacyCompositionLink, migrateLegacyCompositionLinks, minWordsValidator, normalizeControlTypeKey, normalizeControlTypeToken, normalizeEditorialLink, normalizeEnd, normalizeFieldConstraints, normalizeFieldPresentation, normalizeFormConfig, normalizeFormLayoutItems, normalizeFormMetadata, normalizeGlobalActionRef$1 as normalizeGlobalActionRef, normalizeLookupFilterRequest, normalizePath, normalizePraxisDataQueryContext, normalizePraxisEffectPolicy, normalizePraxisPresentationVisualization, normalizePraxisQueryFilterExpression, normalizePraxisQueryFilterNode, normalizeResourceAvailabilityReasonCode, normalizeStart, normalizeUnknownError, normalizeWidgetEventPath, notifySuccessHook, parseJsonResponseOrEmpty, praxisLoadingInterceptorFn, prefillFromContextHook, provideDefaultFormHooks, provideFieldSelectorRegistryBase, provideFieldSelectorRegistryOverride, provideFieldSelectorRegistryRuntime, provideFormHookPresets, provideFormHooks, provideGlobalActionCatalog, provideGlobalActionHandler, provideGlobalConfig, provideGlobalConfigReady, provideGlobalConfigSeed, provideGlobalConfigTenant, provideHookResolvers, provideHookWhitelist, provideOverlayDecisionMatrix, providePraxisAnalyticsGlobalActions, providePraxisCollectionExportProvider, providePraxisDynamicPageMetadata, providePraxisFooterLinksMetadata, providePraxisGlobalActionCatalog, providePraxisGlobalActions, providePraxisGlobalConfigBootstrap, providePraxisHeroBannerMetadata, providePraxisHttpCollectionExportProvider, providePraxisHttpLoading, providePraxisI18n, providePraxisI18nConfig, providePraxisI18nTranslator, providePraxisIconDefaults, providePraxisJsonLogicOperator, providePraxisJsonLogicOperatorOverride, providePraxisLegalNoticeMetadata, providePraxisLoadingDefaults, providePraxisLogging, providePraxisRichTextBlockMetadata, providePraxisToastGlobalActions, providePraxisUserContextSummaryMetadata, provideRemoteGlobalConfig, readPraxisExportValue, reconcileFilterConfig, reconcileFormConfig, reconcileTableConfig, registerPraxisRuntimeComponentObservation, removeDiacritics, reportTelemetryHookFactory, requiredCheckedValidator, requiredPresenceValidator, resolveBuiltinPresets, resolveColumnTypeFromFieldDefinition, resolveControlTypeAlias, resolveDefaultValuePresentationFormat, resolveEntityLookupPayloadMode, resolveFieldPresentation, resolveHidden, resolveInlineFilterControlType, resolveInlineFilterControlTypeToBaseControlType, resolveLoggerConfig, resolveObservabilityOptions, resolveOffset, resolveOrder, resolvePraxisCollectionExportItems, resolvePraxisExportFields, resolvePraxisExportScope, resolvePraxisFilterCriteria, resolveResourceAvailabilityReasonKey, resolveSpan, resolveTextMaskFormat, resolveTextMaskFormatFromFieldDefinition, resolveValuePresentation, resolveValuePresentationLocale, serializeEntityLookupValueForPayload, serializeOptionSourceFilterRequest, serializePraxisCollectionToCsv, serializePraxisCollectionToJson, slugify, stripMasksHook, supportsImplicitValuePresentation, syncWithServerMetadata, toCamel, toCapitalize, toKebab, toPascal, toSentenceCase, toSnake, toTitleCase, translateResourceAvailabilityReason, translateResourceDiscoveryText, translateUnavailableWorkflowMessage, trim, uniqueAsyncValidator, urlValidator, validateGlobalActionRef, validateGlobalActionRefs, withMessage, withPraxisHttpLoading };
|
|
37241
|
+
export { API_CONFIG_STORAGE_OPTIONS, API_URL, ASYNC_CONFIG_STORAGE, AllowedFileTypes, AnalyticsPresentationResolver, AnalyticsSchemaContractService, AnalyticsStatsRequestBuilderService, ApiConfigStorage, ApiEndpoint, BUILTIN_PAGE_LAYOUT_PRESETS, BUILTIN_PAGE_THEME_PRESETS, BUILTIN_SHELL_PRESETS, CONFIG_STORAGE, CONNECTION_STORAGE, ComponentKeyService, ComponentMetadataRegistry, CompositionRuntimeFacade, ConsoleLoggerSink, CrudOperationResolutionService, DEFAULT_FIELD_SELECTOR_CONTROL_TYPE_MAP, DEFAULT_JSON_LOGIC_OPERATORS, DEFAULT_TABLE_CONFIG, DOMAIN_CATALOG_COMPONENT_CONTEXT_PACK, DOMAIN_CATALOG_CONTEXT_HINT_SCHEMA_VERSION, DYNAMIC_PAGE_AI_CAPABILITIES, DYNAMIC_PAGE_COMPONENT_CONTEXT_PACK, DYNAMIC_PAGE_CONFIG_EDITOR, DYNAMIC_PAGE_SHELL_EDITOR, DefaultLoadingRenderer, DeferredAsyncConfigStorage, DomainCatalogService, DomainKnowledgeService, DomainRuleService, DynamicFormService, DynamicWidgetLoaderDirective, DynamicWidgetPageComponent, EDITORIAL_ALLOWED_CONTENT_FORMATS, EDITORIAL_COMPLIANCE_PRESETS, EDITORIAL_EXTERNAL_LINK_REL, EDITORIAL_FORM_TEMPLATE_CATALOG, EDITORIAL_HTML_ENABLED, EDITORIAL_MARKDOWN_IMAGES_ENABLED, EDITORIAL_SOLUTION_CATALOG, EDITORIAL_SOLUTION_PRESETS, EDITORIAL_THEME_PRESETS, EDITORIAL_WIDGET_CONVENTION_INPUTS, EDITORIAL_WIDGET_TAG, EMPLOYEE_ONBOARDING_EDITORIAL_SOLUTION, EMPLOYEE_ONBOARDING_EDITORIAL_TEMPLATE, EMPLOYEE_ONBOARDING_GUIDED_EDITORIAL_SOLUTION, EMPLOYEE_ONBOARDING_GUIDED_EDITORIAL_TEMPLATE, EVENT_REGISTRATION_EDITORIAL_SOLUTION, EVENT_REGISTRATION_EDITORIAL_TEMPLATE, EmptyStateCardComponent, ErrorMessageService, FIELD_METADATA_CAPABILITIES, FIELD_SELECTOR_REGISTRY_BASE, FIELD_SELECTOR_REGISTRY_DISABLE_DEFAULTS, FIELD_SELECTOR_REGISTRY_OVERRIDES, FORM_HOOKS, FORM_HOOKS_PRESETS, FORM_HOOKS_WHITELIST, FORM_HOOK_RESOLVERS, FieldControlType, FieldDataType, FieldSelectorRegistry, FormHooksRegistry, GLOBAL_ACTION_CATALOG, GLOBAL_ACTION_HANDLERS, GLOBAL_ACTION_UI_SCHEMAS, GLOBAL_ANALYTICS_SERVICE, GLOBAL_API_CLIENT, GLOBAL_CONFIG, GLOBAL_DIALOG_SERVICE, GLOBAL_ROUTE_GUARD_RESOLVER, GLOBAL_SURFACE_SERVICE, GLOBAL_TOAST_SERVICE, GenericCrudService, GlobalActionService, GlobalConfigService, INLINE_FILTER_ALIAS_TOKENS, INLINE_FILTER_CONTROL_TYPES, INLINE_FILTER_CONTROL_TYPE_SET, INLINE_FILTER_CONTROL_TYPE_VALUES, INLINE_FILTER_TOKEN_TO_BASE_CONTROL_TYPE, INLINE_FILTER_TOKEN_TO_CONTROL_TYPE, IconPickerService, IconPosition, IconSize, LOGGER_LEVEL_BY_ENV, LOGGER_LEVEL_PRIORITY, LoadingOrchestrator, LocalConnectionStorage, LocalStorageAsyncAdapter, LocalStorageCacheAdapter, LocalStorageConfigService, LoggerService, LoggerThrottleTracker, LoggerWarnOnceTracker, MemoryCacheAdapter, NestedPortCatalogService, NestedWidgetConfigAccessor, NumericFormat, OVERLAY_DECIDER_DEBUG, OVERLAY_DECISION_MATRIX, ObservabilityDashboardService, OverlayDeciderService, PRAXIS_COLLECTION_EXPORT_HTTP_OPTIONS, PRAXIS_COLLECTION_EXPORT_PROVIDER, PRAXIS_CORPORATE_SENSITIVE_KEYS, PRAXIS_DEFAULT_EXPORT_SECURITY_POLICY, PRAXIS_DEFAULT_OBSERVABILITY_ALERT_RULES, PRAXIS_DYNAMIC_PAGE_COMPONENT_METADATA, PRAXIS_EXPORT_FORMULA_PREFIXES, PRAXIS_EXPORT_SECURITY_POLICY, PRAXIS_FOOTER_LINKS_METADATA, PRAXIS_GLOBAL_ACTION_CATALOG, PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_OPTIONS, PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_READY, PRAXIS_GLOBAL_CONFIG_TENANT_RESOLVER, PRAXIS_HERO_BANNER_METADATA, PRAXIS_I18N_CONFIG, PRAXIS_I18N_TRANSLATOR, PRAXIS_JSON_LOGIC_OPERATORS, PRAXIS_LAYER_SCALE_DEFAULTS, PRAXIS_LAYER_SCALE_VARS, PRAXIS_LEGAL_NOTICE_METADATA, PRAXIS_LOADING_CTX, PRAXIS_LOADING_RENDERER, PRAXIS_LOGGER_CONFIG, PRAXIS_LOGGER_SINKS, PRAXIS_OBSERVABILITY_DASHBOARD_OPTIONS, PRAXIS_QUERY_FILTER_EXPRESSION_SCHEMA_VERSION, PRAXIS_RICH_TEXT_BLOCK_METADATA, PRAXIS_TELEMETRY_TRANSPORT, PRAXIS_USER_CONTEXT_SUMMARY_METADATA, PRIVACY_CONSENT_EDITORIAL_SOLUTION, PRIVACY_CONSENT_EDITORIAL_TEMPLATE, PraxisCollectionExportService, PraxisCore, PraxisFooterLinksComponent, PraxisGlobalErrorHandler, PraxisHeroBannerComponent, PraxisHttpCollectionExportProvider, PraxisI18nService, PraxisIconDirective, PraxisIconPickerComponent, PraxisJsonLogicError, PraxisJsonLogicService, PraxisLayerScaleStyleService, PraxisLegalNoticeComponent, PraxisLoadingInterceptor, PraxisRichTextBlockComponent, PraxisRuntimeComponentObservationRegistryService, PraxisSurfaceHostComponent, PraxisUserContextSummaryComponent, RESOURCE_DISCOVERY_I18N_CONFIG, RESOURCE_DISCOVERY_I18N_NAMESPACE, RULE_PROPERTY_SCHEMA, RemoteConfigStorage, ResourceActionOpenAdapterService, ResourceDiscoveryService, ResourceQuickConnectComponent, ResourceSurfaceOpenAdapterService, SCHEMA_VIEWER_CONTEXT, SETTINGS_PANEL_BRIDGE, SETTINGS_PANEL_DATA, STEPPER_CONFIG_EDITOR, SURFACE_DRAWER_BRIDGE, SURFACE_OPEN_I18N_CONFIG, SURFACE_OPEN_I18N_NAMESPACE, SURFACE_OPEN_PRESETS, SchemaMetadataClient, SchemaNormalizerService, SchemaViewerComponent, SurfaceBindingRuntimeService, SurfaceOpenActionEditorComponent, SurfaceOpenMaterializerService, TABLE_CONFIG_EDITOR, TableConfigService, TelemetryLoggerSink, TelemetryService, ValidationPattern, WidgetPageStateRuntimeService, WidgetShellComponent, applyLocalCustomizations$2 as applyLocalCustomizations, applyLocalCustomizations$1 as applyLocalFormCustomizations, assertPraxisCollectionExportArtifact, assertPraxisRuntimeComponentObservationSerializable, buildAngularValidators, buildApiUrl, buildBaseColumnFromDef, buildBaseFormField, buildFormConfigFromEditorialTemplate, buildHeaders, buildPageKey, buildPraxisEffectDistinctKey, buildPraxisLayerScaleCss, buildSchemaId, buildSchemaIdStorageKeySegment, buildValidatorsFromValidatorOptions, cancelIfCpfInvalidHook, clampRange, classifyEntityLookupResult, clonePraxisRuntimeComponentObservation, cloneTableConfig, cnpjAlphaValidator, collapseWhitespace, composeHeadersWithVersion, conditionalAsyncValidator, convertFormLayoutToConfig, createCorporateLoggerConfig, createCorporateObservabilityOptions, createCpfCnpjValidator, createDefaultFormConfig, createDefaultTableConfig, createEmptyFormConfig, createEmptyRichContentDocument, createFieldLayoutItem, createPersistedPage, customAsyncValidatorFn, customValidatorFn, debounceAsyncValidator, deepMerge, domainKnowledgeTimelineToRichContentDocument, domainRuleTimelineToRichContentDocument, ensureIds, ensureNoConflictsHookFactory, ensurePageIds, escapePraxisExportCell, extractNormalizedError, fetchWithETag, fileTypeValidator, fillUndefined, generateId, getDefaultFormHints, getEditorialCompliancePresetById, getEditorialFormTemplateById, getEditorialFormTemplateCatalog, getEditorialSolutionById, getEditorialSolutionCatalog, getEditorialSolutionPresetById, getEditorialThemePresetById, getEssentialConfig, getFieldMetadataCapabilities, getFormColumnFieldNames, getFormLayoutFieldNames, getGlobalActionCatalog, getGlobalActionPayloadActualType, getGlobalActionPayloadTypeIssue, getGlobalActionUiSchema, getMissingGlobalActionPayloadKeys, getReferencedFieldMetadata, getRequiredGlobalActionPayloadKeys, getTextTransformer, hasMeaningfulGlobalActionPayloadValue, hasPraxisCollectionExportArtifact, interpolatePraxisTranslation, isAllowedEditorialContentFormat, isAllowedEditorialHref, isCssTextTransform, isEditorialComponentMeta, isEntityLookupMultiplePayloadMode, isEntityLookupPayloadMode, isEntityLookupPayloadModeCompatible, isEntityLookupResultSelectable, isEntityLookupSinglePayloadMode, isFormLayoutItem, isGlobalActionRef, isInlineFilterControlType, isLookupDialogSize, isLookupFilterFieldType, isLookupFilterOperator, isPraxisPresentationVisualizationTableSafe, isPraxisRuntimeGlobalActionEffect, isRangeValidForFilter, isRequiredGlobalActionParamPayloadMissing, isRequiredGlobalActionPayloadMissing, isTableConfigV2, isValidFormConfig, isValidTableConfig, legacyCnpjValidator, legacyCpfValidator, logOnErrorHook, mapFieldDefinitionToMetadata, mapFieldDefinitionsToMetadata, matchFieldValidator, materializeFormLayoutFromMetadata, maxFileSizeValidator, mergeFieldMetadata, mergePraxisI18nConfigs, mergeTableConfigs, migrateFormLayoutRule, migrateLegacyCompositionLink, migrateLegacyCompositionLinks, minWordsValidator, normalizeControlTypeKey, normalizeControlTypeToken, normalizeEditorialLink, normalizeEnd, normalizeFieldConstraints, normalizeFieldPresentation, normalizeFormConfig, normalizeFormLayoutItems, normalizeFormMetadata, normalizeGlobalActionRef$1 as normalizeGlobalActionRef, normalizeLayoutPolicy, normalizeLookupFilterRequest, normalizePath, normalizePraxisDataQueryContext, normalizePraxisEffectPolicy, normalizePraxisPresentationVisualization, normalizePraxisQueryFilterExpression, normalizePraxisQueryFilterNode, normalizeResourceAvailabilityReasonCode, normalizeStart, normalizeUnknownError, normalizeWidgetEventPath, notifySuccessHook, parseJsonResponseOrEmpty, praxisLoadingInterceptorFn, prefillFromContextHook, provideDefaultFormHooks, provideFieldSelectorRegistryBase, provideFieldSelectorRegistryOverride, provideFieldSelectorRegistryRuntime, provideFormHookPresets, provideFormHooks, provideGlobalActionCatalog, provideGlobalActionHandler, provideGlobalConfig, provideGlobalConfigReady, provideGlobalConfigSeed, provideGlobalConfigTenant, provideHookResolvers, provideHookWhitelist, provideOverlayDecisionMatrix, providePraxisAnalyticsGlobalActions, providePraxisCollectionExportProvider, providePraxisDynamicPageMetadata, providePraxisFooterLinksMetadata, providePraxisGlobalActionCatalog, providePraxisGlobalActions, providePraxisGlobalConfigBootstrap, providePraxisHeroBannerMetadata, providePraxisHttpCollectionExportProvider, providePraxisHttpLoading, providePraxisI18n, providePraxisI18nConfig, providePraxisI18nTranslator, providePraxisIconDefaults, providePraxisJsonLogicOperator, providePraxisJsonLogicOperatorOverride, providePraxisLegalNoticeMetadata, providePraxisLoadingDefaults, providePraxisLogging, providePraxisRichTextBlockMetadata, providePraxisToastGlobalActions, providePraxisUserContextSummaryMetadata, provideRemoteGlobalConfig, readPraxisExportValue, reconcileFilterConfig, reconcileFormConfig, reconcileTableConfig, registerPraxisRuntimeComponentObservation, removeDiacritics, renderPraxisPresentationVisualizationHtml, reportTelemetryHookFactory, requiredCheckedValidator, requiredPresenceValidator, resolveBuiltinPresets, resolveColumnTypeFromFieldDefinition, resolveControlTypeAlias, resolveDefaultValuePresentationFormat, resolveEntityLookupPayloadMode, resolveFieldPresentation, resolveHidden, resolveInlineFilterControlType, resolveInlineFilterControlTypeToBaseControlType, resolveLoggerConfig, resolveObservabilityOptions, resolveOffset, resolveOrder, resolvePraxisCollectionExportItems, resolvePraxisExportFields, resolvePraxisExportScope, resolvePraxisFilterCriteria, resolveResourceAvailabilityReasonKey, resolveSpan, resolveTextMaskFormat, resolveTextMaskFormatFromFieldDefinition, resolveValuePresentation, resolveValuePresentationLocale, serializeEntityLookupValueForPayload, serializeOptionSourceFilterRequest, serializePraxisCollectionToCsv, serializePraxisCollectionToJson, slugify, stripMasksHook, supportsImplicitValuePresentation, syncWithServerMetadata, toCamel, toCapitalize, toKebab, toPascal, toSentenceCase, toSnake, toTitleCase, translateResourceAvailabilityReason, translateResourceDiscoveryText, translateUnavailableWorkflowMessage, trim, uniqueAsyncValidator, urlValidator, validateGlobalActionRef, validateGlobalActionRefs, withMessage, withPraxisHttpLoading };
|