@babylonjs/shared-ui-components 8.22.0 → 8.22.2

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.
@@ -11,6 +11,6 @@ const useClasses = makeStyles({
11
11
  export const MessageBar = (props) => {
12
12
  const { message, title: header, intent, docLink } = props;
13
13
  const classes = useClasses();
14
- return (_jsx("div", { className: classes.container, children: _jsx(FluentMessageBar, { intent: intent, children: _jsxs(MessageBarBody, { children: [_jsx(MessageBarTitle, { children: header }), message, docLink && (_jsxs(_Fragment, { children: [" - ", _jsx(Link, { href: docLink, target: "_blank", rel: "noopener noreferrer", children: "Learn More" })] }))] }) }) }));
14
+ return (_jsx("div", { className: classes.container, children: _jsx(FluentMessageBar, { intent: intent, layout: "multiline", children: _jsxs(MessageBarBody, { children: [_jsx(MessageBarTitle, { children: header }), message, docLink && (_jsxs(_Fragment, { children: [" - ", _jsx(Link, { href: docLink, target: "_blank", rel: "noopener noreferrer", children: "Learn More" })] }))] }) }) }));
15
15
  };
16
16
  //# sourceMappingURL=messageBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"messageBar.js","sourceRoot":"","sources":["../../../../../dev/sharedUiComponents/src/fluent/primitives/messageBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEjI,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,UAAU,GAAG,UAAU,CAAC;IAC1B,SAAS,EAAE;QACP,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;QACvB,GAAG,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM;KACvC;CACJ,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,UAAU,GAAuC,CAAC,KAAK,EAAE,EAAE;IACpE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1D,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,OAAO,CACH,cAAK,SAAS,EAAE,OAAO,CAAC,SAAS,YAC7B,KAAC,gBAAgB,IAAC,MAAM,EAAE,MAAM,YAC5B,MAAC,cAAc,eACX,KAAC,eAAe,cAAE,MAAM,GAAmB,EAC1C,OAAO,EACP,OAAO,IAAI,CACR,8BACK,KAAK,EACN,KAAC,IAAI,IAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,2BAEvD,IACR,CACN,IACY,GACF,GACjB,CACT,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { MessageBar as FluentMessageBar, MessageBarTitle, MessageBarBody, makeStyles, tokens } from \"@fluentui/react-components\";\r\nimport type { FunctionComponent } from \"react\";\r\nimport { Link } from \"./link\";\r\n\r\nconst useClasses = makeStyles({\r\n container: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n gap: tokens.spacingVerticalS, // 8px\r\n },\r\n});\r\n\r\ntype MessageBarProps = {\r\n message: string;\r\n title: string;\r\n docLink?: string;\r\n intent: \"info\" | \"success\" | \"warning\" | \"error\";\r\n};\r\nexport const MessageBar: FunctionComponent<MessageBarProps> = (props) => {\r\n const { message, title: header, intent, docLink } = props;\r\n const classes = useClasses();\r\n\r\n return (\r\n <div className={classes.container}>\r\n <FluentMessageBar intent={intent}>\r\n <MessageBarBody>\r\n <MessageBarTitle>{header}</MessageBarTitle>\r\n {message}\r\n {docLink && (\r\n <>\r\n {\" - \"}\r\n <Link href={docLink} target=\"_blank\" rel=\"noopener noreferrer\">\r\n Learn More\r\n </Link>\r\n </>\r\n )}\r\n </MessageBarBody>\r\n </FluentMessageBar>\r\n </div>\r\n );\r\n};\r\n"]}
1
+ {"version":3,"file":"messageBar.js","sourceRoot":"","sources":["../../../../../dev/sharedUiComponents/src/fluent/primitives/messageBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEjI,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,UAAU,GAAG,UAAU,CAAC;IAC1B,SAAS,EAAE;QACP,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;QACvB,GAAG,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM;KACvC;CACJ,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,UAAU,GAAuC,CAAC,KAAK,EAAE,EAAE;IACpE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1D,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,OAAO,CACH,cAAK,SAAS,EAAE,OAAO,CAAC,SAAS,YAC7B,KAAC,gBAAgB,IAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAC,WAAW,YAChD,MAAC,cAAc,eACX,KAAC,eAAe,cAAE,MAAM,GAAmB,EAC1C,OAAO,EACP,OAAO,IAAI,CACR,8BACK,KAAK,EACN,KAAC,IAAI,IAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,2BAEvD,IACR,CACN,IACY,GACF,GACjB,CACT,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { MessageBar as FluentMessageBar, MessageBarTitle, MessageBarBody, makeStyles, tokens } from \"@fluentui/react-components\";\r\nimport type { FunctionComponent } from \"react\";\r\nimport { Link } from \"./link\";\r\n\r\nconst useClasses = makeStyles({\r\n container: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n gap: tokens.spacingVerticalS, // 8px\r\n },\r\n});\r\n\r\ntype MessageBarProps = {\r\n message: string;\r\n title: string;\r\n docLink?: string;\r\n intent: \"info\" | \"success\" | \"warning\" | \"error\";\r\n};\r\nexport const MessageBar: FunctionComponent<MessageBarProps> = (props) => {\r\n const { message, title: header, intent, docLink } = props;\r\n const classes = useClasses();\r\n\r\n return (\r\n <div className={classes.container}>\r\n <FluentMessageBar intent={intent} layout=\"multiline\">\r\n <MessageBarBody>\r\n <MessageBarTitle>{header}</MessageBarTitle>\r\n {message}\r\n {docLink && (\r\n <>\r\n {\" - \"}\r\n <Link href={docLink} target=\"_blank\" rel=\"noopener noreferrer\">\r\n Learn More\r\n </Link>\r\n </>\r\n )}\r\n </MessageBarBody>\r\n </FluentMessageBar>\r\n </div>\r\n );\r\n};\r\n"]}
@@ -9,6 +9,12 @@ export function ForceRebuild(source, stateManager, propertyName, notifiers) {
9
9
  if (notifiers?.onValidation && !notifiers?.onValidation(source, propertyName)) {
10
10
  return;
11
11
  }
12
+ if (stateManager.getScene) {
13
+ const rebuild = notifiers?.callback?.(stateManager.getScene(), source) ?? false;
14
+ if (rebuild) {
15
+ stateManager.onRebuildRequiredObservable.notifyObservers();
16
+ }
17
+ }
12
18
  if (!notifiers || notifiers.update) {
13
19
  stateManager.onUpdateRequiredObservable.notifyObservers(source);
14
20
  }
@@ -18,11 +24,5 @@ export function ForceRebuild(source, stateManager, propertyName, notifiers) {
18
24
  if (notifiers?.activatePreviewCommand) {
19
25
  stateManager.onPreviewCommandActivated.notifyObservers(true);
20
26
  }
21
- if (stateManager.getScene) {
22
- const rebuild = notifiers?.callback?.(stateManager.getScene(), source) ?? false;
23
- if (rebuild) {
24
- stateManager.onRebuildRequiredObservable.notifyObservers();
25
- }
26
- }
27
27
  }
28
28
  //# sourceMappingURL=automaticProperties.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"automaticProperties.js","sourceRoot":"","sources":["../../../../dev/sharedUiComponents/src/nodeGraphSystem/automaticProperties.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,MAAW,EAAE,YAA0B,EAAE,YAAoB,EAAE,SAAgD;IACxI,IAAI,SAAS,EAAE,YAAY,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC;QAC5E,OAAO;IACX,CAAC;IAED,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;QACjC,YAAY,CAAC,0BAA0B,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IACpE,CAAC;IAED,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;QAClC,YAAY,CAAC,2BAA2B,CAAC,eAAe,EAAE,CAAC;IAC/D,CAAC;IAED,IAAI,SAAS,EAAE,sBAAsB,EAAE,CAAC;QACpC,YAAY,CAAC,yBAAyB,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACjE,CAAC;IAED,IAAI,YAAY,CAAC,QAAQ,EAAE,CAAC;QACxB,MAAM,OAAO,GAAG,SAAS,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,IAAI,KAAK,CAAC;QAEhF,IAAI,OAAO,EAAE,CAAC;YACV,YAAY,CAAC,2BAA2B,CAAC,eAAe,EAAE,CAAC;QAC/D,CAAC;IACL,CAAC;AACL,CAAC","sourcesContent":["import type { IEditablePropertyOption } from \"core/Decorators/nodeDecorator\";\r\nimport type { StateManager } from \"./stateManager\";\r\n\r\n/**\r\n * Function used to force a rebuild of the node system\r\n * @param source source object\r\n * @param stateManager defines the state manager to use\r\n * @param propertyName name of the property that has been changed\r\n * @param notifiers list of notifiers to use\r\n */\r\nexport function ForceRebuild(source: any, stateManager: StateManager, propertyName: string, notifiers?: IEditablePropertyOption[\"notifiers\"]) {\r\n if (notifiers?.onValidation && !notifiers?.onValidation(source, propertyName)) {\r\n return;\r\n }\r\n\r\n if (!notifiers || notifiers.update) {\r\n stateManager.onUpdateRequiredObservable.notifyObservers(source);\r\n }\r\n\r\n if (!notifiers || notifiers.rebuild) {\r\n stateManager.onRebuildRequiredObservable.notifyObservers();\r\n }\r\n\r\n if (notifiers?.activatePreviewCommand) {\r\n stateManager.onPreviewCommandActivated.notifyObservers(true);\r\n }\r\n\r\n if (stateManager.getScene) {\r\n const rebuild = notifiers?.callback?.(stateManager.getScene(), source) ?? false;\r\n\r\n if (rebuild) {\r\n stateManager.onRebuildRequiredObservable.notifyObservers();\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"automaticProperties.js","sourceRoot":"","sources":["../../../../dev/sharedUiComponents/src/nodeGraphSystem/automaticProperties.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,MAAW,EAAE,YAA0B,EAAE,YAAoB,EAAE,SAAgD;IACxI,IAAI,SAAS,EAAE,YAAY,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC;QAC5E,OAAO;IACX,CAAC;IAED,IAAI,YAAY,CAAC,QAAQ,EAAE,CAAC;QACxB,MAAM,OAAO,GAAG,SAAS,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,IAAI,KAAK,CAAC;QAEhF,IAAI,OAAO,EAAE,CAAC;YACV,YAAY,CAAC,2BAA2B,CAAC,eAAe,EAAE,CAAC;QAC/D,CAAC;IACL,CAAC;IAED,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;QACjC,YAAY,CAAC,0BAA0B,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IACpE,CAAC;IAED,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;QAClC,YAAY,CAAC,2BAA2B,CAAC,eAAe,EAAE,CAAC;IAC/D,CAAC;IAED,IAAI,SAAS,EAAE,sBAAsB,EAAE,CAAC;QACpC,YAAY,CAAC,yBAAyB,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACjE,CAAC;AACL,CAAC","sourcesContent":["import type { IEditablePropertyOption } from \"core/Decorators/nodeDecorator\";\r\nimport type { StateManager } from \"./stateManager\";\r\n\r\n/**\r\n * Function used to force a rebuild of the node system\r\n * @param source source object\r\n * @param stateManager defines the state manager to use\r\n * @param propertyName name of the property that has been changed\r\n * @param notifiers list of notifiers to use\r\n */\r\nexport function ForceRebuild(source: any, stateManager: StateManager, propertyName: string, notifiers?: IEditablePropertyOption[\"notifiers\"]) {\r\n if (notifiers?.onValidation && !notifiers?.onValidation(source, propertyName)) {\r\n return;\r\n }\r\n\r\n if (stateManager.getScene) {\r\n const rebuild = notifiers?.callback?.(stateManager.getScene(), source) ?? false;\r\n\r\n if (rebuild) {\r\n stateManager.onRebuildRequiredObservable.notifyObservers();\r\n }\r\n }\r\n\r\n if (!notifiers || notifiers.update) {\r\n stateManager.onUpdateRequiredObservable.notifyObservers(source);\r\n }\r\n\r\n if (!notifiers || notifiers.rebuild) {\r\n stateManager.onRebuildRequiredObservable.notifyObservers();\r\n }\r\n\r\n if (notifiers?.activatePreviewCommand) {\r\n stateManager.onPreviewCommandActivated.notifyObservers(true);\r\n }\r\n}\r\n"]}
@@ -39,6 +39,7 @@ export interface IPortData {
39
39
  isExposedOnFrame: boolean;
40
40
  exposedPortPosition: number;
41
41
  isConnected: boolean;
42
+ isInactive: boolean;
42
43
  direction: PortDataDirection;
43
44
  ownerData: any;
44
45
  connectedPort: Nullable<IPortData>;
@@ -1 +1 @@
1
- {"version":3,"file":"portData.js","sourceRoot":"","sources":["../../../../../dev/sharedUiComponents/src/nodeGraphSystem/interfaces/portData.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IACzB,YAAY;IACZ,2DAAK,CAAA;IACL,aAAa;IACb,6DAAM,CAAA;AACV,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAED,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC5B,iEAAK,CAAA;IACL,6DAAG,CAAA;AACP,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport type { GraphNode } from \"../graphNode\";\r\n\r\nexport enum PortDataDirection {\r\n /** Input */\r\n Input,\r\n /** Output */\r\n Output,\r\n}\r\n\r\nexport enum PortDirectValueTypes {\r\n Float,\r\n Int,\r\n}\r\n\r\nexport interface IPortDirectValueDefinition {\r\n /**\r\n * Gets the source object\r\n */\r\n source: any;\r\n /**\r\n * Gets the property name used to store the value\r\n */\r\n propertyName: string;\r\n\r\n /**\r\n * Gets or sets the min value accepted for this point if nothing is connected\r\n */\r\n valueMin: Nullable<any>;\r\n\r\n /**\r\n * Gets or sets the max value accepted for this point if nothing is connected\r\n */\r\n valueMax: Nullable<any>;\r\n\r\n /**\r\n * Gets or sets the type of the value\r\n */\r\n valueType: PortDirectValueTypes;\r\n}\r\n\r\nexport interface IPortData {\r\n data: any;\r\n name: string;\r\n internalName: string;\r\n isExposedOnFrame: boolean;\r\n exposedPortPosition: number;\r\n isConnected: boolean;\r\n direction: PortDataDirection;\r\n ownerData: any;\r\n connectedPort: Nullable<IPortData>;\r\n needDualDirectionValidation: boolean;\r\n hasEndpoints: boolean;\r\n endpoints: Nullable<IPortData[]>;\r\n directValueDefinition?: IPortDirectValueDefinition;\r\n\r\n updateDisplayName: (newName: string) => void;\r\n canConnectTo: (port: IPortData) => boolean;\r\n connectTo: (port: IPortData) => void;\r\n disconnectFrom: (port: IPortData) => void;\r\n checkCompatibilityState(port: IPortData): number;\r\n getCompatibilityIssueMessage(issue: number, targetNode: GraphNode, targetPort: IPortData): string;\r\n}\r\n"]}
1
+ {"version":3,"file":"portData.js","sourceRoot":"","sources":["../../../../../dev/sharedUiComponents/src/nodeGraphSystem/interfaces/portData.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IACzB,YAAY;IACZ,2DAAK,CAAA;IACL,aAAa;IACb,6DAAM,CAAA;AACV,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAED,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC5B,iEAAK,CAAA;IACL,6DAAG,CAAA;AACP,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport type { GraphNode } from \"../graphNode\";\r\n\r\nexport enum PortDataDirection {\r\n /** Input */\r\n Input,\r\n /** Output */\r\n Output,\r\n}\r\n\r\nexport enum PortDirectValueTypes {\r\n Float,\r\n Int,\r\n}\r\n\r\nexport interface IPortDirectValueDefinition {\r\n /**\r\n * Gets the source object\r\n */\r\n source: any;\r\n /**\r\n * Gets the property name used to store the value\r\n */\r\n propertyName: string;\r\n\r\n /**\r\n * Gets or sets the min value accepted for this point if nothing is connected\r\n */\r\n valueMin: Nullable<any>;\r\n\r\n /**\r\n * Gets or sets the max value accepted for this point if nothing is connected\r\n */\r\n valueMax: Nullable<any>;\r\n\r\n /**\r\n * Gets or sets the type of the value\r\n */\r\n valueType: PortDirectValueTypes;\r\n}\r\n\r\nexport interface IPortData {\r\n data: any;\r\n name: string;\r\n internalName: string;\r\n isExposedOnFrame: boolean;\r\n exposedPortPosition: number;\r\n isConnected: boolean;\r\n isInactive: boolean;\r\n direction: PortDataDirection;\r\n ownerData: any;\r\n connectedPort: Nullable<IPortData>;\r\n needDualDirectionValidation: boolean;\r\n hasEndpoints: boolean;\r\n endpoints: Nullable<IPortData[]>;\r\n directValueDefinition?: IPortDirectValueDefinition;\r\n\r\n updateDisplayName: (newName: string) => void;\r\n canConnectTo: (port: IPortData) => boolean;\r\n connectTo: (port: IPortData) => void;\r\n disconnectFrom: (port: IPortData) => void;\r\n checkCompatibilityState(port: IPortData): number;\r\n getCompatibilityIssueMessage(issue: number, targetNode: GraphNode, targetPort: IPortData): string;\r\n}\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/shared-ui-components",
3
- "version": "8.22.0",
3
+ "version": "8.22.2",
4
4
  "main": "index.js",
5
5
  "module": "index.js",
6
6
  "types": "index.d.ts",