@sme.up/doc-alchemist 1.1.0-SNAPSHOT-20250623155458 → 1.2.0-20250805123329

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.
Files changed (136) hide show
  1. package/README.md +278 -30
  2. package/dist/assets/gfx-data.d.ts +1 -0
  3. package/dist/assets/gfx-data.js +2 -0
  4. package/dist/assets/gfx-data.js.map +1 -0
  5. package/dist/converters/excel/commons.d.ts +43 -0
  6. package/dist/converters/excel/commons.js +232 -0
  7. package/dist/converters/excel/commons.js.map +1 -0
  8. package/dist/{src/excel/excel-generator.types.d.ts → converters/excel/excel-converter.types.d.ts} +2 -0
  9. package/dist/{src/excel/excel-generator.types.js → converters/excel/excel-converter.types.js} +5 -2
  10. package/dist/converters/excel/excel-converter.types.js.map +1 -0
  11. package/dist/{src/excel/matrix-generator.d.ts → converters/excel/matrix-converter.d.ts} +4 -2
  12. package/dist/{src/excel/matrix-generator.js → converters/excel/matrix-converter.js} +35 -38
  13. package/dist/converters/excel/matrix-converter.js.map +1 -0
  14. package/dist/{src/excel/tree-generator.d.ts → converters/excel/tree-converter.d.ts} +2 -2
  15. package/dist/{src/excel/tree-generator.js → converters/excel/tree-converter.js} +5 -5
  16. package/dist/converters/excel/tree-converter.js.map +1 -0
  17. package/dist/{src/excel/excel-generator.d.ts → converters/excel-converter.d.ts} +2 -1
  18. package/dist/{src/excel/excel-generator.js → converters/excel-converter.js} +4 -4
  19. package/dist/converters/excel-converter.js.map +1 -0
  20. package/dist/converters/images/charts-generator.d.ts +9 -0
  21. package/dist/converters/images/charts-generator.js +250 -0
  22. package/dist/converters/images/charts-generator.js.map +1 -0
  23. package/dist/converters/pdf/autotable-renderer.d.ts +4 -0
  24. package/dist/converters/pdf/autotable-renderer.js +83 -0
  25. package/dist/converters/pdf/autotable-renderer.js.map +1 -0
  26. package/dist/converters/pdf/cover-renderer.d.ts +1 -0
  27. package/dist/converters/pdf/cover-renderer.js +50 -0
  28. package/dist/converters/pdf/cover-renderer.js.map +1 -0
  29. package/dist/converters/pdf/formulas-helper.d.ts +40 -0
  30. package/dist/converters/pdf/formulas-helper.js +227 -0
  31. package/dist/converters/pdf/formulas-helper.js.map +1 -0
  32. package/dist/converters/pdf/matrix-converter.d.ts +17 -0
  33. package/dist/converters/pdf/matrix-converter.js +200 -0
  34. package/dist/converters/pdf/matrix-converter.js.map +1 -0
  35. package/dist/converters/pdf/pdf-converter.types.d.ts +13 -0
  36. package/dist/converters/pdf/pdf-converter.types.js +2 -0
  37. package/dist/converters/pdf/pdf-converter.types.js.map +1 -0
  38. package/dist/converters/pdf/sch-converter.d.ts +3 -0
  39. package/dist/converters/pdf/sch-converter.js +99 -0
  40. package/dist/converters/pdf/sch-converter.js.map +1 -0
  41. package/dist/converters/pdf-converter.d.ts +8 -0
  42. package/dist/converters/pdf-converter.js +54 -0
  43. package/dist/converters/pdf-converter.js.map +1 -0
  44. package/dist/index.d.ts +7 -4
  45. package/dist/index.js +4 -2
  46. package/dist/index.js.map +1 -1
  47. package/dist/types/component-props.d.ts +8 -0
  48. package/dist/types/component-props.js +7 -0
  49. package/dist/types/component-props.js.map +1 -0
  50. package/dist/types/component.d.ts +53 -0
  51. package/dist/types/component.js +53 -0
  52. package/dist/types/component.js.map +1 -0
  53. package/dist/types/converter.d.ts +8 -0
  54. package/dist/types/converter.js +2 -0
  55. package/dist/types/converter.js.map +1 -0
  56. package/dist/types/data-structures/smeupDataStructure.d.ts +215 -0
  57. package/dist/types/data-structures/smeupDataStructure.js +99 -0
  58. package/dist/types/data-structures/smeupDataStructure.js.map +1 -0
  59. package/dist/types/data-structures/smeupDataTable.d.ts +125 -0
  60. package/dist/types/data-structures/smeupDataTable.js +43 -0
  61. package/dist/types/data-structures/smeupDataTable.js.map +1 -0
  62. package/dist/types/data-structures/smeupDataTree.d.ts +13 -0
  63. package/dist/types/data-structures/smeupDataTree.js +2 -0
  64. package/dist/types/data-structures/smeupDataTree.js.map +1 -0
  65. package/dist/types/data-structures/smeupSch.d.ts +72 -0
  66. package/dist/types/data-structures/smeupSch.js +11 -0
  67. package/dist/types/data-structures/smeupSch.js.map +1 -0
  68. package/dist/types/dynamism.d.ts +45 -0
  69. package/dist/types/dynamism.js +30 -0
  70. package/dist/types/dynamism.js.map +1 -0
  71. package/dist/types/general.d.ts +22 -0
  72. package/dist/types/general.js +24 -0
  73. package/dist/types/general.js.map +1 -0
  74. package/dist/types/helpers.d.ts +4 -0
  75. package/dist/types/helpers.js +6 -0
  76. package/dist/types/helpers.js.map +1 -0
  77. package/dist/{src/types → types}/index.d.ts +9 -2
  78. package/dist/{src/types → types}/index.js +2 -0
  79. package/dist/types/index.js.map +1 -0
  80. package/dist/utils/commons-utility.d.ts +61 -0
  81. package/dist/{src/utils/generator-utility.js → utils/commons-utility.js} +100 -10
  82. package/dist/utils/commons-utility.js.map +1 -0
  83. package/dist/utils/datastructure-utility.d.ts +2 -0
  84. package/dist/utils/datastructure-utility.js +5 -0
  85. package/dist/utils/datastructure-utility.js.map +1 -0
  86. package/dist/{src/utils → utils}/dates-utility.d.ts +9 -0
  87. package/dist/{src/utils → utils}/dates-utility.js +18 -0
  88. package/dist/utils/dates-utility.js.map +1 -0
  89. package/dist/utils/formatter-utility.d.ts +4 -0
  90. package/dist/utils/formatter-utility.js +41 -0
  91. package/dist/utils/formatter-utility.js.map +1 -0
  92. package/dist/utils/image-utils.d.ts +7 -0
  93. package/dist/utils/image-utils.js +32 -0
  94. package/dist/utils/image-utils.js.map +1 -0
  95. package/dist/{src/utils → utils}/math-utility.d.ts +1 -0
  96. package/dist/{src/utils → utils}/math-utility.js +10 -0
  97. package/dist/utils/math-utility.js.map +1 -0
  98. package/dist/utils/objects-utility.js.map +1 -0
  99. package/dist/utils/regex-utility.js.map +1 -0
  100. package/package.json +14 -11
  101. package/dist/assets/sample-data.d.ts +0 -48
  102. package/dist/assets/sample-data.js +0 -372
  103. package/dist/assets/sample-data.js.map +0 -1
  104. package/dist/debug.d.ts +0 -1
  105. package/dist/debug.js +0 -29
  106. package/dist/debug.js.map +0 -1
  107. package/dist/src/excel/commons.d.ts +0 -21
  108. package/dist/src/excel/commons.js +0 -120
  109. package/dist/src/excel/commons.js.map +0 -1
  110. package/dist/src/excel/excel-generator.js.map +0 -1
  111. package/dist/src/excel/excel-generator.types.js.map +0 -1
  112. package/dist/src/excel/matrix-generator.js.map +0 -1
  113. package/dist/src/excel/tree-generator.js.map +0 -1
  114. package/dist/src/index.d.ts +0 -1
  115. package/dist/src/index.js +0 -2
  116. package/dist/src/index.js.map +0 -1
  117. package/dist/src/pdf/pdf-generator.d.ts +0 -7
  118. package/dist/src/pdf/pdf-generator.js +0 -28
  119. package/dist/src/pdf/pdf-generator.js.map +0 -1
  120. package/dist/src/types/index.js.map +0 -1
  121. package/dist/src/utils/datastructure-utility.d.ts +0 -2
  122. package/dist/src/utils/datastructure-utility.js +0 -5
  123. package/dist/src/utils/datastructure-utility.js.map +0 -1
  124. package/dist/src/utils/dates-utility.js.map +0 -1
  125. package/dist/src/utils/generator-utility.d.ts +0 -34
  126. package/dist/src/utils/generator-utility.js.map +0 -1
  127. package/dist/src/utils/math-utility.js.map +0 -1
  128. package/dist/src/utils/objects-utility.js.map +0 -1
  129. package/dist/src/utils/regex-utility.js.map +0 -1
  130. package/dist/tests/excel-generator.test.d.ts +0 -1
  131. package/dist/tests/excel-generator.test.js +0 -406
  132. package/dist/tests/excel-generator.test.js.map +0 -1
  133. /package/dist/{src/utils → utils}/objects-utility.d.ts +0 -0
  134. /package/dist/{src/utils → utils}/objects-utility.js +0 -0
  135. /package/dist/{src/utils → utils}/regex-utility.d.ts +0 -0
  136. /package/dist/{src/utils → utils}/regex-utility.js +0 -0
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Provides context to the converters chains by exposing common info that can be reused in many different occasions and multiple times.
3
+ */
4
+ export interface ConverterContext {
5
+ title?: string;
6
+ subtitle?: string;
7
+ logoBase64?: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=converter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"converter.js","sourceRoot":"","sources":["../../src/types/converter.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Provides context to the converters chains by exposing common info that can be reused in many different occasions and multiple times.\n */\nexport interface ConverterContext {\n title?: string;\n subtitle?: string;\n logoBase64?: string;\n}\n"]}
@@ -0,0 +1,215 @@
1
+ import { ComponentOptions, Shapes } from "../component.js";
2
+ import { Fun } from "../general.js";
3
+ import { SmeupDataCell } from "./smeupDataTable.js";
4
+ import { SmeupDataNode } from "./smeupDataTree.js";
5
+ /**
6
+ * Smeup data structure
7
+ */
8
+ export interface SmeupDataStructure {
9
+ type: SmeupDataStructureType;
10
+ messages?: SmeupMessage[];
11
+ variables?: SmeupVariable[];
12
+ buttons?: SmeupDataNode[];
13
+ actions?: SmeupAction[];
14
+ setup?: SmeupSetup;
15
+ debugInfo?: DebugInfo;
16
+ }
17
+ /**
18
+ * Api version
19
+ */
20
+ export declare enum ApiVersion {
21
+ V2 = 0
22
+ }
23
+ /**
24
+ * SmeupDataStructure types
25
+ */
26
+ export declare enum SmeupDataStructureType {
27
+ /** Smeup feedback (FBK) */
28
+ SmeupFeedback = "SmeupFeedback",
29
+ /** SmeupDataTable (DTA) */
30
+ SmeupDataTable = "SmeupDataTable",
31
+ /** SmeupDataTree (DTR) */
32
+ SmeupDataTree = "SmeupDataTree",
33
+ /** SmeupSch */
34
+ SmeupScheda = "SmeupSch"
35
+ }
36
+ export declare function getSmeupDataStructureType(fun: Fun, version: ApiVersion): SmeupDataStructureType;
37
+ /**
38
+ * Smeup data structure
39
+ */
40
+ export interface SmeupFeedback extends SmeupDataStructure {
41
+ type: SmeupDataStructureType.SmeupFeedback;
42
+ }
43
+ /**
44
+ * SmeupMessage type
45
+ */
46
+ export interface SmeupMessage {
47
+ gravity: SmeupMessageGravity;
48
+ message: string;
49
+ mode: string;
50
+ }
51
+ /**
52
+ * SmeupMessage Gravity
53
+ */
54
+ export declare const SMEUP_MESSAGE_GRAVITY: {
55
+ readonly INFO: "INFO";
56
+ readonly ERROR: "ERROR";
57
+ readonly WARNING: "WARNING";
58
+ readonly UNAUTHORIZED: "UNAUTHORIZED";
59
+ };
60
+ export type SmeupMessageGravity = (typeof SMEUP_MESSAGE_GRAVITY)[keyof typeof SMEUP_MESSAGE_GRAVITY];
61
+ /**
62
+ * SmeupMessage Mode
63
+ */
64
+ export declare const SMEUP_MESSAGE_MODE: {
65
+ readonly PM: "PM";
66
+ readonly PN: "PN";
67
+ readonly TN: "TN";
68
+ };
69
+ /**
70
+ * SmeupVariable
71
+ */
72
+ export interface SmeupVariable {
73
+ name: string;
74
+ value: string;
75
+ type?: SmeupVariableType;
76
+ }
77
+ /**
78
+ * SmeupVariableType
79
+ */
80
+ export declare const SMEUP_VARIABLE_TYPE: {
81
+ readonly SEC: "sec";
82
+ readonly SCH: "sch";
83
+ readonly SSC: "ssc";
84
+ readonly LOO: "loo";
85
+ };
86
+ export type SmeupVariableType = (typeof SMEUP_VARIABLE_TYPE)[keyof typeof SMEUP_VARIABLE_TYPE];
87
+ /**
88
+ * SmeupAction
89
+ */
90
+ export interface SmeupAction {
91
+ exec?: string;
92
+ parameter?: string;
93
+ type?: SmeupActionType;
94
+ }
95
+ /**
96
+ * SmeupActionType
97
+ */
98
+ export declare const SMEUP_ACTION_TYPE: {
99
+ readonly CLOSE: "CLOSE";
100
+ readonly CLOSEW: "CLOSEW";
101
+ readonly DYNAMIC: "DYNAMIC";
102
+ readonly DINAMIC: "DINAMIC";
103
+ readonly EXECUTE: "EXECUTE";
104
+ readonly LOAD: "LOAD";
105
+ readonly RELOAD: "RELOAD";
106
+ readonly UPDATE: "UPDATE";
107
+ readonly EXIT: "EXIT";
108
+ readonly REFRESH: "REFRESH";
109
+ readonly HARDREFRESH: "HARDREFRESH";
110
+ readonly POPUP: "POPUP";
111
+ readonly RETURNVALUE: "RETURNVALUE";
112
+ };
113
+ type SmeupActionType = (typeof SMEUP_ACTION_TYPE)[keyof typeof SMEUP_ACTION_TYPE];
114
+ /**
115
+ * Smeup Data Cell Input Settings Keys
116
+ */
117
+ export declare const SMEUP_DATA_CELL_INPUT_SETTINGS_KEYS: {
118
+ readonly MANDATORY: {
119
+ readonly key: "mandatory";
120
+ readonly type: "boolean";
121
+ };
122
+ readonly CHECK_VALUE_ON_EXIT: {
123
+ readonly key: "checkValueOnExit";
124
+ readonly type: "boolean";
125
+ };
126
+ readonly CHECK_OBJECT: {
127
+ readonly key: "checkObject";
128
+ readonly type: "boolean";
129
+ };
130
+ readonly FORCE_UPPERCASE: {
131
+ readonly key: "forceUppercase";
132
+ readonly type: "boolean";
133
+ };
134
+ };
135
+ export type SmeupDataCellInputSettingsKeys = keyof typeof SMEUP_DATA_CELL_INPUT_SETTINGS_KEYS;
136
+ export type SmeupDataCellInputSettingsValue = (typeof SMEUP_DATA_CELL_INPUT_SETTINGS_KEYS)[SmeupDataCellInputSettingsKeys];
137
+ export interface DebugInfo {
138
+ executionTime_ms: number;
139
+ initialTimestamp: string;
140
+ finalTimestamp: string;
141
+ runtime: {
142
+ [index: string]: string;
143
+ };
144
+ }
145
+ /**
146
+ * LAYOUT
147
+ * Represent the layout of the fields in a form and the adjuntive informations
148
+ */
149
+ export interface SmeupLayout {
150
+ horizontal?: boolean;
151
+ absolute?: boolean;
152
+ sections?: SmeupLayoutSection[];
153
+ sectionsType?: SmeupLayoutSectionType;
154
+ }
155
+ /**
156
+ * Represent a layout section
157
+ */
158
+ export interface SmeupLayoutSection {
159
+ id?: string;
160
+ content?: SmeupLayoutField[];
161
+ sections?: SmeupLayoutSection[];
162
+ dim?: string;
163
+ collapsible?: boolean;
164
+ horizontal?: boolean;
165
+ icon?: string;
166
+ sectionsType?: SmeupLayoutSectionType;
167
+ styleName?: string;
168
+ gridCols?: number;
169
+ gridRows?: number;
170
+ gap?: number;
171
+ title?: string;
172
+ absoluteColumn?: number;
173
+ absoluteWidth?: number;
174
+ absoluteRow?: number;
175
+ absoluteHeight?: number;
176
+ columns?: string;
177
+ }
178
+ export declare enum SmeupLayoutSectionType {
179
+ TAB = "tab"
180
+ }
181
+ /**
182
+ * Represent the presentation information of a field in a form
183
+ */
184
+ export interface SmeupLayoutField extends SmeupDataCell {
185
+ id: string;
186
+ title?: string;
187
+ visible?: boolean;
188
+ colSpan?: number;
189
+ colStart?: number;
190
+ colEnd?: number;
191
+ rowSpan?: number;
192
+ rowStart?: number;
193
+ rowEnd?: number;
194
+ absoluteColumn?: number;
195
+ absoluteRow?: number;
196
+ absoluteLength?: number;
197
+ absoluteHeight?: number;
198
+ useAs?: string;
199
+ }
200
+ export type SmeupSetupBase<T extends ComponentOptions = ComponentOptions> = {
201
+ [key in Shapes]?: T[];
202
+ };
203
+ export interface SmeupSetup<T extends ComponentOptions = ComponentOptions> {
204
+ title?: string;
205
+ options?: SmeupSetupBase<T>;
206
+ userSetups?: boolean;
207
+ context?: string;
208
+ commands?: Array<SmeupDataNode>;
209
+ operations?: {
210
+ insert?: boolean;
211
+ delete?: boolean;
212
+ update?: boolean;
213
+ };
214
+ }
215
+ export {};
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Api version
3
+ */
4
+ export var ApiVersion;
5
+ (function (ApiVersion) {
6
+ ApiVersion[ApiVersion["V2"] = 0] = "V2";
7
+ })(ApiVersion || (ApiVersion = {}));
8
+ /**
9
+ * SmeupDataStructure types
10
+ */
11
+ export var SmeupDataStructureType;
12
+ (function (SmeupDataStructureType) {
13
+ /** Smeup feedback (FBK) */
14
+ SmeupDataStructureType["SmeupFeedback"] = "SmeupFeedback";
15
+ /** SmeupDataTable (DTA) */
16
+ SmeupDataStructureType["SmeupDataTable"] = "SmeupDataTable";
17
+ /** SmeupDataTree (DTR) */
18
+ SmeupDataStructureType["SmeupDataTree"] = "SmeupDataTree";
19
+ /** SmeupSch */
20
+ SmeupDataStructureType["SmeupScheda"] = "SmeupSch";
21
+ })(SmeupDataStructureType || (SmeupDataStructureType = {}));
22
+ export function getSmeupDataStructureType(fun, version) {
23
+ switch (fun.component) {
24
+ case "TRE":
25
+ case "HTM":
26
+ case "CDE":
27
+ case "EDT":
28
+ return SmeupDataStructureType.SmeupDataTree;
29
+ case "EXU":
30
+ case "INP":
31
+ case "EXB":
32
+ case "EXC":
33
+ return SmeupDataStructureType.SmeupDataTable;
34
+ case "FBK":
35
+ return SmeupDataStructureType.SmeupFeedback;
36
+ case "SCH":
37
+ return SmeupDataStructureType.SmeupScheda;
38
+ default:
39
+ throw new Error(`${fun.component} not correspond to a valid SmeupDataStructure type`);
40
+ }
41
+ }
42
+ /**
43
+ * SmeupMessage Gravity
44
+ */
45
+ export const SMEUP_MESSAGE_GRAVITY = {
46
+ INFO: "INFO",
47
+ ERROR: "ERROR",
48
+ WARNING: "WARNING",
49
+ UNAUTHORIZED: "UNAUTHORIZED",
50
+ };
51
+ /**
52
+ * SmeupMessage Mode
53
+ */
54
+ export const SMEUP_MESSAGE_MODE = {
55
+ PM: "PM",
56
+ PN: "PN",
57
+ TN: "TN",
58
+ };
59
+ /**
60
+ * SmeupVariableType
61
+ */
62
+ export const SMEUP_VARIABLE_TYPE = {
63
+ SEC: "sec",
64
+ SCH: "sch",
65
+ SSC: "ssc",
66
+ LOO: "loo",
67
+ };
68
+ /**
69
+ * SmeupActionType
70
+ */
71
+ export const SMEUP_ACTION_TYPE = {
72
+ CLOSE: "CLOSE",
73
+ CLOSEW: "CLOSEW",
74
+ DYNAMIC: "DYNAMIC",
75
+ DINAMIC: "DINAMIC",
76
+ EXECUTE: "EXECUTE",
77
+ LOAD: "LOAD",
78
+ RELOAD: "RELOAD",
79
+ UPDATE: "UPDATE",
80
+ EXIT: "EXIT",
81
+ REFRESH: "REFRESH",
82
+ HARDREFRESH: "HARDREFRESH",
83
+ POPUP: "POPUP",
84
+ RETURNVALUE: "RETURNVALUE",
85
+ };
86
+ /**
87
+ * Smeup Data Cell Input Settings Keys
88
+ */
89
+ export const SMEUP_DATA_CELL_INPUT_SETTINGS_KEYS = {
90
+ MANDATORY: { key: "mandatory", type: "boolean" },
91
+ CHECK_VALUE_ON_EXIT: { key: "checkValueOnExit", type: "boolean" },
92
+ CHECK_OBJECT: { key: "checkObject", type: "boolean" },
93
+ FORCE_UPPERCASE: { key: "forceUppercase", type: "boolean" },
94
+ };
95
+ export var SmeupLayoutSectionType;
96
+ (function (SmeupLayoutSectionType) {
97
+ SmeupLayoutSectionType["TAB"] = "tab";
98
+ })(SmeupLayoutSectionType || (SmeupLayoutSectionType = {}));
99
+ //# sourceMappingURL=smeupDataStructure.js.map
@@ -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,125 @@
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
+ cover?: SmeupCover;
8
+ }
9
+ export interface SmeupDataColumn {
10
+ name: string;
11
+ title?: string;
12
+ visible?: boolean;
13
+ isEditable?: boolean;
14
+ isKey?: boolean;
15
+ fill?: string;
16
+ obj?: {
17
+ t: string;
18
+ p: string;
19
+ };
20
+ maxLength?: number;
21
+ length?: number;
22
+ integers?: number;
23
+ decimals?: number;
24
+ tooltip?: boolean;
25
+ formula?: string;
26
+ shape?: SmeupDataCellShapes;
27
+ useAs?: string;
28
+ hideValuesRepetitions?: boolean;
29
+ }
30
+ export interface SmeupDataRow {
31
+ cells?: {
32
+ [columnName: string]: SmeupDataCell;
33
+ };
34
+ layout?: SmeupLayout;
35
+ rowId?: string;
36
+ error?: boolean;
37
+ }
38
+ export interface SmeupDataCell {
39
+ value: string;
40
+ obj?: {
41
+ t: string;
42
+ p: string;
43
+ k: string;
44
+ };
45
+ options?: SmeupDataCellOption[];
46
+ icon?: string;
47
+ isEditable?: boolean;
48
+ hasMCell?: boolean;
49
+ mandatory?: boolean;
50
+ shape?: SmeupDataCellShapes;
51
+ fun?: string;
52
+ tooltip?: boolean;
53
+ data?: {
54
+ [key: string]: Object;
55
+ };
56
+ disabled?: boolean;
57
+ styleName?: string;
58
+ styleAttributes?: {
59
+ [attributeKey: string]: string;
60
+ };
61
+ inputSettings?: {
62
+ [key: string]: Object;
63
+ };
64
+ }
65
+ /**
66
+ * Represents the single option of the cell
67
+ */
68
+ export interface SmeupDataCellOption {
69
+ id: string;
70
+ label: string;
71
+ }
72
+ /**
73
+ * Represent the possible shapes of a field
74
+ */
75
+ export declare const SmeupDataCellShapes: {
76
+ readonly AUTOCOMPLETE: "ACP";
77
+ readonly BUTTON_LIST: "BTN";
78
+ readonly CHART: "GRA";
79
+ readonly CHECKBOX: "CHK";
80
+ readonly CHIP: "CHI";
81
+ readonly COLOR_PICKER: "CLP";
82
+ readonly COMBOBOX: "CMB";
83
+ readonly DATE: "CAL";
84
+ readonly EDITOR: "EDT";
85
+ readonly GAUGE: "GAU";
86
+ readonly ICON: "ICO";
87
+ readonly IMAGE: "IMG";
88
+ readonly INPUT_CHECKBOX: "INC";
89
+ readonly INPUT_FIELD: "INF";
90
+ readonly KNOB: "KNB";
91
+ readonly LABEL: "LBL";
92
+ readonly MEMO: "MEM";
93
+ readonly MULTI_AUTOCOMPLETE: "AML";
94
+ readonly MULTI_COMBOBOX: "CML";
95
+ readonly OBJECT: "OBJ";
96
+ readonly PROGRESS_BAR: "PGB";
97
+ readonly RADIO: "RAD";
98
+ readonly RATING: "RTG";
99
+ readonly SWITCH: "SWT";
100
+ readonly TABLE: "TBL";
101
+ readonly TEXT_FIELD: "ITX";
102
+ readonly TIME: "TIM";
103
+ readonly INPUT_NUMBER: "INR";
104
+ readonly BOOLEAN_BUTTON: "BNB";
105
+ readonly RANGE: "RNG";
106
+ readonly FILE_UPLOAD: "FUP";
107
+ readonly FILE_READER: "FRE";
108
+ readonly COMMAND_EXECUTE: "RUN";
109
+ readonly ONE_BUTTON: "BTO";
110
+ readonly PASSWORD: "PWD";
111
+ readonly SPINNER: "SPN";
112
+ readonly DECODE: "DEC";
113
+ };
114
+ /**
115
+ * Represent the type of the shape (like enum)
116
+ */
117
+ export type SmeupDataCellShapes = (typeof SmeupDataCellShapes)[keyof typeof SmeupDataCellShapes] | string;
118
+ export interface SmeupCover {
119
+ image?: string;
120
+ logo?: string;
121
+ titles?: {
122
+ [t: string]: string;
123
+ };
124
+ data?: SmeupDataTable[];
125
+ }
@@ -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":"AAmFA;;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 cover?: SmeupCover;\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\nexport interface SmeupCover {\n image?: string;\n logo?: string;\n titles?: {\n [t: string]: string;\n };\n data?: SmeupDataTable[];\n}\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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=smeupDataTree.js.map
@@ -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"]}