@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,113 @@
|
|
|
1
|
+
import { Table } from "../../../../_template/src/Base/Components/Table"
|
|
2
|
+
import { CardCapsule } from "../Components/CardCapsule"
|
|
3
|
+
|
|
4
|
+
import { Table as BaseTable, KebabMenu } from "../../../../_template/src/Base/Components/Table"
|
|
5
|
+
import { Link as BaseLink } from "../../../../_template/src/Base/Components/Link"
|
|
6
|
+
import { useNavigate } from "react-router"
|
|
7
|
+
import { UpdateLink } from "../Mutations/Update"
|
|
8
|
+
import { LinkURI } from "../Components"
|
|
9
|
+
import { label } from "happy-dom/lib/PropertySymbol"
|
|
10
|
+
import { Attribute } from "../../../../_template/src/Base/Components/Attribute"
|
|
11
|
+
|
|
12
|
+
const CellName = ({ row, name }) => (
|
|
13
|
+
<td key={name}>
|
|
14
|
+
<BaseLink item={row} />
|
|
15
|
+
</td>
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
const CellType = ({ row, name }) => (
|
|
19
|
+
<td key={name}>
|
|
20
|
+
<BaseLink item={row?.roletype || {}} />
|
|
21
|
+
</td>
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
const CellValid = ({ row, name }) => (
|
|
25
|
+
<td key={name}>
|
|
26
|
+
<Attribute attribute_value={row?.valid} />
|
|
27
|
+
{/* {row?.valid?"ano":"ne"} */}
|
|
28
|
+
</td>
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
const CellValidTill = ({ row, name }) => (
|
|
32
|
+
<td key={name}>
|
|
33
|
+
<Attribute attribute_value={row?.enddate} />
|
|
34
|
+
{/* {row?.valid?"ano":"ne"} */}
|
|
35
|
+
</td>
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
const CellUser = ({ row, name }) => (
|
|
39
|
+
<td key={name}>
|
|
40
|
+
<BaseLink item={row?.user} />
|
|
41
|
+
{/* {row?.valid?"ano":"ne"} */}
|
|
42
|
+
</td>
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
const CellTools = ({ row, name }) => {
|
|
47
|
+
const navigate = useNavigate()
|
|
48
|
+
const {id, name: name_} = row || {}
|
|
49
|
+
return (
|
|
50
|
+
<td>
|
|
51
|
+
<KebabMenu actions={[
|
|
52
|
+
{
|
|
53
|
+
// label: "Editovat",
|
|
54
|
+
label: "Editovat " + name_,
|
|
55
|
+
onClick: () => navigate(`${LinkURI.replace("view", "edit")}${id}`),
|
|
56
|
+
children: (<UpdateLink item={row} className="form-control btn btn-outline-secondary">Upravit</UpdateLink>)
|
|
57
|
+
// children: (<UpdateLink item={row} className="btn btn-outline-secondary">{name}</UpdateLink>)
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
// label: "Editovat",
|
|
61
|
+
label: "Smazat " + name_,
|
|
62
|
+
onClick: () => navigate(`${LinkURI.replace("view", "edit")}${id}`),
|
|
63
|
+
children: (<UpdateLink item={row} className="form-control btn btn-outline-secondary">Odstranit</UpdateLink>)
|
|
64
|
+
// children: (<UpdateLink item={row} className="btn btn-outline-secondary">{name}</UpdateLink>)
|
|
65
|
+
}
|
|
66
|
+
]} />
|
|
67
|
+
</td>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const table_def = {
|
|
72
|
+
// "name": {
|
|
73
|
+
// label: "Název",
|
|
74
|
+
// component: CellName
|
|
75
|
+
// },
|
|
76
|
+
"user": {
|
|
77
|
+
label: "Kdo",
|
|
78
|
+
component: CellUser
|
|
79
|
+
},
|
|
80
|
+
"roletype": {
|
|
81
|
+
label: "Typ",
|
|
82
|
+
component: CellType
|
|
83
|
+
},
|
|
84
|
+
"valid": {
|
|
85
|
+
label: "Platná",
|
|
86
|
+
component: CellValid
|
|
87
|
+
},
|
|
88
|
+
"enddate": {
|
|
89
|
+
label: "Platná do",
|
|
90
|
+
component: CellValidTill
|
|
91
|
+
},
|
|
92
|
+
"tools": {
|
|
93
|
+
label: "Nástroje",
|
|
94
|
+
component: CellTools
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export const GroupRolesOn = ({ item, skiproles=true, children }) => {
|
|
99
|
+
const attribute_value = item?.rolesOn || []
|
|
100
|
+
const rolesOn = skiproles && attribute_value.filter(
|
|
101
|
+
r => r?.group?.id !== item?.id
|
|
102
|
+
)
|
|
103
|
+
return (
|
|
104
|
+
<>
|
|
105
|
+
<CardCapsule item={item} title={"Odvozené role "}>
|
|
106
|
+
<BaseTable data={rolesOn || attribute_value} table_def={table_def}/>
|
|
107
|
+
</CardCapsule>
|
|
108
|
+
{children}
|
|
109
|
+
</>
|
|
110
|
+
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { Table } from "../../../../_template/src/Base/Components/Table"
|
|
2
|
+
import { CardCapsule } from "../Components/CardCapsule"
|
|
3
|
+
|
|
4
|
+
import { Table as BaseTable, KebabMenu } from "../../../../_template/src/Base/Components/Table"
|
|
5
|
+
import { Link as BaseLink } from "../../../../_template/src/Base/Components/Link"
|
|
6
|
+
import { useNavigate } from "react-router"
|
|
7
|
+
import { UpdateLink } from "../Mutations/Update"
|
|
8
|
+
import { LinkURI } from "../Components"
|
|
9
|
+
import { label } from "happy-dom/lib/PropertySymbol"
|
|
10
|
+
import { Attribute } from "../../../../_template/src/Base/Components/Attribute"
|
|
11
|
+
import { SimpleCardCapsuleRightCorner } from "../../../../_template/src/Base/Components"
|
|
12
|
+
|
|
13
|
+
const CellName = ({ row, name }) => (
|
|
14
|
+
<td key={name}>
|
|
15
|
+
<BaseLink item={row} />
|
|
16
|
+
</td>
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
const CellType = ({ row, name }) => (
|
|
20
|
+
<td key={name}>
|
|
21
|
+
<BaseLink item={row?.grouptype || {}} />
|
|
22
|
+
</td>
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
const CellValid = ({ row, name }) => (
|
|
26
|
+
<td key={name}>
|
|
27
|
+
<Attribute attribute_value={row?.valid} />
|
|
28
|
+
{/* {row?.valid?"ano":"ne"} */}
|
|
29
|
+
</td>
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
const CellValidTill = ({ row, name }) => (
|
|
33
|
+
<td key={name}>
|
|
34
|
+
<Attribute attribute_value={row?.enddate} />
|
|
35
|
+
{/* {row?.valid?"ano":"ne"} */}
|
|
36
|
+
</td>
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
const CellTools = ({ row, name }) => {
|
|
40
|
+
const navigate = useNavigate()
|
|
41
|
+
const {id, name: name_} = row || {}
|
|
42
|
+
return (
|
|
43
|
+
<td>
|
|
44
|
+
<KebabMenu actions={[
|
|
45
|
+
{
|
|
46
|
+
// label: "Editovat",
|
|
47
|
+
label: "Editovat " + name_,
|
|
48
|
+
onClick: () => navigate(`${LinkURI.replace("view", "edit")}${id}`),
|
|
49
|
+
children: (<UpdateLink item={row} className="form-control btn btn-outline-secondary">Upravit</UpdateLink>)
|
|
50
|
+
// children: (<UpdateLink item={row} className="btn btn-outline-secondary">{name}</UpdateLink>)
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
// label: "Editovat",
|
|
54
|
+
label: "Smazat " + name_,
|
|
55
|
+
onClick: () => navigate(`${LinkURI.replace("view", "edit")}${id}`),
|
|
56
|
+
children: (<UpdateLink item={row} className="form-control btn btn-outline-secondary">Odstranit</UpdateLink>)
|
|
57
|
+
// children: (<UpdateLink item={row} className="btn btn-outline-secondary">{name}</UpdateLink>)
|
|
58
|
+
}
|
|
59
|
+
]} />
|
|
60
|
+
</td>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const table_def = {
|
|
65
|
+
"name": {
|
|
66
|
+
label: "Název",
|
|
67
|
+
component: CellName
|
|
68
|
+
},
|
|
69
|
+
"grouptype": {
|
|
70
|
+
label: "Typ",
|
|
71
|
+
component: CellType
|
|
72
|
+
},
|
|
73
|
+
"valid": {
|
|
74
|
+
label: "Platná",
|
|
75
|
+
component: CellValid
|
|
76
|
+
},
|
|
77
|
+
"enddate": {
|
|
78
|
+
label: "Platná do",
|
|
79
|
+
component: CellValidTill
|
|
80
|
+
},
|
|
81
|
+
"tools": {
|
|
82
|
+
label: "Nástroje",
|
|
83
|
+
component: CellTools
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const GroupSubgroups = ({ item, children }) => {
|
|
88
|
+
const attribute_value = item?.subgroups || []
|
|
89
|
+
return (
|
|
90
|
+
<CardCapsule item={item} title={"Podřízené prvky"}>
|
|
91
|
+
{/* <SimpleCardCapsuleRightCorner>Edit</SimpleCardCapsuleRightCorner> */}
|
|
92
|
+
{children}
|
|
93
|
+
<BaseTable data={attribute_value} table_def={table_def}/>
|
|
94
|
+
</CardCapsule>
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { Col } from "react-bootstrap";
|
|
3
|
+
import { useAsyncAction, createAsyncGraphQLAction, processVectorAttributeFromGraphQLResult, createQueryStrLazy } from "@hrbolek/uoisfrontend-gql-shared"
|
|
4
|
+
import { ErrorHandler, InfiniteScroll, LoadingSpinner } from "@hrbolek/uoisfrontend-shared"
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Inserts a VectorGQLModel item into a template’s vectors array and dispatches an update.
|
|
9
|
+
*
|
|
10
|
+
* @param {Object} template - The current template object containing a `vectors` array.
|
|
11
|
+
* @param {Object} vectorItem - The item to insert; must have `__typename === "VectorGQLModel"`.
|
|
12
|
+
* @param {Function} dispatch - Redux dispatch function (or similar) to call the update action.
|
|
13
|
+
*/
|
|
14
|
+
const followUpTemplateVectorItemInsert = (template, vectorItem, dispatch) => {
|
|
15
|
+
const { __typename } = vectorItem;
|
|
16
|
+
if (__typename === "VectorGQLModel") {
|
|
17
|
+
const { vectors, ...others } = template;
|
|
18
|
+
const newTemplateVectorItems = [...vectors, vectorItem];
|
|
19
|
+
const newTemplate = { ...others, vectors: newTemplateVectorItems };
|
|
20
|
+
dispatch(ItemActions.item_update(newTemplate));
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Replaces an existing VectorGQLModel item in a template’s vectors array and dispatches an update.
|
|
26
|
+
*
|
|
27
|
+
* @param {Object} template - The current template object containing a `vectors` array.
|
|
28
|
+
* @param {Object} vectorItem - The updated item; must have `__typename === "VectorGQLModel"` and an `id` field matching an existing item.
|
|
29
|
+
* @param {Function} dispatch - Redux dispatch function (or similar) to call the update action.
|
|
30
|
+
*/
|
|
31
|
+
const followUpTemplateVectorItemUpdate = (template, vectorItem, dispatch) => {
|
|
32
|
+
const { __typename } = vectorItem;
|
|
33
|
+
if (__typename === "VectorGQLModel") {
|
|
34
|
+
const { vectors, ...others } = template;
|
|
35
|
+
const newTemplateVectorItems = vectors.map(item =>
|
|
36
|
+
item.id === vectorItem.id ? vectorItem : item
|
|
37
|
+
);
|
|
38
|
+
const newTemplate = { ...others, vectors: newTemplateVectorItems };
|
|
39
|
+
dispatch(ItemActions.item_update(newTemplate));
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Removes a VectorGQLModel item from a template’s vectors array by its `id` and dispatches an update.
|
|
45
|
+
*
|
|
46
|
+
* @param {Object} template - The current template object containing a `vectors` array.
|
|
47
|
+
* @param {Object} vectorItem - The item to delete; must have `__typename === "VectorGQLModel"` and an `id` field.
|
|
48
|
+
* @param {Function} dispatch - Redux dispatch function (or similar) to call the update action.
|
|
49
|
+
*/
|
|
50
|
+
const followUpTemplateVectorItemDelete = (template, vectorItem, dispatch) => {
|
|
51
|
+
const { __typename } = vectorItem;
|
|
52
|
+
if (__typename === "VectorGQLModel") {
|
|
53
|
+
const { vectors, ...others } = template;
|
|
54
|
+
const newTemplateVectorItems = vectors.filter(
|
|
55
|
+
item => item.id !== vectorItem.id
|
|
56
|
+
);
|
|
57
|
+
const newTemplate = { ...others, vectors: newTemplateVectorItems };
|
|
58
|
+
dispatch(ItemActions.item_update(newTemplate));
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const TemplateVectorsAttributeQuery = `
|
|
63
|
+
query TemplateQueryRead($id: UUID!, $where: VectorInputFilter, $skip: Int, $limit: Int) {
|
|
64
|
+
result: templateById(id: $id) {
|
|
65
|
+
__typename
|
|
66
|
+
id
|
|
67
|
+
vectors(skip: $skip, limit: $limit, where: $where) {
|
|
68
|
+
__typename
|
|
69
|
+
id
|
|
70
|
+
# ...VectorMedium
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
`
|
|
75
|
+
|
|
76
|
+
const TemplateVectorsAttributeAsyncAction = createAsyncGraphQLAction(
|
|
77
|
+
createQueryStrLazy(TemplateVectorsAttributeQuery,
|
|
78
|
+
//VectorMediumFragment
|
|
79
|
+
),
|
|
80
|
+
processVectorAttributeFromGraphQLResult("vectors")
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* A component for displaying the `vectors` attribute of a template entity.
|
|
86
|
+
*
|
|
87
|
+
* This component checks if the `vectors` attribute exists on the `template` object. If `vectors` is undefined,
|
|
88
|
+
* the component returns `null` and renders nothing. Otherwise, it maps over the (optionally filtered) `vectors` array
|
|
89
|
+
* and displays a placeholder message and a JSON representation for each item.
|
|
90
|
+
*
|
|
91
|
+
* @component
|
|
92
|
+
* @param {Object} props - The props for the TemplateVectorsAttribute component.
|
|
93
|
+
* @param {Object} props.template - The object representing the template entity.
|
|
94
|
+
* @param {Array<Object>} [props.template.vectors] - An array of vector items associated with the template entity.
|
|
95
|
+
* Each item is expected to have a unique `id` property.
|
|
96
|
+
* @param {Function} [props.filter=Boolean] - (Optional) A function to filter the vectors array before rendering.
|
|
97
|
+
*
|
|
98
|
+
* @returns {JSX.Element|null} A JSX element displaying the (filtered) `vectors` items or `null` if the attribute is undefined or empty.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* // Basic usage:
|
|
102
|
+
* const templateEntity = {
|
|
103
|
+
* vectors: [
|
|
104
|
+
* { id: 1, name: "Vector Item 1" },
|
|
105
|
+
* { id: 2, name: "Vector Item 2" }
|
|
106
|
+
* ]
|
|
107
|
+
* };
|
|
108
|
+
* <TemplateVectorsAttribute template={templateEntity} />
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* // With a custom filter:
|
|
112
|
+
* <TemplateVectorsAttribute
|
|
113
|
+
* template={templateEntity}
|
|
114
|
+
* filter={vector => vector.name.includes("1")}
|
|
115
|
+
* />
|
|
116
|
+
*/
|
|
117
|
+
export const TemplateVectorsAttribute_old = ({template, filter=Boolean, Visualiser=TrivialVisualiserDiv}) => {
|
|
118
|
+
const { vectors: unfiltered } = template
|
|
119
|
+
if (typeof unfiltered === 'undefined') return null
|
|
120
|
+
const vectors = unfiltered.filter(filter)
|
|
121
|
+
if (vectors.length === 0) return null
|
|
122
|
+
return (
|
|
123
|
+
<>
|
|
124
|
+
{vectors.map(
|
|
125
|
+
vector => <Visualiser id={vector.id} key={vector.id} vector={vector} />
|
|
126
|
+
)}
|
|
127
|
+
</>
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Visualiser component for displaying a list of vector items using `TemplateVectorsAttribute`.
|
|
133
|
+
*
|
|
134
|
+
* Wraps the `TemplateVectorsAttribute` component, passing the given `items` as the `vectors` attribute
|
|
135
|
+
* on a synthetic `template` object. All other props are forwarded.
|
|
136
|
+
*
|
|
137
|
+
* @component
|
|
138
|
+
* @param {Object} props - Component props.
|
|
139
|
+
* @param {Array<Object>} props.items - The array of vector items to be visualized.
|
|
140
|
+
* @param {...any} [props] - Additional props forwarded to `TemplateVectorsAttribute` (e.g., `filter`).
|
|
141
|
+
*
|
|
142
|
+
* @returns {JSX.Element|null} Rendered list of vectors or `null` if none are provided.
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* <VectorsVisualiser
|
|
146
|
+
* items={[
|
|
147
|
+
* { id: 1, name: "Vector 1" },
|
|
148
|
+
* { id: 2, name: "Vector 2" }
|
|
149
|
+
* ]}
|
|
150
|
+
* filter={v => v.name.includes("1")}
|
|
151
|
+
* />
|
|
152
|
+
*/
|
|
153
|
+
const VectorsVisualiser = ({ items, ...props }) =>
|
|
154
|
+
<TemplateVectorsAttribute_old {...props} template={{ vectors: items }} />
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Infinite-scrolling component for the `vectors` attribute of a template entity.
|
|
158
|
+
*
|
|
159
|
+
* Uses the generic `InfiniteScroll` component to fetch, merge, and display the `vectors` array
|
|
160
|
+
* associated with the provided `template` object. It utilizes `VectorsVisualiser` for rendering,
|
|
161
|
+
* and handles pagination, lazy-loading, and merging of items as the user scrolls.
|
|
162
|
+
*
|
|
163
|
+
* @component
|
|
164
|
+
* @param {Object} props - Component props.
|
|
165
|
+
* @param {Object} props.template - The template entity containing the `vectors` array.
|
|
166
|
+
* @param {Array<Object>} [props.template.vectors] - (Optional) Preloaded vector items.
|
|
167
|
+
* @param {Object} [props.actionParams={}] - Optional extra parameters for the async fetch action (merged with pagination).
|
|
168
|
+
* @param {...any} [props] - Additional props passed to `InfiniteScroll` or `VectorsVisualiser`.
|
|
169
|
+
*
|
|
170
|
+
* @returns {JSX.Element} An infinite-scrolling list of vectors.
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* <TemplateVectorsAttributeInfinite
|
|
174
|
+
* template={{
|
|
175
|
+
* vectors: [
|
|
176
|
+
* { id: 1, name: "Vector 1" },
|
|
177
|
+
* { id: 2, name: "Vector 2" }
|
|
178
|
+
* ]
|
|
179
|
+
* }}
|
|
180
|
+
* />
|
|
181
|
+
*/
|
|
182
|
+
export const TemplateVectorsAttributeInfinite = ({template, actionParams={}, ...props}) => {
|
|
183
|
+
const {vectors} = template
|
|
184
|
+
|
|
185
|
+
return (
|
|
186
|
+
<InfiniteScroll
|
|
187
|
+
{...props}
|
|
188
|
+
Visualiser={VectorsVisualiser}
|
|
189
|
+
preloadedItems={vectors}
|
|
190
|
+
actionParams={{...actionParams, skip: 0, limit: 10}}
|
|
191
|
+
asyncAction={TemplateVectorsAttributeAsyncAction}
|
|
192
|
+
/>
|
|
193
|
+
)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* A lazy-loading component for displaying filtered `vectors` from a `template` entity.
|
|
198
|
+
*
|
|
199
|
+
* This component uses the `TemplateVectorsAttributeAsyncAction` to asynchronously fetch
|
|
200
|
+
* the `template.vectors` data. It shows a loading spinner while fetching, handles errors,
|
|
201
|
+
* and filters the resulting list using a custom `filter` function (defaults to `Boolean` to remove falsy values).
|
|
202
|
+
*
|
|
203
|
+
* Each vector item is rendered as a `<div>` with its `id` as both the `key` and the `id` attribute,
|
|
204
|
+
* and displays a formatted JSON preview using `<pre>`.
|
|
205
|
+
*
|
|
206
|
+
* @component
|
|
207
|
+
* @param {Object} props - The properties object.
|
|
208
|
+
* @param {Object} props.template - The template entity or identifying query variables used to fetch it.
|
|
209
|
+
* @param {Function} [props.filter=Boolean] - A filtering function applied to the `vectors` array before rendering.
|
|
210
|
+
*
|
|
211
|
+
* @returns {JSX.Element} A rendered list of filtered vectors or a loading/error placeholder.
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* <TemplateVectorsAttributeLazy template={{ id: "abc123" }} />
|
|
215
|
+
*
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* <TemplateVectorsAttributeLazy
|
|
219
|
+
* template={{ id: "abc123" }}
|
|
220
|
+
* filter={(v) => v.status === "active"}
|
|
221
|
+
* />
|
|
222
|
+
*/
|
|
223
|
+
export const TemplateVectorsAttributeLazy = ({template, filter=Boolean, ...props}) => {
|
|
224
|
+
const {loading, error, entity, fetch} = useAsyncAction(TemplateVectorsAttributeAsyncAction, template, {deferred: true})
|
|
225
|
+
useEffect(() => {
|
|
226
|
+
fetch(template)
|
|
227
|
+
}, [template])
|
|
228
|
+
|
|
229
|
+
if (loading) return <LoadingSpinner />
|
|
230
|
+
if (error) return <ErrorHandler errors={error} />
|
|
231
|
+
|
|
232
|
+
return <TemplateVectorsAttribute_old template={entity} filter={filter} {...props}/>
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const TrivialVisualiserDiv = ({vector, children}) => <div>
|
|
236
|
+
Probably {'<VectorMediumCard vector={vector} />'} <br />
|
|
237
|
+
<pre>{JSON.stringify(vector, null, 4)}</pre>
|
|
238
|
+
{children}
|
|
239
|
+
</div>
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Component to render the filtered `vectors` attribute of a template entity.
|
|
243
|
+
*
|
|
244
|
+
* Applies an optional filter function to the vectors array before rendering.
|
|
245
|
+
* Supports infinite scrolling to load more items lazily.
|
|
246
|
+
*
|
|
247
|
+
* The `Layout` prop is used as a wrapper component for each rendered item and
|
|
248
|
+
* is consistently applied in both static and infinite scroll rendering modes.
|
|
249
|
+
* If different layouts are desired for infinite vs static modes,
|
|
250
|
+
* consider conditionally passing different `Layout` props.
|
|
251
|
+
*
|
|
252
|
+
* @param {object} props - Component props.
|
|
253
|
+
* @param {object} props.template - The template entity containing the `vectors` array.
|
|
254
|
+
* @param {Array<object>} [props.template.vectors] - Array of vector items to render.
|
|
255
|
+
* @param {React.ComponentType} [props.Visualiser=TrivialVisualiserDiv] - Component to render each vector item.
|
|
256
|
+
* Receives `vector` and optionally other props.
|
|
257
|
+
* @param {boolean} [props.infinite=true] - Whether to enable infinite scrolling.
|
|
258
|
+
* @param {React.ComponentType|string} [props.Layout=Col] - Wrapper component for each rendered item.
|
|
259
|
+
* This component is used consistently for both static rendering and infinite scroll loading.
|
|
260
|
+
* @param {Function} [props.filter=Boolean] - Filter function to apply on vectors before rendering.
|
|
261
|
+
* @param {...any} props - Additional props forwarded to `Visualiser` and `InfiniteScroll`.
|
|
262
|
+
*
|
|
263
|
+
* @returns {JSX.Element|null} Rendered list or infinite scroll component, or null if no vectors.
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* <TemplateVectorsAttribute
|
|
267
|
+
* template={template}
|
|
268
|
+
* Visualiser={VectorMediumCard}
|
|
269
|
+
* Layout={Col}
|
|
270
|
+
* filter={(v) => v.active}
|
|
271
|
+
* infinite={true}
|
|
272
|
+
* />
|
|
273
|
+
*/
|
|
274
|
+
export const TemplateVectorsAttribute = ({
|
|
275
|
+
template,
|
|
276
|
+
Visualiser = TrivialVisualiserDiv,
|
|
277
|
+
infinite = true,
|
|
278
|
+
Layout = Col, // 'list' | 'grid' | 'infinite'
|
|
279
|
+
filter = Boolean,
|
|
280
|
+
...props
|
|
281
|
+
}) => {
|
|
282
|
+
|
|
283
|
+
const { vectors: unfiltered } = template
|
|
284
|
+
if (typeof unfiltered === 'undefined') return null
|
|
285
|
+
const vectors = unfiltered.filter(filter)
|
|
286
|
+
if (vectors.length === 0) return null
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
if (infinite) {
|
|
291
|
+
// Pro infinite scroll použijeme komponentu InfiniteScroll
|
|
292
|
+
// Visualiser zde je komponenta, která přijímá pole položek (items)
|
|
293
|
+
// a zobrazí je – proto vytvoříme wrapper, který předá Visualiser správně
|
|
294
|
+
|
|
295
|
+
const VisualiserWrapper = ({ items }) => (
|
|
296
|
+
<TemplateVectorsAttribute
|
|
297
|
+
{...props}
|
|
298
|
+
template={{vectors: items}}
|
|
299
|
+
Visualiser={Visualiser}
|
|
300
|
+
infinite={false}
|
|
301
|
+
Layout={Layout}
|
|
302
|
+
filter={filter}
|
|
303
|
+
/>
|
|
304
|
+
);
|
|
305
|
+
|
|
306
|
+
return (
|
|
307
|
+
<InfiniteScroll
|
|
308
|
+
actionParams={{ ...template, skip: 0, limit: 10 }}
|
|
309
|
+
asyncAction={TemplateVectorsAttributeAsyncAction}
|
|
310
|
+
{...props}
|
|
311
|
+
Visualiser={VisualiserWrapper}
|
|
312
|
+
preloadedItems={vectors}
|
|
313
|
+
/>
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
return (
|
|
318
|
+
<>
|
|
319
|
+
{vectors.map((vector) => (
|
|
320
|
+
<Layout key={vector.id}>
|
|
321
|
+
{vector && <Visualiser {...props} vector={vector} />}
|
|
322
|
+
</Layout>
|
|
323
|
+
))}
|
|
324
|
+
</>
|
|
325
|
+
);
|
|
326
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CardCapsule } from "../Components/CardCapsule"
|
|
2
|
+
import { Table } from "../Components/Table"
|
|
3
|
+
import { Col } from "../../../../_template/src/Base/Components/Col"
|
|
4
|
+
import { Row } from "../../../../_template/src/Base/Components/Row"
|
|
5
|
+
|
|
6
|
+
export const VectorAttributeFactory = (attribute_name) => ({ item }) => {
|
|
7
|
+
const attribute_value = item?.[attribute_name] || []
|
|
8
|
+
return (
|
|
9
|
+
<Row key={attribute_name}>
|
|
10
|
+
<Col className="col-2"><b>{attribute_name}</b></Col>
|
|
11
|
+
<Col className="col-10">
|
|
12
|
+
<CardCapsule item={item}>
|
|
13
|
+
<Table data={attribute_value} />
|
|
14
|
+
</CardCapsule>
|
|
15
|
+
</Col>
|
|
16
|
+
</Row>
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const VectorAttribute_ = ({ attribute_name, item }) => {
|
|
21
|
+
const attribute_value = item?.[attribute_name] || []
|
|
22
|
+
return (
|
|
23
|
+
<Row key={attribute_name}>
|
|
24
|
+
<Col className="col-2"><b>{attribute_name}</b></Col>
|
|
25
|
+
<Col className="col-10">
|
|
26
|
+
<CardCapsule item={item}>
|
|
27
|
+
<Table data={attribute_value} />
|
|
28
|
+
</CardCapsule>
|
|
29
|
+
</Col>
|
|
30
|
+
</Row>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const VectorAttribute = ({ attribute_name, item }) => {
|
|
35
|
+
const attribute_value = item?.[attribute_name] || []
|
|
36
|
+
return (
|
|
37
|
+
<CardCapsule item={item} title={attribute_name+'[]'}>
|
|
38
|
+
<Table data={attribute_value} />
|
|
39
|
+
</CardCapsule>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
export const MediumCardVectors = ({ item }) => {
|
|
45
|
+
return (
|
|
46
|
+
<CardCapsule item={item}>
|
|
47
|
+
{Object.entries(item).map(([attribute_name, attribute_value]) => {
|
|
48
|
+
if (Array.isArray(attribute_value)) {
|
|
49
|
+
return <VectorAttribute key={attribute_name} attribute_name={attribute_name} item={item} />
|
|
50
|
+
} else {
|
|
51
|
+
return null
|
|
52
|
+
}
|
|
53
|
+
})}
|
|
54
|
+
</CardCapsule>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TemplateVectorsAttribute'
|