@code0-tech/pictor 0.0.0-mvp.10
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/LICENSE +29 -0
- package/README.md +0 -0
- package/dist/_virtual/compiler-runtime.js +5 -0
- package/dist/_virtual/compiler-runtime2.js +4 -0
- package/dist/_virtual/react-compiler-runtime.development.js +4 -0
- package/dist/_virtual/react-compiler-runtime.production.js +4 -0
- package/dist/assets/components/avatar/Avatar.style.css +1 -0
- package/dist/assets/components/badge/Badge.style.css +1 -0
- package/dist/assets/components/breadcrumb/Breadcrumb.style.css +1 -0
- package/dist/assets/components/button/Button.style.css +1 -0
- package/dist/assets/components/button-group/ButtonGroup.style.css +1 -0
- package/dist/assets/components/card/Card.style.css +1 -0
- package/dist/assets/components/col/Col.style.css +1 -0
- package/dist/assets/components/command/Command.style.css +1 -0
- package/dist/assets/components/container/Container.style.css +1 -0
- package/dist/assets/components/d-flow/DFlow.style.css +1 -0
- package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +1 -0
- package/dist/assets/components/d-flow/function/DFlowFunctionDefaultCard.style.css +1 -0
- package/dist/assets/components/d-flow/input/DFlowInputDataType.style.css +1 -0
- package/dist/assets/components/d-flow/minimap/DFlowMiniMap.style.css +1 -0
- package/dist/assets/components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css +1 -0
- package/dist/assets/components/d-flow/validation/DFlowValidation.style.css +1 -0
- package/dist/assets/components/d-fullscreen/DFullScreen.style.css +1 -0
- package/dist/assets/components/d-layout/DLayout.style.css +1 -0
- package/dist/assets/components/d-resizable/DResizable.style.css +1 -0
- package/dist/assets/components/dialog/Dialog.style.css +1 -0
- package/dist/assets/components/file-tabs/FileTabs.style.css +1 -0
- package/dist/assets/components/flex/Flex.style.css +1 -0
- package/dist/assets/components/form/Input.style.css +1 -0
- package/dist/assets/components/menu/Menu.style.css +1 -0
- package/dist/assets/components/quote/Quote.style.css +1 -0
- package/dist/assets/components/row/Row.style.css +1 -0
- package/dist/assets/components/scroll-area/ScrollArea.style.css +1 -0
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -0
- package/dist/assets/components/spacing/Spacing.style.css +1 -0
- package/dist/assets/components/tab/Tab.style.css +1 -0
- package/dist/assets/components/text/Text.style.css +1 -0
- package/dist/assets/components/tooltip/Tooltip.style.css +1 -0
- package/dist/assets/node_modules/@xyflow/react/dist/style.css +1 -0
- package/dist/components/avatar/Avatar.d.ts +8 -0
- package/dist/components/avatar/Avatar.js +55 -0
- package/dist/components/badge/Badge.d.ts +7 -0
- package/dist/components/badge/Badge.js +22 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +7 -0
- package/dist/components/breadcrumb/Breadcrumb.js +32 -0
- package/dist/components/button/Button.d.ts +10 -0
- package/dist/components/button/Button.js +29 -0
- package/dist/components/button-group/ButtonGroup.d.ts +7 -0
- package/dist/components/button-group/ButtonGroup.js +27 -0
- package/dist/components/card/Card.d.ts +14 -0
- package/dist/components/card/Card.js +39 -0
- package/dist/components/card/CardSection.d.ts +9 -0
- package/dist/components/card/CardSection.js +22 -0
- package/dist/components/col/Col.d.ts +13 -0
- package/dist/components/col/Col.js +27 -0
- package/dist/components/command/Command.d.ts +30 -0
- package/dist/components/command/Command.js +103 -0
- package/dist/components/container/Container.d.ts +6 -0
- package/dist/components/container/Container.js +21 -0
- package/dist/components/d-flow/DFlow.d.ts +5 -0
- package/dist/components/d-flow/DFlow.edges.hook.d.ts +4 -0
- package/dist/components/d-flow/DFlow.edges.hook.js +144 -0
- package/dist/components/d-flow/DFlow.js +375 -0
- package/dist/components/d-flow/DFlow.nodes.hook.d.ts +3 -0
- package/dist/components/d-flow/DFlow.nodes.hook.js +139 -0
- package/dist/components/d-flow/DFlow.service.d.ts +10 -0
- package/dist/components/d-flow/DFlow.service.js +11 -0
- package/dist/components/d-flow/DFlow.view.d.ts +109 -0
- package/dist/components/d-flow/DFlow.view.js +213 -0
- package/dist/components/d-flow/control/DFlowControl.d.ts +2 -0
- package/dist/components/d-flow/control/DFlowControl.js +77 -0
- package/dist/components/d-flow/control/index.d.ts +1 -0
- package/dist/components/d-flow/control/index.js +4 -0
- package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +10 -0
- package/dist/components/d-flow/data-type/DFlowDataType.service.js +91 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +2 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +18 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +4 -0
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +20 -0
- package/dist/components/d-flow/data-type/DFlowDataType.view.d.ts +32 -0
- package/dist/components/d-flow/data-type/DFlowDataType.view.js +65 -0
- package/dist/components/d-flow/data-type/index.d.ts +2 -0
- package/dist/components/d-flow/data-type/index.js +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +222 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +229 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.d.ts +7 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeItemOfCollectionRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.d.ts +4 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeNumberRangeRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.d.ts +9 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +217 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.d.ts +4 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRegexRule.js +214 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.d.ts +6 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +243 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.d.ts +8 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRule.js +10 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.d.ts +3 -0
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +10 -0
- package/dist/components/d-flow/edge/DFlowEdge.d.ts +10 -0
- package/dist/components/d-flow/edge/DFlowEdge.js +48 -0
- package/dist/components/d-flow/folder/DFlowFolder.d.ts +19 -0
- package/dist/components/d-flow/folder/DFlowFolder.js +119 -0
- package/dist/components/d-flow/folder/index.d.ts +1 -0
- package/dist/components/d-flow/folder/index.js +6 -0
- package/dist/components/d-flow/function/DFlowFunction.input.hook.d.ts +4 -0
- package/dist/components/d-flow/function/DFlowFunction.input.hook.js +9 -0
- package/dist/components/d-flow/function/DFlowFunction.return.hook.d.ts +4 -0
- package/dist/components/d-flow/function/DFlowFunction.return.hook.js +11 -0
- package/dist/components/d-flow/function/DFlowFunction.service.d.ts +6 -0
- package/dist/components/d-flow/function/DFlowFunction.service.js +9 -0
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +10 -0
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +74 -0
- package/dist/components/d-flow/function/DFlowFunction.view.d.ts +66 -0
- package/dist/components/d-flow/function/DFlowFunction.view.js +117 -0
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.d.ts +15 -0
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +158 -0
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +5 -0
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +55 -0
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.d.ts +11 -0
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +26 -0
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.d.ts +9 -0
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +97 -0
- package/dist/components/d-flow/function/index.d.ts +2 -0
- package/dist/components/d-flow/function/index.js +7 -0
- package/dist/components/d-flow/index.d.ts +13 -0
- package/dist/components/d-flow/index.js +46 -0
- package/dist/components/d-flow/input/DFlowInputDataType.d.ts +8 -0
- package/dist/components/d-flow/input/DFlowInputDataType.js +422 -0
- package/dist/components/d-flow/minimap/DFlowMiniMap.d.ts +2 -0
- package/dist/components/d-flow/minimap/DFlowMiniMap.js +22 -0
- package/dist/components/d-flow/minimap/index.d.ts +1 -0
- package/dist/components/d-flow/minimap/index.js +4 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.d.ts +33 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +150 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +5 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +18 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +21 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +25 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.d.ts +8 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +67 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.d.ts +3 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.util.js +42 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.d.ts +2 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +69 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.d.ts +6 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +21 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.d.ts +7 -0
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +22 -0
- package/dist/components/d-flow/suggestion/index.d.ts +2 -0
- package/dist/components/d-flow/suggestion/index.js +7 -0
- package/dist/components/d-flow/tab/DFlowTabDefault.d.ts +11 -0
- package/dist/components/d-flow/tab/DFlowTabDefault.js +97 -0
- package/dist/components/d-flow/tab/DFlowTabTrigger.d.ts +6 -0
- package/dist/components/d-flow/tab/DFlowTabTrigger.js +51 -0
- package/dist/components/d-flow/tab/DFlowTabs.d.ts +2 -0
- package/dist/components/d-flow/tab/DFlowTabs.js +105 -0
- package/dist/components/d-flow/type/DFlowType.service.d.ts +6 -0
- package/dist/components/d-flow/type/DFlowType.service.js +9 -0
- package/dist/components/d-flow/type/DFlowType.view.d.ts +35 -0
- package/dist/components/d-flow/type/DFlowType.view.js +69 -0
- package/dist/components/d-flow/type/index.d.ts +2 -0
- package/dist/components/d-flow/type/index.js +6 -0
- package/dist/components/d-flow/validation/DFlowValidation.d.ts +6 -0
- package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +3 -0
- package/dist/components/d-flow/validation/DFlowValidation.hook.js +10 -0
- package/dist/components/d-flow/validation/DFlowValidation.js +60 -0
- package/dist/components/d-flow/validation/index.d.ts +2 -0
- package/dist/components/d-flow/validation/index.js +6 -0
- package/dist/components/d-fullscreen/DFullScreen.d.ts +6 -0
- package/dist/components/d-fullscreen/DFullScreen.js +26 -0
- package/dist/components/d-layout/DLayout.d.ts +10 -0
- package/dist/components/d-layout/DLayout.js +52 -0
- package/dist/components/d-namespace/DNamespace.service.d.ts +6 -0
- package/dist/components/d-namespace/DNamespace.service.js +11 -0
- package/dist/components/d-namespace/DNamespace.view.d.ts +32 -0
- package/dist/components/d-namespace/DNamespace.view.js +65 -0
- package/dist/components/d-namespace/index.d.ts +12 -0
- package/dist/components/d-namespace/index.js +35 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +8 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.service.js +11 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.view.d.ts +26 -0
- package/dist/components/d-namespace/license/DNamespaceLicense.view.js +57 -0
- package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +9 -0
- package/dist/components/d-namespace/member/DNamespaceMember.service.js +11 -0
- package/dist/components/d-namespace/member/DNamespaceMember.view.d.ts +26 -0
- package/dist/components/d-namespace/member/DNamespaceMember.view.js +57 -0
- package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProject.service.js +11 -0
- package/dist/components/d-namespace/project/DNamespaceProject.view.d.ts +35 -0
- package/dist/components/d-namespace/project/DNamespaceProject.view.js +69 -0
- package/dist/components/d-namespace/project/DNamespaceProjectCard.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProjectCard.js +57 -0
- package/dist/components/d-namespace/project/DNamespaceProjectMenu.d.ts +9 -0
- package/dist/components/d-namespace/project/DNamespaceProjectMenu.js +18 -0
- package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +10 -0
- package/dist/components/d-namespace/role/DNamespaceRole.service.js +11 -0
- package/dist/components/d-namespace/role/DNamespaceRole.view.d.ts +26 -0
- package/dist/components/d-namespace/role/DNamespaceRole.view.js +57 -0
- package/dist/components/d-organization/DOrganization.service.d.ts +8 -0
- package/dist/components/d-organization/DOrganization.service.js +11 -0
- package/dist/components/d-organization/DOrganization.view.d.ts +20 -0
- package/dist/components/d-organization/DOrganization.view.js +52 -0
- package/dist/components/d-organization/DOrganizationCard.d.ts +10 -0
- package/dist/components/d-organization/DOrganizationCard.js +63 -0
- package/dist/components/d-organization/DOrganizationMenu.d.ts +9 -0
- package/dist/components/d-organization/DOrganizationMenu.js +18 -0
- package/dist/components/d-organization/index.d.ts +4 -0
- package/dist/components/d-organization/index.js +19 -0
- package/dist/components/d-resizable/DResizable.d.ts +10 -0
- package/dist/components/d-resizable/DResizable.js +32 -0
- package/dist/components/d-runtime/DRuntime.service.d.ts +9 -0
- package/dist/components/d-runtime/DRuntime.service.js +11 -0
- package/dist/components/d-runtime/DRuntime.view.d.ts +38 -0
- package/dist/components/d-runtime/DRuntime.view.js +73 -0
- package/dist/components/d-runtime/index.d.ts +2 -0
- package/dist/components/d-runtime/index.js +6 -0
- package/dist/components/d-user/DUser.service.d.ts +21 -0
- package/dist/components/d-user/DUser.service.js +17 -0
- package/dist/components/d-user/DUser.view.d.ts +52 -0
- package/dist/components/d-user/DUser.view.js +100 -0
- package/dist/components/d-user/DUserMenu.d.ts +8 -0
- package/dist/components/d-user/DUserMenu.js +28 -0
- package/dist/components/d-user/index.d.ts +3 -0
- package/dist/components/d-user/index.js +17 -0
- package/dist/components/dialog/Dialog.d.ts +28 -0
- package/dist/components/dialog/Dialog.js +99 -0
- package/dist/components/file-tabs/FileTabs.d.ts +17 -0
- package/dist/components/file-tabs/FileTabs.js +71 -0
- package/dist/components/file-tabs/FileTabs.service.d.ts +13 -0
- package/dist/components/file-tabs/FileTabs.service.js +47 -0
- package/dist/components/file-tabs/FileTabs.view.d.ts +9 -0
- package/dist/components/file-tabs/FileTabs.view.js +1 -0
- package/dist/components/flex/Flex.d.ts +7 -0
- package/dist/components/flex/Flex.js +21 -0
- package/dist/components/form/CheckboxInput.d.ts +5 -0
- package/dist/components/form/CheckboxInput.js +67 -0
- package/dist/components/form/EmailInput.d.ts +8 -0
- package/dist/components/form/EmailInput.js +20 -0
- package/dist/components/form/Input.d.ts +22 -0
- package/dist/components/form/Input.js +153 -0
- package/dist/components/form/InputDescription.d.ts +5 -0
- package/dist/components/form/InputDescription.js +12 -0
- package/dist/components/form/InputLabel.d.ts +5 -0
- package/dist/components/form/InputLabel.js +12 -0
- package/dist/components/form/InputMessage.d.ts +5 -0
- package/dist/components/form/InputMessage.js +18 -0
- package/dist/components/form/InputSuggestion.d.ts +19 -0
- package/dist/components/form/InputSuggestion.js +102 -0
- package/dist/components/form/NumberInput.d.ts +6 -0
- package/dist/components/form/NumberInput.js +20 -0
- package/dist/components/form/PasswordInput.d.ts +8 -0
- package/dist/components/form/PasswordInput.js +18 -0
- package/dist/components/form/PinInput.d.ts +11 -0
- package/dist/components/form/PinInput.js +66 -0
- package/dist/components/form/RadioGroup.d.ts +5 -0
- package/dist/components/form/RadioGroup.js +48 -0
- package/dist/components/form/RadioInput.d.ts +7 -0
- package/dist/components/form/RadioInput.js +27 -0
- package/dist/components/form/SwitchInput.d.ts +6 -0
- package/dist/components/form/SwitchInput.js +19 -0
- package/dist/components/form/TextInput.d.ts +7 -0
- package/dist/components/form/TextInput.js +19 -0
- package/dist/components/form/index.d.ts +15 -0
- package/dist/components/form/index.js +37 -0
- package/dist/components/form/useForm.d.ts +25 -0
- package/dist/components/form/useForm.js +57 -0
- package/dist/components/menu/Menu.d.ts +27 -0
- package/dist/components/menu/Menu.js +104 -0
- package/dist/components/quote/Quote.d.ts +10 -0
- package/dist/components/quote/Quote.js +49 -0
- package/dist/components/row/Row.d.ts +6 -0
- package/dist/components/row/Row.js +21 -0
- package/dist/components/scroll-area/ScrollArea.d.ts +13 -0
- package/dist/components/scroll-area/ScrollArea.js +43 -0
- package/dist/components/segmented-control/SegmentedControl.d.ts +8 -0
- package/dist/components/segmented-control/SegmentedControl.js +24 -0
- package/dist/components/spacing/Spacing.d.ts +6 -0
- package/dist/components/spacing/Spacing.js +23 -0
- package/dist/components/tab/Tab.d.ts +11 -0
- package/dist/components/tab/Tab.js +40 -0
- package/dist/components/text/Text.d.ts +8 -0
- package/dist/components/text/Text.js +23 -0
- package/dist/components/tooltip/Tooltip.d.ts +13 -0
- package/dist/components/tooltip/Tooltip.js +48 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +226 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +21 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +14 -0
- package/dist/node_modules/react/compiler-runtime.js +10 -0
- package/dist/utils/arrayService.d.ts +10 -0
- package/dist/utils/arrayService.js +1 -0
- package/dist/utils/contextStore.d.ts +62 -0
- package/dist/utils/contextStore.js +60 -0
- package/dist/utils/generics.d.ts +17 -0
- package/dist/utils/generics.js +310 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +28 -0
- package/dist/utils/inspection.d.ts +13 -0
- package/dist/utils/inspection.js +4 -0
- package/dist/utils/nonReactiveArrayService.d.ts +19 -0
- package/dist/utils/nonReactiveArrayService.js +54 -0
- package/dist/utils/objectStore.d.ts +12 -0
- package/dist/utils/objectStore.js +34 -0
- package/dist/utils/reactiveArrayService.d.ts +22 -0
- package/dist/utils/reactiveArrayService.js +91 -0
- package/dist/utils/types.d.ts +57 -0
- package/dist/utils/types.js +4 -0
- package/dist/utils/utils.d.ts +68 -0
- package/dist/utils/utils.js +216 -0
- package/package.json +119 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
function r(t, e, i) {
|
|
2
|
+
return (e = u(e)) in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;
|
|
3
|
+
}
|
|
4
|
+
function u(t) {
|
|
5
|
+
var e = o(t, "string");
|
|
6
|
+
return typeof e == "symbol" ? e : e + "";
|
|
7
|
+
}
|
|
8
|
+
function o(t, e) {
|
|
9
|
+
if (typeof t != "object" || !t) return t;
|
|
10
|
+
var i = t[Symbol.toPrimitive];
|
|
11
|
+
if (i !== void 0) {
|
|
12
|
+
var s = i.call(t, e);
|
|
13
|
+
if (typeof s != "object") return s;
|
|
14
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
15
|
+
}
|
|
16
|
+
return (e === "string" ? String : Number)(t);
|
|
17
|
+
}
|
|
18
|
+
class n {
|
|
19
|
+
constructor(e) {
|
|
20
|
+
r(this, "_createdAt", void 0), r(this, "_id", void 0), r(this, "_memberRoles", void 0), r(this, "_namespace", void 0), r(this, "_roles", void 0), r(this, "_updatedAt", void 0), r(this, "_user", void 0), this._createdAt = e.createdAt, this._id = e.id, this._memberRoles = e.memberRoles, this._namespace = e.namespace, this._roles = e.roles, this._updatedAt = e.updatedAt, this._user = e.user;
|
|
21
|
+
}
|
|
22
|
+
get createdAt() {
|
|
23
|
+
return this._createdAt;
|
|
24
|
+
}
|
|
25
|
+
get id() {
|
|
26
|
+
return this._id;
|
|
27
|
+
}
|
|
28
|
+
get memberRoles() {
|
|
29
|
+
return this._memberRoles;
|
|
30
|
+
}
|
|
31
|
+
get namespace() {
|
|
32
|
+
return this._namespace;
|
|
33
|
+
}
|
|
34
|
+
get roles() {
|
|
35
|
+
return this._roles;
|
|
36
|
+
}
|
|
37
|
+
get updatedAt() {
|
|
38
|
+
return this._updatedAt;
|
|
39
|
+
}
|
|
40
|
+
get user() {
|
|
41
|
+
return this._user;
|
|
42
|
+
}
|
|
43
|
+
json() {
|
|
44
|
+
return {
|
|
45
|
+
createdAt: this._createdAt,
|
|
46
|
+
id: this._id,
|
|
47
|
+
memberRoles: this._memberRoles,
|
|
48
|
+
namespace: this._namespace,
|
|
49
|
+
roles: this._roles,
|
|
50
|
+
updatedAt: this._updatedAt,
|
|
51
|
+
user: this._user
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
n as DNamespaceMemberView
|
|
57
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NamespaceProject, NamespacesProjectsAssignRuntimesInput, NamespacesProjectsAssignRuntimesPayload, NamespacesProjectsCreateInput, NamespacesProjectsCreatePayload, NamespacesProjectsDeleteInput, NamespacesProjectsDeletePayload } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
+
import { DNamespaceProjectView } from './DNamespaceProject.view';
|
|
3
|
+
import { ReactiveArrayService } from '../../../utils/reactiveArrayService';
|
|
4
|
+
export declare abstract class DNamespaceProjectReactiveService extends ReactiveArrayService<DNamespaceProjectView> {
|
|
5
|
+
getById(id: NamespaceProject['id']): DNamespaceProjectView | undefined;
|
|
6
|
+
abstract projectAssignRuntimes(payload: NamespacesProjectsAssignRuntimesInput): Promise<NamespacesProjectsAssignRuntimesPayload | undefined>;
|
|
7
|
+
abstract projectCreate(payload: NamespacesProjectsCreateInput): Promise<NamespacesProjectsCreatePayload | undefined>;
|
|
8
|
+
abstract projectDelete(payload: NamespacesProjectsDeleteInput): Promise<NamespacesProjectsDeletePayload | undefined>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactiveArrayService as t } from "../../../utils/reactiveArrayService.js";
|
|
2
|
+
class c extends t {
|
|
3
|
+
//TODO: inject UI error handler for toasts
|
|
4
|
+
//inject: namespaceId because the runtimes query needs it
|
|
5
|
+
getById(e) {
|
|
6
|
+
return this.values().find((r) => r.id === e);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
c as DNamespaceProjectReactiveService
|
|
11
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Flow, FlowConnection, Maybe, Namespace, NamespaceProject, Runtime, RuntimeConnection, Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
+
export declare class DNamespaceProjectView {
|
|
3
|
+
/** Time when this NamespaceProject was created */
|
|
4
|
+
private readonly _createdAt?;
|
|
5
|
+
/** Description of the project */
|
|
6
|
+
private readonly _description?;
|
|
7
|
+
/** Fetches an flow given by its ID */
|
|
8
|
+
private readonly _flow?;
|
|
9
|
+
/** Fetches all flows in this project */
|
|
10
|
+
private readonly _flows?;
|
|
11
|
+
/** Global ID of this NamespaceProject */
|
|
12
|
+
private readonly _id?;
|
|
13
|
+
/** Name of the project */
|
|
14
|
+
private readonly _name?;
|
|
15
|
+
/** The namespace where this project belongs to */
|
|
16
|
+
private readonly _namespace?;
|
|
17
|
+
/** The primary runtime for the project */
|
|
18
|
+
private readonly _primaryRuntime?;
|
|
19
|
+
/** Runtimes assigned to this project */
|
|
20
|
+
private readonly _runtimes?;
|
|
21
|
+
/** Time when this NamespaceProject was last updated */
|
|
22
|
+
private readonly _updatedAt?;
|
|
23
|
+
constructor(payload: NamespaceProject);
|
|
24
|
+
get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
25
|
+
get description(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
26
|
+
get flow(): Maybe<Flow> | undefined;
|
|
27
|
+
get flows(): Maybe<FlowConnection> | undefined;
|
|
28
|
+
get id(): Maybe<Scalars["NamespaceProjectID"]["output"]> | undefined;
|
|
29
|
+
get name(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
30
|
+
get namespace(): Maybe<Namespace> | undefined;
|
|
31
|
+
get primaryRuntime(): Maybe<Runtime> | undefined;
|
|
32
|
+
get runtimes(): Maybe<RuntimeConnection> | undefined;
|
|
33
|
+
get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
34
|
+
json(): NamespaceProject;
|
|
35
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
function i(e, t, r) {
|
|
2
|
+
return (t = n(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
3
|
+
}
|
|
4
|
+
function n(e) {
|
|
5
|
+
var t = u(e, "string");
|
|
6
|
+
return typeof t == "symbol" ? t : t + "";
|
|
7
|
+
}
|
|
8
|
+
function u(e, t) {
|
|
9
|
+
if (typeof e != "object" || !e) return e;
|
|
10
|
+
var r = e[Symbol.toPrimitive];
|
|
11
|
+
if (r !== void 0) {
|
|
12
|
+
var s = r.call(e, t);
|
|
13
|
+
if (typeof s != "object") return s;
|
|
14
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
15
|
+
}
|
|
16
|
+
return (t === "string" ? String : Number)(e);
|
|
17
|
+
}
|
|
18
|
+
class o {
|
|
19
|
+
constructor(t) {
|
|
20
|
+
i(this, "_createdAt", void 0), i(this, "_description", void 0), i(this, "_flow", void 0), i(this, "_flows", void 0), i(this, "_id", void 0), i(this, "_name", void 0), i(this, "_namespace", void 0), i(this, "_primaryRuntime", void 0), i(this, "_runtimes", void 0), i(this, "_updatedAt", void 0), this._createdAt = t.createdAt, this._description = t.description, this._flow = t.flow, this._flows = t.flows, this._id = t.id, this._name = t.name, this._namespace = t.namespace, this._primaryRuntime = t.primaryRuntime, this._runtimes = t.runtimes, this._updatedAt = t.updatedAt;
|
|
21
|
+
}
|
|
22
|
+
get createdAt() {
|
|
23
|
+
return this._createdAt;
|
|
24
|
+
}
|
|
25
|
+
get description() {
|
|
26
|
+
return this._description;
|
|
27
|
+
}
|
|
28
|
+
get flow() {
|
|
29
|
+
return this._flow;
|
|
30
|
+
}
|
|
31
|
+
get flows() {
|
|
32
|
+
return this._flows;
|
|
33
|
+
}
|
|
34
|
+
get id() {
|
|
35
|
+
return this._id;
|
|
36
|
+
}
|
|
37
|
+
get name() {
|
|
38
|
+
return this._name;
|
|
39
|
+
}
|
|
40
|
+
get namespace() {
|
|
41
|
+
return this._namespace;
|
|
42
|
+
}
|
|
43
|
+
get primaryRuntime() {
|
|
44
|
+
return this._primaryRuntime;
|
|
45
|
+
}
|
|
46
|
+
get runtimes() {
|
|
47
|
+
return this._runtimes;
|
|
48
|
+
}
|
|
49
|
+
get updatedAt() {
|
|
50
|
+
return this._updatedAt;
|
|
51
|
+
}
|
|
52
|
+
json() {
|
|
53
|
+
return {
|
|
54
|
+
createdAt: this._createdAt,
|
|
55
|
+
description: this._description,
|
|
56
|
+
flow: this._flow,
|
|
57
|
+
flows: this._flows,
|
|
58
|
+
id: this._id,
|
|
59
|
+
name: this._name,
|
|
60
|
+
namespace: this._namespace,
|
|
61
|
+
primaryRuntime: this._primaryRuntime,
|
|
62
|
+
runtimes: this._runtimes,
|
|
63
|
+
updatedAt: this._updatedAt
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
o as DNamespaceProjectView
|
|
69
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Code0Component } from '../../../utils/types';
|
|
3
|
+
import { Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
+
export interface DNamespaceProjectCardProps extends Code0Component<HTMLDivElement> {
|
|
5
|
+
projectId: Scalars['NamespaceProjectID']['output'];
|
|
6
|
+
onSettingsClick?: (projectId: Scalars['NamespaceProjectID']['output']) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const DNamespaceProjectCard: React.FC<DNamespaceProjectCardProps>;
|
|
9
|
+
export default DNamespaceProjectCard;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import C from "react";
|
|
3
|
+
import { Card as w } from "../../card/Card.js";
|
|
4
|
+
import { Text as t } from "../../text/Text.js";
|
|
5
|
+
import { IconSettings as k, IconGitFork as B, IconServer as b, IconServer2 as D } from "@tabler/icons-react";
|
|
6
|
+
import { useStore as o, useService as c } from "../../../utils/contextStore.js";
|
|
7
|
+
import { DNamespaceProjectReactiveService as d } from "./DNamespaceProject.service.js";
|
|
8
|
+
import { Flex as n } from "../../flex/Flex.js";
|
|
9
|
+
import { Button as N } from "../../button/Button.js";
|
|
10
|
+
import $ from "../../card/CardSection.js";
|
|
11
|
+
import { Badge as s } from "../../badge/Badge.js";
|
|
12
|
+
import { DNamespaceReactiveService as u } from "../DNamespace.service.js";
|
|
13
|
+
import { DRuntimeReactiveService as f } from "../../d-runtime/DRuntime.service.js";
|
|
14
|
+
const O = (m) => {
|
|
15
|
+
const {
|
|
16
|
+
projectId: h,
|
|
17
|
+
onSettingsClick: y = (F) => {
|
|
18
|
+
}
|
|
19
|
+
} = m, g = o(d), S = c(d), v = o(u), x = c(u), j = o(f), z = c(f), r = S.getById(h);
|
|
20
|
+
if (!r?.namespace?.id || !r?.primaryRuntime?.id) return;
|
|
21
|
+
const I = x.getById(r?.namespace?.id), R = z.getById(r?.primaryRuntime?.id), a = r?.flows?.count, l = I?.runtimes?.count, p = R?.name;
|
|
22
|
+
return C.useMemo(() => /* @__PURE__ */ i(w, { maw: "400px", children: [
|
|
23
|
+
/* @__PURE__ */ i(n, { align: "center", style: {
|
|
24
|
+
gap: "0.7rem"
|
|
25
|
+
}, justify: "space-between", children: [
|
|
26
|
+
/* @__PURE__ */ e(t, { size: "lg", hierarchy: "primary", display: "block", children: r?.name }),
|
|
27
|
+
/* @__PURE__ */ e(n, { align: "center", style: {
|
|
28
|
+
gap: "0.35rem"
|
|
29
|
+
}, children: /* @__PURE__ */ i(N, { color: "secondary", onClick: () => y(m.projectId), children: [
|
|
30
|
+
/* @__PURE__ */ e(k, { size: 16 }),
|
|
31
|
+
"Settings"
|
|
32
|
+
] }) })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ e(t, { size: "sm", hierarchy: "tertiary", display: "block", children: r?.description }),
|
|
35
|
+
/* @__PURE__ */ e($, { border: !0, children: /* @__PURE__ */ i(n, { align: "center", style: {
|
|
36
|
+
gap: "0.35rem",
|
|
37
|
+
flexWrap: "wrap"
|
|
38
|
+
}, children: [
|
|
39
|
+
/* @__PURE__ */ i(s, { color: "info", children: [
|
|
40
|
+
/* @__PURE__ */ e(B, { size: 18 }),
|
|
41
|
+
/* @__PURE__ */ e(t, { size: "xs", children: `${a ?? 0} flow${(a ?? 0) !== 1 ? "s" : ""}` })
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ i(s, { color: "info", children: [
|
|
44
|
+
/* @__PURE__ */ e(b, { size: 18 }),
|
|
45
|
+
/* @__PURE__ */ e(t, { size: "xs", children: `${l ?? 0} runtime${(l ?? 0) !== 1 ? "s" : ""}` })
|
|
46
|
+
] }),
|
|
47
|
+
p && /* @__PURE__ */ i(s, { color: "info", children: [
|
|
48
|
+
/* @__PURE__ */ e(D, { size: 18 }),
|
|
49
|
+
/* @__PURE__ */ e(t, { size: "xs", hierarchy: "tertiary", children: "Assigned:" }),
|
|
50
|
+
/* @__PURE__ */ e(t, { size: "xs", children: p })
|
|
51
|
+
] })
|
|
52
|
+
] }) })
|
|
53
|
+
] }), [g, v, j]);
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
O as default
|
|
57
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MenuProps } from '../../menu/Menu';
|
|
3
|
+
import { Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
+
export interface DNamespaceProjectMenuProps extends MenuProps {
|
|
5
|
+
projectId: Scalars['NamespaceProjectID']['output'];
|
|
6
|
+
onProjectSelect: (id: Scalars['NamespaceProjectID']['output']) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const DNamespaceProjectMenu: React.FC<DNamespaceProjectMenuProps>;
|
|
9
|
+
export default DNamespaceProjectMenu;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import s from "react";
|
|
3
|
+
import { Menu as u, MenuTrigger as d, MenuPortal as l, MenuContent as f, MenuItem as p } from "../../menu/Menu.js";
|
|
4
|
+
import { DNamespaceProjectReactiveService as o } from "./DNamespaceProject.service.js";
|
|
5
|
+
import { useService as c } from "../../../utils/contextStore.js";
|
|
6
|
+
import { Button as h } from "../../button/Button.js";
|
|
7
|
+
const x = (t) => {
|
|
8
|
+
const n = c(o), i = c(o), a = n.getById(t.projectId);
|
|
9
|
+
return s.useMemo(() => /* @__PURE__ */ m(u, { ...t, children: [
|
|
10
|
+
/* @__PURE__ */ e(d, { asChild: !0, children: /* @__PURE__ */ e(h, { variant: "none", style: {
|
|
11
|
+
background: "transparent"
|
|
12
|
+
}, children: a?.name }) }),
|
|
13
|
+
/* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(f, { side: "bottom", align: "start", sideOffset: 0, children: n.values().map((r) => /* @__PURE__ */ e(p, { onSelect: () => t.onProjectSelect(r.id), children: r.name }, r.id)) }) })
|
|
14
|
+
] }), [i]);
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
x as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactiveArrayService } from '../../../utils/reactiveArrayService';
|
|
2
|
+
import { DNamespaceRoleView } from './DNamespaceRole.view';
|
|
3
|
+
import { NamespaceRole, NamespacesRolesAssignAbilitiesInput, NamespacesRolesAssignAbilitiesPayload, NamespacesRolesAssignProjectsInput, NamespacesRolesAssignProjectsPayload, NamespacesRolesCreateInput, NamespacesRolesCreatePayload, NamespacesRolesDeleteInput, NamespacesRolesDeletePayload } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
+
export declare abstract class DNamespaceRoleReactiveService extends ReactiveArrayService<DNamespaceRoleView> {
|
|
5
|
+
getById(id: NamespaceRole['id']): DNamespaceRoleView | undefined;
|
|
6
|
+
abstract roleAssignAbilities(payload: NamespacesRolesAssignAbilitiesInput): Promise<NamespacesRolesAssignAbilitiesPayload | undefined>;
|
|
7
|
+
abstract roleAssignProject(payload: NamespacesRolesAssignProjectsInput): Promise<NamespacesRolesAssignProjectsPayload | undefined>;
|
|
8
|
+
abstract roleCreate(payload: NamespacesRolesCreateInput): Promise<NamespacesRolesCreatePayload | undefined>;
|
|
9
|
+
abstract roleDelete(payload: NamespacesRolesDeleteInput): Promise<NamespacesRolesDeletePayload | undefined>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactiveArrayService as i } from "../../../utils/reactiveArrayService.js";
|
|
2
|
+
class c extends i {
|
|
3
|
+
//TODO: inject UI error handler for toasts
|
|
4
|
+
//inject: namespaceId because the runtimes query needs it
|
|
5
|
+
getById(e) {
|
|
6
|
+
return this.values().find((r) => r.id === e);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
c as DNamespaceRoleReactiveService
|
|
11
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Maybe, Namespace, NamespaceProjectConnection, NamespaceRole, NamespaceRoleAbility, Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
+
export declare class DNamespaceRoleView {
|
|
3
|
+
/** The abilities the role is granted */
|
|
4
|
+
private readonly _abilities?;
|
|
5
|
+
/** The projects this role is assigned to */
|
|
6
|
+
private readonly _assignedProjects?;
|
|
7
|
+
/** Time when this NamespaceRole was created */
|
|
8
|
+
private readonly _createdAt?;
|
|
9
|
+
/** Global ID of this NamespaceRole */
|
|
10
|
+
private readonly _id?;
|
|
11
|
+
/** The name of this role */
|
|
12
|
+
private readonly _name?;
|
|
13
|
+
/** The namespace where this role belongs to */
|
|
14
|
+
private readonly _namespace?;
|
|
15
|
+
/** Time when this NamespaceRole was last updated */
|
|
16
|
+
private readonly _updatedAt?;
|
|
17
|
+
constructor(payload: NamespaceRole);
|
|
18
|
+
get abilities(): Maybe<Array<NamespaceRoleAbility>> | undefined;
|
|
19
|
+
get assignedProjects(): Maybe<NamespaceProjectConnection> | undefined;
|
|
20
|
+
get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
21
|
+
get id(): Maybe<Scalars["NamespaceRoleID"]["output"]> | undefined;
|
|
22
|
+
get name(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
23
|
+
get namespace(): Maybe<Namespace> | undefined;
|
|
24
|
+
get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
25
|
+
json(): NamespaceRole;
|
|
26
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
function i(t, e, s) {
|
|
2
|
+
return (e = n(e)) in t ? Object.defineProperty(t, e, { value: s, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = s, t;
|
|
3
|
+
}
|
|
4
|
+
function n(t) {
|
|
5
|
+
var e = a(t, "string");
|
|
6
|
+
return typeof e == "symbol" ? e : e + "";
|
|
7
|
+
}
|
|
8
|
+
function a(t, e) {
|
|
9
|
+
if (typeof t != "object" || !t) return t;
|
|
10
|
+
var s = t[Symbol.toPrimitive];
|
|
11
|
+
if (s !== void 0) {
|
|
12
|
+
var r = s.call(t, e);
|
|
13
|
+
if (typeof r != "object") return r;
|
|
14
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
15
|
+
}
|
|
16
|
+
return (e === "string" ? String : Number)(t);
|
|
17
|
+
}
|
|
18
|
+
class d {
|
|
19
|
+
constructor(e) {
|
|
20
|
+
i(this, "_abilities", void 0), i(this, "_assignedProjects", void 0), i(this, "_createdAt", void 0), i(this, "_id", void 0), i(this, "_name", void 0), i(this, "_namespace", void 0), i(this, "_updatedAt", void 0), this._abilities = e.abilities, this._assignedProjects = e.assignedProjects, this._createdAt = e.createdAt, this._id = e.id, this._name = e.name, this._namespace = e.namespace, this._updatedAt = e.updatedAt;
|
|
21
|
+
}
|
|
22
|
+
get abilities() {
|
|
23
|
+
return this._abilities;
|
|
24
|
+
}
|
|
25
|
+
get assignedProjects() {
|
|
26
|
+
return this._assignedProjects;
|
|
27
|
+
}
|
|
28
|
+
get createdAt() {
|
|
29
|
+
return this._createdAt;
|
|
30
|
+
}
|
|
31
|
+
get id() {
|
|
32
|
+
return this._id;
|
|
33
|
+
}
|
|
34
|
+
get name() {
|
|
35
|
+
return this._name;
|
|
36
|
+
}
|
|
37
|
+
get namespace() {
|
|
38
|
+
return this._namespace;
|
|
39
|
+
}
|
|
40
|
+
get updatedAt() {
|
|
41
|
+
return this._updatedAt;
|
|
42
|
+
}
|
|
43
|
+
json() {
|
|
44
|
+
return {
|
|
45
|
+
abilities: this._abilities,
|
|
46
|
+
assignedProjects: this._assignedProjects,
|
|
47
|
+
createdAt: this._createdAt,
|
|
48
|
+
id: this._id,
|
|
49
|
+
name: this._name,
|
|
50
|
+
namespace: this._namespace,
|
|
51
|
+
updatedAt: this._updatedAt
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
d as DNamespaceRoleView
|
|
57
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactiveArrayService } from '../../utils/reactiveArrayService';
|
|
2
|
+
import { DOrganizationView } from './DOrganization.view';
|
|
3
|
+
import { OrganizationsCreateInput, OrganizationsCreatePayload, OrganizationsDeleteInput, OrganizationsDeletePayload, Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
+
export declare abstract class DOrganizationReactiveService extends ReactiveArrayService<DOrganizationView> {
|
|
5
|
+
getById(id: Scalars["OrganizationID"]["input"]): DOrganizationView | undefined;
|
|
6
|
+
abstract organizationCreate(payload: OrganizationsCreateInput): Promise<OrganizationsCreatePayload | undefined>;
|
|
7
|
+
abstract organizationDelete(payload: OrganizationsDeleteInput): Promise<OrganizationsDeletePayload | undefined>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactiveArrayService as r } from "../../utils/reactiveArrayService.js";
|
|
2
|
+
class c extends r {
|
|
3
|
+
//TODO: inject UI error handler for toasts
|
|
4
|
+
//no id's need to be injected here because the root query has a organizations field
|
|
5
|
+
getById(e) {
|
|
6
|
+
return this.values().find((i) => i.id === e);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
c as DOrganizationReactiveService
|
|
11
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Maybe, Namespace, Organization, Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
+
export declare class DOrganizationView {
|
|
3
|
+
private readonly _createdAt?;
|
|
4
|
+
/** Global ID of this Organization */
|
|
5
|
+
private readonly _id?;
|
|
6
|
+
/** Name of the organization */
|
|
7
|
+
private _name?;
|
|
8
|
+
/** Namespace of this organization */
|
|
9
|
+
private readonly _namespace?;
|
|
10
|
+
/** Time when this Organization was last updated */
|
|
11
|
+
private readonly _updatedAt?;
|
|
12
|
+
constructor(payload: Organization);
|
|
13
|
+
get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
14
|
+
get id(): Maybe<Scalars["OrganizationID"]["output"] | undefined>;
|
|
15
|
+
get name(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
16
|
+
get namespace(): Maybe<Namespace> | undefined;
|
|
17
|
+
get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
18
|
+
set name(value: Maybe<Scalars["String"]["output"]>);
|
|
19
|
+
json(): Organization;
|
|
20
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
function r(e, t, i) {
|
|
2
|
+
return (t = a(t)) in e ? Object.defineProperty(e, t, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = i, e;
|
|
3
|
+
}
|
|
4
|
+
function a(e) {
|
|
5
|
+
var t = s(e, "string");
|
|
6
|
+
return typeof t == "symbol" ? t : t + "";
|
|
7
|
+
}
|
|
8
|
+
function s(e, t) {
|
|
9
|
+
if (typeof e != "object" || !e) return e;
|
|
10
|
+
var i = e[Symbol.toPrimitive];
|
|
11
|
+
if (i !== void 0) {
|
|
12
|
+
var n = i.call(e, t);
|
|
13
|
+
if (typeof n != "object") return n;
|
|
14
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
15
|
+
}
|
|
16
|
+
return (t === "string" ? String : Number)(e);
|
|
17
|
+
}
|
|
18
|
+
class d {
|
|
19
|
+
constructor(t) {
|
|
20
|
+
r(this, "_createdAt", void 0), r(this, "_id", void 0), r(this, "_name", void 0), r(this, "_namespace", void 0), r(this, "_updatedAt", void 0), this._createdAt = t.createdAt, this._id = t.id, this._name = t.name, this._namespace = t.namespace, this._updatedAt = t.updatedAt;
|
|
21
|
+
}
|
|
22
|
+
get createdAt() {
|
|
23
|
+
return this._createdAt;
|
|
24
|
+
}
|
|
25
|
+
get id() {
|
|
26
|
+
return this._id;
|
|
27
|
+
}
|
|
28
|
+
get name() {
|
|
29
|
+
return this._name;
|
|
30
|
+
}
|
|
31
|
+
get namespace() {
|
|
32
|
+
return this._namespace;
|
|
33
|
+
}
|
|
34
|
+
get updatedAt() {
|
|
35
|
+
return this._updatedAt;
|
|
36
|
+
}
|
|
37
|
+
set name(t) {
|
|
38
|
+
this._name = t;
|
|
39
|
+
}
|
|
40
|
+
json() {
|
|
41
|
+
return {
|
|
42
|
+
createdAt: this._createdAt,
|
|
43
|
+
id: this._id,
|
|
44
|
+
name: this._name,
|
|
45
|
+
namespace: this._namespace,
|
|
46
|
+
updatedAt: this._updatedAt
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
d as DOrganizationView
|
|
52
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Code0Component } from '../../utils/types';
|
|
3
|
+
import { Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
+
export interface DOrganizationCardProps extends Code0Component<HTMLDivElement> {
|
|
5
|
+
organizationId: Scalars['OrganizationID']['output'];
|
|
6
|
+
onSettingsClick?: (organizationId: Scalars['OrganizationID']['output']) => void;
|
|
7
|
+
onLeaveClick?: (organizationId: Scalars['OrganizationID']['output']) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const DOrganizationCard: React.FC<DOrganizationCardProps>;
|
|
10
|
+
export default DOrganizationCard;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import j from "react";
|
|
3
|
+
import { Card as k } from "../card/Card.js";
|
|
4
|
+
import { Text as i } from "../text/Text.js";
|
|
5
|
+
import { useStore as t, useService as c } from "../../utils/contextStore.js";
|
|
6
|
+
import { DOrganizationReactiveService as f } from "./DOrganization.service.js";
|
|
7
|
+
import { IconSettings as $, IconLogout as B, IconFolder as D, IconUser as L, IconServer as R } from "@tabler/icons-react";
|
|
8
|
+
import { Badge as s } from "../badge/Badge.js";
|
|
9
|
+
import { Flex as a } from "../flex/Flex.js";
|
|
10
|
+
import { Button as u } from "../button/Button.js";
|
|
11
|
+
import w from "../card/CardSection.js";
|
|
12
|
+
import { DNamespaceReactiveService as g } from "../d-namespace/DNamespace.service.js";
|
|
13
|
+
import { DNamespaceLicenseReactiveService as h } from "../d-namespace/license/DNamespaceLicense.service.js";
|
|
14
|
+
const K = (z) => {
|
|
15
|
+
const {
|
|
16
|
+
organizationId: n,
|
|
17
|
+
onSettingsClick: S = () => {
|
|
18
|
+
},
|
|
19
|
+
onLeaveClick: y = () => {
|
|
20
|
+
}
|
|
21
|
+
} = z, v = t(f), x = c(f), C = t(g), I = c(g), b = t(h);
|
|
22
|
+
c(h);
|
|
23
|
+
const o = x.getById(n);
|
|
24
|
+
if (!o?.namespace?.id) return;
|
|
25
|
+
const m = I.getById(o?.namespace?.id), l = o?.namespace?.projects?.count, p = m?.members?.count, d = m?.runtimes?.count;
|
|
26
|
+
return j.useMemo(() => /* @__PURE__ */ r(k, { maw: "400px", children: [
|
|
27
|
+
/* @__PURE__ */ r(a, { align: "center", style: {
|
|
28
|
+
gap: "0.7rem"
|
|
29
|
+
}, justify: "space-between", children: [
|
|
30
|
+
/* @__PURE__ */ e(i, { size: "lg", hierarchy: "primary", display: "block", children: o?.name }),
|
|
31
|
+
/* @__PURE__ */ r(a, { align: "center", style: {
|
|
32
|
+
gap: "0.35rem"
|
|
33
|
+
}, children: [
|
|
34
|
+
/* @__PURE__ */ e(u, { color: "secondary", onClick: () => S(n), children: /* @__PURE__ */ e($, { size: 16 }) }),
|
|
35
|
+
/* @__PURE__ */ r(u, { color: "error", onClick: () => y(n), children: [
|
|
36
|
+
/* @__PURE__ */ e(B, { size: 16 }),
|
|
37
|
+
" Leave"
|
|
38
|
+
] })
|
|
39
|
+
] })
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ e(i, { size: "sm", hierarchy: "tertiary", display: "block", children: o?.name }),
|
|
42
|
+
/* @__PURE__ */ e(w, { border: !0, children: /* @__PURE__ */ r(a, { align: "center", style: {
|
|
43
|
+
gap: "0.35rem",
|
|
44
|
+
flexWrap: "wrap"
|
|
45
|
+
}, children: [
|
|
46
|
+
/* @__PURE__ */ r(s, { color: "info", children: [
|
|
47
|
+
/* @__PURE__ */ e(D, { size: 18 }),
|
|
48
|
+
/* @__PURE__ */ e(i, { size: "xs", children: `${l ?? 0} project${(l ?? 0) !== 1 ? "s" : ""}` })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ r(s, { color: "info", children: [
|
|
51
|
+
/* @__PURE__ */ e(L, { size: 18 }),
|
|
52
|
+
/* @__PURE__ */ e(i, { size: "xs", children: `${p ?? 0} member${(p ?? 0) !== 1 ? "s" : ""}` })
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ r(s, { color: "info", children: [
|
|
55
|
+
/* @__PURE__ */ e(R, { size: 18 }),
|
|
56
|
+
/* @__PURE__ */ e(i, { size: "xs", children: `${d ?? 0} runtime${(d ?? 0) !== 1 ? "s" : ""}` })
|
|
57
|
+
] })
|
|
58
|
+
] }) })
|
|
59
|
+
] }), [v, C, b]);
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
K as default
|
|
63
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { MenuProps } from '../menu/Menu';
|
|
3
|
+
import { Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
+
export interface DOrganizationMenuProps extends MenuProps {
|
|
5
|
+
organizationId: Scalars["OrganizationID"]["input"];
|
|
6
|
+
onOrganizationSelect: (id: Scalars["OrganizationID"]["input"]) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const DOrganizationMenu: React.FC<DOrganizationMenuProps>;
|
|
9
|
+
export default DOrganizationMenu;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import s from "react";
|
|
3
|
+
import { Menu as u, MenuTrigger as d, MenuPortal as l, MenuContent as g, MenuItem as f } from "../menu/Menu.js";
|
|
4
|
+
import { Button as h } from "../button/Button.js";
|
|
5
|
+
import { DOrganizationReactiveService as i } from "./DOrganization.service.js";
|
|
6
|
+
import { useService as o } from "../../utils/contextStore.js";
|
|
7
|
+
const x = (n) => {
|
|
8
|
+
const r = o(i), a = o(i), c = r.getById(n.organizationId);
|
|
9
|
+
return s.useMemo(() => /* @__PURE__ */ m(u, { ...n, children: [
|
|
10
|
+
/* @__PURE__ */ e(d, { asChild: !0, children: /* @__PURE__ */ e(h, { variant: "none", style: {
|
|
11
|
+
background: "transparent"
|
|
12
|
+
}, children: c?.name }) }),
|
|
13
|
+
/* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(g, { side: "bottom", align: "start", sideOffset: 0, children: r.values().map((t) => /* @__PURE__ */ e(f, { onSelect: () => n.onOrganizationSelect(t.id), children: t.name }, t.id)) }) })
|
|
14
|
+
] }), [a]);
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
x as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DOrganizationReactiveService as D } from "./DOrganization.service.js";
|
|
2
|
+
import { DOrganizationView as w } from "./DOrganization.view.js";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
|
+
import "react";
|
|
5
|
+
import "../../_virtual/compiler-runtime.js";
|
|
6
|
+
import '../../assets/components/menu/Menu.style.css';import '../../assets/components/flex/Flex.style.css';import '../../assets/components/badge/Badge.style.css';import '../../assets/components/text/Text.style.css';import '../../assets/components/card/Card.style.css';/* empty css */
|
|
7
|
+
import "merge-props";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import "../../utils/contextStore.js";
|
|
10
|
+
import "@tabler/icons-react";
|
|
11
|
+
/* empty css */
|
|
12
|
+
/* empty css */
|
|
13
|
+
import "../button/Button.js";
|
|
14
|
+
/* empty css */
|
|
15
|
+
import "@radix-ui/react-dropdown-menu";
|
|
16
|
+
export {
|
|
17
|
+
D as DOrganizationReactiveService,
|
|
18
|
+
w as DOrganizationView
|
|
19
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Code0ComponentProps } from '../../utils/types';
|
|
2
|
+
import { PanelGroupProps, PanelProps, PanelResizeHandleProps } from 'react-resizable-panels';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
type DResizablePanelGroupProps = Code0ComponentProps & PanelGroupProps;
|
|
5
|
+
type DResizablePanelProps = Code0ComponentProps & PanelProps;
|
|
6
|
+
type DResizableHandleProps = Code0ComponentProps & PanelResizeHandleProps;
|
|
7
|
+
export declare const DResizablePanelGroup: React.FC<DResizablePanelGroupProps>;
|
|
8
|
+
export declare const DResizablePanel: React.FC<DResizablePanelProps>;
|
|
9
|
+
export declare const DResizableHandle: React.FC<DResizableHandleProps>;
|
|
10
|
+
export {};
|