forty-cdk 0.8.0 → 0.9.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.
- package/LICENSE +21 -21
- package/context-menu/README.md +20 -19
- package/dropdown-menu/README.md +20 -19
- package/fesm2022/forty-cdk-calendar.mjs +11 -1
- package/fesm2022/forty-cdk-calendar.mjs.map +1 -1
- package/fesm2022/forty-cdk-context-menu.mjs +11 -2
- package/fesm2022/forty-cdk-context-menu.mjs.map +1 -1
- package/fesm2022/forty-cdk-core.mjs +76 -11
- package/fesm2022/forty-cdk-core.mjs.map +1 -1
- package/fesm2022/forty-cdk-dropdown-menu.mjs +11 -2
- package/fesm2022/forty-cdk-dropdown-menu.mjs.map +1 -1
- package/fesm2022/forty-cdk-internationalized-date.mjs +22 -2
- package/fesm2022/forty-cdk-internationalized-date.mjs.map +1 -1
- package/fesm2022/forty-cdk-menu.mjs +17 -2
- package/fesm2022/forty-cdk-menu.mjs.map +1 -1
- package/fesm2022/forty-cdk-menubar.mjs +7 -0
- package/fesm2022/forty-cdk-menubar.mjs.map +1 -1
- package/fesm2022/forty-cdk-popover.mjs +37 -7
- package/fesm2022/forty-cdk-popover.mjs.map +1 -1
- package/fesm2022/forty-cdk-table.mjs +177 -55
- package/fesm2022/forty-cdk-table.mjs.map +1 -1
- package/internationalized-date/README.md +23 -23
- package/menu/README.md +15 -0
- package/package.json +1 -1
- package/popover/README.md +1 -1
- package/table/README.md +10 -8
- package/types/forty-cdk-calendar.d.ts +1 -0
- package/types/forty-cdk-context-menu.d.ts +11 -3
- package/types/forty-cdk-core.d.ts +48 -7
- package/types/forty-cdk-dropdown-menu.d.ts +11 -3
- package/types/forty-cdk-internationalized-date.d.ts +2 -0
- package/types/forty-cdk-menu.d.ts +16 -3
- package/types/forty-cdk-menubar.d.ts +8 -1
- package/types/forty-cdk-popover.d.ts +32 -5
- package/types/forty-cdk-table.d.ts +12 -0
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 tutkli
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tutkli
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/context-menu/README.md
CHANGED
|
@@ -99,25 +99,26 @@ Angular resolves `ng-template` DI at the template's **declaration** site, not wh
|
|
|
99
99
|
|
|
100
100
|
### `ForContextMenu`
|
|
101
101
|
|
|
102
|
-
| Property
|
|
103
|
-
|
|
|
104
|
-
| `open`
|
|
105
|
-
| `side`
|
|
106
|
-
| `align`
|
|
107
|
-
| `sideOffset`
|
|
108
|
-
| `alignOffset`
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
113
|
-
| `
|
|
114
|
-
| `
|
|
115
|
-
| `
|
|
116
|
-
| `
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
120
|
-
| `
|
|
102
|
+
| Property | Type | Description |
|
|
103
|
+
| --------------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
104
|
+
| `open` | `model<boolean>` | Two-way bindable. Whether the menu is shown.<br>**Default:** `false` |
|
|
105
|
+
| `side` | `input<string>` | Anchor side relative to the pointer.<br>**Default:** `'bottom'` |
|
|
106
|
+
| `align` | `input<string>` | Alignment along `side` (`'start'` / `'center'` / `'end'`).<br>**Default:** `'start'` |
|
|
107
|
+
| `sideOffset` | `input<number>` | Gap (px) between the pointer and the menu along the main axis.<br>**Default:** `0` |
|
|
108
|
+
| `alignOffset` | `input<number>` | Gap (px) along the cross axis (parallel to `side`).<br>**Default:** `0` |
|
|
109
|
+
| `fallbackAxisSideDirection` | `input<'none' \| 'start' \| 'end'>` | When both sides of the preferred axis overflow, lets `flip` drop the menu to a perpendicular side instead of clipping. `'none'` keeps only the opposite same-axis placement.<br>**Default:** `'none'` |
|
|
110
|
+
| `loop` | `input<boolean>` | Whether arrow navigation wraps.<br>**Default:** `true` |
|
|
111
|
+
| `dir` | `input<string>` | Writing direction. In RTL, ArrowLeft opens submenus and ArrowRight closes them — the swap is automatic. Inherited by every nested `[forMenuSub]` underneath unless overridden.<br>**Default:** `'ltr'` |
|
|
112
|
+
| `disabled` | `input<boolean>` | When `true`, the contextmenu event falls through to the native browser menu.<br>**Default:** `false` |
|
|
113
|
+
| `dismissible` | `input<boolean>` | When `false`, Escape and outside interactions don't close.<br>**Default:** `true` |
|
|
114
|
+
| `returnFocus` | `input<boolean>` | When `true`, focus returns to the trigger element on close.<br>**Default:** `true` |
|
|
115
|
+
| `ariaLabel` | `input<string \| null>` | Manual `aria-label` on `[forMenuContent]`.<br>**Default:** `null` |
|
|
116
|
+
| `escapeKeyDown` | `output<VetoableNativeEvent<KeyboardEvent>>` | Output. Escape pressed while the menu is the topmost dismissable layer.<br>**Default:** — |
|
|
117
|
+
| `pointerDownOutside` | `output<VetoableNativeEvent<PointerEvent>>` | Output. Pointer-down on a target outside content + trigger.<br>**Default:** — |
|
|
118
|
+
| `focusOutside` | `output<VetoableNativeEvent<FocusEvent>>` | Output. Focus moves outside content + trigger.<br>**Default:** — |
|
|
119
|
+
| `interactOutside` | `output<VetoableNativeEvent<PointerEvent \| FocusEvent>>` | Output. Composite — fires alongside the two above (and shares their veto state).<br>**Default:** — |
|
|
120
|
+
| `autoFocusOnOpen` | `output<VetoableEvent>` | Output. Just before the imperative focus move on mount.<br>**Default:** — |
|
|
121
|
+
| `autoFocusOnClose` | `output<VetoableEvent>` | Output. Just before the imperative focus move on unmount.<br>**Default:** — |
|
|
121
122
|
|
|
122
123
|
Same vetoable dismiss API as DropdownMenu. Call `preventDefault()` on the emitted veto to suppress the directive's default action; the original DOM event, when present, is on `.event`.
|
|
123
124
|
|
package/dropdown-menu/README.md
CHANGED
|
@@ -117,25 +117,26 @@ Angular resolves `ng-template` DI at the template's **declaration** site, not wh
|
|
|
117
117
|
|
|
118
118
|
### `ForDropdownMenu`
|
|
119
119
|
|
|
120
|
-
| Property
|
|
121
|
-
|
|
|
122
|
-
| `open`
|
|
123
|
-
| `side`
|
|
124
|
-
| `align`
|
|
125
|
-
| `sideOffset`
|
|
126
|
-
| `alignOffset`
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
133
|
-
| `
|
|
134
|
-
| `
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
137
|
-
| `
|
|
138
|
-
| `
|
|
120
|
+
| Property | Type | Description |
|
|
121
|
+
| --------------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
122
|
+
| `open` | `model<boolean>` | Two-way bindable. Whether the menu is shown.<br>**Default:** `false` |
|
|
123
|
+
| `side` | `input<string>` | Anchor side of `[forMenuContent]` against the trigger.<br>**Default:** `'bottom'` |
|
|
124
|
+
| `align` | `input<string>` | Alignment along `side` (`'start'` / `'center'` / `'end'`).<br>**Default:** `'start'` |
|
|
125
|
+
| `sideOffset` | `input<number>` | Gap (px) between the trigger and the content along the main axis.<br>**Default:** `4` |
|
|
126
|
+
| `alignOffset` | `input<number>` | Gap (px) along the cross axis (parallel to `side`).<br>**Default:** `0` |
|
|
127
|
+
| `fallbackAxisSideDirection` | `input<'none' \| 'start' \| 'end'>` | When both sides of the preferred axis overflow, lets `flip` drop the menu to a perpendicular side instead of clipping. `'none'` keeps only the opposite same-axis placement.<br>**Default:** `'none'` |
|
|
128
|
+
| `loop` | `input<boolean>` | Whether arrow navigation wraps at the ends.<br>**Default:** `true` |
|
|
129
|
+
| `dir` | `input<string>` | Writing direction. In RTL, ArrowLeft opens submenus and ArrowRight closes them — the swap is automatic. Inherited by every nested `[forMenuSub]` underneath unless overridden.<br>**Default:** `'ltr'` |
|
|
130
|
+
| `disabled` | `input<boolean>` | When `true`, trigger interactions are ignored.<br>**Default:** `false` |
|
|
131
|
+
| `dismissible` | `input<boolean>` | When `false`, Escape and outside interactions don't close.<br>**Default:** `true` |
|
|
132
|
+
| `returnFocus` | `input<boolean>` | When `true`, focus returns to the trigger on close.<br>**Default:** `true` |
|
|
133
|
+
| `ariaLabel` | `input<string \| null>` | Manual `aria-label` on `[forMenuContent]` if the trigger isn't a meaningful name.<br>**Default:** `null` |
|
|
134
|
+
| `escapeKeyDown` | `output<VetoableNativeEvent<KeyboardEvent>>` | Output. Escape pressed while the menu is the topmost dismissable layer.<br>**Default:** — |
|
|
135
|
+
| `pointerDownOutside` | `output<VetoableNativeEvent<PointerEvent>>` | Output. Pointer-down on a target outside content + trigger.<br>**Default:** — |
|
|
136
|
+
| `focusOutside` | `output<VetoableNativeEvent<FocusEvent>>` | Output. Focus moves outside content + trigger.<br>**Default:** — |
|
|
137
|
+
| `interactOutside` | `output<VetoableNativeEvent<PointerEvent \| FocusEvent>>` | Output. Composite — fires alongside the two above (and shares their veto state).<br>**Default:** — |
|
|
138
|
+
| `autoFocusOnOpen` | `output<VetoableEvent>` | Output. Just before focus moves to the first / last enabled item on mount.<br>**Default:** — |
|
|
139
|
+
| `autoFocusOnClose` | `output<VetoableEvent>` | Output. Just before focus returns to the trigger on unmount.<br>**Default:** — |
|
|
139
140
|
|
|
140
141
|
Every output above is vetoable — each handler receives a `VetoableEvent` (or `VetoableNativeEvent<E>` when there is a native DOM event). Call `preventDefault()` on the emitted veto to suppress the directive's default action; the original DOM event, when present, is on `.event`.
|
|
141
142
|
|
|
@@ -1963,6 +1963,16 @@ function clampDay(year, month, day, hours = 0, minutes = 0, seconds = 0, millise
|
|
|
1963
1963
|
* calendar today; non-Gregorian calendar systems are deferred to #354.
|
|
1964
1964
|
*/
|
|
1965
1965
|
class NativeDateAdapter {
|
|
1966
|
+
#formatters = new Map();
|
|
1967
|
+
#formatter(locale, options) {
|
|
1968
|
+
const key = `${locale ?? ''}${JSON.stringify(options)}`;
|
|
1969
|
+
let formatter = this.#formatters.get(key);
|
|
1970
|
+
if (formatter === undefined) {
|
|
1971
|
+
formatter = new Intl.DateTimeFormat(locale, options);
|
|
1972
|
+
this.#formatters.set(key, formatter);
|
|
1973
|
+
}
|
|
1974
|
+
return formatter;
|
|
1975
|
+
}
|
|
1966
1976
|
/**
|
|
1967
1977
|
* Today at local midnight in the runtime time zone. Subject to the
|
|
1968
1978
|
* SSR/hydration caveat on {@link DateAdapter.today}.
|
|
@@ -2020,7 +2030,7 @@ class NativeDateAdapter {
|
|
|
2020
2030
|
* Subject to the SSR/hydration caveat on {@link DateAdapter.format}.
|
|
2021
2031
|
*/
|
|
2022
2032
|
format(date, options, locale) {
|
|
2023
|
-
return
|
|
2033
|
+
return this.#formatter(locale, options).format(date);
|
|
2024
2034
|
}
|
|
2025
2035
|
supportsTime() {
|
|
2026
2036
|
return true;
|