@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.
Files changed (128) hide show
  1. package/dist/Dialog-DZMfjbGC.js +421 -0
  2. package/dist/Dialog-DZMfjbGC.js.map +1 -0
  3. package/dist/assets/style.css +4369 -0
  4. package/dist/assets/tailwind.css +1365 -1193
  5. package/dist/check-B7dJm08z.js +12 -0
  6. package/dist/check-B7dJm08z.js.map +1 -0
  7. package/dist/components/Button.js +1 -1
  8. package/dist/components/datatable/DataTable.js +6 -2
  9. package/dist/components/datatable/DataTable.js.map +1 -1
  10. package/dist/components/datatable/DataTableServer.js +6 -2
  11. package/dist/components/datatable/DataTableServer.js.map +1 -1
  12. package/dist/components/form/AutocompleteSearchBar.js +6 -2
  13. package/dist/components/form/AutocompleteSearchBar.js.map +1 -1
  14. package/dist/components/form/AutocompleteSearchBarServer.js +6 -2
  15. package/dist/components/form/AutocompleteSearchBarServer.js.map +1 -1
  16. package/dist/components/form/FileInput.js +7 -3
  17. package/dist/components/form/FileInput.js.map +1 -1
  18. package/dist/components/form/FileInputMultiple.js +7 -3
  19. package/dist/components/form/FileInputMultiple.js.map +1 -1
  20. package/dist/components/form/FormField.js +6 -2
  21. package/dist/components/form/FormField.js.map +1 -1
  22. package/dist/components/form/PositionsSelectorSingle.js +6 -2
  23. package/dist/components/form/PositionsSelectorSingle.js.map +1 -1
  24. package/dist/components/form/SelectField.js +6 -2
  25. package/dist/components/form/SelectField.js.map +1 -1
  26. package/dist/components/profiles/ProfileOverview.js +6 -2
  27. package/dist/components/profiles/ProfileOverview.js.map +1 -1
  28. package/dist/components/ui/Combobox.d.ts +1 -0
  29. package/dist/components/ui/Combobox.js +138 -0
  30. package/dist/components/ui/Combobox.js.map +1 -0
  31. package/dist/components/ui/DateTimePicker.js +19 -5
  32. package/dist/components/ui/DateTimePicker.js.map +1 -1
  33. package/dist/components/ui/Dialog.js +15 -413
  34. package/dist/components/ui/Dialog.js.map +1 -1
  35. package/dist/components/ui/ScrollArea.js +2 -1
  36. package/dist/components/ui/ScrollArea.js.map +1 -1
  37. package/dist/components/ui/command.d.ts +80 -0
  38. package/dist/components/ui/command.js +643 -0
  39. package/dist/components/ui/command.js.map +1 -0
  40. package/dist/components/ui/datepicker.js +14 -1
  41. package/dist/components/ui/datepicker.js.map +1 -1
  42. package/dist/components/ui/popover.js +3 -2
  43. package/dist/components/ui/popover.js.map +1 -1
  44. package/dist/components/ui/radioGroup.d.ts +5 -0
  45. package/dist/components/ui/radioGroup.js +586 -0
  46. package/dist/components/ui/radioGroup.js.map +1 -0
  47. package/dist/components/ui/select.js +9 -144
  48. package/dist/components/ui/select.js.map +1 -1
  49. package/dist/index-BXrwe-_7.js +1395 -0
  50. package/dist/index-BXrwe-_7.js.map +1 -0
  51. package/dist/index-Bk8dRTPE.js +11 -0
  52. package/dist/index-Bk8dRTPE.js.map +1 -0
  53. package/dist/index-BlzC-wss.js +140 -0
  54. package/dist/index-BlzC-wss.js.map +1 -0
  55. package/dist/index-Bp9GiUkg.js +2266 -0
  56. package/dist/index-Bp9GiUkg.js.map +1 -0
  57. package/dist/index-BzVVosDl.js +57 -0
  58. package/dist/index-BzVVosDl.js.map +1 -0
  59. package/dist/index-CbAQSs_C.js +40 -0
  60. package/dist/index-CbAQSs_C.js.map +1 -0
  61. package/dist/index-Dz_fWpFA.js +2203 -0
  62. package/dist/index-Dz_fWpFA.js.map +1 -0
  63. package/dist/index-IXOTxK3N.js +7 -0
  64. package/dist/index-IXOTxK3N.js.map +1 -0
  65. package/dist/main.d.ts +3 -0
  66. package/dist/main.js +29 -12
  67. package/dist/main.js.map +1 -1
  68. package/dist/parse-D2yb8751.js +1727 -0
  69. package/dist/parse-D2yb8751.js.map +1 -0
  70. package/dist/tailwind-l0sNRNKZ.js +2 -0
  71. package/dist/tailwind-l0sNRNKZ.js.map +1 -0
  72. package/lib/components/Button.tsx +57 -0
  73. package/lib/components/Calendar.tsx +242 -0
  74. package/lib/components/ConfirmationModalDialog.tsx +115 -0
  75. package/lib/components/Modal.tsx +73 -0
  76. package/lib/components/ModalDialog.tsx +63 -0
  77. package/lib/components/Spinner.tsx +25 -0
  78. package/lib/components/SpinnerIcon.tsx +12 -0
  79. package/lib/components/datatable/DataTable.tsx +442 -0
  80. package/lib/components/datatable/DataTableServer.tsx +939 -0
  81. package/lib/components/datatable/DatatableSettings.tsx +48 -0
  82. package/lib/components/datatable/Resizable.tsx +99 -0
  83. package/lib/components/datatable/types.ts +33 -0
  84. package/lib/components/form/AutocompleteSearchBar.tsx +424 -0
  85. package/lib/components/form/AutocompleteSearchBarServer.tsx +257 -0
  86. package/lib/components/form/DateField.tsx +124 -0
  87. package/lib/components/form/DateRangeField.tsx +116 -0
  88. package/lib/components/form/FileInput.tsx +188 -0
  89. package/lib/components/form/FileInputMultiple.tsx +186 -0
  90. package/lib/components/form/FormField.tsx +371 -0
  91. package/lib/components/form/InputField.tsx +230 -0
  92. package/lib/components/form/PositionsSelectorSingle.tsx +266 -0
  93. package/lib/components/form/RadioGroup.tsx +64 -0
  94. package/lib/components/form/SelectField.tsx +267 -0
  95. package/lib/components/layout/IconInCircle.tsx +29 -0
  96. package/lib/components/layout/PageTitle.tsx +19 -0
  97. package/lib/components/layout/SectionTitle.tsx +22 -0
  98. package/lib/components/profiles/ProfileOverview.tsx +212 -0
  99. package/lib/components/ui/Calendar.tsx +68 -0
  100. package/lib/components/ui/Combobox.tsx +122 -0
  101. package/lib/components/ui/DatePicker.tsx +124 -0
  102. package/lib/components/ui/DateTimePicker.tsx +187 -0
  103. package/lib/components/ui/Dialog.tsx +118 -0
  104. package/lib/components/ui/ScrollArea.tsx +45 -0
  105. package/lib/components/ui/button.tsx +56 -0
  106. package/lib/components/ui/command.tsx +153 -0
  107. package/lib/components/ui/form.tsx +177 -0
  108. package/lib/components/ui/input.tsx +22 -0
  109. package/lib/components/ui/label.tsx +24 -0
  110. package/lib/components/ui/popover.tsx +31 -0
  111. package/lib/components/ui/radioGroup.tsx +44 -0
  112. package/lib/components/ui/select.tsx +158 -0
  113. package/lib/contexts/FederationContext.tsx +28 -0
  114. package/lib/contexts/useFederationContext.ts +4 -0
  115. package/lib/css/tailwind.css +10 -0
  116. package/lib/fonts/arial.ts +3 -0
  117. package/lib/fonts/arialBold.ts +4 -0
  118. package/lib/main.ts +64 -0
  119. package/lib/types.ts +492 -0
  120. package/lib/utils/PdfManager.ts +224 -0
  121. package/lib/utils/getFullName.tsx +83 -0
  122. package/lib/utils/getIntersectingDays.ts +28 -0
  123. package/lib/utils/handleErrors.ts +28 -0
  124. package/lib/utils/hasRightInModule.ts +17 -0
  125. package/lib/utils/hasRole.ts +12 -0
  126. package/lib/utils/utils.ts +6 -0
  127. package/lib/vite-env.d.ts +1 -0
  128. 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 { u as useDirection, c as clamp } from "../../index-BBN2TLxK.js";
6
- import { c as createContextScope$1, a as composeEventHandlers, u as useLayoutEffect2, d as useCallbackRef } from "../../index-BpHbTxNe.js";
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 { h as hideOthers, u as useFocusGuards, R as ReactRemoveScroll, F as FocusScope, D as DismissableLayer, b as useId, a as useControllableState, P as Portal$1 } from "../../index-Bvtl_PyD.js";
9
- import { c as createPopperScope, A as Anchor, C as Content, a as Arrow, R as Root2$1 } from "../../index-DUDwny7r.js";
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$1(SELECT_NAME, [
62
+ var [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [
198
63
  createCollectionScope,
199
64
  createPopperScope
200
65
  ]);