@lightdash/common 0.2143.2 → 0.2144.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.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/authorization/roleToScopeMapping.d.ts.map +1 -1
- package/dist/cjs/authorization/roleToScopeMapping.js +2 -2
- package/dist/cjs/authorization/roleToScopeMapping.js.map +1 -1
- package/dist/cjs/types/organizationMemberProfile.d.ts +1 -0
- package/dist/cjs/types/organizationMemberProfile.d.ts.map +1 -1
- package/dist/cjs/types/organizationMemberProfile.js +9 -1
- package/dist/cjs/types/organizationMemberProfile.js.map +1 -1
- package/dist/cjs/visualizations/helpers/styles/valueLabelStyles.d.ts +4 -4
- package/dist/cjs/visualizations/helpers/styles/valueLabelStyles.js +4 -4
- package/dist/cjs/visualizations/helpers/styles/valueLabelStyles.js.map +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/authorization/roleToScopeMapping.d.ts.map +1 -1
- package/dist/esm/authorization/roleToScopeMapping.js +3 -3
- package/dist/esm/authorization/roleToScopeMapping.js.map +1 -1
- package/dist/esm/types/organizationMemberProfile.d.ts +1 -0
- package/dist/esm/types/organizationMemberProfile.d.ts.map +1 -1
- package/dist/esm/types/organizationMemberProfile.js +8 -0
- package/dist/esm/types/organizationMemberProfile.js.map +1 -1
- package/dist/esm/visualizations/helpers/styles/valueLabelStyles.d.ts +4 -4
- package/dist/esm/visualizations/helpers/styles/valueLabelStyles.js +4 -4
- package/dist/esm/visualizations/helpers/styles/valueLabelStyles.js.map +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/authorization/roleToScopeMapping.d.ts.map +1 -1
- package/dist/types/authorization/roleToScopeMapping.js +3 -3
- package/dist/types/authorization/roleToScopeMapping.js.map +1 -1
- package/dist/types/types/organizationMemberProfile.d.ts +1 -0
- package/dist/types/types/organizationMemberProfile.d.ts.map +1 -1
- package/dist/types/types/organizationMemberProfile.js +8 -0
- package/dist/types/types/organizationMemberProfile.js.map +1 -1
- package/dist/types/visualizations/helpers/styles/valueLabelStyles.d.ts +4 -4
- package/dist/types/visualizations/helpers/styles/valueLabelStyles.js +4 -4
- package/dist/types/visualizations/helpers/styles/valueLabelStyles.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roleToScopeMapping.d.ts","sourceRoot":"","sources":["../../../src/authorization/roleToScopeMapping.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"roleToScopeMapping.d.ts","sourceRoot":"","sources":["../../../src/authorization/roleToScopeMapping.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EAEpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA2GrD;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,EAAE,CAoBnE,CAAC;AAET;;GAEG;AACH,eAAO,MAAM,mBAAmB,SAAU,iBAAiB,KAAG,MAAM,EAEnE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B,SAChC,iBAAiB,KACxB,MAAM,EAkBR,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,cAAc,EAWzC,CAAC;AAER,eAAO,MAAM,YAAY,aAAc,MAAM,KAAG,QAAQ,IAAI,iBACF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProjectMemberRole } from '../types/projectMemberRole';
|
|
1
|
+
import { ProjectMemberRole, ProjectMemberRoleLabels, } from '../types/projectMemberRole';
|
|
2
2
|
/**
|
|
3
3
|
* Utility functions to convert project member roles to equivalent scope sets
|
|
4
4
|
* for testing migration compatibility between role-based and scope-based authorization
|
|
@@ -137,8 +137,8 @@ export const getNonEnterpriseScopesForRole = (role) => {
|
|
|
137
137
|
};
|
|
138
138
|
export const getSystemRoles = () => ROLE_HIERARCHY.map((role) => ({
|
|
139
139
|
roleUuid: role,
|
|
140
|
-
name: role,
|
|
141
|
-
description: role,
|
|
140
|
+
name: ProjectMemberRoleLabels[role],
|
|
141
|
+
description: ProjectMemberRoleLabels[role],
|
|
142
142
|
ownerType: 'system',
|
|
143
143
|
scopes: getAllScopesForRole(role),
|
|
144
144
|
organizationUuid: null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roleToScopeMapping.js","sourceRoot":"","sources":["../../../src/authorization/roleToScopeMapping.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"roleToScopeMapping.js","sourceRoot":"","sources":["../../../src/authorization/roleToScopeMapping.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EACjB,uBAAuB,GAC1B,MAAM,4BAA4B,CAAC;AAGpC;;;GAGG;AAEH;;GAEG;AACH,MAAM,gBAAgB,GAAG;IACrB,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE;QACxB,4BAA4B;QAC5B,gBAAgB;QAChB,qBAAqB,EAAE,yCAAyC;QAChE,iBAAiB;QACjB,YAAY;QACZ,cAAc;QACd,kBAAkB;QAClB,wBAAwB;QACxB,WAAW;QACX,kBAAkB;QAElB,qCAAqC;QACrC,kBAAkB;QAClB,2BAA2B;QAC3B,yBAAyB;KAC5B;IAED,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,EAAE;QACpC,4CAA4C;QAC5C,qBAAqB;QACrB,qBAAqB;QACrB,gBAAgB;QAChB,yBAAyB;QACzB,4BAA4B;QAC5B,0BAA0B;QAC1B,qBAAqB;QAErB,oEAAoE;QACpE,wBAAwB,EAAE,mBAAmB;QAC7C,yBAAyB,EAAE,mBAAmB;QAC9C,uBAAuB,EAAE,gCAAgC;QAEzD,oBAAoB;QACpB,cAAc;QACd,sBAAsB;KACzB;IAED,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE;QACxB,8BAA8B;QAC9B,cAAc;QACd,qBAA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E,uBAAuB,CAAC,IAAI,CAAC;IAC1C,SAAS,EAAE,QAAQ;IACnB,MAAM,EAAE,mBAAmB,CAAC,IAAI,CAAC;IACjC,gBAAgB,EAAE,IAAI;IACtB,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;CAClB,CAAC,CAAC,CAAC;AAER,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAiC,EAAE,CAC5E,cAAc,CAAC,QAAQ,CAAC,QAA6B,CAAC,CAAC"}
|
|
@@ -8,6 +8,7 @@ export declare enum OrganizationMemberRole {
|
|
|
8
8
|
DEVELOPER = "developer",
|
|
9
9
|
ADMIN = "admin"
|
|
10
10
|
}
|
|
11
|
+
export declare const OrganizationMemberRoleLabels: Record<OrganizationMemberRole, string>;
|
|
11
12
|
export declare const isOrganizationMemberRole: (x: string) => x is OrganizationMemberRole;
|
|
12
13
|
/**
|
|
13
14
|
* Profile for a user's membership in an organization
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizationMemberProfile.d.ts","sourceRoot":"","sources":["../../../src/types/organizationMemberProfile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,oBAAY,sBAAsB;IAC9B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,kBAAkB,uBAAuB;IACzC,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,KAAK,UAAU;CAClB;AAED,eAAO,MAAM,wBAAwB,MAC9B,MAAM,KACV,CAAC,IAAI,sBACuE,CAAC;AAEhF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACpC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,IAAI,CAAC;IACpB,aAAa,EAAE,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG,yBAAyB,GAAG;IAC1E,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,qCAAqC,QACzC,yBAAyB,GAAG,mCAAmC,KACrE,GAAG,IAAI,mCAAsD,CAAC;AAEjE,MAAM,MAAM,+BAA+B,GAAG;IAC1C,IAAI,EAAE,sBAAsB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IACxC,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,iBAAiB,CAAC,yBAAyB,EAAE,CAAC,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACvC,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,yBAAyB,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,kBAAkB,SAAU,sBAAsB,yVAiB9D,CAAC"}
|
|
1
|
+
{"version":3,"file":"organizationMemberProfile.d.ts","sourceRoot":"","sources":["../../../src/types/organizationMemberProfile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,oBAAY,sBAAsB;IAC9B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,kBAA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EAAE,IAAI,CAAC;IACb,OAAO,EAAE,yBAAyB,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,kBAAkB,SAAU,sBAAsB,yVAiB9D,CAAC"}
|
|
@@ -7,6 +7,14 @@ export var OrganizationMemberRole;
|
|
|
7
7
|
OrganizationMemberRole["DEVELOPER"] = "developer";
|
|
8
8
|
OrganizationMemberRole["ADMIN"] = "admin";
|
|
9
9
|
})(OrganizationMemberRole || (OrganizationMemberRole = {}));
|
|
10
|
+
export const OrganizationMemberRoleLabels = {
|
|
11
|
+
[OrganizationMemberRole.MEMBER]: 'Member',
|
|
12
|
+
[OrganizationMemberRole.VIEWER]: 'Viewer',
|
|
13
|
+
[OrganizationMemberRole.INTERACTIVE_VIEWER]: 'Interactive Viewer',
|
|
14
|
+
[OrganizationMemberRole.EDITOR]: 'Editor',
|
|
15
|
+
[OrganizationMemberRole.DEVELOPER]: 'Developer',
|
|
16
|
+
[OrganizationMemberRole.ADMIN]: 'Admin',
|
|
17
|
+
};
|
|
10
18
|
export const isOrganizationMemberRole = (x) => Object.values(OrganizationMemberRole).includes(x);
|
|
11
19
|
export const isOrganizationMemberProfileWithGroups = (obj) => 'groups' in obj;
|
|
12
20
|
export const getRoleDescription = (role) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizationMemberProfile.js","sourceRoot":"","sources":["../../../src/types/organizationMemberProfile.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAC9B,2CAAiB,CAAA;IACjB,2CAAiB,CAAA;IACjB,mEAAyC,CAAA;IACzC,2CAAiB,CAAA;IACjB,iDAAuB,CAAA;IACvB,yCAAe,CAAA;AACnB,CAAC,EAPW,sBAAsB,KAAtB,sBAAsB,QAOjC;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACpC,CAAS,EACkB,EAAE,CAC7B,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,QAAQ,CAAC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SAAS,CAAC,EAAE,WAAW;IAC/C,CAAC,sBAAsB,CAAC,KAAK,CAAC,EAAE,OAAO;CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACpC,CAAS,EACkB,EAAE,CAC7B,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,QAAQ,CAAC,CAA2B,CAAC,CAAC;AA2ChF,MAAM,CAAC,MAAM,qCAAqC,GAAG,CACjD,GAAoE,EAC1B,EAAE,CAAC,QAAQ,IAAI,GAAG,CAAC;AAgBjE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAA4B,EAAE,EAAE;IAC/D,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,sBAAsB,CAAC,MAAM;YAC9B,OAAO,kFAAkF,CAAC;QAC9F,KAAK,sBAAsB,CAAC,MAAM;YAC9B,OAAO,sCAAsC,CAAC;QAClD,KAAK,sBAAsB,CAAC,kBAAkB;YAC1C,OAAO,+FAA+F,CAAC;QAC3G,KAAK,sBAAsB,CAAC,MAAM;YAC9B,OAAO,sCAAsC,CAAC;QAClD,KAAK,sBAAsB,CAAC,SAAS;YACjC,OAAO,sCAAsC,CAAC;QAClD,KAAK,sBAAsB,CAAC,KAAK;YAC7B,OAAO,oEAAoE,CAAC;QAChF;YACI,OAAO,IAAI,CAAC;IACpB,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { type Series } from '../../../types/savedCharts';
|
|
2
2
|
/**
|
|
3
3
|
* Get value label styling for any chart series (line, bar, area, scatter, etc.)
|
|
4
|
-
* Inside: White on dark backgrounds, gray.9 on light backgrounds, weight
|
|
5
|
-
* Outside: gray.9 text with colored border matching series, weight
|
|
4
|
+
* Inside: White on dark backgrounds, gray.9 on light backgrounds, weight 500
|
|
5
|
+
* Outside: gray.9 text with colored border matching series, weight 600
|
|
6
6
|
* Size: 11px
|
|
7
7
|
* @param position - Label position relative to data point
|
|
8
8
|
* @param type - Series type
|
|
9
9
|
*/
|
|
10
10
|
export declare const getValueLabelStyle: (position: "left" | "right" | "top" | "bottom" | "inside" | undefined, type: Series["type"]) => {
|
|
11
11
|
readonly fontSize: 11;
|
|
12
|
-
readonly fontWeight: "500";
|
|
12
|
+
readonly fontWeight: "500" | "400";
|
|
13
13
|
} | {
|
|
14
14
|
textBorderColor: string;
|
|
15
15
|
textBorderWidth: number;
|
|
16
16
|
textBorderType: string;
|
|
17
17
|
fontSize: 11;
|
|
18
|
-
fontWeight: "500";
|
|
18
|
+
fontWeight: "500" | "400";
|
|
19
19
|
};
|
|
20
20
|
//# sourceMappingURL=valueLabelStyles.d.ts.map
|
|
@@ -2,8 +2,8 @@ import { CartesianSeriesType } from '../../../types/savedCharts';
|
|
|
2
2
|
import { WHITE } from './themeColors';
|
|
3
3
|
/**
|
|
4
4
|
* Get value label styling for any chart series (line, bar, area, scatter, etc.)
|
|
5
|
-
* Inside: White on dark backgrounds, gray.9 on light backgrounds, weight
|
|
6
|
-
* Outside: gray.9 text with colored border matching series, weight
|
|
5
|
+
* Inside: White on dark backgrounds, gray.9 on light backgrounds, weight 500
|
|
6
|
+
* Outside: gray.9 text with colored border matching series, weight 600
|
|
7
7
|
* Size: 11px
|
|
8
8
|
* @param position - Label position relative to data point
|
|
9
9
|
* @param type - Series type
|
|
@@ -12,7 +12,7 @@ export const getValueLabelStyle = (position, type) => {
|
|
|
12
12
|
const isInside = position === 'inside';
|
|
13
13
|
const base = {
|
|
14
14
|
fontSize: 11,
|
|
15
|
-
fontWeight: '500',
|
|
15
|
+
fontWeight: isInside ? '400' : '500',
|
|
16
16
|
};
|
|
17
17
|
if (
|
|
18
18
|
// inside labels for line and area series should have a white border - similar way to bar series for legibility
|
|
@@ -21,7 +21,7 @@ export const getValueLabelStyle = (position, type) => {
|
|
|
21
21
|
return {
|
|
22
22
|
...base,
|
|
23
23
|
textBorderColor: WHITE,
|
|
24
|
-
textBorderWidth:
|
|
24
|
+
textBorderWidth: 1.5,
|
|
25
25
|
textBorderType: 'solid',
|
|
26
26
|
};
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueLabelStyles.js","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/valueLabelStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAC9B,QAAoE,EACpE,IAAoB,EACtB,EAAE;IACA,MAAM,QAAQ,GAAG,QAAQ,KAAK,QAAQ,CAAC;IAEvC,MAAM,IAAI,GAAG;QACT,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"valueLabelStyles.js","sourceRoot":"","sources":["../../../../../src/visualizations/helpers/styles/valueLabelStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAC9B,QAAoE,EACpE,IAAoB,EACtB,EAAE;IACA,MAAM,QAAQ,GAAG,QAAQ,KAAK,QAAQ,CAAC;IAEvC,MAAM,IAAI,GAAG;QACT,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK;KAC9B,CAAC;IAEX;IACI,+GAA+G;IAC/G,QAAQ;QACR,CAAC,IAAI,KAAK,mBAAmB,CAAC,IAAI,IAAI,IAAI,KAAK,mBAAmB,CAAC,IAAI,CAAC,EAC1E,CAAC;QACC,OAAO;YACH,GAAG,IAAI;YACP,eAAe,EAAE,KAAK;YACtB,eAAe,EAAE,GAAG;YACpB,cAAc,EAAE,OAAO;SAC1B,CAAC;IACN,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC"}
|