@agnos-ui/svelte-bootstrap 0.5.0-next.0 → 0.6.0-next.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/components/accordion/Accordion.svelte.d.ts +1 -0
- package/components/accordion/Item.svelte.d.ts +1 -0
- package/components/accordion/ItemDefaultStructure.svelte.d.ts +1 -0
- package/components/accordion/accordion.d.ts +1 -1
- package/components/accordion/accordion.js +1 -1
- package/components/alert/Alert.svelte.d.ts +1 -0
- package/components/alert/AlertDefaultStructure.svelte.d.ts +1 -0
- package/components/collapse/Collapse.svelte.d.ts +1 -0
- package/components/modal/modalService.d.ts +4 -4
- package/components/modal/modalService.js +4 -4
- package/components/pagination/Pagination.svelte.d.ts +1 -0
- package/components/pagination/PaginationDefaultPages.svelte.d.ts +1 -0
- package/components/pagination/PaginationDefaultStructure.svelte.d.ts +1 -0
- package/components/progressbar/Progressbar.svelte.d.ts +1 -0
- package/components/progressbar/ProgressbarDefaultStructure.svelte.d.ts +1 -0
- package/components/rating/Rating.svelte.d.ts +1 -0
- package/components/select/select.gen.d.ts +6 -0
- package/components/slider/Slider.svelte.d.ts +1 -0
- package/components/slider/SliderDefaultHandle.svelte.d.ts +1 -0
- package/components/slider/SliderDefaultStructure.svelte.d.ts +1 -0
- package/components/toast/Toast.svelte.d.ts +1 -0
- package/components/toast/ToastDefaultStructure.svelte.d.ts +1 -0
- package/components/tree/Tree.svelte +36 -0
- package/components/tree/Tree.svelte.d.ts +4 -0
- package/components/tree/TreeDefaultItem.svelte +20 -0
- package/components/tree/TreeDefaultItem.svelte.d.ts +3 -0
- package/components/tree/TreeDefaultItemContent.svelte +11 -0
- package/components/tree/TreeDefaultItemContent.svelte.d.ts +3 -0
- package/components/tree/TreeDefaultItemToggle.svelte +15 -0
- package/components/tree/TreeDefaultItemToggle.svelte.d.ts +3 -0
- package/components/tree/TreeDefaultStructure.svelte +16 -0
- package/components/tree/TreeDefaultStructure.svelte.d.ts +3 -0
- package/components/tree/index.d.ts +3 -0
- package/components/tree/index.js +3 -0
- package/components/tree/tree.gen.d.ts +216 -0
- package/components/tree/tree.gen.js +14 -0
- package/config.gen.d.ts +5 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +4 -4
|
@@ -9,6 +9,6 @@ export declare function setAccordionApi(accordionApi: AccordionApi): void;
|
|
|
9
9
|
/**
|
|
10
10
|
* Retrieves the Accordion API from the Svelte context.
|
|
11
11
|
*
|
|
12
|
-
* @returns
|
|
12
|
+
* @returns The Accordion API instance.
|
|
13
13
|
*/
|
|
14
14
|
export declare function getAccordionApi(): AccordionApi;
|
|
@@ -13,7 +13,7 @@ export function setAccordionApi(accordionApi) {
|
|
|
13
13
|
/**
|
|
14
14
|
* Retrieves the Accordion API from the Svelte context.
|
|
15
15
|
*
|
|
16
|
-
* @returns
|
|
16
|
+
* @returns The Accordion API instance.
|
|
17
17
|
*/
|
|
18
18
|
export function getAccordionApi() {
|
|
19
19
|
return getContext(contextInjectionKey);
|
|
@@ -3,10 +3,10 @@ import type { ModalProps } from './modal.gen';
|
|
|
3
3
|
* Opens a modal dialog with the specified options.
|
|
4
4
|
*
|
|
5
5
|
* @template Data - The type of data that the modal will handle.
|
|
6
|
-
* @param
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
9
|
-
* @returns
|
|
6
|
+
* @param options - The options to configure the modal.
|
|
7
|
+
* @param context - Optional context to pass to the modal.
|
|
8
|
+
* @param context.context - A map of context values to pass to the modal.
|
|
9
|
+
* @returns A promise that resolves when the modal is closed.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```typescript
|
|
@@ -4,10 +4,10 @@ import Modal from './Modal.svelte';
|
|
|
4
4
|
* Opens a modal dialog with the specified options.
|
|
5
5
|
*
|
|
6
6
|
* @template Data - The type of data that the modal will handle.
|
|
7
|
-
* @param
|
|
8
|
-
* @param
|
|
9
|
-
* @param
|
|
10
|
-
* @returns
|
|
7
|
+
* @param options - The options to configure the modal.
|
|
8
|
+
* @param context - Optional context to pass to the modal.
|
|
9
|
+
* @param context.context - A map of context values to pass to the modal.
|
|
10
|
+
* @returns A promise that resolves when the modal is closed.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```typescript
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { PaginationContext } from './pagination.gen';
|
|
2
2
|
declare const PaginationDefaultStructure: import("svelte").Component<PaginationContext, {}, "">;
|
|
3
|
+
type PaginationDefaultStructure = ReturnType<typeof PaginationDefaultStructure>;
|
|
3
4
|
export default PaginationDefaultStructure;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { ProgressbarContext } from './progressbar.gen';
|
|
2
2
|
declare const ProgressbarDefaultStructure: import("svelte").Component<ProgressbarContext, {}, "">;
|
|
3
|
+
type ProgressbarDefaultStructure = ReturnType<typeof ProgressbarDefaultStructure>;
|
|
3
4
|
export default ProgressbarDefaultStructure;
|
|
@@ -306,6 +306,8 @@ declare const export_createSelect: <Item>(config?: PropsConfig<SelectProps<Item>
|
|
|
306
306
|
export { export_createSelect as createSelect };
|
|
307
307
|
/**
|
|
308
308
|
* Item representation built from the items provided in parameters
|
|
309
|
+
*
|
|
310
|
+
* @template T - The type of the Select Items
|
|
309
311
|
*/
|
|
310
312
|
export interface ItemContext<T> {
|
|
311
313
|
/**
|
|
@@ -323,6 +325,8 @@ export interface ItemContext<T> {
|
|
|
323
325
|
}
|
|
324
326
|
/**
|
|
325
327
|
* Interface representing the API for a Select component.
|
|
328
|
+
*
|
|
329
|
+
* @template Item - The type of the Select Items
|
|
326
330
|
*/
|
|
327
331
|
export interface SelectApi<Item> {
|
|
328
332
|
/**
|
|
@@ -388,6 +392,8 @@ export interface SelectApi<Item> {
|
|
|
388
392
|
}
|
|
389
393
|
/**
|
|
390
394
|
* Interface representing the directives used in the Select component.
|
|
395
|
+
*
|
|
396
|
+
* @template Item - The type of the Select Items
|
|
391
397
|
*/
|
|
392
398
|
export interface SelectDirectives<Item> {
|
|
393
399
|
/**
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {Slot} from '@agnos-ui/svelte-headless/slot';
|
|
3
|
+
import {callWidgetFactory} from '../../config';
|
|
4
|
+
import type {TreeContext, TreeProps, TreeSlotItemContext} from './tree.gen';
|
|
5
|
+
import {createTree} from './tree.gen';
|
|
6
|
+
import TreeDefaultItemContent from './TreeDefaultItemContent.svelte';
|
|
7
|
+
import TreeDefaultItem from './TreeDefaultItem.svelte';
|
|
8
|
+
import TreeDefaultStructure from './TreeDefaultStructure.svelte';
|
|
9
|
+
import TreeDefaultItemToggle from './TreeDefaultItemToggle.svelte';
|
|
10
|
+
|
|
11
|
+
let props: Partial<TreeProps> = $props();
|
|
12
|
+
|
|
13
|
+
const widget = callWidgetFactory({
|
|
14
|
+
factory: createTree,
|
|
15
|
+
widgetName: 'tree',
|
|
16
|
+
props,
|
|
17
|
+
enablePatchChanged: true,
|
|
18
|
+
defaultConfig: {structure, item, itemContent, itemToggle},
|
|
19
|
+
});
|
|
20
|
+
const {state} = widget;
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
{#snippet structure(props: TreeContext)}
|
|
24
|
+
<TreeDefaultStructure {...props} />
|
|
25
|
+
{/snippet}
|
|
26
|
+
{#snippet item(props: TreeSlotItemContext)}
|
|
27
|
+
<TreeDefaultItem {...props} />
|
|
28
|
+
{/snippet}
|
|
29
|
+
{#snippet itemContent(props: TreeSlotItemContext)}
|
|
30
|
+
<TreeDefaultItemContent {...props} />
|
|
31
|
+
{/snippet}
|
|
32
|
+
{#snippet itemToggle(props: TreeSlotItemContext)}
|
|
33
|
+
<TreeDefaultItemToggle {...props} />
|
|
34
|
+
{/snippet}
|
|
35
|
+
|
|
36
|
+
<Slot content={state.structure} props={widget} />
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {ssrAttributes as __AgnosUISveltePreprocess__ssrAttributes} from '@agnos-ui/svelte-headless/utils/directive';
|
|
3
|
+
import {BROWSER as __AgnosUISveltePreprocess__BROWSER} from 'esm-env';
|
|
4
|
+
|
|
5
|
+
import {Slot} from '@agnos-ui/svelte-headless/slot';
|
|
6
|
+
import type {TreeSlotItemContext} from './tree.gen';
|
|
7
|
+
|
|
8
|
+
let {item, state, api, directives}: TreeSlotItemContext = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<li use:directives.itemAttributesDirective={{item: item}} {...__AgnosUISveltePreprocess__BROWSER ? {} : __AgnosUISveltePreprocess__ssrAttributes([directives.itemAttributesDirective, {item: item}])}>
|
|
12
|
+
<Slot content={state.itemContent} props={{item, state, api, directives}} />
|
|
13
|
+
{#if state.expandedMap.get(item)}
|
|
14
|
+
<ul role="group">
|
|
15
|
+
{#each item.children as child, index (child.label + child.level + index)}
|
|
16
|
+
<Slot content={state.item} props={{item: child, state, api, directives}} />
|
|
17
|
+
{/each}
|
|
18
|
+
</ul>
|
|
19
|
+
{/if}
|
|
20
|
+
</li>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {Slot} from '@agnos-ui/svelte-headless/slot';
|
|
3
|
+
import type {TreeSlotItemContext} from './tree.gen';
|
|
4
|
+
|
|
5
|
+
let {item, state, api, directives}: TreeSlotItemContext = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<span class="au-tree-item">
|
|
9
|
+
<Slot content={state.itemToggle} props={{item, state, api, directives}} />
|
|
10
|
+
{item.label}
|
|
11
|
+
</span>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {ssrAttributes as __AgnosUISveltePreprocess__ssrAttributes} from '@agnos-ui/svelte-headless/utils/directive';
|
|
3
|
+
import {BROWSER as __AgnosUISveltePreprocess__BROWSER} from 'esm-env';
|
|
4
|
+
|
|
5
|
+
import type {TreeSlotItemContext} from './tree.gen';
|
|
6
|
+
|
|
7
|
+
let {item, directives}: TreeSlotItemContext = $props();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
{#if item.children.length > 0}
|
|
11
|
+
<!-- svelte-ignore a11y_consider_explicit_label -->
|
|
12
|
+
<button use:directives.itemToggleDirective={{item: item}} {...__AgnosUISveltePreprocess__BROWSER ? {} : __AgnosUISveltePreprocess__ssrAttributes([directives.itemToggleDirective, {item: item}])}></button>
|
|
13
|
+
{:else}
|
|
14
|
+
<span class="au-tree-expand-icon-placeholder"></span>
|
|
15
|
+
{/if}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {ssrAttributes as __AgnosUISveltePreprocess__ssrAttributes, classDirective as __AgnosUISveltePreprocess__classDirective} from '@agnos-ui/svelte-headless/utils/directive';
|
|
3
|
+
import {BROWSER as __AgnosUISveltePreprocess__BROWSER} from 'esm-env';
|
|
4
|
+
|
|
5
|
+
import {Slot} from '@agnos-ui/svelte-headless/slot';
|
|
6
|
+
import type {TreeContext} from './tree.gen';
|
|
7
|
+
|
|
8
|
+
let widget: TreeContext = $props();
|
|
9
|
+
let {state, directives} = widget;
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<ul role="tree" use:__AgnosUISveltePreprocess__classDirective={"au-tree "+(state.className)} use:directives.navigationDirective {...__AgnosUISveltePreprocess__BROWSER ? {} : __AgnosUISveltePreprocess__ssrAttributes(directives.navigationDirective, [__AgnosUISveltePreprocess__classDirective, "au-tree "+(state.className)])}>
|
|
13
|
+
{#each state.normalizedNodes as item, index (item.label + item.level + index)}
|
|
14
|
+
<Slot content={state.item} props={{item, ...widget}} />
|
|
15
|
+
{/each}
|
|
16
|
+
</ul>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const TreeDefaultStructure: import("svelte").Component<WidgetSlotContext<Widget<import("./tree.gen").TreeProps, import("./tree.gen").TreeState, import("./tree.gen").TreeApi, import("./tree.gen").TreeDirectives>>, {}, "">;
|
|
2
|
+
type TreeDefaultStructure = ReturnType<typeof TreeDefaultStructure>;
|
|
3
|
+
export default TreeDefaultStructure;
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import type { WidgetSlotContext, SlotContent, Widget, WidgetFactory, Directive } from '@agnos-ui/svelte-headless/types';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieve a shallow copy of the default Tree config
|
|
4
|
+
* @returns the default Tree config
|
|
5
|
+
*/
|
|
6
|
+
declare const export_getTreeDefaultConfig: () => TreeProps;
|
|
7
|
+
export { export_getTreeDefaultConfig as getTreeDefaultConfig };
|
|
8
|
+
/**
|
|
9
|
+
* Represents the context for a Tree widget.
|
|
10
|
+
* This interface is an alias for `WidgetSlotContext<TreeWidget>`.
|
|
11
|
+
*/
|
|
12
|
+
export type TreeContext = WidgetSlotContext<TreeWidget>;
|
|
13
|
+
/**
|
|
14
|
+
* Represents the context for a tree item, extending the base `TreeContext`
|
|
15
|
+
* with an additional `item` property.
|
|
16
|
+
*/
|
|
17
|
+
export type TreeSlotItemContext = TreeContext & {
|
|
18
|
+
item: NormalizedTreeItem;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Represents the state of a Tree component.
|
|
22
|
+
*/
|
|
23
|
+
export interface TreeState {
|
|
24
|
+
/**
|
|
25
|
+
* Array of normalized tree nodes
|
|
26
|
+
*/
|
|
27
|
+
normalizedNodes: NormalizedTreeItem[];
|
|
28
|
+
/**
|
|
29
|
+
* Getter of expanded state for each tree node
|
|
30
|
+
*/
|
|
31
|
+
expandedMap: {
|
|
32
|
+
get(item: NormalizedTreeItem): boolean | undefined;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Optional accessibility label for the tree if there is no explicit label
|
|
36
|
+
*
|
|
37
|
+
* @defaultValue `''`
|
|
38
|
+
*/
|
|
39
|
+
ariaLabel?: string;
|
|
40
|
+
/**
|
|
41
|
+
* CSS classes to be applied on the widget main container
|
|
42
|
+
*
|
|
43
|
+
* @defaultValue `''`
|
|
44
|
+
*/
|
|
45
|
+
className: string;
|
|
46
|
+
/**
|
|
47
|
+
* Slot to change the default display of the tree
|
|
48
|
+
*/
|
|
49
|
+
structure: SlotContent<TreeContext>;
|
|
50
|
+
/**
|
|
51
|
+
* Slot to change the default tree item
|
|
52
|
+
*/
|
|
53
|
+
item: SlotContent<TreeSlotItemContext>;
|
|
54
|
+
/**
|
|
55
|
+
* Slot to change the default tree item content
|
|
56
|
+
*/
|
|
57
|
+
itemContent: SlotContent<TreeSlotItemContext>;
|
|
58
|
+
/**
|
|
59
|
+
* Slot to change the default tree item toggle
|
|
60
|
+
*/
|
|
61
|
+
itemToggle: SlotContent<TreeSlotItemContext>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Represents the properties for the Tree component.
|
|
65
|
+
*/
|
|
66
|
+
export interface TreeProps {
|
|
67
|
+
/**
|
|
68
|
+
* Array of the tree nodes to display
|
|
69
|
+
*
|
|
70
|
+
* @defaultValue `[]`
|
|
71
|
+
*/
|
|
72
|
+
nodes: TreeItem[];
|
|
73
|
+
/**
|
|
74
|
+
* An event emitted when the user toggles the expand of the TreeItem.
|
|
75
|
+
*
|
|
76
|
+
* Event payload is equal to the TreeItem clicked.
|
|
77
|
+
*
|
|
78
|
+
* @defaultValue
|
|
79
|
+
* ```ts
|
|
80
|
+
* () => {}
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
onExpandToggle: (node: NormalizedTreeItem) => void;
|
|
84
|
+
/**
|
|
85
|
+
* Retrieves expand items of the TreeItem
|
|
86
|
+
*
|
|
87
|
+
* @param node - HTML element that is representing the expand item
|
|
88
|
+
*
|
|
89
|
+
* @defaultValue
|
|
90
|
+
* ```ts
|
|
91
|
+
* (node: HTMLElement) => node.querySelectorAll('button')
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
navSelector(node: HTMLElement): NodeListOf<HTMLButtonElement>;
|
|
95
|
+
/**
|
|
96
|
+
* Return the value for the 'aria-label' attribute of the toggle
|
|
97
|
+
* @param label - tree item label
|
|
98
|
+
*
|
|
99
|
+
* @defaultValue
|
|
100
|
+
* ```ts
|
|
101
|
+
* (label: string) => `Toggle ${label}`
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
ariaLabelToggleFn: (label: string) => string;
|
|
105
|
+
/**
|
|
106
|
+
* Optional accessibility label for the tree if there is no explicit label
|
|
107
|
+
*
|
|
108
|
+
* @defaultValue `''`
|
|
109
|
+
*/
|
|
110
|
+
ariaLabel?: string;
|
|
111
|
+
/**
|
|
112
|
+
* CSS classes to be applied on the widget main container
|
|
113
|
+
*
|
|
114
|
+
* @defaultValue `''`
|
|
115
|
+
*/
|
|
116
|
+
className: string;
|
|
117
|
+
/**
|
|
118
|
+
* Slot to change the default display of the tree
|
|
119
|
+
*/
|
|
120
|
+
structure: SlotContent<TreeContext>;
|
|
121
|
+
/**
|
|
122
|
+
* Slot to change the default tree item
|
|
123
|
+
*/
|
|
124
|
+
item: SlotContent<TreeSlotItemContext>;
|
|
125
|
+
/**
|
|
126
|
+
* Slot to change the default tree item content
|
|
127
|
+
*/
|
|
128
|
+
itemContent: SlotContent<TreeSlotItemContext>;
|
|
129
|
+
/**
|
|
130
|
+
* Slot to change the default tree item toggle
|
|
131
|
+
*/
|
|
132
|
+
itemToggle: SlotContent<TreeSlotItemContext>;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Represents a Tree widget component.
|
|
136
|
+
*/
|
|
137
|
+
export type TreeWidget = Widget<TreeProps, TreeState, TreeApi, TreeDirectives>;
|
|
138
|
+
/**
|
|
139
|
+
* Create a Tree with given config props
|
|
140
|
+
* @param config - an optional tree config
|
|
141
|
+
* @returns a TreeWidget
|
|
142
|
+
*/
|
|
143
|
+
declare const export_createTree: WidgetFactory<TreeWidget>;
|
|
144
|
+
export { export_createTree as createTree };
|
|
145
|
+
/**
|
|
146
|
+
* Represents a tree item component.
|
|
147
|
+
*/
|
|
148
|
+
export interface TreeItem {
|
|
149
|
+
/**
|
|
150
|
+
* Optional accessibility label for the node
|
|
151
|
+
*/
|
|
152
|
+
ariaLabel?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Optional array of children nodes
|
|
155
|
+
*/
|
|
156
|
+
children?: TreeItem[];
|
|
157
|
+
/**
|
|
158
|
+
* If `true` the node is expanded
|
|
159
|
+
*/
|
|
160
|
+
isExpanded?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* String title of the node
|
|
163
|
+
*/
|
|
164
|
+
label: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Normalized TreeItem object
|
|
168
|
+
*/
|
|
169
|
+
export interface NormalizedTreeItem {
|
|
170
|
+
/**
|
|
171
|
+
* Accessibility label for the node
|
|
172
|
+
*/
|
|
173
|
+
ariaLabel: string;
|
|
174
|
+
/**
|
|
175
|
+
* Level in the hierarchy, starts with 0 for a root node
|
|
176
|
+
*/
|
|
177
|
+
level: number;
|
|
178
|
+
/**
|
|
179
|
+
* An array of children nodes
|
|
180
|
+
*/
|
|
181
|
+
children: NormalizedTreeItem[];
|
|
182
|
+
/**
|
|
183
|
+
* If `true` the node is expanded
|
|
184
|
+
*/
|
|
185
|
+
isExpanded?: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* String title of the node
|
|
188
|
+
*/
|
|
189
|
+
label: string;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Interface representing the API for a Tree component.
|
|
193
|
+
*/
|
|
194
|
+
export interface TreeApi {
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Interface representing various directives used in the Tree component.
|
|
198
|
+
*/
|
|
199
|
+
export interface TreeDirectives {
|
|
200
|
+
/**
|
|
201
|
+
* Directive to attach navManager for the tree
|
|
202
|
+
*/
|
|
203
|
+
navigationDirective: Directive;
|
|
204
|
+
/**
|
|
205
|
+
* Directive to handle toggle for the tree item
|
|
206
|
+
*/
|
|
207
|
+
itemToggleDirective: Directive<{
|
|
208
|
+
item: NormalizedTreeItem;
|
|
209
|
+
}>;
|
|
210
|
+
/**
|
|
211
|
+
* Directive to handle attributes for the tree item
|
|
212
|
+
*/
|
|
213
|
+
itemAttributesDirective: Directive<{
|
|
214
|
+
item: NormalizedTreeItem;
|
|
215
|
+
}>;
|
|
216
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getTreeDefaultConfig, createTree } from '@agnos-ui/core-bootstrap/components/tree';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieve a shallow copy of the default Tree config
|
|
4
|
+
* @returns the default Tree config
|
|
5
|
+
*/
|
|
6
|
+
const export_getTreeDefaultConfig = getTreeDefaultConfig;
|
|
7
|
+
export { export_getTreeDefaultConfig as getTreeDefaultConfig };
|
|
8
|
+
/**
|
|
9
|
+
* Create a Tree with given config props
|
|
10
|
+
* @param config - an optional tree config
|
|
11
|
+
* @returns a TreeWidget
|
|
12
|
+
*/
|
|
13
|
+
const export_createTree = createTree;
|
|
14
|
+
export { export_createTree as createTree };
|
package/config.gen.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type { RatingProps } from './components/rating';
|
|
|
8
8
|
import type { SelectProps } from './components/select';
|
|
9
9
|
import type { SliderProps } from './components/slider';
|
|
10
10
|
import type { ToastProps } from './components/toast';
|
|
11
|
+
import type { TreeProps } from './components/tree';
|
|
11
12
|
export type WidgetsConfig = {
|
|
12
13
|
/**
|
|
13
14
|
* the accordion widget config
|
|
@@ -49,4 +50,8 @@ export type WidgetsConfig = {
|
|
|
49
50
|
* the toast widget config
|
|
50
51
|
*/
|
|
51
52
|
toast: ToastProps;
|
|
53
|
+
/**
|
|
54
|
+
* the tree widget config
|
|
55
|
+
*/
|
|
56
|
+
tree: TreeProps;
|
|
52
57
|
};
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/svelte-bootstrap",
|
|
3
3
|
"description": "Bootstrap-based component library for Svelte.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0-next.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"module": "./index.js",
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@agnos-ui/core-bootstrap": "0.
|
|
53
|
-
"@agnos-ui/svelte-headless": "0.
|
|
52
|
+
"@agnos-ui/core-bootstrap": "0.6.0-next.0",
|
|
53
|
+
"@agnos-ui/svelte-headless": "0.6.0-next.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@amadeus-it-group/tansu": "^1.0.0",
|
|
57
57
|
"esm-env": "^1.1.4",
|
|
58
|
-
"svelte": "^5.
|
|
58
|
+
"svelte": "^5.2.7"
|
|
59
59
|
},
|
|
60
60
|
"sideEffects": false,
|
|
61
61
|
"homepage": "https://www.agnosui.dev/latest/",
|