@creatio/base 0.811.1 → 0.812.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.
Files changed (28) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/esm2020/lib/public/enums/index.mjs +2 -1
  3. package/esm2020/lib/public/enums/model-in-page-action.enum.mjs +20 -0
  4. package/esm2020/lib/public/esq/data-model/expressions/functions/macros-function-expression.mjs +7 -4
  5. package/esm2020/lib/public/esq/data-model/filters/between-filter.mjs +5 -2
  6. package/esm2020/lib/public/esq/data-model/filters/compare-filter.mjs +5 -2
  7. package/esm2020/lib/public/esq/data-model/filters/exists-filter.mjs +5 -2
  8. package/esm2020/lib/public/esq/data-model/filters/filter-group.mjs +26 -7
  9. package/esm2020/lib/public/esq/data-model/filters/filter-parser/filter-parser.mjs +7 -2
  10. package/esm2020/lib/public/esq/data-model/filters/in-filter.mjs +5 -2
  11. package/esm2020/lib/public/esq/data-model/filters/isnull-filter.mjs +5 -2
  12. package/esm2020/lib/public/models/index.mjs +2 -1
  13. package/esm2020/lib/public/models/model-init-config.mjs +2 -0
  14. package/esm2020/lib/public/services/dialog/dialog.service.mjs +2 -0
  15. package/esm2020/lib/public/services/dialog/index.mjs +3 -0
  16. package/esm2020/lib/public/services/dialog/models/base-dialog-button-config.mjs +2 -0
  17. package/esm2020/lib/public/services/dialog/models/dialog-action.mjs +2 -0
  18. package/esm2020/lib/public/services/dialog/models/dialog-config.mjs +2 -0
  19. package/esm2020/lib/public/services/dialog/models/index.mjs +4 -0
  20. package/esm2020/lib/public/services/index.mjs +2 -1
  21. package/esm2020/lib/public/types/button-color.type.mjs +2 -0
  22. package/esm2020/lib/public/types/index.mjs +2 -1
  23. package/fesm2015/creatio-base.mjs +76 -16
  24. package/fesm2015/creatio-base.mjs.map +1 -1
  25. package/fesm2020/creatio-base.mjs +76 -16
  26. package/fesm2020/creatio-base.mjs.map +1 -1
  27. package/index.d.ts +148 -2
  28. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -164,6 +164,57 @@ export declare interface ɵBaseDataSourceParameter {
164
164
  relationsConfigs?: ɵDataSourceParameterRelationConfig[];
165
165
  }
166
166
 
167
+ /**
168
+ * @public
169
+ * @description Config for button in dialog.
170
+ * @property {string} caption - Text witch will be displayed in button
171
+ * @property {ɵButtonColor} color - Color of button
172
+ */
173
+ export declare interface ɵBaseDialogButtonConfig {
174
+ /**
175
+ * @description Text witch will be displayed in button
176
+ */
177
+ caption: string;
178
+ /**
179
+ * @description Color of button
180
+ */
181
+ color: ɵButtonColor;
182
+ }
183
+
184
+ /**
185
+ * @public
186
+ * @description Dialog configuration object
187
+ * @property {string} title - Header of dialog
188
+ * @property {string} message - Message witch will be displayed in dialog
189
+ * @property {ɵDialogAction[]} actions - List of actions in dialog
190
+ */
191
+ export declare interface ɵBaseDialogConfig<TActionConfig extends ɵBaseDialogButtonConfig = ɵBaseDialogButtonConfig> {
192
+ /**
193
+ * @description Header text in dialog
194
+ */
195
+ title?: string;
196
+ /**
197
+ * @description Message witch will be displayed in dialog
198
+ */
199
+ message: string;
200
+ /**
201
+ * @description List of actions in dialog
202
+ */
203
+ actions: Array<ɵDialogAction<TActionConfig>>;
204
+ }
205
+
206
+ /**
207
+ * @public
208
+ * @description Service to working with dialog windows.
209
+ */
210
+ export declare interface ɵBaseDialogService<TConfig extends ɵBaseDialogConfig = ɵBaseDialogConfig> {
211
+ /**
212
+ * Opens dialog.
213
+ * @param {ɵBaseDialogConfig} config Dialog configuration object
214
+ */
215
+ open(config: TConfig): Promise<string>;
216
+ }
217
+
167
218
  export declare abstract class ɵBaseExpression implements ɵSerializable {
168
219
  /* Excluded from this release type: _instanceOfKey */
169
220
  /* Excluded from this release type: _instanceOfKeys */
@@ -346,6 +397,12 @@ export declare class ɵBetweenFilter extends ɵSingleFilter {
346
397
  toJson(): ɵJsonObject;
347
398
  }
348
399
 
400
+ /**
401
+ * @public
402
+ * @description button color theme name
403
+ */
404
+ export declare type ɵButtonColor = 'primary' | 'accent' | 'warn' | 'default';
405
+
349
406
  export declare class ɵColumnExpression extends ɵBaseExpression {
350
407
  /* Excluded from this release type: _instanceOfKey */
351
408
  /* Excluded from this release type: _instanceOfKeys */
@@ -863,6 +920,23 @@ export declare class ɵDeleteQuery extends ɵBaseFilterableQuery {
863
920
  constructor(rootSchemaName: string);
864
921
  }
865
922
 
923
+ /**
924
+ * @public
925
+ * @description Config for action in dialog.
926
+ * @property {string} key - Result witch will be returned after choose action
927
+ * @property {ɵBaseDialogButtonConfig} config - Config for button in dialog
928
+ */
929
+ export declare interface ɵDialogAction<T extends ɵBaseDialogButtonConfig = ɵBaseDialogButtonConfig> {
930
+ /**
931
+ * @description Result witch will be returned after choose action
932
+ */
933
+ key: string;
934
+ /**
935
+ * @description Config for button in dialog
936
+ */
937
+ config: T;
938
+ }
939
+
866
940
  /**
867
941
  * Empty Guid constant.
868
942
  * @public
@@ -1067,12 +1141,14 @@ export declare class ɵFilterGroup extends ɵBaseFilter {
1067
1141
  [key: string]: ɵBaseFilter;
1068
1142
  };
1069
1143
  logicalOperation: ɵLogicalOperatorType;
1070
- constructor(logicalOperation?: ɵLogicalOperatorType);
1144
+ rootSchemaName?: string;
1145
+ constructor(logicalOperation?: ɵLogicalOperatorType, rootSchemaName?: string);
1071
1146
  /**
1072
1147
  * Parses filter group from json.
1073
1148
  * @public
1074
1149
  */
1075
1150
  static fromJson<T extends typeof ɵBaseFilterParser>(dto: ɵJsonObject, filterParser: T): ɵFilterGroup;
1151
+ private _createParameterValueExpressions;
1076
1152
  /**
1077
1153
  * Returns filter item by index.
1078
1154
  * @param index Item index.
@@ -1095,6 +1171,12 @@ export declare class ɵFilterGroup extends ɵBaseFilter {
1095
1171
  * @param filterKey Filter key.
1096
1172
  */
1097
1173
  addSchemaColumnInFilterWithParameters(comparisonType: ɵComparisonType, columnPath: string, parameterValues: ɵEntityColumnValue[], filterKey?: string): void;
1174
+ /**
1175
+ * Creates and adds in filter for primary column.
1176
+ * @param primaryColumnValues Primary column values.
1177
+ * @param filterKey Filter key.
1178
+ */
1179
+ addPrimarySchemaColumnInFilter(primaryColumnValues: ɵEntityColumnValue[], filterKey?: string): void;
1098
1180
  addSchemaColumnIsNullFilter(columnPath: string, filterKey?: string): void;
1099
1181
  /**
1100
1182
  * Creates and adds not null filter.
@@ -1369,12 +1451,13 @@ export declare class ɵMacrosFunctionExpression extends ɵFunctionExpression {
1369
1451
  /* Excluded from this release type: _instanceOfKeys */
1370
1452
  readonly functionType: ɵFunctionType;
1371
1453
  readonly macrosType: ɵQueryMacrosType;
1454
+ readonly functionArgument?: ɵBaseExpression;
1372
1455
  constructor(config: ɵMacrosFunctionExpressionConfig);
1373
1456
  /**
1374
1457
  * Parses expression from json.
1375
1458
  * @public
1376
1459
  */
1377
- static fromJson(dto: ɵJsonObject): ɵMacrosFunctionExpression;
1460
+ static fromJson<TFilterParser extends typeof ɵBaseFilterParser, TExpressionParser extends typeof ɵBaseExpressionParser>(dto: ɵJsonObject, filterParser?: TFilterParser, expressionParser?: TExpressionParser): ɵMacrosFunctionExpression;
1378
1461
  clone(): ɵMacrosFunctionExpression;
1379
1462
  }
1380
1463
 
@@ -1387,6 +1470,69 @@ export declare interface ɵMetadataProvider<T> {
1387
1470
  getMetadata(): T;
1388
1471
  }
1389
1472
 
1473
+ /**
1474
+ * @public
1475
+ * @description Default value of the model.
1476
+ * @property {string} attributeName - Name of the attribute of the model.
1477
+ * @property {unknown} value - Value of the attribute of the model.
1478
+ */
1479
+ export declare interface ɵModelDefaultValue {
1480
+ /**
1481
+ * @description Name of the attribute of the model
1482
+ */
1483
+ attributeName: string;
1484
+ /**
1485
+ * @description Value of the attribute of the model
1486
+ */
1487
+ value: unknown;
1488
+ }
1489
+
1490
+ /**
1491
+ * @public
1492
+ * @description Initial config of the model.
1493
+ * @property {string} name - Name of the model.
1494
+ * @property {string} recordId - Primary value of the record.
1495
+ * @property {ɵModelInPageAction} action - Type of the action. {@link ɵModelInPageAction}
1496
+ * @property {Array<ɵModelDefaultValue>} defaultValues - Default values of the model. {@link ɵModelDefaultValue}
1497
+ */
1498
+ export declare interface ɵModelInitConfig {
1499
+ /**
1500
+ * @description Name of the model in modelConfig that should be initialized.
1501
+ */
1502
+ name?: string;
1503
+ /**
1504
+ * @description Primary value of the record.
1505
+ */
1506
+ recordId?: string;
1507
+ /**
1508
+ * @description Type of the action. {@link ɵModelInPageAction}
1509
+ */
1510
+ action: ɵModelInPageAction;
1511
+ /**
1512
+ * @description Default values of the model. {@link ɵModelDefaultValue}
1513
+ */
1514
+ defaultValues?: Array<ɵModelDefaultValue>;
1515
+ }
1516
+
1517
+ /**
1518
+ * @public
1519
+ * @description Type of the action of the model.
1520
+ */
1521
+ export declare enum ɵModelInPageAction {
1522
+ /**
1523
+ * @description Action for editing existed record.
1524
+ */
1525
+ Edit = "edit",
1526
+ /**
1527
+ * @description Action for adding new record.
1528
+ */
1529
+ Add = "add",
1530
+ /**
1531
+ * @description Action for copying the record.
1532
+ */
1533
+ Copy = "copy"
1534
+ }
1535
+
1390
1536
  /**
1391
1537
  * @public
1392
1538
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creatio/base",
3
- "version": "0.811.1",
3
+ "version": "0.812.0",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "description": "Internal API to create customizations and integrations for Creatio platform.",
6
6
  "keywords": [
@@ -9,7 +9,7 @@
9
9
  "base"
10
10
  ],
11
11
  "peerDependencies": {
12
- "class-transformer": "^0.4.0"
12
+ "class-transformer": "0.5.1"
13
13
  },
14
14
  "dependencies": {
15
15
  "tslib": "^2.3.0"