@itwin/imodel-components-react 4.0.0-dev.1 → 4.0.0-dev.11

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 (114) hide show
  1. package/CHANGELOG.md +1 -91
  2. package/lib/cjs/imodel-components-react/UiIModelComponents.d.ts +1 -1
  3. package/lib/cjs/imodel-components-react/UiIModelComponents.js +1 -1
  4. package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
  5. package/lib/cjs/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
  6. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +3 -2
  7. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  8. package/lib/cjs/imodel-components-react/color/ColorPickerButton.scss +19 -21
  9. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.d.ts +2 -2
  10. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js +1 -1
  11. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.js.map +1 -1
  12. package/lib/cjs/imodel-components-react/color/ColorPickerPanel.scss +2 -2
  13. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
  14. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js +5 -3
  15. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  16. package/lib/cjs/imodel-components-react/color/ColorPickerPopup.scss +15 -17
  17. package/lib/cjs/imodel-components-react/color/Swatch.scss +5 -7
  18. package/lib/cjs/imodel-components-react/editors/ColorEditor.scss +4 -5
  19. package/lib/cjs/imodel-components-react/editors/WeightEditor.scss +4 -5
  20. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  21. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +5 -2
  22. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  23. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.scss +6 -7
  24. package/lib/cjs/imodel-components-react/lineweight/Swatch.scss +7 -8
  25. package/lib/cjs/imodel-components-react/lineweight/WeightPickerButton.scss +12 -13
  26. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +3 -3
  27. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  28. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +14 -10
  29. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  30. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.scss +18 -21
  31. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
  32. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +10 -4
  33. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  34. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.scss +9 -8
  35. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +11 -13
  36. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
  37. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +3 -2
  38. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  39. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
  40. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js +10 -19
  41. package/lib/cjs/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  42. package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +2 -2
  43. package/lib/cjs/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
  44. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js +7 -3
  45. package/lib/cjs/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  46. package/lib/cjs/imodel-components-react/timeline/PlayerButton.scss +11 -9
  47. package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +13 -15
  48. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  49. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +8 -4
  50. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  51. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +49 -48
  52. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  53. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +13 -6
  54. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  55. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +23 -26
  56. package/lib/cjs/imodel-components-react/timeline/interfaces.d.ts +1 -1
  57. package/lib/cjs/imodel-components-react/timeline/interfaces.js.map +1 -1
  58. package/lib/esm/imodel-components-react/UiIModelComponents.d.ts +1 -1
  59. package/lib/esm/imodel-components-react/UiIModelComponents.js +1 -1
  60. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
  61. package/lib/esm/imodel-components-react/color/ColorPickerButton.d.ts.map +1 -1
  62. package/lib/esm/imodel-components-react/color/ColorPickerButton.js +4 -3
  63. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  64. package/lib/esm/imodel-components-react/color/ColorPickerButton.scss +19 -21
  65. package/lib/esm/imodel-components-react/color/ColorPickerPanel.d.ts +2 -2
  66. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js +1 -1
  67. package/lib/esm/imodel-components-react/color/ColorPickerPanel.js.map +1 -1
  68. package/lib/esm/imodel-components-react/color/ColorPickerPanel.scss +2 -2
  69. package/lib/esm/imodel-components-react/color/ColorPickerPopup.d.ts.map +1 -1
  70. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js +6 -4
  71. package/lib/esm/imodel-components-react/color/ColorPickerPopup.js.map +1 -1
  72. package/lib/esm/imodel-components-react/color/ColorPickerPopup.scss +15 -17
  73. package/lib/esm/imodel-components-react/color/Swatch.scss +5 -7
  74. package/lib/esm/imodel-components-react/editors/ColorEditor.scss +4 -5
  75. package/lib/esm/imodel-components-react/editors/WeightEditor.scss +4 -5
  76. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  77. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +6 -3
  78. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  79. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.scss +6 -7
  80. package/lib/esm/imodel-components-react/lineweight/Swatch.scss +7 -8
  81. package/lib/esm/imodel-components-react/lineweight/WeightPickerButton.scss +12 -13
  82. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts +3 -3
  83. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.d.ts.map +1 -1
  84. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +14 -10
  85. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  86. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.scss +18 -21
  87. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.d.ts.map +1 -1
  88. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +10 -4
  89. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  90. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.scss +9 -8
  91. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +11 -13
  92. package/lib/esm/imodel-components-react/quantityformat/FormatSample.d.ts.map +1 -1
  93. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +4 -3
  94. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  95. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.d.ts.map +1 -1
  96. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js +11 -20
  97. package/lib/esm/imodel-components-react/quantityformat/QuantityFormatPanel.js.map +1 -1
  98. package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +2 -2
  99. package/lib/esm/imodel-components-react/timeline/PlayerButton.d.ts.map +1 -1
  100. package/lib/esm/imodel-components-react/timeline/PlayerButton.js +7 -3
  101. package/lib/esm/imodel-components-react/timeline/PlayerButton.js.map +1 -1
  102. package/lib/esm/imodel-components-react/timeline/PlayerButton.scss +11 -9
  103. package/lib/esm/imodel-components-react/timeline/Scrubber.scss +13 -15
  104. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  105. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +10 -6
  106. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  107. package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +49 -48
  108. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  109. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +13 -6
  110. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  111. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +23 -26
  112. package/lib/esm/imodel-components-react/timeline/interfaces.d.ts +1 -1
  113. package/lib/esm/imodel-components-react/timeline/interfaces.js.map +1 -1
  114. package/package.json +35 -42
@@ -1 +1 @@
1
- {"version":3,"file":"QuantityFormatPanel.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/QuantityFormatPanel.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,wDAG8B;AAE9B,kDAAwD;AACxD,wDAAuD;AACvD,+CAA4C;AAC5C,wDAAmD;AAEnD,SAAS,+BAA+B,CAAC,GAAW,EAAE,KAAa,EAAE,OAAoB,EACvF,SAAyC,EAAE,SAA6D,EAAE,gBAAiD;IAC3J,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IACjC,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,IAAC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uB,EAAE,YAAY,CAAC,CAAC,CAAC;IAE9C,MAAM,iBAAiB,GAAG,KAAK,CAAC,WAAW,CACzC,KAAK,EAAE,OAAoB,EAAE,gBAA2B,EAAE,cAA6B,EAAE,EAAE;QACzF,OAAO,yBAAS,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAErB,OAAO,CACL,6BAAK,SAAS,EAAC,yCAAyC,IACrD,eAAe,IAAI,WAAW;QAC7B,oBAAC,yBAAW,IAAC,cAAc,EAAE,qBAAqB,KAAM,UAAU,EAChE,aAAa,EAAE,WAAW,EAC1B,aAAa,EAAE,yBAAS,CAAC,iBAAiB,CAAC,aAAa,EACxD,eAAe,EAAE,eAAe,EAChC,sBAAsB,EAAE,sBAAsB,EAC9C,wBAAwB,EAAE,wBAAwB,EAClD,iBAAiB,EAAE,iBAAiB,GACpC,CACA,CACP,CAAC;AACJ,CAAC;AA3GD,kDA2GC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormat\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport {\r\n CustomFormatPropEditorSpec, getQuantityTypeKey, IModelApp, isCheckboxFormatPropEditorSpec, isCustomQuantityTypeDefinition,\r\n isTextInputFormatPropEditorSpec, isTextSelectFormatPropEditorSpec, QuantityTypeArg,\r\n} from \"@itwin/core-frontend\";\r\nimport { FormatProps, UnitProps, UnitsProvider } from \"@itwin/core-quantity\";\r\nimport { CommonProps, Select } from \"@itwin/core-react\";\r\nimport { Checkbox, Input } from \"@itwin/itwinui-react\";\r\nimport { FormatPanel } from \"./FormatPanel\";\r\nimport { DeepCompare } from \"@itwin/core-geometry\";\r\n\r\nfunction createTextInputFormatPropEditor(key: string, label: string, inProps: FormatProps,\r\n getString: (props: FormatProps) => string, setString: (props: FormatProps, value: string) => FormatProps, fireFormatChange: (newProps: FormatProps) => void) {\r\n const value = getString(inProps);\r\n return (\r\n <React.Fragment key={`${key}`}>\r\n <span key={`${key}-label`} className={\"uicore-label\"}>{label}</span>\r\n <Input data-testid={`${key}-editor`} key={`${key}-editor`}\r\n value={value}\r\n size=\"small\"\r\n onChange={(e) => {\r\n const newProps = setString(inProps, e.currentTarget.value);\r\n fireFormatChange(newProps);\r\n }}\r\n />\r\n </React.Fragment>\r\n );\r\n}\r\n\r\nfunction createSelectFormatPropEditor(key: string, label: string, options: { label: string, value: string }[], inProps: FormatProps,\r\n getString: (props: FormatProps) => string, setString: (props: FormatProps, value: string) => FormatProps, fireFormatChange: (newProps: FormatProps) => void) {\r\n const value = getString(inProps);\r\n return (\r\n <React.Fragment key={`${key}`}>\r\n <span key={`${key}-label`} className={\"uicore-label\"}>{label}</span>\r\n {/* NEEDSWORK - unable to migrate this Select to iTwinUI because no menu items were found */}\r\n {/* eslint-disable-next-line deprecation/deprecation */}\r\n <Select data-testid={`${key}-editor`} key={`${key}-editor`}\r\n value={value}\r\n options={options}\r\n onChange={(e) => {\r\n const newProps = setString(inProps, e.currentTarget.value);\r\n fireFormatChange(newProps);\r\n }}\r\n />\r\n </React.Fragment>\r\n );\r\n}\r\n\r\nfunction createCheckboxFormatPropEditor(key: string, label: string, inProps: FormatProps,\r\n getBool: (props: FormatProps) => boolean, setBool: (props: FormatProps, isChecked: boolean) => FormatProps, fireFormatChange: (newProps: FormatProps) => void) {\r\n const isChecked = getBool(inProps);\r\n return (\r\n <React.Fragment key={`${key}`}>\r\n <span key={`${key}-label`} className={\"uicore-label\"}>{label}</span>\r\n <Checkbox data-testid={`${key}-editor`} key={`${key}-editor`}\r\n checked={isChecked}\r\n onChange={(e) => {\r\n const newProps = setBool(inProps, e.target.checked);\r\n fireFormatChange(newProps);\r\n }} />\r\n </React.Fragment>\r\n );\r\n}\r\n\r\nfunction formatAreEqual(obj1: FormatProps, obj2: FormatProps) {\r\n const compare = new DeepCompare();\r\n return compare.compare(obj1, obj2);\r\n}\r\n\r\n/** Properties of [[QuantityFormatPanel]] component.\r\n * @alpha\r\n */\r\nexport interface QuantityFormatPanelProps extends CommonProps {\r\n quantityType: QuantityTypeArg;\r\n onFormatChange?: (format: FormatProps) => void;\r\n /** props below are to be passed on to FormatPanel */\r\n showSample?: boolean;\r\n initialMagnitude?: number;\r\n enableMinimumProperties?: boolean;\r\n}\r\n\r\n/** Component to set properties that control Quantity Formatting.\r\n * @alpha\r\n */\r\nexport function QuantityFormatPanel(props: QuantityFormatPanelProps) {\r\n const { quantityType, onFormatChange, ...otherProps } = props;\r\n const [formatProps, setFormatProps] = React.useState<FormatProps>();\r\n const initialFormatProps = React.useRef<FormatProps>();\r\n\r\n const [persistenceUnit, setPersistenceUnit] = React.useState(() => {\r\n const quantityTypeKey = getQuantityTypeKey(quantityType);\r\n const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\r\n // istanbul ignore else\r\n if (quantityTypeDefinition)\r\n return quantityTypeDefinition.persistenceUnit;\r\n else\r\n throw Error(`Unable to locate a quantity type with type ${quantityType}`);\r\n });\r\n\r\n React.useEffect(() => {\r\n const newFormatProps = IModelApp.quantityFormatter.getFormatPropsByQuantityType(quantityType);\r\n // istanbul ignore else\r\n if (!initialFormatProps.current)\r\n initialFormatProps.current = newFormatProps;\r\n setFormatProps(newFormatProps);\r\n }, [quantityType]); // no dependencies defined as we want this to run on every render\r\n\r\n // handle case where quantityType does not change but the formatProps for that quantity type has (ie after a Set or Clear)\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n React.useEffect(() => {\r\n const newFormatProps = IModelApp.quantityFormatter.getFormatPropsByQuantityType(quantityType);\r\n // istanbul ignore else\r\n if (initialFormatProps.current && newFormatProps) {\r\n if (!formatAreEqual(newFormatProps, initialFormatProps.current)) {\r\n initialFormatProps.current = newFormatProps;\r\n setFormatProps(newFormatProps);\r\n }\r\n }\r\n }); // no dependencies defined as we want this to run on every render\r\n\r\n React.useEffect(() => {\r\n const quantityTypeKey = getQuantityTypeKey(quantityType);\r\n const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\r\n // istanbul ignore else\r\n if (quantityTypeDefinition)\r\n setPersistenceUnit(quantityTypeDefinition.persistenceUnit);\r\n }, [quantityType]);\r\n\r\n const handleOnFormatChanged = React.useCallback(async (newProps: FormatProps) => {\r\n setFormatProps(newProps);\r\n onFormatChange && onFormatChange(newProps);\r\n }, [onFormatChange]);\r\n\r\n const createCustomPropEditors = React.useCallback((specs: CustomFormatPropEditorSpec[], inProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => {\r\n return specs.map((spec, index) => {\r\n if (isCheckboxFormatPropEditorSpec(spec))\r\n return createCheckboxFormatPropEditor(`${spec.editorType}-${index}`, spec.label, inProps, spec.getBool, spec.setBool, fireFormatChange);\r\n if (isTextSelectFormatPropEditorSpec(spec))\r\n return createSelectFormatPropEditor(`${spec.editorType}-${index}`, spec.label, spec.selectOptions, inProps, spec.getString, spec.setString, fireFormatChange);\r\n /* istanbul ignore else */\r\n if (isTextInputFormatPropEditorSpec(spec))\r\n return createTextInputFormatPropEditor(`${spec.editorType}-${index}`, spec.label, inProps, spec.getString, spec.setString, fireFormatChange);\r\n /* istanbul ignore next */\r\n return <div key={index} />;\r\n });\r\n }, []);\r\n\r\n const providePrimaryChildren = React.useCallback(\r\n (inProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => {\r\n const quantityTypeKey = getQuantityTypeKey(quantityType);\r\n const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\r\n if (quantityTypeDefinition && isCustomQuantityTypeDefinition(quantityTypeDefinition) &&\r\n quantityTypeDefinition.isCompatibleFormatProps(inProps)) {\r\n // istanbul ignore else\r\n if (quantityTypeDefinition.primaryPropEditorSpecs)\r\n return createCustomPropEditors(quantityTypeDefinition.primaryPropEditorSpecs, inProps, fireFormatChange);\r\n }\r\n return null;\r\n }, [createCustomPropEditors, quantityType]);\r\n\r\n const provideSecondaryChildren = React.useCallback(\r\n (inProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => {\r\n const quantityTypeKey = getQuantityTypeKey(quantityType);\r\n const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\r\n if (quantityTypeDefinition && isCustomQuantityTypeDefinition(quantityTypeDefinition) &&\r\n quantityTypeDefinition.isCompatibleFormatProps(inProps)) {\r\n // istanbul ignore else\r\n if (quantityTypeDefinition.secondaryPropEditorSpecs)\r\n return createCustomPropEditors(quantityTypeDefinition.secondaryPropEditorSpecs, inProps, fireFormatChange);\r\n }\r\n return null;\r\n }, [createCustomPropEditors, quantityType]);\r\n\r\n const provideFormatSpec = React.useCallback(\r\n async (inProps: FormatProps, _persistenceUnit: UnitProps, _unitsProvider: UnitsProvider) => {\r\n return IModelApp.quantityFormatter.generateFormatterSpecByType(quantityType, inProps);\r\n }, [quantityType]);\r\n\r\n return (\r\n <div className=\"components-quantityFormat-quantityPanel\">\r\n {persistenceUnit && formatProps &&\r\n <FormatPanel onFormatChange={handleOnFormatChanged} {...otherProps}\r\n initialFormat={formatProps}\r\n unitsProvider={IModelApp.quantityFormatter.unitsProvider}\r\n persistenceUnit={persistenceUnit}\r\n providePrimaryChildren={providePrimaryChildren}\r\n provideSecondaryChildren={provideSecondaryChildren}\r\n provideFormatSpec={provideFormatSpec}\r\n />}\r\n </div>\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"QuantityFormatPanel.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/quantityformat/QuantityFormatPanel.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,wDAG8B;AAG9B,wDAA+D;AAC/D,+CAA4C;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AE,EAAE;QACzF,OAAO,yBAAS,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAErB,OAAO,CACL,6BAAK,SAAS,EAAC,yCAAyC,IACrD,eAAe,IAAI,WAAW;QAC7B,oBAAC,yBAAW,IAAC,cAAc,EAAE,qBAAqB,KAAM,UAAU,EAChE,aAAa,EAAE,WAAW,EAC1B,aAAa,EAAE,yBAAS,CAAC,iBAAiB,CAAC,aAAa,EACxD,eAAe,EAAE,eAAe,EAChC,sBAAsB,EAAE,sBAAsB,EAC9C,wBAAwB,EAAE,wBAAwB,EAClD,iBAAiB,EAAE,iBAAiB,GACpC,CACA,CACP,CAAC;AACJ,CAAC;AAlGD,kDAkGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormat\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport {\r\n CustomFormatPropEditorSpec, getQuantityTypeKey, IModelApp, isCheckboxFormatPropEditorSpec, isCustomQuantityTypeDefinition,\r\n isTextInputFormatPropEditorSpec, isTextSelectFormatPropEditorSpec, QuantityTypeArg,\r\n} from \"@itwin/core-frontend\";\r\nimport { FormatProps, UnitProps, UnitsProvider } from \"@itwin/core-quantity\";\r\nimport { CommonProps } from \"@itwin/core-react\";\r\nimport { Checkbox, Input, Select } from \"@itwin/itwinui-react\";\r\nimport { FormatPanel } from \"./FormatPanel\";\r\nimport { DeepCompare } from \"@itwin/core-geometry\";\r\n\r\nfunction createTextInputFormatPropEditor(key: string, label: string, inProps: FormatProps,\r\n getString: (props: FormatProps) => string, setString: (props: FormatProps, value: string) => FormatProps, fireFormatChange: (newProps: FormatProps) => void) {\r\n const value = getString(inProps);\r\n return (\r\n <React.Fragment key={`${key}`}>\r\n <span key={`${key}-label`} className={\"uicore-label\"}>{label}</span>\r\n <Input data-testid={`${key}-editor`} key={`${key}-editor`}\r\n value={value}\r\n size=\"small\"\r\n onChange={(e) => {\r\n const newProps = setString(inProps, e.currentTarget.value);\r\n fireFormatChange(newProps);\r\n }}\r\n />\r\n </React.Fragment>\r\n );\r\n}\r\nfunction createSelectFormatPropEditor(key: string, label: string, options: { label: string, value: string }[], inProps: FormatProps,\r\n getString: (props: FormatProps) => string, setString: (props: FormatProps, value: string) => FormatProps, fireFormatChange: (newProps: FormatProps) => void) {\r\n const value = getString(inProps);\r\n return (\r\n <React.Fragment key={`${key}`}>\r\n <span key={`${key}-label`} className={\"uicore-label\"}>{label}</span>\r\n <Select data-testid={`${key}-editor`} key={`${key}-editor`}\r\n value={value}\r\n options={options}\r\n size={\"small\"}\r\n onChange={(newValue) => {\r\n const newProps = setString(inProps, newValue);\r\n fireFormatChange(newProps);\r\n }}\r\n />\r\n </React.Fragment>\r\n );\r\n}\r\n\r\nfunction createCheckboxFormatPropEditor(key: string, label: string, inProps: FormatProps,\r\n getBool: (props: FormatProps) => boolean, setBool: (props: FormatProps, isChecked: boolean) => FormatProps, fireFormatChange: (newProps: FormatProps) => void) {\r\n const isChecked = getBool(inProps);\r\n return (\r\n <React.Fragment key={`${key}`}>\r\n <span key={`${key}-label`} className={\"uicore-label\"}>{label}</span>\r\n <Checkbox data-testid={`${key}-editor`} key={`${key}-editor`}\r\n checked={isChecked}\r\n onChange={(e) => {\r\n const newProps = setBool(inProps, e.target.checked);\r\n fireFormatChange(newProps);\r\n }} />\r\n </React.Fragment>\r\n );\r\n}\r\n\r\nfunction formatAreEqual(obj1: FormatProps, obj2: FormatProps) {\r\n const compare = new DeepCompare();\r\n return compare.compare(obj1, obj2);\r\n}\r\n\r\n/** Properties of [[QuantityFormatPanel]] component.\r\n * @alpha\r\n */\r\nexport interface QuantityFormatPanelProps extends CommonProps {\r\n quantityType: QuantityTypeArg;\r\n onFormatChange?: (format: FormatProps) => void;\r\n /** props below are to be passed on to FormatPanel */\r\n showSample?: boolean;\r\n initialMagnitude?: number;\r\n enableMinimumProperties?: boolean;\r\n}\r\n\r\n/** Component to set properties that control Quantity Formatting.\r\n * @alpha\r\n */\r\nexport function QuantityFormatPanel(props: QuantityFormatPanelProps) {\r\n const { quantityType, onFormatChange, ...otherProps } = props;\r\n const [formatProps, setFormatProps] = React.useState<FormatProps>();\r\n const initialFormatProps = React.useRef<FormatProps>();\r\n\r\n const [persistenceUnit, setPersistenceUnit] = React.useState<UnitProps>();\r\n\r\n React.useEffect(() => {\r\n const newFormatProps = IModelApp.quantityFormatter.getFormatPropsByQuantityType(quantityType);\r\n // istanbul ignore else\r\n if (!initialFormatProps.current)\r\n initialFormatProps.current = newFormatProps;\r\n setFormatProps(newFormatProps);\r\n const quantityTypeKey = getQuantityTypeKey(quantityType);\r\n const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\r\n // istanbul ignore else\r\n if (quantityTypeDefinition)\r\n setPersistenceUnit(quantityTypeDefinition.persistenceUnit);\r\n else\r\n throw Error(`Unable to locate a quantity type with type ${quantityType}`);\r\n }, [quantityType]); // no dependencies defined as we want this to run on every render\r\n\r\n // handle case where quantityType does not change but the formatProps for that quantity type has (ie after a Set or Clear)\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n React.useEffect(() => {\r\n const newFormatProps = IModelApp.quantityFormatter.getFormatPropsByQuantityType(quantityType);\r\n // istanbul ignore else\r\n if (initialFormatProps.current && newFormatProps) {\r\n if (!formatAreEqual(newFormatProps, initialFormatProps.current)) {\r\n initialFormatProps.current = newFormatProps;\r\n setFormatProps(newFormatProps);\r\n }\r\n }\r\n }); // no dependencies defined as we want this to run on every render\r\n\r\n const handleOnFormatChanged = React.useCallback(async (newProps: FormatProps) => {\r\n setFormatProps(newProps);\r\n onFormatChange && onFormatChange(newProps);\r\n }, [onFormatChange]);\r\n\r\n const createCustomPropEditors = React.useCallback((specs: CustomFormatPropEditorSpec[], inProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => {\r\n return specs.map((spec, index) => {\r\n if (isCheckboxFormatPropEditorSpec(spec))\r\n return createCheckboxFormatPropEditor(`${spec.editorType}-${index}`, spec.label, inProps, spec.getBool, spec.setBool, fireFormatChange);\r\n if (isTextSelectFormatPropEditorSpec(spec))\r\n return createSelectFormatPropEditor(`${spec.editorType}-${index}`, spec.label, spec.selectOptions, inProps, spec.getString, spec.setString, fireFormatChange);\r\n /* istanbul ignore else */\r\n if (isTextInputFormatPropEditorSpec(spec))\r\n return createTextInputFormatPropEditor(`${spec.editorType}-${index}`, spec.label, inProps, spec.getString, spec.setString, fireFormatChange);\r\n /* istanbul ignore next */\r\n return <div key={index} />;\r\n });\r\n }, []);\r\n\r\n const providePrimaryChildren = React.useCallback(\r\n (inProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => {\r\n const quantityTypeKey = getQuantityTypeKey(quantityType);\r\n const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\r\n if (quantityTypeDefinition && isCustomQuantityTypeDefinition(quantityTypeDefinition) &&\r\n quantityTypeDefinition.isCompatibleFormatProps(inProps)) {\r\n // istanbul ignore else\r\n if (quantityTypeDefinition.primaryPropEditorSpecs)\r\n return createCustomPropEditors(quantityTypeDefinition.primaryPropEditorSpecs, inProps, fireFormatChange);\r\n }\r\n return null;\r\n }, [createCustomPropEditors, quantityType]);\r\n\r\n const provideSecondaryChildren = React.useCallback(\r\n (inProps: FormatProps, fireFormatChange: (newProps: FormatProps) => void) => {\r\n const quantityTypeKey = getQuantityTypeKey(quantityType);\r\n const quantityTypeDefinition = IModelApp.quantityFormatter.quantityTypesRegistry.get(quantityTypeKey);\r\n if (quantityTypeDefinition && isCustomQuantityTypeDefinition(quantityTypeDefinition) &&\r\n quantityTypeDefinition.isCompatibleFormatProps(inProps)) {\r\n // istanbul ignore else\r\n if (quantityTypeDefinition.secondaryPropEditorSpecs)\r\n return createCustomPropEditors(quantityTypeDefinition.secondaryPropEditorSpecs, inProps, fireFormatChange);\r\n }\r\n return null;\r\n }, [createCustomPropEditors, quantityType]);\r\n\r\n const provideFormatSpec = React.useCallback(\r\n async (inProps: FormatProps, _persistenceUnit: UnitProps, _unitsProvider: UnitsProvider) => {\r\n return IModelApp.quantityFormatter.generateFormatterSpecByType(quantityType, inProps);\r\n }, [quantityType]);\r\n\r\n return (\r\n <div className=\"components-quantityFormat-quantityPanel\">\r\n {persistenceUnit && formatProps &&\r\n <FormatPanel onFormatChange={handleOnFormatChanged} {...otherProps}\r\n initialFormat={formatProps}\r\n unitsProvider={IModelApp.quantityFormatter.unitsProvider}\r\n persistenceUnit={persistenceUnit}\r\n providePrimaryChildren={providePrimaryChildren}\r\n provideSecondaryChildren={provideSecondaryChildren}\r\n provideFormatSpec={provideFormatSpec}\r\n />}\r\n </div>\r\n );\r\n}\r\n"]}
@@ -5,7 +5,7 @@
5
5
  @import "~@itwin/core-react/lib/cjs/core-react/style/themecolors";
6
6
 
7
7
  .inline-edit-input {
8
- color: $buic-foreground-body;
8
+ color: var(--iui-color-text);
9
9
  background: inherit;
10
10
  border: 1px solid transparent;
11
11
  box-sizing: border-box;
@@ -22,6 +22,6 @@
22
22
  background: $buic-background-1;
23
23
  border: 1px solid $buic-background-5;
24
24
  outline: none;
25
- color: $buic-foreground-activehover;
25
+ color: var(--iui-color-text-hover);
26
26
  }
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PlayerButton.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/PlayerButton.tsx"],"names":[],"mappings":"AAIA,OAAO,qBAAqB,CAAC;AAE7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC;IACxD,OAAO,CAAC,QAAQ,CAId;IAEc,MAAM;CAQvB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,eAAe;IACvB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,EAAE,eAAe,CAAC;gBAErE,KAAK,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,GAAG;IAMnD,gBAAgB;IACA,kBAAkB;IAMlC,OAAO,CAAC,QAAQ,CAcd;IAEc,MAAM;CAcvB"}
1
+ {"version":3,"file":"PlayerButton.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/PlayerButton.tsx"],"names":[],"mappings":"AAIA,OAAO,qBAAqB,CAAC;AAE7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAQ,MAAM,mBAAmB,CAAC;AAItD;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC;IACxD,OAAO,CAAC,QAAQ,CAId;IAEc,MAAM;CAQvB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,eAAe;IACvB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,EAAE,eAAe,CAAC;gBAErE,KAAK,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,GAAG;IAMnD,gBAAgB;IACA,kBAAkB;IAMlC,OAAO,CAAC,QAAQ,CAcd;IAEc,MAAM;CAcvB"}
@@ -30,7 +30,9 @@ exports.PlayButton = exports.PlayerButton = void 0;
30
30
  require("./PlayerButton.scss");
31
31
  const classnames_1 = __importDefault(require("classnames"));
32
32
  const React = __importStar(require("react"));
33
+ const core_react_1 = require("@itwin/core-react");
33
34
  const UiIModelComponents_1 = require("../UiIModelComponents");
35
+ const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
34
36
  /** Player button used by buttons on timeline control
35
37
  * @internal
36
38
  */
@@ -46,7 +48,8 @@ class PlayerButton extends React.PureComponent {
46
48
  render() {
47
49
  const { icon, title } = this.props;
48
50
  return (React.createElement("button", { "data-testid": this.props.className, className: (0, classnames_1.default)("player-button", this.props.className), onClick: this._onClick, title: title },
49
- React.createElement("span", { className: (0, classnames_1.default)("icon", !!icon) })));
51
+ React.createElement("span", { className: "icon" },
52
+ React.createElement(core_react_1.Icon, { iconSpec: icon }))));
50
53
  }
51
54
  }
52
55
  exports.PlayerButton = PlayerButton;
@@ -80,12 +83,13 @@ class PlayButton extends React.Component {
80
83
  }
81
84
  render() {
82
85
  const { tooltip } = this.props;
83
- const iconClassName = this.state.isPlaying ? "icon icon-media-controls-pause" : "icon icon-media-controls-play";
86
+ const iconSpec = this.state.isPlaying ? React.createElement(itwinui_icons_react_1.SvgPause, null) : React.createElement(itwinui_icons_react_1.SvgPlay, null);
84
87
  let title = tooltip;
85
88
  if (!title)
86
89
  title = UiIModelComponents_1.UiIModelComponents.translate(this.state.isPlaying ? "timeline.pause" : "timeline.play");
87
90
  return (React.createElement("button", { "data-testid": this.props.className, title: title, className: (0, classnames_1.default)("player-button", this.props.className), onClick: this._onClick },
88
- React.createElement("span", { className: iconClassName })));
91
+ React.createElement("span", { className: "icon", "data-testid": this.state.isPlaying ? "pause" : "play" },
92
+ React.createElement(core_react_1.Icon, { iconSpec: iconSpec, "data-testid": this.state.isPlaying ? "pause" : "play" }))));
89
93
  }
90
94
  }
91
95
  exports.PlayButton = PlayButton;
@@ -1 +1 @@
1
- {"version":3,"file":"PlayerButton.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/PlayerButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,+BAA6B;AAC7B,4DAAoC;AACpC,6CAA+B;AAE/B,8DAA2D;AAE3D;;GAEG;AACH,MAAa,YAAa,SAAQ,KAAK,CAAC,aAAkB;IAA1D;;QACU,aAAQ,GAAG,GAAG,EAAE;YACtB,uBAAuB;YACvB,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO;gBACpB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACzB,CAAC,CAAC;IAUJ,CAAC;IARiB,MAAM;QACpB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACnC,OAAO,CACL,+CAAqB,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,IAAA,oBAAU,EAAC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK;YAC3I,8BAAM,SAAS,EAAE,IAAA,oBAAU,EAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,GAAS,CAC7C,CACV,CAAC;IACJ,CAAC;CACF;AAfD,oCAeC;AAgBD;;GAEG;AACH,MAAa,UAAW,SAAQ,KAAK,CAAC,SAA6C;IAEjF,YAAY,KAAwB,EAAE,OAAa;QACjD,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAYhB,aAAQ,GAAG,GAAG,EAAE;YACtB,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;YAEzC,IAAI,CAAC,QAAQ,CAAC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S,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ;YAC3I,8BAAM,SAAS,EAAE,aAAa,GAAS,CAChC,CACV,CAAC;IACJ,CAAC;CACF;AA7CD,gCA6CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport \"./PlayerButton.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"../UiIModelComponents\";\r\n\r\n/** Player button used by buttons on timeline control\r\n * @internal\r\n */\r\nexport class PlayerButton extends React.PureComponent<any> {\r\n private _onClick = () => {\r\n // istanbul ignore else\r\n if (this.props.onClick)\r\n this.props.onClick();\r\n };\r\n\r\n public override render() {\r\n const { icon, title } = this.props;\r\n return (\r\n <button data-testid={this.props.className} className={classnames(\"player-button\", this.props.className)} onClick={this._onClick} title={title}>\r\n <span className={classnames(\"icon\", !!icon)}></span>\r\n </button>\r\n );\r\n }\r\n}\r\n\r\n/** Properties for Play/Pause button used on timeline control\r\n * @internal\r\n */\r\nexport interface PlayerButtonProps extends CommonProps {\r\n isPlaying: boolean;\r\n onPlay?: () => void;\r\n onPause?: () => void;\r\n tooltip?: string;\r\n}\r\n\r\ninterface PlayButtonState {\r\n isPlaying: boolean;\r\n}\r\n\r\n/** Play/Pause button used on timeline control\r\n * @internal\r\n */\r\nexport class PlayButton extends React.Component<PlayerButtonProps, PlayButtonState> {\r\n\r\n constructor(props: PlayerButtonProps, context?: any) {\r\n super(props, context);\r\n\r\n this.state = { isPlaying: this.props.isPlaying };\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate() {\r\n if (this.props.isPlaying !== this.state.isPlaying) {\r\n this.setState((_, props) => ({ isPlaying: props.isPlaying }));\r\n }\r\n }\r\n\r\n private _onClick = () => {\r\n const _isPlaying = !this.state.isPlaying;\r\n\r\n this.setState({ isPlaying: _isPlaying });\r\n\r\n if (_isPlaying) {\r\n // istanbul ignore else\r\n if (this.props.onPlay)\r\n this.props.onPlay();\r\n } else {\r\n // istanbul ignore else\r\n if (this.props.onPause)\r\n this.props.onPause();\r\n }\r\n };\r\n\r\n public override render() {\r\n const { tooltip } = this.props;\r\n const iconClassName = this.state.isPlaying ? \"icon icon-media-controls-pause\" : \"icon icon-media-controls-play\";\r\n let title = tooltip;\r\n\r\n if (!title)\r\n title = UiIModelComponents.translate(this.state.isPlaying ? \"timeline.pause\" : \"timeline.play\");\r\n\r\n return (\r\n <button data-testid={this.props.className} title={title} className={classnames(\"player-button\", this.props.className)} onClick={this._onClick}>\r\n <span className={iconClassName}></span>\r\n </button>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"PlayerButton.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/PlayerButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,+BAA6B;AAC7B,4DAAoC;AACpC,6CAA+B;AAC/B,kDAAsD;AACtD,8DAA2D;AAC3D,oEAA+D;AAE/D;;GAEG;AACH,MAAa,YAAa,SAAQ,KAAK,CAAC,aAAkB;IAA1D;;QACU,aAAQ,GAAG,GAAG,EAAE;YACtB,uBAAuB;YACvB,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO;gBACpB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACzB,CAAC,CAAC;IAUJ,CAAC;IARiB,MAAM;QACpB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACnC,OAAO,CACL,+CAAqB,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,IAAA,oBAAU,EAAC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,EAA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AAK,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAC,8BAAQ,OAAG,CAAC,CAAC,CAAC,oBAAC,6BAAO,OAAG,CAAC;QACnE,IAAI,KAAK,GAAG,OAAO,CAAC;QAEpB,IAAI,CAAC,KAAK;YACR,KAAK,GAAG,uCAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QAElG,OAAO,CACL,+CAAqB,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,IAAA,oBAAU,EAAC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ;YAC3I,8BAAM,SAAS,EAAC,MAAM,iBAAc,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;gBAAG,oBAAC,iBAAI,IAAC,QAAQ,EAAE,QAAQ,iBAAe,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,GAAI,CAAO,CAChK,CACV,CAAC;IACJ,CAAC;CACF;AA7CD,gCA6CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport \"./PlayerButton.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { CommonProps, Icon } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"../UiIModelComponents\";\r\nimport { SvgPause, SvgPlay } from \"@itwin/itwinui-icons-react\";\r\n\r\n/** Player button used by buttons on timeline control\r\n * @internal\r\n */\r\nexport class PlayerButton extends React.PureComponent<any> {\r\n private _onClick = () => {\r\n // istanbul ignore else\r\n if (this.props.onClick)\r\n this.props.onClick();\r\n };\r\n\r\n public override render() {\r\n const { icon, title } = this.props;\r\n return (\r\n <button data-testid={this.props.className} className={classnames(\"player-button\", this.props.className)} onClick={this._onClick} title={title}>\r\n <span className=\"icon\"><Icon iconSpec={icon} /></span>\r\n </button>\r\n );\r\n }\r\n}\r\n\r\n/** Properties for Play/Pause button used on timeline control\r\n * @internal\r\n */\r\nexport interface PlayerButtonProps extends CommonProps {\r\n isPlaying: boolean;\r\n onPlay?: () => void;\r\n onPause?: () => void;\r\n tooltip?: string;\r\n}\r\n\r\ninterface PlayButtonState {\r\n isPlaying: boolean;\r\n}\r\n\r\n/** Play/Pause button used on timeline control\r\n * @internal\r\n */\r\nexport class PlayButton extends React.Component<PlayerButtonProps, PlayButtonState> {\r\n\r\n constructor(props: PlayerButtonProps, context?: any) {\r\n super(props, context);\r\n\r\n this.state = { isPlaying: this.props.isPlaying };\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate() {\r\n if (this.props.isPlaying !== this.state.isPlaying) {\r\n this.setState((_, props) => ({ isPlaying: props.isPlaying }));\r\n }\r\n }\r\n\r\n private _onClick = () => {\r\n const _isPlaying = !this.state.isPlaying;\r\n\r\n this.setState({ isPlaying: _isPlaying });\r\n\r\n if (_isPlaying) {\r\n // istanbul ignore else\r\n if (this.props.onPlay)\r\n this.props.onPlay();\r\n } else {\r\n // istanbul ignore else\r\n if (this.props.onPause)\r\n this.props.onPause();\r\n }\r\n };\r\n\r\n public override render() {\r\n const { tooltip } = this.props;\r\n const iconSpec = this.state.isPlaying ? <SvgPause /> : <SvgPlay />;\r\n let title = tooltip;\r\n\r\n if (!title)\r\n title = UiIModelComponents.translate(this.state.isPlaying ? \"timeline.pause\" : \"timeline.play\");\r\n\r\n return (\r\n <button data-testid={this.props.className} title={title} className={classnames(\"player-button\", this.props.className)} onClick={this._onClick}>\r\n <span className=\"icon\" data-testid={this.state.isPlaying ? \"pause\" : \"play\"} ><Icon iconSpec={iconSpec} data-testid={this.state.isPlaying ? \"pause\" : \"play\"} /></span>\r\n </button>\r\n );\r\n }\r\n}\r\n"]}
@@ -2,7 +2,6 @@
2
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
- @import "~@itwin/core-react/lib/cjs/core-react/style/themecolors";
6
5
 
7
6
  .player-button {
8
7
  width: 38px;
@@ -12,15 +11,18 @@
12
11
  justify-content: center;
13
12
  font-size: 16px;
14
13
  outline: none;
15
- border-radius: 3px;
16
- border: solid 1px $buic-background-5;
17
- // background-image: linear-gradient(to bottom, $buic-background-1, $buic-background-2);
18
- background-image: linear-gradient(to bottom, $buic-background-3, $buic-background-3), linear-gradient(to bottom, $buic-background-1, $buic-background-1);
19
- color: $buic-foreground-body;
20
-
14
+ border-radius: var(--iui-border-radius-1);
15
+ border: solid 1px var(--iui-color-border-foreground);
16
+ background-color: var(--iui-color-background);
17
+ color: var(--iui-color-icon);
21
18
  cursor: pointer;
22
19
 
23
20
  &:hover {
24
- color: $buic-foreground-activehover;
21
+ color: var(--iui-color-icon-hover);
22
+ }
23
+
24
+ &:focus-visible {
25
+ outline: 1px solid var(--iui-color-border-accent);
26
+ outline-offset: -1px;
25
27
  }
26
- }
28
+ }
@@ -2,20 +2,18 @@
2
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
- @import "~@itwin/core-react/lib/cjs/core-react/style/themecolors";
6
5
  @import "~@itwin/core-react/lib/cjs/core-react/z-index";
7
-
8
6
  // the following overrides default iui-slider-thumb settings from iTwinUI
9
7
  div.components-timeline-thumb.iui-slider-thumb {
10
8
  display: flex;
11
9
  justify-content: center;
12
10
  align-items: center;
13
- background-image: linear-gradient(to bottom, $buic-background-3, $buic-background-3), linear-gradient(to bottom, $buic-background-1, $buic-background-1);
11
+ background-color: var(--iui-color-background);
14
12
  box-sizing: border-box;
15
13
  width: 38px;
16
14
  height: 20px;
17
- border-radius: 4px;
18
- border: 1px solid $buic-background-5;
15
+ border-radius: var(--iui-border-radius-1);
16
+ border: 1px solid var(--iui-color-border);
19
17
  transform: translateX(-19.2px);
20
18
  top: 4px;
21
19
  }
@@ -30,12 +28,12 @@ div.components-timeline-thumb.iui-slider-thumb {
30
28
  top: -8px;
31
29
  display: inline-block;
32
30
  transform: translateX(-50px);
33
- border-bottom: 1px dotted #222;
31
+ border-bottom: 1px dotted rgba(0, 0, 0, var(--iui-opacity-3));
34
32
  font-size: 14px;
35
33
 
36
34
  .tooltip-text {
37
35
  width: 100px;
38
- background-color: #222;
36
+ background-color: rgba(0, 0, 0, var(--iui-opacity-3));
39
37
  color: #fff;
40
38
  // opacity: 0.8;
41
39
  text-align: center;
@@ -53,7 +51,8 @@ div.components-timeline-thumb.iui-slider-thumb {
53
51
  margin-left: -5px;
54
52
  border-width: 5px;
55
53
  border-style: solid;
56
- border-color: #222 transparent transparent transparent;
54
+ border-color: rgba(0, 0, 0, var(--iui-opacity-3)) transparent
55
+ transparent transparent;
57
56
  }
58
57
  }
59
58
  }
@@ -64,19 +63,18 @@ div.components-timeline-thumb.iui-slider-thumb {
64
63
  position: absolute;
65
64
  width: 38px;
66
65
  height: 20px;
67
- border-radius: 4px;
66
+ border-radius: var(--iui-border-radius-1);
68
67
  display: flex;
69
68
  align-items: center;
70
69
  justify-content: center;
71
70
  box-sizing: border-box;
72
71
  cursor: pointer;
73
72
 
74
- >div {
73
+ > div {
75
74
  width: 1px;
76
75
  height: 10px;
77
- opacity: 0.25;
78
76
  margin: 0 1px;
79
- background-color: $buic-foreground-body;
77
+ background-color: var(--iui-color-border-subtle);
80
78
  }
81
79
  }
82
80
 
@@ -101,7 +99,7 @@ div.components-timeline-thumb.iui-slider-thumb {
101
99
  .date-marker-default {
102
100
  height: 12px;
103
101
  width: 3px;
104
- border-radius: 4px;
102
+ border-radius: var(--iui-border-radius-1);
105
103
  transform: translateY(1px);
106
- background-color: $buic-foreground-primary;
107
- }
104
+ background-color: var(--iui-color-border);
105
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"SolarTimeline.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/SolarTimeline.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAe,QAAQ,EAAY,MAAM,oBAAoB,CAAC;AAOrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAsHjD,UAAU,2BAA2B;IACnC,YAAY,EAAE,iBAAiB,CAAC;IAChC,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,2BAA2B;IACnC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,EAAE,QAAQ,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK,CAAC,aAAa,CAAC,2BAA2B,EAAE,2BAA2B,CAAC;IAC9G,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,U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AAC,aAAa,CAA0D;IAC/E,OAAO,CAAC,UAAU,CAAmD;IACrE,OAAO,CAAC,WAAW,CAAuD;IAC1E,OAAO,CAAC,cAAc,CAA0D;IAEhF,OAAO,CAAC,OAAO,CAab;IAEF,OAAO,CAAC,UAAU,CAA6C;IAC/D,OAAO,CAAC,QAAQ,CAAqC;IACrD,OAAO,CAAC,QAAQ,CAAqC;IACrD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAS5B;gBAEU,KAAK,EAAE,2BAA2B;IAgC9B,oBAAoB;IAMpC,OAAO,CAAC,gBAAgB,CAuCtB;IAEF,OAAO,CAAC,KAAK;IAab,OAAO,CAAC,QAAQ,CAiBd;IAGF,OAAO,CAAC,OAAO,CAWb;IAEF,OAAO,CAAC,wBAAwB;IAIhC;qBACiB;IACjB,OAAO,CAAC,WAAW,CAkBjB;IAEF,OAAO,CAAC,cAAc,CAkBpB;IAEF,OAAO,CAAC,iBAAiB,CAEvB;IAEF,OAAO,CAAC,gBAAgB,CAEtB;IAEF,OAAO,CAAC,qBAAqB,CAE3B;IAEF,OAAO,CAAC,oBAAoB,CAE1B;IAEF,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,SAAS,CAGf;IAEF,OAAO,CAAC,SAAS,CAGf;IAEF,OAAO,CAAC,cAAc,CAGpB;IAEF,OAAO,CAAC,aAAa,CAEnB;IAEF,OAAO,CAAC,WAAW,CASjB;IAEF,OAAO,CAAC,kBAAkB,CAExB;IAEF,OAAO,CAAC,4BAA4B,CAMlC;IAEK,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAMxB,MAAM;CAsFvB"}
@@ -47,6 +47,7 @@ const PlayerButton_1 = require("./PlayerButton");
47
47
  const SpeedTimeline_1 = require("./SpeedTimeline");
48
48
  const Scrubber_1 = require("./Scrubber");
49
49
  const UiIModelComponents_1 = require("../UiIModelComponents");
50
+ const itwinui_icons_react_1 = require("@itwin/itwinui-icons-react");
50
51
  // cSpell:ignore millisec solarsettings showticks shadowcolor solartimeline datepicker millisecs
51
52
  const millisecPerMinute = 1000 * 60;
52
53
  const millisecPerHour = millisecPerMinute * 60;
@@ -383,12 +384,13 @@ class SolarTimeline extends React.PureComponent {
383
384
  React.createElement("span", null, formattedDate),
384
385
  React.createElement("span", null, "/"),
385
386
  React.createElement("span", null, formattedTime),
386
- React.createElement("span", { className: "icon icon-calendar" })),
387
+ React.createElement("span", { className: "icon" },
388
+ React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgCalendar, null) }))),
387
389
  React.createElement(core_react_1.Popup, { style: { border: "none" }, offset: 11, target: this._datePicker, isOpen: this.state.isDateOpened, onClose: this._onCloseDayPicker, position: appui_abstract_1.RelativePosition.Top },
388
390
  React.createElement("div", { className: "components-date-picker-calendar-popup-panel", "data-testid": "components-date-picker-calendar-popup-panel" },
389
391
  React.createElement(components_react_1.DatePicker, { selected: localTime, onDateChange: this._onDayClick, showFocusOutline: false }),
390
392
  React.createElement("div", { className: "time-container" },
391
- React.createElement(core_react_1.BodyText, { className: "time-label" }, this._timeLabel),
393
+ React.createElement(itwinui_react_1.Text, { variant: "body", className: "time-label" }, this._timeLabel),
392
394
  React.createElement(components_react_1.TimeField, { time: { hours: localTime.getHours(), minutes: localTime.getMinutes(), seconds: 0 }, timeDisplay: appui_abstract_1.TimeDisplay.H12MC, onTimeChange: this._onTimeChanged })))),
393
395
  React.createElement(Timeline, { className: "solar-timeline", dayStartMs: dataProvider.dayStartMs, sunSetOffsetMs: sunSetOffsetMs, sunRiseOffsetMs: sunRiseOffsetMs, currentTimeOffsetMs: currentTimeOffsetMs, onChange: this._onChange, onUpdate: this._onUpdate, formatTime: this._formatTime, isPlaying: this.state.isPlaying }),
394
396
  React.createElement("div", { className: "speed-container" },
@@ -396,9 +398,11 @@ class SolarTimeline extends React.PureComponent {
396
398
  speed,
397
399
  "x"),
398
400
  React.createElement(SpeedTimeline_1.SpeedTimeline, { className: "speed", onChange: this._onSpeedChange, speed: this.state.speed })),
399
- React.createElement("span", { title: this._loopLabel, className: (0, classnames_1.default)("icon", "icon-media-controls-loop", !loop && "no-loop-playback", loop && "loop-playback"), onClick: this._onToggleLoop, role: "button", tabIndex: -1 }),
401
+ React.createElement("span", { title: this._loopLabel, className: (0, classnames_1.default)("icon", !loop && "no-loop-playback", loop && "loop-playback"), onClick: this._onToggleLoop, role: "button", tabIndex: -1 },
402
+ React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgLoop, null) })),
400
403
  React.createElement("button", { "data-testid": "shadow-settings-button", title: this._settingLabel, className: "shadow-settings-button", ref: (element) => this._settings = element, onClick: this._onOpenSettingsPopup },
401
- React.createElement("span", { className: "icon icon-settings" })),
404
+ React.createElement("span", { className: "icon" },
405
+ React.createElement(core_react_1.Icon, { iconSpec: React.createElement(itwinui_icons_react_1.SvgSettings, null) }))),
402
406
  React.createElement(core_react_1.Popup, { className: "shadow-settings-popup", target: this._settings, offset: 11, isOpen: this.state.isSettingsOpened, onClose: this._onCloseSettingsPopup, position: appui_abstract_1.RelativePosition.Top },
403
407
  React.createElement("div", { className: "shadow-settings-popup-container" },
404
408
  React.createElement("div", { className: "shadow-settings-header" }, this._settingsPopupTitle),
@@ -1 +1 @@
1
- {"version":3,"file":"SolarTimeline.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/SolarTimeline.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,mGAAmG;AACnG,0BAA0B;AAE1B,gCAA8B;AAC9B,4DAAoC;AACpC,6CAA+B;AAC/B,wDAAuD;AAEvD,oDAAqE;AACrE,0DAAsE;AACtE,kDAAiE;AACjE,8DAA8G;AAC9G,kDAA+C;AAC/C,gEAA6D;AAC7D,4CAA8C;AAE9C,iDAA4C;AAC5C,mDAAgD;AAChD,yCAAiG;AACjG,8DAA2D;AAE3D,gGAAgG;AAEhG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EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,kBAAkB,GAAI,CAChG,CACF,CACA,CACJ,CACF,CACP,CAAC;IACJ,CAAC;CACF;AAnYD,sCAmYC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Timeline\r\n */\r\n\r\n// component is in alpha state - it may change after usability testing - test coverage not complete\r\n/* istanbul ignore file */\r\n\r\nimport \"./SolarTimeline.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Slider, Tooltip } from \"@itwin/itwinui-react\";\r\n\r\nimport { ColorByName, ColorDef, HSVColor } from \"@itwin/core-common\";\r\nimport { RelativePosition, TimeDisplay } from \"@itwin/appui-abstract\";\r\nimport { BodyText, CommonProps, Popup } from \"@itwin/core-react\";\r\nimport { adjustDateToTimezone, DatePicker, TimeField, TimeSpec, UiComponents } from \"@itwin/components-react\";\r\nimport { HueSlider } from \"../color/HueSlider\";\r\nimport { SaturationPicker } from \"../color/SaturationPicker\";\r\nimport { ColorSwatch } from \"../color/Swatch\";\r\nimport { SolarDataProvider } from \"./interfaces\";\r\nimport { PlayButton } from \"./PlayerButton\";\r\nimport { SpeedTimeline } from \"./SpeedTimeline\";\r\nimport { CustomThumb, getPercentageOfRectangle, RailMarkers, useFocusedThumb } from \"./Scrubber\";\r\nimport { UiIModelComponents } from \"../UiIModelComponents\";\r\n\r\n// cSpell:ignore millisec solarsettings showticks shadowcolor solartimeline datepicker millisecs\r\n\r\nconst millisecPerMinute = 1000 * 60;\r\nconst millisecPerHour = millisecPerMinute * 60;\r\n// const millisecPerDay = millisecPerHour * 24;\r\nconst defaultPlaybackDuration = 40 * 1000; // 40 seconds\r\nconst addZero = (i: number) => {\r\n return (i < 10) ? `0${i}` : i;\r\n};\r\n\r\ninterface TimelineProps extends CommonProps {\r\n dayStartMs: number;\r\n sunRiseOffsetMs: number;\r\n sunSetOffsetMs: number;\r\n currentTimeOffsetMs: number;\r\n isPlaying: boolean;\r\n formatTick?: (millisec: number) => string;\r\n formatTime: (millisec: number) => string;\r\n onChange?: (values: ReadonlyArray<number>) => void;\r\n onUpdate?: (values: ReadonlyArray<number>) => void;\r\n}\r\nfunction Timeline(props: TimelineProps) {\r\n const sliderRef = React.useRef<HTMLDivElement>(null);\r\n const [sliderContainer, setSliderContainer] = React.useState<HTMLDivElement>();\r\n const [pointerPercent, setPointerPercent] = React.useState(0);\r\n\r\n React.useLayoutEffect(() => {\r\n // istanbul ignore else\r\n if (sliderRef.current) {\r\n const container = sliderRef.current.querySelector(\".iui-slider-container\");\r\n if (container && sliderContainer !== container) {\r\n setSliderContainer(container as HTMLDivElement);\r\n }\r\n }\r\n }, [sliderContainer]);\r\n\r\n const thumbProps = () => {\r\n return {\r\n className: \"components-timeline-thumb\",\r\n children: <CustomThumb />,\r\n };\r\n };\r\n\r\n const tooltipProps = React.useCallback(() => {\r\n return { visible: false };\r\n }, []);\r\n\r\n const [showRailTooltip, setShowRailTooltip] = React.useState(false);\r\n\r\n const handlePointerEnter = React.useCallback(() => {\r\n setShowRailTooltip(true);\r\n }, []);\r\n\r\n const handlePointerLeave = React.useCallback(() => {\r\n setShowRailTooltip(false);\r\n }, []);\r\n\r\n const handlePointerMove = React.useCallback((event: React.PointerEvent) => {\r\n sliderContainer &&\r\n setPointerPercent(getPercentageOfRectangle(sliderContainer.getBoundingClientRect(), event.clientX));\r\n }, [sliderContainer]);\r\n\r\n const { formatTick, formatTime, onChange, onUpdate, dayStartMs, sunSetOffsetMs, sunRiseOffsetMs, currentTimeOffsetMs, isPlaying } = props;\r\n\r\n const thumbHasFocus = useFocusedThumb(sliderContainer);\r\n\r\n const tickLabel = React.useMemo(() => {\r\n const showTip = isPlaying || showRailTooltip || thumbHasFocus;\r\n const totalDuration = sunSetOffsetMs - sunRiseOffsetMs;\r\n const percent = (isPlaying || thumbHasFocus) ? (currentTimeOffsetMs - sunRiseOffsetMs) / totalDuration : pointerPercent;\r\n const tooltipText = formatTime((isPlaying || thumbHasFocus) ? (dayStartMs + currentTimeOffsetMs) : (dayStartMs + (sunRiseOffsetMs + (pointerPercent * totalDuration))));\r\n return (<RailMarkers showToolTip={showTip} percent={percent} tooltipText={tooltipText} />);\r\n }, [isPlaying, showRailTooltip, thumbHasFocus, sunSetOffsetMs, sunRiseOffsetMs, currentTimeOffsetMs, pointerPercent, formatTime, dayStartMs]);\r\n\r\n const className = classnames(\"solar-slider\", props.className, formatTick && \"showticks\");\r\n const sunRiseFormat = formatTime(dayStartMs + sunRiseOffsetMs);\r\n const sunSetFormat = formatTime(dayStartMs + sunSetOffsetMs);\r\n return (\r\n <div className={className}>\r\n <Tooltip content={sunRiseFormat}>\r\n <span className=\"sunrise\">\r\n &#x2600;\r\n </span>\r\n </Tooltip>\r\n <Slider ref={sliderRef}\r\n className={className}\r\n step={millisecPerMinute}\r\n min={sunRiseOffsetMs}\r\n max={sunSetOffsetMs}\r\n minLabel=\"\"\r\n maxLabel=\"\"\r\n onUpdate={onUpdate}\r\n onChange={onChange}\r\n values={[currentTimeOffsetMs]}\r\n tooltipProps={tooltipProps}\r\n thumbProps={thumbProps}\r\n tickLabels={tickLabel}\r\n railContainerProps={{\r\n onPointerEnter: handlePointerEnter,\r\n onPointerMove: handlePointerMove,\r\n onPointerLeave: handlePointerLeave,\r\n }}\r\n />\r\n <Tooltip content={sunSetFormat}>\r\n <span className=\"sunset\">\r\n &#x263D;\r\n </span>\r\n </Tooltip>\r\n </div>\r\n );\r\n}\r\n\r\ninterface SolarTimelineComponentProps {\r\n dataProvider: SolarDataProvider; // provides date, sunrise, sunset in millisecs, also contains timezone offset from UTC, and updates the display style to current time.\r\n onPlayPause?: (playing: boolean) => void; // callback triggered when play/pause button is pressed\r\n duration?: number; // playback duration in milliseconds\r\n speed?: number;\r\n}\r\n\r\ninterface SolarTimelineComponentState {\r\n isPlaying: boolean; // timeline is currently playing or paused\r\n isDateOpened: boolean; // date picker is opened\r\n isSettingsOpened: boolean; // settings popup is opened\r\n dayStartMs: number;\r\n sunRiseOffsetMs: number;\r\n sunSetOffsetMs: number;\r\n sunDeltaMs: number;\r\n currentTimeOffsetMs: number;\r\n speed: number;\r\n loop: boolean;\r\n shadowColor: ColorDef;\r\n duration: number; // playback duration in milliseconds\r\n adjustedDuration: number; // playback duration in milliseconds/ speed\r\n}\r\n\r\n/** Solar Timeline\r\n * @alpha\r\n */\r\nexport class SolarTimeline extends React.PureComponent<SolarTimelineComponentProps, SolarTimelineComponentState> {\r\n private _datePicker: HTMLElement | null = null;\r\n private _settings: HTMLElement | null = null;\r\n private _requestFrame = 0;\r\n private _unmounted = false;\r\n private _timeLastCycle = 0;\r\n private _totalPlayTime = 0;\r\n private _settingsPopupTitle = UiIModelComponents.translate(\"solarsettings.shadowcolor\");\r\n private _playLabel = UiIModelComponents.translate(\"solartimeline.play\");\r\n private _settingLabel = UiIModelComponents.translate(\"solartimeline.settings\");\r\n private _loopLabel = UiIModelComponents.translate(\"timeline.repeat\");\r\n private _speedLabel = UiIModelComponents.translate(\"solartimeline.speed\");\r\n private _dateTimeLabel = UiIModelComponents.translate(\"solartimeline.dateTime\");\r\n\r\n private _months = [\r\n UiComponents.translate(\"month.short.january\"),\r\n UiComponents.translate(\"month.short.february\"),\r\n UiComponents.translate(\"month.short.march\"),\r\n UiComponents.translate(\"month.short.april\"),\r\n UiComponents.translate(\"month.short.may\"),\r\n UiComponents.translate(\"month.short.june\"),\r\n UiComponents.translate(\"month.short.july\"),\r\n UiComponents.translate(\"month.short.august\"),\r\n UiComponents.translate(\"month.short.september\"),\r\n UiComponents.translate(\"month.short.october\"),\r\n UiComponents.translate(\"month.short.november\"),\r\n UiComponents.translate(\"month.short.december\"),\r\n ];\r\n\r\n private _timeLabel = UiComponents.translate(\"datepicker.time\");\r\n private _amLabel = UiComponents.translate(\"time.am\");\r\n private _pmLabel = UiComponents.translate(\"time.pm\");\r\n private readonly _presetColors = [\r\n ColorDef.create(ColorByName.grey),\r\n ColorDef.create(ColorByName.lightGrey),\r\n ColorDef.create(ColorByName.darkGrey),\r\n ColorDef.create(ColorByName.lightBlue),\r\n ColorDef.create(ColorByName.lightGreen),\r\n ColorDef.create(ColorByName.darkGreen),\r\n ColorDef.create(ColorByName.tan),\r\n ColorDef.create(ColorByName.darkBrown),\r\n ];\r\n\r\n constructor(props: SolarTimelineComponentProps) {\r\n super(props);\r\n\r\n const dayStartMs = this.props.dataProvider.dayStartMs;\r\n const sunRiseOffsetMs = this.props.dataProvider.sunrise.getTime() - dayStartMs;\r\n const sunSetOffsetMs = this.props.dataProvider.sunset.getTime() - dayStartMs;\r\n const sunDeltaMs = sunSetOffsetMs - sunRiseOffsetMs;\r\n const sunOffsetMs = this.props.dataProvider.timeOfDay.getTime() - dayStartMs;\r\n const currentTimeOffsetMs = this.ensureRange(sunOffsetMs, sunRiseOffsetMs, sunSetOffsetMs);\r\n const shadowColor = this.props.dataProvider.shadowColor;\r\n const duration = this.props.duration ? this.props.duration : defaultPlaybackDuration;\r\n const speed = this.props.speed ? this.props.speed : 2;\r\n const adjustedDuration = duration / speed;\r\n this.setPlaybackTimeBySunTime(currentTimeOffsetMs, sunRiseOffsetMs, sunDeltaMs, adjustedDuration);\r\n\r\n this.state = {\r\n isDateOpened: false,\r\n isSettingsOpened: false,\r\n isPlaying: false,\r\n dayStartMs,\r\n sunRiseOffsetMs,\r\n sunSetOffsetMs,\r\n sunDeltaMs,\r\n currentTimeOffsetMs,\r\n speed,\r\n loop: false,\r\n shadowColor,\r\n duration,\r\n adjustedDuration,\r\n };\r\n }\r\n\r\n public override componentWillUnmount() {\r\n window.cancelAnimationFrame(this._requestFrame);\r\n this._unmounted = true;\r\n }\r\n\r\n // recursively update the animation until we hit the end or the pause button is clicked\r\n private _updateAnimation = (_timestamp: number) => {\r\n // istanbul ignore else\r\n if (!this.state.isPlaying || this._unmounted) {\r\n window.cancelAnimationFrame(this._requestFrame);\r\n return;\r\n }\r\n\r\n const currentTime = new Date().getTime();\r\n this._totalPlayTime += (currentTime - this._timeLastCycle);\r\n this._timeLastCycle = currentTime;\r\n let percentComplete = this._totalPlayTime / this.state.adjustedDuration;\r\n if (percentComplete > 1)\r\n percentComplete = 1;\r\n\r\n let newPlayingState = true;\r\n\r\n // calculate the next sun time base on the percentage playback complete - should be int value as that is step amount for slider\r\n let nextSunOffset = Math.floor(this.state.sunRiseOffsetMs + (percentComplete * this.state.sunDeltaMs));\r\n\r\n if (percentComplete > 0.99) {\r\n if (!this.state.loop) {\r\n newPlayingState = false;\r\n nextSunOffset = this.state.sunSetOffsetMs;\r\n window.cancelAnimationFrame(this._requestFrame);\r\n } else {\r\n nextSunOffset = this.state.sunRiseOffsetMs;\r\n this._totalPlayTime = 0;\r\n }\r\n }\r\n\r\n if (this.props.dataProvider.onTimeChanged) {\r\n const currentSunTime = new Date(this.state.dayStartMs + nextSunOffset);\r\n this.props.dataProvider.onTimeChanged(currentSunTime);\r\n }\r\n\r\n this.setState({ isPlaying: newPlayingState, currentTimeOffsetMs: nextSunOffset }, () => {\r\n if (newPlayingState)\r\n this._requestFrame = window.requestAnimationFrame(this._updateAnimation);\r\n });\r\n };\r\n\r\n private _play(sunTimeMs: number) {\r\n this._timeLastCycle = new Date().getTime();\r\n\r\n // start playing\r\n this.setState({ isPlaying: true, currentTimeOffsetMs: sunTimeMs }, () => {\r\n this._requestFrame = window.requestAnimationFrame(this._updateAnimation);\r\n // istanbul ignore else\r\n if (this.props.onPlayPause)\r\n this.props.onPlayPause(true);\r\n });\r\n }\r\n\r\n // user clicked pause button\r\n private _onPause = () => {\r\n // istanbul ignore if\r\n if (!this.state.isPlaying)\r\n return;\r\n\r\n const currentTime = new Date().getTime();\r\n this._totalPlayTime += (currentTime - this._timeLastCycle);\r\n\r\n // stop requesting frames\r\n window.cancelAnimationFrame(this._requestFrame);\r\n\r\n // stop playing\r\n this.setState({ isPlaying: false });\r\n\r\n // istanbul ignore else\r\n if (this.props.onPlayPause)\r\n this.props.onPlayPause(false);\r\n };\r\n\r\n // user clicked play button\r\n private _onPlay = () => {\r\n // istanbul ignore if\r\n if (this.state.isPlaying)\r\n return;\r\n\r\n if (this.state.currentTimeOffsetMs >= this.state.sunSetOffsetMs || this.state.currentTimeOffsetMs <= this.state.sunRiseOffsetMs) {\r\n this._totalPlayTime = 0;\r\n this._play(this.state.sunRiseOffsetMs);\r\n } else {\r\n this._play(this.state.currentTimeOffsetMs);\r\n }\r\n };\r\n\r\n private setPlaybackTimeBySunTime(sunOffsetMs: number, sunRiseOffsetMs: number, sunDeltaMs: number, adjustedDuration?: number) {\r\n this._totalPlayTime = ((sunOffsetMs - sunRiseOffsetMs) / (sunDeltaMs)) * ((adjustedDuration) ? adjustedDuration : this.state.adjustedDuration);\r\n }\r\n\r\n /** note the day passed in is in the time of the current user not in project time because the date picker works in\r\n * local time */\r\n private _onDayClick = (day: Date) => {\r\n const selectedDate = new Date(day.getTime() + this.state.currentTimeOffsetMs);\r\n this.props.dataProvider.setDateAndTime(selectedDate);\r\n const dayStartMs = this.props.dataProvider.dayStartMs;\r\n const sunRiseOffsetMs = this.props.dataProvider.sunrise.getTime() - dayStartMs;\r\n const sunSetOffsetMs = this.props.dataProvider.sunset.getTime() - dayStartMs;\r\n const sunDeltaMs = sunSetOffsetMs - sunRiseOffsetMs;\r\n\r\n const sunOffsetMs = this.ensureRange(this.state.currentTimeOffsetMs, sunRiseOffsetMs, sunSetOffsetMs);\r\n this.setPlaybackTimeBySunTime(sunOffsetMs, sunRiseOffsetMs, sunDeltaMs);\r\n\r\n /** call dataProvider to update display style */\r\n if (this.props.dataProvider.onTimeChanged)\r\n this.props.dataProvider.onTimeChanged(this.props.dataProvider.timeOfDay);\r\n\r\n this.setState({ dayStartMs, sunRiseOffsetMs, sunSetOffsetMs, currentTimeOffsetMs: sunOffsetMs, sunDeltaMs, isDateOpened: false }, () => {\r\n this._timeLastCycle = new Date().getTime();\r\n });\r\n };\r\n\r\n private _onTimeChanged = (time: TimeSpec) => {\r\n // compute the current date (with time)\r\n const dayStartMs = this.props.dataProvider.dayStartMs;\r\n const sunTime = (time.hours * millisecPerHour) + (time.minutes * millisecPerMinute);\r\n const dateWithNewTime = new Date(dayStartMs + sunTime);\r\n this.props.dataProvider.setDateAndTime(dateWithNewTime, true);\r\n\r\n // notify the provider to update style\r\n if (this.props.dataProvider.onTimeChanged)\r\n this.props.dataProvider.onTimeChanged(dateWithNewTime);\r\n\r\n const currentTimeOffsetMs = this.ensureRange(sunTime, this.state.sunRiseOffsetMs, this.state.sunSetOffsetMs);\r\n\r\n this.setPlaybackTimeBySunTime(currentTimeOffsetMs, this.state.sunRiseOffsetMs, this.state.sunDeltaMs);\r\n this._timeLastCycle = new Date().getTime();\r\n\r\n // update the timeline\r\n this.setState({ currentTimeOffsetMs });\r\n };\r\n\r\n private _onCloseDayPicker = () => {\r\n this.setState({ isDateOpened: false });\r\n };\r\n\r\n private _onOpenDayPicker = () => {\r\n this.setState((prevState) => ({ isDateOpened: !prevState.isDateOpened }));\r\n };\r\n\r\n private _onCloseSettingsPopup = () => {\r\n this.setState({ isSettingsOpened: false });\r\n };\r\n\r\n private _onOpenSettingsPopup = () => {\r\n this.setState((prevState) => ({ isSettingsOpened: !prevState.isSettingsOpened }));\r\n };\r\n\r\n private ensureRange(value: number, min: number, max: number): number {\r\n return Math.max(Math.min(value, max), min);\r\n }\r\n\r\n private processSunTimeChange(sunTime: number) {\r\n if (sunTime === this.state.currentTimeOffsetMs)\r\n return;\r\n\r\n const currentTimeOffsetMs = this.ensureRange(sunTime, this.state.sunRiseOffsetMs, this.state.sunSetOffsetMs);\r\n\r\n if (this.props.dataProvider.onTimeChanged) {\r\n const currentSunTime = new Date(this.state.dayStartMs + currentTimeOffsetMs);\r\n this.props.dataProvider.onTimeChanged(currentSunTime);\r\n }\r\n\r\n this.setState({ currentTimeOffsetMs }, () => {\r\n const currentTime = new Date().getTime();\r\n this._timeLastCycle = currentTime;\r\n const percentComplete = (currentTimeOffsetMs - this.state.sunRiseOffsetMs) / this.state.sunDeltaMs;\r\n this._totalPlayTime = percentComplete * this.state.adjustedDuration;\r\n });\r\n }\r\n\r\n private _onUpdate = (values: ReadonlyArray<number>) => {\r\n if (!this.state.isPlaying)\r\n this.processSunTimeChange(values[0]);\r\n };\r\n\r\n private _onChange = (values: ReadonlyArray<number>) => {\r\n if (!this.state.isPlaying)\r\n this.processSunTimeChange(values[0]);\r\n };\r\n\r\n private _onSpeedChange = (value: number) => {\r\n const adjustedDuration = this.state.duration / value;\r\n this.setState({ speed: value, adjustedDuration });\r\n };\r\n\r\n private _onToggleLoop = () => {\r\n this.setState((prevState) => ({ loop: !prevState.loop }));\r\n };\r\n\r\n private _formatTime = (millisec: number) => {\r\n const date = new Date(millisec);\r\n // convert project date to browser locale date\r\n const localTime = adjustDateToTimezone(date, this.props.dataProvider.timeZoneOffset * 60);\r\n let hours = localTime.getHours();\r\n const minutes = addZero(date.getMinutes());\r\n const abbrev = (hours < 12) ? this._amLabel : (hours === 24) ? this._amLabel : this._pmLabel;\r\n hours = (hours > 12) ? hours - 12 : hours;\r\n return `${hours}:${minutes} ${abbrev}`;\r\n };\r\n\r\n private _onPresetColorPick = (shadowColor: ColorDef) => {\r\n this.setState({ shadowColor }, () => this.props.dataProvider.shadowColor = shadowColor);\r\n };\r\n\r\n private _handleHueOrSaturationChange = (hueOrSaturation: HSVColor) => {\r\n if (hueOrSaturation.s === 0) // for a ColorDef to be created from hsv s can't be 0\r\n hueOrSaturation = hueOrSaturation.clone(undefined, 0.5);\r\n\r\n const shadowColor = hueOrSaturation.toColorDef();\r\n this.setState({ shadowColor }, () => this.props.dataProvider.shadowColor = shadowColor);\r\n };\r\n\r\n public getLocalTime(ticks: number): Date {\r\n const projectTime = new Date(ticks);\r\n // convert project date to browser locale date\r\n return adjustDateToTimezone(projectTime, this.props.dataProvider.timeZoneOffset * 60);\r\n }\r\n\r\n public override render() {\r\n const { dataProvider } = this.props;\r\n const { speed, loop, currentTimeOffsetMs,\r\n sunRiseOffsetMs, sunSetOffsetMs } = this.state;\r\n const localTime = this.getLocalTime(this.state.dayStartMs + this.state.currentTimeOffsetMs);\r\n const formattedTime = this._formatTime(dataProvider.dayStartMs + currentTimeOffsetMs);\r\n const formattedDate = `${this._months[localTime.getMonth()]}, ${localTime.getDate()}`;\r\n\r\n const colorSwatchStyle: React.CSSProperties = {\r\n width: `100%`,\r\n height: `100%`,\r\n };\r\n\r\n return (\r\n <div className={\"solar-timeline-wrapper\"} >\r\n <div className=\"header\">\r\n <PlayButton tooltip={this._playLabel} className=\"play-button\" isPlaying={this.state.isPlaying} onPlay={this._onPlay} onPause={this._onPause} />\r\n <button data-testid=\"solar-date-time-button\" title={this._dateTimeLabel} className=\"current-date\" ref={(element) => this._datePicker = element} onClick={this._onOpenDayPicker}>\r\n <span>{formattedDate}</span>\r\n <span>/</span>\r\n <span>{formattedTime}</span>\r\n <span className=\"icon icon-calendar\" />\r\n </button>\r\n <Popup style={{ border: \"none\" }} offset={11} target={this._datePicker} isOpen={this.state.isDateOpened} onClose={this._onCloseDayPicker} position={RelativePosition.Top}>\r\n <div className=\"components-date-picker-calendar-popup-panel\" data-testid=\"components-date-picker-calendar-popup-panel\">\r\n <DatePicker selected={localTime} onDateChange={this._onDayClick} showFocusOutline={false} />\r\n <div className=\"time-container\">\r\n <BodyText className=\"time-label\">{this._timeLabel}</BodyText>\r\n <TimeField time={{ hours: localTime.getHours(), minutes: localTime.getMinutes(), seconds: 0 }} timeDisplay={TimeDisplay.H12MC} onTimeChange={this._onTimeChanged} />\r\n </div>\r\n </div>\r\n </Popup>\r\n <Timeline className=\"solar-timeline\"\r\n dayStartMs={dataProvider.dayStartMs}\r\n sunSetOffsetMs={sunSetOffsetMs}\r\n sunRiseOffsetMs={sunRiseOffsetMs}\r\n currentTimeOffsetMs={currentTimeOffsetMs}\r\n onChange={this._onChange}\r\n onUpdate={this._onUpdate}\r\n formatTime={this._formatTime}\r\n isPlaying={this.state.isPlaying}\r\n />\r\n <div className=\"speed-container\">\r\n <span title={this._speedLabel}>{speed}x</span>\r\n <SpeedTimeline className=\"speed\" onChange={this._onSpeedChange} speed={this.state.speed} />\r\n </div>\r\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\r\n <span title={this._loopLabel}\r\n className={classnames(\"icon\", \"icon-media-controls-loop\", !loop && \"no-loop-playback\", loop && \"loop-playback\")} onClick={this._onToggleLoop}\r\n role=\"button\" tabIndex={-1}\r\n ></span>\r\n <button data-testid=\"shadow-settings-button\" title={this._settingLabel} className=\"shadow-settings-button\" ref={(element) => this._settings = element} onClick={this._onOpenSettingsPopup}>\r\n <span className=\"icon icon-settings\" />\r\n </button>\r\n <Popup className=\"shadow-settings-popup\" target={this._settings} offset={11} isOpen={this.state.isSettingsOpened} onClose={this._onCloseSettingsPopup} position={RelativePosition.Top}>\r\n <div className=\"shadow-settings-popup-container\" >\r\n <div className=\"shadow-settings-header\">{this._settingsPopupTitle}</div>\r\n <div className=\"shadow-settings-color\">\r\n <div className=\"shadow-settings-color-top\">\r\n <SaturationPicker hsv={this.state.shadowColor.toHSV()} onSaturationChange={this._handleHueOrSaturationChange} />\r\n </div>\r\n <div className=\"shadow-settings-color-bottom\">\r\n <div className=\"shadow-settings-color-bottom-left\">\r\n <HueSlider hsv={this.state.shadowColor.toHSV()} onHueChange={this._handleHueOrSaturationChange} isHorizontal={true} />\r\n </div>\r\n <div className=\"shadow-settings-color-bottom-right\">\r\n <ColorSwatch style={colorSwatchStyle} colorDef={this.state.shadowColor} round={false} />\r\n </div>\r\n </div>\r\n </div>\r\n <div className=\"shadow-settings-color-presets\">\r\n <ColorSwatch colorDef={this._presetColors[0]} round={false} onColorPick={this._onPresetColorPick} />\r\n <ColorSwatch colorDef={this._presetColors[1]} round={false} onColorPick={this._onPresetColorPick} />\r\n <ColorSwatch colorDef={this._presetColors[2]} round={false} onColorPick={this._onPresetColorPick} />\r\n <ColorSwatch colorDef={this._presetColors[3]} round={false} onColorPick={this._onPresetColorPick} />\r\n <ColorSwatch colorDef={this._presetColors[4]} round={false} onColorPick={this._onPresetColorPick} />\r\n <ColorSwatch colorDef={this._presetColors[5]} round={false} onColorPick={this._onPresetColorPick} />\r\n <ColorSwatch colorDef={this._presetColors[6]} round={false} onColorPick={this._onPresetColorPick} />\r\n <ColorSwatch colorDef={this._presetColors[7]} round={false} onColorPick={this._onPresetColorPick} />\r\n </div>\r\n </div>\r\n </Popup>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"SolarTimeline.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/timeline/SolarTimeline.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,mGAAmG;AACnG,0BAA0B;AAE1B,gCAA8B;AAC9B,4DAAoC;AACpC,6CAA+B;AAC/B,wDAA6D;AAE7D,oDAAqE;AACrE,0DAAsE;AACtE,kDAA6D;AAC7D,8DAA8G;AAC9G,kDAA+C;AAC/C,gEAA6D;AAC7D,4CAA8C;AAE9C,iDAA4C;AAC5C,mDAAgD;AAChD,yCAAiG;AACjG,8DAA2D;AAC3D,oEAA+E;AAE/E,gGAAgG;AAEhG,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAE,CAAC;AACpC,MAAM,eAAe,GAAG,iBAAiB,GAAG,EAAE,CAAC;AAC/C,+CAA+C;AAC/C,MAAM,uBAAuB,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;AACxD,MAAM,OAAO,GAAG,CAAC,CAAS,EAAE,EAAE;IAC5B,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAChC,CAAC,CAAC;AAaF,SAAS,QAAQ,CAAC,KAAoB;IACpC,MAAM,SAAS,GAAG,KAAK,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C,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,kBAAkB,GAAI;4BACpG,oBAAC,oBAAW,IAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,kBAAkB,GAAI;4BACpG,oBAAC,oBAAW,IAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,kBAAkB,GAAI;4BACpG,oBAAC,oBAAW,IAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,kBAAkB,GAAI;4BACpG,oBAAC,oBAAW,IAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,kBAAkB,GAAI;4BACpG,oBAAC,oBAAW,IAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,kBAAkB,GAAI;4BACpG,oBAAC,oBAAW,IAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,kBAAkB,GAAI;4BACpG,oBAAC,oBAAW,IAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,kBAAkB,GAAI,CAChG,CACF,CACA,CACJ,CACF,CACP,CAAC;IACJ,CAAC;CACF;AAnYD,sCAmYC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Timeline\r\n */\r\n\r\n// component is in alpha state - it may change after usability testing - test coverage not complete\r\n/* istanbul ignore file */\r\n\r\nimport \"./SolarTimeline.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { Slider, Text, Tooltip } from \"@itwin/itwinui-react\";\r\n\r\nimport { ColorByName, ColorDef, HSVColor } from \"@itwin/core-common\";\r\nimport { RelativePosition, TimeDisplay } from \"@itwin/appui-abstract\";\r\nimport { CommonProps, Icon, Popup } from \"@itwin/core-react\";\r\nimport { adjustDateToTimezone, DatePicker, TimeField, TimeSpec, UiComponents } from \"@itwin/components-react\";\r\nimport { HueSlider } from \"../color/HueSlider\";\r\nimport { SaturationPicker } from \"../color/SaturationPicker\";\r\nimport { ColorSwatch } from \"../color/Swatch\";\r\nimport { SolarDataProvider } from \"./interfaces\";\r\nimport { PlayButton } from \"./PlayerButton\";\r\nimport { SpeedTimeline } from \"./SpeedTimeline\";\r\nimport { CustomThumb, getPercentageOfRectangle, RailMarkers, useFocusedThumb } from \"./Scrubber\";\r\nimport { UiIModelComponents } from \"../UiIModelComponents\";\r\nimport { SvgCalendar, SvgLoop, SvgSettings } from \"@itwin/itwinui-icons-react\";\r\n\r\n// cSpell:ignore millisec solarsettings showticks shadowcolor solartimeline datepicker millisecs\r\n\r\nconst millisecPerMinute = 1000 * 60;\r\nconst millisecPerHour = millisecPerMinute * 60;\r\n// const millisecPerDay = millisecPerHour * 24;\r\nconst defaultPlaybackDuration = 40 * 1000; // 40 seconds\r\nconst addZero = (i: number) => {\r\n return (i < 10) ? `0${i}` : i;\r\n};\r\n\r\ninterface TimelineProps extends CommonProps {\r\n dayStartMs: number;\r\n sunRiseOffsetMs: number;\r\n sunSetOffsetMs: number;\r\n currentTimeOffsetMs: number;\r\n isPlaying: boolean;\r\n formatTick?: (millisec: number) => string;\r\n formatTime: (millisec: number) => string;\r\n onChange?: (values: ReadonlyArray<number>) => void;\r\n onUpdate?: (values: ReadonlyArray<number>) => void;\r\n}\r\nfunction Timeline(props: TimelineProps) {\r\n const sliderRef = React.useRef<HTMLDivElement>(null);\r\n const [sliderContainer, setSliderContainer] = React.useState<HTMLDivElement>();\r\n const [pointerPercent, setPointerPercent] = React.useState(0);\r\n\r\n React.useLayoutEffect(() => {\r\n // istanbul ignore else\r\n if (sliderRef.current) {\r\n const container = sliderRef.current.querySelector(\".iui-slider-container\");\r\n if (container && sliderContainer !== container) {\r\n setSliderContainer(container as HTMLDivElement);\r\n }\r\n }\r\n }, [sliderContainer]);\r\n\r\n const thumbProps = () => {\r\n return {\r\n className: \"components-timeline-thumb\",\r\n children: <CustomThumb />,\r\n };\r\n };\r\n\r\n const tooltipProps = React.useCallback(() => {\r\n return { visible: false };\r\n }, []);\r\n\r\n const [showRailTooltip, setShowRailTooltip] = React.useState(false);\r\n\r\n const handlePointerEnter = React.useCallback(() => {\r\n setShowRailTooltip(true);\r\n }, []);\r\n\r\n const handlePointerLeave = React.useCallback(() => {\r\n setShowRailTooltip(false);\r\n }, []);\r\n\r\n const handlePointerMove = React.useCallback((event: React.PointerEvent) => {\r\n sliderContainer &&\r\n setPointerPercent(getPercentageOfRectangle(sliderContainer.getBoundingClientRect(), event.clientX));\r\n }, [sliderContainer]);\r\n\r\n const { formatTick, formatTime, onChange, onUpdate, dayStartMs, sunSetOffsetMs, sunRiseOffsetMs, currentTimeOffsetMs, isPlaying } = props;\r\n\r\n const thumbHasFocus = useFocusedThumb(sliderContainer);\r\n\r\n const tickLabel = React.useMemo(() => {\r\n const showTip = isPlaying || showRailTooltip || thumbHasFocus;\r\n const totalDuration = sunSetOffsetMs - sunRiseOffsetMs;\r\n const percent = (isPlaying || thumbHasFocus) ? (currentTimeOffsetMs - sunRiseOffsetMs) / totalDuration : pointerPercent;\r\n const tooltipText = formatTime((isPlaying || thumbHasFocus) ? (dayStartMs + currentTimeOffsetMs) : (dayStartMs + (sunRiseOffsetMs + (pointerPercent * totalDuration))));\r\n return (<RailMarkers showToolTip={showTip} percent={percent} tooltipText={tooltipText} />);\r\n }, [isPlaying, showRailTooltip, thumbHasFocus, sunSetOffsetMs, sunRiseOffsetMs, currentTimeOffsetMs, pointerPercent, formatTime, dayStartMs]);\r\n\r\n const className = classnames(\"solar-slider\", props.className, formatTick && \"showticks\");\r\n const sunRiseFormat = formatTime(dayStartMs + sunRiseOffsetMs);\r\n const sunSetFormat = formatTime(dayStartMs + sunSetOffsetMs);\r\n return (\r\n <div className={className}>\r\n <Tooltip content={sunRiseFormat}>\r\n <span className=\"sunrise\">\r\n &#x2600;\r\n </span>\r\n </Tooltip>\r\n <Slider ref={sliderRef}\r\n className={className}\r\n step={millisecPerMinute}\r\n min={sunRiseOffsetMs}\r\n max={sunSetOffsetMs}\r\n minLabel=\"\"\r\n maxLabel=\"\"\r\n onUpdate={onUpdate}\r\n onChange={onChange}\r\n values={[currentTimeOffsetMs]}\r\n tooltipProps={tooltipProps}\r\n thumbProps={thumbProps}\r\n tickLabels={tickLabel}\r\n railContainerProps={{\r\n onPointerEnter: handlePointerEnter,\r\n onPointerMove: handlePointerMove,\r\n onPointerLeave: handlePointerLeave,\r\n }}\r\n />\r\n <Tooltip content={sunSetFormat}>\r\n <span className=\"sunset\">\r\n &#x263D;\r\n </span>\r\n </Tooltip>\r\n </div>\r\n );\r\n}\r\n\r\ninterface SolarTimelineComponentProps {\r\n dataProvider: SolarDataProvider; // provides date, sunrise, sunset in millisecs, also contains timezone offset from UTC, and updates the display style to current time.\r\n onPlayPause?: (playing: boolean) => void; // callback triggered when play/pause button is pressed\r\n duration?: number; // playback duration in milliseconds\r\n speed?: number;\r\n}\r\n\r\ninterface SolarTimelineComponentState {\r\n isPlaying: boolean; // timeline is currently playing or paused\r\n isDateOpened: boolean; // date picker is opened\r\n isSettingsOpened: boolean; // settings popup is opened\r\n dayStartMs: number;\r\n sunRiseOffsetMs: number;\r\n sunSetOffsetMs: number;\r\n sunDeltaMs: number;\r\n currentTimeOffsetMs: number;\r\n speed: number;\r\n loop: boolean;\r\n shadowColor: ColorDef;\r\n duration: number; // playback duration in milliseconds\r\n adjustedDuration: number; // playback duration in milliseconds/ speed\r\n}\r\n\r\n/** Solar Timeline\r\n * @alpha\r\n */\r\nexport class SolarTimeline extends React.PureComponent<SolarTimelineComponentProps, SolarTimelineComponentState> {\r\n private _datePicker: HTMLElement | null = null;\r\n private _settings: HTMLElement | null = null;\r\n private _requestFrame = 0;\r\n private _unmounted = false;\r\n private _timeLastCycle = 0;\r\n private _totalPlayTime = 0;\r\n private _settingsPopupTitle = UiIModelComponents.translate(\"solarsettings.shadowcolor\");\r\n private _playLabel = UiIModelComponents.translate(\"solartimeline.play\");\r\n private _settingLabel = UiIModelComponents.translate(\"solartimeline.settings\");\r\n private _loopLabel = UiIModelComponents.translate(\"timeline.repeat\");\r\n private _speedLabel = UiIModelComponents.translate(\"solartimeline.speed\");\r\n private _dateTimeLabel = UiIModelComponents.translate(\"solartimeline.dateTime\");\r\n\r\n private _months = [\r\n UiComponents.translate(\"month.short.january\"),\r\n UiComponents.translate(\"month.short.february\"),\r\n UiComponents.translate(\"month.short.march\"),\r\n UiComponents.translate(\"month.short.april\"),\r\n UiComponents.translate(\"month.short.may\"),\r\n UiComponents.translate(\"month.short.june\"),\r\n UiComponents.translate(\"month.short.july\"),\r\n UiComponents.translate(\"month.short.august\"),\r\n UiComponents.translate(\"month.short.september\"),\r\n UiComponents.translate(\"month.short.october\"),\r\n UiComponents.translate(\"month.short.november\"),\r\n UiComponents.translate(\"month.short.december\"),\r\n ];\r\n\r\n private _timeLabel = UiComponents.translate(\"datepicker.time\");\r\n private _amLabel = UiComponents.translate(\"time.am\");\r\n private _pmLabel = UiComponents.translate(\"time.pm\");\r\n private readonly _presetColors = [\r\n ColorDef.create(ColorByName.grey),\r\n ColorDef.create(ColorByName.lightGrey),\r\n ColorDef.create(ColorByName.darkGrey),\r\n ColorDef.create(ColorByName.lightBlue),\r\n ColorDef.create(ColorByName.lightGreen),\r\n ColorDef.create(ColorByName.darkGreen),\r\n ColorDef.create(ColorByName.tan),\r\n ColorDef.create(ColorByName.darkBrown),\r\n ];\r\n\r\n constructor(props: SolarTimelineComponentProps) {\r\n super(props);\r\n\r\n const dayStartMs = this.props.dataProvider.dayStartMs;\r\n const sunRiseOffsetMs = this.props.dataProvider.sunrise.getTime() - dayStartMs;\r\n const sunSetOffsetMs = this.props.dataProvider.sunset.getTime() - dayStartMs;\r\n const sunDeltaMs = sunSetOffsetMs - sunRiseOffsetMs;\r\n const sunOffsetMs = this.props.dataProvider.timeOfDay.getTime() - dayStartMs;\r\n const currentTimeOffsetMs = this.ensureRange(sunOffsetMs, sunRiseOffsetMs, sunSetOffsetMs);\r\n const shadowColor = this.props.dataProvider.shadowColor;\r\n const duration = this.props.duration ? this.props.duration : defaultPlaybackDuration;\r\n const speed = this.props.speed ? this.props.speed : 2;\r\n const adjustedDuration = duration / speed;\r\n this.setPlaybackTimeBySunTime(currentTimeOffsetMs, sunRiseOffsetMs, sunDeltaMs, adjustedDuration);\r\n\r\n this.state = {\r\n isDateOpened: false,\r\n isSettingsOpened: false,\r\n isPlaying: false,\r\n dayStartMs,\r\n sunRiseOffsetMs,\r\n sunSetOffsetMs,\r\n sunDeltaMs,\r\n currentTimeOffsetMs,\r\n speed,\r\n loop: false,\r\n shadowColor,\r\n duration,\r\n adjustedDuration,\r\n };\r\n }\r\n\r\n public override componentWillUnmount() {\r\n window.cancelAnimationFrame(this._requestFrame);\r\n this._unmounted = true;\r\n }\r\n\r\n // recursively update the animation until we hit the end or the pause button is clicked\r\n private _updateAnimation = (_timestamp: number) => {\r\n // istanbul ignore else\r\n if (!this.state.isPlaying || this._unmounted) {\r\n window.cancelAnimationFrame(this._requestFrame);\r\n return;\r\n }\r\n\r\n const currentTime = new Date().getTime();\r\n this._totalPlayTime += (currentTime - this._timeLastCycle);\r\n this._timeLastCycle = currentTime;\r\n let percentComplete = this._totalPlayTime / this.state.adjustedDuration;\r\n if (percentComplete > 1)\r\n percentComplete = 1;\r\n\r\n let newPlayingState = true;\r\n\r\n // calculate the next sun time base on the percentage playback complete - should be int value as that is step amount for slider\r\n let nextSunOffset = Math.floor(this.state.sunRiseOffsetMs + (percentComplete * this.state.sunDeltaMs));\r\n\r\n if (percentComplete > 0.99) {\r\n if (!this.state.loop) {\r\n newPlayingState = false;\r\n nextSunOffset = this.state.sunSetOffsetMs;\r\n window.cancelAnimationFrame(this._requestFrame);\r\n } else {\r\n nextSunOffset = this.state.sunRiseOffsetMs;\r\n this._totalPlayTime = 0;\r\n }\r\n }\r\n\r\n if (this.props.dataProvider.onTimeChanged) {\r\n const currentSunTime = new Date(this.state.dayStartMs + nextSunOffset);\r\n this.props.dataProvider.onTimeChanged(currentSunTime);\r\n }\r\n\r\n this.setState({ isPlaying: newPlayingState, currentTimeOffsetMs: nextSunOffset }, () => {\r\n if (newPlayingState)\r\n this._requestFrame = window.requestAnimationFrame(this._updateAnimation);\r\n });\r\n };\r\n\r\n private _play(sunTimeMs: number) {\r\n this._timeLastCycle = new Date().getTime();\r\n\r\n // start playing\r\n this.setState({ isPlaying: true, currentTimeOffsetMs: sunTimeMs }, () => {\r\n this._requestFrame = window.requestAnimationFrame(this._updateAnimation);\r\n // istanbul ignore else\r\n if (this.props.onPlayPause)\r\n this.props.onPlayPause(true);\r\n });\r\n }\r\n\r\n // user clicked pause button\r\n private _onPause = () => {\r\n // istanbul ignore if\r\n if (!this.state.isPlaying)\r\n return;\r\n\r\n const currentTime = new Date().getTime();\r\n this._totalPlayTime += (currentTime - this._timeLastCycle);\r\n\r\n // stop requesting frames\r\n window.cancelAnimationFrame(this._requestFrame);\r\n\r\n // stop playing\r\n this.setState({ isPlaying: false });\r\n\r\n // istanbul ignore else\r\n if (this.props.onPlayPause)\r\n this.props.onPlayPause(false);\r\n };\r\n\r\n // user clicked play button\r\n private _onPlay = () => {\r\n // istanbul ignore if\r\n if (this.state.isPlaying)\r\n return;\r\n\r\n if (this.state.currentTimeOffsetMs >= this.state.sunSetOffsetMs || this.state.currentTimeOffsetMs <= this.state.sunRiseOffsetMs) {\r\n this._totalPlayTime = 0;\r\n this._play(this.state.sunRiseOffsetMs);\r\n } else {\r\n this._play(this.state.currentTimeOffsetMs);\r\n }\r\n };\r\n\r\n private setPlaybackTimeBySunTime(sunOffsetMs: number, sunRiseOffsetMs: number, sunDeltaMs: number, adjustedDuration?: number) {\r\n this._totalPlayTime = ((sunOffsetMs - sunRiseOffsetMs) / (sunDeltaMs)) * ((adjustedDuration) ? adjustedDuration : this.state.adjustedDuration);\r\n }\r\n\r\n /** note the day passed in is in the time of the current user not in project time because the date picker works in\r\n * local time */\r\n private _onDayClick = (day: Date) => {\r\n const selectedDate = new Date(day.getTime() + this.state.currentTimeOffsetMs);\r\n this.props.dataProvider.setDateAndTime(selectedDate);\r\n const dayStartMs = this.props.dataProvider.dayStartMs;\r\n const sunRiseOffsetMs = this.props.dataProvider.sunrise.getTime() - dayStartMs;\r\n const sunSetOffsetMs = this.props.dataProvider.sunset.getTime() - dayStartMs;\r\n const sunDeltaMs = sunSetOffsetMs - sunRiseOffsetMs;\r\n\r\n const sunOffsetMs = this.ensureRange(this.state.currentTimeOffsetMs, sunRiseOffsetMs, sunSetOffsetMs);\r\n this.setPlaybackTimeBySunTime(sunOffsetMs, sunRiseOffsetMs, sunDeltaMs);\r\n\r\n /** call dataProvider to update display style */\r\n if (this.props.dataProvider.onTimeChanged)\r\n this.props.dataProvider.onTimeChanged(this.props.dataProvider.timeOfDay);\r\n\r\n this.setState({ dayStartMs, sunRiseOffsetMs, sunSetOffsetMs, currentTimeOffsetMs: sunOffsetMs, sunDeltaMs, isDateOpened: false }, () => {\r\n this._timeLastCycle = new Date().getTime();\r\n });\r\n };\r\n\r\n private _onTimeChanged = (time: TimeSpec) => {\r\n // compute the current date (with time)\r\n const dayStartMs = this.props.dataProvider.dayStartMs;\r\n const sunTime = (time.hours * millisecPerHour) + (time.minutes * millisecPerMinute);\r\n const dateWithNewTime = new Date(dayStartMs + sunTime);\r\n this.props.dataProvider.setDateAndTime(dateWithNewTime, true);\r\n\r\n // notify the provider to update style\r\n if (this.props.dataProvider.onTimeChanged)\r\n this.props.dataProvider.onTimeChanged(dateWithNewTime);\r\n\r\n const currentTimeOffsetMs = this.ensureRange(sunTime, this.state.sunRiseOffsetMs, this.state.sunSetOffsetMs);\r\n\r\n this.setPlaybackTimeBySunTime(currentTimeOffsetMs, this.state.sunRiseOffsetMs, this.state.sunDeltaMs);\r\n this._timeLastCycle = new Date().getTime();\r\n\r\n // update the timeline\r\n this.setState({ currentTimeOffsetMs });\r\n };\r\n\r\n private _onCloseDayPicker = () => {\r\n this.setState({ isDateOpened: false });\r\n };\r\n\r\n private _onOpenDayPicker = () => {\r\n this.setState((prevState) => ({ isDateOpened: !prevState.isDateOpened }));\r\n };\r\n\r\n private _onCloseSettingsPopup = () => {\r\n this.setState({ isSettingsOpened: false });\r\n };\r\n\r\n private _onOpenSettingsPopup = () => {\r\n this.setState((prevState) => ({ isSettingsOpened: !prevState.isSettingsOpened }));\r\n };\r\n\r\n private ensureRange(value: number, min: number, max: number): number {\r\n return Math.max(Math.min(value, max), min);\r\n }\r\n\r\n private processSunTimeChange(sunTime: number) {\r\n if (sunTime === this.state.currentTimeOffsetMs)\r\n return;\r\n\r\n const currentTimeOffsetMs = this.ensureRange(sunTime, this.state.sunRiseOffsetMs, this.state.sunSetOffsetMs);\r\n\r\n if (this.props.dataProvider.onTimeChanged) {\r\n const currentSunTime = new Date(this.state.dayStartMs + currentTimeOffsetMs);\r\n this.props.dataProvider.onTimeChanged(currentSunTime);\r\n }\r\n\r\n this.setState({ currentTimeOffsetMs }, () => {\r\n const currentTime = new Date().getTime();\r\n this._timeLastCycle = currentTime;\r\n const percentComplete = (currentTimeOffsetMs - this.state.sunRiseOffsetMs) / this.state.sunDeltaMs;\r\n this._totalPlayTime = percentComplete * this.state.adjustedDuration;\r\n });\r\n }\r\n\r\n private _onUpdate = (values: ReadonlyArray<number>) => {\r\n if (!this.state.isPlaying)\r\n this.processSunTimeChange(values[0]);\r\n };\r\n\r\n private _onChange = (values: ReadonlyArray<number>) => {\r\n if (!this.state.isPlaying)\r\n this.processSunTimeChange(values[0]);\r\n };\r\n\r\n private _onSpeedChange = (value: number) => {\r\n const adjustedDuration = this.state.duration / value;\r\n this.setState({ speed: value, adjustedDuration });\r\n };\r\n\r\n private _onToggleLoop = () => {\r\n this.setState((prevState) => ({ loop: !prevState.loop }));\r\n };\r\n\r\n private _formatTime = (millisec: number) => {\r\n const date = new Date(millisec);\r\n // convert project date to browser locale date\r\n const localTime = adjustDateToTimezone(date, this.props.dataProvider.timeZoneOffset * 60);\r\n let hours = localTime.getHours();\r\n const minutes = addZero(date.getMinutes());\r\n const abbrev = (hours < 12) ? this._amLabel : (hours === 24) ? this._amLabel : this._pmLabel;\r\n hours = (hours > 12) ? hours - 12 : hours;\r\n return `${hours}:${minutes} ${abbrev}`;\r\n };\r\n\r\n private _onPresetColorPick = (shadowColor: ColorDef) => {\r\n this.setState({ shadowColor }, () => this.props.dataProvider.shadowColor = shadowColor);\r\n };\r\n\r\n private _handleHueOrSaturationChange = (hueOrSaturation: HSVColor) => {\r\n if (hueOrSaturation.s === 0) // for a ColorDef to be created from hsv s can't be 0\r\n hueOrSaturation = hueOrSaturation.clone(undefined, 0.5);\r\n\r\n const shadowColor = hueOrSaturation.toColorDef();\r\n this.setState({ shadowColor }, () => this.props.dataProvider.shadowColor = shadowColor);\r\n };\r\n\r\n public getLocalTime(ticks: number): Date {\r\n const projectTime = new Date(ticks);\r\n // convert project date to browser locale date\r\n return adjustDateToTimezone(projectTime, this.props.dataProvider.timeZoneOffset * 60);\r\n }\r\n\r\n public override render() {\r\n const { dataProvider } = this.props;\r\n const { speed, loop, currentTimeOffsetMs,\r\n sunRiseOffsetMs, sunSetOffsetMs } = this.state;\r\n const localTime = this.getLocalTime(this.state.dayStartMs + this.state.currentTimeOffsetMs);\r\n const formattedTime = this._formatTime(dataProvider.dayStartMs + currentTimeOffsetMs);\r\n const formattedDate = `${this._months[localTime.getMonth()]}, ${localTime.getDate()}`;\r\n\r\n const colorSwatchStyle: React.CSSProperties = {\r\n width: `100%`,\r\n height: `100%`,\r\n };\r\n\r\n return (\r\n <div className={\"solar-timeline-wrapper\"} >\r\n <div className=\"header\">\r\n <PlayButton tooltip={this._playLabel} className=\"play-button\" isPlaying={this.state.isPlaying} onPlay={this._onPlay} onPause={this._onPause} />\r\n <button data-testid=\"solar-date-time-button\" title={this._dateTimeLabel} className=\"current-date\" ref={(element) => this._datePicker = element} onClick={this._onOpenDayPicker}>\r\n <span>{formattedDate}</span>\r\n <span>/</span>\r\n <span>{formattedTime}</span>\r\n <span className=\"icon\"><Icon iconSpec={<SvgCalendar />} /></span>\r\n </button>\r\n <Popup style={{ border: \"none\" }} offset={11} target={this._datePicker} isOpen={this.state.isDateOpened} onClose={this._onCloseDayPicker} position={RelativePosition.Top}>\r\n <div className=\"components-date-picker-calendar-popup-panel\" data-testid=\"components-date-picker-calendar-popup-panel\">\r\n <DatePicker selected={localTime} onDateChange={this._onDayClick} showFocusOutline={false} />\r\n <div className=\"time-container\">\r\n <Text variant=\"body\" className=\"time-label\">{this._timeLabel}</Text>\r\n <TimeField time={{ hours: localTime.getHours(), minutes: localTime.getMinutes(), seconds: 0 }} timeDisplay={TimeDisplay.H12MC} onTimeChange={this._onTimeChanged} />\r\n </div>\r\n </div>\r\n </Popup>\r\n <Timeline className=\"solar-timeline\"\r\n dayStartMs={dataProvider.dayStartMs}\r\n sunSetOffsetMs={sunSetOffsetMs}\r\n sunRiseOffsetMs={sunRiseOffsetMs}\r\n currentTimeOffsetMs={currentTimeOffsetMs}\r\n onChange={this._onChange}\r\n onUpdate={this._onUpdate}\r\n formatTime={this._formatTime}\r\n isPlaying={this.state.isPlaying}\r\n />\r\n <div className=\"speed-container\">\r\n <span title={this._speedLabel}>{speed}x</span>\r\n <SpeedTimeline className=\"speed\" onChange={this._onSpeedChange} speed={this.state.speed} />\r\n </div>\r\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\r\n <span title={this._loopLabel}\r\n className={classnames(\"icon\", !loop && \"no-loop-playback\", loop && \"loop-playback\")} onClick={this._onToggleLoop}\r\n role=\"button\" tabIndex={-1}\r\n ><Icon iconSpec={<SvgLoop />} /></span>\r\n <button data-testid=\"shadow-settings-button\" title={this._settingLabel} className=\"shadow-settings-button\" ref={(element) => this._settings = element} onClick={this._onOpenSettingsPopup}>\r\n <span className=\"icon\"><Icon iconSpec={<SvgSettings />} /></span>\r\n </button>\r\n <Popup className=\"shadow-settings-popup\" target={this._settings} offset={11} isOpen={this.state.isSettingsOpened} onClose={this._onCloseSettingsPopup} position={RelativePosition.Top}>\r\n <div className=\"shadow-settings-popup-container\" >\r\n <div className=\"shadow-settings-header\">{this._settingsPopupTitle}</div>\r\n <div className=\"shadow-settings-color\">\r\n <div className=\"shadow-settings-color-top\">\r\n <SaturationPicker hsv={this.state.shadowColor.toHSV()} onSaturationChange={this._handleHueOrSaturationChange} />\r\n </div>\r\n <div className=\"shadow-settings-color-bottom\">\r\n <div className=\"shadow-settings-color-bottom-left\">\r\n <HueSlider hsv={this.state.shadowColor.toHSV()} onHueChange={this._handleHueOrSaturationChange} isHorizontal={true} />\r\n </div>\r\n <div className=\"shadow-settings-color-bottom-right\">\r\n <ColorSwatch style={colorSwatchStyle} colorDef={this.state.shadowColor} round={false} />\r\n </div>\r\n </div>\r\n </div>\r\n <div className=\"shadow-settings-color-presets\">\r\n <ColorSwatch colorDef={this._presetColors[0]} round={false} onColorPick={this._onPresetColorPick} />\r\n <ColorSwatch colorDef={this._presetColors[1]} round={false} onColorPick={this._onPresetColorPick} />\r\n <ColorSwatch colorDef={this._presetColors[2]} round={false} onColorPick={this._onPresetColorPick} />\r\n <ColorSwatch colorDef={this._presetColors[3]} round={false} onColorPick={this._onPresetColorPick} />\r\n <ColorSwatch colorDef={this._presetColors[4]} round={false} onColorPick={this._onPresetColorPick} />\r\n <ColorSwatch colorDef={this._presetColors[5]} round={false} onColorPick={this._onPresetColorPick} />\r\n <ColorSwatch colorDef={this._presetColors[6]} round={false} onColorPick={this._onPresetColorPick} />\r\n <ColorSwatch colorDef={this._presetColors[7]} round={false} onColorPick={this._onPresetColorPick} />\r\n </div>\r\n </div>\r\n </Popup>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}