@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,152 @@
|
|
|
1
|
+
import { PermissionGate, usePermissionGateContext } from "../../../../dynamic/src/Hooks/useRoles"
|
|
2
|
+
import { LinkURI, MediumEditableContent } from "../Components"
|
|
3
|
+
import { useState } from "react"
|
|
4
|
+
import { useCreateSession } from "../../../../dynamic/src/Hooks/useCreateSession"
|
|
5
|
+
import { InsertAsyncAction } from "../Queries"
|
|
6
|
+
import { AsyncStateIndicator } from "../../../../_template/src/Base/Helpers/AsyncStateIndicator"
|
|
7
|
+
import { Dialog } from "../../../../_template/src/Base/FormControls/Dialog"
|
|
8
|
+
import { ProxyLink } from "../../../../_template/src/Base/Components/ProxyLink"
|
|
9
|
+
import { makeMutationURI } from "./helpers"
|
|
10
|
+
import { Lock } from "react-bootstrap-icons"
|
|
11
|
+
import { GeneralButton, GeneralDialog, GeneralLink } from "./General"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export const CreateURI = makeMutationURI(LinkURI, "create", { withId: false });
|
|
15
|
+
const ReadItemURI = `${LinkURI}:id`
|
|
16
|
+
|
|
17
|
+
export const CreateLink = ({
|
|
18
|
+
uriPattern = CreateURI,
|
|
19
|
+
children,
|
|
20
|
+
...props
|
|
21
|
+
}) => (
|
|
22
|
+
<GeneralLink uriPattern={uriPattern} {...props}>
|
|
23
|
+
{children}
|
|
24
|
+
</GeneralLink>
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
const DefaultContent = MediumEditableContent
|
|
29
|
+
|
|
30
|
+
export const CreateDialog = ({
|
|
31
|
+
title = "Nové oprávnění",
|
|
32
|
+
oklabel = "Ok",
|
|
33
|
+
cancellabel = "Zrušit",
|
|
34
|
+
DefaultContent: DefaultContent_ = DefaultContent,
|
|
35
|
+
item,
|
|
36
|
+
onOk,
|
|
37
|
+
onCancel,
|
|
38
|
+
children,
|
|
39
|
+
...props
|
|
40
|
+
}) => (
|
|
41
|
+
<GeneralDialog
|
|
42
|
+
title={title}
|
|
43
|
+
oklabel={oklabel}
|
|
44
|
+
cancellabel={cancellabel}
|
|
45
|
+
DefaultContent={DefaultContent_}
|
|
46
|
+
item={item}
|
|
47
|
+
onOk={onOk}
|
|
48
|
+
onCancel={onCancel}
|
|
49
|
+
{...props}
|
|
50
|
+
>
|
|
51
|
+
{children}
|
|
52
|
+
</GeneralDialog>
|
|
53
|
+
);
|
|
54
|
+
export const CreateButton = ({
|
|
55
|
+
mutationAsyncAction = InsertAsyncAction,
|
|
56
|
+
CreateDialog: CreateDialog_ = CreateDialog,
|
|
57
|
+
DefaultContent: DefaultContent_ = DefaultContent,
|
|
58
|
+
readItemURI = ReadItemURI,
|
|
59
|
+
uriPattern, // pokud chceš allow override
|
|
60
|
+
children,
|
|
61
|
+
...props
|
|
62
|
+
}) => (
|
|
63
|
+
<GeneralButton
|
|
64
|
+
mutationAsyncAction={mutationAsyncAction}
|
|
65
|
+
Dialog={CreateDialog_}
|
|
66
|
+
DefaultContent={DefaultContent_}
|
|
67
|
+
uriPattern={uriPattern ?? readItemURI}
|
|
68
|
+
{...props}
|
|
69
|
+
>
|
|
70
|
+
{children}
|
|
71
|
+
</GeneralButton>
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
export const CreateBody = ({
|
|
75
|
+
children,
|
|
76
|
+
rbacitem,
|
|
77
|
+
mutationAsyncAction = InsertAsyncAction,
|
|
78
|
+
onOk,
|
|
79
|
+
onCancel,
|
|
80
|
+
DefaultContent: DefaultContent_ = DefaultContent,
|
|
81
|
+
readItemURI = ReadItemURI,
|
|
82
|
+
oneOfRoles = ["superadmin"],
|
|
83
|
+
mode = "absolute",
|
|
84
|
+
...props
|
|
85
|
+
}) => {
|
|
86
|
+
return (
|
|
87
|
+
<PermissionGate oneOfRoles={oneOfRoles} mode={mode} item={rbacitem}>
|
|
88
|
+
<CreateBodyBody
|
|
89
|
+
children={children}
|
|
90
|
+
mutationAsyncAction={mutationAsyncAction}
|
|
91
|
+
onOk={onOk}
|
|
92
|
+
onCancel={onCancel}
|
|
93
|
+
DefaultContent={DefaultContent_}
|
|
94
|
+
readItemURI={readItemURI}
|
|
95
|
+
{...props}
|
|
96
|
+
/>
|
|
97
|
+
</PermissionGate>
|
|
98
|
+
);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const CreateBodyBody = ({
|
|
102
|
+
children,
|
|
103
|
+
mutationAsyncAction = InsertAsyncAction,
|
|
104
|
+
onOk,
|
|
105
|
+
onCancel,
|
|
106
|
+
DefaultContent: DefaultContent_ = DefaultContent,
|
|
107
|
+
readItemURI = ReadItemURI,
|
|
108
|
+
...props
|
|
109
|
+
}) => {
|
|
110
|
+
const session = useCreateSession({
|
|
111
|
+
readUri: readItemURI,
|
|
112
|
+
mutationAsyncAction,
|
|
113
|
+
onAfterConfirm: async (result, draft) => {
|
|
114
|
+
if (onOk) return onOk(result, draft);
|
|
115
|
+
// když onOk není, session udělá default navigaci
|
|
116
|
+
},
|
|
117
|
+
onAfterCancel: async () => {
|
|
118
|
+
if (onCancel) return onCancel();
|
|
119
|
+
// když onCancel není, session udělá default navigate(-1)
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
return (
|
|
124
|
+
<>
|
|
125
|
+
<DefaultContent_
|
|
126
|
+
item={session.draft}
|
|
127
|
+
onChange={session.onChange}
|
|
128
|
+
onBlur={session.onBlur}
|
|
129
|
+
{...props}
|
|
130
|
+
>
|
|
131
|
+
<AsyncStateIndicator error={session.error} loading={session.saving} />
|
|
132
|
+
{children}
|
|
133
|
+
|
|
134
|
+
<button
|
|
135
|
+
className="btn btn-warning form-control"
|
|
136
|
+
onClick={session.handleCancel}
|
|
137
|
+
// disabled={!session.dirty || session.saving}
|
|
138
|
+
>
|
|
139
|
+
Zrušit změny
|
|
140
|
+
</button>
|
|
141
|
+
|
|
142
|
+
<button
|
|
143
|
+
className="btn btn-primary form-control"
|
|
144
|
+
onClick={session.handleConfirm}
|
|
145
|
+
// disabled={!session.dirty || session.saving}
|
|
146
|
+
>
|
|
147
|
+
Uložit změny
|
|
148
|
+
</button>
|
|
149
|
+
</DefaultContent_>
|
|
150
|
+
</>
|
|
151
|
+
);
|
|
152
|
+
};
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { useNavigate } from "react-router-dom";
|
|
2
|
+
import { useGQLEntityContext } from "../../../../_template/src/Base/Helpers/GQLEntityProvider";
|
|
3
|
+
import { PermissionGate, usePermissionGateContext } from "../../../../dynamic/src/Hooks/useRoles"
|
|
4
|
+
import { useEditAction } from "../../../../dynamic/src/Hooks/useEditAction";
|
|
5
|
+
import { LinkURI, MediumContent } from "../Components";
|
|
6
|
+
import { DeleteAsyncAction } from "../Queries";
|
|
7
|
+
import { AsyncStateIndicator } from "../../../../_template/src/Base/Helpers/AsyncStateIndicator";
|
|
8
|
+
import { useState } from "react";
|
|
9
|
+
import { useCallback } from "react";
|
|
10
|
+
import { useMemo } from "react";
|
|
11
|
+
import { makeMutationURI } from "./helpers";
|
|
12
|
+
import { GeneralButton, GeneralDialog, GeneralLink } from "./General";
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export const DeleteURI = makeMutationURI(LinkURI, "delete", { withId: true });
|
|
16
|
+
const VectorItemsURI = makeMutationURI(LinkURI, "list", { withId: false });
|
|
17
|
+
const DefaultContent = MediumContent
|
|
18
|
+
|
|
19
|
+
export const DeleteLink = ({
|
|
20
|
+
item,
|
|
21
|
+
preserveHash = true,
|
|
22
|
+
preserveSearch = true,
|
|
23
|
+
oneOfRoles = ["superadmin"],
|
|
24
|
+
mode = "absolute",
|
|
25
|
+
uriPattern = DeleteURI,
|
|
26
|
+
children,
|
|
27
|
+
...props
|
|
28
|
+
}) => {
|
|
29
|
+
const to = useMemo(() => {
|
|
30
|
+
const id = item?.id ?? "";
|
|
31
|
+
return uriPattern.replace(":id", String(id));
|
|
32
|
+
}, [uriPattern, item?.id]);
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<GeneralLink
|
|
36
|
+
rbacitem={item}
|
|
37
|
+
oneOfRoles={oneOfRoles}
|
|
38
|
+
mode={mode}
|
|
39
|
+
uriPattern={to}
|
|
40
|
+
preserveHash={preserveHash}
|
|
41
|
+
preserveSearch={preserveSearch}
|
|
42
|
+
{...props}
|
|
43
|
+
>
|
|
44
|
+
{children}
|
|
45
|
+
</GeneralLink>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
export const DeleteButton = ({
|
|
51
|
+
children,
|
|
52
|
+
item,
|
|
53
|
+
mutationAsyncAction = DeleteAsyncAction,
|
|
54
|
+
oneOfRoles = ["superadmin"],
|
|
55
|
+
mode = "absolute",
|
|
56
|
+
vectorItemsURI = VectorItemsURI,
|
|
57
|
+
Dialog, // možnost override
|
|
58
|
+
onOk,
|
|
59
|
+
...props
|
|
60
|
+
}) => {
|
|
61
|
+
return (
|
|
62
|
+
<GeneralButton
|
|
63
|
+
rbacitem={item}
|
|
64
|
+
oneOfRoles={oneOfRoles}
|
|
65
|
+
mode={mode}
|
|
66
|
+
mutationAsyncAction={mutationAsyncAction}
|
|
67
|
+
Dialog={Dialog} // default dáme níže
|
|
68
|
+
item={item}
|
|
69
|
+
uriPattern={vectorItemsURI} // po úspěchu přesměruj na list
|
|
70
|
+
onOk={onOk}
|
|
71
|
+
{...props}
|
|
72
|
+
>
|
|
73
|
+
{children || "Odstranit"}
|
|
74
|
+
</GeneralButton>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const DeleteDialog = ({
|
|
79
|
+
title = "Odstranit",
|
|
80
|
+
item,
|
|
81
|
+
oklabel = "Odstranit",
|
|
82
|
+
cancellabel = "Zrušit",
|
|
83
|
+
onOk,
|
|
84
|
+
onCancel,
|
|
85
|
+
DefaultContent: DefaultContent_ = DefaultContent,
|
|
86
|
+
}) => {
|
|
87
|
+
// GeneralDialog očekává "item" + bude volat onOk(draft)
|
|
88
|
+
// Draft tady = item, nemění se.
|
|
89
|
+
const [draft] = useState(item);
|
|
90
|
+
|
|
91
|
+
const handleOk_ = useCallback(async () => {
|
|
92
|
+
// zavoláme onOk s itemem (draftem)
|
|
93
|
+
return onOk?.(draft);
|
|
94
|
+
}, [onOk, draft]);
|
|
95
|
+
|
|
96
|
+
return (
|
|
97
|
+
<GeneralDialog
|
|
98
|
+
title={title}
|
|
99
|
+
oklabel={oklabel}
|
|
100
|
+
cancellabel={cancellabel}
|
|
101
|
+
item={draft}
|
|
102
|
+
onOk={handleOk_}
|
|
103
|
+
onCancel={onCancel}
|
|
104
|
+
// DefaultContent u delete je jen "read-only"
|
|
105
|
+
DefaultContent={({ item }) => (
|
|
106
|
+
<>
|
|
107
|
+
{/* <AsyncStateIndicator error={error} loading={saving} text={"Odstraňuji"} /> */}
|
|
108
|
+
<DefaultContent_ item={item} />
|
|
109
|
+
</>
|
|
110
|
+
)}
|
|
111
|
+
/>
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const DeleteDialogContext = ({
|
|
116
|
+
title = "Odstranit",
|
|
117
|
+
|
|
118
|
+
oklabel = "Odstranit",
|
|
119
|
+
cancellabel = "Zrušit",
|
|
120
|
+
onOk: handleOk,
|
|
121
|
+
onCancel: handleCancel,
|
|
122
|
+
mutationAsyncAction = DeleteAsyncAction,
|
|
123
|
+
vectorItemsURI = VectorItemsURI,
|
|
124
|
+
DefaultContent: DefaultContent_ = DefaultContent
|
|
125
|
+
}) => {
|
|
126
|
+
const {
|
|
127
|
+
item,
|
|
128
|
+
// onChange: contextOnChange
|
|
129
|
+
} = useGQLEntityContext()
|
|
130
|
+
|
|
131
|
+
return (
|
|
132
|
+
<DeleteDialog
|
|
133
|
+
title={title}
|
|
134
|
+
item={item}
|
|
135
|
+
oklabel={oklabel}
|
|
136
|
+
cancellabel={cancellabel}
|
|
137
|
+
onCancel={handleCancel}
|
|
138
|
+
onOk={handleOk}
|
|
139
|
+
vectorItemsURI={vectorItemsURI}
|
|
140
|
+
mutationAsyncAction={mutationAsyncAction}
|
|
141
|
+
>
|
|
142
|
+
{/* <AsyncStateIndicator error={error} loading={saving} text={"Odstraňuji"} /> */}
|
|
143
|
+
<DefaultContent_ item={item} />
|
|
144
|
+
</DeleteDialog>
|
|
145
|
+
)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export const DeleteBody = ({
|
|
149
|
+
children,
|
|
150
|
+
mutationAsyncAction = DeleteAsyncAction,
|
|
151
|
+
DefaultContent: DefaultContent_ = DefaultContent,
|
|
152
|
+
oneOfRoles = ["superadmin"],
|
|
153
|
+
mode = "absolute",
|
|
154
|
+
vectorItemsURI = VectorItemsURI,
|
|
155
|
+
}) => {
|
|
156
|
+
return (
|
|
157
|
+
<PermissionGate oneOfRoles={oneOfRoles} mode={mode}>
|
|
158
|
+
<DeleteBodyBody
|
|
159
|
+
mutationAsyncAction={mutationAsyncAction}
|
|
160
|
+
DefaultContent={DefaultContent_}
|
|
161
|
+
vectorItemsURI={vectorItemsURI}
|
|
162
|
+
children={children}
|
|
163
|
+
/>
|
|
164
|
+
</PermissionGate>
|
|
165
|
+
)
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export const DeleteBodyBody = ({
|
|
169
|
+
children,
|
|
170
|
+
mutationAsyncAction = DeleteAsyncAction,
|
|
171
|
+
DefaultContent: DefaultContent_ = DefaultContent,
|
|
172
|
+
vectorItemsURI = VectorItemsURI,
|
|
173
|
+
}) => {
|
|
174
|
+
const { allowed } = usePermissionGateContext()
|
|
175
|
+
const navigate = useNavigate();
|
|
176
|
+
const { item } = useGQLEntityContext()
|
|
177
|
+
|
|
178
|
+
const {
|
|
179
|
+
loading: saving,
|
|
180
|
+
error: savingError,
|
|
181
|
+
commitNow
|
|
182
|
+
} = useEditAction(mutationAsyncAction, item, {
|
|
183
|
+
mode: "confirm",
|
|
184
|
+
// onCommit: contextOnChange
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
const handleConfirm = useCallback(async () => {
|
|
188
|
+
const result = await commitNow(item)
|
|
189
|
+
console.log("handleConfirm", result)
|
|
190
|
+
if (result && navigate) {
|
|
191
|
+
navigate(vectorItemsURI, { replace: true })
|
|
192
|
+
}
|
|
193
|
+
}, [navigate, commitNow])
|
|
194
|
+
|
|
195
|
+
const handleCancel = () => {
|
|
196
|
+
navigate(-1)
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (!item) return null
|
|
200
|
+
if (allowed) {
|
|
201
|
+
return (
|
|
202
|
+
<>
|
|
203
|
+
<DefaultContent_ item={item} >
|
|
204
|
+
<AsyncStateIndicator error={savingError} loading={saving} text={"Odstraňuji"} />
|
|
205
|
+
{children}
|
|
206
|
+
<button
|
|
207
|
+
className="btn btn-warning form-control"
|
|
208
|
+
onClick={handleCancel}
|
|
209
|
+
disabled={saving}
|
|
210
|
+
>
|
|
211
|
+
Zrušit
|
|
212
|
+
</button>
|
|
213
|
+
<button
|
|
214
|
+
className="btn btn-primary form-control"
|
|
215
|
+
onClick={handleConfirm}
|
|
216
|
+
disabled={saving}
|
|
217
|
+
>
|
|
218
|
+
Smazat
|
|
219
|
+
</button>
|
|
220
|
+
|
|
221
|
+
</DefaultContent_>
|
|
222
|
+
</>
|
|
223
|
+
)
|
|
224
|
+
} else {
|
|
225
|
+
return (
|
|
226
|
+
<div>
|
|
227
|
+
<button
|
|
228
|
+
className="btn btn-warning form-control"
|
|
229
|
+
onClick={handleCancel}
|
|
230
|
+
disabled={saving}
|
|
231
|
+
>
|
|
232
|
+
Nemáte oprávnění
|
|
233
|
+
</button>
|
|
234
|
+
</div>
|
|
235
|
+
)
|
|
236
|
+
}
|
|
237
|
+
}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { useNavigate } from "react-router-dom";
|
|
3
|
+
import { useCallback } from "react";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
|
|
6
|
+
import { Lock } from "react-bootstrap-icons"
|
|
7
|
+
|
|
8
|
+
import { useAsyncThunkAction } from "../../../../dynamic/src/Hooks";
|
|
9
|
+
import { MediumEditableContent } from "../Components";
|
|
10
|
+
import { Dialog } from "../FormControls/Dialog";
|
|
11
|
+
import { PermissionGate, usePermissionGateContext } from "../../../../dynamic/src/Hooks/useRoles";
|
|
12
|
+
import { AsyncStateIndicator } from "../Helpers/AsyncStateIndicator";
|
|
13
|
+
import { ProxyLink } from "../Components/ProxyLink";
|
|
14
|
+
|
|
15
|
+
const DefaultContent = (props) => <MediumEditableContent {...props} />
|
|
16
|
+
// const DummyAsyncAction = (vars, gqlClient) => async (dispatch, getState) => {}
|
|
17
|
+
const safeId = () => (
|
|
18
|
+
globalThis.crypto?.randomUUID?.() ??
|
|
19
|
+
`${Date.now()}-${Math.random().toString(16).slice(2)}`);
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export const GeneralLink = ({
|
|
23
|
+
rbacitem = {},
|
|
24
|
+
oneOfRoles=["superadmin"],
|
|
25
|
+
mode="absolute",
|
|
26
|
+
uriPattern,
|
|
27
|
+
children,
|
|
28
|
+
...props
|
|
29
|
+
}) => (
|
|
30
|
+
<PermissionGate oneOfRoles={oneOfRoles} mode={mode} item={rbacitem}>
|
|
31
|
+
<GeneralLinkBody
|
|
32
|
+
uriPattern={uriPattern}
|
|
33
|
+
children={children}
|
|
34
|
+
{...props}
|
|
35
|
+
/>
|
|
36
|
+
</PermissionGate>
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const GeneralLinkBody = ({
|
|
40
|
+
uriPattern,
|
|
41
|
+
children,
|
|
42
|
+
...props
|
|
43
|
+
}) => {
|
|
44
|
+
const { allowed } = usePermissionGateContext()
|
|
45
|
+
if (allowed) {
|
|
46
|
+
return (
|
|
47
|
+
<ProxyLink to={uriPattern} {...props}>{children || "Vytvořit"}</ProxyLink>
|
|
48
|
+
);
|
|
49
|
+
} else {
|
|
50
|
+
return (
|
|
51
|
+
<ProxyLink
|
|
52
|
+
to={uriPattern}
|
|
53
|
+
disabled={true}
|
|
54
|
+
{...props}
|
|
55
|
+
>
|
|
56
|
+
<Lock /> {children || "Vytvořit"}
|
|
57
|
+
</ProxyLink>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export const GeneralButton = ({
|
|
63
|
+
children,
|
|
64
|
+
rbacitem,
|
|
65
|
+
mutationAsyncAction,
|
|
66
|
+
oneOfRoles=["superadmin"],
|
|
67
|
+
mode="absolute",
|
|
68
|
+
Dialog: Dialog_,
|
|
69
|
+
DefaultContent: DefaultContent_=DefaultContent,
|
|
70
|
+
onOk: handleOk,
|
|
71
|
+
onCancel: handleCancel,
|
|
72
|
+
uriPattern,
|
|
73
|
+
item,
|
|
74
|
+
...props
|
|
75
|
+
}) => {
|
|
76
|
+
if (typeof mutationAsyncAction !== "function")
|
|
77
|
+
throw Error("GeneralButton.mutationAsyncAction cannot be undefined")
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<PermissionGate oneOfRoles={oneOfRoles} mode={mode} item={rbacitem}>
|
|
81
|
+
{/* {handleOk && <>O</>} */}
|
|
82
|
+
{/* {JSON.stringify(item)} */}
|
|
83
|
+
<GeneralButtonBody
|
|
84
|
+
children={children}
|
|
85
|
+
mutationAsyncAction={mutationAsyncAction}
|
|
86
|
+
Dialog={Dialog_}
|
|
87
|
+
DefaultContent={DefaultContent_}
|
|
88
|
+
item={item}
|
|
89
|
+
uriPattern={uriPattern}
|
|
90
|
+
rbacitem={rbacitem}
|
|
91
|
+
onOk={handleOk}
|
|
92
|
+
onCancel={handleCancel}
|
|
93
|
+
title={JSON.stringify(oneOfRoles)}
|
|
94
|
+
{...props}
|
|
95
|
+
/>
|
|
96
|
+
</PermissionGate>
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export const GeneralDialog = ({
|
|
101
|
+
title = "Nov(é/ý/á)",
|
|
102
|
+
oklabel = "Ok",
|
|
103
|
+
cancellabel = "Zrušit",
|
|
104
|
+
onOk: handleOk,
|
|
105
|
+
onCancel: handleCancel,
|
|
106
|
+
DefaultContent: DefaultContent_ = DefaultContent,
|
|
107
|
+
item,
|
|
108
|
+
children,
|
|
109
|
+
...props
|
|
110
|
+
}) => {
|
|
111
|
+
|
|
112
|
+
const [draftItem, setDraftItem] = useState(item);
|
|
113
|
+
|
|
114
|
+
useEffect(() => {
|
|
115
|
+
setDraftItem((prev) => {
|
|
116
|
+
console.log("GeneralDialog.useEffect", item)
|
|
117
|
+
const base = item ?? {};
|
|
118
|
+
return { ...base, id: base.id ?? safeId() };
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
}, [item, setDraftItem])
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
const handleChange = useCallback((e) => {
|
|
125
|
+
const fieldId = e?.target?.id;
|
|
126
|
+
const value = e?.target?.value;
|
|
127
|
+
if (!fieldId) {
|
|
128
|
+
console.warn("GeneralDialog.handleChange fired event has no e?.target?.id", e)
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
setDraftItem(prev => ({ ...(prev || {}), [fieldId]: value }))
|
|
132
|
+
|
|
133
|
+
}, [setDraftItem])
|
|
134
|
+
|
|
135
|
+
const handleBlur = (e) => {
|
|
136
|
+
handleChange(e)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const handleOk_ = () => handleOk?.(draftItem);
|
|
140
|
+
|
|
141
|
+
return (
|
|
142
|
+
<Dialog
|
|
143
|
+
title={title}
|
|
144
|
+
oklabel={oklabel}
|
|
145
|
+
cancellabel={cancellabel}
|
|
146
|
+
onCancel={handleCancel}
|
|
147
|
+
onOk={handleOk_}
|
|
148
|
+
{...props}
|
|
149
|
+
>
|
|
150
|
+
<DefaultContent_ item={draftItem} onChange={handleChange} onBlur={handleBlur}>
|
|
151
|
+
{children}
|
|
152
|
+
|
|
153
|
+
</DefaultContent_>
|
|
154
|
+
{/* <hr/>
|
|
155
|
+
item: {JSON.stringify(item)}
|
|
156
|
+
<hr/>
|
|
157
|
+
draftItem: {JSON.stringify(draftItem)} */}
|
|
158
|
+
</Dialog>
|
|
159
|
+
);
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
export const GeneralButtonBody = ({
|
|
164
|
+
children,
|
|
165
|
+
rbacitem,
|
|
166
|
+
mutationAsyncAction,
|
|
167
|
+
Dialog: Dialog_,
|
|
168
|
+
DefaultContent: DefaultContent_=DefaultContent,
|
|
169
|
+
uriPattern,
|
|
170
|
+
item,
|
|
171
|
+
onOk: handleOk,
|
|
172
|
+
onCancel: handleCancel,
|
|
173
|
+
...props
|
|
174
|
+
}) => {
|
|
175
|
+
|
|
176
|
+
const { allowed } = usePermissionGateContext()
|
|
177
|
+
|
|
178
|
+
const [visible, setVisible] = useState(false)
|
|
179
|
+
const handleShow = useCallback(() => setVisible(true), [])
|
|
180
|
+
const handleHide = useCallback(() => setVisible(false), [])
|
|
181
|
+
|
|
182
|
+
const {
|
|
183
|
+
loading: saving,
|
|
184
|
+
error,
|
|
185
|
+
// entity,
|
|
186
|
+
run
|
|
187
|
+
} = useAsyncThunkAction(mutationAsyncAction, item, { deferred: true });
|
|
188
|
+
|
|
189
|
+
const navigate = useNavigate()
|
|
190
|
+
|
|
191
|
+
const handleOk_ = useCallback(async (item) => {
|
|
192
|
+
const result = await run(item)
|
|
193
|
+
if (handleOk) {
|
|
194
|
+
handleOk(item)
|
|
195
|
+
} else if (uriPattern) {
|
|
196
|
+
navigate(`${uriPattern}`.replace(':id', item.id))
|
|
197
|
+
}
|
|
198
|
+
handleHide()
|
|
199
|
+
}, [handleHide, handleOk, navigate, uriPattern, run])
|
|
200
|
+
|
|
201
|
+
const handleCancel_ = useCallback((item) => {
|
|
202
|
+
if (handleCancel) {
|
|
203
|
+
handleCancel(item)
|
|
204
|
+
}
|
|
205
|
+
handleHide()
|
|
206
|
+
}, [handleHide, handleCancel])
|
|
207
|
+
|
|
208
|
+
if (allowed) {
|
|
209
|
+
return (
|
|
210
|
+
<>
|
|
211
|
+
<AsyncStateIndicator error={error} loading={saving} text={"Ukládám"} />
|
|
212
|
+
{/* {JSON.stringify(item?.id)} */}
|
|
213
|
+
{/* {props?.onOk && <>O</>} */}
|
|
214
|
+
<button {...props} onClick={handleShow}>{children || "Vytvořit nový"}</button>
|
|
215
|
+
{visible && Dialog_ &&(
|
|
216
|
+
<Dialog_
|
|
217
|
+
onOk={handleOk_}
|
|
218
|
+
onCancel={handleCancel_}
|
|
219
|
+
mutationAsyncAction={mutationAsyncAction}
|
|
220
|
+
uriPattern={uriPattern}
|
|
221
|
+
item={item}
|
|
222
|
+
/>
|
|
223
|
+
)}
|
|
224
|
+
{visible && !Dialog_ && (
|
|
225
|
+
<Dialog
|
|
226
|
+
onOk={handleOk_}
|
|
227
|
+
onCancel={handleCancel_}
|
|
228
|
+
mutationAsyncAction={mutationAsyncAction}
|
|
229
|
+
DefaultContent={DefaultContent_}
|
|
230
|
+
uriPattern={uriPattern}
|
|
231
|
+
item={item}
|
|
232
|
+
/>
|
|
233
|
+
)}
|
|
234
|
+
</>
|
|
235
|
+
)
|
|
236
|
+
} else {
|
|
237
|
+
const {title, onClick, ...others} = props
|
|
238
|
+
return (
|
|
239
|
+
<button {...others} title={title} style={{ opacity: 0.5, pointerEvents: "auto" }}><Lock /> {children || "Vytvořit nový"}</button>
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
}
|
|
243
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CardCapsule } from "../Components"
|
|
2
|
+
import { VectorItemsURI } from "../Components"
|
|
3
|
+
import { CreateButton, CreateLink } from "./Create"
|
|
4
|
+
import { UpdateButton, UpdateLink } from "./Update"
|
|
5
|
+
import { ProxyLink } from "../../../../_template/src/Base/Components/ProxyLink"
|
|
6
|
+
import { DeleteButton } from "./Delete"
|
|
7
|
+
|
|
8
|
+
export const PageLink = ({ children, preserveHash = true, preserveSearch = true, ...props }) => {
|
|
9
|
+
return (
|
|
10
|
+
<ProxyLink
|
|
11
|
+
to={VectorItemsURI}
|
|
12
|
+
preserveHash={preserveHash}
|
|
13
|
+
preserveSearch={preserveSearch}
|
|
14
|
+
{...props}
|
|
15
|
+
>
|
|
16
|
+
{children}
|
|
17
|
+
</ProxyLink>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const InteractiveMutations = ({ item }) => {
|
|
22
|
+
return (
|
|
23
|
+
<CardCapsule item={item} title="Nástroje">
|
|
24
|
+
<PageLink className="btn btn-outline-success">Stránka</PageLink>
|
|
25
|
+
<UpdateLink className="btn btn-outline-success" item={item}>Upravit</UpdateLink>
|
|
26
|
+
<UpdateButton className="btn btn-outline-success" item={item}>Upravit Dialog</UpdateButton>
|
|
27
|
+
<CreateButton className="btn btn-outline-success">Vytvořit nový</CreateButton>
|
|
28
|
+
<DeleteButton className="btn btn-outline-danger" >Odstranit</DeleteButton>
|
|
29
|
+
|
|
30
|
+
</CardCapsule>
|
|
31
|
+
)
|
|
32
|
+
}
|