@gravitee/graphene-policy-studio 1.0.0-alpha.3 → 1.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/components/ElCheatSheetTrigger/ElCheatSheetTrigger.d.ts +2 -0
  2. package/dist/components/ElCheatSheetTrigger/ElCheatSheetTrigger.d.ts.map +1 -0
  3. package/dist/components/ElCheatSheetTrigger/index.d.ts +2 -0
  4. package/dist/components/ElCheatSheetTrigger/index.d.ts.map +1 -0
  5. package/dist/components/FlowForm/AddFlowSheet.d.ts +9 -0
  6. package/dist/components/FlowForm/AddFlowSheet.d.ts.map +1 -0
  7. package/dist/components/FlowForm/EditFlowSheet.d.ts +9 -0
  8. package/dist/components/FlowForm/EditFlowSheet.d.ts.map +1 -0
  9. package/dist/components/FlowForm/FlowForm.d.ts +15 -0
  10. package/dist/components/FlowForm/FlowForm.d.ts.map +1 -0
  11. package/dist/components/FlowForm/fields/ConditionField.d.ts +5 -0
  12. package/dist/components/FlowForm/fields/ConditionField.d.ts.map +1 -0
  13. package/dist/components/FlowForm/fields/HttpFields.d.ts +8 -0
  14. package/dist/components/FlowForm/fields/HttpFields.d.ts.map +1 -0
  15. package/dist/components/FlowForm/fields/McpFields.d.ts +6 -0
  16. package/dist/components/FlowForm/fields/McpFields.d.ts.map +1 -0
  17. package/dist/components/FlowForm/fields/MessageFields.d.ts +9 -0
  18. package/dist/components/FlowForm/fields/MessageFields.d.ts.map +1 -0
  19. package/dist/components/FlowForm/fields/NameField.d.ts +7 -0
  20. package/dist/components/FlowForm/fields/NameField.d.ts.map +1 -0
  21. package/dist/components/FlowForm/flow-form-schema.d.ts +36 -0
  22. package/dist/components/FlowForm/flow-form-schema.d.ts.map +1 -0
  23. package/dist/components/FlowForm/index.d.ts +7 -0
  24. package/dist/components/FlowForm/index.d.ts.map +1 -0
  25. package/dist/components/PolicyStudio/PolicyStudio.d.ts.map +1 -1
  26. package/dist/index.d.ts +2 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +5090 -270
  29. package/dist/lib/flow-form.d.ts +47 -0
  30. package/dist/lib/flow-form.d.ts.map +1 -0
  31. package/dist/lib/index.d.ts +2 -0
  32. package/dist/lib/index.d.ts.map +1 -1
  33. package/package.json +5 -2
@@ -0,0 +1,2 @@
1
+ export declare function ElCheatSheetTrigger(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=ElCheatSheetTrigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElCheatSheetTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/ElCheatSheetTrigger/ElCheatSheetTrigger.tsx"],"names":[],"mappings":"AAeA,wBAAgB,mBAAmB,4CAmDlC"}
@@ -0,0 +1,2 @@
1
+ export { ElCheatSheetTrigger } from './ElCheatSheetTrigger';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ElCheatSheetTrigger/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FlowGroupVM, FlowVM } from '../../types';
2
+ export interface AddFlowSheetProps {
3
+ readonly open: boolean;
4
+ readonly onOpenChange: (open: boolean) => void;
5
+ readonly onAdd: (flow: FlowVM) => void;
6
+ readonly group: FlowGroupVM;
7
+ }
8
+ export declare function AddFlowSheet({ open, onOpenChange, onAdd, group }: AddFlowSheetProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=AddFlowSheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddFlowSheet.d.ts","sourceRoot":"","sources":["../../../src/components/FlowForm/AddFlowSheet.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIvD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B;AAED,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,iBAAiB,2CAqCnF"}
@@ -0,0 +1,9 @@
1
+ import { FlowVM } from '../../types';
2
+ export interface EditFlowSheetProps {
3
+ readonly flow: FlowVM | null;
4
+ readonly open: boolean;
5
+ readonly onOpenChange: (open: boolean) => void;
6
+ readonly onSave: (updated: FlowVM) => void;
7
+ }
8
+ export declare function EditFlowSheet({ flow, open, onOpenChange, onSave }: EditFlowSheetProps): import("react/jsx-runtime").JSX.Element | null;
9
+ //# sourceMappingURL=EditFlowSheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditFlowSheet.d.ts","sourceRoot":"","sources":["../../../src/components/FlowForm/EditFlowSheet.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAI1C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,kBAAkB,kDAyFrF"}
@@ -0,0 +1,15 @@
1
+ import { FlowFormValues } from '../../lib/flow-form';
2
+ import { ApiType, ConnectorInfo } from '../../types';
3
+ import { FormValues } from './flow-form-schema';
4
+ export interface FlowFormProps {
5
+ readonly apiType: ApiType;
6
+ readonly mode: 'create' | 'edit';
7
+ readonly defaultValues?: Partial<FlowFormValues>;
8
+ readonly onSubmit: (values: FormValues) => void | Promise<void>;
9
+ readonly onCancel: () => void;
10
+ readonly onDirtyChange?: (isDirty: boolean) => void;
11
+ readonly externalError?: string;
12
+ readonly entrypointsInfo?: readonly ConnectorInfo[];
13
+ }
14
+ export declare function FlowForm({ apiType, mode, defaultValues, onSubmit, onCancel, onDirtyChange, externalError, entrypointsInfo, }: FlowFormProps): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=FlowForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlowForm.d.ts","sourceRoot":"","sources":["../../../src/components/FlowForm/FlowForm.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACjC,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACjD,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACpD,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;CACrD;AAQD,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,aAAa,EACb,eAAoB,GACrB,EAAE,aAAa,2CAkEf"}
@@ -0,0 +1,5 @@
1
+ import { UseFormRegisterReturn } from 'react-hook-form';
2
+ export declare function ConditionField({ registration }: {
3
+ readonly registration: UseFormRegisterReturn<'condition'>;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=ConditionField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConditionField.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowForm/fields/ConditionField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAG7D,wBAAgB,cAAc,CAAC,EAAE,YAAY,EAAE,EAAE;IAAE,QAAQ,CAAC,YAAY,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAA;CAAE,2CAiB7G"}
@@ -0,0 +1,8 @@
1
+ import { Control, FieldErrors, UseFormRegisterReturn } from 'react-hook-form';
2
+ import { FormValues } from '../flow-form-schema';
3
+ export declare function HttpFields({ control, errors, pathRegistration, }: {
4
+ readonly control: Control<FormValues>;
5
+ readonly errors: FieldErrors<FormValues>;
6
+ readonly pathRegistration: UseFormRegisterReturn<'path'>;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=HttpFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpFields.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowForm/fields/HttpFields.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAGnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,MAAM,EACN,gBAAgB,GACjB,EAAE;IACD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IACzC,QAAQ,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;CAC1D,2CAoFA"}
@@ -0,0 +1,6 @@
1
+ import { Control } from 'react-hook-form';
2
+ import { FormValues } from '../flow-form-schema';
3
+ export declare function McpFields({ control }: {
4
+ readonly control: Control<FormValues>;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=McpFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"McpFields.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowForm/fields/McpFields.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAOtD,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;CAAE,2CAkD/E"}
@@ -0,0 +1,9 @@
1
+ import { Control, FieldErrors, UseFormRegisterReturn } from 'react-hook-form';
2
+ import { FormValues } from '../flow-form-schema';
3
+ export declare function MessageFields({ control, errors, channelRegistration, availableEntrypoints, }: {
4
+ readonly control: Control<FormValues>;
5
+ readonly errors: FieldErrors<FormValues>;
6
+ readonly channelRegistration: UseFormRegisterReturn<'channel'>;
7
+ readonly availableEntrypoints: readonly string[];
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=MessageFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageFields.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowForm/fields/MessageFields.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,MAAM,EACN,mBAAmB,EACnB,oBAAoB,GACrB,EAAE;IACD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IACzC,QAAQ,CAAC,mBAAmB,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;IAC/D,QAAQ,CAAC,oBAAoB,EAAE,SAAS,MAAM,EAAE,CAAC;CAClD,2CAsIA"}
@@ -0,0 +1,7 @@
1
+ import { UseFormRegisterReturn } from 'react-hook-form';
2
+ import { ApiType } from '../../../types';
3
+ export declare function NameField({ apiType, registration, }: {
4
+ readonly apiType: ApiType;
5
+ readonly registration: UseFormRegisterReturn<'name'>;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=NameField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NameField.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowForm/fields/NameField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAc9C,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,YAAY,GACb,EAAE;IACD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;CACtD,2CAiBA"}
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema for the flow form. Used with react-hook-form's zodResolver.
4
+ *
5
+ * This schema is intentionally loose — it serves as the RHF type bridge,
6
+ * not as a business validator. Domain-level normalization and constraints
7
+ * (e.g. path defaults to "/", empty methods ⇒ ALL) live in
8
+ * `buildSelectors` / `extractFormValues` in `lib/flow-form.ts`.
9
+ *
10
+ * react-hook-form requires mutable arrays, so this schema produces a
11
+ * mutable type internally. The public API still uses the readonly
12
+ * `FlowFormValues` from lib/flow-form.
13
+ */
14
+ export declare const flowFormSchema: z.ZodObject<{
15
+ name: z.ZodString;
16
+ pathOperator: z.ZodEnum<{
17
+ EQUALS: "EQUALS";
18
+ STARTS_WITH: "STARTS_WITH";
19
+ }>;
20
+ path: z.ZodString;
21
+ httpMethods: z.ZodArray<z.ZodString>;
22
+ channelOperator: z.ZodEnum<{
23
+ EQUALS: "EQUALS";
24
+ STARTS_WITH: "STARTS_WITH";
25
+ }>;
26
+ channel: z.ZodString;
27
+ entrypoints: z.ZodArray<z.ZodString>;
28
+ operations: z.ZodArray<z.ZodEnum<{
29
+ PUBLISH: "PUBLISH";
30
+ SUBSCRIBE: "SUBSCRIBE";
31
+ }>>;
32
+ mcpMethods: z.ZodArray<z.ZodString>;
33
+ condition: z.ZodString;
34
+ }, z.core.$strip>;
35
+ export type FormValues = z.infer<typeof flowFormSchema>;
36
+ //# sourceMappingURL=flow-form-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flow-form-schema.d.ts","sourceRoot":"","sources":["../../../src/components/FlowForm/flow-form-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;iBAWzB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { AddFlowSheet } from './AddFlowSheet';
2
+ export type { AddFlowSheetProps } from './AddFlowSheet';
3
+ export { EditFlowSheet } from './EditFlowSheet';
4
+ export type { EditFlowSheetProps } from './EditFlowSheet';
5
+ export { FlowForm } from './FlowForm';
6
+ export type { FlowFormProps } from './FlowForm';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FlowForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PolicyStudio.d.ts","sourceRoot":"","sources":["../../../src/components/PolicyStudio/PolicyStudio.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAI/D,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,yBAAyB,EAAE,UAAU,CAAC;IACpF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,aAAa,EAAE,EAAE,iBAAiB,2CAM9E"}
1
+ {"version":3,"file":"PolicyStudio.d.ts","sourceRoot":"","sources":["../../../src/components/PolicyStudio/PolicyStudio.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAO/D,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,yBAAyB,EAAE,UAAU,CAAC;IACpF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,aAAa,EAAE,EAAE,iBAAiB,2CAM9E"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export * from './components/ElCheatSheetTrigger';
2
+ export * from './components/FlowForm';
1
3
  export * from './components/FlowsSidebar';
2
4
  export * from './components/PolicyStudio';
3
5
  export * from './components/PolicyStudioLayout';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}