@nexterajs/app-kit 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -64
- package/fesm2022/nexterajs-app-kit.mjs +216 -29
- package/fesm2022/nexterajs-app-kit.mjs.map +1 -1
- package/package.json +5 -2
- package/types/nexterajs-app-kit.d.ts +69 -2
package/README.md
CHANGED
|
@@ -1,64 +1,108 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
1
|
+
# @nexterajs/app-kit
|
|
2
|
+
|
|
3
|
+
The metadata-driven application framework that sits beside [`@nexterajs/ui`](https://www.npmjs.com/package/@nexterajs/ui).
|
|
4
|
+
A module describes its pages as data (which list columns and filters, which form fields and layout, which actions a
|
|
5
|
+
user may take, which tabs a detail page has) and the application renders those pages from it. This package holds that
|
|
6
|
+
shape and the pure helpers built on it: module and page metadata interfaces, action and page-mode constants, a form
|
|
7
|
+
builder, a condition evaluator, and small replacements for the third-party utilities the applications used to import.
|
|
8
|
+
|
|
9
|
+
It is separate from `@nexterajs/ui` on purpose: this half is coupled to a specific backend contract (action codes,
|
|
10
|
+
list-of-values tables, `pageNo`/`pageSize` paging), and an application that only wants components should not have to
|
|
11
|
+
take it. It does not import `@nexterajs/ui`.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @nexterajs/app-kit @angular/forms @angular/cdk rxjs
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Angular 22 (`@angular/core`, `@angular/common`) is a peer dependency. `createFormGroup` uses `@angular/forms`, the
|
|
20
|
+
`[nxeMenu]` directive uses `@angular/cdk/overlay`, and `NxeModalService` returns an RxJS `Observable`, so install those
|
|
21
|
+
three alongside it.
|
|
22
|
+
|
|
23
|
+
## What is in it
|
|
24
|
+
|
|
25
|
+
| Area | Exports |
|
|
26
|
+
|---|---|
|
|
27
|
+
| Module metadata | `ModuleMetadata`, `ListPageMetadata`, `UpsertPageMetadata`, `ActionItem`, `Condition`, `ConditionEvaluator`, `ConditionType`, `ConditionOperator`, `ValueOperator`, `BooleanOperator` |
|
|
28
|
+
| Field and layout metadata | `NxeGridItem`, `NxeLayoutItem`, `LayoutType`, `DataType`, `LovDependency`, `ValueChangeEvent`, `Paging` |
|
|
29
|
+
| Actions | `ActionCode` (`LST`, `VIE`, `CRT`, `MOD`, `DEL`, …), `ACTION_MAPPER`, `getActionView()` and the other `getAction*()` button descriptors, `RequestAction`, `ActionConfig` |
|
|
30
|
+
| Page mode | `PageMode` (`View`, `Modify`, `New`), `ModeSignalHelper` (`isView`, `isModify`, `isAdd` as computed signals) |
|
|
31
|
+
| Forms | `extractGridItems` (flatten a layout to its fields), `createFormGroup` (a `FormGroup` from field metadata and list-of-values) |
|
|
32
|
+
| List of values | `Lov`, `MappedLov`, `mapLov`, `mapOriginalLov` |
|
|
33
|
+
| Helpers | `buildTree` (flat list to tree, `array-to-tree` semantics), `cloneDeep` (lodash semantics), `uuidV4`, `decodeJwt` (decode only, never verify), `trackChanges`, `sortSequence`, HTTP query helpers (`filterQueryParams`, `constructUrlWithQueryParams`, `downloadFile`, `previewPDF`) |
|
|
34
|
+
| Pipes | `actionCode` (an action code to its label), `null` (empty values to `-`) |
|
|
35
|
+
| Directives | `[nxeBadge]`, `[nxeMenu]` (opens a template in a CDK overlay) |
|
|
36
|
+
| Services | `NxeModalService` (opens a component over a click-to-dismiss backdrop) |
|
|
37
|
+
|
|
38
|
+
## Minimal usage
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
import { Component, input } from '@angular/core';
|
|
42
|
+
import {
|
|
43
|
+
ActionCode,
|
|
44
|
+
ConditionEvaluator,
|
|
45
|
+
ConditionType,
|
|
46
|
+
ModeSignalHelper,
|
|
47
|
+
ModuleMetadata,
|
|
48
|
+
NullPipe,
|
|
49
|
+
ValueOperator,
|
|
50
|
+
createFormGroup,
|
|
51
|
+
extractGridItems,
|
|
52
|
+
} from '@nexterajs/app-kit';
|
|
53
|
+
|
|
54
|
+
export const PURCHASE_ORDER: ModuleMetadata = {
|
|
55
|
+
section: 'Purchasing',
|
|
56
|
+
icon: 'cart',
|
|
57
|
+
entityType: 'PO',
|
|
58
|
+
accessRight: 'PURCHASE_ORDER',
|
|
59
|
+
webBaseUrl: '/purchase-orders',
|
|
60
|
+
apiBaseUrl: '/api/purchase-orders',
|
|
61
|
+
uploadUrl: '/api/purchase-orders/upload',
|
|
62
|
+
id: 'poId',
|
|
63
|
+
lov: 'PO_STATUS',
|
|
64
|
+
listPage: {
|
|
65
|
+
create: true,
|
|
66
|
+
filters: [{ id: 'status', label: 'Status', dataType: 'LOV', lov: 'PO_STATUS' }],
|
|
67
|
+
gridItems: [
|
|
68
|
+
{ id: 'poNumber', label: 'PO number' },
|
|
69
|
+
{ id: 'total', label: 'Total', dataType: 'NUM' },
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
upsertPage: {
|
|
73
|
+
subheaders: [],
|
|
74
|
+
forms: [{ gridItem: { id: 'supplier', label: 'Supplier', required: true } }],
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
@Component({
|
|
79
|
+
selector: 'app-po-detail',
|
|
80
|
+
imports: [NullPipe],
|
|
81
|
+
template: `{{ form.value.supplier | null }}`,
|
|
82
|
+
})
|
|
83
|
+
export class PoDetailComponent {
|
|
84
|
+
readonly mode = input('View');
|
|
85
|
+
readonly modes = new ModeSignalHelper(this.mode); // modes.isView(), modes.isModify(), modes.isAdd()
|
|
86
|
+
|
|
87
|
+
readonly form = createFormGroup(
|
|
88
|
+
extractGridItems(PURCHASE_ORDER.upsertPage!.forms),
|
|
89
|
+
PURCHASE_ORDER,
|
|
90
|
+
{},
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
canDelete(row: Record<string, unknown>): boolean {
|
|
94
|
+
return ConditionEvaluator.evaluate(row, {
|
|
95
|
+
type: ConditionType.SINGLE,
|
|
96
|
+
key: 'status',
|
|
97
|
+
valueOperator: ValueOperator.INCLUDE,
|
|
98
|
+
value: ['DRAFT', 'REJECTED'],
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
readonly deleteCode = ActionCode.DELETE; // 'DEL'
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
Apache-2.0. See `LICENSE` and `NOTICE` in this package.
|
|
@@ -479,12 +479,68 @@ class PageMode {
|
|
|
479
479
|
static ADD = 'New';
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
+
/**
|
|
483
|
+
* Build a nested tree from a flat list, matching the semantics of the `array-to-tree` package.
|
|
484
|
+
*
|
|
485
|
+
* Two details are contractual, not incidental:
|
|
486
|
+
*
|
|
487
|
+
* - **A leaf has no `children` property at all** — not `[]`. Callers branch on `if (node.children)`
|
|
488
|
+
* to decide whether to recurse, so handing every leaf an empty array turns each one into a
|
|
489
|
+
* traversable branch and silently changes what a walk collects. There is no error when this is
|
|
490
|
+
* wrong; the output is just quietly different.
|
|
491
|
+
* - **A node whose parent key is missing from the list becomes a root**, rather than being dropped.
|
|
492
|
+
* Access lists arrive filtered by permission, so referencing an absent parent is routine — losing
|
|
493
|
+
* those rows would silently shrink what the user can see.
|
|
494
|
+
*
|
|
495
|
+
* Nodes are shallow-copied, so the input array and its items are left untouched.
|
|
496
|
+
*/
|
|
497
|
+
function buildTree(rows, options) {
|
|
498
|
+
if (!Array.isArray(rows)) {
|
|
499
|
+
throw new TypeError('buildTree: expected an array of rows');
|
|
500
|
+
}
|
|
501
|
+
const { customID, parentProperty } = options;
|
|
502
|
+
const childrenProperty = options.childrenProperty ?? 'children';
|
|
503
|
+
// Shallow copies keyed by id, so children can be attached without touching the caller's objects.
|
|
504
|
+
const byId = new Map();
|
|
505
|
+
const copies = rows.map((row) => {
|
|
506
|
+
const copy = { ...row };
|
|
507
|
+
byId.set(row[customID], copy);
|
|
508
|
+
return copy;
|
|
509
|
+
});
|
|
510
|
+
const roots = [];
|
|
511
|
+
const childrenOf = new Map();
|
|
512
|
+
for (let i = 0; i < copies.length; i++) {
|
|
513
|
+
const parentId = rows[i][parentProperty];
|
|
514
|
+
// A falsy parent key, or one that names a row not present, makes this a root.
|
|
515
|
+
if (!parentId || !byId.has(parentId) || byId.get(parentId) === copies[i]) {
|
|
516
|
+
roots.push(copies[i]);
|
|
517
|
+
continue;
|
|
518
|
+
}
|
|
519
|
+
const siblings = childrenOf.get(parentId);
|
|
520
|
+
if (siblings)
|
|
521
|
+
siblings.push(copies[i]);
|
|
522
|
+
else
|
|
523
|
+
childrenOf.set(parentId, [copies[i]]);
|
|
524
|
+
}
|
|
525
|
+
// Attach only where children exist, so leaves keep `children === undefined`.
|
|
526
|
+
for (const [parentId, children] of childrenOf) {
|
|
527
|
+
const parent = byId.get(parentId);
|
|
528
|
+
if (parent)
|
|
529
|
+
parent[childrenProperty] = children;
|
|
530
|
+
}
|
|
531
|
+
return roots;
|
|
532
|
+
}
|
|
533
|
+
// Deliberately no `convertTreeToList` here. The applications already have one, and its
|
|
534
|
+
// stack-based traversal emits siblings in an order a recursive walk does not reproduce — an
|
|
535
|
+
// order that reaches a request body. A second function under the same name, differing only in
|
|
536
|
+
// ordering, is a trap rather than a convenience.
|
|
537
|
+
|
|
482
538
|
function extractGridItems(layoutItems, existingGridItems = []) {
|
|
483
539
|
layoutItems.forEach((item) => {
|
|
484
540
|
if (item.gridItem) {
|
|
485
541
|
existingGridItems.push(item.gridItem);
|
|
486
542
|
}
|
|
487
|
-
if (item.children
|
|
543
|
+
if (item.children && item.children.length > 0) {
|
|
488
544
|
extractGridItems(item.children, existingGridItems);
|
|
489
545
|
}
|
|
490
546
|
});
|
|
@@ -527,6 +583,8 @@ function createFormGroup(gridItems, module, lov) {
|
|
|
527
583
|
});
|
|
528
584
|
});
|
|
529
585
|
const currentFormControl = formGroup.get(gridItem.id);
|
|
586
|
+
if (!currentFormControl)
|
|
587
|
+
return;
|
|
530
588
|
const currentValue = currentFormControl.value;
|
|
531
589
|
const currentLov = lov[gridItem.lov];
|
|
532
590
|
if (gridItem.dataType === DataType.LOM) {
|
|
@@ -549,6 +607,53 @@ function createFormGroup(gridItems, module, lov) {
|
|
|
549
607
|
return formGroup;
|
|
550
608
|
}
|
|
551
609
|
|
|
610
|
+
/**
|
|
611
|
+
* A structural deep clone, matching the subset of `lodash.cloneDeep` the applications rely on.
|
|
612
|
+
*
|
|
613
|
+
* Four behaviours here are load-bearing, and each one fails *silently* if dropped — which is why
|
|
614
|
+
* they are spelled out rather than left to a one-liner:
|
|
615
|
+
*
|
|
616
|
+
* 1. **Functions come back by reference.** Page metadata carries Angular component classes
|
|
617
|
+
* (`{ label, component: SomeTabComponent }`) and the clone is handed to `createComponent()`.
|
|
618
|
+
* A cloned-or-dropped class is not the same class. This is also why `structuredClone` cannot be
|
|
619
|
+
* used here at all: it throws `DataCloneError` on a function.
|
|
620
|
+
* 2. **`Date` survives as a `Date`.** Callers clone a filter bag and *then* branch on
|
|
621
|
+
* `value instanceof Date`. A Date has no enumerable own keys, so a plain `for...in` copy yields
|
|
622
|
+
* `{}` and that branch quietly stops firing.
|
|
623
|
+
* 3. **Prototypes are preserved.** `Object.create(Object.getPrototypeOf(v))` rather than `{}`, so a
|
|
624
|
+
* class instance stays an instance. A lost prototype surfaces far from the clone.
|
|
625
|
+
* 4. **Keys holding `undefined` are kept**, as lodash keeps them — `'k' in clone` stays true.
|
|
626
|
+
*
|
|
627
|
+
* Not handled, because nothing clones one: `Map`, `Set`, `RegExp`, typed arrays, `Blob`. They would
|
|
628
|
+
* fall through to the object branch. Add them with a test when a real caller needs them.
|
|
629
|
+
*/
|
|
630
|
+
function cloneDeep(value, visited = new WeakMap()) {
|
|
631
|
+
// Primitives and functions pass straight through. Functions deliberately by reference.
|
|
632
|
+
if (value === null || (typeof value !== 'object' && typeof value !== 'function'))
|
|
633
|
+
return value;
|
|
634
|
+
if (typeof value === 'function')
|
|
635
|
+
return value;
|
|
636
|
+
// A node already cloned in this walk: return the same clone, so cycles terminate and shared
|
|
637
|
+
// references stay shared rather than being duplicated into two objects.
|
|
638
|
+
if (visited.has(value))
|
|
639
|
+
return visited.get(value);
|
|
640
|
+
if (value instanceof Date)
|
|
641
|
+
return new Date(value.getTime());
|
|
642
|
+
if (Array.isArray(value)) {
|
|
643
|
+
const copy = [];
|
|
644
|
+
visited.set(value, copy);
|
|
645
|
+
for (let i = 0; i < value.length; i++)
|
|
646
|
+
copy[i] = cloneDeep(value[i], visited);
|
|
647
|
+
return copy;
|
|
648
|
+
}
|
|
649
|
+
const copy = Object.create(Object.getPrototypeOf(value));
|
|
650
|
+
visited.set(value, copy);
|
|
651
|
+
for (const key of Object.keys(value)) {
|
|
652
|
+
copy[key] = cloneDeep(value[key], visited);
|
|
653
|
+
}
|
|
654
|
+
return copy;
|
|
655
|
+
}
|
|
656
|
+
|
|
552
657
|
function removeEmptyObject(obj) {
|
|
553
658
|
const result = {};
|
|
554
659
|
Object.entries(obj).forEach(([k, v]) => {
|
|
@@ -582,32 +687,6 @@ function filterQueryParams(obj) {
|
|
|
582
687
|
});
|
|
583
688
|
return result;
|
|
584
689
|
}
|
|
585
|
-
function cloneDeep(value, visited = new WeakMap()) {
|
|
586
|
-
// Handle primitive types and functions
|
|
587
|
-
if (value === null || typeof value !== 'object')
|
|
588
|
-
return value;
|
|
589
|
-
// Handle circular references
|
|
590
|
-
if (visited.has(value))
|
|
591
|
-
return visited.get(value);
|
|
592
|
-
// Clone array
|
|
593
|
-
if (isArray(value)) {
|
|
594
|
-
const arrCopy = [];
|
|
595
|
-
visited.set(value, arrCopy);
|
|
596
|
-
for (let i = 0; i < value.length; i++) {
|
|
597
|
-
arrCopy[i] = cloneDeep(value[i], visited);
|
|
598
|
-
}
|
|
599
|
-
return arrCopy;
|
|
600
|
-
}
|
|
601
|
-
// Clone object
|
|
602
|
-
const objCopy = {};
|
|
603
|
-
visited.set(value, objCopy);
|
|
604
|
-
for (const key in value) {
|
|
605
|
-
if (value.hasOwnProperty(key)) {
|
|
606
|
-
objCopy[key] = cloneDeep(value[key], visited);
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
return objCopy;
|
|
610
|
-
}
|
|
611
690
|
function isArray(value) {
|
|
612
691
|
return Object.prototype.toString.call(value) === '[object Array]';
|
|
613
692
|
}
|
|
@@ -642,6 +721,114 @@ function toDateString(date) {
|
|
|
642
721
|
return date.toDateString();
|
|
643
722
|
}
|
|
644
723
|
|
|
724
|
+
/**
|
|
725
|
+
* A RFC 4122 version 4 UUID.
|
|
726
|
+
*
|
|
727
|
+
* `crypto.randomUUID()` is the fast path, but it is only exposed in a **secure context** — and the
|
|
728
|
+
* applications are served over plain http on the LAN, where it is simply `undefined`. So there is a
|
|
729
|
+
* second tier built on `crypto.getRandomValues`, which carries no such restriction.
|
|
730
|
+
*
|
|
731
|
+
* There is deliberately no `Math.random()` tier. Callers truncate these ids and persist them, so a
|
|
732
|
+
* generator with ~2^52 of internal state and no collision resistance is not an acceptable
|
|
733
|
+
* degradation — better to fail loudly on a platform that has neither API than to hand out ids that
|
|
734
|
+
* quietly collide.
|
|
735
|
+
*/
|
|
736
|
+
/** 00..ff, so the fallback formats bytes with a lookup instead of padding each one. */
|
|
737
|
+
const HEX = Array.from({ length: 256 }, (_, i) => (i + 0x100).toString(16).slice(1));
|
|
738
|
+
function uuidV4() {
|
|
739
|
+
const cryptoApi = globalThis.crypto;
|
|
740
|
+
if (typeof cryptoApi?.randomUUID === 'function') {
|
|
741
|
+
return cryptoApi.randomUUID();
|
|
742
|
+
}
|
|
743
|
+
if (typeof cryptoApi?.getRandomValues !== 'function') {
|
|
744
|
+
throw new Error('uuidV4: no Web Crypto API available (need randomUUID or getRandomValues)');
|
|
745
|
+
}
|
|
746
|
+
const bytes = cryptoApi.getRandomValues(new Uint8Array(16));
|
|
747
|
+
// Version 4 and the RFC 4122 variant, per §4.4.
|
|
748
|
+
bytes[6] = (bytes[6] & 0x0f) | 0x40;
|
|
749
|
+
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
|
750
|
+
return (HEX[bytes[0]] + HEX[bytes[1]] + HEX[bytes[2]] + HEX[bytes[3]] + '-' +
|
|
751
|
+
HEX[bytes[4]] + HEX[bytes[5]] + '-' +
|
|
752
|
+
HEX[bytes[6]] + HEX[bytes[7]] + '-' +
|
|
753
|
+
HEX[bytes[8]] + HEX[bytes[9]] + '-' +
|
|
754
|
+
HEX[bytes[10]] + HEX[bytes[11]] + HEX[bytes[12]] +
|
|
755
|
+
HEX[bytes[13]] + HEX[bytes[14]] + HEX[bytes[15]]);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* Thrown when a token is not a readable JWT. Mirrors `jwt-decode`'s `InvalidTokenError`, because
|
|
760
|
+
* callers catch on *something* being wrong rather than on a specific cause.
|
|
761
|
+
*/
|
|
762
|
+
class InvalidTokenError extends Error {
|
|
763
|
+
name = 'InvalidTokenError';
|
|
764
|
+
}
|
|
765
|
+
/**
|
|
766
|
+
* Decode a JWT's payload (or header) **without verifying its signature.**
|
|
767
|
+
*
|
|
768
|
+
* This reads a token; it does not authenticate one. Anyone can mint a JWT with any claims, so
|
|
769
|
+
* nothing here may be used as an authorisation decision — the server verifies, the client only
|
|
770
|
+
* displays. The same caveat applies to `jwt-decode`, which this replaces.
|
|
771
|
+
*/
|
|
772
|
+
function decodeJwt(token, options) {
|
|
773
|
+
if (typeof token !== 'string' || token.length === 0) {
|
|
774
|
+
throw new InvalidTokenError('Invalid token specified: must be a non-empty string');
|
|
775
|
+
}
|
|
776
|
+
const position = options?.header ? 0 : 1;
|
|
777
|
+
const part = token.split('.')[position];
|
|
778
|
+
if (typeof part !== 'string') {
|
|
779
|
+
throw new InvalidTokenError(`Invalid token specified: missing part #${position + 1}`);
|
|
780
|
+
}
|
|
781
|
+
let json;
|
|
782
|
+
try {
|
|
783
|
+
json = base64UrlDecode(part);
|
|
784
|
+
}
|
|
785
|
+
catch (error) {
|
|
786
|
+
throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${position + 1} (${error.message})`);
|
|
787
|
+
}
|
|
788
|
+
try {
|
|
789
|
+
return JSON.parse(json);
|
|
790
|
+
}
|
|
791
|
+
catch (error) {
|
|
792
|
+
throw new InvalidTokenError(`Invalid token specified: invalid json for part #${position + 1} (${error.message})`);
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* base64url -> UTF-8 string.
|
|
797
|
+
*
|
|
798
|
+
* The `decodeURIComponent(escape(...))` step is not decoration. Claims routinely carry non-ASCII —
|
|
799
|
+
* a user's display name, a company name — and `atob` returns latin-1 bytes, so without it every
|
|
800
|
+
* accented character arrives mojibake. `escape` is deprecated but is the only thing that maps those
|
|
801
|
+
* raw bytes into percent-escapes losslessly, so the result is tried first and a plain `atob` is the
|
|
802
|
+
* fallback for the rare token whose bytes are not valid UTF-8.
|
|
803
|
+
*/
|
|
804
|
+
function base64UrlDecode(value) {
|
|
805
|
+
let base64 = value.replace(/-/g, '+').replace(/_/g, '/');
|
|
806
|
+
// Restore the padding `atob` requires. A remainder of 1 cannot occur in valid base64 — it would
|
|
807
|
+
// mean a truncated token, and padding it would silently decode to something wrong.
|
|
808
|
+
switch (base64.length % 4) {
|
|
809
|
+
case 0:
|
|
810
|
+
break;
|
|
811
|
+
case 2:
|
|
812
|
+
base64 += '==';
|
|
813
|
+
break;
|
|
814
|
+
case 3:
|
|
815
|
+
base64 += '=';
|
|
816
|
+
break;
|
|
817
|
+
default:
|
|
818
|
+
throw new Error('illegal base64url string');
|
|
819
|
+
}
|
|
820
|
+
const binary = atob(base64);
|
|
821
|
+
try {
|
|
822
|
+
return decodeURIComponent(binary
|
|
823
|
+
.split('')
|
|
824
|
+
.map((c) => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))
|
|
825
|
+
.join(''));
|
|
826
|
+
}
|
|
827
|
+
catch {
|
|
828
|
+
return binary;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
|
|
645
832
|
function mapLov(input, lov) {
|
|
646
833
|
const result = {};
|
|
647
834
|
Object.keys(input).forEach(key => {
|
|
@@ -704,7 +891,7 @@ function sortSequence(a, b) {
|
|
|
704
891
|
}
|
|
705
892
|
|
|
706
893
|
function trackChanges(oldArray, newArray, keysToCompare, idKey) {
|
|
707
|
-
|
|
894
|
+
const result = [];
|
|
708
895
|
// Helper function to create a unique key based on specific fields
|
|
709
896
|
function createKey(item, keys) {
|
|
710
897
|
return keys
|
|
@@ -1008,5 +1195,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
1008
1195
|
* Generated bundle index. Do not edit.
|
|
1009
1196
|
*/
|
|
1010
1197
|
|
|
1011
|
-
export { ACTION_MAPPER, ActionCode, ActionCodePipe, BadgeDirective, BooleanOperator, ConditionEvaluator, ConditionOperator, ConditionType, DataType, LayoutType, MappedLov, ModeSignalHelper, NullPipe, NxeMenu, NxeModalService, PageMode, ValueChangeEvent, ValueOperator, arrayToString, constructUrlWithQueryParams, createFormGroup, downloadFile, extractGridItems, filterQueryParams, getActionActivated, getActionAddSubTreaty, getActionAddToPayment, getActionApproval, getActionBind, getActionBinding, getActionCalculate, getActionCancel, getActionConfirm, getActionConvertToProposal, getActionCorrection, getActionDelete, getActionDivider, getActionDownload, getActionExtendDueDate, getActionExtract, getActionFinalize, getActionIssue, getActionLock, getActionModify, getActionNew, getActionPlacement, getActionPosting, getActionPrint, getActionReactivate, getActionResetPassword, getActionReverse, getActionRollback, getActionRun, getActionSend, getActionSendForApproval, getActionTerminate, getActionTerminated, getActionUnlock, getActionUnposting, getActionValidate, getActionView, mapLov, mapOriginalLov, previewPDF, removeEmptyObject, sortSequence, toDateString, trackChanges };
|
|
1198
|
+
export { ACTION_MAPPER, ActionCode, ActionCodePipe, BadgeDirective, BooleanOperator, ConditionEvaluator, ConditionOperator, ConditionType, DataType, InvalidTokenError, LayoutType, MappedLov, ModeSignalHelper, NullPipe, NxeMenu, NxeModalService, PageMode, ValueChangeEvent, ValueOperator, arrayToString, buildTree, cloneDeep, constructUrlWithQueryParams, createFormGroup, decodeJwt, downloadFile, extractGridItems, filterQueryParams, getActionActivated, getActionAddSubTreaty, getActionAddToPayment, getActionApproval, getActionBind, getActionBinding, getActionCalculate, getActionCancel, getActionConfirm, getActionConvertToProposal, getActionCorrection, getActionDelete, getActionDivider, getActionDownload, getActionExtendDueDate, getActionExtract, getActionFinalize, getActionIssue, getActionLock, getActionModify, getActionNew, getActionPlacement, getActionPosting, getActionPrint, getActionReactivate, getActionResetPassword, getActionReverse, getActionRollback, getActionRun, getActionSend, getActionSendForApproval, getActionTerminate, getActionTerminated, getActionUnlock, getActionUnposting, getActionValidate, getActionView, mapLov, mapOriginalLov, previewPDF, removeEmptyObject, sortSequence, toDateString, trackChanges, uuidV4 };
|
|
1012
1199
|
//# sourceMappingURL=nexterajs-app-kit.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nexterajs-app-kit.mjs","sources":["../../../projects/nextera-app-kit/src/lib/interfaces/module.interface.ts","../../../projects/nextera-app-kit/src/lib/interfaces/lov.interface.ts","../../../projects/nextera-app-kit/src/lib/metadata/data-grid.interface.ts","../../../projects/nextera-app-kit/src/lib/metadata/data-grid.const.ts","../../../projects/nextera-app-kit/src/lib/consts/action.const.ts","../../../projects/nextera-app-kit/src/lib/consts/page.const.ts","../../../projects/nextera-app-kit/src/lib/helpers/generic.helper.ts","../../../projects/nextera-app-kit/src/lib/helpers/http.helper.ts","../../../projects/nextera-app-kit/src/lib/helpers/lov.helper.ts","../../../projects/nextera-app-kit/src/lib/helpers/signal.helper.ts","../../../projects/nextera-app-kit/src/lib/helpers/sort.helper.ts","../../../projects/nextera-app-kit/src/lib/helpers/tracker.helper.ts","../../../projects/nextera-app-kit/src/lib/pipes/action-code.pipe.ts","../../../projects/nextera-app-kit/src/lib/pipes/null.pipe.ts","../../../projects/nextera-app-kit/src/lib/directives/badge.directive.ts","../../../projects/nextera-app-kit/src/lib/directives/menu.directive.ts","../../../projects/nextera-app-kit/src/lib/services/modal.service.ts","../../../projects/nextera-app-kit/src/public-api.ts","../../../projects/nextera-app-kit/src/nexterajs-app-kit.ts"],"sourcesContent":["import { ComponentRef } from '@angular/core';\r\nimport { NxeGridItem, NxeLayoutItem } from '../metadata/data-grid.interface';\r\n\r\nexport interface ModuleMetadata {\r\n section: string;\r\n icon: string;\r\n entityType: string;\r\n accessRight: string;\r\n packageCode?: string;\r\n webBaseUrl: string;\r\n apiBaseUrl: string;\r\n apiBaseUrlModifier?: string;\r\n uploadUrl: string;\r\n id: string;\r\n lov: string;\r\n lovMapper?: any;\r\n isTableMaintenance?: boolean;\r\n usePopup?: boolean;\r\n listPage?: ListPageMetadata\r\n createPage?: {\r\n forms: NxeLayoutItem[];\r\n }\r\n upsertPage?: UpsertPageMetadata;\r\n detailPage?: UpsertPageMetadata;\r\n}\r\n\r\nexport interface ListPageMetadata {\r\n create: boolean | any;\r\n hasSearchBox?: boolean;\r\n hasUploadButton?: boolean;\r\n selectable?: boolean;\r\n actions?: {\r\n actionItems: ActionItem[];\r\n gridItems?: NxeGridItem[];\r\n };\r\n tree?: {\r\n keyExpr: string;\r\n parentIdExpr: string;\r\n autoExpandAll: boolean;\r\n },\r\n filters: NxeGridItem[];\r\n gridItems: NxeGridItem[],\r\n masterDetail?: {\r\n apiUrl: string;\r\n gridItems: NxeGridItem[];\r\n }\r\n summary?: any;\r\n}\r\n\r\nexport interface UpsertPageMetadata {\r\n subheaders: NxeGridItem[];\r\n hasApproval?: boolean;\r\n isInlineModify?: boolean;\r\n actions?: {\r\n actionItems: ActionItem[];\r\n gridItems?: NxeGridItem[];\r\n };\r\n forms: NxeLayoutItem[];\r\n tabHeaderLabel?: string;\r\n tabContentLabel?: string;\r\n tabs?: { label: string; component: any, componentRef?: ComponentRef<any>, hiddenConditions?: Condition }[];\r\n}\r\n\r\nexport interface ActionItem {\r\n actionCode: string;\r\n overrideActionCode?: string;\r\n overrideUrl?: string;\r\n redirectAfterSuccessful?: string;\r\n disabledConditions?: ActionItemDisabledOn[];\r\n}\r\n\r\nexport interface ActionItemDisabledOn {\r\n key: string;\r\n operator: string;\r\n value: any;\r\n}\r\n\r\nexport class BooleanOperator {\r\n static readonly NOT_INCLUDE = 'NIN';\r\n static readonly INCLUDE = 'IN';\r\n static readonly EQUALS = '=';\r\n static readonly NOT_EQUAL = '!=';\r\n}\r\n\r\nexport class ValueOperator {\r\n static readonly NOT_INCLUDE = 'NIN';\r\n static readonly INCLUDE = 'IN';\r\n static readonly EQUALS = '=';\r\n static readonly NOT_EQUAL = '!=';\r\n}\r\n\r\nexport class ConditionType {\r\n static readonly GROUP = 'GROUP';\r\n static readonly SINGLE = 'SINGLE';\r\n}\r\n\r\nexport class ConditionOperator {\r\n static readonly AND = 'AND';\r\n static readonly OR = 'OR';\r\n}\r\n\r\nexport interface Condition {\r\n type: string;\r\n\r\n /*Type Group*/\r\n children?: Condition[];\r\n groupOperator?: string;\r\n\r\n\r\n /*Type Single*/\r\n key?: string;\r\n valueOperator?: string;\r\n value?: any;\r\n}\r\n\r\n\r\nexport class ConditionEvaluator {\r\n static evaluate(data: Record<string, any>, condition: Condition): boolean {\r\n if (condition.type === ConditionType.SINGLE) {\r\n return this.evaluateSingle(data, condition);\r\n }\r\n\r\n if (condition.type === ConditionType.GROUP && condition.children) {\r\n return this.evaluateGroup(data, condition);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private static evaluateSingle(data: Record<string, any>, condition: Condition): boolean {\r\n const { key, valueOperator, value } = condition;\r\n if (!key || !valueOperator) return false;\r\n\r\n const actualValue = data[key];\r\n\r\n switch (valueOperator) {\r\n case ValueOperator.EQUALS:\r\n return actualValue === value;\r\n case ValueOperator.NOT_EQUAL:\r\n return actualValue !== value;\r\n case ValueOperator.INCLUDE:\r\n return Array.isArray(value) ? value.includes(actualValue) : false;\r\n case ValueOperator.NOT_INCLUDE:\r\n return Array.isArray(value) ? !value.includes(actualValue) : false;\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n private static evaluateGroup(data: Record<string, any>, condition: Condition): boolean {\r\n const { children = [], groupOperator } = condition;\r\n\r\n if (groupOperator === ConditionOperator.AND) {\r\n return children.every(child => this.evaluate(data, child));\r\n }\r\n\r\n if (groupOperator === ConditionOperator.OR) {\r\n return children.some(child => this.evaluate(data, child));\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n","export interface Lov {\r\n defaultValue: string;\r\n isActive: string;\r\n lovCode: any;\r\n lovName: string;\r\n lovType: string;\r\n otherValue1: string;\r\n otherValue2: string;\r\n otherValue3: string;\r\n otherValue4: string;\r\n otherValue5: string;\r\n sequenceNo: number;\r\n}\r\n\r\ntype StringArrayMap<T extends readonly string[]> = {\r\n [K in T[number]]?: string[];\r\n};\r\n\r\nexport class MappedLov<T extends readonly string[]> {\r\n private map: StringArrayMap<T> = {} as any;\r\n\r\n constructor(initial?: StringArrayMap<T>) {\r\n if (initial) {\r\n this.map = initial;\r\n }\r\n }\r\n\r\n get<K extends T[number]>(key: K): string[] {\r\n return this.map[key] ?? [];\r\n }\r\n\r\n set<K extends T[number]>(key: K, value: string[]): void {\r\n this.map[key] = value;\r\n }\r\n\r\n has<K extends T[number]>(key: K): boolean {\r\n return key in this.map;\r\n }\r\n\r\n getRawMap(): Required<{ [K in T[number]]: string[] }> {\r\n return Object.fromEntries(\r\n this.keys.map(k => [k, this.get(k)])\r\n ) as any;\r\n }\r\n\r\n constructorKeys: T;\r\n\r\n get keys(): T[number][] {\r\n return [...(this.constructorKeys as unknown as string[])];\r\n }\r\n}\r\n","import { ActionItemDisabledOn, Condition } from '../interfaces/module.interface';\r\n\r\nexport interface Paging {\r\n pageNo: number;\r\n pageSize: number;\r\n totalRows: number;\r\n totalPages: number;\r\n}\r\n\r\nexport interface NxeGridItem {\r\n id: string;\r\n label: string;\r\n\r\n dataType?: string;\r\n\r\n lov?: string;\r\n lovDependency?: LovDependency | LovDependency[];\r\n\r\n pushToRight?: boolean;\r\n\r\n filterCount?: number;\r\n\r\n groupIndex?: number;\r\n\r\n valueExpr?: string;\r\n displayExpr?: string;\r\n\r\n readonly?: boolean;\r\n hidden?: boolean;\r\n min?: number;\r\n max?: number;\r\n alignment?: string;\r\n\r\n readonlyOnCreate?: boolean;\r\n readonlyOnModify?: boolean;\r\n readonlyCondition?: Condition;\r\n\r\n hiddenOnCreate?: boolean;\r\n hiddenOnModify?: boolean;\r\n hiddenOnGrid?: boolean;\r\n hiddenCondition?: Condition;\r\n\r\n shownVariable?: string;\r\n\r\n link?: LinkDetail;\r\n formattedLink?: string;\r\n\r\n defaultValue?: any;\r\n fixedValue?: any;\r\n defaultValueDynamic?: {\r\n from: string;\r\n propertyCode: string;\r\n }\r\n\r\n required?: boolean;\r\n\r\n gridItems?: NxeGridItem[];\r\n gridConfig?: {\r\n detailID: string;\r\n inlineEditing?: boolean;\r\n editable: boolean;\r\n deletable: boolean;\r\n isPrimaryHeader?: boolean;\r\n }\r\n\r\n dynamicField?: {\r\n sourceID: string;\r\n sourceTypeKey: string;\r\n sourceLovKey: string;\r\n }\r\n\r\n width?: any;\r\n format?: string;\r\n hiddenConditions?: Condition;\r\n\r\n onValueChange?: ValueChange[];\r\n}\r\n\r\nexport interface LovDependency {\r\n dependentTo: string;\r\n filterKey: string;\r\n preFilter?: boolean;\r\n}\r\n\r\nexport interface ValueChange {\r\n event?: string;\r\n target?: string;\r\n value?: any;\r\n}\r\n\r\nexport class ValueChangeEvent {\r\n static readonly ADD_DAYS = 'ADD_DAYS';\r\n static readonly ADD_MONTHS = 'ADD_MONTHS';\r\n static readonly ADD_YEARS = 'ADD_YEARS';\r\n static readonly GET_DEFAULT_VALUE_REINS = 'GET_DEFAULT_VALUE_REINS';\r\n}\r\n\r\nexport interface ModeState {\r\n onCreate: boolean;\r\n onModify: boolean;\r\n}\r\n\r\nexport interface LinkDetail {\r\n url: string;\r\n id: string;\r\n target?: string;\r\n}\r\n\r\nexport interface NxeLayoutItem {\r\n id?: string;\r\n layoutType?: string;\r\n label?: string;\r\n className?: string;\r\n gridItem?: NxeGridItem;\r\n children?: NxeLayoutItem[];\r\n gridColumn?: number;\r\n}\r\n\r\nexport class LayoutType {\r\n static readonly DIVIDER = 'DIVIDER';\r\n static readonly CONTAINER = 'CONTAINER';\r\n static readonly GRID_ITEM = 'GRID_ITEM';\r\n static readonly GRID_CONTAINER = 'GRID_CONTAINER';\r\n}\r\n","export class DataType {\r\n static readonly TXT = 'TXT';\r\n static readonly TXM = 'TXM';\r\n static readonly NUM = 'NUM';\r\n static readonly DTE = 'DTE';\r\n static readonly LNK = 'LNK';\r\n static readonly TXA = 'TXA';\r\n static readonly ACT = 'ACT';\r\n static readonly LOV = 'LOV';\r\n static readonly LOM = 'LOM';\r\n static readonly CHK = 'CHK';\r\n static readonly HTM = 'HTM';\r\n static readonly GRD = 'GRD';\r\n static readonly IMG = 'IMG';\r\n static readonly DRD = 'DRD';\r\n static readonly DYN = 'DYN';\r\n}\r\n","export class ActionCode {\r\n static readonly LIST = 'LST';\r\n static readonly VIEW = 'VIE';\r\n static readonly CREATE = 'CRT';\r\n static readonly VALIDATE = 'VAL';\r\n static readonly FINALIZE = 'FIN';\r\n static readonly APPROVAL = 'APP';\r\n static readonly MODIFY = 'MOD';\r\n static readonly DELETE = 'DEL';\r\n static readonly CANCEL = 'CAN';\r\n static readonly EXTEND_DUE_DATE = 'EXD';\r\n static readonly CONFIRM = 'CON';\r\n static readonly BINDING = 'BIN';\r\n static readonly REVERSE = 'REV';\r\n static readonly CALCULATE = 'CAL';\r\n static readonly SEND_FOR_APPROVAL = 'STA';\r\n static readonly PLACEMENT = 'PLA';\r\n static readonly DIVIDER = 'divider';\r\n static readonly RUN = 'RUN';\r\n static readonly ACTIVATED = 'ACT';\r\n static readonly TERMINATED = 'TRM';\r\n static readonly RESET_PASS = 'RST';\r\n static readonly LOCK = 'LOC';\r\n static readonly UNLOCK = 'UNL';\r\n static readonly POSTING = 'POS';\r\n static readonly UNPOSTING = 'UNP';\r\n static readonly EXTRACT = 'EXT';\r\n static readonly BIND = 'BND';\r\n static readonly NEW = 'NEW';\r\n static readonly ADD_SUB_TREATY = 'ADD_SUB_TREATY';\r\n static readonly CORRECTION = 'COR';\r\n static readonly CONVERT_TO_PROPOSAL = 'PRO';\r\n static readonly DOWNLOAD = 'PRV';\r\n static readonly SEND = 'SND';\r\n static readonly ISSUE = 'ISS';\r\n static readonly REACTIVATE = 'RAC';\r\n static readonly PRINT = 'PRT';\r\n static readonly TERMINATE = 'TRM';\r\n static readonly ADD_TO_PAYMENT = 'ADD_TO_PAYMENT';\r\n static readonly ROLLBACK = 'ROL';\r\n}\r\n\r\nexport const ACTION_MAPPER = {\r\n [ActionCode.CREATE]: getActionNew,\r\n [ActionCode.VIEW]: getActionView,\r\n [ActionCode.MODIFY]: getActionModify,\r\n [ActionCode.DELETE]: getActionDelete,\r\n [ActionCode.VALIDATE]: getActionValidate,\r\n [ActionCode.EXTRACT]: getActionExtract,\r\n [ActionCode.ADD_TO_PAYMENT]: getActionAddToPayment,\r\n [ActionCode.ACTIVATED]: getActionActivated,\r\n [ActionCode.TERMINATED]: getActionTerminate,\r\n [ActionCode.RESET_PASS]: getActionResetPassword,\r\n [ActionCode.LOCK]: getActionLock,\r\n [ActionCode.UNLOCK]: getActionUnlock,\r\n}\r\n\r\nexport function getActionView(disabled = false) {\r\n return {\r\n value: ActionCode.VIEW,\r\n text: 'View',\r\n icon: 'eye',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionRollback(disabled = false) {\r\n return {\r\n value: ActionCode.ROLLBACK,\r\n text: 'Rollback',\r\n icon: 'undo',\r\n disabled,\r\n }\r\n}\r\nexport function getActionNew(disabled = false) {\r\n return {\r\n value: ActionCode.NEW,\r\n text: 'New',\r\n icon: 'add',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionSend(disabled = false) {\r\n return {\r\n value: ActionCode.SEND,\r\n text: 'Send to Ceding',\r\n icon: 'swap_horiz',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionAddSubTreaty(disabled = false) {\r\n return {\r\n value: ActionCode.ADD_SUB_TREATY,\r\n text: 'Add Sub Treaty',\r\n icon: 'add',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionCorrection(disabled = false) {\r\n return {\r\n value: ActionCode.CORRECTION,\r\n text: 'Correction',\r\n icon: 'list',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionConvertToProposal(disabled = false) {\r\n return {\r\n value: ActionCode.CONVERT_TO_PROPOSAL,\r\n text: 'Convert to Proposal',\r\n icon: 'published_with_changes',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionBind(disabled = false) {\r\n return {\r\n value: ActionCode.BIND,\r\n text: 'Bind',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionPosting(disabled = false) {\r\n return {\r\n value: ActionCode.POSTING,\r\n text: 'Posting',\r\n icon: 'redo',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionExtract(disabled = false) {\r\n return {\r\n value: ActionCode.EXTRACT,\r\n text: 'Extract',\r\n icon: 'functions',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionUnposting(disabled = false) {\r\n return {\r\n value: ActionCode.UNPOSTING,\r\n text: 'UnPosting',\r\n icon: 'undo',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionRun(disabled = false) {\r\n return {\r\n value: ActionCode.RUN,\r\n text: 'Run',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\n\r\nexport function getActionValidate(disabled = false) {\r\n return {\r\n value: ActionCode.VALIDATE,\r\n text: 'Validate',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\n\r\nexport function getActionAddToPayment(disabled = false) {\r\n return {\r\n value: ActionCode.ADD_TO_PAYMENT,\r\n text: 'Add to Payment',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionIssue(disabled = false) {\r\n return {\r\n value: ActionCode.ISSUE,\r\n text: 'Issue',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionReactivate(disabled = false) {\r\n return {\r\n value: ActionCode.REACTIVATE,\r\n text: 'Reactivate',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionDownload(disabled = false) {\r\n return {\r\n value: ActionCode.DOWNLOAD,\r\n text: 'Preview',\r\n icon: 'download',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionFinalize(disabled = false) {\r\n return {\r\n value: ActionCode.FINALIZE,\r\n text: 'Finalize',\r\n icon: 'timeline',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionSendForApproval(disabled = false, text = 'Send for Approval') {\r\n return {\r\n value: ActionCode.SEND_FOR_APPROVAL,\r\n text,\r\n icon: 'send',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionPlacement(disabled = false, text = 'Placement') {\r\n return {\r\n value: ActionCode.PLACEMENT,\r\n text,\r\n icon: 'swap_horiz',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionCalculate(disabled = false) {\r\n return {\r\n value: ActionCode.CALCULATE,\r\n text: 'Calculate',\r\n icon: 'calculate',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionConfirm(disabled = false) {\r\n return {\r\n value: ActionCode.CONFIRM,\r\n text: 'Confirmation',\r\n icon: 'star',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionBinding(disabled = false) {\r\n return {\r\n value: ActionCode.BINDING,\r\n text: 'Binding',\r\n icon: 'star',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionReverse(disabled = false) {\r\n return {\r\n value: ActionCode.REVERSE,\r\n text: 'Reverse',\r\n icon: 'undo',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionDelete(disabled = false) {\r\n return {\r\n value: ActionCode.DELETE,\r\n text: 'Delete',\r\n icon: 'delete',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionCancel(disabled = false) {\r\n return {\r\n value: ActionCode.CANCEL,\r\n text: 'Cancel',\r\n icon: 'close',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionExtendDueDate(disabled = false) {\r\n return {\r\n value: ActionCode.EXTEND_DUE_DATE,\r\n text: 'Extend Due Date',\r\n icon: 'autorenew',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionApproval(disabled = false) {\r\n return {\r\n value: ActionCode.APPROVAL,\r\n text: 'Approval',\r\n icon: 'done_all',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionPrint(disabled = false) {\r\n return {\r\n value: ActionCode.PRINT,\r\n text: 'Print',\r\n icon: 'print',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionDivider() {\r\n return {\r\n value: ActionCode.VALIDATE,\r\n text: 'Validate',\r\n icon: 'done',\r\n disabled: true,\r\n }\r\n}\r\n\r\nexport function getActionModify(disabled = false) {\r\n return {\r\n value: ActionCode.MODIFY,\r\n text: 'Modify',\r\n icon: 'edit',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionActivated(disabled = false) {\r\n return {\r\n value: ActionCode.ACTIVATED,\r\n text: 'Activate',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionTerminated(disabled = false) {\r\n return {\r\n value: ActionCode.TERMINATED,\r\n text: 'Terminate',\r\n icon: 'close',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionResetPassword(disabled = false) {\r\n return {\r\n value: ActionCode.RESET_PASS,\r\n text: 'Reset Password',\r\n icon: 'settings_backup_restore',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionLock(disabled = false) {\r\n return {\r\n value: ActionCode.LOCK,\r\n text: 'Lock',\r\n icon: 'lock',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionUnlock(disabled = false) {\r\n return {\r\n value: ActionCode.UNLOCK,\r\n text: 'Unlock',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionTerminate(disabled = false, text = 'Terminate') {\r\n return {\r\n value: ActionCode.TERMINATE,\r\n text,\r\n icon: 'close',\r\n disabled,\r\n }\r\n}\r\n","export class PageMode {\r\n static readonly VIEW = 'View';\r\n static readonly MODIFY = 'Modify';\r\n static readonly ADD = 'New';\r\n}\r\n","import { FormControl, FormGroup, Validators } from '@angular/forms';\r\nimport { NxeGridItem, NxeLayoutItem } from '../metadata/data-grid.interface';\r\nimport { ModuleMetadata } from '../interfaces/module.interface';\r\nimport { DataType } from '../metadata/data-grid.const';\r\n\r\nexport function extractGridItems(layoutItems: NxeLayoutItem[], existingGridItems: NxeGridItem[] = []) {\r\n layoutItems.forEach((item) => {\r\n if (item.gridItem) {\r\n existingGridItems.push(item.gridItem);\r\n }\r\n if (item.children?.length > 0) {\r\n extractGridItems(item.children, existingGridItems);\r\n }\r\n });\r\n return existingGridItems;\r\n}\r\n\r\nexport function createFormGroup(gridItems: any[], module: ModuleMetadata, lov: any): FormGroup {\r\n const formGroup = new FormGroup({});\r\n\r\n gridItems.forEach(gridItem => {\r\n const validators = [];\r\n\r\n // if (gridItem.required) {\r\n // validators.push(Validators.required);\r\n // }\r\n\r\n let value = null;\r\n if (gridItem.dataType === DataType.CHK) {\r\n value = false;\r\n }\r\n\r\n const formControl = new FormControl(value, validators);\r\n\r\n if (gridItem.fixedValue !== null && gridItem.fixedValue !== undefined) {\r\n formControl.setValue(gridItem.fixedValue);\r\n // formControl.removeValidators(Validators.required);\r\n }\r\n\r\n formGroup.addControl(gridItem.id, formControl);\r\n });\r\n\r\n gridItems.forEach(gridItem => {\r\n if (gridItem?.lovDependency) {\r\n const dependencies = Array.isArray(gridItem.lovDependency) ? gridItem.lovDependency : [gridItem.lovDependency];\r\n lov[gridItem.lov] = [];\r\n\r\n dependencies.forEach(dep => {\r\n const depControl = formGroup.get(dep.dependentTo);\r\n if (!depControl) return;\r\n depControl.valueChanges\r\n .subscribe(() => {\r\n lov[gridItem.lov] = lov['all'].filter((l) => {\r\n if (l.lovType !== gridItem.lov) return false;\r\n return dependencies.every(d => {\r\n const depValue = formGroup.get(d.dependentTo)?.value;\r\n return depValue == null || l[d.filterKey]?.split(',').includes(depValue);\r\n });\r\n });\r\n\r\n const currentFormControl = formGroup.get(gridItem.id);\r\n const currentValue = currentFormControl.value;\r\n const currentLov = lov[gridItem.lov];\r\n\r\n if (gridItem.dataType === DataType.LOM) {\r\n const newValue = (currentValue as string[])?.filter(v =>\r\n currentLov.some(l => l.lovCode === v)\r\n );\r\n currentFormControl.setValue(newValue);\r\n } else {\r\n if (!currentLov.find(l => l.lovCode === currentValue)) {\r\n currentFormControl.patchValue(null);\r\n }\r\n }\r\n });\r\n });\r\n }\r\n });\r\n\r\n if (module.id) {\r\n const idValue = module.id.endsWith(\"ID\") ? 0 : null;\r\n formGroup.addControl(module.id, new FormControl(idValue));\r\n }\r\n\r\n return formGroup;\r\n}\r\n","export function removeEmptyObject(obj: object): object {\r\n const result = {};\r\n Object.entries(obj).forEach(([ k, v ]) => {\r\n if (v !== null && v !== '') {\r\n result[k] = v;\r\n }\r\n });\r\n\r\n return result;\r\n}\r\n\r\nexport function filterQueryParams(obj: Object) {\r\n obj = cloneDeep(obj);\r\n obj = removeEmptyObject(obj);\r\n const result = {};\r\n\r\n Object.entries(obj).forEach(([ k, v ]) => {\r\n if (isArray(v)) {\r\n let temp = '';\r\n v.forEach((e, i) => {\r\n temp += e;\r\n if (v.length - 1 !== i) {\r\n temp += `,`;\r\n }\r\n });\r\n result[k] = temp;\r\n } else if (v instanceof Date) {\r\n result[k] = toDateString(v);\r\n } else {\r\n result[k] = v;\r\n }\r\n });\r\n return result;\r\n}\r\n\r\nfunction cloneDeep(value: any, visited = new WeakMap()) {\r\n // Handle primitive types and functions\r\n if (value === null || typeof value !== 'object') return value;\r\n\r\n // Handle circular references\r\n if (visited.has(value)) return visited.get(value);\r\n\r\n // Clone array\r\n if (isArray(value)) {\r\n const arrCopy = [];\r\n visited.set(value, arrCopy);\r\n for (let i = 0; i < value.length; i++) {\r\n arrCopy[i] = cloneDeep(value[i], visited);\r\n }\r\n return arrCopy;\r\n }\r\n\r\n // Clone object\r\n const objCopy = {};\r\n visited.set(value, objCopy);\r\n for (const key in value) {\r\n if (value.hasOwnProperty(key)) {\r\n objCopy[key] = cloneDeep(value[key], visited);\r\n }\r\n }\r\n return objCopy;\r\n}\r\n\r\nfunction isArray(value: any) {\r\n return Object.prototype.toString.call(value) === '[object Array]';\r\n}\r\n\r\nexport function arrayToString(input: string[]) {\r\n let temp = '';\r\n input.forEach((e, i) => {\r\n temp += e;\r\n if (input.length - 1 !== i) {\r\n temp += `,`;\r\n }\r\n });\r\n return temp;\r\n}\r\n\r\nexport function downloadFile(data: any, fileName = 'excel.xlsx') {\r\n let blob = new Blob([ data ]);\r\n let url = window.URL.createObjectURL(blob);\r\n const a = document.createElement('a');\r\n a.href = url;\r\n a.download = fileName;\r\n a.click();\r\n}\r\n\r\nexport function previewPDF(data: any, fileName = 'report.pdf') {\r\n let blob = new Blob([ data ], { type: 'application/pdf' });\r\n let url = window.URL.createObjectURL(blob);\r\n window.open(url, '_blank');\r\n}\r\n\r\nexport function constructUrlWithQueryParams(baseUrl: string, queryParams: any): string {\r\n const queryString = Object.keys(queryParams).map((key) => key + '=' + queryParams[key]).join('&');\r\n return `${ baseUrl }?${ queryString }`;\r\n}\r\n\r\nexport function toDateString(date: Date) {\r\n return date.toDateString();\r\n}\r\n","import { Lov } from '../interfaces/lov.interface';\r\n\r\nexport function mapLov(input: any, lov: Lov[]) {\r\n const result: any = {};\r\n Object.keys(input).forEach(key => {\r\n result[key] = lov.filter(l => l.lovType === input[key]);\r\n });\r\n result['all'] = lov;\r\n return result;\r\n}\r\n\r\nexport function mapOriginalLov(lov: Lov[]) {\r\n const result: any = lov.reduce((acc, item) => {\r\n const key = item.lovType; // The property to group by\r\n if (!acc[key]) {\r\n acc[key] = []; // Initialize the group if it doesn't exist\r\n }\r\n acc[key].push(item); // Add the current item to the group\r\n return acc;\r\n }, {});\r\n result['all'] = lov;\r\n return result;\r\n}\r\n","import { computed, Signal } from '@angular/core';\r\nimport { PageMode } from '../consts/page.const';\r\n\r\nexport class ModeSignalHelper {\r\n isView: Signal<boolean>;\r\n isModify: Signal<boolean>;\r\n isAdd: Signal<boolean>;\r\n\r\n constructor(mode: Signal<string>) {\r\n // Destructuring the returned object from the helper method\r\n const { isView, isModify, isAdd } = ModeSignalHelper.createModeSignals(mode);\r\n\r\n this.isView = isView;\r\n this.isModify = isModify;\r\n this.isAdd = isAdd;\r\n }\r\n\r\n /**\r\n * Generates computed signals for the provided mode signal.\r\n */\r\n static createModeSignals(mode: Signal<string>) {\r\n const isView = computed(() => mode() === PageMode.VIEW || mode() === 'detail');\r\n const isModify = computed(() => mode() === PageMode.MODIFY || mode() === 'modify');\r\n const isAdd = computed(() => mode() === PageMode.ADD);\r\n\r\n return { isView: isView, isModify, isAdd };\r\n }\r\n}\r\n","export function sortSequence(a, b) {\r\n // First compare by sequenceNo\r\n if (a.sequenceNo < b.sequenceNo) return -1;\r\n if (a.sequenceNo > b.sequenceNo) return 1;\r\n\r\n // If sequenceNo is the same, compare by lovName\r\n if (a.lovName < b.lovName) return -1;\r\n if (a.lovName > b.lovName) return 1;\r\n\r\n // If both sequenceNo and lovName are the same\r\n return 0;\r\n}\r\n","export function trackChanges(oldArray: any[], newArray: any[], keysToCompare: string[], idKey: string) {\r\n let result = [];\r\n\r\n // Helper function to create a unique key based on specific fields\r\n function createKey(item, keys) {\r\n return keys\r\n .map(key => {\r\n let value = item[key];\r\n if (Array.isArray(value)) {\r\n return value.slice().sort().join('+'); // Sort and join array elements using '+'\r\n }\r\n return value;\r\n })\r\n .join('|');\r\n }\r\n\r\n\r\n // Convert old and new arrays to maps for easier comparison\r\n let oldMap = new Map(oldArray.map(item => [createKey(item, keysToCompare), item]));\r\n let newMap = new Map(newArray.map(item => [createKey(item, keysToCompare), item]));\r\n\r\n // Track deleted and unchanged/modified items\r\n for (let [key, oldItem] of oldMap) {\r\n const modifiedValue = checkExist(newMap, idKey, oldItem[idKey]);\r\n if (!newMap.has(key)) {\r\n if (modifiedValue) {\r\n result.push({ ...modifiedValue, action: 'MOD' }); // Deleted\r\n } else {\r\n result.push({ ...oldItem, action: 'DEL' }); // Deleted\r\n }\r\n }\r\n }\r\n\r\n // Track created items\r\n for (let [key, newItem] of newMap) {\r\n if (!oldMap.has(key) && !newItem[idKey] ) {\r\n result.push({ ...newItem, action: 'CRT' }); // Created\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\n\r\nfunction checkExist(myMap: Map<string, any>, idKey: string, value: number) {\r\n if (!value) {\r\n return false;\r\n }\r\n for (let [key, myItem] of myMap) {\r\n if (myItem[idKey] === value) {\r\n return myItem;\r\n }\r\n }\r\n return false;\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { ACTION_MAPPER } from '../consts/action.const';\r\n\r\n@Pipe({\r\n name: 'actionCode'\r\n})\r\nexport class ActionCodePipe implements PipeTransform {\r\n actionMapper: any = ACTION_MAPPER;\r\n\r\n transform(value: string): string {\r\n if (this.actionMapper.hasOwnProperty(value)) {\r\n return this.actionMapper[value].text;\r\n }\r\n return value;\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'null',\r\n standalone: true\r\n})\r\nexport class NullPipe implements PipeTransform {\r\n\r\n transform(value: unknown): unknown {\r\n try {\r\n if (value === null || value === undefined || (Array.isArray(value) && value.length === 0) || value === '') {\r\n return \"-\";\r\n } else {\r\n return value;\r\n }\r\n } catch (e) {\r\n return '-';\r\n }\r\n }\r\n\r\n}\r\n","import { AfterViewInit, Directive, ElementRef, Input, Renderer2 } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[nxeBadge]'\r\n})\r\nexport class BadgeDirective implements AfterViewInit {\r\n @Input() nxeBadge: string | number = ''; // Badge text\r\n @Input() badgeColor: string = 'red'; // Default badge color\r\n @Input() badgePosition: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' = 'top-right';\r\n\r\n private badgeElement: HTMLElement | null = null;\r\n\r\n constructor(private el: ElementRef, private renderer: Renderer2) {}\r\n\r\n ngOnChanges(): void {\r\n this.updateBadge();\r\n }\r\n\r\n private updateBadge() {\r\n if (this.badgeElement) {\r\n this.renderer.removeChild(this.el.nativeElement, this.badgeElement);\r\n }\r\n\r\n if (!this.nxeBadge) return;\r\n\r\n this.badgeElement = this.renderer.createElement('div');\r\n this.renderer.addClass(this.badgeElement, 'nxe-badge');\r\n this.renderer.setStyle(this.badgeElement, 'z-index', 999);\r\n this.renderer.setStyle(this.badgeElement, 'background', this.badgeColor);\r\n this.renderer.setProperty(this.badgeElement, 'innerText', this.nxeBadge.toString());\r\n\r\n this.applyPosition();\r\n\r\n this.renderer.appendChild(this.el.nativeElement, this.badgeElement);\r\n }\r\n\r\n private applyPosition() {\r\n const positionStyles: Record<string, string> = {\r\n 'top-right': 'top: 0; right: 0;',\r\n 'top-left': 'top: 0; left: 0;',\r\n 'bottom-right': 'bottom: 0; right: 0;',\r\n 'bottom-left': 'bottom: 0; left: 0;',\r\n };\r\n\r\n if (this.badgeElement) {\r\n this.renderer.setStyle(this.badgeElement, 'position', 'absolute');\r\n this.renderer.setStyle(this.badgeElement, 'transform', 'translate(50%, -50%)');\r\n this.renderer.setAttribute(this.badgeElement, 'style', positionStyles[this.badgePosition]);\r\n }\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (this.el) {\r\n this.renderer.setStyle(this.el.nativeElement, 'position', 'relative');\r\n }\r\n\r\n }\r\n}\r\n","import {\r\n Directive,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n TemplateRef,\r\n ViewContainerRef,\r\n} from '@angular/core';\r\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\r\nimport { TemplatePortal } from '@angular/cdk/portal';\r\n\r\n@Directive({\r\n selector: '[nxeMenu]',\r\n})\r\nexport class NxeMenu {\r\n @Input('nxeMenu') menuTemplate!: TemplateRef<any>;\r\n\r\n private overlayRef: OverlayRef | null = null;\r\n\r\n constructor(\r\n private el: ElementRef,\r\n private overlay: Overlay,\r\n private viewContainerRef: ViewContainerRef\r\n ) {}\r\n\r\n @HostListener('click', ['$event'])\r\n toggleMenu(event: Event) {\r\n event.stopPropagation();\r\n if (this.overlayRef) {\r\n this.closeMenu();\r\n } else {\r\n this.openMenu();\r\n }\r\n }\r\n\r\n @HostListener('document:click', ['$event'])\r\n onClickOutside(event: Event) {\r\n if (this.overlayRef && !this.el.nativeElement.contains(event.target)) {\r\n this.closeMenu();\r\n }\r\n }\r\n\r\n private openMenu() {\r\n const positionStrategy = this.overlay\r\n .position()\r\n .flexibleConnectedTo(this.el.nativeElement)\r\n .withPositions([\r\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\r\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\r\n ]);\r\n\r\n this.overlayRef = this.overlay.create({ positionStrategy });\r\n\r\n // Fix: Use TemplatePortal instead of ComponentPortal\r\n const portal = new TemplatePortal(this.menuTemplate, this.viewContainerRef);\r\n this.overlayRef.attach(portal);\r\n }\r\n\r\n private closeMenu() {\r\n this.overlayRef?.detach();\r\n this.overlayRef = null;\r\n }\r\n}\r\n","import {\r\n ApplicationRef,\r\n ComponentRef,\r\n createComponent,\r\n EnvironmentInjector,\r\n inject,\r\n Injectable,\r\n Injector,\r\n Renderer2,\r\n RendererFactory2,\r\n Type,\r\n} from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\n\r\n/**\r\n * Opens a component in a centred, click-to-dismiss backdrop and resolves when it closes.\r\n *\r\n * Ported from nextera-library with one required change: `ComponentFactoryResolver` and\r\n * `resolveComponentFactory()` are Ivy-era shims that no longer exist in Angular 22, so\r\n * instantiation goes through `createComponent()` instead. The behaviour is the same —\r\n * the component is created outside any view, attached to the ApplicationRef so it takes\r\n * part in change detection, and appended to the backdrop element.\r\n *\r\n * `data` is assigned onto the instance before the view is attached, so the component sees\r\n * its inputs on first render rather than one cycle late.\r\n */\r\n@Injectable({ providedIn: 'root' })\r\nexport class NxeModalService {\r\n private readonly injector = inject(Injector);\r\n private readonly environmentInjector = inject(EnvironmentInjector);\r\n private readonly applicationRef = inject(ApplicationRef);\r\n private readonly renderer: Renderer2 = inject(RendererFactory2).createRenderer(null, null);\r\n\r\n private componentRef?: ComponentRef<unknown>;\r\n private backdropElement?: HTMLElement;\r\n private closeSubject?: Subject<unknown>;\r\n\r\n open<T>(component: Type<T>, data?: Record<string, unknown>): Observable<unknown> {\r\n this.closeSubject = new Subject<unknown>();\r\n this.createBackdrop();\r\n\r\n const componentRef = createComponent(component, {\r\n environmentInjector: this.environmentInjector,\r\n elementInjector: this.injector,\r\n });\r\n\r\n if (data) {\r\n Object.assign(componentRef.instance as object, data);\r\n }\r\n\r\n this.applicationRef.attachView(componentRef.hostView);\r\n this.renderer.appendChild(this.backdropElement, componentRef.location.nativeElement);\r\n this.componentRef = componentRef;\r\n\r\n return this.closeSubject.asObservable();\r\n }\r\n\r\n close(result?: unknown): void {\r\n if (this.componentRef) {\r\n this.applicationRef.detachView(this.componentRef.hostView);\r\n this.componentRef.destroy();\r\n this.componentRef = undefined;\r\n }\r\n if (this.backdropElement) {\r\n this.renderer.removeChild(document.body, this.backdropElement);\r\n this.backdropElement = undefined;\r\n }\r\n this.closeSubject?.next(result);\r\n this.closeSubject?.complete();\r\n }\r\n\r\n private createBackdrop(): void {\r\n const el = this.renderer.createElement('div') as HTMLElement;\r\n this.renderer.addClass(el, 'modal-backdrop');\r\n const style: Record<string, string> = {\r\n position: 'fixed',\r\n top: '0',\r\n left: '0',\r\n width: '100%',\r\n height: '100%',\r\n background: 'rgba(0, 0, 0, 0.5)',\r\n 'z-index': '1000',\r\n display: 'flex',\r\n 'align-items': 'center',\r\n 'justify-content': 'center',\r\n };\r\n for (const [prop, value] of Object.entries(style)) {\r\n this.renderer.setStyle(el, prop, value);\r\n }\r\n\r\n this.renderer.listen(el, 'click', () => this.close());\r\n document.body.appendChild(el);\r\n this.backdropElement = el;\r\n }\r\n}\r\n","// @nexterajs/app-kit — public API.\r\n//\r\n// The metadata-driven application framework that used to ship inside nextera-library:\r\n// module/page metadata, action constants, and the pure helpers built on them. It is\r\n// deliberately separate from @nexterajs/ui — this half is coupled to a specific backend\r\n// shape, and an app that only wants components should not have to take it.\r\n\r\n/* Module metadata — the shape a module declares its pages with */\r\nexport * from './lib/interfaces/module.interface';\r\nexport * from './lib/interfaces/action.interface';\r\nexport * from './lib/interfaces/lov.interface';\r\nexport * from './lib/interfaces/http.interface';\r\nexport * from './lib/metadata/data-grid.interface';\r\nexport * from './lib/metadata/data-grid.const';\r\n\r\n/* Constants */\r\nexport * from './lib/consts/action.const';\r\nexport * from './lib/consts/page.const';\r\n\r\n/* Helpers */\r\nexport * from './lib/helpers/generic.helper';\r\nexport * from './lib/helpers/http.helper';\r\nexport * from './lib/helpers/lov.helper';\r\nexport * from './lib/helpers/signal.helper';\r\nexport * from './lib/helpers/sort.helper';\r\nexport * from './lib/helpers/tracker.helper';\r\n\r\n/* Pipes */\r\nexport * from './lib/pipes/action-code.pipe';\r\nexport * from './lib/pipes/null.pipe';\r\n\r\n/* Directives */\r\nexport * from './lib/directives/badge.directive';\r\nexport * from './lib/directives/menu.directive';\r\n\r\n/* Services */\r\nexport * from './lib/services/modal.service';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MA6Ea,eAAe,CAAA;AAC1B,IAAA,OAAgB,WAAW,GAAG,KAAK;AACnC,IAAA,OAAgB,OAAO,GAAG,IAAI;AAC9B,IAAA,OAAgB,MAAM,GAAG,GAAG;AAC5B,IAAA,OAAgB,SAAS,GAAG,IAAI;;MAGrB,aAAa,CAAA;AACxB,IAAA,OAAgB,WAAW,GAAG,KAAK;AACnC,IAAA,OAAgB,OAAO,GAAG,IAAI;AAC9B,IAAA,OAAgB,MAAM,GAAG,GAAG;AAC5B,IAAA,OAAgB,SAAS,GAAG,IAAI;;MAGrB,aAAa,CAAA;AACxB,IAAA,OAAgB,KAAK,GAAG,OAAO;AAC/B,IAAA,OAAgB,MAAM,GAAI,QAAQ;;MAGvB,iBAAiB,CAAA;AAC5B,IAAA,OAAgB,GAAG,GAAG,KAAK;AAC3B,IAAA,OAAgB,EAAE,GAAI,IAAI;;MAkBf,kBAAkB,CAAA;AAC7B,IAAA,OAAO,QAAQ,CAAC,IAAyB,EAAE,SAAoB,EAAA;QAC7D,IAAI,SAAS,CAAC,IAAI,KAAK,aAAa,CAAC,MAAM,EAAE;YAC3C,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC;QAC7C;AAEA,QAAA,IAAI,SAAS,CAAC,IAAI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E,OAAO;AACjB,YAAA,GAAG,EAAE,GAAG;AACR,YAAA,IAAI,EAAE,GAAG;AACT,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,UAAU,EAAE,oBAAoB;AAChC,YAAA,SAAS,EAAE,MAAM;AACjB,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,aAAa,EAAE,QAAQ;AACvB,YAAA,iBAAiB,EAAE,QAAQ;SAC9B;AACD,QAAA,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YAC/C,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC;QAC3C;AAEA,QAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;AACrD,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;AAC7B,QAAA,IAAI,CAAC,eAAe,GAAG,EAAE;IAC7B;uGAlES,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAf,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA;;2FACnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;AC1BlC;AACA;AACA;AACA;AACA;AACA;AAEA;;ACPA;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"nexterajs-app-kit.mjs","sources":["../../../projects/nextera-app-kit/src/lib/interfaces/module.interface.ts","../../../projects/nextera-app-kit/src/lib/interfaces/lov.interface.ts","../../../projects/nextera-app-kit/src/lib/metadata/data-grid.interface.ts","../../../projects/nextera-app-kit/src/lib/metadata/data-grid.const.ts","../../../projects/nextera-app-kit/src/lib/consts/action.const.ts","../../../projects/nextera-app-kit/src/lib/consts/page.const.ts","../../../projects/nextera-app-kit/src/lib/helpers/array.helper.ts","../../../projects/nextera-app-kit/src/lib/helpers/generic.helper.ts","../../../projects/nextera-app-kit/src/lib/helpers/object.helper.ts","../../../projects/nextera-app-kit/src/lib/helpers/http.helper.ts","../../../projects/nextera-app-kit/src/lib/helpers/id.helper.ts","../../../projects/nextera-app-kit/src/lib/helpers/jwt.helper.ts","../../../projects/nextera-app-kit/src/lib/helpers/lov.helper.ts","../../../projects/nextera-app-kit/src/lib/helpers/signal.helper.ts","../../../projects/nextera-app-kit/src/lib/helpers/sort.helper.ts","../../../projects/nextera-app-kit/src/lib/helpers/tracker.helper.ts","../../../projects/nextera-app-kit/src/lib/pipes/action-code.pipe.ts","../../../projects/nextera-app-kit/src/lib/pipes/null.pipe.ts","../../../projects/nextera-app-kit/src/lib/directives/badge.directive.ts","../../../projects/nextera-app-kit/src/lib/directives/menu.directive.ts","../../../projects/nextera-app-kit/src/lib/services/modal.service.ts","../../../projects/nextera-app-kit/src/public-api.ts","../../../projects/nextera-app-kit/src/nexterajs-app-kit.ts"],"sourcesContent":["import { ComponentRef } from '@angular/core';\r\nimport { NxeGridItem, NxeLayoutItem } from '../metadata/data-grid.interface';\r\n\r\nexport interface ModuleMetadata {\r\n section: string;\r\n icon: string;\r\n entityType: string;\r\n accessRight: string;\r\n packageCode?: string;\r\n webBaseUrl: string;\r\n apiBaseUrl: string;\r\n apiBaseUrlModifier?: string;\r\n uploadUrl: string;\r\n id: string;\r\n lov: string;\r\n lovMapper?: any;\r\n isTableMaintenance?: boolean;\r\n usePopup?: boolean;\r\n listPage?: ListPageMetadata\r\n createPage?: {\r\n forms: NxeLayoutItem[];\r\n }\r\n upsertPage?: UpsertPageMetadata;\r\n detailPage?: UpsertPageMetadata;\r\n}\r\n\r\nexport interface ListPageMetadata {\r\n create: boolean | any;\r\n hasSearchBox?: boolean;\r\n hasUploadButton?: boolean;\r\n selectable?: boolean;\r\n actions?: {\r\n actionItems: ActionItem[];\r\n gridItems?: NxeGridItem[];\r\n };\r\n tree?: {\r\n keyExpr: string;\r\n parentIdExpr: string;\r\n autoExpandAll: boolean;\r\n },\r\n filters: NxeGridItem[];\r\n gridItems: NxeGridItem[],\r\n masterDetail?: {\r\n apiUrl: string;\r\n gridItems: NxeGridItem[];\r\n }\r\n summary?: any;\r\n}\r\n\r\nexport interface UpsertPageMetadata {\r\n subheaders: NxeGridItem[];\r\n hasApproval?: boolean;\r\n isInlineModify?: boolean;\r\n actions?: {\r\n actionItems: ActionItem[];\r\n gridItems?: NxeGridItem[];\r\n };\r\n forms: NxeLayoutItem[];\r\n tabHeaderLabel?: string;\r\n tabContentLabel?: string;\r\n tabs?: { label: string; component: any, componentRef?: ComponentRef<any>, hiddenConditions?: Condition }[];\r\n}\r\n\r\nexport interface ActionItem {\r\n actionCode: string;\r\n overrideActionCode?: string;\r\n overrideUrl?: string;\r\n redirectAfterSuccessful?: string;\r\n disabledConditions?: ActionItemDisabledOn[];\r\n}\r\n\r\nexport interface ActionItemDisabledOn {\r\n key: string;\r\n operator: string;\r\n value: any;\r\n}\r\n\r\nexport class BooleanOperator {\r\n static readonly NOT_INCLUDE = 'NIN';\r\n static readonly INCLUDE = 'IN';\r\n static readonly EQUALS = '=';\r\n static readonly NOT_EQUAL = '!=';\r\n}\r\n\r\nexport class ValueOperator {\r\n static readonly NOT_INCLUDE = 'NIN';\r\n static readonly INCLUDE = 'IN';\r\n static readonly EQUALS = '=';\r\n static readonly NOT_EQUAL = '!=';\r\n}\r\n\r\nexport class ConditionType {\r\n static readonly GROUP = 'GROUP';\r\n static readonly SINGLE = 'SINGLE';\r\n}\r\n\r\nexport class ConditionOperator {\r\n static readonly AND = 'AND';\r\n static readonly OR = 'OR';\r\n}\r\n\r\nexport interface Condition {\r\n type: string;\r\n\r\n /*Type Group*/\r\n children?: Condition[];\r\n groupOperator?: string;\r\n\r\n\r\n /*Type Single*/\r\n key?: string;\r\n valueOperator?: string;\r\n value?: any;\r\n}\r\n\r\n\r\nexport class ConditionEvaluator {\r\n static evaluate(data: Record<string, any>, condition: Condition): boolean {\r\n if (condition.type === ConditionType.SINGLE) {\r\n return this.evaluateSingle(data, condition);\r\n }\r\n\r\n if (condition.type === ConditionType.GROUP && condition.children) {\r\n return this.evaluateGroup(data, condition);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private static evaluateSingle(data: Record<string, any>, condition: Condition): boolean {\r\n const { key, valueOperator, value } = condition;\r\n if (!key || !valueOperator) return false;\r\n\r\n const actualValue = data[key];\r\n\r\n switch (valueOperator) {\r\n case ValueOperator.EQUALS:\r\n return actualValue === value;\r\n case ValueOperator.NOT_EQUAL:\r\n return actualValue !== value;\r\n case ValueOperator.INCLUDE:\r\n return Array.isArray(value) ? value.includes(actualValue) : false;\r\n case ValueOperator.NOT_INCLUDE:\r\n return Array.isArray(value) ? !value.includes(actualValue) : false;\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n private static evaluateGroup(data: Record<string, any>, condition: Condition): boolean {\r\n const { children = [], groupOperator } = condition;\r\n\r\n if (groupOperator === ConditionOperator.AND) {\r\n return children.every(child => this.evaluate(data, child));\r\n }\r\n\r\n if (groupOperator === ConditionOperator.OR) {\r\n return children.some(child => this.evaluate(data, child));\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n","export interface Lov {\r\n defaultValue: string;\r\n isActive: string;\r\n lovCode: any;\r\n lovName: string;\r\n lovType: string;\r\n otherValue1: string;\r\n otherValue2: string;\r\n otherValue3: string;\r\n otherValue4: string;\r\n otherValue5: string;\r\n sequenceNo: number;\r\n}\r\n\r\ntype StringArrayMap<T extends readonly string[]> = {\r\n [K in T[number]]?: string[];\r\n};\r\n\r\nexport class MappedLov<T extends readonly string[]> {\r\n private map: StringArrayMap<T> = {} as any;\r\n\r\n constructor(initial?: StringArrayMap<T>) {\r\n if (initial) {\r\n this.map = initial;\r\n }\r\n }\r\n\r\n get<K extends T[number]>(key: K): string[] {\r\n return this.map[key] ?? [];\r\n }\r\n\r\n set<K extends T[number]>(key: K, value: string[]): void {\r\n this.map[key] = value;\r\n }\r\n\r\n has<K extends T[number]>(key: K): boolean {\r\n return key in this.map;\r\n }\r\n\r\n getRawMap(): Required<{ [K in T[number]]: string[] }> {\r\n return Object.fromEntries(\r\n this.keys.map(k => [k, this.get(k)])\r\n ) as any;\r\n }\r\n\r\n constructorKeys: T;\r\n\r\n get keys(): T[number][] {\r\n return [...(this.constructorKeys as unknown as string[])];\r\n }\r\n}\r\n","import { ActionItemDisabledOn, Condition } from '../interfaces/module.interface';\r\n\r\nexport interface Paging {\r\n pageNo: number;\r\n pageSize: number;\r\n totalRows: number;\r\n totalPages: number;\r\n}\r\n\r\nexport interface NxeGridItem {\r\n id: string;\r\n label: string;\r\n\r\n dataType?: string;\r\n\r\n lov?: string;\r\n lovDependency?: LovDependency | LovDependency[];\r\n\r\n pushToRight?: boolean;\r\n\r\n filterCount?: number;\r\n\r\n groupIndex?: number;\r\n\r\n valueExpr?: string;\r\n displayExpr?: string;\r\n\r\n readonly?: boolean;\r\n hidden?: boolean;\r\n min?: number;\r\n max?: number;\r\n alignment?: string;\r\n\r\n readonlyOnCreate?: boolean;\r\n readonlyOnModify?: boolean;\r\n readonlyCondition?: Condition;\r\n\r\n hiddenOnCreate?: boolean;\r\n hiddenOnModify?: boolean;\r\n hiddenOnGrid?: boolean;\r\n hiddenCondition?: Condition;\r\n\r\n shownVariable?: string;\r\n\r\n link?: LinkDetail;\r\n formattedLink?: string;\r\n\r\n defaultValue?: any;\r\n fixedValue?: any;\r\n defaultValueDynamic?: {\r\n from: string;\r\n propertyCode: string;\r\n }\r\n\r\n required?: boolean;\r\n\r\n gridItems?: NxeGridItem[];\r\n gridConfig?: {\r\n detailID: string;\r\n inlineEditing?: boolean;\r\n editable: boolean;\r\n deletable: boolean;\r\n isPrimaryHeader?: boolean;\r\n }\r\n\r\n dynamicField?: {\r\n sourceID: string;\r\n sourceTypeKey: string;\r\n sourceLovKey: string;\r\n }\r\n\r\n width?: any;\r\n format?: string;\r\n hiddenConditions?: Condition;\r\n\r\n onValueChange?: ValueChange[];\r\n}\r\n\r\nexport interface LovDependency {\r\n dependentTo: string;\r\n filterKey: string;\r\n preFilter?: boolean;\r\n}\r\n\r\nexport interface ValueChange {\r\n event?: string;\r\n target?: string;\r\n value?: any;\r\n}\r\n\r\nexport class ValueChangeEvent {\r\n static readonly ADD_DAYS = 'ADD_DAYS';\r\n static readonly ADD_MONTHS = 'ADD_MONTHS';\r\n static readonly ADD_YEARS = 'ADD_YEARS';\r\n static readonly GET_DEFAULT_VALUE_REINS = 'GET_DEFAULT_VALUE_REINS';\r\n}\r\n\r\nexport interface ModeState {\r\n onCreate: boolean;\r\n onModify: boolean;\r\n}\r\n\r\nexport interface LinkDetail {\r\n url: string;\r\n id: string;\r\n target?: string;\r\n}\r\n\r\nexport interface NxeLayoutItem {\r\n id?: string;\r\n layoutType?: string;\r\n label?: string;\r\n className?: string;\r\n gridItem?: NxeGridItem;\r\n children?: NxeLayoutItem[];\r\n gridColumn?: number;\r\n}\r\n\r\nexport class LayoutType {\r\n static readonly DIVIDER = 'DIVIDER';\r\n static readonly CONTAINER = 'CONTAINER';\r\n static readonly GRID_ITEM = 'GRID_ITEM';\r\n static readonly GRID_CONTAINER = 'GRID_CONTAINER';\r\n}\r\n","export class DataType {\r\n static readonly TXT = 'TXT';\r\n static readonly TXM = 'TXM';\r\n static readonly NUM = 'NUM';\r\n static readonly DTE = 'DTE';\r\n static readonly LNK = 'LNK';\r\n static readonly TXA = 'TXA';\r\n static readonly ACT = 'ACT';\r\n static readonly LOV = 'LOV';\r\n static readonly LOM = 'LOM';\r\n static readonly CHK = 'CHK';\r\n static readonly HTM = 'HTM';\r\n static readonly GRD = 'GRD';\r\n static readonly IMG = 'IMG';\r\n static readonly DRD = 'DRD';\r\n static readonly DYN = 'DYN';\r\n}\r\n","export class ActionCode {\r\n static readonly LIST = 'LST';\r\n static readonly VIEW = 'VIE';\r\n static readonly CREATE = 'CRT';\r\n static readonly VALIDATE = 'VAL';\r\n static readonly FINALIZE = 'FIN';\r\n static readonly APPROVAL = 'APP';\r\n static readonly MODIFY = 'MOD';\r\n static readonly DELETE = 'DEL';\r\n static readonly CANCEL = 'CAN';\r\n static readonly EXTEND_DUE_DATE = 'EXD';\r\n static readonly CONFIRM = 'CON';\r\n static readonly BINDING = 'BIN';\r\n static readonly REVERSE = 'REV';\r\n static readonly CALCULATE = 'CAL';\r\n static readonly SEND_FOR_APPROVAL = 'STA';\r\n static readonly PLACEMENT = 'PLA';\r\n static readonly DIVIDER = 'divider';\r\n static readonly RUN = 'RUN';\r\n static readonly ACTIVATED = 'ACT';\r\n static readonly TERMINATED = 'TRM';\r\n static readonly RESET_PASS = 'RST';\r\n static readonly LOCK = 'LOC';\r\n static readonly UNLOCK = 'UNL';\r\n static readonly POSTING = 'POS';\r\n static readonly UNPOSTING = 'UNP';\r\n static readonly EXTRACT = 'EXT';\r\n static readonly BIND = 'BND';\r\n static readonly NEW = 'NEW';\r\n static readonly ADD_SUB_TREATY = 'ADD_SUB_TREATY';\r\n static readonly CORRECTION = 'COR';\r\n static readonly CONVERT_TO_PROPOSAL = 'PRO';\r\n static readonly DOWNLOAD = 'PRV';\r\n static readonly SEND = 'SND';\r\n static readonly ISSUE = 'ISS';\r\n static readonly REACTIVATE = 'RAC';\r\n static readonly PRINT = 'PRT';\r\n static readonly TERMINATE = 'TRM';\r\n static readonly ADD_TO_PAYMENT = 'ADD_TO_PAYMENT';\r\n static readonly ROLLBACK = 'ROL';\r\n}\r\n\r\nexport const ACTION_MAPPER = {\r\n [ActionCode.CREATE]: getActionNew,\r\n [ActionCode.VIEW]: getActionView,\r\n [ActionCode.MODIFY]: getActionModify,\r\n [ActionCode.DELETE]: getActionDelete,\r\n [ActionCode.VALIDATE]: getActionValidate,\r\n [ActionCode.EXTRACT]: getActionExtract,\r\n [ActionCode.ADD_TO_PAYMENT]: getActionAddToPayment,\r\n [ActionCode.ACTIVATED]: getActionActivated,\r\n [ActionCode.TERMINATED]: getActionTerminate,\r\n [ActionCode.RESET_PASS]: getActionResetPassword,\r\n [ActionCode.LOCK]: getActionLock,\r\n [ActionCode.UNLOCK]: getActionUnlock,\r\n}\r\n\r\nexport function getActionView(disabled = false) {\r\n return {\r\n value: ActionCode.VIEW,\r\n text: 'View',\r\n icon: 'eye',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionRollback(disabled = false) {\r\n return {\r\n value: ActionCode.ROLLBACK,\r\n text: 'Rollback',\r\n icon: 'undo',\r\n disabled,\r\n }\r\n}\r\nexport function getActionNew(disabled = false) {\r\n return {\r\n value: ActionCode.NEW,\r\n text: 'New',\r\n icon: 'add',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionSend(disabled = false) {\r\n return {\r\n value: ActionCode.SEND,\r\n text: 'Send to Ceding',\r\n icon: 'swap_horiz',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionAddSubTreaty(disabled = false) {\r\n return {\r\n value: ActionCode.ADD_SUB_TREATY,\r\n text: 'Add Sub Treaty',\r\n icon: 'add',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionCorrection(disabled = false) {\r\n return {\r\n value: ActionCode.CORRECTION,\r\n text: 'Correction',\r\n icon: 'list',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionConvertToProposal(disabled = false) {\r\n return {\r\n value: ActionCode.CONVERT_TO_PROPOSAL,\r\n text: 'Convert to Proposal',\r\n icon: 'published_with_changes',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionBind(disabled = false) {\r\n return {\r\n value: ActionCode.BIND,\r\n text: 'Bind',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionPosting(disabled = false) {\r\n return {\r\n value: ActionCode.POSTING,\r\n text: 'Posting',\r\n icon: 'redo',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionExtract(disabled = false) {\r\n return {\r\n value: ActionCode.EXTRACT,\r\n text: 'Extract',\r\n icon: 'functions',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionUnposting(disabled = false) {\r\n return {\r\n value: ActionCode.UNPOSTING,\r\n text: 'UnPosting',\r\n icon: 'undo',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionRun(disabled = false) {\r\n return {\r\n value: ActionCode.RUN,\r\n text: 'Run',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\n\r\nexport function getActionValidate(disabled = false) {\r\n return {\r\n value: ActionCode.VALIDATE,\r\n text: 'Validate',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\n\r\nexport function getActionAddToPayment(disabled = false) {\r\n return {\r\n value: ActionCode.ADD_TO_PAYMENT,\r\n text: 'Add to Payment',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionIssue(disabled = false) {\r\n return {\r\n value: ActionCode.ISSUE,\r\n text: 'Issue',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionReactivate(disabled = false) {\r\n return {\r\n value: ActionCode.REACTIVATE,\r\n text: 'Reactivate',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionDownload(disabled = false) {\r\n return {\r\n value: ActionCode.DOWNLOAD,\r\n text: 'Preview',\r\n icon: 'download',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionFinalize(disabled = false) {\r\n return {\r\n value: ActionCode.FINALIZE,\r\n text: 'Finalize',\r\n icon: 'timeline',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionSendForApproval(disabled = false, text = 'Send for Approval') {\r\n return {\r\n value: ActionCode.SEND_FOR_APPROVAL,\r\n text,\r\n icon: 'send',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionPlacement(disabled = false, text = 'Placement') {\r\n return {\r\n value: ActionCode.PLACEMENT,\r\n text,\r\n icon: 'swap_horiz',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionCalculate(disabled = false) {\r\n return {\r\n value: ActionCode.CALCULATE,\r\n text: 'Calculate',\r\n icon: 'calculate',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionConfirm(disabled = false) {\r\n return {\r\n value: ActionCode.CONFIRM,\r\n text: 'Confirmation',\r\n icon: 'star',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionBinding(disabled = false) {\r\n return {\r\n value: ActionCode.BINDING,\r\n text: 'Binding',\r\n icon: 'star',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionReverse(disabled = false) {\r\n return {\r\n value: ActionCode.REVERSE,\r\n text: 'Reverse',\r\n icon: 'undo',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionDelete(disabled = false) {\r\n return {\r\n value: ActionCode.DELETE,\r\n text: 'Delete',\r\n icon: 'delete',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionCancel(disabled = false) {\r\n return {\r\n value: ActionCode.CANCEL,\r\n text: 'Cancel',\r\n icon: 'close',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionExtendDueDate(disabled = false) {\r\n return {\r\n value: ActionCode.EXTEND_DUE_DATE,\r\n text: 'Extend Due Date',\r\n icon: 'autorenew',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionApproval(disabled = false) {\r\n return {\r\n value: ActionCode.APPROVAL,\r\n text: 'Approval',\r\n icon: 'done_all',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionPrint(disabled = false) {\r\n return {\r\n value: ActionCode.PRINT,\r\n text: 'Print',\r\n icon: 'print',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionDivider() {\r\n return {\r\n value: ActionCode.VALIDATE,\r\n text: 'Validate',\r\n icon: 'done',\r\n disabled: true,\r\n }\r\n}\r\n\r\nexport function getActionModify(disabled = false) {\r\n return {\r\n value: ActionCode.MODIFY,\r\n text: 'Modify',\r\n icon: 'edit',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionActivated(disabled = false) {\r\n return {\r\n value: ActionCode.ACTIVATED,\r\n text: 'Activate',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionTerminated(disabled = false) {\r\n return {\r\n value: ActionCode.TERMINATED,\r\n text: 'Terminate',\r\n icon: 'close',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionResetPassword(disabled = false) {\r\n return {\r\n value: ActionCode.RESET_PASS,\r\n text: 'Reset Password',\r\n icon: 'settings_backup_restore',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionLock(disabled = false) {\r\n return {\r\n value: ActionCode.LOCK,\r\n text: 'Lock',\r\n icon: 'lock',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionUnlock(disabled = false) {\r\n return {\r\n value: ActionCode.UNLOCK,\r\n text: 'Unlock',\r\n icon: 'done',\r\n disabled,\r\n }\r\n}\r\n\r\nexport function getActionTerminate(disabled = false, text = 'Terminate') {\r\n return {\r\n value: ActionCode.TERMINATE,\r\n text,\r\n icon: 'close',\r\n disabled,\r\n }\r\n}\r\n","export class PageMode {\r\n static readonly VIEW = 'View';\r\n static readonly MODIFY = 'Modify';\r\n static readonly ADD = 'New';\r\n}\r\n","export interface BuildTreeOptions {\r\n /** Property holding a node's own key. */\r\n customID: string;\r\n /** Property holding the key of a node's parent. */\r\n parentProperty: string;\r\n /** Property the children are written to. Defaults to `children`. */\r\n childrenProperty?: string;\r\n}\r\n\r\n/**\r\n * Build a nested tree from a flat list, matching the semantics of the `array-to-tree` package.\r\n *\r\n * Two details are contractual, not incidental:\r\n *\r\n * - **A leaf has no `children` property at all** — not `[]`. Callers branch on `if (node.children)`\r\n * to decide whether to recurse, so handing every leaf an empty array turns each one into a\r\n * traversable branch and silently changes what a walk collects. There is no error when this is\r\n * wrong; the output is just quietly different.\r\n * - **A node whose parent key is missing from the list becomes a root**, rather than being dropped.\r\n * Access lists arrive filtered by permission, so referencing an absent parent is routine — losing\r\n * those rows would silently shrink what the user can see.\r\n *\r\n * Nodes are shallow-copied, so the input array and its items are left untouched.\r\n */\r\nexport function buildTree<T extends Record<string, any>>(\r\n rows: T[],\r\n options: BuildTreeOptions,\r\n): T[] {\r\n if (!Array.isArray(rows)) {\r\n throw new TypeError('buildTree: expected an array of rows');\r\n }\r\n\r\n const { customID, parentProperty } = options;\r\n const childrenProperty = options.childrenProperty ?? 'children';\r\n\r\n // Shallow copies keyed by id, so children can be attached without touching the caller's objects.\r\n const byId = new Map<unknown, T>();\r\n const copies: T[] = rows.map((row) => {\r\n const copy = { ...row } as T;\r\n byId.set(row[customID], copy);\r\n return copy;\r\n });\r\n\r\n const roots: T[] = [];\r\n const childrenOf = new Map<unknown, T[]>();\r\n\r\n for (let i = 0; i < copies.length; i++) {\r\n const parentId = rows[i][parentProperty];\r\n\r\n // A falsy parent key, or one that names a row not present, makes this a root.\r\n if (!parentId || !byId.has(parentId) || byId.get(parentId) === copies[i]) {\r\n roots.push(copies[i]);\r\n continue;\r\n }\r\n\r\n const siblings = childrenOf.get(parentId);\r\n if (siblings) siblings.push(copies[i]);\r\n else childrenOf.set(parentId, [copies[i]]);\r\n }\r\n\r\n // Attach only where children exist, so leaves keep `children === undefined`.\r\n for (const [parentId, children] of childrenOf) {\r\n const parent = byId.get(parentId);\r\n if (parent) (parent as Record<string, unknown>)[childrenProperty] = children;\r\n }\r\n\r\n return roots;\r\n}\r\n\r\n// Deliberately no `convertTreeToList` here. The applications already have one, and its\r\n// stack-based traversal emits siblings in an order a recursive walk does not reproduce — an\r\n// order that reaches a request body. A second function under the same name, differing only in\r\n// ordering, is a trap rather than a convenience.\r\n","import { FormControl, FormGroup, Validators } from '@angular/forms';\nimport { NxeGridItem, NxeLayoutItem } from '../metadata/data-grid.interface';\nimport { ModuleMetadata } from '../interfaces/module.interface';\nimport { DataType } from '../metadata/data-grid.const';\n\nexport function extractGridItems(layoutItems: NxeLayoutItem[], existingGridItems: NxeGridItem[] = []) {\n layoutItems.forEach((item) => {\n if (item.gridItem) {\n existingGridItems.push(item.gridItem);\n }\n if (item.children && item.children.length > 0) {\n extractGridItems(item.children, existingGridItems);\n }\n });\n return existingGridItems;\n}\n\nexport function createFormGroup(gridItems: any[], module: ModuleMetadata, lov: any): FormGroup {\n const formGroup = new FormGroup({});\n\n gridItems.forEach(gridItem => {\n const validators = [];\n\n // if (gridItem.required) {\n // validators.push(Validators.required);\n // }\n\n let value: boolean | null = null;\n if (gridItem.dataType === DataType.CHK) {\n value = false;\n }\n\n const formControl = new FormControl(value, validators);\n\n if (gridItem.fixedValue !== null && gridItem.fixedValue !== undefined) {\n formControl.setValue(gridItem.fixedValue);\n // formControl.removeValidators(Validators.required);\n }\n\n formGroup.addControl(gridItem.id, formControl);\n });\n\n gridItems.forEach(gridItem => {\n if (gridItem?.lovDependency) {\n const dependencies = Array.isArray(gridItem.lovDependency) ? gridItem.lovDependency : [gridItem.lovDependency];\n lov[gridItem.lov] = [];\n\n dependencies.forEach(dep => {\n const depControl = formGroup.get(dep.dependentTo);\n if (!depControl) return;\n depControl.valueChanges\n .subscribe(() => {\n lov[gridItem.lov] = lov['all'].filter((l) => {\n if (l.lovType !== gridItem.lov) return false;\n return dependencies.every(d => {\n const depValue = formGroup.get(d.dependentTo)?.value;\n return depValue == null || l[d.filterKey]?.split(',').includes(depValue);\n });\n });\n\n const currentFormControl = formGroup.get(gridItem.id);\n if (!currentFormControl) return;\n const currentValue = currentFormControl.value;\n const currentLov = lov[gridItem.lov];\n\n if (gridItem.dataType === DataType.LOM) {\n const newValue = (currentValue as string[])?.filter(v =>\n currentLov.some(l => l.lovCode === v)\n );\n currentFormControl.setValue(newValue);\n } else {\n if (!currentLov.find(l => l.lovCode === currentValue)) {\n currentFormControl.patchValue(null);\n }\n }\n });\n });\n }\n });\n\n if (module.id) {\n const idValue = module.id.endsWith(\"ID\") ? 0 : null;\n formGroup.addControl(module.id, new FormControl(idValue));\n }\n\n return formGroup;\n}\n","/**\r\n * A structural deep clone, matching the subset of `lodash.cloneDeep` the applications rely on.\r\n *\r\n * Four behaviours here are load-bearing, and each one fails *silently* if dropped — which is why\r\n * they are spelled out rather than left to a one-liner:\r\n *\r\n * 1. **Functions come back by reference.** Page metadata carries Angular component classes\r\n * (`{ label, component: SomeTabComponent }`) and the clone is handed to `createComponent()`.\r\n * A cloned-or-dropped class is not the same class. This is also why `structuredClone` cannot be\r\n * used here at all: it throws `DataCloneError` on a function.\r\n * 2. **`Date` survives as a `Date`.** Callers clone a filter bag and *then* branch on\r\n * `value instanceof Date`. A Date has no enumerable own keys, so a plain `for...in` copy yields\r\n * `{}` and that branch quietly stops firing.\r\n * 3. **Prototypes are preserved.** `Object.create(Object.getPrototypeOf(v))` rather than `{}`, so a\r\n * class instance stays an instance. A lost prototype surfaces far from the clone.\r\n * 4. **Keys holding `undefined` are kept**, as lodash keeps them — `'k' in clone` stays true.\r\n *\r\n * Not handled, because nothing clones one: `Map`, `Set`, `RegExp`, typed arrays, `Blob`. They would\r\n * fall through to the object branch. Add them with a test when a real caller needs them.\r\n */\r\nexport function cloneDeep<T>(value: T, visited = new WeakMap<object, unknown>()): T {\r\n // Primitives and functions pass straight through. Functions deliberately by reference.\r\n if (value === null || (typeof value !== 'object' && typeof value !== 'function')) return value;\r\n if (typeof value === 'function') return value;\r\n\r\n // A node already cloned in this walk: return the same clone, so cycles terminate and shared\r\n // references stay shared rather than being duplicated into two objects.\r\n if (visited.has(value as object)) return visited.get(value as object) as T;\r\n\r\n if (value instanceof Date) return new Date(value.getTime()) as T;\r\n\r\n if (Array.isArray(value)) {\r\n const copy: unknown[] = [];\r\n visited.set(value as object, copy);\r\n for (let i = 0; i < value.length; i++) copy[i] = cloneDeep(value[i], visited);\r\n return copy as T;\r\n }\r\n\r\n const copy = Object.create(Object.getPrototypeOf(value)) as Record<string, unknown>;\r\n visited.set(value as object, copy);\r\n for (const key of Object.keys(value as object)) {\r\n copy[key] = cloneDeep((value as Record<string, unknown>)[key], visited);\r\n }\r\n return copy as T;\r\n}\r\n","import { cloneDeep } from './object.helper';\r\n\r\nexport function removeEmptyObject(obj: object): object {\r\n const result = {};\r\n Object.entries(obj).forEach(([ k, v ]) => {\r\n if (v !== null && v !== '') {\r\n result[k] = v;\r\n }\r\n });\r\n\r\n return result;\r\n}\r\n\r\nexport function filterQueryParams(obj: Object) {\r\n obj = cloneDeep(obj);\r\n obj = removeEmptyObject(obj);\r\n const result = {};\r\n\r\n Object.entries(obj).forEach(([ k, v ]) => {\r\n if (isArray(v)) {\r\n let temp = '';\r\n v.forEach((e, i) => {\r\n temp += e;\r\n if (v.length - 1 !== i) {\r\n temp += `,`;\r\n }\r\n });\r\n result[k] = temp;\r\n } else if (v instanceof Date) {\r\n result[k] = toDateString(v);\r\n } else {\r\n result[k] = v;\r\n }\r\n });\r\n return result;\r\n}\r\n\r\nfunction isArray(value: any) {\r\n return Object.prototype.toString.call(value) === '[object Array]';\r\n}\r\n\r\nexport function arrayToString(input: string[]) {\r\n let temp = '';\r\n input.forEach((e, i) => {\r\n temp += e;\r\n if (input.length - 1 !== i) {\r\n temp += `,`;\r\n }\r\n });\r\n return temp;\r\n}\r\n\r\nexport function downloadFile(data: any, fileName = 'excel.xlsx') {\r\n let blob = new Blob([ data ]);\r\n let url = window.URL.createObjectURL(blob);\r\n const a = document.createElement('a');\r\n a.href = url;\r\n a.download = fileName;\r\n a.click();\r\n}\r\n\r\nexport function previewPDF(data: any, fileName = 'report.pdf') {\r\n let blob = new Blob([ data ], { type: 'application/pdf' });\r\n let url = window.URL.createObjectURL(blob);\r\n window.open(url, '_blank');\r\n}\r\n\r\nexport function constructUrlWithQueryParams(baseUrl: string, queryParams: any): string {\r\n const queryString = Object.keys(queryParams).map((key) => key + '=' + queryParams[key]).join('&');\r\n return `${ baseUrl }?${ queryString }`;\r\n}\r\n\r\nexport function toDateString(date: Date) {\r\n return date.toDateString();\r\n}\r\n","/**\r\n * A RFC 4122 version 4 UUID.\r\n *\r\n * `crypto.randomUUID()` is the fast path, but it is only exposed in a **secure context** — and the\r\n * applications are served over plain http on the LAN, where it is simply `undefined`. So there is a\r\n * second tier built on `crypto.getRandomValues`, which carries no such restriction.\r\n *\r\n * There is deliberately no `Math.random()` tier. Callers truncate these ids and persist them, so a\r\n * generator with ~2^52 of internal state and no collision resistance is not an acceptable\r\n * degradation — better to fail loudly on a platform that has neither API than to hand out ids that\r\n * quietly collide.\r\n */\r\n/** 00..ff, so the fallback formats bytes with a lookup instead of padding each one. */\r\nconst HEX: readonly string[] = Array.from({ length: 256 }, (_, i) =>\r\n (i + 0x100).toString(16).slice(1),\r\n);\r\n\r\nexport function uuidV4(): string {\r\n const cryptoApi = globalThis.crypto;\r\n\r\n if (typeof cryptoApi?.randomUUID === 'function') {\r\n return cryptoApi.randomUUID();\r\n }\r\n\r\n if (typeof cryptoApi?.getRandomValues !== 'function') {\r\n throw new Error('uuidV4: no Web Crypto API available (need randomUUID or getRandomValues)');\r\n }\r\n\r\n const bytes = cryptoApi.getRandomValues(new Uint8Array(16));\r\n\r\n // Version 4 and the RFC 4122 variant, per §4.4.\r\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\r\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\r\n\r\n return (\r\n HEX[bytes[0]] + HEX[bytes[1]] + HEX[bytes[2]] + HEX[bytes[3]] + '-' +\r\n HEX[bytes[4]] + HEX[bytes[5]] + '-' +\r\n HEX[bytes[6]] + HEX[bytes[7]] + '-' +\r\n HEX[bytes[8]] + HEX[bytes[9]] + '-' +\r\n HEX[bytes[10]] + HEX[bytes[11]] + HEX[bytes[12]] +\r\n HEX[bytes[13]] + HEX[bytes[14]] + HEX[bytes[15]]\r\n );\r\n}\r\n","/**\r\n * Thrown when a token is not a readable JWT. Mirrors `jwt-decode`'s `InvalidTokenError`, because\r\n * callers catch on *something* being wrong rather than on a specific cause.\r\n */\r\nexport class InvalidTokenError extends Error {\r\n override name = 'InvalidTokenError';\r\n}\r\n\r\n/**\r\n * Decode a JWT's payload (or header) **without verifying its signature.**\r\n *\r\n * This reads a token; it does not authenticate one. Anyone can mint a JWT with any claims, so\r\n * nothing here may be used as an authorisation decision — the server verifies, the client only\r\n * displays. The same caveat applies to `jwt-decode`, which this replaces.\r\n */\r\nexport function decodeJwt<T = unknown>(token: string, options?: { header?: boolean }): T {\r\n if (typeof token !== 'string' || token.length === 0) {\r\n throw new InvalidTokenError('Invalid token specified: must be a non-empty string');\r\n }\r\n\r\n const position = options?.header ? 0 : 1;\r\n const part = token.split('.')[position];\r\n\r\n if (typeof part !== 'string') {\r\n throw new InvalidTokenError(\r\n `Invalid token specified: missing part #${position + 1}`,\r\n );\r\n }\r\n\r\n let json: string;\r\n try {\r\n json = base64UrlDecode(part);\r\n } catch (error) {\r\n throw new InvalidTokenError(\r\n `Invalid token specified: invalid base64 for part #${position + 1} (${(error as Error).message})`,\r\n );\r\n }\r\n\r\n try {\r\n return JSON.parse(json) as T;\r\n } catch (error) {\r\n throw new InvalidTokenError(\r\n `Invalid token specified: invalid json for part #${position + 1} (${(error as Error).message})`,\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * base64url -> UTF-8 string.\r\n *\r\n * The `decodeURIComponent(escape(...))` step is not decoration. Claims routinely carry non-ASCII —\r\n * a user's display name, a company name — and `atob` returns latin-1 bytes, so without it every\r\n * accented character arrives mojibake. `escape` is deprecated but is the only thing that maps those\r\n * raw bytes into percent-escapes losslessly, so the result is tried first and a plain `atob` is the\r\n * fallback for the rare token whose bytes are not valid UTF-8.\r\n */\r\nfunction base64UrlDecode(value: string): string {\r\n let base64 = value.replace(/-/g, '+').replace(/_/g, '/');\r\n\r\n // Restore the padding `atob` requires. A remainder of 1 cannot occur in valid base64 — it would\r\n // mean a truncated token, and padding it would silently decode to something wrong.\r\n switch (base64.length % 4) {\r\n case 0:\r\n break;\r\n case 2:\r\n base64 += '==';\r\n break;\r\n case 3:\r\n base64 += '=';\r\n break;\r\n default:\r\n throw new Error('illegal base64url string');\r\n }\r\n\r\n const binary = atob(base64);\r\n try {\r\n return decodeURIComponent(\r\n binary\r\n .split('')\r\n .map((c) => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2))\r\n .join(''),\r\n );\r\n } catch {\r\n return binary;\r\n }\r\n}\r\n","import { Lov } from '../interfaces/lov.interface';\r\n\r\nexport function mapLov(input: any, lov: Lov[]) {\r\n const result: any = {};\r\n Object.keys(input).forEach(key => {\r\n result[key] = lov.filter(l => l.lovType === input[key]);\r\n });\r\n result['all'] = lov;\r\n return result;\r\n}\r\n\r\nexport function mapOriginalLov(lov: Lov[]) {\r\n const result: any = lov.reduce((acc, item) => {\r\n const key = item.lovType; // The property to group by\r\n if (!acc[key]) {\r\n acc[key] = []; // Initialize the group if it doesn't exist\r\n }\r\n acc[key].push(item); // Add the current item to the group\r\n return acc;\r\n }, {});\r\n result['all'] = lov;\r\n return result;\r\n}\r\n","import { computed, Signal } from '@angular/core';\r\nimport { PageMode } from '../consts/page.const';\r\n\r\nexport class ModeSignalHelper {\r\n isView: Signal<boolean>;\r\n isModify: Signal<boolean>;\r\n isAdd: Signal<boolean>;\r\n\r\n constructor(mode: Signal<string>) {\r\n // Destructuring the returned object from the helper method\r\n const { isView, isModify, isAdd } = ModeSignalHelper.createModeSignals(mode);\r\n\r\n this.isView = isView;\r\n this.isModify = isModify;\r\n this.isAdd = isAdd;\r\n }\r\n\r\n /**\r\n * Generates computed signals for the provided mode signal.\r\n */\r\n static createModeSignals(mode: Signal<string>) {\r\n const isView = computed(() => mode() === PageMode.VIEW || mode() === 'detail');\r\n const isModify = computed(() => mode() === PageMode.MODIFY || mode() === 'modify');\r\n const isAdd = computed(() => mode() === PageMode.ADD);\r\n\r\n return { isView: isView, isModify, isAdd };\r\n }\r\n}\r\n","export function sortSequence(a, b) {\r\n // First compare by sequenceNo\r\n if (a.sequenceNo < b.sequenceNo) return -1;\r\n if (a.sequenceNo > b.sequenceNo) return 1;\r\n\r\n // If sequenceNo is the same, compare by lovName\r\n if (a.lovName < b.lovName) return -1;\r\n if (a.lovName > b.lovName) return 1;\r\n\r\n // If both sequenceNo and lovName are the same\r\n return 0;\r\n}\r\n","export function trackChanges(oldArray: any[], newArray: any[], keysToCompare: string[], idKey: string) {\n const result: any[] = [];\n\n // Helper function to create a unique key based on specific fields\n function createKey(item, keys) {\n return keys\n .map(key => {\n let value = item[key];\n if (Array.isArray(value)) {\n return value.slice().sort().join('+'); // Sort and join array elements using '+'\n }\n return value;\n })\n .join('|');\n }\n\n\n // Convert old and new arrays to maps for easier comparison\n let oldMap = new Map(oldArray.map(item => [createKey(item, keysToCompare), item]));\n let newMap = new Map(newArray.map(item => [createKey(item, keysToCompare), item]));\n\n // Track deleted and unchanged/modified items\n for (let [key, oldItem] of oldMap) {\n const modifiedValue = checkExist(newMap, idKey, oldItem[idKey]);\n if (!newMap.has(key)) {\n if (modifiedValue) {\n result.push({ ...modifiedValue, action: 'MOD' }); // Deleted\n } else {\n result.push({ ...oldItem, action: 'DEL' }); // Deleted\n }\n }\n }\n\n // Track created items\n for (let [key, newItem] of newMap) {\n if (!oldMap.has(key) && !newItem[idKey] ) {\n result.push({ ...newItem, action: 'CRT' }); // Created\n }\n }\n\n return result;\n}\n\n\nfunction checkExist(myMap: Map<string, any>, idKey: string, value: number) {\n if (!value) {\n return false;\n }\n for (let [key, myItem] of myMap) {\n if (myItem[idKey] === value) {\n return myItem;\n }\n }\n return false;\n}\n","import { Pipe, PipeTransform } from '@angular/core';\r\nimport { ACTION_MAPPER } from '../consts/action.const';\r\n\r\n@Pipe({\r\n name: 'actionCode'\r\n})\r\nexport class ActionCodePipe implements PipeTransform {\r\n actionMapper: any = ACTION_MAPPER;\r\n\r\n transform(value: string): string {\r\n if (this.actionMapper.hasOwnProperty(value)) {\r\n return this.actionMapper[value].text;\r\n }\r\n return value;\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'null',\r\n standalone: true\r\n})\r\nexport class NullPipe implements PipeTransform {\r\n\r\n transform(value: unknown): unknown {\r\n try {\r\n if (value === null || value === undefined || (Array.isArray(value) && value.length === 0) || value === '') {\r\n return \"-\";\r\n } else {\r\n return value;\r\n }\r\n } catch (e) {\r\n return '-';\r\n }\r\n }\r\n\r\n}\r\n","import { AfterViewInit, Directive, ElementRef, Input, Renderer2 } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[nxeBadge]'\r\n})\r\nexport class BadgeDirective implements AfterViewInit {\r\n @Input() nxeBadge: string | number = ''; // Badge text\r\n @Input() badgeColor: string = 'red'; // Default badge color\r\n @Input() badgePosition: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' = 'top-right';\r\n\r\n private badgeElement: HTMLElement | null = null;\r\n\r\n constructor(private el: ElementRef, private renderer: Renderer2) {}\r\n\r\n ngOnChanges(): void {\r\n this.updateBadge();\r\n }\r\n\r\n private updateBadge() {\r\n if (this.badgeElement) {\r\n this.renderer.removeChild(this.el.nativeElement, this.badgeElement);\r\n }\r\n\r\n if (!this.nxeBadge) return;\r\n\r\n this.badgeElement = this.renderer.createElement('div');\r\n this.renderer.addClass(this.badgeElement, 'nxe-badge');\r\n this.renderer.setStyle(this.badgeElement, 'z-index', 999);\r\n this.renderer.setStyle(this.badgeElement, 'background', this.badgeColor);\r\n this.renderer.setProperty(this.badgeElement, 'innerText', this.nxeBadge.toString());\r\n\r\n this.applyPosition();\r\n\r\n this.renderer.appendChild(this.el.nativeElement, this.badgeElement);\r\n }\r\n\r\n private applyPosition() {\r\n const positionStyles: Record<string, string> = {\r\n 'top-right': 'top: 0; right: 0;',\r\n 'top-left': 'top: 0; left: 0;',\r\n 'bottom-right': 'bottom: 0; right: 0;',\r\n 'bottom-left': 'bottom: 0; left: 0;',\r\n };\r\n\r\n if (this.badgeElement) {\r\n this.renderer.setStyle(this.badgeElement, 'position', 'absolute');\r\n this.renderer.setStyle(this.badgeElement, 'transform', 'translate(50%, -50%)');\r\n this.renderer.setAttribute(this.badgeElement, 'style', positionStyles[this.badgePosition]);\r\n }\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (this.el) {\r\n this.renderer.setStyle(this.el.nativeElement, 'position', 'relative');\r\n }\r\n\r\n }\r\n}\r\n","import {\r\n Directive,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n TemplateRef,\r\n ViewContainerRef,\r\n} from '@angular/core';\r\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\r\nimport { TemplatePortal } from '@angular/cdk/portal';\r\n\r\n@Directive({\r\n selector: '[nxeMenu]',\r\n})\r\nexport class NxeMenu {\r\n @Input('nxeMenu') menuTemplate!: TemplateRef<any>;\r\n\r\n private overlayRef: OverlayRef | null = null;\r\n\r\n constructor(\r\n private el: ElementRef,\r\n private overlay: Overlay,\r\n private viewContainerRef: ViewContainerRef\r\n ) {}\r\n\r\n @HostListener('click', ['$event'])\r\n toggleMenu(event: Event) {\r\n event.stopPropagation();\r\n if (this.overlayRef) {\r\n this.closeMenu();\r\n } else {\r\n this.openMenu();\r\n }\r\n }\r\n\r\n @HostListener('document:click', ['$event'])\r\n onClickOutside(event: Event) {\r\n if (this.overlayRef && !this.el.nativeElement.contains(event.target)) {\r\n this.closeMenu();\r\n }\r\n }\r\n\r\n private openMenu() {\r\n const positionStrategy = this.overlay\r\n .position()\r\n .flexibleConnectedTo(this.el.nativeElement)\r\n .withPositions([\r\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\r\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\r\n ]);\r\n\r\n this.overlayRef = this.overlay.create({ positionStrategy });\r\n\r\n // Fix: Use TemplatePortal instead of ComponentPortal\r\n const portal = new TemplatePortal(this.menuTemplate, this.viewContainerRef);\r\n this.overlayRef.attach(portal);\r\n }\r\n\r\n private closeMenu() {\r\n this.overlayRef?.detach();\r\n this.overlayRef = null;\r\n }\r\n}\r\n","import {\n ApplicationRef,\n ComponentRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n Injector,\n Renderer2,\n RendererFactory2,\n Type,\n} from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\n/**\n * Opens a component in a centred, click-to-dismiss backdrop and resolves when it closes.\n *\n * Ported from nextera-library with one required change: `ComponentFactoryResolver` and\n * `resolveComponentFactory()` are Ivy-era shims that no longer exist in Angular 22, so\n * instantiation goes through `createComponent()` instead. The behaviour is the same —\n * the component is created outside any view, attached to the ApplicationRef so it takes\n * part in change detection, and appended to the backdrop element.\n *\n * `data` is assigned onto the instance before the view is attached, so the component sees\n * its inputs on first render rather than one cycle late.\n */\n@Injectable({ providedIn: 'root' })\nexport class NxeModalService {\n private readonly injector = inject(Injector);\n private readonly environmentInjector = inject(EnvironmentInjector);\n private readonly applicationRef = inject(ApplicationRef);\n private readonly renderer: Renderer2 = inject(RendererFactory2).createRenderer(null, null);\n\n private componentRef?: ComponentRef<unknown>;\n private backdropElement?: HTMLElement;\n private closeSubject?: Subject<unknown>;\n\n open<T>(component: Type<T>, data?: Record<string, unknown>): Observable<unknown> {\n this.closeSubject = new Subject<unknown>();\n this.createBackdrop();\n\n const componentRef = createComponent(component, {\n environmentInjector: this.environmentInjector,\n elementInjector: this.injector,\n });\n\n if (data) {\n Object.assign(componentRef.instance as object, data);\n }\n\n this.applicationRef.attachView(componentRef.hostView);\n this.renderer.appendChild(this.backdropElement, componentRef.location.nativeElement);\n this.componentRef = componentRef;\n\n return this.closeSubject.asObservable();\n }\n\n close(result?: unknown): void {\n if (this.componentRef) {\n this.applicationRef.detachView(this.componentRef.hostView);\n this.componentRef.destroy();\n this.componentRef = undefined;\n }\n if (this.backdropElement) {\n this.renderer.removeChild(document.body, this.backdropElement);\n this.backdropElement = undefined;\n }\n this.closeSubject?.next(result);\n this.closeSubject?.complete();\n }\n\n private createBackdrop(): void {\n const el = this.renderer.createElement('div') as HTMLElement;\n this.renderer.addClass(el, 'modal-backdrop');\n const style: Record<string, string> = {\n position: 'fixed',\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n background: 'rgba(0, 0, 0, 0.5)',\n 'z-index': '1000',\n display: 'flex',\n 'align-items': 'center',\n 'justify-content': 'center',\n };\n for (const [prop, value] of Object.entries(style)) {\n this.renderer.setStyle(el, prop, value);\n }\n\n this.renderer.listen(el, 'click', () => this.close());\n document.body.appendChild(el);\n this.backdropElement = el;\n }\n}\n","// @nexterajs/app-kit — public API.\r\n//\r\n// The metadata-driven application framework that used to ship inside nextera-library:\r\n// module/page metadata, action constants, and the pure helpers built on them. It is\r\n// deliberately separate from @nexterajs/ui — this half is coupled to a specific backend\r\n// shape, and an app that only wants components should not have to take it.\r\n\r\n/* Module metadata — the shape a module declares its pages with */\r\nexport * from './lib/interfaces/module.interface';\r\nexport * from './lib/interfaces/action.interface';\r\nexport * from './lib/interfaces/lov.interface';\r\nexport * from './lib/interfaces/http.interface';\r\nexport * from './lib/metadata/data-grid.interface';\r\nexport * from './lib/metadata/data-grid.const';\r\n\r\n/* Constants */\r\nexport * from './lib/consts/action.const';\r\nexport * from './lib/consts/page.const';\r\n\r\n/* Helpers */\r\nexport * from './lib/helpers/array.helper';\r\nexport * from './lib/helpers/generic.helper';\r\nexport * from './lib/helpers/http.helper';\r\nexport * from './lib/helpers/id.helper';\r\nexport * from './lib/helpers/jwt.helper';\r\nexport * from './lib/helpers/object.helper';\r\nexport * from './lib/helpers/lov.helper';\r\nexport * from './lib/helpers/signal.helper';\r\nexport * from './lib/helpers/sort.helper';\r\nexport * from './lib/helpers/tracker.helper';\r\n\r\n/* Pipes */\r\nexport * from './lib/pipes/action-code.pipe';\r\nexport * from './lib/pipes/null.pipe';\r\n\r\n/* Directives */\r\nexport * from './lib/directives/badge.directive';\r\nexport * from './lib/directives/menu.directive';\r\n\r\n/* Services */\r\nexport * from './lib/services/modal.service';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mapp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,EAAE;;;AC1BlC;AACA;AACA;AACA;AACA;AACA;AAEA;;ACPA;;AAEG;;"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexterajs/app-kit",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
+
"@angular/cdk": "^22.0.0",
|
|
5
6
|
"@angular/common": "^22.1.0",
|
|
6
|
-
"@angular/core": "^22.1.0"
|
|
7
|
+
"@angular/core": "^22.1.0",
|
|
8
|
+
"@angular/forms": "^22.0.0",
|
|
9
|
+
"rxjs": "^7.8.0"
|
|
7
10
|
},
|
|
8
11
|
"dependencies": {
|
|
9
12
|
"tslib": "^2.3.0"
|
|
@@ -582,6 +582,31 @@ declare class PageMode {
|
|
|
582
582
|
static readonly ADD = "New";
|
|
583
583
|
}
|
|
584
584
|
|
|
585
|
+
interface BuildTreeOptions {
|
|
586
|
+
/** Property holding a node's own key. */
|
|
587
|
+
customID: string;
|
|
588
|
+
/** Property holding the key of a node's parent. */
|
|
589
|
+
parentProperty: string;
|
|
590
|
+
/** Property the children are written to. Defaults to `children`. */
|
|
591
|
+
childrenProperty?: string;
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Build a nested tree from a flat list, matching the semantics of the `array-to-tree` package.
|
|
595
|
+
*
|
|
596
|
+
* Two details are contractual, not incidental:
|
|
597
|
+
*
|
|
598
|
+
* - **A leaf has no `children` property at all** — not `[]`. Callers branch on `if (node.children)`
|
|
599
|
+
* to decide whether to recurse, so handing every leaf an empty array turns each one into a
|
|
600
|
+
* traversable branch and silently changes what a walk collects. There is no error when this is
|
|
601
|
+
* wrong; the output is just quietly different.
|
|
602
|
+
* - **A node whose parent key is missing from the list becomes a root**, rather than being dropped.
|
|
603
|
+
* Access lists arrive filtered by permission, so referencing an absent parent is routine — losing
|
|
604
|
+
* those rows would silently shrink what the user can see.
|
|
605
|
+
*
|
|
606
|
+
* Nodes are shallow-copied, so the input array and its items are left untouched.
|
|
607
|
+
*/
|
|
608
|
+
declare function buildTree<T extends Record<string, any>>(rows: T[], options: BuildTreeOptions): T[];
|
|
609
|
+
|
|
585
610
|
declare function extractGridItems(layoutItems: NxeLayoutItem[], existingGridItems?: NxeGridItem[]): NxeGridItem[];
|
|
586
611
|
declare function createFormGroup(gridItems: any[], module: ModuleMetadata, lov: any): FormGroup;
|
|
587
612
|
|
|
@@ -593,6 +618,48 @@ declare function previewPDF(data: any, fileName?: string): void;
|
|
|
593
618
|
declare function constructUrlWithQueryParams(baseUrl: string, queryParams: any): string;
|
|
594
619
|
declare function toDateString(date: Date): string;
|
|
595
620
|
|
|
621
|
+
declare function uuidV4(): string;
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Thrown when a token is not a readable JWT. Mirrors `jwt-decode`'s `InvalidTokenError`, because
|
|
625
|
+
* callers catch on *something* being wrong rather than on a specific cause.
|
|
626
|
+
*/
|
|
627
|
+
declare class InvalidTokenError extends Error {
|
|
628
|
+
name: string;
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Decode a JWT's payload (or header) **without verifying its signature.**
|
|
632
|
+
*
|
|
633
|
+
* This reads a token; it does not authenticate one. Anyone can mint a JWT with any claims, so
|
|
634
|
+
* nothing here may be used as an authorisation decision — the server verifies, the client only
|
|
635
|
+
* displays. The same caveat applies to `jwt-decode`, which this replaces.
|
|
636
|
+
*/
|
|
637
|
+
declare function decodeJwt<T = unknown>(token: string, options?: {
|
|
638
|
+
header?: boolean;
|
|
639
|
+
}): T;
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* A structural deep clone, matching the subset of `lodash.cloneDeep` the applications rely on.
|
|
643
|
+
*
|
|
644
|
+
* Four behaviours here are load-bearing, and each one fails *silently* if dropped — which is why
|
|
645
|
+
* they are spelled out rather than left to a one-liner:
|
|
646
|
+
*
|
|
647
|
+
* 1. **Functions come back by reference.** Page metadata carries Angular component classes
|
|
648
|
+
* (`{ label, component: SomeTabComponent }`) and the clone is handed to `createComponent()`.
|
|
649
|
+
* A cloned-or-dropped class is not the same class. This is also why `structuredClone` cannot be
|
|
650
|
+
* used here at all: it throws `DataCloneError` on a function.
|
|
651
|
+
* 2. **`Date` survives as a `Date`.** Callers clone a filter bag and *then* branch on
|
|
652
|
+
* `value instanceof Date`. A Date has no enumerable own keys, so a plain `for...in` copy yields
|
|
653
|
+
* `{}` and that branch quietly stops firing.
|
|
654
|
+
* 3. **Prototypes are preserved.** `Object.create(Object.getPrototypeOf(v))` rather than `{}`, so a
|
|
655
|
+
* class instance stays an instance. A lost prototype surfaces far from the clone.
|
|
656
|
+
* 4. **Keys holding `undefined` are kept**, as lodash keeps them — `'k' in clone` stays true.
|
|
657
|
+
*
|
|
658
|
+
* Not handled, because nothing clones one: `Map`, `Set`, `RegExp`, typed arrays, `Blob`. They would
|
|
659
|
+
* fall through to the object branch. Add them with a test when a real caller needs them.
|
|
660
|
+
*/
|
|
661
|
+
declare function cloneDeep<T>(value: T, visited?: WeakMap<object, unknown>): T;
|
|
662
|
+
|
|
596
663
|
declare function mapLov(input: any, lov: Lov[]): any;
|
|
597
664
|
declare function mapOriginalLov(lov: Lov[]): any;
|
|
598
665
|
|
|
@@ -686,5 +753,5 @@ declare class NxeModalService {
|
|
|
686
753
|
static ɵprov: i0.ɵɵInjectableDeclaration<NxeModalService>;
|
|
687
754
|
}
|
|
688
755
|
|
|
689
|
-
export { ACTION_MAPPER, ActionCode, ActionCodePipe, BadgeDirective, BooleanOperator, ConditionEvaluator, ConditionOperator, ConditionType, DataType, LayoutType, MappedLov, ModeSignalHelper, NullPipe, NxeMenu, NxeModalService, PageMode, ValueChangeEvent, ValueOperator, arrayToString, constructUrlWithQueryParams, createFormGroup, downloadFile, extractGridItems, filterQueryParams, getActionActivated, getActionAddSubTreaty, getActionAddToPayment, getActionApproval, getActionBind, getActionBinding, getActionCalculate, getActionCancel, getActionConfirm, getActionConvertToProposal, getActionCorrection, getActionDelete, getActionDivider, getActionDownload, getActionExtendDueDate, getActionExtract, getActionFinalize, getActionIssue, getActionLock, getActionModify, getActionNew, getActionPlacement, getActionPosting, getActionPrint, getActionReactivate, getActionResetPassword, getActionReverse, getActionRollback, getActionRun, getActionSend, getActionSendForApproval, getActionTerminate, getActionTerminated, getActionUnlock, getActionUnposting, getActionValidate, getActionView, mapLov, mapOriginalLov, previewPDF, removeEmptyObject, sortSequence, toDateString, trackChanges };
|
|
690
|
-
export type { ActionConfig, ActionItem, ActionItemDisabledOn, Condition, LinkDetail, ListPageMetadata, Lov, LovDependency, ModeState, ModuleMetadata, NxeGridItem, NxeLayoutItem, NxeResponse, Paging, RequestAction, UpsertPageMetadata, ValueChange };
|
|
756
|
+
export { ACTION_MAPPER, ActionCode, ActionCodePipe, BadgeDirective, BooleanOperator, ConditionEvaluator, ConditionOperator, ConditionType, DataType, InvalidTokenError, LayoutType, MappedLov, ModeSignalHelper, NullPipe, NxeMenu, NxeModalService, PageMode, ValueChangeEvent, ValueOperator, arrayToString, buildTree, cloneDeep, constructUrlWithQueryParams, createFormGroup, decodeJwt, downloadFile, extractGridItems, filterQueryParams, getActionActivated, getActionAddSubTreaty, getActionAddToPayment, getActionApproval, getActionBind, getActionBinding, getActionCalculate, getActionCancel, getActionConfirm, getActionConvertToProposal, getActionCorrection, getActionDelete, getActionDivider, getActionDownload, getActionExtendDueDate, getActionExtract, getActionFinalize, getActionIssue, getActionLock, getActionModify, getActionNew, getActionPlacement, getActionPosting, getActionPrint, getActionReactivate, getActionResetPassword, getActionReverse, getActionRollback, getActionRun, getActionSend, getActionSendForApproval, getActionTerminate, getActionTerminated, getActionUnlock, getActionUnposting, getActionValidate, getActionView, mapLov, mapOriginalLov, previewPDF, removeEmptyObject, sortSequence, toDateString, trackChanges, uuidV4 };
|
|
757
|
+
export type { ActionConfig, ActionItem, ActionItemDisabledOn, BuildTreeOptions, Condition, LinkDetail, ListPageMetadata, Lov, LovDependency, ModeState, ModuleMetadata, NxeGridItem, NxeLayoutItem, NxeResponse, Paging, RequestAction, UpsertPageMetadata, ValueChange };
|