@genesislcap/foundation-forms 15.50.1 → 15.50.3-holiday-picker.1
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 +390 -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 +41 -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 +184 -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 +223 -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 +278 -1
- package/package.json +13 -13
package/dist/dts/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DatasourceOptions } from '@genesislcap/foundation-comms';
|
|
2
2
|
import type { Message, MessageError } from '@genesislcap/foundation-comms';
|
|
3
|
+
import type { DayRollConvention, SpotLag } from '@genesislcap/foundation-ui';
|
|
3
4
|
import { FilterMode } from '@genesislcap/foundation-ui';
|
|
4
5
|
import { JsonFormsState, OwnPropsOfControl, RankedTester, StatePropsOfControl, UISchemaElement, RuleEffect, SchemaBasedCondition } from '@jsonforms/core';
|
|
5
6
|
import { ViewTemplate } from '@microsoft/fast-element';
|
|
@@ -607,6 +608,188 @@ export type SegmentedRendererOptions = StandardRendererOptions & {
|
|
|
607
608
|
color?: string;
|
|
608
609
|
}[];
|
|
609
610
|
};
|
|
611
|
+
/**
|
|
612
|
+
* Storage format for a date written by the date-picker and value-date control renderers:
|
|
613
|
+
* - `'iso'` — an ISO 8601 calendar date string, `YYYY-MM-DD` (e.g. `2026-09-25`). Matches JSON
|
|
614
|
+
* Schema `format: "date"` and the FpML/CDM convention, sorts correctly as a string, and parses
|
|
615
|
+
* natively everywhere.
|
|
616
|
+
* - `'epoch'` — UTC-midnight epoch milliseconds, the genesis `DATE` wire format.
|
|
617
|
+
* @public
|
|
618
|
+
*/
|
|
619
|
+
export type DateValueFormat = 'iso' | 'epoch';
|
|
620
|
+
/**
|
|
621
|
+
* Configuration options for the value-date control renderer.
|
|
622
|
+
* Activated by `valueDate: true`; reads its currencies, index and trade date from sibling fields.
|
|
623
|
+
* @public
|
|
624
|
+
*/
|
|
625
|
+
export type ValueDateRendererOptions = StandardRendererOptions & {
|
|
626
|
+
/**
|
|
627
|
+
* Enables the value-date control renderer for this element.
|
|
628
|
+
* @public
|
|
629
|
+
*/
|
|
630
|
+
valueDate: true;
|
|
631
|
+
/**
|
|
632
|
+
* Name of the sibling top-level field holding the base currency code (e.g. `EUR`).
|
|
633
|
+
* @defaultValue `'BASE_CURRENCY'`
|
|
634
|
+
* @public
|
|
635
|
+
*/
|
|
636
|
+
baseCurrencyField?: string;
|
|
637
|
+
/**
|
|
638
|
+
* Name of the sibling top-level field holding the quote currency code (e.g. `USD`).
|
|
639
|
+
* @defaultValue `'QUOTE_CURRENCY'`
|
|
640
|
+
* @public
|
|
641
|
+
*/
|
|
642
|
+
quoteCurrencyField?: string;
|
|
643
|
+
/**
|
|
644
|
+
* Name of the sibling top-level field holding a benchmark index code (e.g. `SOFR`, `SONIA`).
|
|
645
|
+
* A recognised index's spot lag and day-roll convention are applied automatically.
|
|
646
|
+
* @public
|
|
647
|
+
*/
|
|
648
|
+
indexField?: string;
|
|
649
|
+
/**
|
|
650
|
+
* Name of a sibling top-level field holding the trade date (ISO or epoch) that spot and tenor
|
|
651
|
+
* targets count from instead of today.
|
|
652
|
+
* @public
|
|
653
|
+
*/
|
|
654
|
+
tradeDateField?: string;
|
|
655
|
+
/**
|
|
656
|
+
* Fixed spot lag for this control, e.g. `'T+0'` for a trade date. A recognised `indexField`
|
|
657
|
+
* takes precedence; when either fixed convention is set, the conventions popover is hidden.
|
|
658
|
+
* @public
|
|
659
|
+
*/
|
|
660
|
+
spotLag?: SpotLag;
|
|
661
|
+
/**
|
|
662
|
+
* Fixed day-roll convention for this control, e.g. `'following'`. A recognised `indexField`
|
|
663
|
+
* convention takes precedence.
|
|
664
|
+
* @public
|
|
665
|
+
*/
|
|
666
|
+
dayRollConvention?: DayRollConvention;
|
|
667
|
+
/**
|
|
668
|
+
* How the resolved delivery date is stored in the form data.
|
|
669
|
+
* @defaultValue `'iso'`
|
|
670
|
+
* @public
|
|
671
|
+
*/
|
|
672
|
+
valueFormat?: DateValueFormat;
|
|
673
|
+
/**
|
|
674
|
+
* Whether the widget fetches its holiday calendars from the server (`holiday-calendars`).
|
|
675
|
+
* @defaultValue `false`
|
|
676
|
+
* @public
|
|
677
|
+
*/
|
|
678
|
+
holidayCalendars?: boolean;
|
|
679
|
+
};
|
|
680
|
+
/**
|
|
681
|
+
* Configuration options for the date-picker control renderer (`DatePickerControlRendererEntry`).
|
|
682
|
+
* @public
|
|
683
|
+
*/
|
|
684
|
+
export type DatePickerRendererOptions = StandardRendererOptions & {
|
|
685
|
+
/**
|
|
686
|
+
* Opts a plain `type: "string"` field (no `format: "date"`), or a `number` epoch field, into
|
|
687
|
+
* the date-picker renderer.
|
|
688
|
+
* @public
|
|
689
|
+
*/
|
|
690
|
+
datePicker?: true;
|
|
691
|
+
/**
|
|
692
|
+
* How the selected date is stored in the form data; either format is read.
|
|
693
|
+
* @defaultValue `'iso'`
|
|
694
|
+
* @public
|
|
695
|
+
*/
|
|
696
|
+
valueFormat?: DateValueFormat;
|
|
697
|
+
/**
|
|
698
|
+
* BCP-47 locale for this control, e.g. `'en-GB'`: sets the default `displayFormat` and the
|
|
699
|
+
* calendar's month/weekday names.
|
|
700
|
+
* @defaultValue the runtime's `Intl` locale
|
|
701
|
+
* @public
|
|
702
|
+
*/
|
|
703
|
+
locale?: string;
|
|
704
|
+
/**
|
|
705
|
+
* dayjs format used to display and read typed dates, e.g. `'DD MMM YYYY'`. Does not affect the
|
|
706
|
+
* stored value.
|
|
707
|
+
* @defaultValue the numeric date pattern of `locale` (en-GB → `DD/MM/YYYY`, en-US → `MM/DD/YYYY`)
|
|
708
|
+
* @public
|
|
709
|
+
*/
|
|
710
|
+
displayFormat?: string;
|
|
711
|
+
/**
|
|
712
|
+
* Hides Saturday/Sunday columns in the calendar.
|
|
713
|
+
* @public
|
|
714
|
+
*/
|
|
715
|
+
hideWeekends?: boolean;
|
|
716
|
+
/**
|
|
717
|
+
* Fetches holiday/closure days from the server and disables them: those of the business
|
|
718
|
+
* centres, exchanges and currencies named below, merged (a day any of them closes is
|
|
719
|
+
* disabled), or every calendar's when none is named.
|
|
720
|
+
* @defaultValue `false`
|
|
721
|
+
* @public
|
|
722
|
+
*/
|
|
723
|
+
holidayCalendars?: boolean;
|
|
724
|
+
/**
|
|
725
|
+
* FpML business centre codes (`businessCenterScheme`, e.g. `GBLO`, `USNY`, `EUTA`) whose
|
|
726
|
+
* holidays `holidayCalendars` disables, combined with `businessCentersField`.
|
|
727
|
+
* @public
|
|
728
|
+
*/
|
|
729
|
+
businessCenters?: string[];
|
|
730
|
+
/**
|
|
731
|
+
* Name of a top-level sibling field holding business centre codes: an array, or a string
|
|
732
|
+
* separated by `;` (e.g. a `PAY_CALENDAR` of `GBLO;USNY`), commas or spaces.
|
|
733
|
+
* @public
|
|
734
|
+
*/
|
|
735
|
+
businessCentersField?: string;
|
|
736
|
+
/**
|
|
737
|
+
* Exchange MICs (e.g. `XNYS`) whose closures `holidayCalendars` disables, combined with
|
|
738
|
+
* `exchangeCodesField`.
|
|
739
|
+
* @public
|
|
740
|
+
*/
|
|
741
|
+
exchangeCodes?: string[];
|
|
742
|
+
/**
|
|
743
|
+
* Name of a top-level sibling field holding exchange MICs, as `businessCentersField`.
|
|
744
|
+
* @public
|
|
745
|
+
*/
|
|
746
|
+
exchangeCodesField?: string;
|
|
747
|
+
/**
|
|
748
|
+
* ISO 4217 currencies whose holidays `holidayCalendars` disables, combined with `currencyField`.
|
|
749
|
+
* @public
|
|
750
|
+
*/
|
|
751
|
+
currencyCodes?: string[];
|
|
752
|
+
/**
|
|
753
|
+
* Name of a top-level sibling field holding an ISO 4217 currency code (or several, as
|
|
754
|
+
* `businessCentersField`) whose holidays `holidayCalendars` disables.
|
|
755
|
+
* @public
|
|
756
|
+
*/
|
|
757
|
+
currencyField?: string;
|
|
758
|
+
/**
|
|
759
|
+
* Earliest selectable date, ISO `YYYY-MM-DD` (inclusive); with `minDateField` the later applies.
|
|
760
|
+
* @public
|
|
761
|
+
*/
|
|
762
|
+
minDate?: string;
|
|
763
|
+
/**
|
|
764
|
+
* Latest selectable date, ISO `YYYY-MM-DD` (inclusive); with `maxDateField` the earlier applies.
|
|
765
|
+
* @public
|
|
766
|
+
*/
|
|
767
|
+
maxDate?: string;
|
|
768
|
+
/**
|
|
769
|
+
* Name of a top-level sibling field whose date is the earliest selectable one, e.g.
|
|
770
|
+
* `'START_DATE'` on an end date. Ignored while empty.
|
|
771
|
+
* @public
|
|
772
|
+
*/
|
|
773
|
+
minDateField?: string;
|
|
774
|
+
/**
|
|
775
|
+
* Name of a top-level sibling field whose date is the latest selectable one, e.g. `'END_DATE'`
|
|
776
|
+
* on a start date. Ignored while empty.
|
|
777
|
+
* @public
|
|
778
|
+
*/
|
|
779
|
+
maxDateField?: string;
|
|
780
|
+
/**
|
|
781
|
+
* Picks a date range: this control holds the start and the named sibling field the end. Leave
|
|
782
|
+
* the end field out of the uiSchema, since this control edits it.
|
|
783
|
+
* @public
|
|
784
|
+
*/
|
|
785
|
+
rangeEndField?: string;
|
|
786
|
+
/**
|
|
787
|
+
* Lets the user type the date in `displayFormat` as well as pick it. A typed date the calendar
|
|
788
|
+
* wouldn't allow reverts on blur/Enter.
|
|
789
|
+
* @public
|
|
790
|
+
*/
|
|
791
|
+
allowFreeText?: boolean;
|
|
792
|
+
};
|
|
610
793
|
/**
|
|
611
794
|
* All configuration options that are available.
|
|
612
795
|
* @public
|
|
@@ -618,7 +801,7 @@ export type UiSchemaElementOptions = StandardRendererOptions & {
|
|
|
618
801
|
* @public
|
|
619
802
|
*/
|
|
620
803
|
data?: any[];
|
|
621
|
-
} & Partial<Omit<ConnectedRenderersOptions, 'data'>> & Partial<NumberRendererOptions> & Partial<ArrayRendererOptions> & Partial<CategorizationRendererOptions> & Partial<CategorizationLayoutOptions> & Partial<GroupRendererOptions> & Partial<StepperRendererOptions> & Partial<StringRendererOptions> & Partial<Omit<RadioGroupRendererOptions, 'data'>> & Partial<Omit<SegmentedRendererOptions, 'data'
|
|
804
|
+
} & Partial<Omit<ConnectedRenderersOptions, 'data'>> & Partial<NumberRendererOptions> & Partial<ArrayRendererOptions> & Partial<CategorizationRendererOptions> & Partial<CategorizationLayoutOptions> & Partial<GroupRendererOptions> & Partial<StepperRendererOptions> & Partial<StringRendererOptions> & Partial<Omit<RadioGroupRendererOptions, 'data'>> & Partial<Omit<SegmentedRendererOptions, 'data'>> & Partial<ValueDateRendererOptions> & Partial<DatePickerRendererOptions>;
|
|
622
805
|
/**
|
|
623
806
|
* A UiSchemaElement that displays property values in a user interface element.
|
|
624
807
|
* @public
|
package/dist/dts/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3E,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,gBAAgB,GAChB,wBAAwB,GACxB,gBAAgB,GAChB,gBAAgB,GAChB,OAAO,GACP,SAAS,GACT,kBAAkB,CAAC;AAEvB;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,YAAY,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,MAAM,CAAC;AAEhD;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,sBAAsB,CAAC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e,EAAE,MAAM,EAAE,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -11,6 +11,38 @@ export declare const mustMatch: (target: string) => (data: any, path: any, label
|
|
|
11
11
|
keyword: string;
|
|
12
12
|
params: {};
|
|
13
13
|
}[];
|
|
14
|
+
/**
|
|
15
|
+
* Ensures the date in the current field (the one the validator is on) is on or after the date in
|
|
16
|
+
* the target field, e.g. an end date that can't be before its start date. Either field may hold
|
|
17
|
+
* an ISO `YYYY-MM-DD` string or epoch milliseconds; no error while either is empty.
|
|
18
|
+
* @param target - the other date field, e.g. `'START_DATE'`
|
|
19
|
+
* @param message - the error shown on the current field; defaults to `Must not be before <target>`
|
|
20
|
+
* @returns a validator function that will be run by the smart form during the client-side validation stage
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export declare const mustBeOnOrAfter: (target: string, message?: string) => (data: any, path: any) => {
|
|
24
|
+
instancePath: string;
|
|
25
|
+
message: string;
|
|
26
|
+
schemaPath: string;
|
|
27
|
+
keyword: string;
|
|
28
|
+
params: {};
|
|
29
|
+
}[];
|
|
30
|
+
/**
|
|
31
|
+
* Ensures the date in the current field (the one the validator is on) is on or before the date
|
|
32
|
+
* in the target field, e.g. a start date that can't be after its end date. Either field may hold
|
|
33
|
+
* an ISO `YYYY-MM-DD` string or epoch milliseconds; no error while either is empty.
|
|
34
|
+
* @param target - the other date field, e.g. `'END_DATE'`
|
|
35
|
+
* @param message - the error shown on the current field; defaults to `Must not be after <target>`
|
|
36
|
+
* @returns a validator function that will be run by the smart form during the client-side validation stage
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export declare const mustBeOnOrBefore: (target: string, message?: string) => (data: any, path: any) => {
|
|
40
|
+
instancePath: string;
|
|
41
|
+
message: string;
|
|
42
|
+
schemaPath: string;
|
|
43
|
+
keyword: string;
|
|
44
|
+
params: {};
|
|
45
|
+
}[];
|
|
14
46
|
/**
|
|
15
47
|
* Computes a human-friendly anyOf error message for a given control path.
|
|
16
48
|
* Prefers UI schema custom message, then JSON schema errorMessage.anyOf, then a constructed fallback.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/utils/validation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/utils/validation.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,QAAQ,MAAM,MAC9B,SAAI,EAAE,SAAI,EAAE,UAAK;;;;;;GAkB1B,CAAC;AAwBF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,EAAE,gBAAwC;;;;;;GACN,CAAC;AAEnF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,EAAE,gBAAuC;;;;;;GACN,CAAC;AAmBnF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,EAC9B,QAAQ,GAAG,EACX,aAAa,MAAM,GAAG,SAAS,EAC/B,cAAc,MAAM,KACnB,MAoEF,CAAC"}
|
package/dist/esm/index.js
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,
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { getIntlDateFormat } from '@genesislcap/foundation-ui';
|
|
2
|
+
import { and, mapStateToControlProps, not, or, rankWith, schemaMatches } from '@jsonforms/core';
|
|
3
|
+
import { html } from '@microsoft/fast-element';
|
|
4
|
+
import { optionIs } from '../testers/optionIs';
|
|
5
|
+
import { controlWrapperTemplate } from './ControlWrapperRenderer';
|
|
6
|
+
import { fromPickerWireValue, toDateControlValue, toIsoDateValue, toPickerWireValue, } from './date-value-format';
|
|
7
|
+
import { calendarCodesOf, rendererOptionsOf, rootDataOf } from './renderer-data';
|
|
8
|
+
import { DATE_PICKER_CONTROL_RANK } from './RenderersRanks';
|
|
9
|
+
function optionsOf(x) {
|
|
10
|
+
return rendererOptionsOf(x);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The locale this control displays in: `options.locale`, else the runtime's `Intl` locale.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export function localeOf(options) {
|
|
17
|
+
return options.locale || new Intl.DateTimeFormat().resolvedOptions().locale;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The dayjs format this control displays and accepts typed dates in: `options.displayFormat`,
|
|
21
|
+
* else the locale's numeric pattern (en-GB → `DD/MM/YYYY`, en-US → `MM/DD/YYYY`, …).
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export function displayFormatOf(options) {
|
|
25
|
+
return options.displayFormat || getIntlDateFormat(localeOf(options));
|
|
26
|
+
}
|
|
27
|
+
const businessCentersOf = (x) => calendarCodesOf(x, optionsOf(x).businessCenters, optionsOf(x).businessCentersField);
|
|
28
|
+
const exchangeCodesOf = (x) => calendarCodesOf(x, optionsOf(x).exchangeCodes, optionsOf(x).exchangeCodesField);
|
|
29
|
+
const currencyCodesOf = (x) => calendarCodesOf(x, optionsOf(x).currencyCodes, optionsOf(x).currencyField);
|
|
30
|
+
/**
|
|
31
|
+
* The tighter of a fixed bound and a sibling field's date (ISO or epoch), as ISO `YYYY-MM-DD`;
|
|
32
|
+
* non-dates are ignored.
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export function resolveDateBound(bound, fixed, fieldValue) {
|
|
36
|
+
// ISO `YYYY-MM-DD` strings sort chronologically.
|
|
37
|
+
const dates = [fixed, fieldValue].map(toIsoDateValue).filter(Boolean).sort();
|
|
38
|
+
return bound === 'min' ? dates[dates.length - 1] : dates[0];
|
|
39
|
+
}
|
|
40
|
+
function minDateOf(x) {
|
|
41
|
+
const { minDate, minDateField } = optionsOf(x);
|
|
42
|
+
return resolveDateBound('min', minDate, minDateField ? rootDataOf(x)[minDateField] : undefined);
|
|
43
|
+
}
|
|
44
|
+
function maxDateOf(x) {
|
|
45
|
+
const { maxDate, maxDateField } = optionsOf(x);
|
|
46
|
+
return resolveDateBound('max', maxDate, maxDateField ? rootDataOf(x)[maxDateField] : undefined);
|
|
47
|
+
}
|
|
48
|
+
function handleValueChanged(x, event) {
|
|
49
|
+
var _a;
|
|
50
|
+
const detail = event.detail;
|
|
51
|
+
x.onBlur();
|
|
52
|
+
x.control.handleChange(x.control.path, fromPickerWireValue(detail, (_a = optionsOf(x).valueFormat) !== null && _a !== void 0 ? _a : 'iso'));
|
|
53
|
+
}
|
|
54
|
+
function rangeEndOf(x) {
|
|
55
|
+
const field = optionsOf(x).rangeEndField;
|
|
56
|
+
return field ? toIsoDateValue(rootDataOf(x)[field]) : undefined;
|
|
57
|
+
}
|
|
58
|
+
/** Range mode: writes the start to this control and the end to the `rangeEndField` sibling. */
|
|
59
|
+
function handleRangeChanged(x, event) {
|
|
60
|
+
const { start, end } = event.detail;
|
|
61
|
+
const { rangeEndField, valueFormat } = optionsOf(x);
|
|
62
|
+
x.onBlur();
|
|
63
|
+
x.control.handleChange(x.control.path, toDateControlValue(start, valueFormat !== null && valueFormat !== void 0 ? valueFormat : 'iso'));
|
|
64
|
+
x.control.handleChange(rangeEndField, toDateControlValue(end, valueFormat !== null && valueFormat !== void 0 ? valueFormat : 'iso'));
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Renders a `<prefix-date-picker>` for a date control, storing an ISO `YYYY-MM-DD` string by
|
|
68
|
+
* default or UTC-midnight epoch milliseconds with `options.valueFormat: 'epoch'`.
|
|
69
|
+
*
|
|
70
|
+
* `allow-empty` keeps an unset field empty rather than defaulting to today, and
|
|
71
|
+
* `strict-free-text` reverts typed dates the calendar couldn't pick. The picker has no
|
|
72
|
+
* `disabled` state, so a disabled control blocks pointer events on its wrapper.
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
export const DatePickerControlRendererTemplate = (prefix = 'rapid') => html `
|
|
76
|
+
<template>
|
|
77
|
+
${controlWrapperTemplate({
|
|
78
|
+
prefix,
|
|
79
|
+
innerTemplate: html `
|
|
80
|
+
<div
|
|
81
|
+
style="${(x) => (x.control.enabled ? '' : 'pointer-events: none; opacity: 0.6;')}"
|
|
82
|
+
aria-disabled="${(x) => (x.control.enabled ? 'false' : 'true')}"
|
|
83
|
+
>
|
|
84
|
+
<${prefix}-date-picker
|
|
85
|
+
id=${(x) => x.control.path}
|
|
86
|
+
data-test-id=${(x) => x.control.path}
|
|
87
|
+
allow-empty
|
|
88
|
+
format="${(x) => displayFormatOf(optionsOf(x))}"
|
|
89
|
+
lang="${(x) => localeOf(optionsOf(x))}"
|
|
90
|
+
value="${(x) => toPickerWireValue(x.control.data)}"
|
|
91
|
+
?hide-weekends=${(x) => !!optionsOf(x).hideWeekends}
|
|
92
|
+
?holiday-calendars=${(x) => !!optionsOf(x).holidayCalendars}
|
|
93
|
+
business-centers="${(x) => businessCentersOf(x)}"
|
|
94
|
+
exchange-codes="${(x) => exchangeCodesOf(x)}"
|
|
95
|
+
currency-codes="${(x) => currencyCodesOf(x)}"
|
|
96
|
+
min-date="${(x) => minDateOf(x)}"
|
|
97
|
+
max-date="${(x) => maxDateOf(x)}"
|
|
98
|
+
?allow-free-text=${(x) => !!optionsOf(x).allowFreeText}
|
|
99
|
+
strict-free-text
|
|
100
|
+
?range=${(x) => !!optionsOf(x).rangeEndField}
|
|
101
|
+
range-start="${(x) => (optionsOf(x).rangeEndField ? toIsoDateValue(x.control.data) : undefined)}"
|
|
102
|
+
range-end="${(x) => rangeEndOf(x)}"
|
|
103
|
+
@value-changed=${(x, c) => handleValueChanged(x, c.event)}
|
|
104
|
+
@range-changed=${(x, c) => handleRangeChanged(x, c.event)}
|
|
105
|
+
></${prefix}-date-picker>
|
|
106
|
+
</div>
|
|
107
|
+
`,
|
|
108
|
+
})}
|
|
109
|
+
</template>
|
|
110
|
+
`;
|
|
111
|
+
const isStringDate = schemaMatches((schema) => (schema === null || schema === void 0 ? void 0 : schema.type) === 'string' && (schema === null || schema === void 0 ? void 0 : schema.format) === 'date');
|
|
112
|
+
const isStringOrNumberSchema = schemaMatches((schema) => (schema === null || schema === void 0 ? void 0 : schema.type) === 'string' || (schema === null || schema === void 0 ? void 0 : schema.type) === 'number' || (schema === null || schema === void 0 ? void 0 : schema.type) === 'integer');
|
|
113
|
+
/**
|
|
114
|
+
* Renderer entry for a date-picker control. Opt in per form via `additionalRenderers`:
|
|
115
|
+
* ```ts
|
|
116
|
+
* import { DatePickerControlRendererEntry } from '@genesislcap/foundation-forms';
|
|
117
|
+
* form.additionalRenderers = [DatePickerControlRendererEntry];
|
|
118
|
+
* ```
|
|
119
|
+
* It then matches every `format: "date"` string field, plus fields with `options.datePicker`.
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
122
|
+
export const DatePickerControlRendererEntry = {
|
|
123
|
+
renderer: html `
|
|
124
|
+
${(x) => DatePickerControlRendererTemplate(x.prefix)}
|
|
125
|
+
`,
|
|
126
|
+
tester: rankWith(DATE_PICKER_CONTROL_RANK,
|
|
127
|
+
// Never claim a value-date control: both renderers share a rank, and a tie would leave the
|
|
128
|
+
// winner up to registration order.
|
|
129
|
+
and(not(optionIs('valueDate')), or(isStringDate, and(isStringOrNumberSchema, optionIs('datePicker'))))),
|
|
130
|
+
mapper: mapStateToControlProps,
|
|
131
|
+
};
|
|
@@ -20,4 +20,6 @@ export const INVISIBLE_CONTROL_RANK = 5;
|
|
|
20
20
|
export const DIVIDER_CONTROL_RANK = 5;
|
|
21
21
|
export const ENUM_RADIO_GROUP_CONTROL_RANK = 10;
|
|
22
22
|
export const SEGMENTED_CONTROL_RANK = 5;
|
|
23
|
+
export const VALUE_DATE_CONTROL_RANK = 5;
|
|
24
|
+
export const DATE_PICKER_CONTROL_RANK = 5;
|
|
23
25
|
export const REACT_SLOT_CONTROL_RANK = 100;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { mapStateToControlProps, rankWith } from '@jsonforms/core';
|
|
2
|
+
import { html } from '@microsoft/fast-element';
|
|
3
|
+
import { optionIs } from '../testers/optionIs';
|
|
4
|
+
import { controlWrapperTemplate } from './ControlWrapperRenderer';
|
|
5
|
+
import { toDateControlValue, toIsoDateValue } from './date-value-format';
|
|
6
|
+
import { rendererOptionsOf, rootDataOf, siblingStringOf } from './renderer-data';
|
|
7
|
+
import { VALUE_DATE_CONTROL_RANK } from './RenderersRanks';
|
|
8
|
+
const SOFR = {
|
|
9
|
+
spotLag: 'T+2',
|
|
10
|
+
dayRollConvention: 'modifiedFollowing',
|
|
11
|
+
currency: 'USD',
|
|
12
|
+
};
|
|
13
|
+
const SONIA = {
|
|
14
|
+
spotLag: 'T+0',
|
|
15
|
+
dayRollConvention: 'modifiedFollowing',
|
|
16
|
+
currency: 'GBP',
|
|
17
|
+
};
|
|
18
|
+
const ESTR = {
|
|
19
|
+
spotLag: 'T+1',
|
|
20
|
+
dayRollConvention: 'modifiedFollowing',
|
|
21
|
+
currency: 'EUR',
|
|
22
|
+
};
|
|
23
|
+
const TONA = {
|
|
24
|
+
spotLag: 'T+2',
|
|
25
|
+
dayRollConvention: 'modifiedFollowing',
|
|
26
|
+
currency: 'JPY',
|
|
27
|
+
};
|
|
28
|
+
const t2 = (currency) => ({
|
|
29
|
+
spotLag: 'T+2',
|
|
30
|
+
dayRollConvention: 'modifiedFollowing',
|
|
31
|
+
currency,
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Default settlement convention per overnight benchmark index, applied when the control's
|
|
35
|
+
* `options.indexField` sibling carries one of these codes: a short name (`SOFR`) or its FpML
|
|
36
|
+
* `floatingRateIndexScheme` code (`USD-SOFR`, checked against scheme 3-14).
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export const DEFAULT_INDEX_CONVENTIONS = {
|
|
40
|
+
SOFR,
|
|
41
|
+
SONIA,
|
|
42
|
+
ESTR,
|
|
43
|
+
TONA,
|
|
44
|
+
'USD-SOFR': SOFR,
|
|
45
|
+
'USD-SOFR ICE Term': SOFR,
|
|
46
|
+
'GBP-SONIA': SONIA,
|
|
47
|
+
'EUR-EuroSTR': ESTR,
|
|
48
|
+
'JPY-TONA': TONA,
|
|
49
|
+
'CHF-SARON': t2('CHF'),
|
|
50
|
+
'DKK-DESTR': t2('DKK'),
|
|
51
|
+
'NOK-NOWA': t2('NOK'),
|
|
52
|
+
'SEK-SWESTR': t2('SEK'),
|
|
53
|
+
'PLN-WIRON': t2('PLN'),
|
|
54
|
+
'SGD-SORA': t2('SGD'),
|
|
55
|
+
'TRY-TLREF': t2('TRY'),
|
|
56
|
+
};
|
|
57
|
+
// `<foundation-value-date>`'s own defaults.
|
|
58
|
+
const DEFAULT_SPOT_LAG = 'HOST_T+2';
|
|
59
|
+
const DEFAULT_DAY_ROLL_CONVENTION = 'modifiedFollowing';
|
|
60
|
+
function optionsOf(x) {
|
|
61
|
+
return rendererOptionsOf(x);
|
|
62
|
+
}
|
|
63
|
+
function baseCurrencyOf(x) {
|
|
64
|
+
var _a;
|
|
65
|
+
return siblingStringOf(x, (_a = optionsOf(x).baseCurrencyField) !== null && _a !== void 0 ? _a : 'BASE_CURRENCY');
|
|
66
|
+
}
|
|
67
|
+
function quoteCurrencyOf(x) {
|
|
68
|
+
var _a;
|
|
69
|
+
return siblingStringOf(x, (_a = optionsOf(x).quoteCurrencyField) !== null && _a !== void 0 ? _a : 'QUOTE_CURRENCY');
|
|
70
|
+
}
|
|
71
|
+
function indexConventionOf(x) {
|
|
72
|
+
var _a;
|
|
73
|
+
const index = siblingStringOf(x, (_a = optionsOf(x).indexField) !== null && _a !== void 0 ? _a : 'INDEX');
|
|
74
|
+
return index ? DEFAULT_INDEX_CONVENTIONS[index] : undefined;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The conventions this control locks: a recognised index's, else the fixed
|
|
78
|
+
* `spotLag`/`dayRollConvention` options; `undefined` leaves them to the user.
|
|
79
|
+
*/
|
|
80
|
+
function lockedConventionOf(x) {
|
|
81
|
+
const index = indexConventionOf(x);
|
|
82
|
+
if (index) {
|
|
83
|
+
return index;
|
|
84
|
+
}
|
|
85
|
+
const { spotLag, dayRollConvention } = optionsOf(x);
|
|
86
|
+
return spotLag || dayRollConvention
|
|
87
|
+
? {
|
|
88
|
+
spotLag: spotLag !== null && spotLag !== void 0 ? spotLag : DEFAULT_SPOT_LAG,
|
|
89
|
+
dayRollConvention: dayRollConvention !== null && dayRollConvention !== void 0 ? dayRollConvention : DEFAULT_DAY_ROLL_CONVENTION,
|
|
90
|
+
}
|
|
91
|
+
: undefined;
|
|
92
|
+
}
|
|
93
|
+
/** The conventions the user last picked, echoed back on re-render. */
|
|
94
|
+
const userConventionsState = new WeakMap();
|
|
95
|
+
/**
|
|
96
|
+
* Locked conventions win; otherwise the user's own choice; otherwise the widget's defaults.
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
export function conventionsOf(x) {
|
|
100
|
+
var _a, _b;
|
|
101
|
+
return ((_b = (_a = lockedConventionOf(x)) !== null && _a !== void 0 ? _a : userConventionsState.get(x)) !== null && _b !== void 0 ? _b : {
|
|
102
|
+
spotLag: DEFAULT_SPOT_LAG,
|
|
103
|
+
dayRollConvention: DEFAULT_DAY_ROLL_CONVENTION,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/** @internal */
|
|
107
|
+
export function handleConventionsChanged(x, event) {
|
|
108
|
+
userConventionsState.set(x, event.detail);
|
|
109
|
+
}
|
|
110
|
+
/** The `tradeDateField` sibling's value as ISO `YYYY-MM-DD`; `undefined` counts from today. */
|
|
111
|
+
function tradeDateOf(x) {
|
|
112
|
+
const field = optionsOf(x).tradeDateField;
|
|
113
|
+
return field ? toIsoDateValue(rootDataOf(x)[field]) : undefined;
|
|
114
|
+
}
|
|
115
|
+
/** The element's last `targetInput` (e.g. a typed tenor), echoed back on re-render. */
|
|
116
|
+
const targetInputState = new WeakMap();
|
|
117
|
+
/**
|
|
118
|
+
* The element's last `targetInput`, else a first-render seed: `SPOT` with `tradeDateField` (so it
|
|
119
|
+
* follows the trade date), otherwise the stored value as ISO `YYYY-MM-DD` so it round-trips.
|
|
120
|
+
*/
|
|
121
|
+
function targetInputOf(x) {
|
|
122
|
+
const cached = targetInputState.get(x);
|
|
123
|
+
if (cached !== undefined) {
|
|
124
|
+
return cached;
|
|
125
|
+
}
|
|
126
|
+
const seed = optionsOf(x).tradeDateField ? 'SPOT' : toIsoDateValue(x.control.data) || 'SPOT';
|
|
127
|
+
targetInputState.set(x, seed);
|
|
128
|
+
return seed;
|
|
129
|
+
}
|
|
130
|
+
/** The base, quote and index currencies that drive `holidayCurrencies`, in that order. */
|
|
131
|
+
function drivingCurrenciesOf(x) {
|
|
132
|
+
var _a;
|
|
133
|
+
return [baseCurrencyOf(x), quoteCurrencyOf(x), (_a = indexConventionOf(x)) === null || _a === void 0 ? void 0 : _a.currency];
|
|
134
|
+
}
|
|
135
|
+
/** Identifies the driving currencies, so a cached selection is dropped when they change. */
|
|
136
|
+
function currencySignatureOf(currencies) {
|
|
137
|
+
return currencies.map((code) => code !== null && code !== void 0 ? code : '').join('|');
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* `holidayCurrencies` derived from the pair/index, or the user's own selection, keyed by the
|
|
141
|
+
* signature it belongs to; a pair/index change invalidates it.
|
|
142
|
+
*/
|
|
143
|
+
const holidayCurrenciesState = new WeakMap();
|
|
144
|
+
function holidayCurrenciesOf(x) {
|
|
145
|
+
const driving = drivingCurrenciesOf(x);
|
|
146
|
+
const signature = currencySignatureOf(driving);
|
|
147
|
+
const cached = holidayCurrenciesState.get(x);
|
|
148
|
+
if (cached && cached.signature === signature) {
|
|
149
|
+
return cached.currencies;
|
|
150
|
+
}
|
|
151
|
+
const currencies = Array.from(new Set(driving.filter((code) => !!code)));
|
|
152
|
+
holidayCurrenciesState.set(x, { signature, currencies });
|
|
153
|
+
return currencies;
|
|
154
|
+
}
|
|
155
|
+
function handleValueDateChanged(x, event) {
|
|
156
|
+
var _a, _b;
|
|
157
|
+
const detail = event.detail;
|
|
158
|
+
const targetInput = (_a = event.target) === null || _a === void 0 ? void 0 : _a.targetInput;
|
|
159
|
+
if (targetInput !== undefined) {
|
|
160
|
+
targetInputState.set(x, targetInput);
|
|
161
|
+
}
|
|
162
|
+
x.onBlur();
|
|
163
|
+
x.control.handleChange(x.control.path,
|
|
164
|
+
// `undefined` (the target no longer resolves) clears the control.
|
|
165
|
+
toDateControlValue(detail.deliveryDateValue, (_b = optionsOf(x).valueFormat) !== null && _b !== void 0 ? _b : 'iso'));
|
|
166
|
+
}
|
|
167
|
+
/** Captures the user's holiday-calendar selection for `holidayCurrenciesOf` to echo back. */
|
|
168
|
+
function handleHolidayCurrenciesChanged(x, event) {
|
|
169
|
+
const currencies = event.detail;
|
|
170
|
+
holidayCurrenciesState.set(x, {
|
|
171
|
+
signature: currencySignatureOf(drivingCurrenciesOf(x)),
|
|
172
|
+
currencies,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Renders a `<foundation-value-date>` bound to sibling fields (currency pair, index, trade date)
|
|
177
|
+
* via `options`, and writes the resolved delivery date back as this control's value.
|
|
178
|
+
*
|
|
179
|
+
* Every binding re-pushes on each form-wide re-render, so values the user can change in the
|
|
180
|
+
* widget are cached per renderer and echoed back instead of being reset.
|
|
181
|
+
* @public
|
|
182
|
+
*/
|
|
183
|
+
export const ValueDateControlRendererTemplate = (prefix = 'rapid') => html `
|
|
184
|
+
<template>
|
|
185
|
+
${controlWrapperTemplate({
|
|
186
|
+
prefix,
|
|
187
|
+
innerTemplate: html `
|
|
188
|
+
<${prefix}-value-date
|
|
189
|
+
id=${(x) => x.control.path}
|
|
190
|
+
data-test-id=${(x) => x.control.path}
|
|
191
|
+
base-currency="${(x) => baseCurrencyOf(x)}"
|
|
192
|
+
quote-currency="${(x) => quoteCurrencyOf(x)}"
|
|
193
|
+
?holiday-calendars=${(x) => !!optionsOf(x).holidayCalendars}
|
|
194
|
+
:holidayCurrencies=${(x) => holidayCurrenciesOf(x)}
|
|
195
|
+
:targetInput=${(x) => targetInputOf(x)}
|
|
196
|
+
trade-date="${(x) => tradeDateOf(x)}"
|
|
197
|
+
:spotLag=${(x) => conventionsOf(x).spotLag}
|
|
198
|
+
:dayRollConvention=${(x) => conventionsOf(x).dayRollConvention}
|
|
199
|
+
?lock-conventions=${(x) => !!lockedConventionOf(x)}
|
|
200
|
+
@value-date-changed=${(x, c) => handleValueDateChanged(x, c.event)}
|
|
201
|
+
@holiday-currencies-changed=${(x, c) => handleHolidayCurrenciesChanged(x, c.event)}
|
|
202
|
+
@conventions-changed=${(x, c) => handleConventionsChanged(x, c.event)}
|
|
203
|
+
></${prefix}-value-date>
|
|
204
|
+
`,
|
|
205
|
+
})}
|
|
206
|
+
</template>
|
|
207
|
+
`;
|
|
208
|
+
/**
|
|
209
|
+
* Renderer entry for a value-date control. Opt in per form via `additionalRenderers`:
|
|
210
|
+
* ```ts
|
|
211
|
+
* import { ValueDateControlRendererEntry } from '@genesislcap/foundation-forms';
|
|
212
|
+
* form.additionalRenderers = [ValueDateControlRendererEntry];
|
|
213
|
+
* ```
|
|
214
|
+
* and mark the field with `options: { valueDate: true, baseCurrencyField: 'BASE_CCY', ... }`.
|
|
215
|
+
* @public
|
|
216
|
+
*/
|
|
217
|
+
export const ValueDateControlRendererEntry = {
|
|
218
|
+
renderer: html `
|
|
219
|
+
${(x) => ValueDateControlRendererTemplate(x.prefix)}
|
|
220
|
+
`,
|
|
221
|
+
tester: rankWith(VALUE_DATE_CONTROL_RANK, optionIs('valueDate')),
|
|
222
|
+
mapper: mapStateToControlProps,
|
|
223
|
+
};
|