@qoretechnologies/reqraft 0.10.10 → 0.10.11

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 (37) hide show
  1. package/package.json +1 -1
  2. package/src/components/dpqlEditor/DpqlEditor.stories.tsx +74 -2
  3. package/src/components/form/engine/FormEngine.stories.tsx +654 -32
  4. package/src/components/form/engine/FormEngineRemote.stories.tsx +48 -0
  5. package/src/components/form/engine/_structuredData/StructuredDataView.stories.tsx +8 -0
  6. package/src/components/form/engine/variants/FormEngineVariants.stories.tsx +40 -0
  7. package/src/components/form/expressions/ExpressionField.stories.tsx +74 -2
  8. package/src/components/form/expressions/builder/ExpressionBuilder.stories.tsx +187 -0
  9. package/src/components/form/fields/Field.stories.tsx +40 -0
  10. package/src/components/form/fields/array/ArrayAutoField.stories.tsx +64 -0
  11. package/src/components/form/fields/auto/AutoFormField.stories.tsx +136 -0
  12. package/src/components/form/fields/binary/Binary.stories.tsx +32 -0
  13. package/src/components/form/fields/boolean/Boolean.stories.tsx +24 -0
  14. package/src/components/form/fields/byte-size/ByteSize.stories.tsx +24 -0
  15. package/src/components/form/fields/color/Color.stories.tsx +30 -0
  16. package/src/components/form/fields/cron/Cron.stories.tsx +8 -0
  17. package/src/components/form/fields/date/Date.stories.tsx +22 -0
  18. package/src/components/form/fields/file/File.stories.tsx +48 -0
  19. package/src/components/form/fields/long-string/LongString.stories.tsx +24 -0
  20. package/src/components/form/fields/markdown/Markdown.stories.tsx +8 -0
  21. package/src/components/form/fields/number/Number.stories.tsx +31 -0
  22. package/src/components/form/fields/object/Object.stories.tsx +88 -0
  23. package/src/components/form/fields/radio-group/RadioGroup.stories.tsx +24 -0
  24. package/src/components/form/fields/rich-text/RichText.stories.tsx +23 -0
  25. package/src/components/form/fields/schema-definition/SchemaDefinitionField.stories.tsx +72 -0
  26. package/src/components/form/fields/select/Select.stories.tsx +104 -0
  27. package/src/components/form/fields/string/String.stories.tsx +16 -0
  28. package/src/components/form/fields/template/TemplateField.stories.tsx +160 -0
  29. package/src/components/form/fields/url/Url.stories.tsx +24 -0
  30. package/src/components/log/Log.stories.tsx +96 -0
  31. package/src/components/menu/Menu.stories.tsx +54 -0
  32. package/src/components/qonsoleSmartInput/QonsoleSmartInput.stories.tsx +14 -0
  33. package/src/components/smartEditor/SmartEditor.stories.tsx +32 -0
  34. package/src/hooks/useFetch/useFetch.stories.tsx +30 -0
  35. package/src/hooks/useStorage/useStorage.stories.tsx +30 -0
  36. package/src/hooks/useWebSocket/useWebsocket.stories.tsx +127 -1
  37. package/src/stores/currentUser/currentUser.stories.tsx +17 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qoretechnologies/reqraft",
3
- "version": "0.10.10",
3
+ "version": "0.10.11",
4
4
  "description": "ReQraft is a collection of React components and hooks that are used across Qore Technologies' products made using the ReQore component library from Qore.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -511,7 +511,15 @@ const meta = {
511
511
  export default meta;
512
512
  export type Story = StoryObj<typeof meta>;
513
513
 
514
- export const Empty: Story = {};
514
+ export const Empty: Story = {
515
+ parameters: {
516
+ docs: {
517
+ description: {
518
+ story: 'Renders the DpqlEditor with no value — the editor mounts empty and ready for input.',
519
+ },
520
+ },
521
+ },
522
+ };
515
523
 
516
524
  /**
517
525
  * No chips / templates — just a valid DPQL literal expression so we can
@@ -524,18 +532,42 @@ export const WithPlainText: Story = {
524
532
  args: {
525
533
  value: '1 == 1 && "hello" != "world"',
526
534
  },
535
+ parameters: {
536
+ docs: {
537
+ description: {
538
+ story:
539
+ 'Renders the DpqlEditor with a plain DPQL literal expression — no field references or templates, so the editor mounts as plain text with no tag chips.',
540
+ },
541
+ },
542
+ },
527
543
  };
528
544
 
529
545
  export const WithFieldReference: Story = {
530
546
  args: {
531
547
  value: '@name == "Alice"',
532
548
  },
549
+ parameters: {
550
+ docs: {
551
+ description: {
552
+ story:
553
+ 'Renders the DpqlEditor with an @name field reference — the editor mounts with a tag chip for the field and the literal string operand.',
554
+ },
555
+ },
556
+ },
533
557
  };
534
558
 
535
559
  export const WithTemplateVariable: Story = {
536
560
  args: {
537
561
  value: 'contains("$local:input", "es")',
538
562
  },
563
+ parameters: {
564
+ docs: {
565
+ description: {
566
+ story:
567
+ 'Renders the DpqlEditor with a contains() call whose first argument is a $local:input template — the template renders as a tag chip inside the call.',
568
+ },
569
+ },
570
+ },
539
571
  };
540
572
 
541
573
  export const WithMixedContent: Story = {
@@ -544,6 +576,14 @@ export const WithMixedContent: Story = {
544
576
  // qore-2/design/dpql-syntax.md §"Logical Operators".
545
577
  value: '@name == $data:{1.name} && @age > $config:min_age',
546
578
  },
579
+ parameters: {
580
+ docs: {
581
+ description: {
582
+ story:
583
+ 'Renders the DpqlEditor with mixed content — two @field references, two $data / $config templates and the DPQL "&&" logical operator between them, each rendered as its own chip or token.',
584
+ },
585
+ },
586
+ },
547
587
  };
548
588
 
549
589
  /**
@@ -1014,6 +1054,14 @@ export const ReadOnly: Story = {
1014
1054
  value: '@name == "Alice"',
1015
1055
  readOnly: true,
1016
1056
  },
1057
+ parameters: {
1058
+ docs: {
1059
+ description: {
1060
+ story:
1061
+ 'Renders the DpqlEditor with a valued expression but readOnly enabled — the field chip and literal render but the editor cannot be edited.',
1062
+ },
1063
+ },
1064
+ },
1017
1065
  };
1018
1066
 
1019
1067
  /**
@@ -1131,6 +1179,14 @@ export const CanTypeText: Story = {
1131
1179
  value: '',
1132
1180
  onChange: fn(),
1133
1181
  },
1182
+ parameters: {
1183
+ docs: {
1184
+ description: {
1185
+ story:
1186
+ 'Renders the empty DpqlEditor and types "hello" into it — the editor accepts the plain text and fires onChange.',
1187
+ },
1188
+ },
1189
+ },
1134
1190
  play: async ({ canvasElement, args }) => {
1135
1191
  const canvas = within(canvasElement);
1136
1192
 
@@ -1153,6 +1209,14 @@ export const LspCompletionRoundtrip: Story = {
1153
1209
  value: '',
1154
1210
  onChange: fn(),
1155
1211
  },
1212
+ parameters: {
1213
+ docs: {
1214
+ description: {
1215
+ story:
1216
+ 'Renders the empty DpqlEditor and types the "@" trigger — the LSP receives a textDocument/completion request against a dpql:// document URI and the dropdown mounts with the canned @name / @status / @age items.',
1217
+ },
1218
+ },
1219
+ },
1156
1220
  play: async ({ canvasElement }) => {
1157
1221
  const canvas = within(canvasElement);
1158
1222
 
@@ -1199,7 +1263,15 @@ export const LspCompletionRoundtrip: Story = {
1199
1263
  * single physical connection and a single `initialize` handshake.
1200
1264
  */
1201
1265
  export const TwoEditorsOneConnection: Story = {
1202
- parameters: { chromatic: { disable: true } },
1266
+ parameters: {
1267
+ chromatic: { disable: true },
1268
+ docs: {
1269
+ description: {
1270
+ story:
1271
+ 'Renders two DpqlEditor instances side by side — both share a single WebSocket via LspSharedConnection and each opens its own document URI, so the server sees one initialize but two didOpen notifications.',
1272
+ },
1273
+ },
1274
+ },
1203
1275
  render: () => (
1204
1276
  <>
1205
1277
  <DpqlEditorWithState value='name' />