@speron/projekt-front 0.0.3
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/cjs/index.js +447 -0
- package/dist/es/index.js +11062 -0
- package/dist/umd/index.js +447 -0
- package/package.json +30 -0
- package/src/Base/Components/Attribute.jsx +51 -0
- package/src/Base/Components/CardCapsule.jsx +353 -0
- package/src/Base/Components/Col.jsx +36 -0
- package/src/Base/Components/ConfirmEdit.jsx +61 -0
- package/src/Base/Components/CopyButton.jsx +33 -0
- package/src/Base/Components/LargeCard.jsx +22 -0
- package/src/Base/Components/Link.jsx +47 -0
- package/src/Base/Components/LiveEdit.jsx +64 -0
- package/src/Base/Components/MediumCard.jsx +30 -0
- package/src/Base/Components/MediumContent.jsx +74 -0
- package/src/Base/Components/MediumEditableContent.jsx +52 -0
- package/src/Base/Components/ProxyLink.jsx +132 -0
- package/src/Base/Components/Row.jsx +23 -0
- package/src/Base/Components/Table.jsx +275 -0
- package/src/Base/Components/index.js +14 -0
- package/src/Base/Components/style.js +278 -0
- package/src/Base/FormControls/Collapsible.jsx +46 -0
- package/src/Base/FormControls/Dialog.jsx +75 -0
- package/src/Base/FormControls/EntityLookup.jsx +175 -0
- package/src/Base/FormControls/Filter.jsx +834 -0
- package/src/Base/FormControls/Input.jsx +163 -0
- package/src/Base/FormControls/Label.jsx +40 -0
- package/src/Base/FormControls/Select.jsx +150 -0
- package/src/Base/FormControls/TextArea.jsx +86 -0
- package/src/Base/FormControls/index.js +8 -0
- package/src/Base/Helpers/AsyncStateIndicator.jsx +9 -0
- package/src/Base/Helpers/GQLEntityProvider.jsx +163 -0
- package/src/Base/Helpers/NavigationHistoryProvider.jsx +178 -0
- package/src/Base/Helpers/PlaceChild.jsx +13 -0
- package/src/Base/Helpers/generateQuery.js +508 -0
- package/src/Base/Helpers/index.js +5 -0
- package/src/Base/Mutations/Create.jsx +152 -0
- package/src/Base/Mutations/Delete.jsx +237 -0
- package/src/Base/Mutations/General.jsx +243 -0
- package/src/Base/Mutations/InteractiveMutations.jsx +32 -0
- package/src/Base/Mutations/Update.jsx +275 -0
- package/src/Base/Mutations/helpers.jsx +7 -0
- package/src/Base/Mutations/index.js +5 -0
- package/src/Base/Pages/Page.jsx +235 -0
- package/src/Base/Pages/PageCatch.jsx +235 -0
- package/src/Base/Pages/PageNavbar.jsx +70 -0
- package/src/Base/Pages/PageVector.jsx +229 -0
- package/src/Base/Pages/RouterSegment.jsx +66 -0
- package/src/Base/Pages/index.js +5 -0
- package/src/Base/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/Base/Queries/Fragments.jsx +101 -0
- package/src/Base/Queries/InsertAsyncAction.jsx +40 -0
- package/src/Base/Queries/ReadAsyncAction.jsx +44 -0
- package/src/Base/Queries/ReadPageAsyncAction.jsx +16 -0
- package/src/Base/Queries/SearchAsyncAction.jsx +16 -0
- package/src/Base/Queries/UpdateAsyncAction.jsx +40 -0
- package/src/Base/Queries/index.js +6 -0
- package/src/Base/Scalars/ScalarAttribute.jsx +49 -0
- package/src/Base/Scalars/index.js +1 -0
- package/src/Base/Vectors/VectorAttribute.jsx +137 -0
- package/src/Base/Vectors/index.js +1 -0
- package/src/Base/index.js +32 -0
- package/src/EventGQLModel/Components/A4Plan/A4Plan.jsx +363 -0
- package/src/EventGQLModel/Components/A4Plan/index.js +1 -0
- package/src/EventGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/EventGQLModel/Components/Children.jsx +31 -0
- package/src/EventGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/EventGQLModel/Components/Filter.jsx +14 -0
- package/src/EventGQLModel/Components/LargeCard.jsx +54 -0
- package/src/EventGQLModel/Components/Link.jsx +55 -0
- package/src/EventGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/EventGQLModel/Components/MediumCard.jsx +39 -0
- package/src/EventGQLModel/Components/MediumContent.jsx +96 -0
- package/src/EventGQLModel/Components/MediumEditableContent.jsx +35 -0
- package/src/EventGQLModel/Components/Plan/PlanRow.jsx +470 -0
- package/src/EventGQLModel/Components/Plan/_utils.js +971 -0
- package/src/EventGQLModel/Components/Plan/calendarReducer.js +535 -0
- package/src/EventGQLModel/Components/Plan/index.js +3 -0
- package/src/EventGQLModel/Components/Table.jsx +7 -0
- package/src/EventGQLModel/Components/index.js +15 -0
- package/src/EventGQLModel/Mutations/Create.jsx +202 -0
- package/src/EventGQLModel/Mutations/Delete.jsx +173 -0
- package/src/EventGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/EventGQLModel/Mutations/Update.jsx +147 -0
- package/src/EventGQLModel/Mutations/helpers.jsx +7 -0
- package/src/EventGQLModel/Pages/PageBase.jsx +56 -0
- package/src/EventGQLModel/Pages/PageCreateItem.jsx +28 -0
- package/src/EventGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/EventGQLModel/Pages/PageNavbar.jsx +160 -0
- package/src/EventGQLModel/Pages/PagePlan.jsx +42 -0
- package/src/EventGQLModel/Pages/PageReadItem.jsx +11 -0
- package/src/EventGQLModel/Pages/PageReadItemEx.jsx +42 -0
- package/src/EventGQLModel/Pages/PageSubevents.jsx +43 -0
- package/src/EventGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/EventGQLModel/Pages/PageVector.jsx +80 -0
- package/src/EventGQLModel/Pages/RouterSegment.jsx +82 -0
- package/src/EventGQLModel/Pages/index.js +2 -0
- package/src/EventGQLModel/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/EventGQLModel/Queries/Fragments.jsx +123 -0
- package/src/EventGQLModel/Queries/InsertAsyncAction.jsx +40 -0
- package/src/EventGQLModel/Queries/ReadAsyncAction.jsx +44 -0
- package/src/EventGQLModel/Queries/ReadPageAsyncAction.jsx +13 -0
- package/src/EventGQLModel/Queries/ReadSubEventsAsyncAction.jsx +44 -0
- package/src/EventGQLModel/Queries/SearchAsyncAction.jsx +16 -0
- package/src/EventGQLModel/Queries/UpdateAsyncAction.jsx +40 -0
- package/src/EventGQLModel/Queries/index.js +6 -0
- package/src/EventGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/EventGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/EventGQLModel/Scalars/index.js +1 -0
- package/src/EventGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/EventGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/EventGQLModel/Vectors/index.js +1 -0
- package/src/EventGQLModel/WhatToDo.md +44 -0
- package/src/EventGQLModel/index.js +71 -0
- package/src/GroupGQLModel/Components/CUDButton.jsx +128 -0
- package/src/GroupGQLModel/Components/CardCapsule.jsx +44 -0
- package/src/GroupGQLModel/Components/Children.jsx +31 -0
- package/src/GroupGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/GroupGQLModel/Components/Filter.jsx +14 -0
- package/src/GroupGQLModel/Components/LargeCard.jsx +68 -0
- package/src/GroupGQLModel/Components/Link.jsx +54 -0
- package/src/GroupGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/GroupGQLModel/Components/MediumCard.jsx +51 -0
- package/src/GroupGQLModel/Components/MediumContent.jsx +56 -0
- package/src/GroupGQLModel/Components/MediumEditableContent.jsx +52 -0
- package/src/GroupGQLModel/Components/Table.jsx +70 -0
- package/src/GroupGQLModel/Components/index.js +14 -0
- package/src/GroupGQLModel/Mutations/AddMembership.jsx +156 -0
- package/src/GroupGQLModel/Mutations/Create.jsx +73 -0
- package/src/GroupGQLModel/Mutations/Delete.jsx +87 -0
- package/src/GroupGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/GroupGQLModel/Mutations/Update.jsx +74 -0
- package/src/GroupGQLModel/Pages/PageBase.jsx +56 -0
- package/src/GroupGQLModel/Pages/PageCreateItem.jsx +27 -0
- package/src/GroupGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/GroupGQLModel/Pages/PageNavbar.jsx +264 -0
- package/src/GroupGQLModel/Pages/PageReadItem.jsx +12 -0
- package/src/GroupGQLModel/Pages/PageReadItemEx.jsx +57 -0
- package/src/GroupGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/GroupGQLModel/Pages/PageVector.jsx +80 -0
- package/src/GroupGQLModel/Pages/RouterSegment.jsx +85 -0
- package/src/GroupGQLModel/Pages/index.js +2 -0
- package/src/GroupGQLModel/Queries/DeleteAsyncAction.jsx +22 -0
- package/src/GroupGQLModel/Queries/Fragments.jsx +145 -0
- package/src/GroupGQLModel/Queries/InsertAsyncAction.jsx +43 -0
- package/src/GroupGQLModel/Queries/ReadAsyncAction.jsx +44 -0
- package/src/GroupGQLModel/Queries/ReadPageAsyncAction.jsx +18 -0
- package/src/GroupGQLModel/Queries/SearchAsyncAction.jsx +15 -0
- package/src/GroupGQLModel/Queries/UpdateAsyncAction.jsx +56 -0
- package/src/GroupGQLModel/Queries/index.js +6 -0
- package/src/GroupGQLModel/Scalars/GroupRoles.jsx +69 -0
- package/src/GroupGQLModel/Scalars/MasterGroup.jsx +15 -0
- package/src/GroupGQLModel/Scalars/RBACObject.jsx +245 -0
- package/src/GroupGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/GroupGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/GroupGQLModel/Scalars/index.js +1 -0
- package/src/GroupGQLModel/Vectors/GroupMemberships.jsx +115 -0
- package/src/GroupGQLModel/Vectors/GroupRoles.jsx +112 -0
- package/src/GroupGQLModel/Vectors/GroupRolesOn.jsx +113 -0
- package/src/GroupGQLModel/Vectors/GroupSubgroups.jsx +97 -0
- package/src/GroupGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/GroupGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/GroupGQLModel/Vectors/index.js +1 -0
- package/src/GroupGQLModel/index.js +7 -0
- package/src/GroupTypeGQLModel/Components/CUDButton.jsx +128 -0
- package/src/GroupTypeGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/GroupTypeGQLModel/Components/Children.jsx +31 -0
- package/src/GroupTypeGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/GroupTypeGQLModel/Components/Filter.jsx +14 -0
- package/src/GroupTypeGQLModel/Components/LargeCard.jsx +49 -0
- package/src/GroupTypeGQLModel/Components/Link.jsx +53 -0
- package/src/GroupTypeGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/GroupTypeGQLModel/Components/MediumCard.jsx +39 -0
- package/src/GroupTypeGQLModel/Components/MediumContent.jsx +97 -0
- package/src/GroupTypeGQLModel/Components/MediumEditableContent.jsx +35 -0
- package/src/GroupTypeGQLModel/Components/Table.jsx +7 -0
- package/src/GroupTypeGQLModel/Components/index.js +14 -0
- package/src/GroupTypeGQLModel/Mutations/Create.jsx +67 -0
- package/src/GroupTypeGQLModel/Mutations/Delete.jsx +80 -0
- package/src/GroupTypeGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/GroupTypeGQLModel/Mutations/Update.jsx +74 -0
- package/src/GroupTypeGQLModel/Pages/Page.jsx +3 -0
- package/src/GroupTypeGQLModel/Pages/PageBase.jsx +26 -0
- package/src/GroupTypeGQLModel/Pages/PageCreateItem.jsx +21 -0
- package/src/GroupTypeGQLModel/Pages/PageDeleteItem.jsx +13 -0
- package/src/GroupTypeGQLModel/Pages/PageNavbar.jsx +148 -0
- package/src/GroupTypeGQLModel/Pages/PageReadItem.jsx +28 -0
- package/src/GroupTypeGQLModel/Pages/PageUpdateItem.jsx +25 -0
- package/src/GroupTypeGQLModel/Pages/PageVector.jsx +83 -0
- package/src/GroupTypeGQLModel/Pages/RouterSegment.jsx +68 -0
- package/src/GroupTypeGQLModel/Pages/index.js +10 -0
- package/src/GroupTypeGQLModel/Queries/DeleteAsyncAction.jsx +27 -0
- package/src/GroupTypeGQLModel/Queries/Fragments.jsx +96 -0
- package/src/GroupTypeGQLModel/Queries/InsertAsyncAction.jsx +41 -0
- package/src/GroupTypeGQLModel/Queries/ReadAsyncAction.jsx +45 -0
- package/src/GroupTypeGQLModel/Queries/ReadPageAsyncAction.jsx +14 -0
- package/src/GroupTypeGQLModel/Queries/SearchAsyncAction.jsx +16 -0
- package/src/GroupTypeGQLModel/Queries/UpdateAsyncAction.jsx +42 -0
- package/src/GroupTypeGQLModel/Queries/index.js +6 -0
- package/src/GroupTypeGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/GroupTypeGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/GroupTypeGQLModel/Scalars/index.js +1 -0
- package/src/GroupTypeGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/GroupTypeGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/GroupTypeGQLModel/Vectors/index.js +1 -0
- package/src/GroupTypeGQLModel/index.js +6 -0
- package/src/MembershipGQLModel/Components/CUDButton.jsx +128 -0
- package/src/MembershipGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/MembershipGQLModel/Components/Children.jsx +31 -0
- package/src/MembershipGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/MembershipGQLModel/Components/Filter.jsx +14 -0
- package/src/MembershipGQLModel/Components/LargeCard.jsx +49 -0
- package/src/MembershipGQLModel/Components/Link.jsx +54 -0
- package/src/MembershipGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/MembershipGQLModel/Components/MediumCard.jsx +39 -0
- package/src/MembershipGQLModel/Components/MediumContent.jsx +97 -0
- package/src/MembershipGQLModel/Components/MediumEditableContent.jsx +35 -0
- package/src/MembershipGQLModel/Components/Table.jsx +7 -0
- package/src/MembershipGQLModel/Components/index.js +14 -0
- package/src/MembershipGQLModel/Mutations/Create.jsx +67 -0
- package/src/MembershipGQLModel/Mutations/Delete.jsx +80 -0
- package/src/MembershipGQLModel/Mutations/InteractiveMutations.jsx +31 -0
- package/src/MembershipGQLModel/Mutations/Update.jsx +74 -0
- package/src/MembershipGQLModel/Mutations/helpers.jsx +7 -0
- package/src/MembershipGQLModel/Pages/PageBase.jsx +57 -0
- package/src/MembershipGQLModel/Pages/PageCreateItem.jsx +28 -0
- package/src/MembershipGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/MembershipGQLModel/Pages/PageNavbar.jsx +110 -0
- package/src/MembershipGQLModel/Pages/PageReadItem.jsx +11 -0
- package/src/MembershipGQLModel/Pages/PageReadItemEx.jsx +42 -0
- package/src/MembershipGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/MembershipGQLModel/Pages/PageVector.jsx +80 -0
- package/src/MembershipGQLModel/Pages/RouterSegment.jsx +73 -0
- package/src/MembershipGQLModel/Pages/index.js +2 -0
- package/src/MembershipGQLModel/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/MembershipGQLModel/Queries/Fragments.jsx +113 -0
- package/src/MembershipGQLModel/Queries/InsertAsyncAction.jsx +38 -0
- package/src/MembershipGQLModel/Queries/ReadAsyncAction.jsx +44 -0
- package/src/MembershipGQLModel/Queries/ReadPageAsyncAction.jsx +13 -0
- package/src/MembershipGQLModel/Queries/SearchAsyncAction.jsx +16 -0
- package/src/MembershipGQLModel/Queries/UpdateAsyncAction.jsx +40 -0
- package/src/MembershipGQLModel/Queries/index.js +6 -0
- package/src/MembershipGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/MembershipGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/MembershipGQLModel/Scalars/index.js +1 -0
- package/src/MembershipGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/MembershipGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/MembershipGQLModel/Vectors/index.js +1 -0
- package/src/MembershipGQLModel/WhatToDo.md +44 -0
- package/src/MembershipGQLModel/index.js +6 -0
- package/src/RBACGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/RBACGQLModel/Components/Children.jsx +31 -0
- package/src/RBACGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/RBACGQLModel/Components/Filter.jsx +14 -0
- package/src/RBACGQLModel/Components/LargeCard.jsx +50 -0
- package/src/RBACGQLModel/Components/Link.jsx +54 -0
- package/src/RBACGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/RBACGQLModel/Components/MediumCard.jsx +39 -0
- package/src/RBACGQLModel/Components/MediumContent.jsx +96 -0
- package/src/RBACGQLModel/Components/MediumEditableContent.jsx +212 -0
- package/src/RBACGQLModel/Components/Table.jsx +7 -0
- package/src/RBACGQLModel/Components/index.js +13 -0
- package/src/RBACGQLModel/Mutations/Create.jsx +202 -0
- package/src/RBACGQLModel/Mutations/Delete.jsx +173 -0
- package/src/RBACGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/RBACGQLModel/Mutations/Update.jsx +147 -0
- package/src/RBACGQLModel/Mutations/helpers.jsx +7 -0
- package/src/RBACGQLModel/Pages/PageBase.jsx +56 -0
- package/src/RBACGQLModel/Pages/PageCreateItem.jsx +28 -0
- package/src/RBACGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/RBACGQLModel/Pages/PageNavbar.jsx +160 -0
- package/src/RBACGQLModel/Pages/PageReadItem.jsx +11 -0
- package/src/RBACGQLModel/Pages/PageReadItemEx.jsx +42 -0
- package/src/RBACGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/RBACGQLModel/Pages/PageVector.jsx +80 -0
- package/src/RBACGQLModel/Pages/RouterSegment.jsx +72 -0
- package/src/RBACGQLModel/Pages/index.js +2 -0
- package/src/RBACGQLModel/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/RBACGQLModel/Queries/Fragments.jsx +101 -0
- package/src/RBACGQLModel/Queries/InsertAsyncAction.jsx +40 -0
- package/src/RBACGQLModel/Queries/ReadAsyncAction.jsx +44 -0
- package/src/RBACGQLModel/Queries/ReadPageAsyncAction.jsx +13 -0
- package/src/RBACGQLModel/Queries/SearchAsyncAction.jsx +16 -0
- package/src/RBACGQLModel/Queries/UpdateAsyncAction.jsx +40 -0
- package/src/RBACGQLModel/Queries/index.js +6 -0
- package/src/RBACGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/RBACGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/RBACGQLModel/Scalars/index.js +1 -0
- package/src/RBACGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/RBACGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/RBACGQLModel/Vectors/index.js +1 -0
- package/src/RBACGQLModel/WhatToDo.md +44 -0
- package/src/RBACGQLModel/index.js +71 -0
- package/src/RoleGQLModel/Components/CUDButton.jsx +128 -0
- package/src/RoleGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/RoleGQLModel/Components/Children.jsx +31 -0
- package/src/RoleGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/RoleGQLModel/Components/Filter.jsx +14 -0
- package/src/RoleGQLModel/Components/LargeCard.jsx +49 -0
- package/src/RoleGQLModel/Components/Link.jsx +55 -0
- package/src/RoleGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/RoleGQLModel/Components/MediumCard.jsx +39 -0
- package/src/RoleGQLModel/Components/MediumContent.jsx +97 -0
- package/src/RoleGQLModel/Components/MediumEditableContent.jsx +72 -0
- package/src/RoleGQLModel/Components/RBACObject.jsx +22 -0
- package/src/RoleGQLModel/Components/Table.jsx +82 -0
- package/src/RoleGQLModel/Components/index.js +14 -0
- package/src/RoleGQLModel/Mutations/AddRoleOnGroup.jsx +117 -0
- package/src/RoleGQLModel/Mutations/Create.jsx +67 -0
- package/src/RoleGQLModel/Mutations/Delete.jsx +80 -0
- package/src/RoleGQLModel/Mutations/InteractiveMutations.jsx +31 -0
- package/src/RoleGQLModel/Mutations/Update.jsx +74 -0
- package/src/RoleGQLModel/Pages/Page.jsx +3 -0
- package/src/RoleGQLModel/Pages/PageBase.jsx +26 -0
- package/src/RoleGQLModel/Pages/PageContent.jsx +31 -0
- package/src/RoleGQLModel/Pages/PageCreateItem.jsx +21 -0
- package/src/RoleGQLModel/Pages/PageDeleteItem.jsx +13 -0
- package/src/RoleGQLModel/Pages/PageNavbar.jsx +161 -0
- package/src/RoleGQLModel/Pages/PageReadItem.jsx +28 -0
- package/src/RoleGQLModel/Pages/PageUpdateItem.jsx +25 -0
- package/src/RoleGQLModel/Pages/PageVector.jsx +83 -0
- package/src/RoleGQLModel/Pages/RouterSegment.jsx +69 -0
- package/src/RoleGQLModel/Pages/index.js +10 -0
- package/src/RoleGQLModel/Queries/DeleteAsyncAction.jsx +22 -0
- package/src/RoleGQLModel/Queries/Fragments.jsx +123 -0
- package/src/RoleGQLModel/Queries/InsertAsyncAction.jsx +45 -0
- package/src/RoleGQLModel/Queries/ReadAsyncAction.jsx +45 -0
- package/src/RoleGQLModel/Queries/ReadPageAsyncAction.jsx +13 -0
- package/src/RoleGQLModel/Queries/UpdateAsyncAction.jsx +35 -0
- package/src/RoleGQLModel/Queries/index.js +6 -0
- package/src/RoleGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/RoleGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/RoleGQLModel/Scalars/index.js +1 -0
- package/src/RoleGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/RoleGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/RoleGQLModel/Vectors/index.js +1 -0
- package/src/RoleGQLModel/index.js +6 -0
- package/src/RoleTypeGQLModel/Components/CUDButton.jsx +128 -0
- package/src/RoleTypeGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/RoleTypeGQLModel/Components/Children.jsx +31 -0
- package/src/RoleTypeGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/RoleTypeGQLModel/Components/Filter.jsx +14 -0
- package/src/RoleTypeGQLModel/Components/LargeCard.jsx +49 -0
- package/src/RoleTypeGQLModel/Components/Link.jsx +55 -0
- package/src/RoleTypeGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/RoleTypeGQLModel/Components/MediumCard.jsx +39 -0
- package/src/RoleTypeGQLModel/Components/MediumContent.jsx +97 -0
- package/src/RoleTypeGQLModel/Components/MediumEditableContent.jsx +35 -0
- package/src/RoleTypeGQLModel/Components/Table.jsx +7 -0
- package/src/RoleTypeGQLModel/Components/index.js +14 -0
- package/src/RoleTypeGQLModel/Mutations/Create.jsx +67 -0
- package/src/RoleTypeGQLModel/Mutations/Delete.jsx +80 -0
- package/src/RoleTypeGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/RoleTypeGQLModel/Mutations/Update.jsx +74 -0
- package/src/RoleTypeGQLModel/Pages/Page.jsx +3 -0
- package/src/RoleTypeGQLModel/Pages/PageBase.jsx +56 -0
- package/src/RoleTypeGQLModel/Pages/PageCreateItem.jsx +27 -0
- package/src/RoleTypeGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/RoleTypeGQLModel/Pages/PageNavbar.jsx +148 -0
- package/src/RoleTypeGQLModel/Pages/PageReadItem.jsx +11 -0
- package/src/RoleTypeGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/RoleTypeGQLModel/Pages/PageVector.jsx +79 -0
- package/src/RoleTypeGQLModel/Pages/RouterSegment.jsx +69 -0
- package/src/RoleTypeGQLModel/Pages/index.js +10 -0
- package/src/RoleTypeGQLModel/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/RoleTypeGQLModel/Queries/Fragments.jsx +103 -0
- package/src/RoleTypeGQLModel/Queries/InsertAsyncAction.jsx +40 -0
- package/src/RoleTypeGQLModel/Queries/ReadAsyncAction.jsx +44 -0
- package/src/RoleTypeGQLModel/Queries/ReadPageAsyncAction.jsx +13 -0
- package/src/RoleTypeGQLModel/Queries/SearchAsyncAction.jsx +29 -0
- package/src/RoleTypeGQLModel/Queries/UpdateAsyncAction.jsx +40 -0
- package/src/RoleTypeGQLModel/Queries/index.js +6 -0
- package/src/RoleTypeGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/RoleTypeGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/RoleTypeGQLModel/Scalars/index.js +1 -0
- package/src/RoleTypeGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/RoleTypeGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/RoleTypeGQLModel/Vectors/index.js +1 -0
- package/src/RoleTypeGQLModel/index.js +6 -0
- package/src/StateGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/StateGQLModel/Components/Children.jsx +31 -0
- package/src/StateGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/StateGQLModel/Components/Filter.jsx +14 -0
- package/src/StateGQLModel/Components/LargeCard.jsx +50 -0
- package/src/StateGQLModel/Components/Link.jsx +54 -0
- package/src/StateGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/StateGQLModel/Components/MediumCard.jsx +39 -0
- package/src/StateGQLModel/Components/MediumContent.jsx +96 -0
- package/src/StateGQLModel/Components/MediumEditableContent.jsx +36 -0
- package/src/StateGQLModel/Components/Table.jsx +7 -0
- package/src/StateGQLModel/Components/index.js +13 -0
- package/src/StateGQLModel/Mutations/Create.jsx +79 -0
- package/src/StateGQLModel/Mutations/Delete.jsx +87 -0
- package/src/StateGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/StateGQLModel/Mutations/Update.jsx +76 -0
- package/src/StateGQLModel/Mutations/helpers.jsx +7 -0
- package/src/StateGQLModel/Pages/PageBase.jsx +56 -0
- package/src/StateGQLModel/Pages/PageCreateItem.jsx +28 -0
- package/src/StateGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/StateGQLModel/Pages/PageNavbar.jsx +160 -0
- package/src/StateGQLModel/Pages/PageReadItem.jsx +11 -0
- package/src/StateGQLModel/Pages/PageReadItemEx.jsx +42 -0
- package/src/StateGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/StateGQLModel/Pages/PageVector.jsx +80 -0
- package/src/StateGQLModel/Pages/RouterSegment.jsx +72 -0
- package/src/StateGQLModel/Pages/index.js +2 -0
- package/src/StateGQLModel/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/StateGQLModel/Queries/Fragments.jsx +109 -0
- package/src/StateGQLModel/Queries/InsertAsyncAction.jsx +104 -0
- package/src/StateGQLModel/Queries/ReadAsyncAction.jsx +48 -0
- package/src/StateGQLModel/Queries/ReadPageAsyncAction.jsx +23 -0
- package/src/StateGQLModel/Queries/SearchAsyncAction.jsx +16 -0
- package/src/StateGQLModel/Queries/UpdateAsyncAction.jsx +106 -0
- package/src/StateGQLModel/Queries/index.js +6 -0
- package/src/StateGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/StateGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/StateGQLModel/Scalars/index.js +1 -0
- package/src/StateGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/StateGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/StateGQLModel/Vectors/index.js +1 -0
- package/src/StateGQLModel/index.js +71 -0
- package/src/StateMachineGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/StateMachineGQLModel/Components/Children.jsx +31 -0
- package/src/StateMachineGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/StateMachineGQLModel/Components/Filter.jsx +14 -0
- package/src/StateMachineGQLModel/Components/LargeCard.jsx +50 -0
- package/src/StateMachineGQLModel/Components/Link.jsx +54 -0
- package/src/StateMachineGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/StateMachineGQLModel/Components/MediumCard.jsx +39 -0
- package/src/StateMachineGQLModel/Components/MediumContent.jsx +96 -0
- package/src/StateMachineGQLModel/Components/MediumEditableContent.jsx +989 -0
- package/src/StateMachineGQLModel/Components/Table.jsx +7 -0
- package/src/StateMachineGQLModel/Components/index.js +13 -0
- package/src/StateMachineGQLModel/Mutations/Create.jsx +79 -0
- package/src/StateMachineGQLModel/Mutations/Delete.jsx +80 -0
- package/src/StateMachineGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/StateMachineGQLModel/Mutations/Update.jsx +74 -0
- package/src/StateMachineGQLModel/Mutations/helpers.jsx +7 -0
- package/src/StateMachineGQLModel/Pages/PageBase.jsx +56 -0
- package/src/StateMachineGQLModel/Pages/PageCreateItem.jsx +28 -0
- package/src/StateMachineGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/StateMachineGQLModel/Pages/PageNavbar.jsx +160 -0
- package/src/StateMachineGQLModel/Pages/PageReadItem.jsx +11 -0
- package/src/StateMachineGQLModel/Pages/PageReadItemEx.jsx +42 -0
- package/src/StateMachineGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/StateMachineGQLModel/Pages/PageVector.jsx +80 -0
- package/src/StateMachineGQLModel/Pages/RouterSegment.jsx +72 -0
- package/src/StateMachineGQLModel/Pages/index.js +2 -0
- package/src/StateMachineGQLModel/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/StateMachineGQLModel/Queries/Fragments.jsx +148 -0
- package/src/StateMachineGQLModel/Queries/InsertAsyncAction.jsx +44 -0
- package/src/StateMachineGQLModel/Queries/ReadAsyncAction.jsx +48 -0
- package/src/StateMachineGQLModel/Queries/ReadPageAsyncAction.jsx +23 -0
- package/src/StateMachineGQLModel/Queries/SearchAsyncAction.jsx +16 -0
- package/src/StateMachineGQLModel/Queries/UpdateAsyncAction.jsx +40 -0
- package/src/StateMachineGQLModel/Queries/index.js +6 -0
- package/src/StateMachineGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/StateMachineGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/StateMachineGQLModel/Scalars/index.js +1 -0
- package/src/StateMachineGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/StateMachineGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/StateMachineGQLModel/Vectors/index.js +1 -0
- package/src/StateMachineGQLModel/WhatToDo.md +44 -0
- package/src/StateMachineGQLModel/index.js +71 -0
- package/src/StateTransitionGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/StateTransitionGQLModel/Components/Children.jsx +31 -0
- package/src/StateTransitionGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/StateTransitionGQLModel/Components/Filter.jsx +14 -0
- package/src/StateTransitionGQLModel/Components/LargeCard.jsx +50 -0
- package/src/StateTransitionGQLModel/Components/Link.jsx +54 -0
- package/src/StateTransitionGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/StateTransitionGQLModel/Components/MediumCard.jsx +39 -0
- package/src/StateTransitionGQLModel/Components/MediumContent.jsx +96 -0
- package/src/StateTransitionGQLModel/Components/MediumEditableContent.jsx +35 -0
- package/src/StateTransitionGQLModel/Components/Table.jsx +7 -0
- package/src/StateTransitionGQLModel/Components/index.js +13 -0
- package/src/StateTransitionGQLModel/Mutations/Create.jsx +79 -0
- package/src/StateTransitionGQLModel/Mutations/Delete.jsx +80 -0
- package/src/StateTransitionGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/StateTransitionGQLModel/Mutations/Update.jsx +75 -0
- package/src/StateTransitionGQLModel/Mutations/helpers.jsx +7 -0
- package/src/StateTransitionGQLModel/Pages/PageBase.jsx +56 -0
- package/src/StateTransitionGQLModel/Pages/PageCreateItem.jsx +28 -0
- package/src/StateTransitionGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/StateTransitionGQLModel/Pages/PageNavbar.jsx +160 -0
- package/src/StateTransitionGQLModel/Pages/PageReadItem.jsx +11 -0
- package/src/StateTransitionGQLModel/Pages/PageReadItemEx.jsx +42 -0
- package/src/StateTransitionGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/StateTransitionGQLModel/Pages/PageVector.jsx +80 -0
- package/src/StateTransitionGQLModel/Pages/RouterSegment.jsx +72 -0
- package/src/StateTransitionGQLModel/Pages/index.js +2 -0
- package/src/StateTransitionGQLModel/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/StateTransitionGQLModel/Queries/Fragments.jsx +150 -0
- package/src/StateTransitionGQLModel/Queries/InsertAsyncAction.jsx +107 -0
- package/src/StateTransitionGQLModel/Queries/ReadAsyncAction.jsx +48 -0
- package/src/StateTransitionGQLModel/Queries/ReadPageAsyncAction.jsx +23 -0
- package/src/StateTransitionGQLModel/Queries/SearchAsyncAction.jsx +16 -0
- package/src/StateTransitionGQLModel/Queries/UpdateAsyncAction.jsx +109 -0
- package/src/StateTransitionGQLModel/Queries/index.js +6 -0
- package/src/StateTransitionGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/StateTransitionGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/StateTransitionGQLModel/Scalars/index.js +1 -0
- package/src/StateTransitionGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/StateTransitionGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/StateTransitionGQLModel/Vectors/index.js +1 -0
- package/src/StateTransitionGQLModel/WhatToDo.md +44 -0
- package/src/StateTransitionGQLModel/index.js +71 -0
- package/src/Template/Attributes/TemplateTrivialAttribute.jsx +21 -0
- package/src/Template/Attributes/index.js +1 -0
- package/src/Template/Components/CUDButton.jsx +128 -0
- package/src/Template/Components/CardCapsule.jsx +43 -0
- package/src/Template/Components/Children.jsx +31 -0
- package/src/Template/Components/ConfirmEdit.jsx +61 -0
- package/src/Template/Components/LargeCard.jsx +48 -0
- package/src/Template/Components/Link.jsx +41 -0
- package/src/Template/Components/LiveEdit.jsx +111 -0
- package/src/Template/Components/MediumCard.jsx +39 -0
- package/src/Template/Components/MediumContent.jsx +97 -0
- package/src/Template/Components/MediumEditableContent.jsx +36 -0
- package/src/Template/Components/Table.jsx +7 -0
- package/src/Template/Components/index.js +14 -0
- package/src/Template/Pages/Page.jsx +28 -0
- package/src/Template/Pages/PageCapsule.jsx +13 -0
- package/src/Template/Pages/PageContent.jsx +34 -0
- package/src/Template/Pages/PageEdit.jsx +17 -0
- package/src/Template/Pages/PageNavbar.jsx +110 -0
- package/src/Template/Pages/RouterSegment.jsx +52 -0
- package/src/Template/Pages/VectorPage.jsx +133 -0
- package/src/Template/Pages/index.js +6 -0
- package/src/Template/Queries/DeleteAsyncAction.jsx +22 -0
- package/src/Template/Queries/Fragments.jsx +92 -0
- package/src/Template/Queries/InsertAsyncAction.jsx +22 -0
- package/src/Template/Queries/ReadAsyncAction.jsx +45 -0
- package/src/Template/Queries/ReadPageAsyncAction.jsx +13 -0
- package/src/Template/Queries/UpdateAsyncAction.jsx +76 -0
- package/src/Template/Queries/index.js +6 -0
- package/src/Template/Scalars/ScalarAttribute.jsx +54 -0
- package/src/Template/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/Template/Scalars/index.js +1 -0
- package/src/Template/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/Template/Vectors/VectorAttribute.jsx +56 -0
- package/src/Template/Vectors/index.js +1 -0
- package/src/Template/index.js +71 -0
- package/src/UserGQLModel/Components/CUDButton.jsx +128 -0
- package/src/UserGQLModel/Components/CardCapsule.jsx +43 -0
- package/src/UserGQLModel/Components/ConfirmEdit.jsx +61 -0
- package/src/UserGQLModel/Components/Filter.jsx +15 -0
- package/src/UserGQLModel/Components/LargeCard.jsx +82 -0
- package/src/UserGQLModel/Components/Link.jsx +54 -0
- package/src/UserGQLModel/Components/LiveEdit.jsx +111 -0
- package/src/UserGQLModel/Components/MediumCard.jsx +40 -0
- package/src/UserGQLModel/Components/MediumContent.jsx +49 -0
- package/src/UserGQLModel/Components/MediumEditableContent.jsx +57 -0
- package/src/UserGQLModel/Components/Table.jsx +7 -0
- package/src/UserGQLModel/Components/index.js +13 -0
- package/src/UserGQLModel/Mutations/AddMembership.jsx +136 -0
- package/src/UserGQLModel/Mutations/Create.jsx +68 -0
- package/src/UserGQLModel/Mutations/Delete.jsx +81 -0
- package/src/UserGQLModel/Mutations/InteractiveMutations.jsx +30 -0
- package/src/UserGQLModel/Mutations/Update.jsx +68 -0
- package/src/UserGQLModel/Mutations/helpers.jsx +7 -0
- package/src/UserGQLModel/Pages/PageAddMembership.jsx +15 -0
- package/src/UserGQLModel/Pages/PageBase.jsx +56 -0
- package/src/UserGQLModel/Pages/PageCreateItem.jsx +27 -0
- package/src/UserGQLModel/Pages/PageDeleteItem.jsx +16 -0
- package/src/UserGQLModel/Pages/PageNavbar.jsx +146 -0
- package/src/UserGQLModel/Pages/PageReadItem.jsx +12 -0
- package/src/UserGQLModel/Pages/PageReadItemEx.jsx +62 -0
- package/src/UserGQLModel/Pages/PageUpdateItem.jsx +14 -0
- package/src/UserGQLModel/Pages/PageVector.jsx +78 -0
- package/src/UserGQLModel/Pages/RouterSegment.jsx +77 -0
- package/src/UserGQLModel/Pages/index.js +9 -0
- package/src/UserGQLModel/Queries/DeleteAsyncAction.jsx +22 -0
- package/src/UserGQLModel/Queries/Fragments.jsx +120 -0
- package/src/UserGQLModel/Queries/InsertAsyncAction.jsx +22 -0
- package/src/UserGQLModel/Queries/ReadAsyncAction.jsx +45 -0
- package/src/UserGQLModel/Queries/ReadPageAsyncAction.jsx +17 -0
- package/src/UserGQLModel/Queries/SearchAsyncAction.jsx +15 -0
- package/src/UserGQLModel/Queries/UpdateAsyncAction.jsx +76 -0
- package/src/UserGQLModel/Queries/index.js +6 -0
- package/src/UserGQLModel/Scalars/ScalarAttribute.jsx +54 -0
- package/src/UserGQLModel/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/UserGQLModel/Scalars/index.js +1 -0
- package/src/UserGQLModel/Vectors/Roles.jsx +23 -0
- package/src/UserGQLModel/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/UserGQLModel/Vectors/UserMemberships.jsx +56 -0
- package/src/UserGQLModel/Vectors/UserRoles.jsx +81 -0
- package/src/UserGQLModel/Vectors/VectorAttribute.jsx +56 -0
- package/src/UserGQLModel/Vectors/index.js +1 -0
- package/src/UserGQLModel/index.js +6 -0
- package/src/_Template/Components/CardCapsule.jsx +43 -0
- package/src/_Template/Components/Children.jsx +31 -0
- package/src/_Template/Components/ConfirmEdit.jsx +61 -0
- package/src/_Template/Components/Filter.jsx +14 -0
- package/src/_Template/Components/LargeCard.jsx +50 -0
- package/src/_Template/Components/Link.jsx +54 -0
- package/src/_Template/Components/LiveEdit.jsx +111 -0
- package/src/_Template/Components/MediumCard.jsx +39 -0
- package/src/_Template/Components/MediumContent.jsx +96 -0
- package/src/_Template/Components/MediumEditableContent.jsx +35 -0
- package/src/_Template/Components/Table.jsx +7 -0
- package/src/_Template/Components/index.js +13 -0
- package/src/_Template/Mutations/Create.jsx +202 -0
- package/src/_Template/Mutations/Delete.jsx +173 -0
- package/src/_Template/Mutations/InteractiveMutations.jsx +30 -0
- package/src/_Template/Mutations/Update.jsx +147 -0
- package/src/_Template/Mutations/helpers.jsx +7 -0
- package/src/_Template/Pages/PageBase.jsx +56 -0
- package/src/_Template/Pages/PageCreateItem.jsx +28 -0
- package/src/_Template/Pages/PageDeleteItem.jsx +16 -0
- package/src/_Template/Pages/PageNavbar.jsx +160 -0
- package/src/_Template/Pages/PageReadItem.jsx +11 -0
- package/src/_Template/Pages/PageReadItemEx.jsx +42 -0
- package/src/_Template/Pages/PageUpdateItem.jsx +14 -0
- package/src/_Template/Pages/PageVector.jsx +80 -0
- package/src/_Template/Pages/RouterSegment.jsx +72 -0
- package/src/_Template/Pages/index.js +2 -0
- package/src/_Template/Queries/DeleteAsyncAction.jsx +32 -0
- package/src/_Template/Queries/Fragments.jsx +101 -0
- package/src/_Template/Queries/InsertAsyncAction.jsx +40 -0
- package/src/_Template/Queries/ReadAsyncAction.jsx +44 -0
- package/src/_Template/Queries/ReadPageAsyncAction.jsx +13 -0
- package/src/_Template/Queries/SearchAsyncAction.jsx +16 -0
- package/src/_Template/Queries/UpdateAsyncAction.jsx +40 -0
- package/src/_Template/Queries/index.js +6 -0
- package/src/_Template/Scalars/ScalarAttribute.jsx +54 -0
- package/src/_Template/Scalars/TemplateScalarAttribute.jsx +88 -0
- package/src/_Template/Scalars/index.js +1 -0
- package/src/_Template/Vectors/TemplateVectorsAttribute.jsx +326 -0
- package/src/_Template/Vectors/VectorAttribute.jsx +56 -0
- package/src/_Template/Vectors/index.js +1 -0
- package/src/_Template/WhatToDo.md +44 -0
- package/src/_Template/index.js +71 -0
- package/src/index.js +8 -0
- package/src/uriroot.js +158 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
|
|
4
|
+
import { UpdateAsyncAction } from "../Queries";
|
|
5
|
+
import { MediumEditableContent } from "./MediumEditableContent";
|
|
6
|
+
import { useEditAction } from "../../../../dynamic/src/Hooks/useEditAction";
|
|
7
|
+
import { LoadingSpinner } from "@hrbolek/uoisfrontend-shared";
|
|
8
|
+
import { AsyncStateIndicator } from "../Helpers/AsyncStateIndicator";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* TemplateLiveEdit Component
|
|
12
|
+
*
|
|
13
|
+
* Interaktivní React komponenta pro live editaci entity `template` s podporou optimistického fetchování a debounce delaye.
|
|
14
|
+
*
|
|
15
|
+
* - Používá `useAsyncAction` k načítání a update entit (např. GraphQL mutation).
|
|
16
|
+
* - Pokud se hodnota pole změní, spustí se update po krátkém zpoždění (`delayer`) — uživatelské změny nejsou ihned posílány, ale až po pauze.
|
|
17
|
+
* - Zobrazuje loading a error stav pomocí komponent `LoadingSpinner` a `ErrorHandler`.
|
|
18
|
+
* - Předává editované hodnoty do komponenty `TemplateMediumEditableContent`, která zajišťuje zobrazení a editaci jednotlivých polí šablony (`template`).
|
|
19
|
+
*
|
|
20
|
+
* @component
|
|
21
|
+
* @param {Object} props - Props objekt.
|
|
22
|
+
* @param {Object} props.template - Objekt reprezentující editovanou šablonu (template entity).
|
|
23
|
+
* @param {React.ReactNode} [props.children] - Libovolné children, které se vloží pod editační komponentu.
|
|
24
|
+
* @param {Function} [props.asyncAction=TemplateUpdateAsyncAction] - Asynchronní akce pro update (`useAsyncAction`), typicky GraphQL update mutation.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // Standardní použití
|
|
28
|
+
* <TemplateLiveEdit template={templateEntity} />
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* // S vlastním asyncAction a doplňkovým obsahem
|
|
32
|
+
* <TemplateLiveEdit template={templateEntity} asyncAction={myUpdateAction}>
|
|
33
|
+
* <div>Extra obsah nebo poznámka</div>
|
|
34
|
+
* </TemplateLiveEdit>
|
|
35
|
+
*
|
|
36
|
+
* @returns {JSX.Element}
|
|
37
|
+
* Interaktivní komponenta pro live editaci šablony, včetně spinneru a error handleru.
|
|
38
|
+
*/
|
|
39
|
+
export const LiveEdit = ({
|
|
40
|
+
item,
|
|
41
|
+
children,
|
|
42
|
+
mutationAsyncAction=UpdateAsyncAction,
|
|
43
|
+
DefaultContent=MediumEditableContent
|
|
44
|
+
}) => {
|
|
45
|
+
// const { run , error, loading, entity, data, onChange: contextOnChange, onBlur: contextOnBlur } = useGQLEntityContext()
|
|
46
|
+
const {
|
|
47
|
+
loading: saving,
|
|
48
|
+
error,
|
|
49
|
+
onChange,
|
|
50
|
+
onBlur,
|
|
51
|
+
} = useEditAction(mutationAsyncAction, item, {
|
|
52
|
+
mode: "live",
|
|
53
|
+
// onCommit: contextOnChange
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
|
|
58
|
+
<DefaultContent item={item} onChange={onChange} onBlur={onBlur} >
|
|
59
|
+
<AsyncStateIndicator loading={saving} error={error} text={"Ukládám"} />
|
|
60
|
+
{children}
|
|
61
|
+
</DefaultContent>
|
|
62
|
+
|
|
63
|
+
)
|
|
64
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CardCapsule } from "./CardCapsule"
|
|
2
|
+
import { Link } from "./Link"
|
|
3
|
+
import { MediumContent } from "./MediumContent"
|
|
4
|
+
|
|
5
|
+
export const MediumCard = ({ header, item, children }) => {
|
|
6
|
+
return (
|
|
7
|
+
<CardCapsule header={header || <Link item={item}/>} item={item}>
|
|
8
|
+
|
|
9
|
+
<MediumContent item={item} />
|
|
10
|
+
{children}
|
|
11
|
+
<hr/>
|
|
12
|
+
{Object.entries(item).map(([attribute_name, attribute_value]) => {
|
|
13
|
+
if (Array.isArray(attribute_value)) return null
|
|
14
|
+
if (typeof attribute_value === "object" && attribute_value !== null) {
|
|
15
|
+
return <Link item={attribute_value}><b>{attribute_name} {JSON.stringify({})}</b><br/></Link>
|
|
16
|
+
return <Link item={item} action={attribute_name}><b>{attribute_name} {JSON.stringify({})}</b><br/></Link>
|
|
17
|
+
}
|
|
18
|
+
return null
|
|
19
|
+
}
|
|
20
|
+
)}
|
|
21
|
+
<hr/>
|
|
22
|
+
{Object.entries(item).map(([attribute_name, attribute_value]) => {
|
|
23
|
+
if (Array.isArray(attribute_value)) return (
|
|
24
|
+
<Link item={item} action={attribute_name}><b>{attribute_name} []</b><br/></Link>
|
|
25
|
+
)
|
|
26
|
+
return null
|
|
27
|
+
})}
|
|
28
|
+
</CardCapsule>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { data } from "react-router"
|
|
2
|
+
import { Attribute } from "./Attribute"
|
|
3
|
+
import { Link } from "./Link"
|
|
4
|
+
|
|
5
|
+
export const NonPriorityAttributeValue = ({ datarow = {}, name }) => {
|
|
6
|
+
const value = datarow?.[name] || ""
|
|
7
|
+
if (name === "id")
|
|
8
|
+
return (
|
|
9
|
+
<Attribute item={datarow} label={name} attribute_name={name}>
|
|
10
|
+
<Link item={datarow} >{datarow?.id || "Data Error"}</Link >
|
|
11
|
+
</Attribute>
|
|
12
|
+
)
|
|
13
|
+
if (["name", "surname", "fullname"].includes(name))
|
|
14
|
+
return (
|
|
15
|
+
<Attribute item={datarow} label={name} attribute_name={name}>
|
|
16
|
+
<Link item={datarow}>{value}</Link>
|
|
17
|
+
</Attribute>
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
const idpos = name.indexOf("Id")
|
|
21
|
+
if (idpos === -1) {
|
|
22
|
+
if (typeof value === "object")
|
|
23
|
+
// <Attribute item={datarow} label={name} attribute_name={name} attribute_value_result={<Link item={value} />} />
|
|
24
|
+
return null
|
|
25
|
+
else {
|
|
26
|
+
return (
|
|
27
|
+
<Attribute item={datarow} label={name} attribute_name={name} attribute_value_result={value || ""} />
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const scalarname = name.replace("Id", "")
|
|
33
|
+
const { id, __typename} = datarow?.[scalarname] || {}
|
|
34
|
+
if (id && __typename) {
|
|
35
|
+
// return <>{id} {__typename}</>
|
|
36
|
+
return (
|
|
37
|
+
<Attribute item={datarow} label={name} attribute_name={name}>
|
|
38
|
+
<Link item={datarow?.[scalarname]}>{id}</Link>
|
|
39
|
+
</Attribute>
|
|
40
|
+
)
|
|
41
|
+
return <Attribute item={datarow} label={name} attribute_name={name} attribute_value_result={<Link item={datarow?.[scalarname]}>{id}</Link>} />
|
|
42
|
+
} else {
|
|
43
|
+
// if (typeof value === "object")
|
|
44
|
+
// return <Attribute item={datarow} label={name} attribute_name={name} attribute_value_result={`${value?.fullname || value?.name || value?.id}`} />
|
|
45
|
+
// else
|
|
46
|
+
// return <Attribute item={datarow} label={name} attribute_name={name} attribute_value_result={value || ""} />
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export const MediumContent = ({ item, children }) => {
|
|
51
|
+
return (
|
|
52
|
+
<>
|
|
53
|
+
{Object.entries(item).map(([attribute_name, attribute_value]) => {
|
|
54
|
+
// if (attribute_name !== "id") return null
|
|
55
|
+
if (Array.isArray(attribute_value)) return null
|
|
56
|
+
if (attribute_value)
|
|
57
|
+
return (
|
|
58
|
+
<NonPriorityAttributeValue key={attribute_name} datarow={item} name={attribute_name} />
|
|
59
|
+
)
|
|
60
|
+
else return null
|
|
61
|
+
})}
|
|
62
|
+
{Object.entries(item).map(([attribute_name, attribute_value]) => {
|
|
63
|
+
if (attribute_value !== null) return null
|
|
64
|
+
if (attribute_value)
|
|
65
|
+
return null
|
|
66
|
+
else
|
|
67
|
+
return (
|
|
68
|
+
<NonPriorityAttributeValue key={attribute_name} datarow={item} name={attribute_name} />
|
|
69
|
+
)
|
|
70
|
+
})}
|
|
71
|
+
{children}
|
|
72
|
+
</>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { SearchAsyncAction } from "../Queries/SearchAsyncAction"
|
|
2
|
+
import { EntityLookup } from "../../../../_template/src/Base/FormControls/EntityLookup"
|
|
3
|
+
import { Input } from "../../../../_template/src/Base/FormControls/Input"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A component that displays medium-level content for an template entity.
|
|
7
|
+
*
|
|
8
|
+
* This component renders a label "TemplateMediumContent" followed by a serialized representation of the `template` object
|
|
9
|
+
* and any additional child content. It is designed to handle and display information about an template entity object.
|
|
10
|
+
*
|
|
11
|
+
* @component
|
|
12
|
+
* @param {Object} props - The properties for the TemplateMediumContent component.
|
|
13
|
+
* @param {Object} props.template - The object representing the template entity.
|
|
14
|
+
* @param {string|number} props.template.id - The unique identifier for the template entity.
|
|
15
|
+
* @param {string} props.template.name - The name or label of the template entity.
|
|
16
|
+
* @param {React.ReactNode} [props.children=null] - Additional content to render after the serialized `template` object.
|
|
17
|
+
*
|
|
18
|
+
* @returns {JSX.Element} A JSX element displaying the entity's details and optional content.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // Example usage:
|
|
22
|
+
* const templateEntity = { id: 123, name: "Sample Entity" };
|
|
23
|
+
*
|
|
24
|
+
* <TemplateMediumContent template={templateEntity}>
|
|
25
|
+
* <p>Additional information about the entity.</p>
|
|
26
|
+
* </TemplateMediumContent>
|
|
27
|
+
*/
|
|
28
|
+
export const MediumEditableContent = ({ item, onChange=(e)=>null, onBlur=(e)=>null, children}) => {
|
|
29
|
+
return (
|
|
30
|
+
<>
|
|
31
|
+
{/* defaultValue={item?.name|| "Název"} */}
|
|
32
|
+
<Input
|
|
33
|
+
id={"name"}
|
|
34
|
+
label={"Jméno"}
|
|
35
|
+
className="form-control"
|
|
36
|
+
value={item?.name|| "Jméno"}
|
|
37
|
+
onChange={onChange}
|
|
38
|
+
onBlur={onBlur}
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
<EntityLookup
|
|
42
|
+
id={"mastertypeId"}
|
|
43
|
+
label="Nadřízený typ"
|
|
44
|
+
className="form-control"
|
|
45
|
+
value={item?.mastertype}
|
|
46
|
+
asyncAction={SearchAsyncAction}
|
|
47
|
+
onChange={onChange} onBlur={onBlur}
|
|
48
|
+
/>
|
|
49
|
+
{children}
|
|
50
|
+
</>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { Link, useResolvedPath } from "react-router-dom";
|
|
5
|
+
import { useNavigate } from 'react-router-dom'
|
|
6
|
+
/**
|
|
7
|
+
* shared module.
|
|
8
|
+
* @module shared/components
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* useLink
|
|
14
|
+
*
|
|
15
|
+
* Spočítá cílový odkaz pro react-router <Link>, včetně volitelného zachování
|
|
16
|
+
* aktuálního hash/search. Zároveň určí, zda je cílová cesta "lokální"
|
|
17
|
+
* (tj. stejný base segment jako aktuální app), a podle toho doporučí reloadDocument.
|
|
18
|
+
*
|
|
19
|
+
* @param {Object} args
|
|
20
|
+
* @param {string} args.to - cílová cesta nebo URL (relativní/absolutní)
|
|
21
|
+
* @param {boolean} [args.preserveHash=true] - pokud cílové `to` nemá hash, použij aktuální hash
|
|
22
|
+
* @param {boolean} [args.preserveSearch=true] - pokud cílové `to` nemá search, použij aktuální search
|
|
23
|
+
*
|
|
24
|
+
* @returns {{
|
|
25
|
+
* href: string,
|
|
26
|
+
* pathname: string,
|
|
27
|
+
* search: string,
|
|
28
|
+
* hash: string,
|
|
29
|
+
* isLocal: boolean,
|
|
30
|
+
* reloadDocument: boolean
|
|
31
|
+
* }}
|
|
32
|
+
*/
|
|
33
|
+
export const useLink = ({
|
|
34
|
+
to,
|
|
35
|
+
preserveHash = true,
|
|
36
|
+
preserveSearch = true,
|
|
37
|
+
} = {}) => {
|
|
38
|
+
|
|
39
|
+
const resolved = useResolvedPath(to);
|
|
40
|
+
const navigate = useNavigate()
|
|
41
|
+
// const navigate = () => null
|
|
42
|
+
|
|
43
|
+
const follow = useCallback(() => {
|
|
44
|
+
console.log("state.href", state.href)
|
|
45
|
+
navigate(state.href)
|
|
46
|
+
}, [navigate])
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
const state = useMemo(() => {
|
|
50
|
+
// SSR-safe guard
|
|
51
|
+
const origin =
|
|
52
|
+
typeof window !== "undefined" ? window.location.origin : "http://localhost";
|
|
53
|
+
const currentHref =
|
|
54
|
+
typeof window !== "undefined" ? window.location.href : `${origin}/`;
|
|
55
|
+
|
|
56
|
+
const { pathname } = resolved; // resolved target pathname
|
|
57
|
+
const base = pathname.split("/")[1] || ""; // first segment
|
|
58
|
+
|
|
59
|
+
const currentUrl = new URL(currentHref);
|
|
60
|
+
const currentHash = preserveHash ? currentUrl.hash : "";
|
|
61
|
+
const currentSearch = preserveSearch ? currentUrl.search : "";
|
|
62
|
+
|
|
63
|
+
// Resolve `to` as URL (handles both relative paths and absolute URLs)
|
|
64
|
+
const destinationUrl = new URL(to, origin);
|
|
65
|
+
|
|
66
|
+
// If destination does not specify search/hash, inherit current ones
|
|
67
|
+
destinationUrl.search = destinationUrl.search || currentSearch;
|
|
68
|
+
destinationUrl.hash = destinationUrl.hash || currentHash;
|
|
69
|
+
|
|
70
|
+
const href = destinationUrl.pathname + destinationUrl.search + destinationUrl.hash;
|
|
71
|
+
|
|
72
|
+
const isLocal =
|
|
73
|
+
typeof window !== "undefined"
|
|
74
|
+
? window.location.pathname.startsWith(`/${base}`)
|
|
75
|
+
: true;
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
follow,
|
|
79
|
+
href,
|
|
80
|
+
pathname: destinationUrl.pathname,
|
|
81
|
+
search: destinationUrl.search,
|
|
82
|
+
hash: destinationUrl.hash,
|
|
83
|
+
isLocal,
|
|
84
|
+
reloadDocument: !isLocal,
|
|
85
|
+
};
|
|
86
|
+
}, [to, preserveHash, preserveSearch, resolved]);
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
return state
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* A `ProxyLink` component that conditionally reloads the document based on whether the link's target
|
|
94
|
+
* is local or external. It also preserves existing hash and query parameters from the current URL
|
|
95
|
+
* and appends them to the target path if they are not already specified.
|
|
96
|
+
*
|
|
97
|
+
* @param {Object} props - The properties for the ProxyLink component.
|
|
98
|
+
* @param {string} props.to - The target path or URL for the link.
|
|
99
|
+
* @param {React.ReactNode} props.children - The content to render inside the link.
|
|
100
|
+
* @param {boolean} [props.preserveHash=true] - Flag indicating whether to preserve the current URL's hash.
|
|
101
|
+
* @param {boolean} [props.preserveSearch=true] - Flag indicating whether to preserve the current URL's query parameters.
|
|
102
|
+
* @param {Object} [props.others] - Additional props to pass to the underlying React Router `Link` component.
|
|
103
|
+
*
|
|
104
|
+
* @returns {JSX.Element} A React Router `Link` component with conditional reload behavior and parameter preservation.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* // Example usage:
|
|
108
|
+
* <ProxyLink to="/local-path">Local Link</ProxyLink>
|
|
109
|
+
* <ProxyLink to="https://external-site.com">External Link</ProxyLink>
|
|
110
|
+
*/
|
|
111
|
+
export const ProxyLink = ({
|
|
112
|
+
to,
|
|
113
|
+
children,
|
|
114
|
+
preserveHash = true,
|
|
115
|
+
preserveSearch = true,
|
|
116
|
+
disabled = false,
|
|
117
|
+
...others
|
|
118
|
+
}) => {
|
|
119
|
+
const { href, reloadDocument } = useLink({ to, preserveHash, preserveSearch });
|
|
120
|
+
|
|
121
|
+
return (
|
|
122
|
+
<>
|
|
123
|
+
{disabled && children}
|
|
124
|
+
{!disabled && (
|
|
125
|
+
<Link to={href} reloadDocument={reloadDocument} {...others}>
|
|
126
|
+
{children}
|
|
127
|
+
</Link>
|
|
128
|
+
)}
|
|
129
|
+
</>
|
|
130
|
+
);
|
|
131
|
+
};
|
|
132
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { bs, cx } from "./style";
|
|
2
|
+
|
|
3
|
+
export const Row0 = ({ children, className, ...props }) => {
|
|
4
|
+
return (
|
|
5
|
+
<div {...props} className={className ? className + " row" : "row"}>
|
|
6
|
+
{children}
|
|
7
|
+
</div>
|
|
8
|
+
)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function Row({ className, classNames, g, gx, gy, align, justify, as: Tag = "div", ...props }) {
|
|
12
|
+
return (
|
|
13
|
+
<Tag
|
|
14
|
+
{...props}
|
|
15
|
+
className={cx(
|
|
16
|
+
"Row", // hook
|
|
17
|
+
bs.grid.row({ g, gx, gy, align, justify }),
|
|
18
|
+
className,
|
|
19
|
+
classNames?.root
|
|
20
|
+
)}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
2
|
+
import { createPortal } from "react-dom";
|
|
3
|
+
import { Link } from "./Link";
|
|
4
|
+
import { CreateButton, CreateLink } from "../Mutations/Create";
|
|
5
|
+
import { UpdateButton, UpdateLink } from "../Mutations/Update";
|
|
6
|
+
import { DeleteButton } from "../Mutations/Delete";
|
|
7
|
+
import { r } from "happy-dom/lib/PropertySymbol";
|
|
8
|
+
|
|
9
|
+
const CellId = ({ row, name }) => (
|
|
10
|
+
<td key={name}>
|
|
11
|
+
<Link item={row}>{row?.id || "Data Error"}</Link>
|
|
12
|
+
</td>
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
export const CellName = ({ row, name }) => (
|
|
16
|
+
<td key={name}>
|
|
17
|
+
<Link item={row} />
|
|
18
|
+
</td>
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
const CellDefault = ({ row, name }) => {
|
|
22
|
+
const value = row?.[name] ?? ""
|
|
23
|
+
|
|
24
|
+
const idpos = name.indexOf("Id")
|
|
25
|
+
if (idpos === -1) {
|
|
26
|
+
return <td key={name}>{typeof value === "object" ? `${value}` : (value || "")}</td>
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const scalarname = name.replace("Id", "")
|
|
30
|
+
const { id, __typename } = row?.[scalarname] || {}
|
|
31
|
+
|
|
32
|
+
if (id && __typename && id == value) {
|
|
33
|
+
return (
|
|
34
|
+
<td key={name}>
|
|
35
|
+
<Link item={row?.[scalarname]}>{value || ""}</Link>
|
|
36
|
+
</td>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return <td key={name}>{typeof value === "object" ? `${value}` : (value || "")}</td>
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// 2) Funkce, která z dat vyrobí table_def
|
|
44
|
+
export const buildTableDef = (data) => {
|
|
45
|
+
const row = data?.[0] ?? {}
|
|
46
|
+
const priority = ["__typename", "id", "name"]
|
|
47
|
+
|
|
48
|
+
const attribute_names = Object.keys(row).filter((attribute_name) => {
|
|
49
|
+
const v = row[attribute_name]
|
|
50
|
+
if (Array.isArray(v)) return false
|
|
51
|
+
if (typeof v === "object" && v !== null) return false
|
|
52
|
+
return true
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
const columns = [
|
|
56
|
+
...priority.filter((a) => attribute_names.includes(a)),
|
|
57
|
+
...attribute_names.filter((a) => !priority.includes(a)),
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
// table_def: colname -> { label, component }
|
|
61
|
+
const result = Object.fromEntries(
|
|
62
|
+
columns.map((name) => {
|
|
63
|
+
let component = CellDefault
|
|
64
|
+
if (name === "id") component = CellId
|
|
65
|
+
if (name === "name") component = CellName
|
|
66
|
+
|
|
67
|
+
return [
|
|
68
|
+
name,
|
|
69
|
+
{
|
|
70
|
+
label: name, // tady si můžeš dát hezčí label
|
|
71
|
+
component, // React komponenta pro buňku
|
|
72
|
+
},
|
|
73
|
+
]
|
|
74
|
+
})
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
result["tools"] = {
|
|
78
|
+
label: "Nástroje",
|
|
79
|
+
component: ({row}) => <td><KebabMenu actions={[
|
|
80
|
+
// { label: "Editovat", onClick: () => console.log("edit") },
|
|
81
|
+
// { label: "Smazat", onClick: () => console.log("delete") },
|
|
82
|
+
// { label: "Detail", onClick: () => console.log("detail") },
|
|
83
|
+
{ children: <Link
|
|
84
|
+
className="btn btn-sm btn-outline-secondary border-0 text-start w-100"
|
|
85
|
+
item={row}
|
|
86
|
+
>Detail</Link> },
|
|
87
|
+
{ children: <UpdateLink
|
|
88
|
+
className="btn btn-sm btn-outline-secondary border-0 text-start w-100"
|
|
89
|
+
item={row}
|
|
90
|
+
action="edit"
|
|
91
|
+
>Editovat</UpdateLink> },
|
|
92
|
+
{ children: <UpdateButton
|
|
93
|
+
className="btn btn-sm btn-outline-secondary border-0 text-start w-100"
|
|
94
|
+
item={row}
|
|
95
|
+
>Editovat (zde)</UpdateButton> },
|
|
96
|
+
{ children: <DeleteButton
|
|
97
|
+
className="btn btn-sm btn-outline-secondary border-0 text-start w-100"
|
|
98
|
+
>Smazat</DeleteButton> },
|
|
99
|
+
]} /></td>,
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return result
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
export const KebabMenu = ({ actions = [] }) => {
|
|
107
|
+
const [open, setOpen] = useState(false);
|
|
108
|
+
const btnRef = useRef(null);
|
|
109
|
+
const menuRef = useRef(null);
|
|
110
|
+
const [pos, setPos] = useState({ left: 0, top: 0 });
|
|
111
|
+
|
|
112
|
+
const close = () => setOpen(false);
|
|
113
|
+
|
|
114
|
+
// zavření při kliku mimo (funguje i s portalem)
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
if (!open) return;
|
|
117
|
+
|
|
118
|
+
const onMouseDown = (e) => {
|
|
119
|
+
const btn = btnRef.current;
|
|
120
|
+
const menu = menuRef.current;
|
|
121
|
+
if (!btn || !menu) return;
|
|
122
|
+
|
|
123
|
+
if (btn.contains(e.target)) return;
|
|
124
|
+
if (menu.contains(e.target)) return;
|
|
125
|
+
|
|
126
|
+
close();
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const onKeyDown = (e) => {
|
|
130
|
+
if (e.key === "Escape") close();
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
document.addEventListener("mousedown", onMouseDown);
|
|
134
|
+
document.addEventListener("keydown", onKeyDown);
|
|
135
|
+
return () => {
|
|
136
|
+
document.removeEventListener("mousedown", onMouseDown);
|
|
137
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
138
|
+
};
|
|
139
|
+
}, [open]);
|
|
140
|
+
|
|
141
|
+
// spočítat pozici po otevření + při scroll/resize
|
|
142
|
+
useLayoutEffect(() => {
|
|
143
|
+
if (!open) return;
|
|
144
|
+
|
|
145
|
+
const update = () => {
|
|
146
|
+
const btn = btnRef.current;
|
|
147
|
+
if (!btn) return;
|
|
148
|
+
|
|
149
|
+
const r = btn.getBoundingClientRect();
|
|
150
|
+
// menu zarovnané doprava k tlačítku, pod tlačítkem
|
|
151
|
+
setPos({
|
|
152
|
+
left: r.right + window.scrollX,
|
|
153
|
+
top: r.bottom + window.scrollY,
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
update();
|
|
158
|
+
|
|
159
|
+
window.addEventListener("resize", update);
|
|
160
|
+
// scroll na capture, aby to fungovalo i při scrollu uvnitř wrapperů
|
|
161
|
+
window.addEventListener("scroll", update, true);
|
|
162
|
+
|
|
163
|
+
return () => {
|
|
164
|
+
window.removeEventListener("resize", update);
|
|
165
|
+
window.removeEventListener("scroll", update, true);
|
|
166
|
+
};
|
|
167
|
+
}, [open]);
|
|
168
|
+
|
|
169
|
+
const menu = open ? (
|
|
170
|
+
<div
|
|
171
|
+
ref={menuRef}
|
|
172
|
+
style={{
|
|
173
|
+
position: "absolute",
|
|
174
|
+
left: pos.left,
|
|
175
|
+
top: pos.top,
|
|
176
|
+
transform: "translateX(-100%)", // right align
|
|
177
|
+
background: "white",
|
|
178
|
+
border: "1px solid #ddd",
|
|
179
|
+
borderRadius: 4,
|
|
180
|
+
boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
|
|
181
|
+
zIndex: 2000,
|
|
182
|
+
minWidth: 140,
|
|
183
|
+
}}
|
|
184
|
+
role="menu"
|
|
185
|
+
>
|
|
186
|
+
{actions.map((action, i) => {
|
|
187
|
+
const children = action?.children;
|
|
188
|
+
if (children) return <div key={i}>{children}</div>;
|
|
189
|
+
|
|
190
|
+
return (
|
|
191
|
+
<button
|
|
192
|
+
key={i}
|
|
193
|
+
type="button"
|
|
194
|
+
className="btn btn-sm btn-outline-secondary border-0 text-start w-100"
|
|
195
|
+
onClick={() => {
|
|
196
|
+
close();
|
|
197
|
+
action?.onClick?.();
|
|
198
|
+
}}
|
|
199
|
+
style={{
|
|
200
|
+
padding: "8px 12px",
|
|
201
|
+
textDecoration: "none",
|
|
202
|
+
}}
|
|
203
|
+
role="menuitem"
|
|
204
|
+
>
|
|
205
|
+
{action?.label}
|
|
206
|
+
</button>
|
|
207
|
+
);
|
|
208
|
+
})}
|
|
209
|
+
</div>
|
|
210
|
+
) : null;
|
|
211
|
+
|
|
212
|
+
return (
|
|
213
|
+
<>
|
|
214
|
+
<button
|
|
215
|
+
ref={btnRef}
|
|
216
|
+
className="btn btn-sm btn-outline-secondary border-1"
|
|
217
|
+
onClick={() => setOpen((o) => !o)}
|
|
218
|
+
aria-expanded={open}
|
|
219
|
+
aria-haspopup="menu"
|
|
220
|
+
aria-label="Menu"
|
|
221
|
+
type="button"
|
|
222
|
+
>
|
|
223
|
+
⋮
|
|
224
|
+
</button>
|
|
225
|
+
|
|
226
|
+
{open ? createPortal(menu, document.body) : null}
|
|
227
|
+
</>
|
|
228
|
+
);
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
export const TableRow = ({ row, table_def }) => {
|
|
232
|
+
return (
|
|
233
|
+
<tr>
|
|
234
|
+
{Object.keys(table_def).map((name) => {
|
|
235
|
+
const Cell = table_def[name].component
|
|
236
|
+
return <Cell key={name} row={row} name={name} />
|
|
237
|
+
})}
|
|
238
|
+
</tr>
|
|
239
|
+
)
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const TableRow_ = TableRow
|
|
243
|
+
// 3) Table už jen používá definici
|
|
244
|
+
export const TableBody = ({ data, table_def, TableRow = TableRow_ }) => {
|
|
245
|
+
return (
|
|
246
|
+
<tbody>
|
|
247
|
+
{data.map((row) => <TableRow key={row?.id} row={row} table_def={table_def} />)}
|
|
248
|
+
</tbody>
|
|
249
|
+
)
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
const TableBody_ = TableBody
|
|
253
|
+
|
|
254
|
+
export const Table = ({ data, table_def = null, TableBody = TableBody_ }) => {
|
|
255
|
+
if (!data || data.length === 0) return null
|
|
256
|
+
|
|
257
|
+
const _table_def = useMemo(() => table_def || buildTableDef(data), [data, table_def])
|
|
258
|
+
const colnames = useMemo(() => Object.keys(_table_def).map((k) => _table_def[k].label), [_table_def])
|
|
259
|
+
// console.log(_table_def)
|
|
260
|
+
return (
|
|
261
|
+
<div className="table-responsive">
|
|
262
|
+
<table className="table table-stripped">
|
|
263
|
+
<thead>
|
|
264
|
+
<tr>
|
|
265
|
+
{colnames.map((name) => (
|
|
266
|
+
<th key={name}>{`${name}`}</th>
|
|
267
|
+
))}
|
|
268
|
+
</tr>
|
|
269
|
+
</thead>
|
|
270
|
+
|
|
271
|
+
<TableBody data={data} table_def={_table_def} />
|
|
272
|
+
</table>
|
|
273
|
+
</div>
|
|
274
|
+
)
|
|
275
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './Attribute'
|
|
2
|
+
export * from './CardCapsule'
|
|
3
|
+
export * from './Col'
|
|
4
|
+
export * from './ConfirmEdit'
|
|
5
|
+
export * from './CopyButton'
|
|
6
|
+
export * from './LargeCard'
|
|
7
|
+
export * from './Link'
|
|
8
|
+
export * from './MediumCard'
|
|
9
|
+
export * from './MediumContent'
|
|
10
|
+
export * from './MediumEditableContent'
|
|
11
|
+
export * from './ProxyLink'
|
|
12
|
+
export * from './Row'
|
|
13
|
+
export * from './LiveEdit'
|
|
14
|
+
export * from './Table'
|