@ssa-ui-kit/core 2.9.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/components/AccordionGroup/types.d.ts +6 -3
  2. package/dist/components/Charts/BarGaugeChart/BarGaugeChart.d.ts +6 -0
  3. package/dist/components/Charts/BarGaugeChart/components/BarGaugeChartHeader.d.ts +5 -0
  4. package/dist/components/Charts/BarGaugeChart/components/Brick.d.ts +8 -0
  5. package/dist/components/Charts/BarGaugeChart/components/GaugeBar.d.ts +2 -0
  6. package/dist/components/Charts/BarGaugeChart/components/index.d.ts +3 -0
  7. package/dist/components/Charts/BarGaugeChart/index.d.ts +2 -0
  8. package/dist/components/Charts/BarGaugeChart/types.d.ts +27 -0
  9. package/dist/components/Charts/BigNumberChart/BigNumberChart.d.ts +18 -0
  10. package/dist/components/Charts/BigNumberChart/components/BigNumberChartHeader.d.ts +8 -0
  11. package/dist/components/Charts/BigNumberChart/components/TrendLine.d.ts +7 -0
  12. package/dist/components/Charts/BigNumberChart/components/TrendLineTooltip.d.ts +5 -0
  13. package/dist/components/Charts/BigNumberChart/components/index.d.ts +3 -0
  14. package/dist/components/Charts/BigNumberChart/index.d.ts +1 -0
  15. package/dist/components/Charts/index.d.ts +2 -0
  16. package/dist/components/JsonSchemaForm/fields/AccordionField.d.ts +6 -0
  17. package/dist/components/JsonSchemaForm/fields/DateRangeField.d.ts +2 -0
  18. package/dist/components/JsonSchemaForm/fields/index.d.ts +4 -0
  19. package/dist/components/JsonSchemaForm/index.d.ts +2 -1
  20. package/dist/components/JsonSchemaForm/utils/index.d.ts +1 -0
  21. package/dist/components/JsonSchemaForm/utils/schema.d.ts +3 -0
  22. package/dist/components/JsonSchemaForm/widgets/DateWidget.d.ts +2 -0
  23. package/dist/components/NumberField/NumberField.d.ts +18 -0
  24. package/dist/components/NumberField/index.d.ts +1 -0
  25. package/dist/components/Typeahead/index.d.ts +2 -0
  26. package/dist/components/index.d.ts +1 -0
  27. package/dist/index.js +819 -63
  28. package/dist/index.js.map +1 -1
  29. package/package.json +6 -5
package/dist/index.js CHANGED
@@ -70,7 +70,11 @@ __webpack_require__.d(__webpack_exports__, {
70
70
  AddNewAccountCard: () => (/* reexport */ AddNewAccountCard),
71
71
  Avatar: () => (/* reexport */ Avatar_Avatar),
72
72
  Badge: () => (/* reexport */ Badge_Badge),
73
+ BarGaugeChart: () => (/* reexport */ BarGaugeChart),
74
+ BarGaugeChartComponent: () => (/* reexport */ BarGaugeChartComponent),
73
75
  BarLineComplexChart: () => (/* reexport */ BarLineComplexChart),
76
+ BigNumberChart: () => (/* reexport */ BigNumberChart),
77
+ BigNumberChartComponent: () => (/* reexport */ BigNumberChartComponent),
74
78
  Button: () => (/* reexport */ Button_Button),
75
79
  ButtonGroup: () => (/* reexport */ ButtonGroup),
76
80
  Card: () => (/* reexport */ Card_Card),
@@ -137,6 +141,7 @@ __webpack_require__.d(__webpack_exports__, {
137
141
  NestedTableRowProvider: () => (/* reexport */ NestedTableRowProvider),
138
142
  NotificationCard: () => (/* reexport */ NotificationCard),
139
143
  NotificationMenu: () => (/* reexport */ NotificationMenu),
144
+ NumberField: () => (/* reexport */ NumberField),
140
145
  Pagination: () => (/* reexport */ Pagination_Pagination),
141
146
  PaginationContext: () => (/* reexport */ PaginationContext),
142
147
  PaginationContextProvider: () => (/* reexport */ PaginationContextProvider),
@@ -254,7 +259,8 @@ __webpack_require__.d(__webpack_exports__, {
254
259
  useTabBarContext: () => (/* reexport */ useTabBarContext),
255
260
  useTooltip: () => (/* reexport */ useTooltip),
256
261
  useTooltipContext: () => (/* reexport */ useTooltipContext),
257
- useTranslation: () => (/* reexport */ useTranslation)
262
+ useTranslation: () => (/* reexport */ useTranslation),
263
+ useTypeaheadContext: () => (/* reexport */ useTypeaheadContext)
258
264
  });
259
265
 
260
266
  // NAMESPACE OBJECT: ./src/styles/global.ts
@@ -936,10 +942,12 @@ __webpack_require__.d(colorPalettes_namespaceObject, {
936
942
  var JsonSchemaForm_namespaceObject = {};
937
943
  __webpack_require__.r(JsonSchemaForm_namespaceObject);
938
944
  __webpack_require__.d(JsonSchemaForm_namespaceObject, {
945
+ Fields: () => (fields),
939
946
  Form: () => (JsonSchemaForm_Form),
940
947
  Templates: () => (templates),
941
948
  Theme: () => (Theme),
942
949
  Widgets: () => (widgets),
950
+ generateFields: () => (generateFields),
943
951
  generateForm: () => (generateForm),
944
952
  generateTemplates: () => (generateTemplates),
945
953
  generateTheme: () => (generateTheme),
@@ -7646,8 +7654,8 @@ const useAccordionGroupContext = () => (0,external_react_namespaceObject.useCont
7646
7654
  const useAccordionGroup = () => {
7647
7655
  const [openedAccordions, setOpenedAccordions] = (0,external_react_namespaceObject.useState)([]);
7648
7656
  const [stayOpen, setStayOpen] = (0,external_react_namespaceObject.useState)(false);
7649
- const toggleOpenedAccordion = accordion => {
7650
- const isOpened = !!openedAccordions.find(activeAccordion => activeAccordion.id === accordion.id);
7657
+ const toggleOpenedAccordion = (accordion, opened) => {
7658
+ const isOpened = opened ?? !!openedAccordions.find(activeAccordion => activeAccordion.id === accordion.id);
7651
7659
  if (stayOpen) {
7652
7660
  const newOpenedAccordions = isOpened ? openedAccordions.filter(activeAccordion => activeAccordion.id !== accordion.id) : openedAccordions.concat([accordion]);
7653
7661
  setOpenedAccordions(newOpenedAccordions);
@@ -7732,20 +7740,15 @@ const AccordionGroup = ({
7732
7740
  children: external_react_namespaceObject.Children.map(children, child => {
7733
7741
  if (/*#__PURE__*/(0,external_react_namespaceObject.isValidElement)(child)) {
7734
7742
  const {
7735
- renderContent,
7736
- renderTitle,
7737
- ...rest
7743
+ id
7738
7744
  } = child.props;
7739
- const id = rest.id;
7740
7745
  const isOpened = !!openedAccordions?.find(activeAccordion => activeAccordion.id === id);
7741
7746
  return /*#__PURE__*/(0,external_react_namespaceObject.cloneElement)(child, {
7742
7747
  key: id,
7743
7748
  isOpened,
7744
7749
  size,
7745
7750
  onClick: () => toggleOpenedAccordion({
7746
- id,
7747
- renderContent: renderContent.bind(null, rest),
7748
- renderTitle: renderTitle.bind(null, rest)
7751
+ id
7749
7752
  })
7750
7753
  });
7751
7754
  }
@@ -7823,7 +7826,8 @@ const AccordionTitle = ({
7823
7826
  isOpened,
7824
7827
  ariaControls,
7825
7828
  className,
7826
- onClick
7829
+ onClick,
7830
+ ...props
7827
7831
  }) => {
7828
7832
  const theme = (0,react_namespaceObject.useTheme)();
7829
7833
  const styles = createTitleStyles(theme, isOpened);
@@ -7840,6 +7844,7 @@ const AccordionTitle = ({
7840
7844
  onClick();
7841
7845
  }
7842
7846
  },
7847
+ ...props,
7843
7848
  children: (0,jsx_runtime_namespaceObject.jsxs)(external_react_namespaceObject.Fragment, {
7844
7849
  children: [title, isOpened ? (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
7845
7850
  name: "carrot-down"
@@ -16205,6 +16210,437 @@ const GaugeChartComponent = ({
16205
16210
  const GaugeChart = WithFullscreenMode(GaugeChartComponent);
16206
16211
  ;// ./src/components/Charts/GaugeChart/index.ts
16207
16212
 
16213
+ ;// ./src/components/Charts/BarGaugeChart/components/BarGaugeChartHeader.tsx
16214
+
16215
+ function BarGaugeChartHeader_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
16216
+
16217
+
16218
+
16219
+
16220
+ const BarGaugeChartHeader_FullScreenButton = /*#__PURE__*/base_default()(Button_Button, true ? {
16221
+ target: "e1kdngqn0"
16222
+ } : 0)("height:auto;padding:0;background:none;box-shadow:none;&:hover,&:focus{background:none;box-shadow:none;&::before{display:none;}}&:hover{svg path{fill:", ({
16223
+ theme
16224
+ }) => theme.colors.greyDarker, ";}}" + ( true ? "" : 0));
16225
+ var BarGaugeChartHeader_ref = true ? {
16226
+ name: "1pqzlpx",
16227
+ styles: "width:auto;margin-left:auto"
16228
+ } : 0;
16229
+ var BarGaugeChartHeader_ref2 = true ? {
16230
+ name: "e0dnmk",
16231
+ styles: "cursor:pointer"
16232
+ } : 0;
16233
+ const BarGaugeChartHeader = ({
16234
+ features = []
16235
+ }) => {
16236
+ const {
16237
+ isFullscreenMode,
16238
+ toggleFullscreenMode
16239
+ } = useFullscreenMode();
16240
+ const theme = (0,react_namespaceObject.useTheme)();
16241
+ return (0,jsx_runtime_namespaceObject.jsx)(Wrapper_Wrapper, {
16242
+ css: BarGaugeChartHeader_ref,
16243
+ children: features.includes('fullscreenMode') && (0,jsx_runtime_namespaceObject.jsx)(BarGaugeChartHeader_FullScreenButton, {
16244
+ variant: "tertiary",
16245
+ onClick: toggleFullscreenMode,
16246
+ children: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
16247
+ name: isFullscreenMode ? 'cross' : 'maximize',
16248
+ css: BarGaugeChartHeader_ref2,
16249
+ tooltip: isFullscreenMode ? 'Close' : 'Maximize',
16250
+ size: 18,
16251
+ color: theme.colors.greyFilterIcon
16252
+ })
16253
+ })
16254
+ });
16255
+ };
16256
+ ;// ./src/components/Charts/BarGaugeChart/components/Brick.tsx
16257
+
16258
+ const Brick = /*#__PURE__*/base_default()('div', true ? {
16259
+ shouldForwardProp: propName => !propName.startsWith('$'),
16260
+ target: "e1v2was00"
16261
+ } : 0)("position:relative;height:100%;width:", ({
16262
+ $width
16263
+ }) => `${$width}px`, ";background:", ({
16264
+ $color
16265
+ }) => $color, ";border-radius:12px;overflow:hidden;opacity:", ({
16266
+ $inactive
16267
+ }) => $inactive ? 0.4 : 1, ";&::after{content:'';position:absolute;inset:0;background:rgba(85, 87, 90, 0.1);opacity:", ({
16268
+ $inactive
16269
+ }) => $inactive ? 1 : 0, ";transition:opacity 0.2s;}" + ( true ? "" : 0));
16270
+ ;// ./src/components/Charts/BarGaugeChart/components/GaugeBar.tsx
16271
+ function GaugeBar_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
16272
+
16273
+
16274
+
16275
+
16276
+
16277
+ var GaugeBar_ref = true ? {
16278
+ name: "11upmbz",
16279
+ styles: "flex:1;width:100%;display:flex;flex-direction:column"
16280
+ } : 0;
16281
+ var GaugeBar_ref2 = true ? {
16282
+ name: "1iczwj8",
16283
+ styles: "font-weight:500;font-size:12px"
16284
+ } : 0;
16285
+ var GaugeBar_ref3 = true ? {
16286
+ name: "1r965ij",
16287
+ styles: "flex:1;gap:10px"
16288
+ } : 0;
16289
+ var GaugeBar_ref4 = true ? {
16290
+ name: "xvarew",
16291
+ styles: "font-weight:700;font-size:18px"
16292
+ } : 0;
16293
+ const GaugeBar = ({
16294
+ title,
16295
+ value,
16296
+ min = 0,
16297
+ max = 100,
16298
+ gap = 2,
16299
+ brickWidth = 6,
16300
+ thresholds = [],
16301
+ valueFormatter
16302
+ }) => {
16303
+ const {
16304
+ ref,
16305
+ width
16306
+ } = (0,hooks_namespaceObject.useElementSize)();
16307
+ const {
16308
+ ref: valueRef,
16309
+ width: valueWidth
16310
+ } = (0,hooks_namespaceObject.useElementSize)();
16311
+ const theme = (0,react_namespaceObject.useTheme)();
16312
+ const baseThreshold = {
16313
+ value: 0,
16314
+ color: theme.colors.green
16315
+ };
16316
+ const _thresholds = thresholds.slice().sort((a, b) => b.value - a.value);
16317
+ const activeThreshold = _thresholds.find(threshold => value >= threshold.value) || baseThreshold;
16318
+ const totalBricks = Math.max(0, Math.floor((width - valueWidth) / (brickWidth + gap)) - 1);
16319
+ const percentagePerBrick = (max - min) / totalBricks;
16320
+ const bricks = new Array(totalBricks).fill(0).map((_, index) => {
16321
+ const brickValue = min + index * percentagePerBrick;
16322
+ const threshold = _thresholds.find(threshold => brickValue >= threshold.value) || baseThreshold;
16323
+ const inactive = value < brickValue;
16324
+ return (0,jsx_runtime_namespaceObject.jsx)(Brick, {
16325
+ $width: brickWidth,
16326
+ $color: threshold.color,
16327
+ $inactive: inactive
16328
+ }, index);
16329
+ });
16330
+ return (0,jsx_runtime_namespaceObject.jsxs)("div", {
16331
+ css: GaugeBar_ref,
16332
+ children: [(0,jsx_runtime_namespaceObject.jsx)("div", {
16333
+ css: GaugeBar_ref2,
16334
+ children: title
16335
+ }), (0,jsx_runtime_namespaceObject.jsxs)(Wrapper_Wrapper, {
16336
+ ref: ref,
16337
+ css: GaugeBar_ref3,
16338
+ children: [(0,jsx_runtime_namespaceObject.jsx)("div", {
16339
+ css: /*#__PURE__*/(0,react_namespaceObject.css)({
16340
+ flex: 1,
16341
+ height: '100%',
16342
+ padding: '10px 0',
16343
+ display: 'flex',
16344
+ gap: `${gap}px`
16345
+ }, true ? "" : 0, true ? "" : 0),
16346
+ children: bricks
16347
+ }), (0,jsx_runtime_namespaceObject.jsx)("div", {
16348
+ ref: valueRef,
16349
+ style: {
16350
+ color: activeThreshold.color
16351
+ },
16352
+ css: GaugeBar_ref4,
16353
+ children: valueFormatter?.(value, activeThreshold.color) || value
16354
+ })]
16355
+ })]
16356
+ });
16357
+ };
16358
+ ;// ./src/components/Charts/BarGaugeChart/BarGaugeChart.tsx
16359
+ function BarGaugeChart_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
16360
+
16361
+
16362
+
16363
+
16364
+ var BarGaugeChart_ref = true ? {
16365
+ name: "s3tb3c",
16366
+ styles: "height:100%;gap:12px"
16367
+ } : 0;
16368
+ const BarGaugeChartComponent = ({
16369
+ title,
16370
+ widgetCardProps,
16371
+ bars = [],
16372
+ features = []
16373
+ }) => (0,jsx_runtime_namespaceObject.jsx)(WithWidgetCard, {
16374
+ features: features,
16375
+ cardProps: {
16376
+ title,
16377
+ headerContent: (0,jsx_runtime_namespaceObject.jsx)(BarGaugeChartHeader, {
16378
+ features: features
16379
+ }),
16380
+ ...widgetCardProps
16381
+ },
16382
+ children: (0,jsx_runtime_namespaceObject.jsx)(Wrapper_Wrapper, {
16383
+ direction: "column",
16384
+ alignItems: "start",
16385
+ css: BarGaugeChart_ref,
16386
+ children: bars.map((barProps, index) => (0,jsx_runtime_namespaceObject.jsx)(GaugeBar, {
16387
+ ...barProps
16388
+ }, index))
16389
+ })
16390
+ });
16391
+ const BarGaugeChart = WithFullscreenMode(BarGaugeChartComponent);
16392
+ ;// ./src/components/Charts/BarGaugeChart/index.ts
16393
+
16394
+
16395
+ ;// ./src/components/Charts/BigNumberChart/components/BigNumberChartHeader.tsx
16396
+
16397
+ function BigNumberChartHeader_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
16398
+
16399
+
16400
+
16401
+
16402
+ const BigNumberChartHeader_FullScreenButton = /*#__PURE__*/base_default()(Button_Button, true ? {
16403
+ target: "elke6i10"
16404
+ } : 0)("height:auto;padding:0;background:none;box-shadow:none;&:hover,&:focus{background:none;box-shadow:none;&::before{display:none;}}&:hover{svg path{fill:", ({
16405
+ theme
16406
+ }) => theme.colors.greyDarker, ";}}" + ( true ? "" : 0));
16407
+ var BigNumberChartHeader_ref = true ? {
16408
+ name: "1pqzlpx",
16409
+ styles: "width:auto;margin-left:auto"
16410
+ } : 0;
16411
+ var BigNumberChartHeader_ref2 = true ? {
16412
+ name: "e0dnmk",
16413
+ styles: "cursor:pointer"
16414
+ } : 0;
16415
+ const BigNumberChartHeader = ({
16416
+ features = []
16417
+ }) => {
16418
+ const {
16419
+ isFullscreenMode,
16420
+ toggleFullscreenMode
16421
+ } = useFullscreenMode();
16422
+ const theme = (0,react_namespaceObject.useTheme)();
16423
+ return (0,jsx_runtime_namespaceObject.jsx)(Wrapper_Wrapper, {
16424
+ css: BigNumberChartHeader_ref,
16425
+ children: features.includes('fullscreenMode') && (0,jsx_runtime_namespaceObject.jsx)(BigNumberChartHeader_FullScreenButton, {
16426
+ variant: "tertiary",
16427
+ onClick: toggleFullscreenMode,
16428
+ children: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
16429
+ name: isFullscreenMode ? 'cross' : 'maximize',
16430
+ css: BigNumberChartHeader_ref2,
16431
+ tooltip: isFullscreenMode ? 'Close' : 'Maximize',
16432
+ size: 18,
16433
+ color: theme.colors.greyFilterIcon
16434
+ })
16435
+ })
16436
+ });
16437
+ };
16438
+ ;// external "@nivo/core"
16439
+ const core_namespaceObject = require("@nivo/core");
16440
+ ;// external "@nivo/line"
16441
+ const line_namespaceObject = require("@nivo/line");
16442
+ ;// ./src/components/Charts/BigNumberChart/components/TrendLineTooltip.tsx
16443
+
16444
+
16445
+ const TrendLineTooltipStyled = /*#__PURE__*/base_default()("div", true ? {
16446
+ target: "e19yhkwp0"
16447
+ } : 0)("background:", ({
16448
+ theme
16449
+ }) => theme.colors.white, ";border:1px solid ", ({
16450
+ theme
16451
+ }) => theme.colors.grey20, ";border-radius:8px;color:", ({
16452
+ theme
16453
+ }) => theme.colors.greyDarker, ";font-weight:600;line-height:12px;font-size:10px;padding:0.5rem;" + ( true ? "" : 0));
16454
+ const TrendLineTooltip = ({
16455
+ point,
16456
+ valueFormat
16457
+ }) => {
16458
+ const {
16459
+ data
16460
+ } = point;
16461
+ const {
16462
+ xFormatted,
16463
+ yFormatted
16464
+ } = point.data;
16465
+ return (0,jsx_runtime_namespaceObject.jsx)(TrendLineTooltipStyled, {
16466
+ children: valueFormat?.(data) ?? `${xFormatted} - ${yFormatted}`
16467
+ });
16468
+ };
16469
+ ;// ./src/components/Charts/BigNumberChart/components/TrendLine.tsx
16470
+
16471
+
16472
+
16473
+
16474
+
16475
+ const ActivePoint = ({
16476
+ currentPoint,
16477
+ ...props
16478
+ }) => (0,jsx_runtime_namespaceObject.jsx)("g", {
16479
+ children: currentPoint && (0,jsx_runtime_namespaceObject.jsx)(core_namespaceObject.DotsItem, {
16480
+ size: props.pointSize || 10,
16481
+ borderWidth: props.pointBorderWidth || 10,
16482
+ x: currentPoint.x,
16483
+ y: currentPoint.y,
16484
+ datum: currentPoint.data,
16485
+ color: currentPoint.color,
16486
+ borderColor: currentPoint.borderColor,
16487
+ labelYOffset: props.pointLabelYOffset
16488
+ }, currentPoint.id)
16489
+ });
16490
+ const TrendLine = ({
16491
+ color,
16492
+ tooltipValueFormat,
16493
+ ...props
16494
+ }) => {
16495
+ const theme = (0,react_namespaceObject.useTheme)();
16496
+ const _color = color ?? theme.colors.purpleDark;
16497
+ return (0,jsx_runtime_namespaceObject.jsx)(line_namespaceObject.ResponsiveLine, {
16498
+ axisBottom: null,
16499
+ axisLeft: null,
16500
+ axisRight: null,
16501
+ axisTop: null,
16502
+ colors: _color,
16503
+ curve: "linear",
16504
+ enableArea: true,
16505
+ enableGridX: false,
16506
+ enableGridY: false,
16507
+ enablePoints: false,
16508
+ lineWidth: 2,
16509
+ pointBorderWidth: 2,
16510
+ pointColor: "black",
16511
+ pointLabelYOffset: -12,
16512
+ pointSize: 5,
16513
+ useMesh: true,
16514
+ enableTouchCrosshair: true,
16515
+ defs: [{
16516
+ colors: [{
16517
+ color: _color,
16518
+ offset: 0
16519
+ }, {
16520
+ color: theme.colors.white,
16521
+ offset: 100
16522
+ }],
16523
+ id: 'gradientA',
16524
+ type: 'linearGradient'
16525
+ }],
16526
+ fill: [{
16527
+ id: 'gradientA',
16528
+ match: '*'
16529
+ }],
16530
+ enableCrosshair: false,
16531
+ animate: false,
16532
+ yScale: {
16533
+ type: 'linear',
16534
+ stacked: true,
16535
+ reverse: false
16536
+ },
16537
+ pointBorderColor: {
16538
+ from: 'serieColor'
16539
+ },
16540
+ margin: {
16541
+ top: 5,
16542
+ right: 5,
16543
+ bottom: 5,
16544
+ left: 5
16545
+ },
16546
+ legends: [],
16547
+ tooltip: args => (0,jsx_runtime_namespaceObject.jsx)(TrendLineTooltip, {
16548
+ ...args,
16549
+ valueFormat: tooltipValueFormat
16550
+ }),
16551
+ layers: ['grid', 'markers', 'axes', 'areas', 'crosshair', 'lines', 'points', 'slices', 'mesh', 'legends', ActivePoint],
16552
+ ...props
16553
+ });
16554
+ };
16555
+ ;// ./src/components/Charts/BigNumberChart/BigNumberChart.tsx
16556
+ function BigNumberChart_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
16557
+
16558
+
16559
+
16560
+
16561
+
16562
+
16563
+ var BigNumberChart_ref = true ? {
16564
+ name: "qdcqne",
16565
+ styles: "height:100%;justify-content:space-between"
16566
+ } : 0;
16567
+ var BigNumberChart_ref2 = true ? {
16568
+ name: "gfqabp",
16569
+ styles: "font-size:32px;font-weight:700"
16570
+ } : 0;
16571
+ var BigNumberChart_ref3 = true ? {
16572
+ name: "26qidl",
16573
+ styles: "position:relative;width:100%;height:50%"
16574
+ } : 0;
16575
+ var BigNumberChart_ref4 = true ? {
16576
+ name: "19s8nj4",
16577
+ styles: "position:absolute;width:100%;height:100%"
16578
+ } : 0;
16579
+ const BigNumberChartComponent = ({
16580
+ data,
16581
+ title,
16582
+ widgetCardProps,
16583
+ trendLineProps,
16584
+ interactive = true,
16585
+ features = [],
16586
+ valueFormat
16587
+ }) => {
16588
+ const [hoveredValue, setHoveredValue] = (0,external_react_namespaceObject.useState)(null);
16589
+ const lastValue = data.sort((a, b) => {
16590
+ const ax = a.x ?? 0;
16591
+ const bx = b.x ?? 0;
16592
+ return Number(ax) - Number(bx);
16593
+ }).at(-1);
16594
+ const setHoveredValueThrottled = (0,hooks_namespaceObject.useThrottledCallback)(value => {
16595
+ setHoveredValue(value);
16596
+ }, 100);
16597
+ const handleMouseMove = data => {
16598
+ if (!interactive) return;
16599
+ setHoveredValueThrottled(data.data);
16600
+ };
16601
+ const handleMouseLeave = () => {
16602
+ setHoveredValueThrottled(null);
16603
+ };
16604
+ const value = hoveredValue ?? lastValue;
16605
+ return (0,jsx_runtime_namespaceObject.jsx)(WithWidgetCard, {
16606
+ features: features,
16607
+ cardProps: {
16608
+ title,
16609
+ headerContent: (0,jsx_runtime_namespaceObject.jsx)(BigNumberChartHeader, {
16610
+ features: features
16611
+ }),
16612
+ ...widgetCardProps
16613
+ },
16614
+ children: (0,jsx_runtime_namespaceObject.jsxs)(Wrapper_Wrapper, {
16615
+ direction: "column",
16616
+ alignItems: "start",
16617
+ css: BigNumberChart_ref,
16618
+ children: [(0,jsx_runtime_namespaceObject.jsx)("div", {
16619
+ css: BigNumberChart_ref2,
16620
+ children: (0,jsx_runtime_namespaceObject.jsx)("span", {
16621
+ children: value && (valueFormat?.(value) ?? value?.y?.toString())
16622
+ })
16623
+ }), (0,jsx_runtime_namespaceObject.jsx)("div", {
16624
+ css: BigNumberChart_ref3,
16625
+ children: (0,jsx_runtime_namespaceObject.jsx)("div", {
16626
+ css: BigNumberChart_ref4,
16627
+ children: (0,jsx_runtime_namespaceObject.jsx)(TrendLine, {
16628
+ ...trendLineProps,
16629
+ data: [{
16630
+ id: 'trend-line',
16631
+ data
16632
+ }],
16633
+ onMouseMove: handleMouseMove,
16634
+ onMouseLeave: handleMouseLeave
16635
+ })
16636
+ })
16637
+ })]
16638
+ })
16639
+ });
16640
+ };
16641
+ const BigNumberChart = WithFullscreenMode(BigNumberChartComponent);
16642
+ ;// ./src/components/Charts/BigNumberChart/index.ts
16643
+
16208
16644
  ;// ./src/components/Charts/index.ts
16209
16645
 
16210
16646
 
@@ -16213,6 +16649,8 @@ const GaugeChart = WithFullscreenMode(GaugeChartComponent);
16213
16649
 
16214
16650
 
16215
16651
 
16652
+
16653
+
16216
16654
  ;// ./src/components/Popover/hooks/index.ts
16217
16655
 
16218
16656
 
@@ -16367,6 +16805,83 @@ const SearchBox = ({
16367
16805
 
16368
16806
 
16369
16807
 
16808
+ ;// external "@react-input/number-format"
16809
+ const number_format_namespaceObject = require("@react-input/number-format");
16810
+ ;// ./src/components/NumberField/NumberField.tsx
16811
+ function NumberField_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
16812
+
16813
+
16814
+
16815
+
16816
+ var NumberField_ref = true ? {
16817
+ name: "t1bvca",
16818
+ styles: "padding:0 14px"
16819
+ } : 0;
16820
+ var NumberField_ref2 = true ? {
16821
+ name: "chpy5q",
16822
+ styles: "with:auto;border:0 !important;padding:2px 0;height:32px;border-radius:0"
16823
+ } : 0;
16824
+ const NumberField = ({
16825
+ id,
16826
+ value,
16827
+ defaultValue,
16828
+ description,
16829
+ label,
16830
+ success,
16831
+ error,
16832
+ status,
16833
+ numberFormat,
16834
+ onChange,
16835
+ ...inputProps
16836
+ }) => {
16837
+ const {
16838
+ disabled
16839
+ } = inputProps;
16840
+ const formattedValue = value == null ? value : (0,number_format_namespaceObject.format)(value, numberFormat);
16841
+ const formattedDefaultValue = defaultValue == null ? defaultValue : (0,number_format_namespaceObject.format)(defaultValue, numberFormat);
16842
+ const [_value, setValue] = (0,hooks_namespaceObject.useUncontrolled)({
16843
+ value: formattedValue,
16844
+ defaultValue: formattedDefaultValue,
16845
+ finalValue: undefined,
16846
+ onChange: value => {
16847
+ const number = Number((0,number_format_namespaceObject.unformat)(value, numberFormat?.locales));
16848
+ onChange?.(number);
16849
+ }
16850
+ });
16851
+ const inputRef = (0,number_format_namespaceObject.useNumberFormat)(numberFormat);
16852
+ const handleChange = event => {
16853
+ setValue(event.target.value);
16854
+ };
16855
+ return (0,jsx_runtime_namespaceObject.jsxs)(FieldRoot, {
16856
+ disabled: disabled,
16857
+ status: status,
16858
+ children: [label && (0,jsx_runtime_namespaceObject.jsx)(FieldLabel, {
16859
+ htmlFor: id,
16860
+ children: label
16861
+ }), (0,jsx_runtime_namespaceObject.jsx)(FieldControl, {
16862
+ css: NumberField_ref,
16863
+ children: (0,jsx_runtime_namespaceObject.jsx)(Input_Input, {
16864
+ ref: inputRef,
16865
+ css: NumberField_ref2,
16866
+ inputProps: {
16867
+ autoComplete: 'off',
16868
+ value: _value,
16869
+ onChange: handleChange
16870
+ },
16871
+ status: "custom",
16872
+ ...inputProps
16873
+ })
16874
+ }), description && (0,jsx_runtime_namespaceObject.jsx)(FieldDescription, {
16875
+ children: description
16876
+ }), success && (0,jsx_runtime_namespaceObject.jsx)(FieldSuccess, {
16877
+ children: success
16878
+ }), error && (0,jsx_runtime_namespaceObject.jsx)(FieldError, {
16879
+ children: error
16880
+ })]
16881
+ });
16882
+ };
16883
+ ;// ./src/components/NumberField/index.ts
16884
+
16370
16885
  ;// ./src/components/Tooltip/SimpleChartTooltip.tsx
16371
16886
 
16372
16887
 
@@ -16565,7 +17080,7 @@ const useTypeahead = ({
16565
17080
  setInputValue('');
16566
17081
  setFirstSuggestion('');
16567
17082
  } else {
16568
- setValue?.(name, selected.length ? selected[0] : undefined, {
17083
+ setValue?.(name, selected.length ? selected[0] : [], {
16569
17084
  shouldDirty: !isFirstRender
16570
17085
  });
16571
17086
  }
@@ -16589,22 +17104,25 @@ const useTypeahead = ({
16589
17104
  }
16590
17105
  }, [error]);
16591
17106
  (0,external_react_namespaceObject.useEffect)(() => {
16592
- const keyedOptions = {};
16593
- const childItems = external_react_default().Children.toArray(children).filter(Boolean).map((child, index) => {
16594
- keyedOptions[child.props.value] = {
16595
- ...child.props
16596
- };
16597
- return /*#__PURE__*/external_react_default().cloneElement(child, {
16598
- index,
16599
- ...child.props
16600
- });
17107
+ processChildren({
17108
+ selectedLocal: selected
16601
17109
  });
16602
- setOptionsWithKey(keyedOptions);
16603
- setItems(childItems);
16604
- setFirstRender(false);
16605
- }, [selectedItems, children]);
17110
+ }, [children]);
16606
17111
  (0,external_react_namespaceObject.useEffect)(() => {
16607
17112
  setSelected(selectedItems || []);
17113
+ if (selectedItems?.length) {
17114
+ if (!isMultiple) {
17115
+ const currentOption = optionsWithKey[selectedItems[0]];
17116
+ const optionText = currentOption && (currentOption.children || currentOption.label || currentOption.value);
17117
+ setInputValue(`${optionText}`);
17118
+ }
17119
+ } else {
17120
+ setInputValue('');
17121
+ setFirstSuggestion('');
17122
+ }
17123
+ processChildren({
17124
+ selectedLocal: selectedItems || []
17125
+ });
16608
17126
  }, [selectedItems]);
16609
17127
  (0,external_react_namespaceObject.useEffect)(() => {
16610
17128
  const childrenArray = external_react_default().Children.toArray(children).filter(Boolean);
@@ -16648,17 +17166,16 @@ const useTypeahead = ({
16648
17166
  setSelected([]);
16649
17167
  }
16650
17168
  if (foundItem && !selected.includes(foundItem?.value)) {
16651
- setSelected([foundItem?.value]);
17169
+ setSelected([foundItem.value]);
16652
17170
  }
16653
17171
  }
16654
17172
  }, [optionsWithKey, inputValue]);
16655
17173
  (0,external_react_namespaceObject.useEffect)(() => {
16656
- if (!isMultiple && selected.length && Object.keys(optionsWithKey).length) {
16657
- const currentOption = optionsWithKey[selected[0]];
16658
- const optionText = currentOption && (currentOption.children || currentOption.label || currentOption.value);
16659
- setInputValue(`${optionText}`);
16660
- }
16661
- }, [selected, optionsWithKey]);
17174
+ processSingleSelected({
17175
+ optionsWithKeyLocal: optionsWithKey,
17176
+ selectedLocal: selected
17177
+ });
17178
+ }, [selected]);
16662
17179
  (0,external_react_namespaceObject.useEffect)(() => {
16663
17180
  if (inputValue) {
16664
17181
  const newFirstSuggestion = Object.values(optionsWithKey)?.find(item => {
@@ -16675,12 +17192,41 @@ const useTypeahead = ({
16675
17192
  }
16676
17193
  }
16677
17194
  }, [inputValue, items, selected]);
16678
- (0,external_react_namespaceObject.useEffect)(() => {
16679
- onEmptyChange?.(isEmpty);
16680
- }, [isEmpty]);
17195
+ const processSingleSelected = ({
17196
+ optionsWithKeyLocal = {},
17197
+ selectedLocal = []
17198
+ }) => {
17199
+ if (!isMultiple && selectedLocal.length && Object.keys(optionsWithKeyLocal).length) {
17200
+ const currentOption = optionsWithKeyLocal[selectedLocal[0]];
17201
+ const optionText = currentOption && (currentOption.children || currentOption.label || currentOption.value);
17202
+ setInputValue(`${optionText}`);
17203
+ }
17204
+ };
17205
+ const processChildren = ({
17206
+ selectedLocal
17207
+ }) => {
17208
+ const keyedOptions = {};
17209
+ const childItems = external_react_default().Children.toArray(children).filter(Boolean).map((child, index) => {
17210
+ keyedOptions[child.props.value] = {
17211
+ ...child.props
17212
+ };
17213
+ return /*#__PURE__*/external_react_default().cloneElement(child, {
17214
+ index,
17215
+ ...child.props
17216
+ });
17217
+ });
17218
+ setOptionsWithKey(keyedOptions);
17219
+ setItems(childItems);
17220
+ processSingleSelected({
17221
+ optionsWithKeyLocal: keyedOptions,
17222
+ selectedLocal
17223
+ });
17224
+ setFirstRender(false);
17225
+ };
16681
17226
  const handleOnEmptyChange = newIsEmptyValue => {
16682
17227
  if (newIsEmptyValue !== isEmpty) {
16683
17228
  setIsEmpty(newIsEmptyValue);
17229
+ onEmptyChange?.(newIsEmptyValue);
16684
17230
  }
16685
17231
  };
16686
17232
  const handleOpenChange = open => {
@@ -16944,6 +17490,7 @@ const MultipleTrigger = () => {
16944
17490
  name: context.inputName,
16945
17491
  status: 'custom',
16946
17492
  disabled: context.isDisabled,
17493
+ validationSchema: context.validationSchema,
16947
17494
  inputProps: {
16948
17495
  onClick: context.handleInputClick,
16949
17496
  onKeyDown: context.handleInputKeyDown,
@@ -17004,6 +17551,7 @@ const SingleTrigger = () => {
17004
17551
  name: context.inputName,
17005
17552
  status: 'custom',
17006
17553
  disabled: context.isDisabled,
17554
+ validationSchema: context.validationSchema,
17007
17555
  inputProps: {
17008
17556
  onClick: context.handleInputClick,
17009
17557
  onKeyDown: context.handleInputKeyDown,
@@ -17288,6 +17836,8 @@ const highlightInputMatch = (item, keyword) => {
17288
17836
 
17289
17837
 
17290
17838
 
17839
+
17840
+
17291
17841
  ;// ./src/components/UserProfile/styles.ts
17292
17842
  function UserProfile_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
17293
17843
 
@@ -17459,18 +18009,13 @@ const WithVisibleUpToLG = (Component, styles) => {
17459
18009
  ;// ./src/components/WithVisibleUpToLG/index.ts
17460
18010
 
17461
18011
  ;// external "@rjsf/core"
17462
- const core_namespaceObject = require("@rjsf/core");
18012
+ const external_rjsf_core_namespaceObject = require("@rjsf/core");
17463
18013
  ;// external "@rjsf/utils"
17464
18014
  const external_rjsf_utils_namespaceObject = require("@rjsf/utils");
17465
18015
  ;// ./src/components/JsonSchemaForm/templates/SubmitButton.tsx
17466
- function SubmitButton_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
17467
18016
 
17468
18017
 
17469
18018
 
17470
- var SubmitButton_ref = true ? {
17471
- name: "xda5ep",
17472
- styles: "margin-top:12px"
17473
- } : 0;
17474
18019
  const SubmitButton = ({
17475
18020
  uiSchema
17476
18021
  }) => {
@@ -17484,7 +18029,6 @@ const SubmitButton = ({
17484
18029
  }
17485
18030
  return (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
17486
18031
  type: "submit",
17487
- css: SubmitButton_ref,
17488
18032
  ...submitButtonProps,
17489
18033
  "data-testid": "rjsf-submit-button",
17490
18034
  children: submitText
@@ -18100,10 +18644,13 @@ const RadioWidget = props => {
18100
18644
 
18101
18645
  const SelectWidget = props => {
18102
18646
  const {
18647
+ id,
18648
+ name,
18103
18649
  disabled,
18104
18650
  options,
18105
18651
  placeholder,
18106
18652
  onChange,
18653
+ onBlur,
18107
18654
  onChangeOverride,
18108
18655
  value
18109
18656
  } = props;
@@ -18112,24 +18659,49 @@ const SelectWidget = props => {
18112
18659
  enumDisabled = []
18113
18660
  } = options;
18114
18661
  const selectedIndex = (0,external_rjsf_utils_namespaceObject.enumOptionsIndexForValue)(value, enumOptions);
18115
- const handleChange = onChangeOverride ? onChangeOverride : ({
18116
- value
18117
- }) => onChange((0,external_rjsf_utils_namespaceObject.enumOptionsValueForIndex)(value, enumOptions));
18118
- return (0,jsx_runtime_namespaceObject.jsx)("div", {
18119
- children: (0,jsx_runtime_namespaceObject.jsx)(Dropdown_Dropdown, {
18120
- isDisabled: disabled,
18121
- onChange: handleChange,
18122
- placeholder: placeholder,
18123
- selectedItem: selectedIndex ? {
18124
- value: selectedIndex,
18125
- label: enumOptions[Number(selectedIndex)].label
18126
- } : undefined,
18127
- children: Array.isArray(enumOptions) && enumOptions.map((option, i) => (0,jsx_runtime_namespaceObject.jsx)(DropdownOption_DropdownOption, {
18128
- value: String(i),
18129
- label: option.label,
18130
- isDisabled: disabled || Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1
18131
- }, i))
18132
- })
18662
+ const handleChange = onChangeOverride ? onChangeOverride : value => {
18663
+ onChange(value);
18664
+ };
18665
+ const handleBlur = ({
18666
+ target
18667
+ }) => onBlur(id, target && target.value);
18668
+ const onEmptyChange = isEmpty => {
18669
+ if (isEmpty) {
18670
+ handleChange();
18671
+ }
18672
+ };
18673
+ const register = fieldName => ({
18674
+ onBlur: handleBlur,
18675
+ onChange: handleChange,
18676
+ name: fieldName,
18677
+ ref: () => {}
18678
+ });
18679
+ const items = Array.isArray(enumOptions) ? enumOptions : [];
18680
+ const selectedItems = selectedIndex ? [items[Number(selectedIndex)].value] : [];
18681
+ return (0,jsx_runtime_namespaceObject.jsx)(Typeahead, {
18682
+ width: "100%",
18683
+ selectedItems: selectedItems,
18684
+ isDisabled: disabled,
18685
+ name: name
18686
+ // RJSF provides placeholder as empty string
18687
+ ,
18688
+ placeholder: placeholder || undefined,
18689
+ onChange: handleChange,
18690
+ register: register,
18691
+ onEmptyChange: onEmptyChange,
18692
+ renderOption: ({
18693
+ label,
18694
+ input
18695
+ }) => highlightInputMatch(label, input),
18696
+ children: items.map(({
18697
+ label,
18698
+ value
18699
+ }) => (0,jsx_runtime_namespaceObject.jsx)(TypeaheadOption_TypeaheadOption, {
18700
+ value: value,
18701
+ label: label || value,
18702
+ isDisabled: disabled || Array.isArray(enumDisabled) && enumDisabled.includes(value),
18703
+ children: label || value
18704
+ }, value))
18133
18705
  });
18134
18706
  };
18135
18707
  ;// ./src/components/JsonSchemaForm/widgets/PasswordWidget.tsx
@@ -18241,6 +18813,35 @@ const RangeWidget = props => {
18241
18813
  })
18242
18814
  });
18243
18815
  };
18816
+ ;// ./src/components/JsonSchemaForm/widgets/DateWidget.tsx
18817
+
18818
+
18819
+
18820
+
18821
+ const DateWidget = props => {
18822
+ const {
18823
+ value,
18824
+ name,
18825
+ uiSchema,
18826
+ onChange
18827
+ } = props;
18828
+ const useFormResult = (0,external_react_hook_form_namespaceObject.useForm)();
18829
+ const {
18830
+ outputFormat = 'yyyy-MM-dd'
18831
+ } = uiSchema?.['ui:options'] || {};
18832
+ const onDateChange = date => {
18833
+ const formattedDate = date && external_luxon_namespaceObject.DateTime.fromJSDate(date).toFormat(outputFormat);
18834
+ onChange(formattedDate);
18835
+ };
18836
+ return (0,jsx_runtime_namespaceObject.jsx)(external_react_hook_form_namespaceObject.FormProvider, {
18837
+ ...useFormResult,
18838
+ children: (0,jsx_runtime_namespaceObject.jsx)(DatePicker, {
18839
+ name: name,
18840
+ defaultValue: value,
18841
+ onChange: onDateChange
18842
+ })
18843
+ });
18844
+ };
18244
18845
  ;// ./src/components/JsonSchemaForm/widgets/index.ts
18245
18846
 
18246
18847
 
@@ -18248,6 +18849,7 @@ const RangeWidget = props => {
18248
18849
 
18249
18850
 
18250
18851
 
18852
+
18251
18853
  function generateWidgets() {
18252
18854
  return {
18253
18855
  CheckboxWidget: CheckboxWidget,
@@ -18255,25 +18857,178 @@ function generateWidgets() {
18255
18857
  RadioWidget: RadioWidget,
18256
18858
  PasswordWidget: PasswordWidget,
18257
18859
  SelectWidget: SelectWidget,
18258
- RangeWidget: RangeWidget
18860
+ RangeWidget: RangeWidget,
18861
+ DateWidget: DateWidget
18259
18862
  };
18260
18863
  }
18261
18864
  /* harmony default export */ const widgets = (generateWidgets());
18865
+ ;// ./src/components/JsonSchemaForm/fields/AccordionField.tsx
18866
+
18867
+ function AccordionField_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
18868
+
18869
+
18870
+
18871
+ const StyledAccordionTitle = /*#__PURE__*/base_default()(AccordionTitle, true ? {
18872
+ target: "eilkhls0"
18873
+ } : 0)("color:", ({
18874
+ theme
18875
+ }) => theme.colors.greyDarker, ";font-weight:700;padding:0;", ({
18876
+ collapsed
18877
+ }) => !collapsed && `margin-bottom: 20px;`, " & svg{& path{stroke:", ({
18878
+ theme
18879
+ }) => theme.colors.greyDarker80, ";}}" + ( true ? "" : 0));
18880
+ var AccordionField_ref = true ? {
18881
+ name: "1pc4ge5",
18882
+ styles: "padding:0;border:none"
18883
+ } : 0;
18884
+ var AccordionField_ref2 = true ? {
18885
+ name: "1d3w5wq",
18886
+ styles: "width:100%"
18887
+ } : 0;
18888
+ const AccordionField = props => {
18889
+ const {
18890
+ uiSchema,
18891
+ idSchema,
18892
+ name,
18893
+ schema,
18894
+ registry
18895
+ } = props;
18896
+ const accordionOptions = uiSchema?.['ui:options'] || {};
18897
+ if (!accordionOptions.targetField) {
18898
+ throw new Error('AccordionField: options.targetField is required to render AccordionField');
18899
+ }
18900
+ const title = uiSchema?.['ui:title'] ? uiSchema['ui:title'] : schema?.title ? schema.title : name;
18901
+
18902
+ // if `ui:widget` is set to 'hide', this field won't be mounted
18903
+ // useAccordionGroupContext manages the open/close state of accordions across mounts
18904
+ const {
18905
+ openedAccordions,
18906
+ toggleOpenedAccordion,
18907
+ setStayOpen
18908
+ } = useAccordionGroupContext();
18909
+ (0,external_react_namespaceObject.useEffect)(() => {
18910
+ // prevent this accordion from being auto-collapsed when another one is opened
18911
+ setStayOpen(true);
18912
+ }, []);
18913
+ const openedAccordion = openedAccordions.find(({
18914
+ id
18915
+ }) => id === idSchema.$id);
18916
+ const collapsed = openedAccordion !== undefined ? false : !!accordionOptions.collapsed;
18917
+ const onAccordionClick = () => {
18918
+ toggleOpenedAccordion({
18919
+ id: idSchema.$id
18920
+ }, !collapsed);
18921
+ };
18922
+ const TargetField = registry.fields[accordionOptions.targetField];
18923
+ const accordionId = `${idSchema.$id}.accordion`;
18924
+ return (0,jsx_runtime_namespaceObject.jsx)(Accordion, {
18925
+ id: accordionId,
18926
+ size: "small",
18927
+ ariaControls: `${accordionId}-content`,
18928
+ title: title,
18929
+ isOpened: !collapsed,
18930
+ onClick: () => onAccordionClick(),
18931
+ css: AccordionField_ref,
18932
+ renderContent: contentProps => (0,jsx_runtime_namespaceObject.jsx)(AccordionContent, {
18933
+ ...contentProps,
18934
+ css: AccordionField_ref2,
18935
+ children: (0,jsx_runtime_namespaceObject.jsx)(TargetField, {
18936
+ ...props,
18937
+ schema: {
18938
+ ...schema,
18939
+ title: ''
18940
+ }
18941
+ })
18942
+ }),
18943
+ renderTitle: titleProps => (0,jsx_runtime_namespaceObject.jsx)(StyledAccordionTitle, {
18944
+ ...titleProps,
18945
+ collapsed: collapsed
18946
+ })
18947
+ });
18948
+ };
18949
+ ;// ./src/components/JsonSchemaForm/fields/DateRangeField.tsx
18950
+
18951
+
18952
+
18953
+
18954
+ const DateRangeField = props => {
18955
+ const {
18956
+ idSchema,
18957
+ uiSchema,
18958
+ schema,
18959
+ name,
18960
+ formData,
18961
+ disabled,
18962
+ onChange
18963
+ } = props;
18964
+ if (schema.type !== 'object') {
18965
+ throw new Error('DateRangeField: schema.type must be "object" to render DateRangeField');
18966
+ }
18967
+ if (!schema.properties?.start || !schema.properties?.end) {
18968
+ throw new Error('DateRangeField: schema.properties.start and schema.properties.end are required to render DateRangeField');
18969
+ }
18970
+ const useFormResult = (0,external_react_hook_form_namespaceObject.useForm)();
18971
+ const {
18972
+ outputFormat = 'yyyy-MM-dd'
18973
+ } = uiSchema?.['ui:options'] || {};
18974
+ const title = uiSchema?.['ui:title'] ? uiSchema['ui:title'] : schema?.title ? schema.title : name;
18975
+ const id = idSchema.$id;
18976
+ const {
18977
+ start,
18978
+ end
18979
+ } = formData || {};
18980
+ const onDateRangeChange = date => {
18981
+ const [startDate, endDate] = date || [null, null];
18982
+ const start = startDate && external_luxon_namespaceObject.DateTime.fromJSDate(startDate).toFormat(outputFormat);
18983
+ const end = endDate && external_luxon_namespaceObject.DateTime.fromJSDate(endDate).toFormat(outputFormat);
18984
+ const dateRangeChange = {
18985
+ ...(start && {
18986
+ start
18987
+ }),
18988
+ ...(end && {
18989
+ end
18990
+ })
18991
+ };
18992
+ onChange(dateRangeChange);
18993
+ };
18994
+ return (0,jsx_runtime_namespaceObject.jsx)(external_react_hook_form_namespaceObject.FormProvider, {
18995
+ ...useFormResult,
18996
+ children: (0,jsx_runtime_namespaceObject.jsx)(DateRangePicker, {
18997
+ name: id,
18998
+ label: title,
18999
+ disabled: disabled,
19000
+ defaultValue: [start, end],
19001
+ onChange: onDateRangeChange
19002
+ })
19003
+ });
19004
+ };
19005
+ ;// ./src/components/JsonSchemaForm/fields/index.ts
19006
+
19007
+
19008
+ const generateFields = () => {
19009
+ return {
19010
+ accordion: AccordionField,
19011
+ daterange: DateRangeField
19012
+ };
19013
+ };
19014
+ /* harmony default export */ const fields = (generateFields());
18262
19015
  ;// ./src/components/JsonSchemaForm/index.ts
18263
19016
 
18264
19017
  function JsonSchemaForm_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
18265
19018
 
18266
19019
 
18267
19020
 
19021
+
18268
19022
  function generateTheme() {
18269
19023
  return {
18270
19024
  templates: generateTemplates(),
18271
- widgets: generateWidgets()
19025
+ widgets: generateWidgets(),
19026
+ fields: generateFields()
18272
19027
  };
18273
19028
  }
18274
19029
  const Theme = generateTheme();
18275
19030
  function generateForm() {
18276
- return (0,core_namespaceObject.withTheme)(generateTheme());
19031
+ return (0,external_rjsf_core_namespaceObject.withTheme)(generateTheme());
18277
19032
  }
18278
19033
  const UnstyledForm = generateForm();
18279
19034
  const JsonSchemaForm_Form = /*#__PURE__*/base_default()(UnstyledForm, true ? {
@@ -18396,6 +19151,7 @@ const JsonSchemaForm_Form = /*#__PURE__*/base_default()(UnstyledForm, true ? {
18396
19151
 
18397
19152
 
18398
19153
 
19154
+
18399
19155
 
18400
19156
 
18401
19157
  ;// ./src/contexts/Translation/config.ts