@genesislcap/foundation-forms 15.50.2 → 15.50.3-holiday-picker.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +416 -0
- package/dist/dts/index.d.ts +2 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/DatePickerControlRenderer.d.ts +40 -0
- package/dist/dts/jsonforms/renderers/DatePickerControlRenderer.d.ts.map +1 -0
- package/dist/dts/jsonforms/renderers/RenderersRanks.d.ts +2 -0
- package/dist/dts/jsonforms/renderers/RenderersRanks.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/ValueDateControlRenderer.d.ts +57 -0
- package/dist/dts/jsonforms/renderers/ValueDateControlRenderer.d.ts.map +1 -0
- package/dist/dts/jsonforms/renderers/date-value-format.d.ts +44 -0
- package/dist/dts/jsonforms/renderers/date-value-format.d.ts.map +1 -0
- package/dist/dts/jsonforms/renderers/renderer-data.d.ts +17 -0
- package/dist/dts/jsonforms/renderers/renderer-data.d.ts.map +1 -0
- package/dist/dts/types.d.ts +211 -1
- package/dist/dts/types.d.ts.map +1 -1
- package/dist/dts/utils/validation.d.ts +32 -0
- package/dist/dts/utils/validation.d.ts.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/jsonforms/renderers/DatePickerControlRenderer.js +131 -0
- package/dist/esm/jsonforms/renderers/RenderersRanks.js +2 -0
- package/dist/esm/jsonforms/renderers/ValueDateControlRenderer.js +275 -0
- package/dist/esm/jsonforms/renderers/date-value-format.js +70 -0
- package/dist/esm/jsonforms/renderers/renderer-data.js +36 -0
- package/dist/esm/utils/validation.js +39 -0
- package/dist/foundation-forms.api.json +479 -2
- package/dist/foundation-forms.d.ts +307 -1
- package/package.json +13 -13
|
@@ -880,6 +880,46 @@
|
|
|
880
880
|
"module": "./jsonforms/renderers/LayoutVerticalCategorizationRenderer"
|
|
881
881
|
}
|
|
882
882
|
},
|
|
883
|
+
{
|
|
884
|
+
"kind": "js",
|
|
885
|
+
"name": "DatePickerControlRendererEntry",
|
|
886
|
+
"declaration": {
|
|
887
|
+
"name": "DatePickerControlRendererEntry",
|
|
888
|
+
"module": "./jsonforms/renderers/DatePickerControlRenderer"
|
|
889
|
+
}
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
"kind": "js",
|
|
893
|
+
"name": "DatePickerControlRendererTemplate",
|
|
894
|
+
"declaration": {
|
|
895
|
+
"name": "DatePickerControlRendererTemplate",
|
|
896
|
+
"module": "./jsonforms/renderers/DatePickerControlRenderer"
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"kind": "js",
|
|
901
|
+
"name": "DEFAULT_INDEX_CONVENTIONS",
|
|
902
|
+
"declaration": {
|
|
903
|
+
"name": "DEFAULT_INDEX_CONVENTIONS",
|
|
904
|
+
"module": "./jsonforms/renderers/ValueDateControlRenderer"
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
"kind": "js",
|
|
909
|
+
"name": "ValueDateControlRendererEntry",
|
|
910
|
+
"declaration": {
|
|
911
|
+
"name": "ValueDateControlRendererEntry",
|
|
912
|
+
"module": "./jsonforms/renderers/ValueDateControlRenderer"
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
"kind": "js",
|
|
917
|
+
"name": "ValueDateControlRendererTemplate",
|
|
918
|
+
"declaration": {
|
|
919
|
+
"name": "ValueDateControlRendererTemplate",
|
|
920
|
+
"module": "./jsonforms/renderers/ValueDateControlRenderer"
|
|
921
|
+
}
|
|
922
|
+
},
|
|
883
923
|
{
|
|
884
924
|
"kind": "js",
|
|
885
925
|
"name": "controlWrapperTemplate",
|
|
@@ -2501,6 +2541,56 @@
|
|
|
2501
2541
|
},
|
|
2502
2542
|
"privacy": "public"
|
|
2503
2543
|
},
|
|
2544
|
+
{
|
|
2545
|
+
"kind": "function",
|
|
2546
|
+
"name": "mustBeOnOrAfter",
|
|
2547
|
+
"parameters": [
|
|
2548
|
+
{
|
|
2549
|
+
"name": "target",
|
|
2550
|
+
"type": {
|
|
2551
|
+
"text": "string"
|
|
2552
|
+
},
|
|
2553
|
+
"description": "the other date field, e.g. `'START_DATE'`"
|
|
2554
|
+
},
|
|
2555
|
+
{
|
|
2556
|
+
"name": "message",
|
|
2557
|
+
"default": "`Must not be before ${target}`",
|
|
2558
|
+
"description": "the error shown on the current field; defaults to `Must not be before <target>`"
|
|
2559
|
+
}
|
|
2560
|
+
],
|
|
2561
|
+
"description": "Ensures the date in the current field (the one the validator is on) is on or after the date in\nthe target field, e.g. an end date that can't be before its start date. Either field may hold\nan ISO `YYYY-MM-DD` string or epoch milliseconds; no error while either is empty.",
|
|
2562
|
+
"return": {
|
|
2563
|
+
"type": {
|
|
2564
|
+
"text": ""
|
|
2565
|
+
}
|
|
2566
|
+
},
|
|
2567
|
+
"privacy": "public"
|
|
2568
|
+
},
|
|
2569
|
+
{
|
|
2570
|
+
"kind": "function",
|
|
2571
|
+
"name": "mustBeOnOrBefore",
|
|
2572
|
+
"parameters": [
|
|
2573
|
+
{
|
|
2574
|
+
"name": "target",
|
|
2575
|
+
"type": {
|
|
2576
|
+
"text": "string"
|
|
2577
|
+
},
|
|
2578
|
+
"description": "the other date field, e.g. `'END_DATE'`"
|
|
2579
|
+
},
|
|
2580
|
+
{
|
|
2581
|
+
"name": "message",
|
|
2582
|
+
"default": "`Must not be after ${target}`",
|
|
2583
|
+
"description": "the error shown on the current field; defaults to `Must not be after <target>`"
|
|
2584
|
+
}
|
|
2585
|
+
],
|
|
2586
|
+
"description": "Ensures the date in the current field (the one the validator is on) is on or before the date\nin the target field, e.g. a start date that can't be after its end date. Either field may hold\nan ISO `YYYY-MM-DD` string or epoch milliseconds; no error while either is empty.",
|
|
2587
|
+
"return": {
|
|
2588
|
+
"type": {
|
|
2589
|
+
"text": ""
|
|
2590
|
+
}
|
|
2591
|
+
},
|
|
2592
|
+
"privacy": "public"
|
|
2593
|
+
},
|
|
2504
2594
|
{
|
|
2505
2595
|
"kind": "function",
|
|
2506
2596
|
"name": "getAnyOfErrorMessage",
|
|
@@ -2549,6 +2639,22 @@
|
|
|
2549
2639
|
"module": "src/utils/validation.ts"
|
|
2550
2640
|
}
|
|
2551
2641
|
},
|
|
2642
|
+
{
|
|
2643
|
+
"kind": "js",
|
|
2644
|
+
"name": "mustBeOnOrAfter",
|
|
2645
|
+
"declaration": {
|
|
2646
|
+
"name": "mustBeOnOrAfter",
|
|
2647
|
+
"module": "src/utils/validation.ts"
|
|
2648
|
+
}
|
|
2649
|
+
},
|
|
2650
|
+
{
|
|
2651
|
+
"kind": "js",
|
|
2652
|
+
"name": "mustBeOnOrBefore",
|
|
2653
|
+
"declaration": {
|
|
2654
|
+
"name": "mustBeOnOrBefore",
|
|
2655
|
+
"module": "src/utils/validation.ts"
|
|
2656
|
+
}
|
|
2657
|
+
},
|
|
2552
2658
|
{
|
|
2553
2659
|
"kind": "js",
|
|
2554
2660
|
"name": "getAnyOfErrorMessage",
|
|
@@ -3323,6 +3429,55 @@
|
|
|
3323
3429
|
}
|
|
3324
3430
|
]
|
|
3325
3431
|
},
|
|
3432
|
+
{
|
|
3433
|
+
"kind": "javascript-module",
|
|
3434
|
+
"path": "src/jsonforms/renderers/DatePickerControlRenderer.ts",
|
|
3435
|
+
"declarations": [
|
|
3436
|
+
{
|
|
3437
|
+
"kind": "function",
|
|
3438
|
+
"name": "DatePickerControlRendererTemplate",
|
|
3439
|
+
"parameters": [
|
|
3440
|
+
{
|
|
3441
|
+
"name": "prefix",
|
|
3442
|
+
"default": "'rapid'",
|
|
3443
|
+
"type": {
|
|
3444
|
+
"text": "string"
|
|
3445
|
+
}
|
|
3446
|
+
}
|
|
3447
|
+
],
|
|
3448
|
+
"description": "Renders a `<prefix-date-picker>` for a date control, storing an ISO `YYYY-MM-DD` string by\ndefault or UTC-midnight epoch milliseconds with `options.valueFormat: 'epoch'`.\n\n`allow-empty` keeps an unset field empty rather than defaulting to today, and\n`strict-free-text` reverts typed dates the calendar couldn't pick. The picker has no\n`disabled` state, so a disabled control blocks pointer events on its wrapper.",
|
|
3449
|
+
"privacy": "public"
|
|
3450
|
+
},
|
|
3451
|
+
{
|
|
3452
|
+
"kind": "variable",
|
|
3453
|
+
"name": "DatePickerControlRendererEntry",
|
|
3454
|
+
"type": {
|
|
3455
|
+
"text": "RendererEntry"
|
|
3456
|
+
},
|
|
3457
|
+
"default": "{\n renderer: html<DispatchRenderer>`\n ${(x) => DatePickerControlRendererTemplate(x.prefix)}\n `,\n tester: rankWith(\n DATE_PICKER_CONTROL_RANK,\n // Never claim a value-date control: both renderers share a rank, and a tie would leave the\n // winner up to registration order.\n and(\n not(optionIs('valueDate')),\n or(isStringDate, and(isStringOrNumberSchema, optionIs('datePicker'))),\n ),\n ),\n mapper: mapStateToControlProps,\n}",
|
|
3458
|
+
"description": "Renderer entry for a date-picker control. Opt in per form via `additionalRenderers`:\n```ts\nimport { DatePickerControlRendererEntry } from '@genesislcap/foundation-forms';\nform.additionalRenderers = [DatePickerControlRendererEntry];\n```\nIt then matches every `format: \"date\"` string field, plus fields with `options.datePicker`.",
|
|
3459
|
+
"privacy": "public"
|
|
3460
|
+
}
|
|
3461
|
+
],
|
|
3462
|
+
"exports": [
|
|
3463
|
+
{
|
|
3464
|
+
"kind": "js",
|
|
3465
|
+
"name": "DatePickerControlRendererTemplate",
|
|
3466
|
+
"declaration": {
|
|
3467
|
+
"name": "DatePickerControlRendererTemplate",
|
|
3468
|
+
"module": "src/jsonforms/renderers/DatePickerControlRenderer.ts"
|
|
3469
|
+
}
|
|
3470
|
+
},
|
|
3471
|
+
{
|
|
3472
|
+
"kind": "js",
|
|
3473
|
+
"name": "DatePickerControlRendererEntry",
|
|
3474
|
+
"declaration": {
|
|
3475
|
+
"name": "DatePickerControlRendererEntry",
|
|
3476
|
+
"module": "src/jsonforms/renderers/DatePickerControlRenderer.ts"
|
|
3477
|
+
}
|
|
3478
|
+
}
|
|
3479
|
+
]
|
|
3480
|
+
},
|
|
3326
3481
|
{
|
|
3327
3482
|
"kind": "javascript-module",
|
|
3328
3483
|
"path": "src/jsonforms/renderers/DividerRenderer.ts",
|
|
@@ -4426,6 +4581,22 @@
|
|
|
4426
4581
|
},
|
|
4427
4582
|
"default": "5"
|
|
4428
4583
|
},
|
|
4584
|
+
{
|
|
4585
|
+
"kind": "variable",
|
|
4586
|
+
"name": "VALUE_DATE_CONTROL_RANK",
|
|
4587
|
+
"type": {
|
|
4588
|
+
"text": "number"
|
|
4589
|
+
},
|
|
4590
|
+
"default": "5"
|
|
4591
|
+
},
|
|
4592
|
+
{
|
|
4593
|
+
"kind": "variable",
|
|
4594
|
+
"name": "DATE_PICKER_CONTROL_RANK",
|
|
4595
|
+
"type": {
|
|
4596
|
+
"text": "number"
|
|
4597
|
+
},
|
|
4598
|
+
"default": "5"
|
|
4599
|
+
},
|
|
4429
4600
|
{
|
|
4430
4601
|
"kind": "variable",
|
|
4431
4602
|
"name": "REACT_SLOT_CONTROL_RANK",
|
|
@@ -4612,6 +4783,22 @@
|
|
|
4612
4783
|
"module": "src/jsonforms/renderers/RenderersRanks.ts"
|
|
4613
4784
|
}
|
|
4614
4785
|
},
|
|
4786
|
+
{
|
|
4787
|
+
"kind": "js",
|
|
4788
|
+
"name": "VALUE_DATE_CONTROL_RANK",
|
|
4789
|
+
"declaration": {
|
|
4790
|
+
"name": "VALUE_DATE_CONTROL_RANK",
|
|
4791
|
+
"module": "src/jsonforms/renderers/RenderersRanks.ts"
|
|
4792
|
+
}
|
|
4793
|
+
},
|
|
4794
|
+
{
|
|
4795
|
+
"kind": "js",
|
|
4796
|
+
"name": "DATE_PICKER_CONTROL_RANK",
|
|
4797
|
+
"declaration": {
|
|
4798
|
+
"name": "DATE_PICKER_CONTROL_RANK",
|
|
4799
|
+
"module": "src/jsonforms/renderers/RenderersRanks.ts"
|
|
4800
|
+
}
|
|
4801
|
+
},
|
|
4615
4802
|
{
|
|
4616
4803
|
"kind": "js",
|
|
4617
4804
|
"name": "REACT_SLOT_CONTROL_RANK",
|
|
@@ -4850,6 +5037,99 @@
|
|
|
4850
5037
|
}
|
|
4851
5038
|
]
|
|
4852
5039
|
},
|
|
5040
|
+
{
|
|
5041
|
+
"kind": "javascript-module",
|
|
5042
|
+
"path": "src/jsonforms/renderers/ValueDateControlRenderer.ts",
|
|
5043
|
+
"declarations": [
|
|
5044
|
+
{
|
|
5045
|
+
"kind": "variable",
|
|
5046
|
+
"name": "DEFAULT_INDEX_CONVENTIONS",
|
|
5047
|
+
"type": {
|
|
5048
|
+
"text": "Record<string, IndexConvention>"
|
|
5049
|
+
},
|
|
5050
|
+
"default": "{\n SOFR,\n SONIA,\n ESTR,\n TONA,\n 'USD-SOFR': SOFR,\n 'USD-SOFR ICE Term': SOFR,\n 'GBP-SONIA': SONIA,\n 'EUR-EuroSTR': ESTR,\n 'JPY-TONA': TONA,\n 'CHF-SARON': t2('CHF'),\n 'DKK-DESTR': t2('DKK'),\n 'NOK-NOWA': t2('NOK'),\n 'SEK-SWESTR': t2('SEK'),\n 'PLN-WIRON': t2('PLN'),\n 'SGD-SORA': t2('SGD'),\n 'TRY-TLREF': t2('TRY'),\n}",
|
|
5051
|
+
"description": "Default settlement convention per overnight benchmark index, applied when the control's\n`options.indexField` sibling carries one of these codes: a short name (`SOFR`) or its FpML\n`floatingRateIndexScheme` code (`USD-SOFR`, checked against scheme 3-14).",
|
|
5052
|
+
"privacy": "public"
|
|
5053
|
+
},
|
|
5054
|
+
{
|
|
5055
|
+
"kind": "function",
|
|
5056
|
+
"name": "spotLagDaysOf",
|
|
5057
|
+
"return": {
|
|
5058
|
+
"type": {
|
|
5059
|
+
"text": "number"
|
|
5060
|
+
}
|
|
5061
|
+
},
|
|
5062
|
+
"parameters": [
|
|
5063
|
+
{
|
|
5064
|
+
"name": "spotLag",
|
|
5065
|
+
"type": {
|
|
5066
|
+
"text": "SpotLag"
|
|
5067
|
+
}
|
|
5068
|
+
}
|
|
5069
|
+
],
|
|
5070
|
+
"description": "A spot lag in business days (`T+N` is `N`); `HOST_T+2` counts two."
|
|
5071
|
+
},
|
|
5072
|
+
{
|
|
5073
|
+
"kind": "function",
|
|
5074
|
+
"name": "ValueDateControlRendererTemplate",
|
|
5075
|
+
"parameters": [
|
|
5076
|
+
{
|
|
5077
|
+
"name": "prefix",
|
|
5078
|
+
"default": "'rapid'",
|
|
5079
|
+
"type": {
|
|
5080
|
+
"text": "string"
|
|
5081
|
+
}
|
|
5082
|
+
}
|
|
5083
|
+
],
|
|
5084
|
+
"description": "Renders a `<foundation-value-date>` bound to sibling fields (currency pair, index, trade date)\nvia `options`, and writes the resolved delivery date back as this control's value - plus,\noptionally, the unadjusted date (`unadjustedDateScope`) and the spot lag in days\n(`spotLagDaysScope`). A read-only control shows the date with its conventions locked.\n\nEvery binding re-pushes on each form-wide re-render, so values the user can change in the\nwidget are cached per renderer and echoed back instead of being reset.",
|
|
5085
|
+
"privacy": "public"
|
|
5086
|
+
},
|
|
5087
|
+
{
|
|
5088
|
+
"kind": "variable",
|
|
5089
|
+
"name": "ValueDateControlRendererEntry",
|
|
5090
|
+
"type": {
|
|
5091
|
+
"text": "RendererEntry"
|
|
5092
|
+
},
|
|
5093
|
+
"default": "{\n renderer: html<DispatchRenderer>`\n ${(x) => ValueDateControlRendererTemplate(x.prefix)}\n `,\n tester: rankWith(VALUE_DATE_CONTROL_RANK, optionIs('valueDate')),\n mapper: mapStateToControlProps,\n}",
|
|
5094
|
+
"description": "Renderer entry for a value-date control. Opt in per form via `additionalRenderers`:\n```ts\nimport { ValueDateControlRendererEntry } from '@genesislcap/foundation-forms';\nform.additionalRenderers = [ValueDateControlRendererEntry];\n```\nand mark the field with `options: { valueDate: true, baseCurrencyField: 'BASE_CCY', ... }`.",
|
|
5095
|
+
"privacy": "public"
|
|
5096
|
+
}
|
|
5097
|
+
],
|
|
5098
|
+
"exports": [
|
|
5099
|
+
{
|
|
5100
|
+
"kind": "js",
|
|
5101
|
+
"name": "DEFAULT_INDEX_CONVENTIONS",
|
|
5102
|
+
"declaration": {
|
|
5103
|
+
"name": "DEFAULT_INDEX_CONVENTIONS",
|
|
5104
|
+
"module": "src/jsonforms/renderers/ValueDateControlRenderer.ts"
|
|
5105
|
+
}
|
|
5106
|
+
},
|
|
5107
|
+
{
|
|
5108
|
+
"kind": "js",
|
|
5109
|
+
"name": "spotLagDaysOf",
|
|
5110
|
+
"declaration": {
|
|
5111
|
+
"name": "spotLagDaysOf",
|
|
5112
|
+
"module": "src/jsonforms/renderers/ValueDateControlRenderer.ts"
|
|
5113
|
+
}
|
|
5114
|
+
},
|
|
5115
|
+
{
|
|
5116
|
+
"kind": "js",
|
|
5117
|
+
"name": "ValueDateControlRendererTemplate",
|
|
5118
|
+
"declaration": {
|
|
5119
|
+
"name": "ValueDateControlRendererTemplate",
|
|
5120
|
+
"module": "src/jsonforms/renderers/ValueDateControlRenderer.ts"
|
|
5121
|
+
}
|
|
5122
|
+
},
|
|
5123
|
+
{
|
|
5124
|
+
"kind": "js",
|
|
5125
|
+
"name": "ValueDateControlRendererEntry",
|
|
5126
|
+
"declaration": {
|
|
5127
|
+
"name": "ValueDateControlRendererEntry",
|
|
5128
|
+
"module": "src/jsonforms/renderers/ValueDateControlRenderer.ts"
|
|
5129
|
+
}
|
|
5130
|
+
}
|
|
5131
|
+
]
|
|
5132
|
+
},
|
|
4853
5133
|
{
|
|
4854
5134
|
"kind": "javascript-module",
|
|
4855
5135
|
"path": "src/jsonforms/renderers/VerticalCategorizationWrapperRenderer.ts",
|
|
@@ -5121,6 +5401,12 @@
|
|
|
5121
5401
|
}
|
|
5122
5402
|
]
|
|
5123
5403
|
},
|
|
5404
|
+
{
|
|
5405
|
+
"kind": "javascript-module",
|
|
5406
|
+
"path": "src/jsonforms/renderers/date-value-format.ts",
|
|
5407
|
+
"declarations": [],
|
|
5408
|
+
"exports": []
|
|
5409
|
+
},
|
|
5124
5410
|
{
|
|
5125
5411
|
"kind": "javascript-module",
|
|
5126
5412
|
"path": "src/jsonforms/renderers/dispatch-renderer.ts",
|
|
@@ -5389,6 +5675,136 @@
|
|
|
5389
5675
|
}
|
|
5390
5676
|
]
|
|
5391
5677
|
},
|
|
5678
|
+
{
|
|
5679
|
+
"kind": "javascript-module",
|
|
5680
|
+
"path": "src/jsonforms/renderers/renderer-data.ts",
|
|
5681
|
+
"declarations": [
|
|
5682
|
+
{
|
|
5683
|
+
"kind": "function",
|
|
5684
|
+
"name": "rendererOptionsOf",
|
|
5685
|
+
"return": {
|
|
5686
|
+
"type": {
|
|
5687
|
+
"text": "Partial<T>"
|
|
5688
|
+
}
|
|
5689
|
+
},
|
|
5690
|
+
"parameters": [
|
|
5691
|
+
{
|
|
5692
|
+
"name": "x",
|
|
5693
|
+
"type": {
|
|
5694
|
+
"text": "DispatchRenderer"
|
|
5695
|
+
}
|
|
5696
|
+
}
|
|
5697
|
+
],
|
|
5698
|
+
"description": "A control's `uischema.options`, typed for its renderer."
|
|
5699
|
+
},
|
|
5700
|
+
{
|
|
5701
|
+
"kind": "function",
|
|
5702
|
+
"name": "rootDataOf",
|
|
5703
|
+
"return": {
|
|
5704
|
+
"type": {
|
|
5705
|
+
"text": "Record<string, unknown>"
|
|
5706
|
+
}
|
|
5707
|
+
},
|
|
5708
|
+
"parameters": [
|
|
5709
|
+
{
|
|
5710
|
+
"name": "x",
|
|
5711
|
+
"type": {
|
|
5712
|
+
"text": "DispatchRenderer"
|
|
5713
|
+
}
|
|
5714
|
+
}
|
|
5715
|
+
],
|
|
5716
|
+
"description": "The whole form's data, not just this control's, so a control nested anywhere (including in\narray rows) can read top-level sibling fields such as a trade currency or start date."
|
|
5717
|
+
},
|
|
5718
|
+
{
|
|
5719
|
+
"kind": "function",
|
|
5720
|
+
"name": "siblingStringOf",
|
|
5721
|
+
"return": {
|
|
5722
|
+
"type": {
|
|
5723
|
+
"text": "string | undefined"
|
|
5724
|
+
}
|
|
5725
|
+
},
|
|
5726
|
+
"parameters": [
|
|
5727
|
+
{
|
|
5728
|
+
"name": "x",
|
|
5729
|
+
"type": {
|
|
5730
|
+
"text": "DispatchRenderer"
|
|
5731
|
+
}
|
|
5732
|
+
},
|
|
5733
|
+
{
|
|
5734
|
+
"name": "field",
|
|
5735
|
+
"type": {
|
|
5736
|
+
"text": "string | undefined"
|
|
5737
|
+
}
|
|
5738
|
+
}
|
|
5739
|
+
],
|
|
5740
|
+
"description": "A top-level sibling field's value when it's a non-empty string, else `undefined`."
|
|
5741
|
+
},
|
|
5742
|
+
{
|
|
5743
|
+
"kind": "function",
|
|
5744
|
+
"name": "calendarCodesOf",
|
|
5745
|
+
"return": {
|
|
5746
|
+
"type": {
|
|
5747
|
+
"text": "string | undefined"
|
|
5748
|
+
}
|
|
5749
|
+
},
|
|
5750
|
+
"parameters": [
|
|
5751
|
+
{
|
|
5752
|
+
"name": "x",
|
|
5753
|
+
"type": {
|
|
5754
|
+
"text": "DispatchRenderer"
|
|
5755
|
+
}
|
|
5756
|
+
},
|
|
5757
|
+
{
|
|
5758
|
+
"name": "fixed",
|
|
5759
|
+
"type": {
|
|
5760
|
+
"text": "string[] | undefined"
|
|
5761
|
+
}
|
|
5762
|
+
},
|
|
5763
|
+
{
|
|
5764
|
+
"name": "field",
|
|
5765
|
+
"type": {
|
|
5766
|
+
"text": "string | undefined"
|
|
5767
|
+
}
|
|
5768
|
+
}
|
|
5769
|
+
],
|
|
5770
|
+
"description": "Calendar codes from a fixed list plus a top-level sibling field, which may hold an array or a\nstring separated by `;` (as Genesis calendar fields store them), commas or spaces. Returned\nspace-separated, deduped, for a date-picker code attribute; `undefined` when there are none."
|
|
5771
|
+
}
|
|
5772
|
+
],
|
|
5773
|
+
"exports": [
|
|
5774
|
+
{
|
|
5775
|
+
"kind": "js",
|
|
5776
|
+
"name": "rendererOptionsOf",
|
|
5777
|
+
"declaration": {
|
|
5778
|
+
"name": "rendererOptionsOf",
|
|
5779
|
+
"module": "src/jsonforms/renderers/renderer-data.ts"
|
|
5780
|
+
}
|
|
5781
|
+
},
|
|
5782
|
+
{
|
|
5783
|
+
"kind": "js",
|
|
5784
|
+
"name": "rootDataOf",
|
|
5785
|
+
"declaration": {
|
|
5786
|
+
"name": "rootDataOf",
|
|
5787
|
+
"module": "src/jsonforms/renderers/renderer-data.ts"
|
|
5788
|
+
}
|
|
5789
|
+
},
|
|
5790
|
+
{
|
|
5791
|
+
"kind": "js",
|
|
5792
|
+
"name": "siblingStringOf",
|
|
5793
|
+
"declaration": {
|
|
5794
|
+
"name": "siblingStringOf",
|
|
5795
|
+
"module": "src/jsonforms/renderers/renderer-data.ts"
|
|
5796
|
+
}
|
|
5797
|
+
},
|
|
5798
|
+
{
|
|
5799
|
+
"kind": "js",
|
|
5800
|
+
"name": "calendarCodesOf",
|
|
5801
|
+
"declaration": {
|
|
5802
|
+
"name": "calendarCodesOf",
|
|
5803
|
+
"module": "src/jsonforms/renderers/renderer-data.ts"
|
|
5804
|
+
}
|
|
5805
|
+
}
|
|
5806
|
+
]
|
|
5807
|
+
},
|
|
5392
5808
|
{
|
|
5393
5809
|
"kind": "javascript-module",
|
|
5394
5810
|
"path": "src/jsonforms/testers/isArray.ts",
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export * from './review.styles';
|
|
|
7
7
|
export * from './review.template';
|
|
8
8
|
export { MulticolumnDropdownControlRendererEntry, MulticolumnDropdownControlRendererTemplate, } from './jsonforms/renderers/MulticolumnDropdownControlRenderer';
|
|
9
9
|
export { LayoutVerticalCategorizationRendererEntry } from './jsonforms/renderers/LayoutVerticalCategorizationRenderer';
|
|
10
|
+
export { DatePickerControlRendererEntry, DatePickerControlRendererTemplate, } from './jsonforms/renderers/DatePickerControlRenderer';
|
|
11
|
+
export { DEFAULT_INDEX_CONVENTIONS, ValueDateControlRendererEntry, ValueDateControlRendererTemplate, } from './jsonforms/renderers/ValueDateControlRenderer';
|
|
10
12
|
export { controlWrapperTemplate, controlWrapperStyles,
|
|
11
13
|
/** @deprecated Use {@link controlWrapperTemplate} instead. */
|
|
12
14
|
ControlWrapper,
|
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACL,uCAAuC,EACvC,0CAA0C,GAC3C,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,yCAAyC,EAAE,MAAM,4DAA4D,CAAC;AACvH,OAAO,EACL,sBAAsB,EACtB,oBAAoB;AACpB,8DAA8D;AAC9D,cAAc;AACd,8DAA8D;AAC9D,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,qBAAqB;AACrB,6DAA6D;AAC7D,aAAa,GACd,MAAM,sCAAsC,CAAC;AAC9C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACL,uCAAuC,EACvC,0CAA0C,GAC3C,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,yCAAyC,EAAE,MAAM,4DAA4D,CAAC;AACvH,OAAO,EACL,8BAA8B,EAC9B,iCAAiC,GAClC,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,yBAAyB,EACzB,6BAA6B,EAC7B,gCAAgC,GACjC,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACL,sBAAsB,EACtB,oBAAoB;AACpB,8DAA8D;AAC9D,cAAc;AACd,8DAA8D;AAC9D,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,qBAAqB;AACrB,6DAA6D;AAC7D,aAAa,GACd,MAAM,sCAAsC,CAAC;AAC9C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { DatePickerRendererOptions, RendererEntry } from '../../types';
|
|
2
|
+
import { DispatchRenderer } from './dispatch-renderer';
|
|
3
|
+
/**
|
|
4
|
+
* The locale this control displays in: `options.locale`, else the runtime's `Intl` locale.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare function localeOf(options: Partial<DatePickerRendererOptions>): string;
|
|
8
|
+
/**
|
|
9
|
+
* The dayjs format this control displays and accepts typed dates in: `options.displayFormat`,
|
|
10
|
+
* else the locale's numeric pattern (en-GB → `DD/MM/YYYY`, en-US → `MM/DD/YYYY`, …).
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function displayFormatOf(options: Partial<DatePickerRendererOptions>): string;
|
|
14
|
+
/**
|
|
15
|
+
* The tighter of a fixed bound and a sibling field's date (ISO or epoch), as ISO `YYYY-MM-DD`;
|
|
16
|
+
* non-dates are ignored.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveDateBound(bound: 'min' | 'max', fixed: unknown, fieldValue: unknown): string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Renders a `<prefix-date-picker>` for a date control, storing an ISO `YYYY-MM-DD` string by
|
|
22
|
+
* default or UTC-midnight epoch milliseconds with `options.valueFormat: 'epoch'`.
|
|
23
|
+
*
|
|
24
|
+
* `allow-empty` keeps an unset field empty rather than defaulting to today, and
|
|
25
|
+
* `strict-free-text` reverts typed dates the calendar couldn't pick. The picker has no
|
|
26
|
+
* `disabled` state, so a disabled control blocks pointer events on its wrapper.
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export declare const DatePickerControlRendererTemplate: (prefix?: string) => import("@microsoft/fast-element").ViewTemplate<DispatchRenderer, any>;
|
|
30
|
+
/**
|
|
31
|
+
* Renderer entry for a date-picker control. Opt in per form via `additionalRenderers`:
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { DatePickerControlRendererEntry } from '@genesislcap/foundation-forms';
|
|
34
|
+
* form.additionalRenderers = [DatePickerControlRendererEntry];
|
|
35
|
+
* ```
|
|
36
|
+
* It then matches every `format: "date"` string field, plus fields with `options.datePicker`.
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export declare const DatePickerControlRendererEntry: RendererEntry;
|
|
40
|
+
//# sourceMappingURL=DatePickerControlRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePickerControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/DatePickerControlRenderer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAQvD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,MAAM,CAE5E;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,MAAM,CAEnF;AASD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,KAAK,GAAG,KAAK,EACpB,KAAK,EAAE,OAAO,EACd,UAAU,EAAE,OAAO,GAClB,MAAM,GAAG,SAAS,CAIpB;AAmCD;;;;;;;;GAQG;AACH,eAAO,MAAM,iCAAiC,GAC5C,SAAQ,MAAgB,0EAoCzB,CAAC;AASF;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,EAAE,aAc5C,CAAC"}
|
|
@@ -20,5 +20,7 @@ export declare const INVISIBLE_CONTROL_RANK = 5;
|
|
|
20
20
|
export declare const DIVIDER_CONTROL_RANK = 5;
|
|
21
21
|
export declare const ENUM_RADIO_GROUP_CONTROL_RANK = 10;
|
|
22
22
|
export declare const SEGMENTED_CONTROL_RANK = 5;
|
|
23
|
+
export declare const VALUE_DATE_CONTROL_RANK = 5;
|
|
24
|
+
export declare const DATE_PICKER_CONTROL_RANK = 5;
|
|
23
25
|
export declare const REACT_SLOT_CONTROL_RANK = 100;
|
|
24
26
|
//# sourceMappingURL=RenderersRanks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderersRanks.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/RenderersRanks.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,eAAO,MAAM,mCAAmC,IAAI,CAAC;AACrD,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,iCAAiC,IAAI,CAAC;AACnD,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,uBAAuB,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"RenderersRanks.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/RenderersRanks.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,eAAO,MAAM,mCAAmC,IAAI,CAAC;AACrD,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,iCAAiC,IAAI,CAAC;AACnD,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,uBAAuB,MAAM,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { DateConventionsChangedDetail, SpotLag } from '@genesislcap/foundation-ui';
|
|
2
|
+
import { RendererEntry } from '../../types';
|
|
3
|
+
import { DispatchRenderer } from './dispatch-renderer';
|
|
4
|
+
interface IndexConvention extends DateConventionsChangedDetail {
|
|
5
|
+
currency: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Default settlement convention per overnight benchmark index, applied when the control's
|
|
9
|
+
* `options.indexField` sibling carries one of these codes: a short name (`SOFR`) or its FpML
|
|
10
|
+
* `floatingRateIndexScheme` code (`USD-SOFR`, checked against scheme 3-14).
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_INDEX_CONVENTIONS: Record<string, IndexConvention>;
|
|
14
|
+
/** A spot lag in business days (`T+N` is `N`); `HOST_T+2` counts two. */
|
|
15
|
+
export declare function spotLagDaysOf(spotLag: SpotLag): number;
|
|
16
|
+
/**
|
|
17
|
+
* The spot lag for a stored day count, capped at `T+2`; `undefined` for an empty or invalid value.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare function spotLagOfDays(days: unknown): SpotLag | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Locked conventions win; otherwise the user's own choice; otherwise the `spotLagDaysScope`
|
|
23
|
+
* field's lag; otherwise the widget's defaults.
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare function conventionsOf(x: DispatchRenderer): DateConventionsChangedDetail;
|
|
27
|
+
/**
|
|
28
|
+
* Keeps the user's choice, and writes a changed spot lag to the `spotLagDaysScope` field. An
|
|
29
|
+
* unchanged lag leaves the field alone, so a stored offset above 2 survives a day-roll edit.
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export declare function handleConventionsChanged(x: DispatchRenderer, event: Event): void;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export declare function handleValueDateChanged(x: DispatchRenderer, event: Event): void;
|
|
35
|
+
/**
|
|
36
|
+
* Renders a `<foundation-value-date>` bound to sibling fields (currency pair, index, trade date)
|
|
37
|
+
* via `options`, and writes the resolved delivery date back as this control's value - plus,
|
|
38
|
+
* optionally, the unadjusted date (`unadjustedDateScope`) and the spot lag in days
|
|
39
|
+
* (`spotLagDaysScope`). A read-only control shows the date with its conventions locked.
|
|
40
|
+
*
|
|
41
|
+
* Every binding re-pushes on each form-wide re-render, so values the user can change in the
|
|
42
|
+
* widget are cached per renderer and echoed back instead of being reset.
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export declare const ValueDateControlRendererTemplate: (prefix?: string) => import("@microsoft/fast-element").ViewTemplate<DispatchRenderer, any>;
|
|
46
|
+
/**
|
|
47
|
+
* Renderer entry for a value-date control. Opt in per form via `additionalRenderers`:
|
|
48
|
+
* ```ts
|
|
49
|
+
* import { ValueDateControlRendererEntry } from '@genesislcap/foundation-forms';
|
|
50
|
+
* form.additionalRenderers = [ValueDateControlRendererEntry];
|
|
51
|
+
* ```
|
|
52
|
+
* and mark the field with `options: { valueDate: true, baseCurrencyField: 'BASE_CCY', ... }`.
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
export declare const ValueDateControlRendererEntry: RendererEntry;
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=ValueDateControlRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValueDateControlRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/ValueDateControlRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAE5B,OAAO,EAER,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,aAAa,EAA4B,MAAM,aAAa,CAAC;AAItE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD,UAAU,eAAgB,SAAQ,4BAA4B;IAC5D,QAAQ,EAAE,MAAM,CAAC;CAClB;AA4BD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAiBrE,CAAC;AAgDF,yEAAyE;AACzE,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEtD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAMhE;AAiBD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,gBAAgB,GAAG,4BAA4B,CAQ/E;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAOhF;AA0DD,gBAAgB;AAChB,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAuB9E;AAWD;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC,GAC3C,SAAQ,MAAgB,0EA2BzB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,6BAA6B,EAAE,aAM3C,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { DateValueFormat } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Parses a stored date control value — an ISO `YYYY-MM-DD` string or UTC-midnight epoch
|
|
4
|
+
* milliseconds — into its calendar parts. Returns `undefined` for anything else.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseDateValue(value: unknown): {
|
|
8
|
+
year: number;
|
|
9
|
+
month: number;
|
|
10
|
+
day: number;
|
|
11
|
+
} | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Serialises calendar parts as an ISO `YYYY-MM-DD` string or UTC-midnight epoch milliseconds.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatDateValue(parts: {
|
|
17
|
+
year: number;
|
|
18
|
+
month: number;
|
|
19
|
+
day: number;
|
|
20
|
+
}, valueFormat: DateValueFormat): string | number;
|
|
21
|
+
/**
|
|
22
|
+
* Converts a date control value (ISO `YYYY-MM-DD` or UTC-midnight epoch milliseconds) into
|
|
23
|
+
* `valueFormat`, or `undefined` when it isn't a date (which clears the control).
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare function toDateControlValue(value: unknown, valueFormat: DateValueFormat): string | number | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Normalises a date control value to ISO `YYYY-MM-DD`, or `undefined` when it isn't a date.
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare function toIsoDateValue(value: unknown): string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Converts a stored date control value (either storage format) into the picker's `MM-DD-YYYY`
|
|
34
|
+
* wire value, or `''` when it isn't a date.
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare function toPickerWireValue(value: unknown): string;
|
|
38
|
+
/**
|
|
39
|
+
* Converts the picker's `value-changed` detail into a storage format; the inverse of
|
|
40
|
+
* `toPickerWireValue`.
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
export declare function fromPickerWireValue(value: string | undefined, valueFormat: DateValueFormat): string | number | undefined;
|
|
44
|
+
//# sourceMappingURL=date-value-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-value-format.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/date-value-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAQnD;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,GACb;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAa1D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EACnD,WAAW,EAAE,eAAe,GAC3B,MAAM,GAAG,MAAM,CAIjB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,eAAe,GAC3B,MAAM,GAAG,MAAM,GAAG,SAAS,CAG7B;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGxD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,WAAW,EAAE,eAAe,GAC3B,MAAM,GAAG,MAAM,GAAG,SAAS,CAU7B"}
|