@omnia/velcron 8.0.126-dev → 8.0.127-dev

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 (37) hide show
  1. package/internal-do-not-import-from-here/shared/models/OmniaSharedBootstrapData.d.ts +2 -1
  2. package/internal-do-not-import-from-here/shared/models/hub/activities/Activity.d.ts +8 -8
  3. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityFeed.d.ts +10 -9
  4. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivitySubscription.d.ts +9 -9
  5. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivitySubscription.js +3 -3
  6. package/internal-do-not-import-from-here/shared/models/hub/activities/ActorActivity.d.ts +40 -0
  7. package/internal-do-not-import-from-here/shared/models/hub/activities/ActorActivity.js +17 -0
  8. package/internal-do-not-import-from-here/shared/models/hub/activities/index.d.ts +1 -2
  9. package/internal-do-not-import-from-here/shared/models/hub/activities/index.js +1 -2
  10. package/internal-do-not-import-from-here/shared/models/hub/actors/Actor.d.ts +21 -0
  11. package/internal-do-not-import-from-here/shared/models/hub/actors/Actor.js +10 -0
  12. package/internal-do-not-import-from-here/shared/models/hub/actors/ExternalActorId.d.ts +2 -0
  13. package/internal-do-not-import-from-here/shared/models/hub/actors/index.d.ts +2 -0
  14. package/internal-do-not-import-from-here/shared/models/hub/actors/index.js +5 -0
  15. package/internal-do-not-import-from-here/shared/models/hub/index.d.ts +2 -1
  16. package/internal-do-not-import-from-here/shared/models/hub/index.js +2 -1
  17. package/internal-do-not-import-from-here/shared/models/hub/social/HubComment.d.ts +3 -3
  18. package/internal-do-not-import-from-here/shared/models/hub/social/HubReaction.d.ts +2 -2
  19. package/internal-do-not-import-from-here/shared/models/hub/targeting/ExternalIdentityProperty.d.ts +2 -2
  20. package/internal-do-not-import-from-here/shared/models/theming/Blueprints.d.ts +14 -19
  21. package/internal-do-not-import-from-here/shared/models/theming/Chrome.d.ts +3 -3
  22. package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.d.ts +2 -1
  23. package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.js +1 -0
  24. package/internal-do-not-import-from-here/shared/models/theming/Typography.d.ts +3 -3
  25. package/internal-do-not-import-from-here/shared/models/velcron/VelcronDefinition.d.ts +2 -2
  26. package/internal-do-not-import-from-here/shared/models/velcron/VelcronEvents.d.ts +3 -0
  27. package/package.json +1 -1
  28. package/parser/VelcronActions.d.ts +4 -2
  29. package/parser/VelcronActions.js +11 -5
  30. package/stores/VelcronColorSchema.d.ts +6 -6
  31. package/stores/VelcronTheming.js +2 -2
  32. package/internal-do-not-import-from-here/shared/models/hub/ExternalIdentityId.d.ts +0 -2
  33. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivitySender.d.ts +0 -16
  34. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivitySender.js +0 -5
  35. package/internal-do-not-import-from-here/shared/models/hub/activities/IdentityActivity.d.ts +0 -40
  36. package/internal-do-not-import-from-here/shared/models/hub/activities/IdentityActivity.js +0 -39
  37. /package/internal-do-not-import-from-here/shared/models/hub/{ExternalIdentityId.js → actors/ExternalActorId.js} +0 -0
@@ -1,6 +1,7 @@
1
1
  import { OmniaToken } from "./Tokens";
2
2
  import { Guid, GuidValue } from "./Guid";
3
3
  import { TenantIdentifier } from "./Tenant";
4
+ import { ActorId } from "./hub";
4
5
  export interface OmniaSharedBootstrapData {
5
6
  uiThreadId: GuidValue;
6
7
  workerThreadId: GuidValue;
@@ -14,7 +15,7 @@ export interface OmniaSharedBootstrapData {
14
15
  tokenKey?: OmniaToken;
15
16
  tokenRef: GuidValue;
16
17
  identity: string;
17
- hubIdentity?: number;
18
+ hubActorId?: ActorId;
18
19
  licenses: Array<Guid>;
19
20
  hubDev?: boolean;
20
21
  realtimeDevPort?: string;
@@ -1,11 +1,11 @@
1
1
  import { ChannelId } from "./ActivityChannel";
2
- import { ActivitySenderId } from "./ActivitySender";
3
2
  import { ActivityRenderer, ActivityRendererReference } from "./ActivityRenderer";
4
3
  import { StronglyTypedId } from "../../StronglyTypedId";
5
4
  import { GuidValue } from "../../Guid";
6
5
  import { DynamicState } from "../../DynamicState";
7
- import { IdentityActivityCategory } from "./IdentityActivity";
6
+ import { ActorActivityCategory } from "./ActorActivity";
8
7
  import { TemporaryFileId } from "../fileupload";
8
+ import { ActorId } from "../actors";
9
9
  export type ActivityId = StronglyTypedId<number, "ActivityId">;
10
10
  export declare function ActivityId(id: number): ActivityId;
11
11
  export type ActivityTypeId = StronglyTypedId<GuidValue, "ActivityTypeId">;
@@ -14,11 +14,11 @@ export interface Activity<TRenderState = DynamicState> extends ActivityBase {
14
14
  id: ActivityId;
15
15
  state: TRenderState;
16
16
  renderer: ActivityRenderer | ActivityRendererReference;
17
- senderId: ActivitySenderId;
17
+ createdBy: ActorId;
18
18
  }
19
19
  export interface ActivityWithJson extends ActivityBase {
20
20
  id: ActivityId;
21
- senderId: ActivitySenderId;
21
+ createdBy: ActorId;
22
22
  stateJson: string;
23
23
  rendererJson: string;
24
24
  }
@@ -56,15 +56,15 @@ export declare enum PrivacyLevel {
56
56
  export interface CreateActivityRequest {
57
57
  channelId: ChannelId;
58
58
  activityTypeId: ActivityTypeId;
59
- senderId: ActivitySenderId;
59
+ createdBy: ActorId;
60
60
  stateJson: string;
61
61
  rendererJson: string;
62
62
  notificationTeaser: NotificationTeaser;
63
63
  targeting: Array<Array<SourceRelatedHubProperty>>;
64
- addToSenders?: {
65
- [activitySenderId: string]: PrivacyLevel;
64
+ addToActors?: {
65
+ [actorId: ActorId]: PrivacyLevel;
66
66
  };
67
- category: IdentityActivityCategory;
67
+ category: ActorActivityCategory;
68
68
  activityIdPlaceHolder?: TemporaryFileId;
69
69
  expires?: Date;
70
70
  createdAt?: Date;
@@ -1,30 +1,31 @@
1
+ import { ActorId } from "../actors";
1
2
  import { Activity, ActivityId, ActivityWithJson } from "./Activity";
2
3
  import { ActivityRenderer, ActivityRendererId } from "./ActivityRenderer";
3
- import { ActivitySenderId } from "./ActivitySender";
4
- import { ActivityCategoryCount, IdentityActivity, IdentityActivityCategory, IdentityActivityWithJson, NewActivitiesBySenderBase } from "./IdentityActivity";
4
+ import { ActivityCategoryCount, ActorActivity, ActorActivityCategory, ActorActivityWithJson, NewActivitiesByCreatorBase } from "./ActorActivity";
5
5
  export interface ActivityFeed extends ActivityFeedBase {
6
6
  renderers: {
7
7
  [key: ActivityRendererId]: Array<ActivityRenderer>;
8
8
  };
9
- identityActivities: Array<IdentityActivity<object, object>>;
9
+ actorActivities: Array<ActorActivity<object, object>>;
10
10
  activities: Array<Activity>;
11
11
  }
12
12
  export interface ActivityFeedResult extends ActivityFeedBase {
13
- identityActivities: Array<IdentityActivityWithJson>;
13
+ actorActivities: Array<ActorActivityWithJson>;
14
14
  activities: Array<ActivityWithJson>;
15
15
  loadStateHash: string;
16
16
  }
17
17
  export interface ActivityFeedBase {
18
- newActivities: Array<NewActivitiesBySenderBase>;
18
+ newActivities: Array<NewActivitiesByCreatorBase>;
19
19
  nextStartingFromId: ActivityId;
20
- recentSenders: Array<ActivitySenderId>;
20
+ recentCreators: Array<ActorId>;
21
21
  categories: Array<ActivityCategoryCount>;
22
22
  }
23
23
  export interface FeedQuery {
24
+ forActorId?: ActorId;
24
25
  newerThenId?: ActivityId;
25
26
  olderThenId?: ActivityId;
26
- filterBySenderId?: ActivitySenderId;
27
- filterByCategory?: IdentityActivityCategory;
28
- includeRecentSenders?: number;
27
+ filterByCreator?: ActorId;
28
+ filterByCategory?: ActorActivityCategory;
29
+ includeRecentCreators?: number;
29
30
  includeCategories?: boolean;
30
31
  }
@@ -1,16 +1,16 @@
1
1
  import { StronglyTypedId } from "../../StronglyTypedId";
2
- import { ActivitySenderId } from "./ActivitySender";
3
- export type ActivitySubscriptionId = StronglyTypedId<string, "ActivitySubscriptionId">;
4
- export declare function ActivitySubscriptionId(id: string): ActivitySubscriptionId;
5
- export interface ActivitySubscription extends ActivitySenderSubscription {
2
+ import { ActorId } from "../actors";
3
+ export type SubscriptionId = StronglyTypedId<string, "SubscriptionId">;
4
+ export declare function SubscriptionId(id: string): SubscriptionId;
5
+ export interface SubscriptionInformation extends ActorSubscription {
6
6
  title: Record<string, string>;
7
7
  description: Record<string, string>;
8
8
  clientId: string;
9
9
  }
10
- export interface ActivitySenderSubscription {
11
- id: ActivitySubscriptionId;
12
- activitySenderId: ActivitySenderId;
10
+ export interface ActorSubscription {
11
+ id: SubscriptionId;
12
+ subscriptionOwner: ActorId;
13
13
  }
14
- export interface ActivityUserSubscription extends ActivitySenderSubscription {
15
- hubUserId: number;
14
+ export interface Subscription extends ActorSubscription {
15
+ subscriber: ActorId;
16
16
  }
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ActivitySubscriptionId = void 0;
4
- function ActivitySubscriptionId(id) { return id; }
5
- exports.ActivitySubscriptionId = ActivitySubscriptionId;
3
+ exports.SubscriptionId = void 0;
4
+ function SubscriptionId(id) { return id; }
5
+ exports.SubscriptionId = SubscriptionId;
@@ -0,0 +1,40 @@
1
+ import { DynamicState } from "../../DynamicState";
2
+ import { Actor, ActorId } from "../actors";
3
+ import { Activity, ActivityId } from "./Activity";
4
+ import { ChannelId } from "./ActivityChannel";
5
+ export declare enum ActorActivityStatus {
6
+ new = 0,
7
+ read = 1,
8
+ completed = 2
9
+ }
10
+ export declare enum ActorActivityCategory {
11
+ none = 0,
12
+ important = 1,
13
+ todo = 2,
14
+ snoozed = 3,
15
+ bookmarked = 4
16
+ }
17
+ export interface ActorActivityBase {
18
+ activityId: ActivityId;
19
+ status: ActorActivityStatus;
20
+ category: ActorActivityCategory;
21
+ }
22
+ export interface ActorActivity<TRenderState extends DynamicState, TState extends DynamicState> extends ActorActivityBase {
23
+ activity: Activity<TRenderState>;
24
+ state?: TState;
25
+ }
26
+ export interface ActorActivityWithJson extends ActorActivityBase {
27
+ stateJson: string;
28
+ }
29
+ export interface NewActivitiesByCreatorBase {
30
+ count: number;
31
+ creator: ActorId;
32
+ }
33
+ export interface NewActivitiesByActor extends NewActivitiesByCreatorBase {
34
+ actor: Actor;
35
+ channelId: ChannelId;
36
+ }
37
+ export interface ActivityCategoryCount {
38
+ category: ActorActivityCategory;
39
+ count: number;
40
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActorActivityCategory = exports.ActorActivityStatus = void 0;
4
+ var ActorActivityStatus;
5
+ (function (ActorActivityStatus) {
6
+ ActorActivityStatus[ActorActivityStatus["new"] = 0] = "new";
7
+ ActorActivityStatus[ActorActivityStatus["read"] = 1] = "read";
8
+ ActorActivityStatus[ActorActivityStatus["completed"] = 2] = "completed";
9
+ })(ActorActivityStatus || (exports.ActorActivityStatus = ActorActivityStatus = {}));
10
+ var ActorActivityCategory;
11
+ (function (ActorActivityCategory) {
12
+ ActorActivityCategory[ActorActivityCategory["none"] = 0] = "none";
13
+ ActorActivityCategory[ActorActivityCategory["important"] = 1] = "important";
14
+ ActorActivityCategory[ActorActivityCategory["todo"] = 2] = "todo";
15
+ ActorActivityCategory[ActorActivityCategory["snoozed"] = 3] = "snoozed";
16
+ ActorActivityCategory[ActorActivityCategory["bookmarked"] = 4] = "bookmarked";
17
+ })(ActorActivityCategory || (exports.ActorActivityCategory = ActorActivityCategory = {}));
@@ -1,7 +1,6 @@
1
1
  export * from "./Activity";
2
- export * from "./IdentityActivity";
2
+ export * from "./ActorActivity";
3
3
  export * from "./ActivityRenderer";
4
- export * from "./ActivitySender";
5
4
  export * from "./ActivityChannel";
6
5
  export * from "./ActivityFeed";
7
6
  export * from "./ActivityDefinition";
@@ -2,9 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./Activity"), exports);
5
- tslib_1.__exportStar(require("./IdentityActivity"), exports);
5
+ tslib_1.__exportStar(require("./ActorActivity"), exports);
6
6
  tslib_1.__exportStar(require("./ActivityRenderer"), exports);
7
- tslib_1.__exportStar(require("./ActivitySender"), exports);
8
7
  tslib_1.__exportStar(require("./ActivityChannel"), exports);
9
8
  tslib_1.__exportStar(require("./ActivityFeed"), exports);
10
9
  tslib_1.__exportStar(require("./ActivityDefinition"), exports);
@@ -0,0 +1,21 @@
1
+ import { StronglyTypedId } from "../../StronglyTypedId";
2
+ import { ExternalActorId } from "./ExternalActorId";
3
+ export type ActorId = StronglyTypedId<number, "ActorId">;
4
+ export declare function ActorId(id: number): ActorId;
5
+ export interface ActorWithBag<TBag> extends Actor {
6
+ bag: TBag;
7
+ }
8
+ export interface Actor extends ActorBase {
9
+ imageUrl: string;
10
+ name: Record<string, string>;
11
+ description: Record<string, string>;
12
+ type: ActorTypes;
13
+ }
14
+ export interface ActorBase {
15
+ id: ActorId;
16
+ externalId: ExternalActorId;
17
+ }
18
+ export declare enum ActorTypes {
19
+ user = 0,
20
+ app = 1
21
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActorTypes = exports.ActorId = void 0;
4
+ function ActorId(id) { return id; }
5
+ exports.ActorId = ActorId;
6
+ var ActorTypes;
7
+ (function (ActorTypes) {
8
+ ActorTypes[ActorTypes["user"] = 0] = "user";
9
+ ActorTypes[ActorTypes["app"] = 1] = "app";
10
+ })(ActorTypes || (exports.ActorTypes = ActorTypes = {}));
@@ -0,0 +1,2 @@
1
+ import { StronglyTypedId } from "../../StronglyTypedId";
2
+ export type ExternalActorId = StronglyTypedId<string, "ExternalActorId">;
@@ -0,0 +1,2 @@
1
+ export * from "./ExternalActorId";
2
+ export * from "./Actor";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./ExternalActorId"), exports);
5
+ tslib_1.__exportStar(require("./Actor"), exports);
@@ -1,6 +1,7 @@
1
1
  export * from "./activities";
2
2
  export * from "./social";
3
- export * from "./ExternalIdentityId";
3
+ export * from "./actors/ExternalActorId";
4
4
  export * from "./fileupload";
5
5
  export * from "./TempSocialReactions";
6
6
  export * from "./targeting";
7
+ export * from "./actors";
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./activities"), exports);
5
5
  tslib_1.__exportStar(require("./social"), exports);
6
- tslib_1.__exportStar(require("./ExternalIdentityId"), exports);
6
+ tslib_1.__exportStar(require("./actors/ExternalActorId"), exports);
7
7
  tslib_1.__exportStar(require("./fileupload"), exports);
8
8
  tslib_1.__exportStar(require("./TempSocialReactions"), exports);
9
9
  tslib_1.__exportStar(require("./targeting"), exports);
10
+ tslib_1.__exportStar(require("./actors"), exports);
@@ -1,10 +1,10 @@
1
- import { ExternalIdentityId } from "../ExternalIdentityId";
1
+ import { ExternalActorId } from "../actors/ExternalActorId";
2
2
  import { HubReaction } from "./HubReaction";
3
3
  export interface HubComment {
4
- createdBy: ExternalIdentityId;
4
+ createdBy: ExternalActorId;
5
5
  id: number;
6
6
  inReplyToId: number | null;
7
7
  rendererJson: string;
8
- mentions: ExternalIdentityId[];
8
+ mentions: ExternalActorId[];
9
9
  reactions: HubReaction[];
10
10
  }
@@ -1,5 +1,5 @@
1
- import { ExternalIdentityId } from "../ExternalIdentityId";
1
+ import { ExternalActorId } from "../actors/ExternalActorId";
2
2
  export interface HubReaction {
3
- createdBy: ExternalIdentityId;
3
+ createdBy: ExternalActorId;
4
4
  uniqueTypeName: string;
5
5
  }
@@ -1,9 +1,9 @@
1
1
  import { GuidValue } from "../../Guid";
2
- import { ExternalIdentityId } from "../ExternalIdentityId";
2
+ import { ExternalActorId } from "../actors/ExternalActorId";
3
3
  import { SourceRelatedHubProperty } from "../activities";
4
4
  export declare class HubExternalIdentityProperty implements SourceRelatedHubProperty {
5
5
  private externalIdentityId;
6
- constructor(externalIdentityId: ExternalIdentityId);
6
+ constructor(externalIdentityId: ExternalActorId);
7
7
  get propertySourceId(): GuidValue;
8
8
  get name(): string;
9
9
  get values(): string[];
@@ -14,52 +14,47 @@ export type BlueprintVariant = "primary" | "secondary" | "variant1" | "variant2"
14
14
  export type ButtonBlueprintType = "text" | "icon";
15
15
  export interface ChromeBlueprints extends Blueprints {
16
16
  type: "chrome";
17
- default: ChromeBlueprint;
17
+ primary: ChromeBlueprint;
18
18
  variant1?: ChromeBlueprint;
19
19
  variant2?: ChromeBlueprint;
20
20
  variant3?: ChromeBlueprint;
21
21
  }
22
22
  export interface TypographyBlueprints extends Blueprints {
23
23
  type: "typography";
24
- default: TypographyBlueprint;
25
- variant1?: TypographyBlueprint;
24
+ primary: TypographyBlueprint;
26
25
  }
27
26
  export interface SpacingBlueprints extends Blueprints {
28
27
  type: "spacing";
29
- default: SpacingBlueprint;
28
+ primary: SpacingBlueprint;
30
29
  }
30
+ export type ButtonTypes = "primary" | "basic" | "accent1" | "warn" | "disabled" | "link";
31
31
  export interface ComponentBlueprints extends Blueprints {
32
32
  type: "component";
33
33
  buttons?: {
34
34
  text?: {
35
35
  primary?: ButtonBlueprint;
36
- secondary?: ButtonBlueprint;
37
- variant1?: ButtonBlueprint;
38
- variant2?: ButtonBlueprint;
39
- variant3?: ButtonBlueprint;
36
+ basic?: ButtonBlueprint;
37
+ accent1?: ButtonBlueprint;
38
+ warn?: ButtonBlueprint;
39
+ disabled?: ButtonBlueprint;
40
+ link?: ButtonBlueprint;
40
41
  };
41
42
  icon?: {
42
43
  primary?: ButtonBlueprint;
43
- secondary?: ButtonBlueprint;
44
- variant1?: ButtonBlueprint;
45
- variant2?: ButtonBlueprint;
46
- variant3?: ButtonBlueprint;
44
+ basic?: ButtonBlueprint;
45
+ accent1?: ButtonBlueprint;
46
+ warn?: ButtonBlueprint;
47
+ disabled?: ButtonBlueprint;
48
+ link?: ButtonBlueprint;
47
49
  };
48
50
  };
49
51
  tabs?: {
50
52
  primary?: TabsBlueprint;
51
- secondary?: TabsBlueprint;
52
53
  variant1?: TabsBlueprint;
53
54
  variant2?: TabsBlueprint;
54
55
  variant3?: TabsBlueprint;
55
56
  };
56
57
  }
57
- export interface ChromeBluePrintDefinitions {
58
- default: ChromeBlueprint;
59
- variant1: ChromeBlueprint;
60
- variant2: ChromeBlueprint;
61
- variant3: ChromeBlueprint;
62
- }
63
58
  export interface SpacingBlueprint {
64
59
  layout: SpacingDefinition;
65
60
  inner: SpacingDefinition;
@@ -1,10 +1,10 @@
1
1
  import { GuidValue } from "../Guid";
2
2
  import { VelcronAppDefinition } from "../velcron";
3
3
  import { Spacing } from "./Spacing";
4
- import { BackgroundDefinition } from "./ThemeDefinitionV2";
4
+ import { BackgroundDefinition, ColorSchemaType } from "./ThemeDefinitionV2";
5
5
  export interface ChromeBlueprint {
6
- id: GuidValue;
7
- name: string;
6
+ name?: string;
7
+ colorSchemaType?: ColorSchemaType;
8
8
  header: {
9
9
  definitionId: GuidValue;
10
10
  definition?: VelcronAppDefinition;
@@ -56,7 +56,8 @@ export declare enum ColorSchemaTypes {
56
56
  neutral = "neutral",
57
57
  background = "background",
58
58
  error = "error",
59
- info = "info"
59
+ info = "info",
60
+ dynamic = "dynamic"
60
61
  }
61
62
  export type ColorType = keyof typeof ColorTypes;
62
63
  export declare enum ColorTypes {
@@ -12,6 +12,7 @@ var ColorSchemaTypes;
12
12
  ColorSchemaTypes["background"] = "background";
13
13
  ColorSchemaTypes["error"] = "error";
14
14
  ColorSchemaTypes["info"] = "info";
15
+ ColorSchemaTypes["dynamic"] = "dynamic";
15
16
  })(ColorSchemaTypes || (exports.ColorSchemaTypes = ColorSchemaTypes = {}));
16
17
  var ColorTypes;
17
18
  (function (ColorTypes) {
@@ -29,9 +29,9 @@ export interface TypographyBlueprint {
29
29
  }
30
30
  export interface TypographyDefinition {
31
31
  decoration?: string;
32
- large: TypographyTypeBreakPoint;
33
- medium?: TypographyTypeBreakPoint;
34
- small?: TypographyTypeBreakPoint;
32
+ lg: TypographyTypeBreakPoint;
33
+ md?: TypographyTypeBreakPoint;
34
+ sm?: TypographyTypeBreakPoint;
35
35
  }
36
36
  export interface TypographyTypeBreakPoint {
37
37
  weight: number;
@@ -1,5 +1,5 @@
1
1
  import { DynamicState } from "../DynamicState";
2
- import { VelcronEvent, VelcronOnEditModeEvent, VelcronOnLoadEvent } from "./VelcronEvents";
2
+ import { VelcronEvent, VelcronOnEditModeEvent, VelcronOnLoadEvent, VelcronOnSaveEvent } from "./VelcronEvents";
3
3
  /**
4
4
  * Velcron definition base
5
5
  */
@@ -73,7 +73,7 @@ export interface VelcronAppDefinition<TState extends DynamicState = DynamicState
73
73
  version?: string;
74
74
  name?: string;
75
75
  body?: Array<VelcronDefinition>;
76
- events?: VelcronOnLoadEvent & VelcronOnEditModeEvent;
76
+ events?: VelcronOnLoadEvent & VelcronOnEditModeEvent & VelcronOnSaveEvent;
77
77
  actions?: {
78
78
  [name: string]: Array<string>;
79
79
  };
@@ -4,6 +4,9 @@ export type VelcronOnPressEvent = {
4
4
  export type VelcronOnLoadEvent = {
5
5
  onLoaded?: Array<string>;
6
6
  };
7
+ export type VelcronOnSaveEvent = {
8
+ onSaved?: Array<string>;
9
+ };
7
10
  export type VelcronOnEditModeEvent = {
8
11
  onEditMode?: Array<string>;
9
12
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/velcron",
3
3
  "license": "MIT",
4
- "version": "8.0.126-dev",
4
+ "version": "8.0.127-dev",
5
5
  "description": "Provide Omnia Velcron Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -3,11 +3,13 @@ import { IActionHandler } from "../actions";
3
3
  export declare class VelcronActions {
4
4
  static _actionHandlers: {
5
5
  [name: string]: IActionHandler;
6
- } | null;
6
+ };
7
7
  static actionHooks: {
8
8
  [name: string]: VelcronActionHooks;
9
9
  };
10
- static registerAction(name: string, handler: IActionHandler): void;
10
+ private static registeredBuiltInHandlers;
11
+ static registerAction(handler: IActionHandler): void;
12
+ static unregisterAction(name: string): void;
11
13
  static parseAndExecuteActions(templates: Array<string>, renderContext: VelcronRenderContext, customActionContext?: VelcronCustomActionExecutionContext): void;
12
14
  static parseFunction(target: {
13
15
  [name: string]: Array<string>;
@@ -9,8 +9,8 @@ const builtInHandlers = tslib_1.__importStar(require("../actions"));
9
9
  const ActionResults_1 = require("../actions/ActionResults");
10
10
  const VelcronLogger_1 = require("./VelcronLogger");
11
11
  class VelcronActions {
12
- static registerAction(name, handler) {
13
- name = name.toLowerCase();
12
+ static registerAction(handler) {
13
+ const name = handler.name.toLowerCase();
14
14
  if (this._actionHandlers && this._actionHandlers[name]) {
15
15
  VelcronLogger_1.VelcronLogger.logActionError(`The action handler with name ${name} is already registered`);
16
16
  }
@@ -18,6 +18,11 @@ class VelcronActions {
18
18
  this._actionHandlers[name] = handler;
19
19
  }
20
20
  }
21
+ static unregisterAction(name) {
22
+ if (this._actionHandlers && this._actionHandlers[name]) {
23
+ delete this._actionHandlers[name];
24
+ }
25
+ }
21
26
  static parseAndExecuteActions(templates, renderContext, customActionContext) {
22
27
  if (!templates) {
23
28
  VelcronLogger_1.VelcronLogger.logActionError("The event template is empty");
@@ -257,13 +262,13 @@ class VelcronActions {
257
262
  const actionName = awAction.action.substring(0, awAction.action.indexOf("(")).trim().toLowerCase();
258
263
  //promise = VelcronActions.runHandler(awAction, actionName, params);
259
264
  if (!VelcronActions._actionHandlers) {
260
- VelcronActions._actionHandlers = {};
261
265
  Object.keys(builtInHandlers).forEach((key) => {
262
266
  const handler = builtInHandlers[key];
263
267
  if (handler && handler.name && VelcronActions._actionHandlers) {
264
- VelcronActions._actionHandlers[handler.name] = handler;
268
+ VelcronActions.registerAction(handler);
265
269
  }
266
270
  });
271
+ VelcronActions.registeredBuiltInHandlers = true;
267
272
  }
268
273
  const paramValues = [];
269
274
  params.forEach(param => paramValues.push(param.value));
@@ -452,8 +457,9 @@ class VelcronActions {
452
457
  }
453
458
  }
454
459
  exports.VelcronActions = VelcronActions;
455
- VelcronActions._actionHandlers = null;
460
+ VelcronActions._actionHandlers = {};
456
461
  VelcronActions.actionHooks = {};
462
+ VelcronActions.registeredBuiltInHandlers = false;
457
463
  var VelcronActionParameterDataType;
458
464
  (function (VelcronActionParameterDataType) {
459
465
  VelcronActionParameterDataType[VelcronActionParameterDataType["text"] = 0] = "text";
@@ -8,21 +8,21 @@ export declare const useVelcronColorSchemaStore: (newStateWithName?: string) =>
8
8
  onContainer: ColorDefinition;
9
9
  isContainer: boolean;
10
10
  name: string;
11
- colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes;
11
+ colorSchemaType: "info" | "error" | ColorSchemaTypes | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | "dynamic";
12
12
  themeStore: {
13
13
  state: {
14
14
  currentTheme: import("@omnia/fx-models").ThemeDefinitionV2;
15
15
  };
16
16
  get: {
17
17
  componentBlueprints: (blueprintType: import("@omnia/fx-models").VelcronBlueprintDefintionTypes) => import("@omnia/fx-models").ComponentBlueprints;
18
- colorSchema: (colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes) => ColorSchema;
18
+ colorSchema: (colorSchemaType: "info" | "error" | ColorSchemaTypes | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | "dynamic") => ColorSchema;
19
19
  spacing: () => import("@omnia/fx-models").SpacingDefinition;
20
20
  typography: (typographyType: "title" | "text" | "navigation" | import("@omnia/fx-models").TypographyTypes, size: "xs" | "s" | "m" | "l" | "xl" | import("@omnia/fx-models").TypographySizes) => any;
21
- color: (colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes, colorType: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => string;
22
- colorDefinition: (colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes, colorType: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => ColorDefinition;
21
+ color: (colorSchemaType: "info" | "error" | ColorSchemaTypes | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | "dynamic", colorType: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => string;
22
+ colorDefinition: (colorSchemaType: "info" | "error" | ColorSchemaTypes | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | "dynamic", colorType: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => ColorDefinition;
23
23
  complementaryColorType: (colorType: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => import("@omnia/fx-models").ColorTypes;
24
- complementaryColor: (colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes, colorType: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => string;
25
- complementaryColorDefinition: (colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes, colorType: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => ColorDefinition;
24
+ complementaryColor: (colorSchemaType: "info" | "error" | ColorSchemaTypes | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | "dynamic", colorType: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => string;
25
+ complementaryColorDefinition: (colorSchemaType: "info" | "error" | ColorSchemaTypes | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | "dynamic", colorType: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => ColorDefinition;
26
26
  currentTheme: () => import("@omnia/fx-models").ThemeDefinitionV2;
27
27
  };
28
28
  actions: {
@@ -20,10 +20,10 @@ exports.useVelcronThemingStore = (0, _1.defineVelcronStore)("VelcronTheming", {
20
20
  return (0, __1.useThemeMethods)(() => state.currentTheme).colorSchema(colorSchemaType);
21
21
  },
22
22
  spacing: () => {
23
- return (0, __1.useThemeMethods)(() => state.currentTheme).bluePrintbyType("spacing").default.inner;
23
+ return (0, __1.useThemeMethods)(() => state.currentTheme).bluePrintbyType("spacing").primary.inner;
24
24
  },
25
25
  typography: (typographyType, size) => {
26
- const typography = (0, __1.useThemeMethods)(() => state.currentTheme).bluePrintbyType("typography").default;
26
+ const typography = (0, __1.useThemeMethods)(() => state.currentTheme).bluePrintbyType("typography").primary;
27
27
  if (typographyType === __1.TypographyTypes.text) {
28
28
  return typography.text[size];
29
29
  }
@@ -1,2 +0,0 @@
1
- import { StronglyTypedId } from "../StronglyTypedId";
2
- export type ExternalIdentityId = StronglyTypedId<string, "ExternalIdentityId">;
@@ -1,16 +0,0 @@
1
- import { StronglyTypedId } from "../../StronglyTypedId";
2
- export type ActivitySenderId = StronglyTypedId<number, "ActivitySenderId">;
3
- export declare function ActivitySenderId(id: number): ActivitySenderId;
4
- export interface ActivitySenderWithBag<TBag> extends ActivitySender {
5
- bag: TBag;
6
- }
7
- export interface ActivitySender extends ActivitySenderBase {
8
- id: ActivitySenderId;
9
- imageUrl: string;
10
- identityId: number;
11
- }
12
- export interface ActivitySenderBase {
13
- name: Record<string, string>;
14
- description: Record<string, string>;
15
- externalId: string;
16
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ActivitySenderId = void 0;
4
- function ActivitySenderId(id) { return id; }
5
- exports.ActivitySenderId = ActivitySenderId;
@@ -1,40 +0,0 @@
1
- import { DynamicState } from "../../DynamicState";
2
- import { Activity, ActivityId } from "./Activity";
3
- import { ChannelId } from "./ActivityChannel";
4
- import { ActivitySender, ActivitySenderId } from "./ActivitySender";
5
- export declare enum IdentityActivityStatus {
6
- new = 0,
7
- read = 1,
8
- completed = 2
9
- }
10
- export declare enum IdentityActivityCategory {
11
- none = 0,
12
- important = 1,
13
- todo = 2,
14
- snoozed = 3,
15
- bookmarked = 4
16
- }
17
- export interface IdentityActivityBase {
18
- activityId: ActivityId;
19
- status: IdentityActivityStatus;
20
- category: IdentityActivityCategory;
21
- }
22
- export interface IdentityActivity<TRenderState extends DynamicState, TState extends DynamicState> extends IdentityActivityBase {
23
- activity: Activity<TRenderState>;
24
- state?: TState;
25
- }
26
- export interface IdentityActivityWithJson extends IdentityActivityBase {
27
- stateJson: string;
28
- }
29
- export interface NewActivitiesBySenderBase {
30
- count: number;
31
- senderId: ActivitySenderId;
32
- }
33
- export interface NewActivitiesBySender extends NewActivitiesBySenderBase {
34
- sender: ActivitySender;
35
- channelId: ChannelId;
36
- }
37
- export interface ActivityCategoryCount {
38
- category: IdentityActivityCategory;
39
- count: number;
40
- }
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IdentityActivityCategory = exports.IdentityActivityStatus = void 0;
4
- var IdentityActivityStatus;
5
- (function (IdentityActivityStatus) {
6
- IdentityActivityStatus[IdentityActivityStatus["new"] = 0] = "new";
7
- IdentityActivityStatus[IdentityActivityStatus["read"] = 1] = "read";
8
- IdentityActivityStatus[IdentityActivityStatus["completed"] = 2] = "completed";
9
- })(IdentityActivityStatus || (exports.IdentityActivityStatus = IdentityActivityStatus = {}));
10
- var IdentityActivityCategory;
11
- (function (IdentityActivityCategory) {
12
- IdentityActivityCategory[IdentityActivityCategory["none"] = 0] = "none";
13
- IdentityActivityCategory[IdentityActivityCategory["important"] = 1] = "important";
14
- IdentityActivityCategory[IdentityActivityCategory["todo"] = 2] = "todo";
15
- IdentityActivityCategory[IdentityActivityCategory["snoozed"] = 3] = "snoozed";
16
- IdentityActivityCategory[IdentityActivityCategory["bookmarked"] = 4] = "bookmarked";
17
- })(IdentityActivityCategory || (exports.IdentityActivityCategory = IdentityActivityCategory = {}));
18
- // Usage
19
- // const activity1: IdentityActivity<SomeRenderState> = {
20
- // activity: {
21
- // // Initialize your Activity here
22
- // },
23
- // state: {
24
- // // Initialize your State here
25
- // },
26
- // };
27
- // const activity2: IdentityActivity<SomeRenderState, SomeState> = {
28
- // activity: {
29
- // // Initialize your Activity here
30
- // },
31
- // state: {
32
- // // Initialize your State here
33
- // },
34
- // };
35
- // const activity3: IdentityActivityWithJson = {
36
- // activityId: 22,
37
- // status: IdentityActivityStatus.unRead,
38
- // stateJson: "someJson",
39
- // };