@limetech/lime-web-components 5.19.0 → 5.21.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 (32) hide show
  1. package/dist/action/action.d.ts +53 -0
  2. package/dist/action/action.d.ts.map +1 -0
  3. package/dist/action/action.js +1 -0
  4. package/dist/action/index.d.ts +2 -0
  5. package/dist/action/index.d.ts.map +1 -0
  6. package/dist/action/index.js +1 -0
  7. package/dist/commandbus/commandbus.d.ts +54 -8
  8. package/dist/commandbus/commandbus.d.ts.map +1 -1
  9. package/dist/conditionregistry/conditionregistry.d.ts +20 -1
  10. package/dist/conditionregistry/conditionregistry.d.ts.map +1 -1
  11. package/dist/datetimeformatter/datetimeformatter.d.ts +50 -13
  12. package/dist/datetimeformatter/datetimeformatter.d.ts.map +1 -1
  13. package/dist/datetimeformatter/types.d.ts +0 -8
  14. package/dist/datetimeformatter/types.d.ts.map +1 -1
  15. package/dist/es5/action/action.js +2 -0
  16. package/dist/es5/action/index.js +4 -0
  17. package/dist/es5/index.js +1 -0
  18. package/dist/es5/testing/services/datetimeformatter.js +1 -0
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +1 -0
  22. package/dist/limeobject/commands/bulk-create-dialog.d.ts +5 -1
  23. package/dist/limeobject/commands/bulk-create-dialog.d.ts.map +1 -1
  24. package/dist/limeobject/commands/delete-object.d.ts +10 -1
  25. package/dist/limeobject/commands/delete-object.d.ts.map +1 -1
  26. package/dist/limeobject/commands/object-access.d.ts +10 -1
  27. package/dist/limeobject/commands/object-access.d.ts.map +1 -1
  28. package/dist/limeobject/commands/save-object.d.ts +4 -1
  29. package/dist/limeobject/commands/save-object.d.ts.map +1 -1
  30. package/dist/testing/services/datetimeformatter.d.ts.map +1 -1
  31. package/dist/testing/services/datetimeformatter.js +1 -0
  32. package/package.json +1 -1
@@ -0,0 +1,53 @@
1
+ import { AnyCommand, LimeObjectBulkCommand, LimeObjectCommand } from '../commandbus';
2
+ import { Condition } from '../conditionregistry';
3
+ /**
4
+ * Represents an action that is displayed in the UI
5
+ * @alpha
6
+ * @group Actions
7
+ */
8
+ export interface Action<T extends AnyCommand = AnyCommand> {
9
+ /**
10
+ * The command to execute when the action is activated
11
+ */
12
+ command: T;
13
+ /**
14
+ * Condition to determine if the action is available
15
+ */
16
+ condition?: Condition;
17
+ /**
18
+ * Icon of the action
19
+ */
20
+ icon?: string;
21
+ /**
22
+ * Color of the icon
23
+ */
24
+ color?: string;
25
+ /**
26
+ * Label to display on or next to the action.
27
+ * The label will be translated by the {@link Translator}
28
+ */
29
+ label?: string;
30
+ /**
31
+ * Additional description about the action
32
+ */
33
+ description?: string;
34
+ /**
35
+ * True if the action is disabled
36
+ */
37
+ disabled?: boolean;
38
+ }
39
+ /**
40
+ * An action for a single {@link LimeObject}
41
+ *
42
+ * @alpha
43
+ * @group Actions
44
+ */
45
+ export type LimeObjectAction = Action<LimeObjectCommand>;
46
+ /**
47
+ * An action for multiple {@link LimeObject}s
48
+ *
49
+ * @alpha
50
+ * @group Actions
51
+ */
52
+ export type LimeObjectBulkAction = Action<LimeObjectBulkCommand>;
53
+ //# sourceMappingURL=action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../src/action/action.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EACV,qBAAqB,EACrB,iBAAiB,EACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAMjD;;;;GAIG;AACH,MAAM,WAAW,MAAM,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU;IACrD;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC;IAEX;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './action';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/action/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './action';
@@ -1,8 +1,54 @@
1
+ import { LimeWebComponentContext } from '../core';
2
+ import { Expression } from '../query';
3
+ /**
4
+ * A generic command
5
+ *
6
+ * @public
7
+ * @group Command bus
8
+ */
9
+ export interface AnyCommand {
10
+ }
11
+ /**
12
+ * A command operating on a single {@link LimeObject}
13
+ *
14
+ * @public
15
+ * @group Command bus
16
+ */
17
+ export interface LimeObjectCommand extends AnyCommand {
18
+ /**
19
+ * Context describing the {@link LimeObject} the command will operate on
20
+ */
21
+ context: LimeWebComponentContext & {
22
+ limetype: string;
23
+ id: number;
24
+ };
25
+ }
26
+ /**
27
+ * A command operating on multiple {@link LimeObject}s of a single {@link LimeType}
28
+ *
29
+ * @public
30
+ * @group Command bus
31
+ */
32
+ export interface LimeObjectBulkCommand extends AnyCommand {
33
+ /**
34
+ * Context describing the {@link LimeType} the command will operate on. If
35
+ * `parent` is set on the context, it indicates that the {@link LimeObject}s
36
+ * are all related to a common parent {@link LimeObject} via a `belongsto`
37
+ * relation
38
+ */
39
+ context: LimeWebComponentContext & {
40
+ limetype: string;
41
+ };
42
+ /**
43
+ * An expression describing what {@link LimeObject}s to operate on
44
+ */
45
+ filter?: Expression;
46
+ }
1
47
  /**
2
48
  * @public
3
49
  * @group Command bus
4
50
  */
5
- export type CommandClass = new (...args: any[]) => any;
51
+ export type CommandClass = new (...args: any[]) => AnyCommand;
6
52
  /**
7
53
  * @public
8
54
  * @group Command bus
@@ -28,7 +74,7 @@ export interface CommandBus extends CommandHandler {
28
74
  *
29
75
  * @returns result from the command handler
30
76
  */
31
- handle(command: object): any;
77
+ handle(command: AnyCommand): any;
32
78
  /**
33
79
  * Check if a command is supported
34
80
  *
@@ -66,13 +112,13 @@ export interface CommandHandler {
66
112
  *
67
113
  * @returns the result of the operation
68
114
  */
69
- handle(command: object): any;
115
+ handle(command: AnyCommand): any;
70
116
  }
71
117
  /**
72
118
  * @public
73
119
  * @group Command bus
74
120
  */
75
- export type CallableCommandMiddleware = (command: object) => any;
121
+ export type CallableCommandMiddleware = (command: AnyCommand) => any;
76
122
  /**
77
123
  * Middleware for the command bus
78
124
  * @public
@@ -87,7 +133,7 @@ export interface CommandMiddleware {
87
133
  *
88
134
  * @returns the result of the operation
89
135
  */
90
- execute(command: object, next: CallableCommandMiddleware): any;
136
+ execute(command: AnyCommand, next: CallableCommandMiddleware): any;
91
137
  }
92
138
  /**
93
139
  * Events dispatched by the commandbus event middleware
@@ -120,7 +166,7 @@ export declare enum CommandEventName {
120
166
  * @group Command bus
121
167
  */
122
168
  export type CommandEventDetail = {
123
- command: object;
169
+ command: AnyCommand;
124
170
  result?: unknown;
125
171
  error?: unknown;
126
172
  };
@@ -175,7 +221,7 @@ export declare function Command(options: CommandOptions): (commandClass: Command
175
221
  * @public
176
222
  * @group Command bus
177
223
  */
178
- export declare function getCommandId(value: object | CommandIdentifier): string;
224
+ export declare function getCommandId(value: AnyCommand | CommandIdentifier): string;
179
225
  /**
180
226
  * Get all registered ids of a command and its parent classes
181
227
  *
@@ -185,5 +231,5 @@ export declare function getCommandId(value: object | CommandIdentifier): string;
185
231
  * @beta
186
232
  * @group Command bus
187
233
  */
188
- export declare function getCommandIds(value: object | CommandIdentifier): string[];
234
+ export declare function getCommandIds(value: AnyCommand | CommandIdentifier): string[];
189
235
  //# sourceMappingURL=commandbus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"commandbus.d.ts","sourceRoot":"","sources":["../../src/commandbus/commandbus.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,MAAM,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAC9C;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAEpE;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC;IAE7B;;;;;;OAMG;IACH,WAAW,CAAC,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC;IAEnD;;;;;;OAMG;IACH,UAAU,CAAC,YAAY,EAAE,YAAY,GAAG,cAAc,CAAC;IAEvD;;;;;OAKG;IACH,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACvD;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC3B;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC;CAChC;AAED;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;AAEjE;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;OAOG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,GAAG,CAAC;CAClE;AAED;;;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BAAiB;IAC9B;;;;;;;OAOG;IACH,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,yBAAyB,GAAG,GAAG,CAAC;CACtE;AAED;;;;GAIG;AACH,oBAAY,gBAAgB;IACxB;;;;;OAKG;IACH,QAAQ,qBAAqB;IAE7B;;;;OAIG;IACH,OAAO,oBAAoB;IAE3B;;;;OAIG;IACH,MAAM,mBAAmB;CAC5B;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,kBAAkB,CAAC,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,GAAG;IAClC;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;CAC9C;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,cAAc,kBACrB,YAAY,UAIrC;AAeD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,iBAAiB,GAAG,MAAM,CAgB1E;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,iBAAiB,GAAG,MAAM,EAAE,CAW7E"}
@@ -1,3 +1,4 @@
1
+ import { Action } from '../action';
1
2
  import { LimeObject } from '../limeobject';
2
3
  /**
3
4
  * This interface defines callbacks intended to be registered to the {@link Condition} registry
@@ -10,7 +11,16 @@ export type Condition<T = unknown> = {
10
11
  * The condition type, describing what to evaluate the condition for, for example "limeobject"
11
12
  */
12
13
  type: string;
13
- evaluate: (subject: T, params: any) => boolean;
14
+ /**
15
+ * The evaluation function relating to this condition, serves the role of a predicate
16
+ *
17
+ * @param subject - some value depending on the condition type to evaluate the condition for,
18
+ * such as the current limeobject
19
+ * @param params - any additional data that this condition may expect, such as configuration
20
+ * data from an action visibility condition
21
+ * @throws may throw an error if the second argument has an unexpected type
22
+ */
23
+ evaluate: (subject: T, params?: unknown) => boolean;
14
24
  id: string;
15
25
  };
16
26
  /**
@@ -22,6 +32,15 @@ export type Condition<T = unknown> = {
22
32
  export type LimeObjectCondition = Condition<LimeObject> & {
23
33
  type: 'limeobject';
24
34
  };
35
+ /**
36
+ * A condition to evaluate for an {@link Action}
37
+ *
38
+ * @alpha
39
+ * @group Conditions
40
+ */
41
+ export type ActionCondition = Condition<Action> & {
42
+ type: 'action';
43
+ };
25
44
  /**
26
45
  * Check if condition expects a lime object to be passed when it is evaluated
27
46
  *
@@ -1 +1 @@
1
- {"version":3,"file":"conditionregistry.d.ts","sourceRoot":"","sources":["../../src/conditionregistry/conditionregistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG,OAAO,IAAI;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAWb,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC;IAK/C,EAAE,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,CAAC,UAAU,CAAC,GAAG;IACtD,IAAI,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACjC,SAAS,EAAE,SAAS,GACrB,SAAS,IAAI,SAAS,CAAC,UA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OAKG;IACH,YAAY,CAAC,SAAS,EAAE,SAAS,OAAE;IAEnC;;;;;OAKG;IACH,eAAe,CAAC,SAAS,EAAE,SAAS,OAAE;IAEtC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;IAElC;;;;OAIG;IACH,aAAa,IAAI,SAAS,EAAE,CAAC;IAE7B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC"}
@@ -1,4 +1,11 @@
1
- import { DateTimeType } from './types';
1
+ import { DateTimePropertyType } from '../limetype';
2
+ /**
3
+ * The possible types a date can be formatted as.
4
+ *
5
+ * @beta
6
+ * @group Localization
7
+ */
8
+ export type DateTimeType = 'week' | 'relative' | DateTimePropertyType;
2
9
  /**
3
10
  * The hour cycle to use.
4
11
  * - `h11` is 12 hour clock where midnight and midday are 0:00.
@@ -6,14 +13,14 @@ import { DateTimeType } from './types';
6
13
  * - `h23` is 24 hour clock where midnight is 0:00.
7
14
  * - `h24` is 24 hour clock where midnight is 24:00.
8
15
  *
9
- * @alpha
16
+ * @beta
10
17
  * @group Localization
11
18
  */
12
19
  export type HourCycle = 'h11' | 'h12' | 'h23' | 'h24';
13
20
  /**
14
21
  * Options for `DateTimeFormatter.format()`.
15
22
  *
16
- * @alpha
23
+ * @beta
17
24
  * @group Localization
18
25
  */
19
26
  export interface DateTimeFormatterOptions {
@@ -40,7 +47,7 @@ export interface DateTimeFormatterOptions {
40
47
  /**
41
48
  * Service for formatting date and time values.
42
49
  *
43
- * @alpha
50
+ * @beta
44
51
  * @group Localization
45
52
  */
46
53
  export interface DateTimeFormatter {
@@ -48,15 +55,9 @@ export interface DateTimeFormatter {
48
55
  * Format the given date as the given type.
49
56
  *
50
57
  * **Note**<br>
51
- * If a `string` is supplied to the `date` parameter, it may be converted
52
- * to a `Date` object before formatting. Note that, unless the string
53
- * includes date, time, and timezone in an unambiguous format—like
54
- * `'2022-05-23T00:00:00.000Z'`—this may have unexpected consequences.
55
- *
56
- * For example, calling `DateTimeFormatter.format('2022-05-23', 'time')`
57
- * may very well return a nicely formatted time, but the value will
58
- * obviously be nonsense, as there was no time data in the string provided
59
- * in the first place.
58
+ * If a `string` is supplied to the `date` parameter, it will be converted
59
+ * to a `Date` object before formatting. See {@link DateTimeFormatter#parse}
60
+ * for details.
60
61
  *
61
62
  * @param date - The date to format.
62
63
  * @param options - Either a string specifying the type to format the date
@@ -64,5 +65,41 @@ export interface DateTimeFormatter {
64
65
  * @returns A string representation of the date.
65
66
  */
66
67
  format(date: Date | string, options: DateTimeType | DateTimeFormatterOptions): string;
68
+ /**
69
+ * Parse a date value, converting it to local time.
70
+ *
71
+ * A date value passed as a `string` may be converted as a date-only value
72
+ * if `type` is 'date', 'year', 'quarter', 'month' or 'week'. This
73
+ * basically means returning dates as they are stored in the database, by
74
+ * compensating for any time difference.
75
+ *
76
+ * If the date value includes time but not time zone offset, it is always
77
+ * interpreted as local time.
78
+ *
79
+ * A date value passed as a `Date` is returned unmodified.
80
+ *
81
+ * @example
82
+ * ```
83
+ * // Converting a saved date value to 2023-10-24 in local time
84
+ * // The time component of the returned date object should be ignored.
85
+ * const parsedDate = dateTimeFormatter.parse('2023-10-24T00:00:00.000Z', 'date');
86
+ * ```
87
+ *
88
+ * @example
89
+ * ```
90
+ * // Parsing a date value as local time
91
+ * const parsedDate = dateTimeFormatter.parse('2023-10-24 23:59:59', 'date');
92
+ * ```
93
+ *
94
+ * @example
95
+ * ```
96
+ * // Parsing a date-time value including time zone offset
97
+ * const parsedDate = dateTimeFormatter.parse('2023-10-24T13:00:00+02:00', 'time');
98
+ * ```
99
+ *
100
+ * @param date - The date to parse.
101
+ * @param type - A string specifying the type to parse the date as.
102
+ */
103
+ parse(date: Date | string, type: DateTimeType): Date;
67
104
  }
68
105
  //# sourceMappingURL=datetimeformatter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"datetimeformatter.d.ts","sourceRoot":"","sources":["../../src/datetimeformatter/datetimeformatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACrC;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IAEnB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACzB;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CACF,IAAI,EAAE,IAAI,GAAG,MAAM,EACnB,OAAO,EAAE,YAAY,GAAG,wBAAwB,GACjD,MAAM,CAAC;CACb"}
1
+ {"version":3,"file":"datetimeformatter.d.ts","sourceRoot":"","sources":["../../src/datetimeformatter/datetimeformatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,oBAAoB,CAAC;AAEtE;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACrC;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IAEnB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACzB;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;;;;;OAYG;IACH,MAAM,CACF,IAAI,EAAE,IAAI,GAAG,MAAM,EACnB,OAAO,EAAE,YAAY,GAAG,wBAAwB,GACjD,MAAM,CAAC;IAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;CACxD"}
@@ -1,5 +1,4 @@
1
1
  import { DateTimeFormatter } from './datetimeformatter';
2
- import { DateTimePropertyType } from '../limetype';
3
2
  declare const SERVICE_NAME = "datetimeformatter";
4
3
  declare module '../core/platform' {
5
4
  interface PlatformServiceNameType {
@@ -12,12 +11,5 @@ declare module '../core/platform' {
12
11
  get(name: PlatformServiceNameType['DateTimeFormatter']): DateTimeFormatter;
13
12
  }
14
13
  }
15
- /**
16
- * The possible types a date can be formatted as.
17
- *
18
- * @alpha
19
- * @group Localization
20
- */
21
- export type DateTimeType = 'week' | 'relative' | DateTimePropertyType;
22
14
  export {};
23
15
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/datetimeformatter/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,QAAA,MAAM,YAAY,sBAAsB,CAAC;AAIzC,OAAO,QAAQ,kBAAkB,CAAC;IAC9B,UAAU,uBAAuB;QAC7B;;WAEG;QACH,iBAAiB,EAAE,OAAO,YAAY,CAAC;KAC1C;IAED,UAAU,wBAAwB;QAC9B,GAAG,CACC,IAAI,EAAE,uBAAuB,CAAC,mBAAmB,CAAC,GACnD,iBAAiB,CAAC;KACxB;CACJ;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,oBAAoB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/datetimeformatter/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,QAAA,MAAM,YAAY,sBAAsB,CAAC;AAIzC,OAAO,QAAQ,kBAAkB,CAAC;IAC9B,UAAU,uBAAuB;QAC7B;;WAEG;QACH,iBAAiB,EAAE,OAAO,YAAY,CAAC;KAC1C;IAED,UAAU,wBAAwB;QAC9B,GAAG,CACC,IAAI,EAAE,uBAAuB,CAAC,mBAAmB,CAAC,GACnD,iBAAiB,CAAC;KACxB;CACJ"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./action"), exports);
package/dist/es5/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./action"), exports);
4
5
  tslib_1.__exportStar(require("./core"), exports);
5
6
  tslib_1.__exportStar(require("./limetype"), exports);
6
7
  tslib_1.__exportStar(require("./limeobject"), exports);
@@ -6,6 +6,7 @@ var getDateTimeFormatter = function () {
6
6
  format: jest.fn(function (date, type) {
7
7
  return "".concat(typeof date === 'object' ? JSON.stringify(date) : date, " - ").concat(typeof type === 'object' ? JSON.stringify(type) : type);
8
8
  }),
9
+ parse: jest.fn(function (date) { return new Date(date); }),
9
10
  };
10
11
  };
11
12
  exports.getDateTimeFormatter = getDateTimeFormatter;
package/dist/index.d.ts CHANGED
@@ -20,6 +20,7 @@
20
20
  *
21
21
  * @packageDocumentation
22
22
  */
23
+ export * from './action';
23
24
  export * from './core';
24
25
  export * from './limetype';
25
26
  export * from './limeobject';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,QAAQ,CA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js CHANGED
@@ -20,6 +20,7 @@
20
20
  *
21
21
  * @packageDocumentation
22
22
  */
23
+ export * from './action';
23
24
  export * from './core';
24
25
  export * from './limetype';
25
26
  export * from './limeobject';
@@ -1,5 +1,7 @@
1
+ import { LimeObjectBulkCommand } from '../../commandbus';
1
2
  import { Expression } from '../../query';
2
3
  import { LimeType } from '../../limetype';
4
+ import { LimeWebComponentContext } from '../../core';
3
5
  /**
4
6
  * Open a dialog for bulk creating limeobjects
5
7
  *
@@ -33,9 +35,11 @@ import { LimeType } from '../../limetype';
33
35
  * @public
34
36
  * @group Lime objects
35
37
  */
36
- export declare class BulkCreateDialogCommand {
38
+ export declare class BulkCreateDialogCommand implements LimeObjectBulkCommand {
39
+ context: LimeWebComponentContext;
37
40
  /**
38
41
  * The limetype of the objects to create new objects from
42
+ * @deprecated use `context` instead
39
43
  */
40
44
  limetype: LimeType;
41
45
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"bulk-create-dialog.d.ts","sourceRoot":"","sources":["../../../src/limeobject/commands/bulk-create-dialog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAGa,uBAAuB;IAChC;;OAEG;IACI,QAAQ,EAAE,QAAQ,CAAC;IAE1B;;;OAGG;IACI,MAAM,EAAE,UAAU,CAAC;IAE1B;;;;;;OAMG;IACI,SAAS,EAAE,MAAM,EAAE,CAAM;IAEhC;;OAEG;IACI,QAAQ,EAAE,MAAM,CAAC;CAC3B"}
1
+ {"version":3,"file":"bulk-create-dialog.d.ts","sourceRoot":"","sources":["../../../src/limeobject/commands/bulk-create-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAGa,uBAAwB,YAAW,qBAAqB;IAC1D,OAAO,EAAE,uBAAuB,CAAC;IAExC;;;OAGG;IACI,QAAQ,EAAE,QAAQ,CAAC;IAE1B;;;OAGG;IACI,MAAM,EAAE,UAAU,CAAC;IAE1B;;;;;;OAMG;IACI,SAAS,EAAE,MAAM,EAAE,CAAM;IAEhC;;OAEG;IACI,QAAQ,EAAE,MAAM,CAAC;CAC3B"}
@@ -1,4 +1,6 @@
1
1
  import { LimeType } from '../../limetype';
2
+ import { LimeObjectCommand } from '../../commandbus';
3
+ import { LimeWebComponentContext } from '../../core';
2
4
  /**
3
5
  * Deletes the object from the database
4
6
  *
@@ -6,8 +8,15 @@ import { LimeType } from '../../limetype';
6
8
  * @public
7
9
  * @group Lime objects
8
10
  */
9
- export declare class DeleteObjectCommand {
11
+ export declare class DeleteObjectCommand implements LimeObjectCommand {
12
+ context: LimeWebComponentContext;
13
+ /**
14
+ * @deprecated use `context` instead
15
+ */
10
16
  id: number;
17
+ /**
18
+ * @deprecated use `context` instead
19
+ */
11
20
  limetype: LimeType;
12
21
  }
13
22
  //# sourceMappingURL=delete-object.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete-object.d.ts","sourceRoot":"","sources":["../../../src/limeobject/commands/delete-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C;;;;;;GAMG;AACH,qBAGa,mBAAmB;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC;CACtB"}
1
+ {"version":3,"file":"delete-object.d.ts","sourceRoot":"","sources":["../../../src/limeobject/commands/delete-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAW,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;;GAMG;AACH,qBAGa,mBAAoB,YAAW,iBAAiB;IAClD,OAAO,EAAE,uBAAuB,CAAC;IAExC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACtB"}
@@ -1,4 +1,6 @@
1
1
  import { LimeType } from '../../limetype';
2
+ import { LimeObjectCommand } from '../../commandbus';
3
+ import { LimeWebComponentContext } from '../../core';
2
4
  /**
3
5
  * Open a dialog to view and edit object access information
4
6
  *
@@ -6,8 +8,15 @@ import { LimeType } from '../../limetype';
6
8
  * @public
7
9
  * @group Lime objects
8
10
  */
9
- export declare class OpenObjectAccessDialogCommand {
11
+ export declare class OpenObjectAccessDialogCommand implements LimeObjectCommand {
12
+ context: LimeWebComponentContext;
13
+ /**
14
+ * @deprecated use `context` instead
15
+ */
10
16
  id: number;
17
+ /**
18
+ * @deprecated use `context` instead
19
+ */
11
20
  limetype: LimeType;
12
21
  }
13
22
  //# sourceMappingURL=object-access.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"object-access.d.ts","sourceRoot":"","sources":["../../../src/limeobject/commands/object-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C;;;;;;GAMG;AACH,qBAGa,6BAA6B;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC;CACtB"}
1
+ {"version":3,"file":"object-access.d.ts","sourceRoot":"","sources":["../../../src/limeobject/commands/object-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAW,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;;GAMG;AACH,qBAGa,6BAA8B,YAAW,iBAAiB;IAC5D,OAAO,EAAE,uBAAuB,CAAC;IAExC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACtB"}
@@ -1,4 +1,6 @@
1
1
  import { LimeObject } from '../../limeobject';
2
+ import { LimeObjectCommand } from '../../commandbus';
3
+ import { LimeWebComponentContext } from '../../core';
2
4
  /**
3
5
  * Saves the object to the database
4
6
  *
@@ -6,7 +8,8 @@ import { LimeObject } from '../../limeobject';
6
8
  * @public
7
9
  * @group Lime objects
8
10
  */
9
- export declare class SaveLimeObjectCommand {
11
+ export declare class SaveLimeObjectCommand implements LimeObjectCommand {
12
+ context: LimeWebComponentContext;
10
13
  /**
11
14
  * The limeobject to save
12
15
  */
@@ -1 +1 @@
1
- {"version":3,"file":"save-object.d.ts","sourceRoot":"","sources":["../../../src/limeobject/commands/save-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C;;;;;;GAMG;AACH,qBAGa,qBAAqB;IAC9B;;OAEG;IACI,UAAU,EAAE,UAAU,CAAC;IAE9B;;OAEG;IACI,KAAK,CAAC,EAAE,OAAO,CAAS;IAE/B;;;OAGG;IACI,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB"}
1
+ {"version":3,"file":"save-object.d.ts","sourceRoot":"","sources":["../../../src/limeobject/commands/save-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAW,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD;;;;;;GAMG;AACH,qBAGa,qBAAsB,YAAW,iBAAiB;IACpD,OAAO,EAAE,uBAAuB,CAAC;IAExC;;OAEG;IACI,UAAU,EAAE,UAAU,CAAC;IAE9B;;OAEG;IACI,KAAK,CAAC,EAAE,OAAO,CAAS;IAE/B;;;OAGG;IACI,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"datetimeformatter.d.ts","sourceRoot":"","sources":["../../../src/testing/services/datetimeformatter.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EAGpB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,oBAAoB,yBAYhC,CAAC"}
1
+ {"version":3,"file":"datetimeformatter.d.ts","sourceRoot":"","sources":["../../../src/testing/services/datetimeformatter.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EAGpB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,oBAAoB,yBAahC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export const getDateTimeFormatter = () => {
2
2
  return {
3
3
  format: jest.fn((date, type) => `${typeof date === 'object' ? JSON.stringify(date) : date} - ${typeof type === 'object' ? JSON.stringify(type) : type}`),
4
+ parse: jest.fn((date) => new Date(date)),
4
5
  };
5
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-web-components",
3
- "version": "5.19.0",
3
+ "version": "5.21.0",
4
4
  "description": "Lime Web Components",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",