mdt-client 31.0.13 → 31.0.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdt-client",
3
- "version": "31.0.13",
3
+ "version": "31.0.14",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,10 +1,10 @@
1
1
  import { Icon } from "../components/icon/iconOptions";
2
2
  import { ModuleId, ObjectCode, ObjectId, ObjectTitle } from "../helpers/types";
3
- import { PermissionLevelString } from "../security/PermissionLevel";
3
+ import { PermissionLevel } from "../security/PermissionLevel";
4
4
  import { Datasource } from "./Datasource";
5
5
  import { Field } from "./Field";
6
6
  import { Record } from "./Record";
7
- export interface Table extends Record {
7
+ export interface Table extends Record, StoredProcedure {
8
8
  $id?: ObjectId;
9
9
  id?: ObjectId;
10
10
  object_id?: number;
@@ -24,7 +24,7 @@ export interface Table extends Record {
24
24
  $datasource?: Datasource;
25
25
  id_ObjectType?: string;
26
26
  tag_Enabled?: any;
27
- accessLevel?: PermissionLevelString;
27
+ accessLevel?: PermissionLevel;
28
28
  children?: Array<string>;
29
29
  readonly?: boolean;
30
30
  icon?: Icon;
@@ -38,3 +38,10 @@ export interface Table extends Record {
38
38
  $original?: Table;
39
39
  $system?: boolean;
40
40
  }
41
+ export interface StoredProcedure {
42
+ parameters?: ObjectParam[];
43
+ }
44
+ export interface ObjectParam {
45
+ code?: string;
46
+ dataType?: string;
47
+ }
@@ -3,7 +3,7 @@ import { FormattedText } from "../../../helpers/formattedText";
3
3
  import { CSSClassName, ViewElement, Valued } from "../../../helpers/types";
4
4
  export interface DropdownMenuItemBaseOptions {
5
5
  icon?: Valued<Icon>;
6
- title: Valued<string>;
6
+ title: Valued<ViewElement>;
7
7
  additionalTitle?: string;
8
8
  tooltip?: Valued<FormattedText>;
9
9
  execute?: (e?: Event) => void;
@@ -1,7 +1,10 @@
1
+ /// <reference types="../../../../mithril" />
2
+ /// <reference types="mithril" />
1
3
  import { UiType } from "../../helpers/IUi";
2
4
  import { CommandEvent } from "../../helpers/types";
3
5
  import { IconOptions } from "../icon/iconOptions";
4
6
  export interface IconButtonOptions extends IconOptions {
5
7
  command?: (e: CommandEvent) => void;
6
8
  type?: UiType;
9
+ additionalIconElement?: _mithril.MithrilVirtualElement;
7
10
  }
@@ -1,15 +1,8 @@
1
- import { PermissionLevel } from "./PermissionLevel";
1
+ import { ApiV1 } from "mdtServices/api/ApiAccessor/apiV1Types";
2
2
  export interface User {
3
3
  $id: number;
4
4
  id: any;
5
- permissions: {
6
- object: {
7
- [objectId: number]: ObjectPermission;
8
- };
9
- listview: PermissionLevel;
10
- namedfilters: PermissionLevel;
11
- tag: PermissionLevel;
12
- };
5
+ permissions: ApiV1.Response.User.Permissions;
13
6
  login: string;
14
7
  fullName: string;
15
8
  email?: string;
@@ -21,11 +14,6 @@ export interface User {
21
14
  languageCode: string;
22
15
  isImpersonated: boolean;
23
16
  }
24
- export interface EntityPermission {
25
- level: PermissionLevel;
26
- }
27
- export interface ObjectPermission extends EntityPermission {
28
- fields?: {
29
- [fieldId: number]: EntityPermission;
30
- };
31
- }
17
+ export declare type UserPermissionType = ApiV1.Response.User.UserPermissionType;
18
+ export declare type ObjectPermission = ApiV1.Response.User.ObjectPermission;
19
+ export declare type CommonPermissionData = ApiV1.Response.User.CommonPermissonData;
@@ -40,7 +40,7 @@ export interface IFilterIn extends Omit<IFilterItem, "op" | "p2"> {
40
40
  field: string;
41
41
  filter?: IFilter;
42
42
  args?: any;
43
- } | string[];
43
+ } | (string | Date)[];
44
44
  }
45
45
  export interface FilterSetterOptions {
46
46
  fireEvents?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { HierarchicalRecord, MdtRecord, RecordId } from "mdtScripts/common/Record";
2
- import { AnyObject, FieldCode, ObjectCode } from "mdtScripts/helpers/types";
2
+ import { AnyObject, ColorStyle, FieldCode, ModuleId, ObjectCode, ObjectId, ObjectTitle } from "mdtScripts/helpers/types";
3
3
  import { PermissionLevel } from "mdtScripts/security/PermissionLevel";
4
4
  export declare namespace ApiV1 {
5
5
  namespace Request {
@@ -62,6 +62,7 @@ export declare namespace ApiV1 {
62
62
  checkDependency?: string;
63
63
  audit?: string;
64
64
  workflow?: string;
65
+ workflowStage?: boolean;
65
66
  tag?: string;
66
67
  export?: string;
67
68
  format?: string;
@@ -154,6 +155,11 @@ export declare namespace ApiV1 {
154
155
  };
155
156
  };
156
157
  };
158
+ $workflowStage?: {
159
+ Title: string;
160
+ Icon: string;
161
+ LabelStyleCode: ColorStyle;
162
+ };
157
163
  }
158
164
  }
159
165
  export namespace File {
@@ -175,6 +181,85 @@ export declare namespace ApiV1 {
175
181
  Text: string;
176
182
  }
177
183
  }
184
+ export namespace User {
185
+ interface Permissions {
186
+ object: ObjectPermissions;
187
+ listview: PermissionLevel;
188
+ namedfilters: PermissionLevel;
189
+ tag: PermissionLevel;
190
+ [code: string]: CommonPermissonData;
191
+ }
192
+ type CommonPermissonData = PermissionLevel | ObjectPermissions;
193
+ type UserPermissionType = keyof Permissions;
194
+ interface EntityPermission {
195
+ level: PermissionLevel;
196
+ }
197
+ type ObjectPermissions = Record<RecordId, ObjectPermission>;
198
+ interface ObjectPermission {
199
+ level: PermissionLevel;
200
+ fields?: Record<RecordId, EntityPermission>;
201
+ }
202
+ }
203
+ export interface User {
204
+ id: any;
205
+ permissions: User.Permissions;
206
+ login: string;
207
+ fullName: string;
208
+ email?: string;
209
+ identityName: string;
210
+ isAdmin: boolean;
211
+ isAnonymous: boolean;
212
+ roles: string[];
213
+ languageId: number;
214
+ languageCode: string;
215
+ isImpersonated: boolean;
216
+ }
217
+ export namespace Schema {
218
+ interface Object {
219
+ $id?: ObjectId;
220
+ accessLevel?: PermissionLevel;
221
+ code?: ObjectCode;
222
+ defaultFieldCode?: any;
223
+ deleted?: boolean;
224
+ fields?: Field[];
225
+ id?: ObjectId;
226
+ id_ObjectType?: string;
227
+ id_ver_Module?: ModuleId;
228
+ object_id?: number;
229
+ tag_Enabled?: boolean;
230
+ title?: ObjectTitle;
231
+ "title@"?: ObjectTitle;
232
+ titlePlural?: string;
233
+ "titlePlural@"?: string;
234
+ description?: string;
235
+ readonly?: boolean;
236
+ icon?: string;
237
+ audit_Enabled?: boolean;
238
+ inline_AddInRow?: boolean;
239
+ inline_Enabled?: boolean;
240
+ hierarchyParentField?: string;
241
+ hierarchyIDField?: string;
242
+ flagHierarchy?: boolean;
243
+ flagConfiguration?: boolean;
244
+ settings?: string;
245
+ }
246
+ interface Field {
247
+ code: string;
248
+ type: string;
249
+ dataType: string;
250
+ $id?: ObjectId;
251
+ id?: ObjectId;
252
+ title?: string;
253
+ "title@"?: string;
254
+ identity?: boolean;
255
+ refTableCode?: string;
256
+ sortOreder?: number;
257
+ flagScriptDfkInline?: boolean;
258
+ primary?: boolean;
259
+ readonly?: boolean;
260
+ }
261
+ }
262
+ export type Schema = Schema.Object | Schema.Object[];
178
263
  export {};
179
264
  }
180
265
  type AggregationType = "sum" | "avg" | "count" | "distinct" | "max" | "min";