@omnia/fx-models 7.5.74-dev → 8.0.0-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.
- package/BlockTitleSettings.d.ts +5 -5
- package/ClientManifests.d.ts +23 -8
- package/ClientManifests.js +8 -0
- package/Constants.d.ts +1 -0
- package/Constants.js +1 -0
- package/Enums.d.ts +14 -1
- package/Enums.js +17 -2
- package/Exposes.d.ts +7 -1
- package/Exposes.js +7 -1
- package/Extends.d.ts +2 -2
- package/FilterEngineStyles.d.ts +1 -1
- package/FilterpickerModel.d.ts +9 -0
- package/Func.d.ts +28 -0
- package/IPropertiesApi.d.ts +1 -1
- package/Icon.d.ts +17 -0
- package/Icon.js +66 -1
- package/Journey.d.ts +8 -2
- package/Layout.d.ts +15 -17
- package/LayoutDefinition.d.ts +5 -1
- package/LinkHandler/linktype/DefaultLinkType.js +1 -1
- package/LinkHandler/linktype/DocumentLinkType.js +1 -1
- package/ManifestIds.d.ts +60 -4
- package/ManifestIds.js +172 -9
- package/MediaScalingSettings.d.ts +6 -0
- package/Messaging.d.ts +1 -0
- package/Secrets.d.ts +1 -0
- package/TargetingProperty.js +1 -1
- package/TokenDefinition.d.ts +1 -1
- package/apps/AppInstanceRollup.d.ts +1 -1
- package/apps/AppInstanceRollup.js +1 -1
- package/azure-openai/dalle/ErrorResponse.js +1 -1
- package/azure-openai/dalle/StatusRequest.js +1 -1
- package/componentproptypes/ThemeableComponents.d.ts +7 -0
- package/componentproptypes/ThemeableComponents.js +2 -0
- package/componentproptypes/index.d.ts +1 -0
- package/componentproptypes/index.js +4 -0
- package/docs/Api.d.ts +37 -0
- package/docs/Api.js +2 -0
- package/docs/index.d.ts +1 -0
- package/docs/index.js +4 -0
- package/editor-chrome/IActionButton.d.ts +1 -2
- package/editor-chrome/IEditorItemPanelsRenderer.d.ts +1 -1
- package/enterprise-glossary/EnterpriseGlossaryApis.d.ts +1 -1
- package/identities/Identity.d.ts +11 -3
- package/identities/Identity.js +17 -0
- package/identities/IdentityCreationRequest.js +1 -1
- package/internal-do-not-import-from-here/shared/models/Bring.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/DynamicState.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/DynamicState.js +2 -0
- package/internal-do-not-import-from-here/shared/models/Equals.d.ts +3 -0
- package/internal-do-not-import-from-here/shared/models/Equals.js +45 -0
- package/internal-do-not-import-from-here/shared/models/Future.d.ts +4 -1
- package/internal-do-not-import-from-here/shared/models/Future.js +14 -6
- package/internal-do-not-import-from-here/shared/models/Guid.d.ts +9 -2
- package/internal-do-not-import-from-here/shared/models/Guid.js +26 -4
- package/internal-do-not-import-from-here/shared/models/StronglyTypedId.d.ts +3 -0
- package/internal-do-not-import-from-here/shared/models/StronglyTypedId.js +2 -0
- package/internal-do-not-import-from-here/shared/models/WorkerProxyFuncs.d.ts +7 -1
- package/internal-do-not-import-from-here/shared/models/WorkerProxyFuncs.js +5 -1
- package/internal-do-not-import-from-here/shared/models/hub/activities/Activity.d.ts +35 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/Activity.js +7 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityChannel.d.ts +7 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityChannel.js +5 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityRenderer.d.ts +10 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityRenderer.js +5 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivitySender.d.ts +11 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivitySender.js +6 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/FeedResult.d.ts +11 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/FeedResult.js +2 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/IdentityActivity.d.ts +18 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/IdentityActivity.js +31 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/index.d.ts +6 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/index.js +9 -0
- package/internal-do-not-import-from-here/shared/models/hub/index.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/hub/index.js +4 -0
- package/internal-do-not-import-from-here/shared/models/index.d.ts +4 -0
- package/internal-do-not-import-from-here/shared/models/index.js +4 -0
- package/internal-do-not-import-from-here/shared/models/theming/BlueprintDefinition.d.ts +54 -18
- package/internal-do-not-import-from-here/shared/models/theming/BlueprintDefinition.js +16 -0
- package/internal-do-not-import-from-here/shared/models/theming/SharedBlueprintMethods.d.ts +2 -0
- package/internal-do-not-import-from-here/shared/models/theming/SharedBlueprintMethods.js +37 -0
- package/internal-do-not-import-from-here/shared/models/theming/SharedColorMethods.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/theming/SharedColorMethods.js +45 -0
- package/internal-do-not-import-from-here/shared/models/theming/SpacingSetting.d.ts +23 -0
- package/internal-do-not-import-from-here/shared/models/theming/SpacingSetting.js +11 -0
- package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.d.ts +55 -34
- package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.js +27 -22
- package/internal-do-not-import-from-here/shared/models/theming/TypographyDefinition.d.ts +35 -15
- package/internal-do-not-import-from-here/shared/models/theming/TypographyDefinition.js +15 -9
- package/internal-do-not-import-from-here/shared/models/theming/UseThemeMethods.d.ts +13 -0
- package/internal-do-not-import-from-here/shared/models/theming/{ThemeMethods.js → UseThemeMethods.js} +56 -70
- package/internal-do-not-import-from-here/shared/models/theming/index.d.ts +5 -1
- package/internal-do-not-import-from-here/shared/models/theming/index.js +5 -1
- package/internal-do-not-import-from-here/velcron/core/models/Enums.d.ts +7 -16
- package/internal-do-not-import-from-here/velcron/core/models/Enums.js +14 -24
- package/internal-do-not-import-from-here/velcron/core/models/VelcronDefinitions.d.ts +131 -83
- package/internal-do-not-import-from-here/velcron/core/models/VelcronDefinitions.js +2 -2
- package/internal-do-not-import-from-here/velcron/core/models/VelcronEvents.d.ts +5 -2
- package/internal-do-not-import-from-here/velcron/core/models/VelcronPropertyEditorDefinitions.d.ts +120 -0
- package/internal-do-not-import-from-here/velcron/core/models/VelcronPropertyEditorDefinitions.js +16 -0
- package/internal-do-not-import-from-here/velcron/core/models/index.d.ts +1 -1
- package/internal-do-not-import-from-here/velcron/core/models/index.js +1 -1
- package/media-picker/MediaPickerImageRendition.d.ts +4 -4
- package/media-picker/MediaPickerSearchProvider.d.ts +5 -0
- package/media-picker/MediaPickerSearchProvider.js +2 -0
- package/media-picker/MediaPickerTransformations.d.ts +5 -4
- package/media-picker/Providers/CentralImageLocationProvider.js +1 -1
- package/media-picker/Providers/DallEProvider.js +1 -1
- package/media-picker/Providers/MyComputerProvider.js +1 -1
- package/media-picker/Providers/PexelProvider.js +2 -2
- package/media-picker/Providers/UnsplashProvider.d.ts +18 -0
- package/media-picker/Providers/UnsplashProvider.js +23 -0
- package/media-picker/Providers/index.d.ts +1 -0
- package/media-picker/Providers/index.js +1 -0
- package/media-picker/Shared.d.ts +7 -1
- package/media-picker/index.d.ts +2 -0
- package/media-picker/index.js +2 -0
- package/media-picker/localize.d.ts +26 -0
- package/media-picker/localize.js +7 -0
- package/mediaflow/Constants.js +2 -2
- package/oxide/OxideTypeDefinitions.d.ts +147 -0
- package/oxide/OxideTypeDefinitions.js +112 -0
- package/oxide/SharedSettings.d.ts +8 -0
- package/oxide/SharedSettings.js +2 -0
- package/oxide/TreeView.d.ts +10 -0
- package/oxide/TreeView.js +2 -0
- package/oxide/index.d.ts +3 -0
- package/oxide/index.js +6 -0
- package/package.json +1 -1
- package/properties/IPropertyValueRenderer.d.ts +3 -4
- package/properties/PropertyDefinition.d.ts +5 -1
- package/properties/PropertyDefinition.js +4 -1
- package/properties/definitions/BirthdayPropertyDefinition.d.ts +5 -6
- package/properties/definitions/BirthdayPropertyDefinition.js +7 -1
- package/properties/definitions/BooleanPropertyDefinition.d.ts +3 -2
- package/properties/definitions/BooleanPropertyDefinition.js +4 -1
- package/properties/definitions/DatePropertyDefinition.d.ts +5 -5
- package/properties/definitions/DatePropertyDefinition.js +7 -1
- package/properties/definitions/DateTimePropertyDefinition.d.ts +5 -5
- package/properties/definitions/DateTimePropertyDefinition.js +7 -1
- package/properties/definitions/EmailPropertyDefinition.d.ts +3 -3
- package/properties/definitions/EmailPropertyDefinition.js +4 -1
- package/properties/definitions/HtmlPropertyDefinition.d.ts +5 -6
- package/properties/definitions/HtmlPropertyDefinition.js +7 -1
- package/properties/definitions/IdentityPropertyDefinition.d.ts +3 -4
- package/properties/definitions/IdentityPropertyDefinition.js +4 -1
- package/properties/definitions/ImagePropertyDefinition.d.ts +5 -5
- package/properties/definitions/ImagePropertyDefinition.js +7 -1
- package/properties/definitions/IntegerPropertyDefinition.d.ts +3 -4
- package/properties/definitions/IntegerPropertyDefinition.js +4 -1
- package/properties/definitions/LanguagePropertyDefinition.d.ts +3 -5
- package/properties/definitions/LanguagePropertyDefinition.js +4 -1
- package/properties/definitions/LinkPropertyDefinition.d.ts +3 -4
- package/properties/definitions/LinkPropertyDefinition.js +4 -1
- package/properties/definitions/MediaPropertyDefinition.d.ts +3 -3
- package/properties/definitions/MediaPropertyDefinition.js +4 -1
- package/properties/definitions/MultilineTextPropertyDefinition.d.ts +3 -4
- package/properties/definitions/MultilineTextPropertyDefinition.js +4 -1
- package/properties/definitions/MultilingualTextPropertyDefinition.d.ts +5 -6
- package/properties/definitions/MultilingualTextPropertyDefinition.js +6 -3
- package/properties/definitions/PhoneNumberPropertyDefinition.d.ts +3 -4
- package/properties/definitions/PhoneNumberPropertyDefinition.js +4 -1
- package/properties/definitions/TagsPropertyDefinition.d.ts +3 -2
- package/properties/definitions/TagsPropertyDefinition.js +4 -1
- package/properties/definitions/TextPropertyDefinition.d.ts +3 -4
- package/properties/definitions/TextPropertyDefinition.js +4 -1
- package/properties/definitions/TimePropertyDefinition.d.ts +5 -6
- package/properties/definitions/TimePropertyDefinition.js +7 -1
- package/properties/values/DatePropertyValue.d.ts +1 -1
- package/properties/values/DatePropertyValue.js +1 -1
- package/richtext-editor-extensions/BoldExtension.d.ts +1 -1
- package/richtext-editor-extensions/TipTapEditor.d.ts +9 -10
- package/ux/LayoutEditorCanvas.d.ts +2 -1
- package/ux/ThemingApi.d.ts +19 -0
- package/ux/ThemingApi.js +2 -0
- package/ux/UxApi.d.ts +1 -1
- package/ux/VelcronDefinitionApi.d.ts +24 -0
- package/ux/VelcronDefinitionApi.js +2 -0
- package/ux/index.d.ts +2 -0
- package/ux/index.js +2 -0
- package/velcron/VelcronDefinitionRegistration.d.ts +9 -0
- package/velcron/VelcronDefinitionRegistration.js +2 -0
- package/velcron/index.d.ts +1 -0
- package/velcron/index.js +4 -0
- package/SpacingSetting.d.ts +0 -6
- package/VueInject.d.ts +0 -5
- package/internal-do-not-import-from-here/shared/models/theming/ThemeMethods.d.ts +0 -11
- package/internal-do-not-import-from-here/velcron/core/models/VelcronDescriptors.d.ts +0 -35
- /package/{SpacingSetting.js → FilterpickerModel.js} +0 -0
- /package/{VueInject.js → Func.js} +0 -0
- /package/{internal-do-not-import-from-here/velcron/core/models/VelcronDescriptors.js → MediaScalingSettings.js} +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSpacingValueFromBlueprint = void 0;
|
|
4
|
+
const SpacingSetting_1 = require("./SpacingSetting");
|
|
5
|
+
function getSpacingValueFromBlueprint(spacingValue, blueprint) {
|
|
6
|
+
if (!spacingValue) {
|
|
7
|
+
return 0;
|
|
8
|
+
}
|
|
9
|
+
let negative = false;
|
|
10
|
+
let result = spacingValue;
|
|
11
|
+
if (isNaN(spacingValue) && blueprint?.definition) {
|
|
12
|
+
if (spacingValue.startsWith("-")) {
|
|
13
|
+
negative = true;
|
|
14
|
+
}
|
|
15
|
+
spacingValue = spacingValue.replace("-", "");
|
|
16
|
+
if (spacingValue === SpacingSetting_1.SpacingTypes.xs) {
|
|
17
|
+
result = blueprint.definition.xs;
|
|
18
|
+
}
|
|
19
|
+
else if (spacingValue === SpacingSetting_1.SpacingTypes.s) {
|
|
20
|
+
result = blueprint.definition.s;
|
|
21
|
+
}
|
|
22
|
+
else if (spacingValue === SpacingSetting_1.SpacingTypes.m) {
|
|
23
|
+
result = blueprint.definition.m;
|
|
24
|
+
}
|
|
25
|
+
else if (spacingValue === SpacingSetting_1.SpacingTypes.l) {
|
|
26
|
+
result = blueprint.definition.l;
|
|
27
|
+
}
|
|
28
|
+
else if (spacingValue === SpacingSetting_1.SpacingTypes.xl) {
|
|
29
|
+
result = blueprint.definition.xl;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
result = 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return negative ? -result : result;
|
|
36
|
+
}
|
|
37
|
+
exports.getSpacingValueFromBlueprint = getSpacingValueFromBlueprint;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setColorOpacity(color: any, opacity: any): any;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setColorOpacity = void 0;
|
|
4
|
+
function setColorOpacity(color, opacity) {
|
|
5
|
+
function getRGBValues(color) {
|
|
6
|
+
const tmpColor = color.replace("rgba", "rgb");
|
|
7
|
+
return tmpColor.substring(4, tmpColor.length - 1)
|
|
8
|
+
.replace(/ /g, "")
|
|
9
|
+
.split(",");
|
|
10
|
+
}
|
|
11
|
+
function getRGBValuesFromHex(color) {
|
|
12
|
+
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(color);
|
|
13
|
+
if (result) {
|
|
14
|
+
return [
|
|
15
|
+
parseInt(result[1], 16),
|
|
16
|
+
parseInt(result[2], 16),
|
|
17
|
+
parseInt(result[3], 16)
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function isRGBColor(color) {
|
|
22
|
+
if (!color) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
if (color.indexOf("rgb") > -1) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
if (color.indexOf("rgba") > -1) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
let rgb = null;
|
|
34
|
+
if (!isRGBColor(color)) {
|
|
35
|
+
rgb = getRGBValuesFromHex(color);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
rgb = getRGBValues(color);
|
|
39
|
+
}
|
|
40
|
+
if (rgb) {
|
|
41
|
+
return `rgba(${rgb[0]},${rgb[1]},${rgb[2]},${opacity})`;
|
|
42
|
+
}
|
|
43
|
+
return color;
|
|
44
|
+
}
|
|
45
|
+
exports.setColorOpacity = setColorOpacity;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Guid } from "../Guid";
|
|
2
|
+
export interface SpacingSettings {
|
|
3
|
+
top: number | SpacingType;
|
|
4
|
+
right: number | SpacingType;
|
|
5
|
+
bottom: number | SpacingType;
|
|
6
|
+
left: number | SpacingType;
|
|
7
|
+
}
|
|
8
|
+
export interface SpacingDefinition {
|
|
9
|
+
id: Guid;
|
|
10
|
+
xs: number;
|
|
11
|
+
s: number;
|
|
12
|
+
m: number;
|
|
13
|
+
l: number;
|
|
14
|
+
xl: number;
|
|
15
|
+
}
|
|
16
|
+
export type SpacingType = "xs" | "s" | "m" | "l" | "xl";
|
|
17
|
+
export declare enum SpacingTypes {
|
|
18
|
+
xs = "xs",
|
|
19
|
+
s = "s",
|
|
20
|
+
m = "m",
|
|
21
|
+
l = "l",
|
|
22
|
+
xl = "xl"
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpacingTypes = void 0;
|
|
4
|
+
var SpacingTypes;
|
|
5
|
+
(function (SpacingTypes) {
|
|
6
|
+
SpacingTypes["xs"] = "xs";
|
|
7
|
+
SpacingTypes["s"] = "s";
|
|
8
|
+
SpacingTypes["m"] = "m";
|
|
9
|
+
SpacingTypes["l"] = "l";
|
|
10
|
+
SpacingTypes["xl"] = "xl";
|
|
11
|
+
})(SpacingTypes = exports.SpacingTypes || (exports.SpacingTypes = {}));
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { Guid } from "../Guid";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { BluePrintDefinitions } from "./BlueprintDefinition";
|
|
3
|
+
export interface ColorTypeResult<resultType> {
|
|
4
|
+
base: resultType;
|
|
5
|
+
baseTone: resultType;
|
|
6
|
+
onBase: resultType;
|
|
7
|
+
onBaseTone: resultType;
|
|
8
|
+
container: resultType;
|
|
9
|
+
containerTone: resultType;
|
|
10
|
+
onContainer: resultType;
|
|
11
|
+
onContainerTone: resultType;
|
|
12
|
+
colorType: (colorType: string) => resultType;
|
|
13
|
+
}
|
|
4
14
|
export interface ColorDefinition {
|
|
5
15
|
dark: boolean;
|
|
6
16
|
color: string;
|
|
@@ -18,14 +28,7 @@ export interface ColorSchema {
|
|
|
18
28
|
container: ColorDefinition;
|
|
19
29
|
onContainer: ColorDefinition;
|
|
20
30
|
}
|
|
21
|
-
export interface
|
|
22
|
-
dark: ColorSchema;
|
|
23
|
-
light: ColorSchema;
|
|
24
|
-
}
|
|
25
|
-
export interface ThemeDefinitionV2 {
|
|
26
|
-
id: Guid;
|
|
27
|
-
name: string;
|
|
28
|
-
dark: boolean;
|
|
31
|
+
export interface ColorSchemas {
|
|
29
32
|
primary: ColorSchema;
|
|
30
33
|
secondary: ColorSchema;
|
|
31
34
|
accent1: ColorSchema;
|
|
@@ -35,27 +38,45 @@ export interface ThemeDefinitionV2 {
|
|
|
35
38
|
background: ColorSchema;
|
|
36
39
|
error: ColorSchema;
|
|
37
40
|
info: ColorSchema;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
41
|
+
}
|
|
42
|
+
export interface ColorGroup {
|
|
43
|
+
dark: ColorSchema;
|
|
44
|
+
light: ColorSchema;
|
|
45
|
+
}
|
|
46
|
+
export interface ThemeDefinitionV2 {
|
|
47
|
+
id: Guid;
|
|
48
|
+
name: string;
|
|
49
|
+
dark: boolean;
|
|
50
|
+
colors: ColorSchemas;
|
|
51
|
+
blueprints: BluePrintDefinitions;
|
|
52
|
+
}
|
|
53
|
+
export type ColorSchemaType = keyof typeof ColorSchemaTypes;
|
|
54
|
+
export declare enum ColorSchemaTypes {
|
|
55
|
+
primary = "primary",
|
|
56
|
+
secondary = "secondary",
|
|
57
|
+
accent1 = "accent1",
|
|
58
|
+
accent2 = "accent2",
|
|
59
|
+
accent3 = "accent3",
|
|
60
|
+
neutral = "neutral",
|
|
61
|
+
background = "background",
|
|
62
|
+
error = "error",
|
|
63
|
+
info = "info"
|
|
64
|
+
}
|
|
65
|
+
export type BlueprintType = keyof typeof BlueprintTypes;
|
|
66
|
+
export declare enum BlueprintTypes {
|
|
67
|
+
default = "default",
|
|
68
|
+
variant1 = "variant1",
|
|
69
|
+
variant2 = "variant2",
|
|
70
|
+
variant3 = "variant3"
|
|
71
|
+
}
|
|
72
|
+
export type ColorType = keyof typeof ColorTypes;
|
|
73
|
+
export declare enum ColorTypes {
|
|
74
|
+
base = "base",
|
|
75
|
+
onBase = "onBase",
|
|
76
|
+
container = "container",
|
|
77
|
+
onContainer = "onContainer"
|
|
78
|
+
}
|
|
79
|
+
export interface ColorGradient {
|
|
80
|
+
color: string;
|
|
81
|
+
stop?: number;
|
|
82
|
+
}
|
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ColorTypes = exports.ColorSchemaTypes = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
exports.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
exports.ColorTypes = exports.BlueprintTypes = exports.ColorSchemaTypes = void 0;
|
|
4
|
+
var ColorSchemaTypes;
|
|
5
|
+
(function (ColorSchemaTypes) {
|
|
6
|
+
ColorSchemaTypes["primary"] = "primary";
|
|
7
|
+
ColorSchemaTypes["secondary"] = "secondary";
|
|
8
|
+
ColorSchemaTypes["accent1"] = "accent1";
|
|
9
|
+
ColorSchemaTypes["accent2"] = "accent2";
|
|
10
|
+
ColorSchemaTypes["accent3"] = "accent3";
|
|
11
|
+
ColorSchemaTypes["neutral"] = "neutral";
|
|
12
|
+
ColorSchemaTypes["background"] = "background";
|
|
13
|
+
ColorSchemaTypes["error"] = "error";
|
|
14
|
+
ColorSchemaTypes["info"] = "info";
|
|
15
|
+
})(ColorSchemaTypes = exports.ColorSchemaTypes || (exports.ColorSchemaTypes = {}));
|
|
16
|
+
var BlueprintTypes;
|
|
17
|
+
(function (BlueprintTypes) {
|
|
18
|
+
BlueprintTypes["default"] = "default";
|
|
19
|
+
BlueprintTypes["variant1"] = "variant1";
|
|
20
|
+
BlueprintTypes["variant2"] = "variant2";
|
|
21
|
+
BlueprintTypes["variant3"] = "variant3";
|
|
22
|
+
})(BlueprintTypes = exports.BlueprintTypes || (exports.BlueprintTypes = {}));
|
|
23
|
+
var ColorTypes;
|
|
24
|
+
(function (ColorTypes) {
|
|
25
|
+
ColorTypes["base"] = "base";
|
|
26
|
+
ColorTypes["onBase"] = "onBase";
|
|
27
|
+
ColorTypes["container"] = "container";
|
|
28
|
+
ColorTypes["onContainer"] = "onContainer";
|
|
29
|
+
})(ColorTypes = exports.ColorTypes || (exports.ColorTypes = {}));
|
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
import { Guid } from "../Guid";
|
|
2
2
|
export interface TypographyDefinition {
|
|
3
3
|
id: Guid;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
title: {
|
|
5
|
+
xl: TypographyTypeDefinition;
|
|
6
|
+
l: TypographyTypeDefinition;
|
|
7
|
+
m: TypographyTypeDefinition;
|
|
8
|
+
s: TypographyTypeDefinition;
|
|
9
|
+
xs: TypographyTypeDefinition;
|
|
10
|
+
};
|
|
11
|
+
text: {
|
|
12
|
+
l: TypographyTypeDefinition;
|
|
13
|
+
m: TypographyTypeDefinition;
|
|
14
|
+
s: TypographyTypeDefinition;
|
|
15
|
+
xs: TypographyTypeDefinition;
|
|
16
|
+
};
|
|
17
|
+
navigation: {
|
|
18
|
+
l: TypographyTypeDefinition;
|
|
19
|
+
m: TypographyTypeDefinition;
|
|
20
|
+
};
|
|
21
|
+
link: {
|
|
22
|
+
m: TypographyTypeDefinition;
|
|
23
|
+
};
|
|
10
24
|
}
|
|
11
|
-
export interface
|
|
25
|
+
export interface TypographyTypeDefinition {
|
|
12
26
|
decoration?: string;
|
|
13
27
|
large: TypographyTypeBreakPoint;
|
|
14
28
|
medium?: TypographyTypeBreakPoint;
|
|
@@ -19,11 +33,17 @@ export interface TypographyTypeBreakPoint {
|
|
|
19
33
|
size: number;
|
|
20
34
|
lineHeight: number;
|
|
21
35
|
}
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
36
|
+
export type TypographyType = keyof typeof TypographyTypes;
|
|
37
|
+
export declare enum TypographyTypes {
|
|
38
|
+
title = "title",
|
|
39
|
+
text = "text",
|
|
40
|
+
navigation = "navigation"
|
|
41
|
+
}
|
|
42
|
+
export type TypographySize = keyof typeof TypographySizes;
|
|
43
|
+
export declare enum TypographySizes {
|
|
44
|
+
xl = "xl",
|
|
45
|
+
l = "l",
|
|
46
|
+
m = "m",
|
|
47
|
+
s = "s",
|
|
48
|
+
xs = "xs"
|
|
49
|
+
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypographyTypes = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
exports.TypographySizes = exports.TypographyTypes = void 0;
|
|
4
|
+
var TypographyTypes;
|
|
5
|
+
(function (TypographyTypes) {
|
|
6
|
+
TypographyTypes["title"] = "title";
|
|
7
|
+
TypographyTypes["text"] = "text";
|
|
8
|
+
TypographyTypes["navigation"] = "navigation";
|
|
9
|
+
})(TypographyTypes = exports.TypographyTypes || (exports.TypographyTypes = {}));
|
|
10
|
+
var TypographySizes;
|
|
11
|
+
(function (TypographySizes) {
|
|
12
|
+
TypographySizes["xl"] = "xl";
|
|
13
|
+
TypographySizes["l"] = "l";
|
|
14
|
+
TypographySizes["m"] = "m";
|
|
15
|
+
TypographySizes["s"] = "s";
|
|
16
|
+
TypographySizes["xs"] = "xs";
|
|
17
|
+
})(TypographySizes = exports.TypographySizes || (exports.TypographySizes = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BlueprintType, BlueprintTypes, ColorDefinition, ColorSchema, ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes } from "./ThemeDefinitionV2";
|
|
2
|
+
import { TypographySize, TypographySizes, TypographyType, TypographyTypeDefinition, TypographyTypes } from "./TypographyDefinition";
|
|
3
|
+
import { BlueprintDefinition } from "./BlueprintDefinition";
|
|
4
|
+
export declare function useThemeMethods(getThemeDefinition: () => any): {
|
|
5
|
+
colorSchema: (colorSchemaType: ColorSchemaTypes | ColorSchemaType) => ColorSchema;
|
|
6
|
+
blueprint: (blueprintType: BlueprintTypes | BlueprintType) => BlueprintDefinition;
|
|
7
|
+
typography: (blueprintType: BlueprintTypes | BlueprintType, typographyType: TypographyTypes | TypographyType, size: TypographySize | TypographySizes) => TypographyTypeDefinition;
|
|
8
|
+
color: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => string;
|
|
9
|
+
colorDefinition: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => ColorDefinition;
|
|
10
|
+
complementaryColorType: (colorType: ColorTypes | ColorType) => ColorTypes;
|
|
11
|
+
complementaryColor: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => string;
|
|
12
|
+
complementaryColorDefinition: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => ColorDefinition;
|
|
13
|
+
};
|
|
@@ -1,143 +1,129 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useThemeMethods = void 0;
|
|
4
|
+
//import { ThemeDefinitionInstance } from "@omnia/fx/ux";
|
|
4
5
|
const ThemeDefinitionV2_1 = require("./ThemeDefinitionV2");
|
|
5
6
|
const TypographyDefinition_1 = require("./TypographyDefinition");
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
// temp change ThemeDefinitionInstance to any because fx/shared can't reference higher level fx/ux
|
|
8
|
+
function useThemeMethods(getThemeDefinition) {
|
|
9
|
+
function colorSchema(colorSchemaType) {
|
|
8
10
|
if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.primary) {
|
|
9
|
-
return
|
|
11
|
+
return getThemeDefinition().colors.primary;
|
|
10
12
|
}
|
|
11
13
|
else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.secondary) {
|
|
12
|
-
return
|
|
14
|
+
return getThemeDefinition().colors.secondary;
|
|
13
15
|
}
|
|
14
16
|
else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.accent1) {
|
|
15
|
-
return
|
|
17
|
+
return getThemeDefinition().colors.accent1;
|
|
16
18
|
}
|
|
17
19
|
else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.accent2) {
|
|
18
|
-
return
|
|
20
|
+
return getThemeDefinition().colors.accent2;
|
|
19
21
|
}
|
|
20
22
|
else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.accent3) {
|
|
21
|
-
return
|
|
23
|
+
return getThemeDefinition().colors.accent3;
|
|
22
24
|
}
|
|
23
25
|
else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.background) {
|
|
24
|
-
return
|
|
26
|
+
return getThemeDefinition().colors.background;
|
|
25
27
|
}
|
|
26
28
|
else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.neutral) {
|
|
27
|
-
return
|
|
29
|
+
return getThemeDefinition().colors.neutral;
|
|
28
30
|
}
|
|
29
31
|
else if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.error) {
|
|
30
|
-
return
|
|
32
|
+
return getThemeDefinition().colors.error;
|
|
31
33
|
}
|
|
32
|
-
return
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (
|
|
36
|
-
return
|
|
34
|
+
return getThemeDefinition().colors.background;
|
|
35
|
+
}
|
|
36
|
+
function blueprint(blueprintType) {
|
|
37
|
+
if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.default) {
|
|
38
|
+
return getThemeDefinition().blueprints.default;
|
|
37
39
|
}
|
|
38
|
-
else if (
|
|
39
|
-
return
|
|
40
|
+
else if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.variant1) {
|
|
41
|
+
return getThemeDefinition().blueprints.variant1;
|
|
40
42
|
}
|
|
41
|
-
else if (
|
|
42
|
-
return
|
|
43
|
+
else if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.variant2) {
|
|
44
|
+
return getThemeDefinition().blueprints.variant2;
|
|
43
45
|
}
|
|
44
|
-
else if (
|
|
45
|
-
return
|
|
46
|
+
else if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.variant3) {
|
|
47
|
+
return getThemeDefinition().blueprints.variant3;
|
|
46
48
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
return getThemeDefinition().blueprints.default;
|
|
50
|
+
}
|
|
51
|
+
function typography(blueprintType, typographyType, size) {
|
|
52
|
+
const typographyBlueprint = getThemeDefinition().blueprints[blueprintType].definitions.find(d => d.type === "typography");
|
|
53
|
+
if (typographyType === TypographyDefinition_1.TypographyTypes.text) {
|
|
54
|
+
return typographyBlueprint.definition.text[size];
|
|
49
55
|
}
|
|
50
|
-
else if (typographyType === TypographyDefinition_1.TypographyTypes.
|
|
51
|
-
return
|
|
56
|
+
else if (typographyType === TypographyDefinition_1.TypographyTypes.title) {
|
|
57
|
+
return typographyBlueprint.definition.title[size];
|
|
52
58
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
else if (typographyType === TypographyDefinition_1.TypographyTypes.navigation) {
|
|
60
|
+
return typographyBlueprint.definition[size];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function color(colorSchemaType, colorType) {
|
|
56
64
|
const mappedColorSchema = colorSchema(colorSchemaType);
|
|
57
65
|
if (colorType === ThemeDefinitionV2_1.ColorTypes.base) {
|
|
58
66
|
return mappedColorSchema.base.color;
|
|
59
67
|
}
|
|
60
|
-
else if (colorType === ThemeDefinitionV2_1.ColorTypes.baseTone) {
|
|
61
|
-
return mappedColorSchema.base.colorToned;
|
|
62
|
-
}
|
|
63
68
|
else if (colorType === ThemeDefinitionV2_1.ColorTypes.onBase) {
|
|
64
69
|
return mappedColorSchema.onBase.color;
|
|
65
70
|
}
|
|
66
|
-
else if (colorType === ThemeDefinitionV2_1.ColorTypes.onBaseTone) {
|
|
67
|
-
return mappedColorSchema.onBase.colorToned;
|
|
68
|
-
}
|
|
69
71
|
else if (colorType === ThemeDefinitionV2_1.ColorTypes.container) {
|
|
70
72
|
return mappedColorSchema.container.color;
|
|
71
73
|
}
|
|
72
|
-
else if (colorType === ThemeDefinitionV2_1.ColorTypes.containerTone) {
|
|
73
|
-
return mappedColorSchema.container.colorToned;
|
|
74
|
-
}
|
|
75
74
|
else if (colorType === ThemeDefinitionV2_1.ColorTypes.onContainer) {
|
|
76
75
|
return mappedColorSchema.onContainer.color;
|
|
77
76
|
}
|
|
78
|
-
else if (colorType === ThemeDefinitionV2_1.ColorTypes.onContainerTone) {
|
|
79
|
-
return mappedColorSchema.onContainer.colorToned;
|
|
80
|
-
}
|
|
81
77
|
return colorType;
|
|
82
|
-
}
|
|
83
|
-
|
|
78
|
+
}
|
|
79
|
+
function colorDefinition(colorSchemaType, colorType) {
|
|
84
80
|
const mappedColorSchema = colorSchema(colorSchemaType);
|
|
85
|
-
if (colorType === ThemeDefinitionV2_1.ColorTypes.base
|
|
86
|
-
|| colorType === ThemeDefinitionV2_1.ColorTypes.baseTone) {
|
|
81
|
+
if (colorType === ThemeDefinitionV2_1.ColorTypes.base) {
|
|
87
82
|
return mappedColorSchema.base;
|
|
88
83
|
}
|
|
89
|
-
else if (colorType === ThemeDefinitionV2_1.ColorTypes.onBase
|
|
90
|
-
||
|
|
91
|
-
colorType === ThemeDefinitionV2_1.ColorTypes.onBaseTone) {
|
|
84
|
+
else if (colorType === ThemeDefinitionV2_1.ColorTypes.onBase) {
|
|
92
85
|
return mappedColorSchema.onBase;
|
|
93
86
|
}
|
|
94
|
-
else if (colorType === ThemeDefinitionV2_1.ColorTypes.container
|
|
95
|
-
||
|
|
96
|
-
colorType === ThemeDefinitionV2_1.ColorTypes.containerTone) {
|
|
87
|
+
else if (colorType === ThemeDefinitionV2_1.ColorTypes.container) {
|
|
97
88
|
return mappedColorSchema.container;
|
|
98
89
|
}
|
|
99
|
-
else if (colorType === ThemeDefinitionV2_1.ColorTypes.onContainer
|
|
100
|
-
||
|
|
101
|
-
colorType === ThemeDefinitionV2_1.ColorTypes.onContainerTone) {
|
|
90
|
+
else if (colorType === ThemeDefinitionV2_1.ColorTypes.onContainer) {
|
|
102
91
|
return mappedColorSchema.onContainer;
|
|
103
92
|
}
|
|
104
93
|
return mappedColorSchema.base;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (colorType === ThemeDefinitionV2_1.ColorTypes.base
|
|
108
|
-
|| colorType === ThemeDefinitionV2_1.ColorTypes.baseTone) {
|
|
94
|
+
}
|
|
95
|
+
function complementaryColorType(colorType) {
|
|
96
|
+
if (colorType === ThemeDefinitionV2_1.ColorTypes.base) {
|
|
109
97
|
return ThemeDefinitionV2_1.ColorTypes.onBase;
|
|
110
98
|
}
|
|
111
|
-
else if (colorType === ThemeDefinitionV2_1.ColorTypes.onBase
|
|
112
|
-
|| colorType === ThemeDefinitionV2_1.ColorTypes.onBaseTone) {
|
|
99
|
+
else if (colorType === ThemeDefinitionV2_1.ColorTypes.onBase) {
|
|
113
100
|
return ThemeDefinitionV2_1.ColorTypes.base;
|
|
114
101
|
}
|
|
115
|
-
else if (colorType === ThemeDefinitionV2_1.ColorTypes.container
|
|
116
|
-
|| colorType === ThemeDefinitionV2_1.ColorTypes.containerTone) {
|
|
102
|
+
else if (colorType === ThemeDefinitionV2_1.ColorTypes.container) {
|
|
117
103
|
return ThemeDefinitionV2_1.ColorTypes.onContainer;
|
|
118
104
|
}
|
|
119
|
-
else if (colorType === ThemeDefinitionV2_1.ColorTypes.onContainer
|
|
120
|
-
|| colorType === ThemeDefinitionV2_1.ColorTypes.onContainerTone) {
|
|
105
|
+
else if (colorType === ThemeDefinitionV2_1.ColorTypes.onContainer) {
|
|
121
106
|
return ThemeDefinitionV2_1.ColorTypes.container;
|
|
122
107
|
}
|
|
123
108
|
return colorType;
|
|
124
|
-
}
|
|
125
|
-
|
|
109
|
+
}
|
|
110
|
+
function complementaryColor(colorSchemaType, colorType) {
|
|
126
111
|
const matchingColorType = complementaryColorType(colorType);
|
|
127
112
|
return color(colorSchemaType, matchingColorType);
|
|
128
|
-
}
|
|
129
|
-
|
|
113
|
+
}
|
|
114
|
+
function complementaryColorDefinition(colorSchemaType, colorType) {
|
|
130
115
|
const matchingColorType = complementaryColorType(colorType);
|
|
131
116
|
return colorDefinition(colorSchemaType, matchingColorType);
|
|
132
|
-
}
|
|
117
|
+
}
|
|
133
118
|
return {
|
|
134
119
|
colorSchema,
|
|
120
|
+
blueprint,
|
|
135
121
|
typography,
|
|
136
122
|
color,
|
|
137
123
|
colorDefinition,
|
|
138
124
|
complementaryColorType,
|
|
139
125
|
complementaryColor,
|
|
140
|
-
complementaryColorDefinition
|
|
126
|
+
complementaryColorDefinition,
|
|
141
127
|
};
|
|
142
|
-
}
|
|
128
|
+
}
|
|
143
129
|
exports.useThemeMethods = useThemeMethods;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export * from "./ThemeDefinitionV2";
|
|
2
2
|
export * from "./TypographyDefinition";
|
|
3
3
|
export * from "./OmniaThemes";
|
|
4
|
-
export * from "./
|
|
4
|
+
export * from "./UseThemeMethods";
|
|
5
|
+
export * from "./BlueprintDefinition";
|
|
6
|
+
export * from "./SpacingSetting";
|
|
7
|
+
export * from "./SharedBlueprintMethods";
|
|
8
|
+
export * from "./SharedColorMethods";
|
|
@@ -4,4 +4,8 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
tslib_1.__exportStar(require("./ThemeDefinitionV2"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./TypographyDefinition"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./OmniaThemes"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./
|
|
7
|
+
tslib_1.__exportStar(require("./UseThemeMethods"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./BlueprintDefinition"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./SpacingSetting"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./SharedBlueprintMethods"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./SharedColorMethods"), exports);
|
|
@@ -16,31 +16,22 @@ export declare enum VelcronActionTypes {
|
|
|
16
16
|
export declare enum VelcronIconTypes {
|
|
17
17
|
fontAwesome = "fa"
|
|
18
18
|
}
|
|
19
|
+
export declare enum VelcronViewDirections {
|
|
20
|
+
row = "row",
|
|
21
|
+
column = "column",
|
|
22
|
+
rowReverse = "row-reverse",
|
|
23
|
+
columnRevers = "column-reverse"
|
|
24
|
+
}
|
|
19
25
|
export declare enum VelcronHorizontalAlignments {
|
|
20
26
|
left = "left",
|
|
21
27
|
center = "center",
|
|
22
28
|
right = "right"
|
|
23
29
|
}
|
|
24
|
-
export declare enum
|
|
30
|
+
export declare enum VelcronVerticalAlignments {
|
|
25
31
|
top = "top",
|
|
26
32
|
center = "center",
|
|
27
33
|
bottom = "bottom"
|
|
28
34
|
}
|
|
29
|
-
export declare enum VelcronDescriptorTypes {
|
|
30
|
-
component = 0,
|
|
31
|
-
subComponent = 1,
|
|
32
|
-
appData = 2,
|
|
33
|
-
dataMember = 3
|
|
34
|
-
}
|
|
35
|
-
export declare enum VelcronComponentPropertyEditors {
|
|
36
|
-
text = 0,
|
|
37
|
-
colorSchemaPicker = 1,
|
|
38
|
-
slider = 2,
|
|
39
|
-
colorPicker = 3,
|
|
40
|
-
typographyPicker = 4,
|
|
41
|
-
ratioPicker = 5,
|
|
42
|
-
booleanPicker = 6
|
|
43
|
-
}
|
|
44
35
|
export declare enum VelcronDataTypes {
|
|
45
36
|
unknown = "unknown",
|
|
46
37
|
object = "object",
|