@sme.up/doc-alchemist 1.1.0-SNAPSHOT-20250619105432 → 1.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 +278 -30
- package/dist/assets/gfx-data.d.ts +1 -0
- package/dist/assets/gfx-data.js +2 -0
- package/dist/assets/gfx-data.js.map +1 -0
- package/dist/converters/excel/commons.d.ts +35 -0
- package/dist/converters/excel/commons.js +216 -0
- package/dist/converters/excel/commons.js.map +1 -0
- package/dist/{src/excel/excel-generator.types.d.ts → converters/excel/excel-converter.types.d.ts} +1 -0
- package/dist/{src/excel/excel-generator.types.js → converters/excel/excel-converter.types.js} +4 -2
- package/dist/converters/excel/excel-converter.types.js.map +1 -0
- package/dist/{src/excel/matrix-generator.d.ts → converters/excel/matrix-converter.d.ts} +4 -2
- package/dist/{src/excel/matrix-generator.js → converters/excel/matrix-converter.js} +39 -23
- package/dist/converters/excel/matrix-converter.js.map +1 -0
- package/dist/{src/excel/tree-generator.d.ts → converters/excel/tree-converter.d.ts} +2 -2
- package/dist/{src/excel/tree-generator.js → converters/excel/tree-converter.js} +8 -8
- package/dist/converters/excel/tree-converter.js.map +1 -0
- package/dist/{src/excel/excel-generator.d.ts → converters/excel-converter.d.ts} +2 -1
- package/dist/{src/excel/excel-generator.js → converters/excel-converter.js} +4 -4
- package/dist/converters/excel-converter.js.map +1 -0
- package/dist/converters/images/charts-generator.d.ts +9 -0
- package/dist/converters/images/charts-generator.js +250 -0
- package/dist/converters/images/charts-generator.js.map +1 -0
- package/dist/converters/pdf/autotable-renderer.d.ts +3 -0
- package/dist/converters/pdf/autotable-renderer.js +89 -0
- package/dist/converters/pdf/autotable-renderer.js.map +1 -0
- package/dist/converters/pdf/cover-renderer.d.ts +1 -0
- package/dist/converters/pdf/cover-renderer.js +26 -0
- package/dist/converters/pdf/cover-renderer.js.map +1 -0
- package/dist/converters/pdf/formulas-helper.d.ts +40 -0
- package/dist/converters/pdf/formulas-helper.js +227 -0
- package/dist/converters/pdf/formulas-helper.js.map +1 -0
- package/dist/converters/pdf/matrix-converter.d.ts +16 -0
- package/dist/converters/pdf/matrix-converter.js +198 -0
- package/dist/converters/pdf/matrix-converter.js.map +1 -0
- package/dist/converters/pdf/pdf-converter.types.d.ts +12 -0
- package/dist/converters/pdf/pdf-converter.types.js +2 -0
- package/dist/converters/pdf/pdf-converter.types.js.map +1 -0
- package/dist/converters/pdf/sch-converter.d.ts +3 -0
- package/dist/converters/pdf/sch-converter.js +99 -0
- package/dist/converters/pdf/sch-converter.js.map +1 -0
- package/dist/converters/pdf-converter.d.ts +8 -0
- package/dist/converters/pdf-converter.js +44 -0
- package/dist/converters/pdf-converter.js.map +1 -0
- package/dist/index.d.ts +11 -4
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/types/component.d.ts +53 -0
- package/dist/types/component.js +53 -0
- package/dist/types/component.js.map +1 -0
- package/dist/types/data-structures/smeupDataStructure.d.ts +215 -0
- package/dist/types/data-structures/smeupDataStructure.js +99 -0
- package/dist/types/data-structures/smeupDataStructure.js.map +1 -0
- package/dist/types/data-structures/smeupDataTable.d.ts +116 -0
- package/dist/types/data-structures/smeupDataTable.js +43 -0
- package/dist/types/data-structures/smeupDataTable.js.map +1 -0
- package/dist/types/data-structures/smeupDataTree.d.ts +13 -0
- package/dist/types/data-structures/smeupDataTree.js +2 -0
- package/dist/types/data-structures/smeupDataTree.js.map +1 -0
- package/dist/types/data-structures/smeupSch.d.ts +72 -0
- package/dist/types/data-structures/smeupSch.js +11 -0
- package/dist/types/data-structures/smeupSch.js.map +1 -0
- package/dist/types/dynamism.d.ts +45 -0
- package/dist/types/dynamism.js +30 -0
- package/dist/types/dynamism.js.map +1 -0
- package/dist/types/general.d.ts +22 -0
- package/dist/types/general.js +24 -0
- package/dist/types/general.js.map +1 -0
- package/dist/types/helpers.d.ts +4 -0
- package/dist/types/helpers.js +6 -0
- package/dist/types/helpers.js.map +1 -0
- package/dist/{src/types → types}/index.d.ts +8 -2
- package/dist/{src/types → types}/index.js +1 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/commons-utility.d.ts +59 -0
- package/dist/utils/commons-utility.js +188 -0
- package/dist/utils/commons-utility.js.map +1 -0
- package/dist/utils/datastructure-utility.d.ts +2 -0
- package/dist/utils/datastructure-utility.js +5 -0
- package/dist/utils/datastructure-utility.js.map +1 -0
- package/dist/{src/utils → utils}/dates-utility.d.ts +9 -0
- package/dist/{src/utils → utils}/dates-utility.js +18 -0
- package/dist/utils/dates-utility.js.map +1 -0
- package/dist/utils/formatter-utility.d.ts +3 -0
- package/dist/utils/formatter-utility.js +36 -0
- package/dist/utils/formatter-utility.js.map +1 -0
- package/dist/{src/utils → utils}/math-utility.d.ts +1 -0
- package/dist/{src/utils → utils}/math-utility.js +10 -0
- package/dist/utils/math-utility.js.map +1 -0
- package/dist/utils/objects-utility.js.map +1 -0
- package/dist/utils/regex-utility.js.map +1 -0
- package/package.json +17 -13
- package/dist/assets/sample-data.d.ts +0 -48
- package/dist/assets/sample-data.js +0 -372
- package/dist/assets/sample-data.js.map +0 -1
- package/dist/debug.d.ts +0 -1
- package/dist/debug.js +0 -20
- package/dist/debug.js.map +0 -1
- package/dist/src/excel/commons.d.ts +0 -21
- package/dist/src/excel/commons.js +0 -103
- package/dist/src/excel/commons.js.map +0 -1
- package/dist/src/excel/excel-generator.js.map +0 -1
- package/dist/src/excel/excel-generator.types.js.map +0 -1
- package/dist/src/excel/matrix-generator.js.map +0 -1
- package/dist/src/excel/tree-generator.js.map +0 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +0 -2
- package/dist/src/index.js.map +0 -1
- package/dist/src/pdf/pdf-generator.d.ts +0 -6
- package/dist/src/pdf/pdf-generator.js +0 -5
- package/dist/src/pdf/pdf-generator.js.map +0 -1
- package/dist/src/types/index.js.map +0 -1
- package/dist/src/utils/datastructure-utility.d.ts +0 -2
- package/dist/src/utils/datastructure-utility.js +0 -5
- package/dist/src/utils/datastructure-utility.js.map +0 -1
- package/dist/src/utils/dates-utility.js.map +0 -1
- package/dist/src/utils/generator-utility.d.ts +0 -31
- package/dist/src/utils/generator-utility.js +0 -113
- package/dist/src/utils/generator-utility.js.map +0 -1
- package/dist/src/utils/math-utility.js.map +0 -1
- package/dist/src/utils/objects-utility.js.map +0 -1
- package/dist/src/utils/regex-utility.js.map +0 -1
- package/dist/tests/excel-generator.test.d.ts +0 -1
- package/dist/tests/excel-generator.test.js +0 -380
- package/dist/tests/excel-generator.test.js.map +0 -1
- /package/dist/{src/utils → utils}/objects-utility.d.ts +0 -0
- /package/dist/{src/utils → utils}/objects-utility.js +0 -0
- /package/dist/{src/utils → utils}/regex-utility.d.ts +0 -0
- /package/dist/{src/utils → utils}/regex-utility.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smeupDataStructure.js","sourceRoot":"","sources":["../../../src/types/data-structures/smeupDataStructure.ts"],"names":[],"mappings":"AAmBA;;GAEG;AACH,MAAM,CAAN,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,uCAAE,CAAA;AACJ,CAAC,EAFW,UAAU,KAAV,UAAU,QAErB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,sBASX;AATD,WAAY,sBAAsB;IAChC,2BAA2B;IAC3B,yDAA+B,CAAA;IAC/B,2BAA2B;IAC3B,2DAAiC,CAAA;IACjC,0BAA0B;IAC1B,yDAA+B,CAAA;IAC/B,eAAe;IACf,kDAAwB,CAAA;AAC1B,CAAC,EATW,sBAAsB,KAAtB,sBAAsB,QASjC;AAED,MAAM,UAAU,yBAAyB,CACvC,GAAQ,EACR,OAAmB;IAEnB,QAAQ,GAAG,CAAC,SAAS,EAAE,CAAC;QACtB,KAAK,KAAK,CAAC;QACX,KAAK,KAAK,CAAC;QACX,KAAK,KAAK,CAAC;QACX,KAAK,KAAK;YACR,OAAO,sBAAsB,CAAC,aAAa,CAAC;QAE9C,KAAK,KAAK,CAAC;QACX,KAAK,KAAK,CAAC;QACX,KAAK,KAAK,CAAC;QACX,KAAK,KAAK;YACR,OAAO,sBAAsB,CAAC,cAAc,CAAC;QAE/C,KAAK,KAAK;YACR,OAAO,sBAAsB,CAAC,aAAa,CAAC;QAE9C,KAAK,KAAK;YACR,OAAO,sBAAsB,CAAC,WAAW,CAAC;QAE5C;YACE,MAAM,IAAI,KAAK,CACb,GAAG,GAAG,CAAC,SAAS,oDAAoD,CACrE,CAAC;IACN,CAAC;AACH,CAAC;AAkBD;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,cAAc;CACpB,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;CACA,CAAC;AAaX;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;CACF,CAAC;AAaX;;GAEG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,aAAa;IAC1B,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,aAAa;CAClB,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,SAAS,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;IAChD,mBAAmB,EAAE,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,EAAE,SAAS,EAAE;IACjE,YAAY,EAAE,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE;IACrD,eAAe,EAAE,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAE;CACnD,CAAC;AAsDX,MAAM,CAAN,IAAY,sBAEX;AAFD,WAAY,sBAAsB;IAChC,qCAAW,CAAA;AACb,CAAC,EAFW,sBAAsB,KAAtB,sBAAsB,QAEjC","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { ComponentOptions, Shapes } from \"../component.js\";\nimport { Fun } from \"../general.js\";\nimport { SmeupDataCell } from \"./smeupDataTable.js\";\nimport { SmeupDataNode } from \"./smeupDataTree.js\";\n\n/**\n * Smeup data structure\n */\nexport interface SmeupDataStructure {\n type: SmeupDataStructureType;\n messages?: SmeupMessage[];\n variables?: SmeupVariable[];\n buttons?: SmeupDataNode[];\n actions?: SmeupAction[];\n setup?: SmeupSetup;\n debugInfo?: DebugInfo;\n}\n\n/**\n * Api version\n */\nexport enum ApiVersion {\n V2,\n}\n\n/**\n * SmeupDataStructure types\n */\nexport enum SmeupDataStructureType {\n /** Smeup feedback (FBK) */\n SmeupFeedback = \"SmeupFeedback\",\n /** SmeupDataTable (DTA) */\n SmeupDataTable = \"SmeupDataTable\",\n /** SmeupDataTree (DTR) */\n SmeupDataTree = \"SmeupDataTree\",\n /** SmeupSch */\n SmeupScheda = \"SmeupSch\",\n}\n\nexport function getSmeupDataStructureType(\n fun: Fun,\n version: ApiVersion,\n): SmeupDataStructureType {\n switch (fun.component) {\n case \"TRE\":\n case \"HTM\":\n case \"CDE\":\n case \"EDT\":\n return SmeupDataStructureType.SmeupDataTree;\n\n case \"EXU\":\n case \"INP\":\n case \"EXB\":\n case \"EXC\":\n return SmeupDataStructureType.SmeupDataTable;\n\n case \"FBK\":\n return SmeupDataStructureType.SmeupFeedback;\n\n case \"SCH\":\n return SmeupDataStructureType.SmeupScheda;\n\n default:\n throw new Error(\n `${fun.component} not correspond to a valid SmeupDataStructure type`,\n );\n }\n}\n\n/**\n * Smeup data structure\n */\nexport interface SmeupFeedback extends SmeupDataStructure {\n type: SmeupDataStructureType.SmeupFeedback;\n}\n\n/**\n * SmeupMessage type\n */\nexport interface SmeupMessage {\n gravity: SmeupMessageGravity;\n message: string;\n mode: string;\n}\n\n/**\n * SmeupMessage Gravity\n */\nexport const SMEUP_MESSAGE_GRAVITY = {\n INFO: \"INFO\",\n ERROR: \"ERROR\",\n WARNING: \"WARNING\",\n UNAUTHORIZED: \"UNAUTHORIZED\",\n} as const;\nexport type SmeupMessageGravity =\n (typeof SMEUP_MESSAGE_GRAVITY)[keyof typeof SMEUP_MESSAGE_GRAVITY];\n\n/**\n * SmeupMessage Mode\n */\nexport const SMEUP_MESSAGE_MODE = {\n PM: \"PM\",\n PN: \"PN\",\n TN: \"TN\",\n} as const;\ntype SmeupMessageMode =\n (typeof SMEUP_MESSAGE_MODE)[keyof typeof SMEUP_MESSAGE_MODE];\n\n/**\n * SmeupVariable\n */\nexport interface SmeupVariable {\n name: string;\n value: string;\n type?: SmeupVariableType;\n}\n\n/**\n * SmeupVariableType\n */\nexport const SMEUP_VARIABLE_TYPE = {\n SEC: \"sec\",\n SCH: \"sch\",\n SSC: \"ssc\",\n LOO: \"loo\",\n} as const;\nexport type SmeupVariableType =\n (typeof SMEUP_VARIABLE_TYPE)[keyof typeof SMEUP_VARIABLE_TYPE];\n\n/**\n * SmeupAction\n */\nexport interface SmeupAction {\n exec?: string;\n parameter?: string;\n type?: SmeupActionType;\n}\n\n/**\n * SmeupActionType\n */\n\nexport const SMEUP_ACTION_TYPE = {\n CLOSE: \"CLOSE\",\n CLOSEW: \"CLOSEW\",\n DYNAMIC: \"DYNAMIC\",\n DINAMIC: \"DINAMIC\",\n EXECUTE: \"EXECUTE\",\n LOAD: \"LOAD\",\n RELOAD: \"RELOAD\",\n UPDATE: \"UPDATE\",\n EXIT: \"EXIT\",\n REFRESH: \"REFRESH\",\n HARDREFRESH: \"HARDREFRESH\",\n POPUP: \"POPUP\",\n RETURNVALUE: \"RETURNVALUE\",\n} as const;\ntype SmeupActionType =\n (typeof SMEUP_ACTION_TYPE)[keyof typeof SMEUP_ACTION_TYPE];\n\n/**\n * Smeup Data Cell Input Settings Keys\n */\nexport const SMEUP_DATA_CELL_INPUT_SETTINGS_KEYS = {\n MANDATORY: { key: \"mandatory\", type: \"boolean\" },\n CHECK_VALUE_ON_EXIT: { key: \"checkValueOnExit\", type: \"boolean\" },\n CHECK_OBJECT: { key: \"checkObject\", type: \"boolean\" },\n FORCE_UPPERCASE: { key: \"forceUppercase\", type: \"boolean\" },\n} as const;\n\nexport type SmeupDataCellInputSettingsKeys =\n keyof typeof SMEUP_DATA_CELL_INPUT_SETTINGS_KEYS;\n\nexport type SmeupDataCellInputSettingsValue =\n (typeof SMEUP_DATA_CELL_INPUT_SETTINGS_KEYS)[SmeupDataCellInputSettingsKeys];\n\nexport interface DebugInfo {\n executionTime_ms: number;\n initialTimestamp: string;\n finalTimestamp: string;\n runtime: {\n [index: string]: string;\n };\n}\n\n/**\n * LAYOUT\n * Represent the layout of the fields in a form and the adjuntive informations\n */\nexport interface SmeupLayout {\n horizontal?: boolean;\n absolute?: boolean;\n sections?: SmeupLayoutSection[];\n sectionsType?: SmeupLayoutSectionType;\n}\n\n/**\n * Represent a layout section\n */\nexport interface SmeupLayoutSection {\n id?: string;\n content?: SmeupLayoutField[];\n sections?: SmeupLayoutSection[];\n dim?: string;\n collapsible?: boolean;\n horizontal?: boolean;\n icon?: string;\n sectionsType?: SmeupLayoutSectionType;\n // style name declared in SCP_SCH\n styleName?: string;\n // grid attributes (each section is a grid)\n gridCols?: number;\n gridRows?: number;\n gap?: number;\n title?: string;\n absoluteColumn?: number;\n absoluteWidth?: number;\n absoluteRow?: number;\n absoluteHeight?: number;\n columns?: string;\n}\n\nexport enum SmeupLayoutSectionType {\n TAB = \"tab\",\n}\n\n/**\n * Represent the presentation information of a field in a form\n */\nexport interface SmeupLayoutField extends SmeupDataCell {\n id: string;\n title?: string;\n visible?: boolean;\n // grid attributes\n colSpan?: number;\n colStart?: number;\n colEnd?: number;\n rowSpan?: number;\n rowStart?: number;\n rowEnd?: number;\n absoluteColumn?: number;\n absoluteRow?: number;\n absoluteLength?: number;\n absoluteHeight?: number;\n useAs?: string;\n}\n\nexport type SmeupSetupBase<T extends ComponentOptions = ComponentOptions> = {\n [key in Shapes]?: T[];\n};\n\nexport interface SmeupSetup<T extends ComponentOptions = ComponentOptions> {\n title?: string;\n options?: SmeupSetupBase<T>;\n userSetups?: boolean;\n context?: string;\n commands?: Array<SmeupDataNode>;\n operations?: {\n insert?: boolean;\n delete?: boolean;\n update?: boolean;\n };\n}\n"]}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { SmeupDataStructure, SmeupDataStructureType, SmeupLayout } from "./smeupDataStructure.js";
|
|
2
|
+
export interface SmeupDataTable extends SmeupDataStructure {
|
|
3
|
+
type: SmeupDataStructureType.SmeupDataTable;
|
|
4
|
+
columns: SmeupDataColumn[];
|
|
5
|
+
rows: SmeupDataRow[];
|
|
6
|
+
layout?: SmeupLayout;
|
|
7
|
+
}
|
|
8
|
+
export interface SmeupDataColumn {
|
|
9
|
+
name: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
visible?: boolean;
|
|
12
|
+
isEditable?: boolean;
|
|
13
|
+
isKey?: boolean;
|
|
14
|
+
fill?: string;
|
|
15
|
+
obj?: {
|
|
16
|
+
t: string;
|
|
17
|
+
p: string;
|
|
18
|
+
};
|
|
19
|
+
maxLength?: number;
|
|
20
|
+
length?: number;
|
|
21
|
+
integers?: number;
|
|
22
|
+
decimals?: number;
|
|
23
|
+
tooltip?: boolean;
|
|
24
|
+
formula?: string;
|
|
25
|
+
shape?: SmeupDataCellShapes;
|
|
26
|
+
useAs?: string;
|
|
27
|
+
hideValuesRepetitions?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface SmeupDataRow {
|
|
30
|
+
cells?: {
|
|
31
|
+
[columnName: string]: SmeupDataCell;
|
|
32
|
+
};
|
|
33
|
+
layout?: SmeupLayout;
|
|
34
|
+
rowId?: string;
|
|
35
|
+
error?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface SmeupDataCell {
|
|
38
|
+
value: string;
|
|
39
|
+
obj?: {
|
|
40
|
+
t: string;
|
|
41
|
+
p: string;
|
|
42
|
+
k: string;
|
|
43
|
+
};
|
|
44
|
+
options?: SmeupDataCellOption[];
|
|
45
|
+
icon?: string;
|
|
46
|
+
isEditable?: boolean;
|
|
47
|
+
hasMCell?: boolean;
|
|
48
|
+
mandatory?: boolean;
|
|
49
|
+
shape?: SmeupDataCellShapes;
|
|
50
|
+
fun?: string;
|
|
51
|
+
tooltip?: boolean;
|
|
52
|
+
data?: {
|
|
53
|
+
[key: string]: Object;
|
|
54
|
+
};
|
|
55
|
+
disabled?: boolean;
|
|
56
|
+
styleName?: string;
|
|
57
|
+
styleAttributes?: {
|
|
58
|
+
[attributeKey: string]: string;
|
|
59
|
+
};
|
|
60
|
+
inputSettings?: {
|
|
61
|
+
[key: string]: Object;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Represents the single option of the cell
|
|
66
|
+
*/
|
|
67
|
+
export interface SmeupDataCellOption {
|
|
68
|
+
id: string;
|
|
69
|
+
label: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Represent the possible shapes of a field
|
|
73
|
+
*/
|
|
74
|
+
export declare const SmeupDataCellShapes: {
|
|
75
|
+
readonly AUTOCOMPLETE: "ACP";
|
|
76
|
+
readonly BUTTON_LIST: "BTN";
|
|
77
|
+
readonly CHART: "GRA";
|
|
78
|
+
readonly CHECKBOX: "CHK";
|
|
79
|
+
readonly CHIP: "CHI";
|
|
80
|
+
readonly COLOR_PICKER: "CLP";
|
|
81
|
+
readonly COMBOBOX: "CMB";
|
|
82
|
+
readonly DATE: "CAL";
|
|
83
|
+
readonly EDITOR: "EDT";
|
|
84
|
+
readonly GAUGE: "GAU";
|
|
85
|
+
readonly ICON: "ICO";
|
|
86
|
+
readonly IMAGE: "IMG";
|
|
87
|
+
readonly INPUT_CHECKBOX: "INC";
|
|
88
|
+
readonly INPUT_FIELD: "INF";
|
|
89
|
+
readonly KNOB: "KNB";
|
|
90
|
+
readonly LABEL: "LBL";
|
|
91
|
+
readonly MEMO: "MEM";
|
|
92
|
+
readonly MULTI_AUTOCOMPLETE: "AML";
|
|
93
|
+
readonly MULTI_COMBOBOX: "CML";
|
|
94
|
+
readonly OBJECT: "OBJ";
|
|
95
|
+
readonly PROGRESS_BAR: "PGB";
|
|
96
|
+
readonly RADIO: "RAD";
|
|
97
|
+
readonly RATING: "RTG";
|
|
98
|
+
readonly SWITCH: "SWT";
|
|
99
|
+
readonly TABLE: "TBL";
|
|
100
|
+
readonly TEXT_FIELD: "ITX";
|
|
101
|
+
readonly TIME: "TIM";
|
|
102
|
+
readonly INPUT_NUMBER: "INR";
|
|
103
|
+
readonly BOOLEAN_BUTTON: "BNB";
|
|
104
|
+
readonly RANGE: "RNG";
|
|
105
|
+
readonly FILE_UPLOAD: "FUP";
|
|
106
|
+
readonly FILE_READER: "FRE";
|
|
107
|
+
readonly COMMAND_EXECUTE: "RUN";
|
|
108
|
+
readonly ONE_BUTTON: "BTO";
|
|
109
|
+
readonly PASSWORD: "PWD";
|
|
110
|
+
readonly SPINNER: "SPN";
|
|
111
|
+
readonly DECODE: "DEC";
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Represent the type of the shape (like enum)
|
|
115
|
+
*/
|
|
116
|
+
export type SmeupDataCellShapes = (typeof SmeupDataCellShapes)[keyof typeof SmeupDataCellShapes] | string;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represent the possible shapes of a field
|
|
3
|
+
*/
|
|
4
|
+
export const SmeupDataCellShapes = {
|
|
5
|
+
AUTOCOMPLETE: "ACP",
|
|
6
|
+
BUTTON_LIST: "BTN",
|
|
7
|
+
CHART: "GRA",
|
|
8
|
+
CHECKBOX: "CHK",
|
|
9
|
+
CHIP: "CHI",
|
|
10
|
+
COLOR_PICKER: "CLP",
|
|
11
|
+
COMBOBOX: "CMB",
|
|
12
|
+
DATE: "CAL",
|
|
13
|
+
EDITOR: "EDT",
|
|
14
|
+
GAUGE: "GAU",
|
|
15
|
+
ICON: "ICO",
|
|
16
|
+
IMAGE: "IMG",
|
|
17
|
+
INPUT_CHECKBOX: "INC",
|
|
18
|
+
INPUT_FIELD: "INF",
|
|
19
|
+
KNOB: "KNB",
|
|
20
|
+
LABEL: "LBL",
|
|
21
|
+
MEMO: "MEM",
|
|
22
|
+
MULTI_AUTOCOMPLETE: "AML",
|
|
23
|
+
MULTI_COMBOBOX: "CML",
|
|
24
|
+
OBJECT: "OBJ",
|
|
25
|
+
PROGRESS_BAR: "PGB",
|
|
26
|
+
RADIO: "RAD",
|
|
27
|
+
RATING: "RTG",
|
|
28
|
+
SWITCH: "SWT",
|
|
29
|
+
TABLE: "TBL",
|
|
30
|
+
TEXT_FIELD: "ITX",
|
|
31
|
+
TIME: "TIM",
|
|
32
|
+
INPUT_NUMBER: "INR",
|
|
33
|
+
BOOLEAN_BUTTON: "BNB",
|
|
34
|
+
RANGE: "RNG",
|
|
35
|
+
FILE_UPLOAD: "FUP",
|
|
36
|
+
FILE_READER: "FRE",
|
|
37
|
+
COMMAND_EXECUTE: "RUN",
|
|
38
|
+
ONE_BUTTON: "BTO",
|
|
39
|
+
PASSWORD: "PWD",
|
|
40
|
+
SPINNER: "SPN",
|
|
41
|
+
DECODE: "DEC",
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=smeupDataTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smeupDataTable.js","sourceRoot":"","sources":["../../../src/types/data-structures/smeupDataTable.ts"],"names":[],"mappings":"AAkFA;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,YAAY,EAAE,KAAK;IACnB,WAAW,EAAE,KAAK;IAClB,KAAK,EAAE,KAAK;IACZ,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,KAAK;IACX,YAAY,EAAE,KAAK;IACnB,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,KAAK;IACX,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,KAAK;IACZ,cAAc,EAAE,KAAK;IACrB,WAAW,EAAE,KAAK;IAClB,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,KAAK;IACX,kBAAkB,EAAE,KAAK;IACzB,cAAc,EAAE,KAAK;IACrB,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE,KAAK;IACjB,IAAI,EAAE,KAAK;IACX,YAAY,EAAE,KAAK;IACnB,cAAc,EAAE,KAAK;IACrB,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,KAAK;IAClB,eAAe,EAAE,KAAK;IACtB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,KAAK;CACL,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-wrapper-object-types */\nimport {\n SmeupDataStructure,\n SmeupDataStructureType,\n SmeupLayout,\n} from \"./smeupDataStructure.js\";\n\nexport interface SmeupDataTable extends SmeupDataStructure {\n type: SmeupDataStructureType.SmeupDataTable;\n columns: SmeupDataColumn[];\n rows: SmeupDataRow[];\n layout?: SmeupLayout;\n}\n\nexport interface SmeupDataColumn {\n name: string;\n title?: string;\n visible?: boolean;\n isEditable?: boolean;\n isKey?: boolean;\n fill?: string;\n obj?: {\n t: string;\n p: string;\n };\n maxLength?: number;\n length?: number;\n integers?: number;\n decimals?: number;\n tooltip?: boolean;\n formula?: string;\n shape?: SmeupDataCellShapes;\n useAs?: string;\n hideValuesRepetitions?: boolean;\n}\n\nexport interface SmeupDataRow {\n cells?: {\n [columnName: string]: SmeupDataCell;\n };\n layout?: SmeupLayout;\n rowId?: string;\n error?: boolean;\n}\n\nexport interface SmeupDataCell {\n value: string;\n obj?: {\n t: string;\n p: string;\n k: string;\n };\n // multiple options (i.e. radio, checkbox, select, etc.)\n options?: SmeupDataCellOption[];\n icon?: string;\n isEditable?: boolean;\n hasMCell?: boolean;\n mandatory?: boolean;\n shape?: SmeupDataCellShapes;\n fun?: string;\n tooltip?: boolean;\n data?: {\n [key: string]: Object;\n };\n disabled?: boolean;\n styleName?: string;\n styleAttributes?: {\n [attributeKey: string]: string;\n };\n inputSettings?: {\n [key: string]: Object;\n };\n}\n\n/**\n * Represents the single option of the cell\n */\nexport interface SmeupDataCellOption {\n id: string;\n label: string;\n}\n\n/**\n * Represent the possible shapes of a field\n */\nexport const SmeupDataCellShapes = {\n AUTOCOMPLETE: \"ACP\",\n BUTTON_LIST: \"BTN\",\n CHART: \"GRA\",\n CHECKBOX: \"CHK\",\n CHIP: \"CHI\",\n COLOR_PICKER: \"CLP\",\n COMBOBOX: \"CMB\",\n DATE: \"CAL\",\n EDITOR: \"EDT\",\n GAUGE: \"GAU\",\n ICON: \"ICO\",\n IMAGE: \"IMG\",\n INPUT_CHECKBOX: \"INC\",\n INPUT_FIELD: \"INF\",\n KNOB: \"KNB\",\n LABEL: \"LBL\",\n MEMO: \"MEM\",\n MULTI_AUTOCOMPLETE: \"AML\",\n MULTI_COMBOBOX: \"CML\",\n OBJECT: \"OBJ\",\n PROGRESS_BAR: \"PGB\",\n RADIO: \"RAD\",\n RATING: \"RTG\",\n SWITCH: \"SWT\",\n TABLE: \"TBL\",\n TEXT_FIELD: \"ITX\",\n TIME: \"TIM\",\n INPUT_NUMBER: \"INR\",\n BOOLEAN_BUTTON: \"BNB\",\n RANGE: \"RNG\",\n FILE_UPLOAD: \"FUP\",\n FILE_READER: \"FRE\",\n COMMAND_EXECUTE: \"RUN\",\n ONE_BUTTON: \"BTO\",\n PASSWORD: \"PWD\",\n SPINNER: \"SPN\",\n DECODE: \"DEC\",\n} as const;\n\n/**\n * Represent the type of the shape (like enum)\n */\nexport type SmeupDataCellShapes =\n | (typeof SmeupDataCellShapes)[keyof typeof SmeupDataCellShapes]\n | string;\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SmeupDataStructure, SmeupDataStructureType } from "./smeupDataStructure.js";
|
|
2
|
+
import { SmeupDataCell, SmeupDataColumn } from "./smeupDataTable.js";
|
|
3
|
+
export interface SmeupDataTree extends SmeupDataStructure {
|
|
4
|
+
type: SmeupDataStructureType.SmeupDataTree;
|
|
5
|
+
children: SmeupDataNode[];
|
|
6
|
+
columns?: SmeupDataColumn[];
|
|
7
|
+
}
|
|
8
|
+
export interface SmeupDataNode extends SmeupDataCell {
|
|
9
|
+
children?: SmeupDataNode[];
|
|
10
|
+
cells?: {
|
|
11
|
+
[columnName: string]: SmeupDataCell;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smeupDataTree.js","sourceRoot":"","sources":["../../../src/types/data-structures/smeupDataTree.ts"],"names":[],"mappings":"","sourcesContent":["import {\n SmeupDataStructure,\n SmeupDataStructureType,\n} from \"./smeupDataStructure.js\";\nimport { SmeupDataCell, SmeupDataColumn } from \"./smeupDataTable.js\";\n\nexport interface SmeupDataTree extends SmeupDataStructure {\n type: SmeupDataStructureType.SmeupDataTree;\n children: SmeupDataNode[];\n columns?: SmeupDataColumn[];\n}\n\nexport interface SmeupDataNode extends SmeupDataCell {\n children?: SmeupDataNode[];\n cells?: {\n [columnName: string]: SmeupDataCell;\n };\n}\n"]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { SmeupDataStructure, SmeupDataStructureType, SmeupSetupBase, SmeupVariable } from "./smeupDataStructure.js";
|
|
2
|
+
import { SmeupDataTable } from "./smeupDataTable.js";
|
|
3
|
+
import { SmeupDataTree, SmeupDataNode } from "./smeupDataTree.js";
|
|
4
|
+
import { Shapes, ToolbarState } from "../component.js";
|
|
5
|
+
import { YesNo } from "../helpers.js";
|
|
6
|
+
import { RawDynamism } from "../dynamism.js";
|
|
7
|
+
export interface SmeupSch extends SmeupDataStructure {
|
|
8
|
+
type: SmeupDataStructureType.SmeupScheda;
|
|
9
|
+
title: string;
|
|
10
|
+
sections: SmeupSchSection[];
|
|
11
|
+
info?: string;
|
|
12
|
+
id?: string;
|
|
13
|
+
styles?: SmeupStyle[];
|
|
14
|
+
layout?: string;
|
|
15
|
+
/** other setup: for example "Menu", left menù */
|
|
16
|
+
laySetup?: unknown;
|
|
17
|
+
dynamisms?: RawDynamism[];
|
|
18
|
+
}
|
|
19
|
+
export interface SmeupSchSection {
|
|
20
|
+
id: string;
|
|
21
|
+
layout: string;
|
|
22
|
+
dim?: string;
|
|
23
|
+
variables?: SmeupVariable[];
|
|
24
|
+
sections?: SmeupSchSection[];
|
|
25
|
+
components?: SmeupSchComponent[];
|
|
26
|
+
type?: SectionTypes;
|
|
27
|
+
}
|
|
28
|
+
export interface SmeupSchComponent {
|
|
29
|
+
type: Shapes;
|
|
30
|
+
title: string;
|
|
31
|
+
load?: boolean;
|
|
32
|
+
subNote?: string;
|
|
33
|
+
id?: string;
|
|
34
|
+
fun?: string;
|
|
35
|
+
data?: SmeupDataTree | SmeupDataTable;
|
|
36
|
+
dynamisms?: RawDynamism[];
|
|
37
|
+
variables?: {
|
|
38
|
+
[key: string]: SmeupVariable;
|
|
39
|
+
};
|
|
40
|
+
options?: SmeupSetupBase;
|
|
41
|
+
icon?: string;
|
|
42
|
+
buttons?: SmeupDataNode[];
|
|
43
|
+
toolbarState?: ToolbarState;
|
|
44
|
+
context?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface SmeupStyle {
|
|
47
|
+
name: string;
|
|
48
|
+
value: SmeupStyleOptions;
|
|
49
|
+
}
|
|
50
|
+
export interface SmeupStyleOptions {
|
|
51
|
+
Align?: string;
|
|
52
|
+
FontBold?: YesNo;
|
|
53
|
+
FontItalic?: YesNo;
|
|
54
|
+
FontName?: string;
|
|
55
|
+
FontSize?: string;
|
|
56
|
+
FontULine?: YesNo;
|
|
57
|
+
FontUnder?: YesNo;
|
|
58
|
+
FontColor?: string;
|
|
59
|
+
BackColor?: string;
|
|
60
|
+
Padding?: string;
|
|
61
|
+
Border?: string;
|
|
62
|
+
TxtOri?: string;
|
|
63
|
+
}
|
|
64
|
+
export declare enum SectionTypes {
|
|
65
|
+
Acc = "Acc",
|
|
66
|
+
Tab = "Tab",
|
|
67
|
+
TabVer = "TabVer",
|
|
68
|
+
Radio = "Radio",
|
|
69
|
+
Combo = "Combo",
|
|
70
|
+
OneBut = "OneBut",
|
|
71
|
+
Menu = "Menu"
|
|
72
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export var SectionTypes;
|
|
2
|
+
(function (SectionTypes) {
|
|
3
|
+
SectionTypes["Acc"] = "Acc";
|
|
4
|
+
SectionTypes["Tab"] = "Tab";
|
|
5
|
+
SectionTypes["TabVer"] = "TabVer";
|
|
6
|
+
SectionTypes["Radio"] = "Radio";
|
|
7
|
+
SectionTypes["Combo"] = "Combo";
|
|
8
|
+
SectionTypes["OneBut"] = "OneBut";
|
|
9
|
+
SectionTypes["Menu"] = "Menu";
|
|
10
|
+
})(SectionTypes || (SectionTypes = {}));
|
|
11
|
+
//# sourceMappingURL=smeupSch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smeupSch.js","sourceRoot":"","sources":["../../../src/types/data-structures/smeupSch.ts"],"names":[],"mappings":"AA0EA,MAAM,CAAN,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,2BAAW,CAAA;IACX,2BAAW,CAAA;IACX,iCAAiB,CAAA;IACjB,+BAAe,CAAA;IACf,+BAAe,CAAA;IACf,iCAAiB,CAAA;IACjB,6BAAa,CAAA;AACf,CAAC,EARW,YAAY,KAAZ,YAAY,QAQvB","sourcesContent":["import {\n SmeupDataStructure,\n SmeupDataStructureType,\n SmeupSetupBase,\n SmeupVariable,\n} from \"./smeupDataStructure.js\";\nimport { SmeupDataTable } from \"./smeupDataTable.js\";\nimport { SmeupDataTree, SmeupDataNode } from \"./smeupDataTree.js\";\nimport { Shapes, ToolbarState } from \"../component.js\";\nimport { YesNo } from \"../helpers.js\";\nimport { RawDynamism } from \"../dynamism.js\";\n\nexport interface SmeupSch extends SmeupDataStructure {\n type: SmeupDataStructureType.SmeupScheda;\n title: string;\n sections: SmeupSchSection[];\n info?: string;\n id?: string;\n styles?: SmeupStyle[];\n layout?: string;\n /** other setup: for example \"Menu\", left menù */\n laySetup?: unknown;\n dynamisms?: RawDynamism[];\n}\n\nexport interface SmeupSchSection {\n id: string;\n layout: string;\n dim?: string;\n variables?: SmeupVariable[];\n sections?: SmeupSchSection[];\n components?: SmeupSchComponent[];\n type?: SectionTypes;\n}\n\nexport interface SmeupSchComponent {\n type: Shapes;\n title: string;\n load?: boolean;\n subNote?: string;\n id?: string;\n fun?: string;\n data?: SmeupDataTree | SmeupDataTable;\n dynamisms?: RawDynamism[];\n variables?: {\n [key: string]: SmeupVariable;\n };\n options?: SmeupSetupBase;\n icon?: string;\n buttons?: SmeupDataNode[];\n toolbarState?: ToolbarState;\n context?: string;\n}\n\nexport interface SmeupStyle {\n name: string;\n value: SmeupStyleOptions;\n}\n\nexport interface SmeupStyleOptions {\n Align?: string;\n FontBold?: YesNo;\n FontItalic?: YesNo;\n FontName?: string;\n FontSize?: string;\n FontULine?: YesNo;\n FontUnder?: YesNo;\n FontColor?: string;\n BackColor?: string;\n Padding?: string;\n Border?: string;\n TxtOri?: string;\n}\n\nexport enum SectionTypes {\n Acc = \"Acc\",\n Tab = \"Tab\",\n TabVer = \"TabVer\",\n Radio = \"Radio\",\n Combo = \"Combo\",\n OneBut = \"OneBut\",\n Menu = \"Menu\",\n}\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { SmeupVariable } from "./data-structures/smeupDataStructure.js";
|
|
2
|
+
/**
|
|
3
|
+
* Raw Dynamism
|
|
4
|
+
*/
|
|
5
|
+
export interface RawDynamism {
|
|
6
|
+
/** Event type */
|
|
7
|
+
event: string;
|
|
8
|
+
/** Fun or Action */
|
|
9
|
+
exec?: string;
|
|
10
|
+
/** Component ids */
|
|
11
|
+
targets?: string[];
|
|
12
|
+
/** Declared variables */
|
|
13
|
+
variables?: SmeupVariable[];
|
|
14
|
+
/** Enable conditions */
|
|
15
|
+
enabled?: string;
|
|
16
|
+
/** Load method */
|
|
17
|
+
Load?: LoadType;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Dynamism Event
|
|
21
|
+
*/
|
|
22
|
+
export declare enum DynamismEvents {
|
|
23
|
+
ALL = "*all",
|
|
24
|
+
BTN_CLICK = "btnclick",
|
|
25
|
+
CHANGE = "change",
|
|
26
|
+
CHANGE_MONTH = "changemonth",
|
|
27
|
+
CHANGE_ROW = "changerow",
|
|
28
|
+
CHANGE_VAL = "changeval",
|
|
29
|
+
CLICK = "click",
|
|
30
|
+
DBLCLICK = "dblclick",
|
|
31
|
+
DETAIL_CLICK = "detailclick",
|
|
32
|
+
EXPAND = "expand",
|
|
33
|
+
RESIZE = "resize",
|
|
34
|
+
DATESELECT = "dateselect",
|
|
35
|
+
DROP = "drop",
|
|
36
|
+
SELECT = "select",
|
|
37
|
+
UPDATE = "update",
|
|
38
|
+
CHECK = "check",
|
|
39
|
+
INIT = "init",
|
|
40
|
+
CLOSE = "close",
|
|
41
|
+
UNMOUNT = "unmount"
|
|
42
|
+
}
|
|
43
|
+
export declare enum LoadType {
|
|
44
|
+
D = "D"
|
|
45
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamism Event
|
|
3
|
+
*/
|
|
4
|
+
export var DynamismEvents;
|
|
5
|
+
(function (DynamismEvents) {
|
|
6
|
+
DynamismEvents["ALL"] = "*all";
|
|
7
|
+
DynamismEvents["BTN_CLICK"] = "btnclick";
|
|
8
|
+
DynamismEvents["CHANGE"] = "change";
|
|
9
|
+
DynamismEvents["CHANGE_MONTH"] = "changemonth";
|
|
10
|
+
DynamismEvents["CHANGE_ROW"] = "changerow";
|
|
11
|
+
DynamismEvents["CHANGE_VAL"] = "changeval";
|
|
12
|
+
DynamismEvents["CLICK"] = "click";
|
|
13
|
+
DynamismEvents["DBLCLICK"] = "dblclick";
|
|
14
|
+
DynamismEvents["DETAIL_CLICK"] = "detailclick";
|
|
15
|
+
DynamismEvents["EXPAND"] = "expand";
|
|
16
|
+
DynamismEvents["RESIZE"] = "resize";
|
|
17
|
+
DynamismEvents["DATESELECT"] = "dateselect";
|
|
18
|
+
DynamismEvents["DROP"] = "drop";
|
|
19
|
+
DynamismEvents["SELECT"] = "select";
|
|
20
|
+
DynamismEvents["UPDATE"] = "update";
|
|
21
|
+
DynamismEvents["CHECK"] = "check";
|
|
22
|
+
DynamismEvents["INIT"] = "init";
|
|
23
|
+
DynamismEvents["CLOSE"] = "close";
|
|
24
|
+
DynamismEvents["UNMOUNT"] = "unmount";
|
|
25
|
+
})(DynamismEvents || (DynamismEvents = {}));
|
|
26
|
+
export var LoadType;
|
|
27
|
+
(function (LoadType) {
|
|
28
|
+
LoadType["D"] = "D";
|
|
29
|
+
})(LoadType || (LoadType = {}));
|
|
30
|
+
//# sourceMappingURL=dynamism.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamism.js","sourceRoot":"","sources":["../../src/types/dynamism.ts"],"names":[],"mappings":"AAoBA;;GAEG;AACH,MAAM,CAAN,IAAY,cAoBX;AApBD,WAAY,cAAc;IACxB,8BAAY,CAAA;IACZ,wCAAsB,CAAA;IACtB,mCAAiB,CAAA;IACjB,8CAA4B,CAAA;IAC5B,0CAAwB,CAAA;IACxB,0CAAwB,CAAA;IACxB,iCAAe,CAAA;IACf,uCAAqB,CAAA;IACrB,8CAA4B,CAAA;IAC5B,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,2CAAyB,CAAA;IACzB,+BAAa,CAAA;IACb,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,iCAAe,CAAA;IACf,+BAAa,CAAA;IACb,iCAAe,CAAA;IACf,qCAAmB,CAAA;AACrB,CAAC,EApBW,cAAc,KAAd,cAAc,QAoBzB;AAED,MAAM,CAAN,IAAY,QAEX;AAFD,WAAY,QAAQ;IAClB,mBAAO,CAAA;AACT,CAAC,EAFW,QAAQ,KAAR,QAAQ,QAEnB","sourcesContent":["import { SmeupVariable } from \"./data-structures/smeupDataStructure.js\";\n\n/**\n * Raw Dynamism\n */\nexport interface RawDynamism {\n /** Event type */\n event: string;\n /** Fun or Action */\n exec?: string;\n /** Component ids */\n targets?: string[];\n /** Declared variables */\n variables?: SmeupVariable[];\n /** Enable conditions */\n enabled?: string;\n /** Load method */\n Load?: LoadType;\n}\n\n/**\n * Dynamism Event\n */\nexport enum DynamismEvents {\n ALL = \"*all\",\n BTN_CLICK = \"btnclick\",\n CHANGE = \"change\",\n CHANGE_MONTH = \"changemonth\",\n CHANGE_ROW = \"changerow\",\n CHANGE_VAL = \"changeval\",\n CLICK = \"click\",\n DBLCLICK = \"dblclick\",\n DETAIL_CLICK = \"detailclick\",\n EXPAND = \"expand\",\n RESIZE = \"resize\",\n DATESELECT = \"dateselect\",\n DROP = \"drop\",\n SELECT = \"select\",\n UPDATE = \"update\",\n CHECK = \"check\",\n INIT = \"init\",\n CLOSE = \"close\",\n UNMOUNT = \"unmount\",\n}\n\nexport enum LoadType {\n D = \"D\",\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare class FunObject {
|
|
2
|
+
t: string;
|
|
3
|
+
p: string;
|
|
4
|
+
k: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Fun
|
|
8
|
+
*/
|
|
9
|
+
export declare class Fun {
|
|
10
|
+
component: string;
|
|
11
|
+
service: string;
|
|
12
|
+
function: string;
|
|
13
|
+
obj1?: FunObject;
|
|
14
|
+
obj2?: FunObject;
|
|
15
|
+
obj3?: FunObject;
|
|
16
|
+
obj4?: FunObject;
|
|
17
|
+
obj5?: FunObject;
|
|
18
|
+
obj6?: FunObject;
|
|
19
|
+
P?: string;
|
|
20
|
+
INPUT?: string;
|
|
21
|
+
SS?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export class FunObject {
|
|
2
|
+
t;
|
|
3
|
+
p;
|
|
4
|
+
k;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Fun
|
|
8
|
+
*/
|
|
9
|
+
export class Fun {
|
|
10
|
+
component;
|
|
11
|
+
service;
|
|
12
|
+
function;
|
|
13
|
+
obj1;
|
|
14
|
+
obj2;
|
|
15
|
+
obj3;
|
|
16
|
+
obj4;
|
|
17
|
+
obj5;
|
|
18
|
+
obj6;
|
|
19
|
+
P;
|
|
20
|
+
INPUT;
|
|
21
|
+
// The implementation of java FunDTO expects SS to be uppercased
|
|
22
|
+
SS;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=general.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"general.js","sourceRoot":"","sources":["../../src/types/general.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAS;IACpB,CAAC,CAAU;IAEX,CAAC,CAAU;IAEX,CAAC,CAAU;CACZ;AAED;;GAEG;AACH,MAAM,OAAO,GAAG;IACd,SAAS,CAAU;IACnB,OAAO,CAAU;IACjB,QAAQ,CAAU;IAElB,IAAI,CAAa;IACjB,IAAI,CAAa;IACjB,IAAI,CAAa;IACjB,IAAI,CAAa;IACjB,IAAI,CAAa;IACjB,IAAI,CAAa;IAEjB,CAAC,CAAU;IACX,KAAK,CAAU;IAEf,gEAAgE;IAChE,EAAE,CAAU;CACb","sourcesContent":["export class FunObject {\n t!: string;\n\n p!: string;\n\n k!: string;\n}\n\n/**\n * Fun\n */\nexport class Fun {\n component!: string;\n service!: string;\n function!: string;\n\n obj1?: FunObject;\n obj2?: FunObject;\n obj3?: FunObject;\n obj4?: FunObject;\n obj5?: FunObject;\n obj6?: FunObject;\n\n P?: string;\n INPUT?: string;\n\n // The implementation of java FunDTO expects SS to be uppercased\n SS?: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/types/helpers.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,KAGX;AAHD,WAAY,KAAK;IACf,oBAAW,CAAA;IACX,kBAAS,CAAA;AACX,CAAC,EAHW,KAAK,KAAL,KAAK,QAGhB","sourcesContent":["export enum YesNo {\n Yes = \"Yes\",\n No = \"No\",\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { SmeupDataCell } from "@sme.up/kokos-sdk-node";
|
|
2
1
|
import type { Properties as CSSProperties } from "csstype";
|
|
2
|
+
import { ComponentOptions } from "./component.js";
|
|
3
|
+
import { SmeupDataCell } from "./data-structures/smeupDataTable.js";
|
|
3
4
|
export interface SmeupDataObj {
|
|
4
5
|
t: string;
|
|
5
6
|
p: string;
|
|
@@ -34,5 +35,10 @@ export declare enum SupportedExportFormats {
|
|
|
34
35
|
XLSX = "xlsx",
|
|
35
36
|
CSV = "csv",
|
|
36
37
|
TXT = "txt",
|
|
37
|
-
PDF_SCHEDA = "pdf_scheda"
|
|
38
|
+
PDF_SCHEDA = "pdf_scheda",
|
|
39
|
+
PDF = "pdf"
|
|
40
|
+
}
|
|
41
|
+
export interface ChartOptions extends ComponentOptions {
|
|
42
|
+
Width: string;
|
|
43
|
+
Height: string;
|
|
38
44
|
}
|
|
@@ -11,5 +11,6 @@ export var SupportedExportFormats;
|
|
|
11
11
|
SupportedExportFormats["CSV"] = "csv";
|
|
12
12
|
SupportedExportFormats["TXT"] = "txt";
|
|
13
13
|
SupportedExportFormats["PDF_SCHEDA"] = "pdf_scheda";
|
|
14
|
+
SupportedExportFormats["PDF"] = "pdf";
|
|
14
15
|
})(SupportedExportFormats || (SupportedExportFormats = {}));
|
|
15
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAUA,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,qDAAqC,CAAA;IACrC,qCAAqB,CAAA;IACrB,kDAAkC,CAAA;AACpC,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAwBD,MAAM,CAAN,IAAY,sBAMX;AAND,WAAY,sBAAsB;IAChC,uCAAa,CAAA;IACb,qCAAW,CAAA;IACX,qCAAW,CAAA;IACX,mDAAyB,CAAA;IACzB,qCAAW,CAAA;AACb,CAAC,EANW,sBAAsB,KAAtB,sBAAsB,QAMjC","sourcesContent":["import type { Properties as CSSProperties } from \"csstype\";\nimport { ComponentOptions } from \"./component.js\";\nimport { SmeupDataCell } from \"./data-structures/smeupDataTable.js\";\n\nexport interface SmeupDataObj {\n t: string;\n p: string;\n k: string;\n}\n\nexport enum DatesFormats {\n ISO_DATE = \"YYYY-MM-DD\",\n ISO_DATE_TIME = \"YYYY-MM-DD HH:mm:ss\",\n ISO_TIME = \"HH:mm:ss\",\n ISO_TIME_WITHOUT_SECONDS = \"HH:mm\",\n}\n\nexport interface GenericObject {\n [index: string]: unknown;\n}\n\nexport interface WebupManagerData {\n mathLocale: string;\n datesLocale: string;\n themeBackground: string;\n}\n\n/**\n * Applies dataTable filters to the excel table rows\n */\nexport type ColumnFilter = {\n checkBoxes?: { value: string }[];\n // add other properties if needed\n};\n\nexport interface SmeupDataCellStyled extends SmeupDataCell {\n style?: CSSProperties;\n}\n\nexport enum SupportedExportFormats {\n XLSX = \"xlsx\",\n CSV = \"csv\",\n TXT = \"txt\",\n PDF_SCHEDA = \"pdf_scheda\",\n PDF = \"pdf\",\n}\n\nexport interface ChartOptions extends ComponentOptions {\n Width: string;\n Height: string;\n}\n"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { SmeupDataColumn, SmeupDataTable, SmeupDataCell } from "../types/data-structures/smeupDataTable.js";
|
|
2
|
+
import { ColumnFilter, WebupManagerData, SupportedExportFormats, GenericObject } from "../types/index.js";
|
|
3
|
+
export declare const getFilteredColumns: (columns: SmeupDataColumn[], props: GenericObject, groupsArray?: {
|
|
4
|
+
column: string;
|
|
5
|
+
visible: boolean;
|
|
6
|
+
}[]) => SmeupDataColumn[];
|
|
7
|
+
/**
|
|
8
|
+
* By passing the map, length value and column name
|
|
9
|
+
* creates or updates a map record with
|
|
10
|
+
* @param map Contains columnNames and their longest cell's length
|
|
11
|
+
* @param text The text to use in length calculation
|
|
12
|
+
* @param colName The column to check
|
|
13
|
+
*/
|
|
14
|
+
export declare const updateMaxValueLength: (map: {
|
|
15
|
+
[key: string]: number;
|
|
16
|
+
}, text: string | undefined | null, colName: string) => void;
|
|
17
|
+
export declare const filterRows: (smeupDataTable: SmeupDataTable, filteredColumns: SmeupDataColumn[], filters: {
|
|
18
|
+
[key: string]: ColumnFilter;
|
|
19
|
+
}) => import("../types/data-structures/smeupDataTable.js").SmeupDataRow[];
|
|
20
|
+
/**
|
|
21
|
+
* Returns a converted and formatted cell value (string, date, number)
|
|
22
|
+
* @param cell - SmeupDataCell
|
|
23
|
+
* @param bookType - SupportedExportFormats
|
|
24
|
+
* @param webupManagerData - WebupManagerData
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
export declare const calculateCellValue: (cell: SmeupDataCell, bookType: SupportedExportFormats, webupManagerData: WebupManagerData) => string | number | Date;
|
|
28
|
+
/**
|
|
29
|
+
* Calculates and formats a value based on its type and export format.
|
|
30
|
+
*
|
|
31
|
+
* - If the value is a date and the object indicates a date type, it returns a formatted date string or a Date object,
|
|
32
|
+
* depending on the export format.
|
|
33
|
+
* - If the value is a number and the object indicates a number type, it returns a formatted number string or a numeric value,
|
|
34
|
+
* depending on the export format.
|
|
35
|
+
* - Otherwise, it returns the original value or an empty string if the value is null or undefined.
|
|
36
|
+
*
|
|
37
|
+
* @param bookType - The export format type.
|
|
38
|
+
* @param webupManagerData - Data containing locale and formatting information.
|
|
39
|
+
* @param value - The value to be calculated and formatted.
|
|
40
|
+
* @param obj - Optional object describing the type of the value.
|
|
41
|
+
* @returns The formatted value, a Date object, a number, or the original value as a string.
|
|
42
|
+
*/
|
|
43
|
+
export declare const calculateValue: (value: string, obj: {
|
|
44
|
+
t: string;
|
|
45
|
+
p: string;
|
|
46
|
+
k: string;
|
|
47
|
+
}, bookType: SupportedExportFormats, webupManagerData: WebupManagerData) => string | number | Date;
|
|
48
|
+
/**
|
|
49
|
+
* Conversion from Hexadecimal color to an AlphaRGB
|
|
50
|
+
* @param hex string - Hexadecimal value, it can bot have and don't have the # prefix
|
|
51
|
+
* @returns ARGB string code
|
|
52
|
+
*/
|
|
53
|
+
export declare const hexToArgb: (hex: string) => string;
|
|
54
|
+
export declare const convertToBuffer: (arrayBuffer: ArrayBuffer | Uint8Array) => Buffer | Uint8Array;
|
|
55
|
+
export declare const loadImageAsBase64: (imageUrl: string) => Promise<string | null>;
|
|
56
|
+
/**
|
|
57
|
+
* Converts a hexadecimal color string (e.g., "#RRGGBB" or "0xRRGGBB") to an RGB tuple.
|
|
58
|
+
*/
|
|
59
|
+
export declare const convertColorToRgb: (color: string) => [number, number, number];
|