@addsign/moje-agenda-shared-lib 1.0.60 → 2.0.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/dist/Dialog-DZMfjbGC.js +421 -0
- package/dist/Dialog-DZMfjbGC.js.map +1 -0
- package/dist/assets/style.css +4369 -0
- package/dist/assets/tailwind.css +1365 -1193
- package/dist/check-B7dJm08z.js +12 -0
- package/dist/check-B7dJm08z.js.map +1 -0
- package/dist/components/Button.js +1 -1
- package/dist/components/datatable/DataTable.js +6 -2
- package/dist/components/datatable/DataTable.js.map +1 -1
- package/dist/components/datatable/DataTableServer.js +6 -2
- package/dist/components/datatable/DataTableServer.js.map +1 -1
- package/dist/components/form/AutocompleteSearchBar.js +6 -2
- package/dist/components/form/AutocompleteSearchBar.js.map +1 -1
- package/dist/components/form/AutocompleteSearchBarServer.js +6 -2
- package/dist/components/form/AutocompleteSearchBarServer.js.map +1 -1
- package/dist/components/form/FileInput.js +7 -3
- package/dist/components/form/FileInput.js.map +1 -1
- package/dist/components/form/FileInputMultiple.js +7 -3
- package/dist/components/form/FileInputMultiple.js.map +1 -1
- package/dist/components/form/FormField.js +6 -2
- package/dist/components/form/FormField.js.map +1 -1
- package/dist/components/form/PositionsSelectorSingle.js +6 -2
- package/dist/components/form/PositionsSelectorSingle.js.map +1 -1
- package/dist/components/form/SelectField.js +6 -2
- package/dist/components/form/SelectField.js.map +1 -1
- package/dist/components/profiles/ProfileOverview.js +6 -2
- package/dist/components/profiles/ProfileOverview.js.map +1 -1
- package/dist/components/ui/Combobox.d.ts +1 -0
- package/dist/components/ui/Combobox.js +138 -0
- package/dist/components/ui/Combobox.js.map +1 -0
- package/dist/components/ui/DateTimePicker.js +19 -5
- package/dist/components/ui/DateTimePicker.js.map +1 -1
- package/dist/components/ui/Dialog.js +15 -413
- package/dist/components/ui/Dialog.js.map +1 -1
- package/dist/components/ui/ScrollArea.js +2 -1
- package/dist/components/ui/ScrollArea.js.map +1 -1
- package/dist/components/ui/command.d.ts +80 -0
- package/dist/components/ui/command.js +643 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/datepicker.js +14 -1
- package/dist/components/ui/datepicker.js.map +1 -1
- package/dist/components/ui/popover.js +3 -2
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/radioGroup.d.ts +5 -0
- package/dist/components/ui/radioGroup.js +586 -0
- package/dist/components/ui/radioGroup.js.map +1 -0
- package/dist/components/ui/select.js +9 -144
- package/dist/components/ui/select.js.map +1 -1
- package/dist/index-BXrwe-_7.js +1395 -0
- package/dist/index-BXrwe-_7.js.map +1 -0
- package/dist/index-Bk8dRTPE.js +11 -0
- package/dist/index-Bk8dRTPE.js.map +1 -0
- package/dist/index-BlzC-wss.js +140 -0
- package/dist/index-BlzC-wss.js.map +1 -0
- package/dist/index-Bp9GiUkg.js +2266 -0
- package/dist/index-Bp9GiUkg.js.map +1 -0
- package/dist/index-BzVVosDl.js +57 -0
- package/dist/index-BzVVosDl.js.map +1 -0
- package/dist/index-CbAQSs_C.js +40 -0
- package/dist/index-CbAQSs_C.js.map +1 -0
- package/dist/index-Dz_fWpFA.js +2203 -0
- package/dist/index-Dz_fWpFA.js.map +1 -0
- package/dist/index-IXOTxK3N.js +7 -0
- package/dist/index-IXOTxK3N.js.map +1 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +29 -12
- package/dist/main.js.map +1 -1
- package/dist/parse-D2yb8751.js +1727 -0
- package/dist/parse-D2yb8751.js.map +1 -0
- package/dist/tailwind-l0sNRNKZ.js +2 -0
- package/dist/tailwind-l0sNRNKZ.js.map +1 -0
- package/lib/components/Button.tsx +57 -0
- package/lib/components/Calendar.tsx +242 -0
- package/lib/components/ConfirmationModalDialog.tsx +115 -0
- package/lib/components/Modal.tsx +73 -0
- package/lib/components/ModalDialog.tsx +63 -0
- package/lib/components/Spinner.tsx +25 -0
- package/lib/components/SpinnerIcon.tsx +12 -0
- package/lib/components/datatable/DataTable.tsx +442 -0
- package/lib/components/datatable/DataTableServer.tsx +939 -0
- package/lib/components/datatable/DatatableSettings.tsx +48 -0
- package/lib/components/datatable/Resizable.tsx +99 -0
- package/lib/components/datatable/types.ts +33 -0
- package/lib/components/form/AutocompleteSearchBar.tsx +424 -0
- package/lib/components/form/AutocompleteSearchBarServer.tsx +257 -0
- package/lib/components/form/DateField.tsx +124 -0
- package/lib/components/form/DateRangeField.tsx +116 -0
- package/lib/components/form/FileInput.tsx +188 -0
- package/lib/components/form/FileInputMultiple.tsx +186 -0
- package/lib/components/form/FormField.tsx +371 -0
- package/lib/components/form/InputField.tsx +230 -0
- package/lib/components/form/PositionsSelectorSingle.tsx +266 -0
- package/lib/components/form/RadioGroup.tsx +64 -0
- package/lib/components/form/SelectField.tsx +267 -0
- package/lib/components/layout/IconInCircle.tsx +29 -0
- package/lib/components/layout/PageTitle.tsx +19 -0
- package/lib/components/layout/SectionTitle.tsx +22 -0
- package/lib/components/profiles/ProfileOverview.tsx +212 -0
- package/lib/components/ui/Calendar.tsx +68 -0
- package/lib/components/ui/Combobox.tsx +122 -0
- package/lib/components/ui/DatePicker.tsx +124 -0
- package/lib/components/ui/DateTimePicker.tsx +187 -0
- package/lib/components/ui/Dialog.tsx +118 -0
- package/lib/components/ui/ScrollArea.tsx +45 -0
- package/lib/components/ui/button.tsx +56 -0
- package/lib/components/ui/command.tsx +153 -0
- package/lib/components/ui/form.tsx +177 -0
- package/lib/components/ui/input.tsx +22 -0
- package/lib/components/ui/label.tsx +24 -0
- package/lib/components/ui/popover.tsx +31 -0
- package/lib/components/ui/radioGroup.tsx +44 -0
- package/lib/components/ui/select.tsx +158 -0
- package/lib/contexts/FederationContext.tsx +28 -0
- package/lib/contexts/useFederationContext.ts +4 -0
- package/lib/css/tailwind.css +10 -0
- package/lib/fonts/arial.ts +3 -0
- package/lib/fonts/arialBold.ts +4 -0
- package/lib/main.ts +64 -0
- package/lib/types.ts +492 -0
- package/lib/utils/PdfManager.ts +224 -0
- package/lib/utils/getFullName.tsx +83 -0
- package/lib/utils/getIntersectingDays.ts +28 -0
- package/lib/utils/handleErrors.ts +28 -0
- package/lib/utils/hasRightInModule.ts +17 -0
- package/lib/utils/hasRole.ts +12 -0
- package/lib/utils/utils.ts +6 -0
- package/lib/vite-env.d.ts +1 -0
- package/package.json +5 -2
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import React__default from "react";
|
|
4
3
|
import { P as Primitive, r as reactDomExports } from "../../index-DvR8HKPa.js";
|
|
5
|
-
import {
|
|
6
|
-
import { c as createContextScope
|
|
4
|
+
import { c as clamp } from "../../index-IXOTxK3N.js";
|
|
5
|
+
import { c as createContextScope, a as composeEventHandlers, u as useLayoutEffect2, d as useCallbackRef } from "../../index-BpHbTxNe.js";
|
|
6
|
+
import { c as createCollection, u as usePrevious } from "../../index-BlzC-wss.js";
|
|
7
7
|
import { u as useComposedRefs, S as Slot } from "../../index-CS99lEeB.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { u as useDirection } from "../../index-Bk8dRTPE.js";
|
|
9
|
+
import { h as hideOthers, u as useFocusGuards, R as ReactRemoveScroll, F as FocusScope, D as DismissableLayer, P as Portal$1 } from "../../index-BXrwe-_7.js";
|
|
10
|
+
import { a as useId, u as useControllableState } from "../../index-BzVVosDl.js";
|
|
11
|
+
import { c as createPopperScope, A as Anchor, C as Content, a as Arrow, R as Root2$1 } from "../../index-Dz_fWpFA.js";
|
|
10
12
|
import { cn } from "../../utils/utils.js";
|
|
11
13
|
import { c as createLucideIcon } from "../../createLucideIcon-KSoQd4Wi.js";
|
|
12
|
-
|
|
13
|
-
* @license lucide-react v0.456.0 - ISC
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the ISC license.
|
|
16
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/
|
|
18
|
-
const Check = createLucideIcon("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
|
|
14
|
+
import { C as Check } from "../../check-B7dJm08z.js";
|
|
19
15
|
/**
|
|
20
16
|
* @license lucide-react v0.456.0 - ISC
|
|
21
17
|
*
|
|
@@ -32,137 +28,6 @@ const ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
32
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
33
29
|
*/
|
|
34
30
|
const ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
35
|
-
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
36
|
-
let defaultContexts = [];
|
|
37
|
-
function createContext3(rootComponentName, defaultContext) {
|
|
38
|
-
const BaseContext = React.createContext(defaultContext);
|
|
39
|
-
const index = defaultContexts.length;
|
|
40
|
-
defaultContexts = [...defaultContexts, defaultContext];
|
|
41
|
-
function Provider(props) {
|
|
42
|
-
const { scope, children, ...context } = props;
|
|
43
|
-
const Context = (scope == null ? void 0 : scope[scopeName][index]) || BaseContext;
|
|
44
|
-
const value = React.useMemo(() => context, Object.values(context));
|
|
45
|
-
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
46
|
-
}
|
|
47
|
-
function useContext2(consumerName, scope) {
|
|
48
|
-
const Context = (scope == null ? void 0 : scope[scopeName][index]) || BaseContext;
|
|
49
|
-
const context = React.useContext(Context);
|
|
50
|
-
if (context)
|
|
51
|
-
return context;
|
|
52
|
-
if (defaultContext !== void 0)
|
|
53
|
-
return defaultContext;
|
|
54
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
55
|
-
}
|
|
56
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
57
|
-
return [Provider, useContext2];
|
|
58
|
-
}
|
|
59
|
-
const createScope = () => {
|
|
60
|
-
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
61
|
-
return React.createContext(defaultContext);
|
|
62
|
-
});
|
|
63
|
-
return function useScope(scope) {
|
|
64
|
-
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
65
|
-
return React.useMemo(
|
|
66
|
-
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
67
|
-
[scope, contexts]
|
|
68
|
-
);
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
createScope.scopeName = scopeName;
|
|
72
|
-
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
73
|
-
}
|
|
74
|
-
function composeContextScopes(...scopes) {
|
|
75
|
-
const baseScope = scopes[0];
|
|
76
|
-
if (scopes.length === 1)
|
|
77
|
-
return baseScope;
|
|
78
|
-
const createScope = () => {
|
|
79
|
-
const scopeHooks = scopes.map((createScope2) => ({
|
|
80
|
-
useScope: createScope2(),
|
|
81
|
-
scopeName: createScope2.scopeName
|
|
82
|
-
}));
|
|
83
|
-
return function useComposedScopes(overrideScopes) {
|
|
84
|
-
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
85
|
-
const scopeProps = useScope(overrideScopes);
|
|
86
|
-
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
87
|
-
return { ...nextScopes2, ...currentScope };
|
|
88
|
-
}, {});
|
|
89
|
-
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
createScope.scopeName = baseScope.scopeName;
|
|
93
|
-
return createScope;
|
|
94
|
-
}
|
|
95
|
-
function createCollection(name) {
|
|
96
|
-
const PROVIDER_NAME = name + "CollectionProvider";
|
|
97
|
-
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME);
|
|
98
|
-
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
99
|
-
PROVIDER_NAME,
|
|
100
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
101
|
-
);
|
|
102
|
-
const CollectionProvider = (props) => {
|
|
103
|
-
const { scope, children } = props;
|
|
104
|
-
const ref = React__default.useRef(null);
|
|
105
|
-
const itemMap = React__default.useRef(/* @__PURE__ */ new Map()).current;
|
|
106
|
-
return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
107
|
-
};
|
|
108
|
-
CollectionProvider.displayName = PROVIDER_NAME;
|
|
109
|
-
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
110
|
-
const CollectionSlot = React__default.forwardRef(
|
|
111
|
-
(props, forwardedRef) => {
|
|
112
|
-
const { scope, children } = props;
|
|
113
|
-
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
114
|
-
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
115
|
-
return /* @__PURE__ */ jsx(Slot, { ref: composedRefs, children });
|
|
116
|
-
}
|
|
117
|
-
);
|
|
118
|
-
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
119
|
-
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
120
|
-
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
121
|
-
const CollectionItemSlot = React__default.forwardRef(
|
|
122
|
-
(props, forwardedRef) => {
|
|
123
|
-
const { scope, children, ...itemData } = props;
|
|
124
|
-
const ref = React__default.useRef(null);
|
|
125
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
126
|
-
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
127
|
-
React__default.useEffect(() => {
|
|
128
|
-
context.itemMap.set(ref, { ref, ...itemData });
|
|
129
|
-
return () => void context.itemMap.delete(ref);
|
|
130
|
-
});
|
|
131
|
-
return /* @__PURE__ */ jsx(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
132
|
-
}
|
|
133
|
-
);
|
|
134
|
-
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
135
|
-
function useCollection2(scope) {
|
|
136
|
-
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
137
|
-
const getItems = React__default.useCallback(() => {
|
|
138
|
-
const collectionNode = context.collectionRef.current;
|
|
139
|
-
if (!collectionNode)
|
|
140
|
-
return [];
|
|
141
|
-
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
142
|
-
const items = Array.from(context.itemMap.values());
|
|
143
|
-
const orderedItems = items.sort(
|
|
144
|
-
(a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
|
|
145
|
-
);
|
|
146
|
-
return orderedItems;
|
|
147
|
-
}, [context.collectionRef, context.itemMap]);
|
|
148
|
-
return getItems;
|
|
149
|
-
}
|
|
150
|
-
return [
|
|
151
|
-
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
|
|
152
|
-
useCollection2,
|
|
153
|
-
createCollectionScope2
|
|
154
|
-
];
|
|
155
|
-
}
|
|
156
|
-
function usePrevious(value) {
|
|
157
|
-
const ref = React.useRef({ value, previous: value });
|
|
158
|
-
return React.useMemo(() => {
|
|
159
|
-
if (ref.current.value !== value) {
|
|
160
|
-
ref.current.previous = ref.current.value;
|
|
161
|
-
ref.current.value = value;
|
|
162
|
-
}
|
|
163
|
-
return ref.current.previous;
|
|
164
|
-
}, [value]);
|
|
165
|
-
}
|
|
166
31
|
var NAME = "VisuallyHidden";
|
|
167
32
|
var VisuallyHidden = React.forwardRef(
|
|
168
33
|
(props, forwardedRef) => {
|
|
@@ -194,7 +59,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
|
194
59
|
var SELECTION_KEYS = [" ", "Enter"];
|
|
195
60
|
var SELECT_NAME = "Select";
|
|
196
61
|
var [Collection, useCollection, createCollectionScope] = createCollection(SELECT_NAME);
|
|
197
|
-
var [createSelectContext, createSelectScope] = createContextScope
|
|
62
|
+
var [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [
|
|
198
63
|
createCollectionScope,
|
|
199
64
|
createPopperScope
|
|
200
65
|
]);
|