@cloudscape-design/components 3.0.1053 → 3.0.1055
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/internal/base-component/index.d.ts +0 -1
- package/internal/base-component/index.d.ts.map +1 -1
- package/internal/base-component/index.js +1 -15
- package/internal/base-component/index.js.map +1 -1
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,6 @@ export interface BaseComponentProps {
|
|
|
15
15
|
id?: string;
|
|
16
16
|
}
|
|
17
17
|
export declare function getBaseProps(props: BaseComponentProps): BaseComponentProps;
|
|
18
|
-
export declare function validateProps(componentName: string, props: Record<string, any>, excludedProps: Array<string>, allowedEnums: Record<string, Array<string>>): void;
|
|
19
18
|
export interface BasePropsWithAnalyticsMetadata {
|
|
20
19
|
analyticsMetadata?: AnalyticsMetadata;
|
|
21
20
|
__analyticsMetadata?: AnalyticsMetadata;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/base-component/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/base-component/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAI5D,OAAO,iBAAiB,CAAC;AAIzB,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CAIb;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,kBAAkB,sBAQrD;AAED,MAAM,WAAW,8BAA8B;IAC7C,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,8BAA8B,EAChF,KAAK,CAAC,EAAE,CAAC,GACR,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAEhE"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { initAwsUiVersions } from '@cloudscape-design/component-toolkit/internal';
|
|
4
|
-
import { PACKAGE_SOURCE, PACKAGE_VERSION
|
|
5
|
-
import { isDevelopment } from '../is-development';
|
|
4
|
+
import { PACKAGE_SOURCE, PACKAGE_VERSION } from '../environment';
|
|
6
5
|
// these styles needed to be imported for every public component
|
|
7
6
|
import './styles.css.js';
|
|
8
7
|
initAwsUiVersions(PACKAGE_SOURCE, PACKAGE_VERSION);
|
|
@@ -15,19 +14,6 @@ export function getBaseProps(props) {
|
|
|
15
14
|
});
|
|
16
15
|
return baseProps;
|
|
17
16
|
}
|
|
18
|
-
export function validateProps(componentName, props, excludedProps, allowedEnums) {
|
|
19
|
-
if (!isDevelopment) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
for (const [prop, value] of Object.entries(props)) {
|
|
23
|
-
if (excludedProps.includes(prop)) {
|
|
24
|
-
throw new Error(`${componentName} does not support "${prop}" property when used in ${THEME} theme`);
|
|
25
|
-
}
|
|
26
|
-
if (value && allowedEnums[prop] && !allowedEnums[prop].includes(value)) {
|
|
27
|
-
throw new Error(`${componentName} does not support "${prop}" with value "${value}" when used in ${THEME} theme`);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
17
|
/**
|
|
32
18
|
* Helper function to merge beta analytics metadata with the public analytics metadata api.
|
|
33
19
|
* Beta analytics metadata will override the public values to allow for safe migration.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/base-component/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGlF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/base-component/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGlF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjE,gEAAgE;AAChE,OAAO,iBAAiB,CAAC;AAEzB,iBAAiB,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;AAoBnD,MAAM,UAAU,YAAY,CAAC,KAAyB;IACpD,MAAM,SAAS,GAAwB,EAAE,CAAC;IAC1C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAChC,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;YACjE,SAAS,CAAC,IAAI,CAAC,GAAI,KAA6B,CAAC,IAAI,CAAC,CAAC;SACxD;IACH,CAAC,CAAC,CAAC;IACH,OAAO,SAA+B,CAAC;AACzC,CAAC;AAOD;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAS;IAET,uCAAY,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,iBAAiB,GAAK,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,mBAAmB,EAAG;AACxE,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { initAwsUiVersions } from '@cloudscape-design/component-toolkit/internal';\n\nimport { AnalyticsMetadata } from '../analytics/interfaces';\nimport { PACKAGE_SOURCE, PACKAGE_VERSION } from '../environment';\n\n// these styles needed to be imported for every public component\nimport './styles.css.js';\n\ninitAwsUiVersions(PACKAGE_SOURCE, PACKAGE_VERSION);\n\nexport interface BaseComponentProps {\n /**\n * Adds the specified classes to the root element of the component.\n * @deprecated Custom CSS is not supported. For testing and other use cases, use [data attributes](https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes).\n */\n className?: string;\n /**\n * Adds the specified ID to the root element of the component.\n * @deprecated The usage of the `id` attribute is reserved for internal use cases. For testing and other use cases,\n * use [data attributes](https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes). If you must\n * use the `id` attribute, consider setting it on a parent element instead.\n */\n id?: string;\n // we also support data-* attributes, but they are always implicitly allowed by typescript\n // http://www.typescriptlang.org/docs/handbook/jsx.html#attribute-type-checking\n // \"Note: If an attribute name is not a valid JS identifier (like a data-* attribute), it is not considered to be an error\"\n}\n\nexport function getBaseProps(props: BaseComponentProps) {\n const baseProps: Record<string, any> = {};\n Object.keys(props).forEach(prop => {\n if (prop === 'id' || prop === 'className' || prop.match(/^data-/)) {\n baseProps[prop] = (props as Record<string, any>)[prop];\n }\n });\n return baseProps as BaseComponentProps;\n}\n\nexport interface BasePropsWithAnalyticsMetadata {\n analyticsMetadata?: AnalyticsMetadata;\n __analyticsMetadata?: AnalyticsMetadata;\n}\n\n/**\n * Helper function to merge beta analytics metadata with the public analytics metadata api.\n * Beta analytics metadata will override the public values to allow for safe migration.\n */\nexport function getAnalyticsMetadataProps<T extends BasePropsWithAnalyticsMetadata>(\n props?: T\n): NonNullable<T['analyticsMetadata'] & T['__analyticsMetadata']> {\n return { ...props?.analyticsMetadata, ...props?.__analyticsMetadata };\n}\n"]}
|
package/internal/environment.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "components";
|
|
2
|
-
export var PACKAGE_VERSION = "3.0.0 (
|
|
3
|
-
export var GIT_SHA = "
|
|
2
|
+
export var PACKAGE_VERSION = "3.0.0 (38348b21)";
|
|
3
|
+
export var GIT_SHA = "38348b21";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var SYSTEM = "console";
|
|
6
6
|
export var ALWAYS_VISUAL_REFRESH = true;
|
package/internal/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"./internal/base-component/index.js",
|
|
151
151
|
"./internal/base-component/styles.css.js"
|
|
152
152
|
],
|
|
153
|
-
"version": "3.0.
|
|
153
|
+
"version": "3.0.1055",
|
|
154
154
|
"repository": {
|
|
155
155
|
"type": "git",
|
|
156
156
|
"url": "https://github.com/cloudscape-design/components.git"
|