@qoretechnologies/reqraft 0.10.53 → 0.10.54-pr.115.g9bc96ed
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/.claude/CLAUDE.md +25 -0
- package/.tasks/INDEX.md +1 -0
- package/.tasks/STORY_NETWORK_ISOLATION.md +98 -0
- package/README.md +1 -1
- package/design/FORM_ENGINE_EXPRESSIONS.md +110 -0
- package/design/FORM_ENGINE_FIELD_MIGRATION.md +56 -1
- package/design/RENDER_EXPRESSION_TRANSPORT.md +76 -10
- package/design/SMART_EDITOR_UX.md +21 -0
- package/dist/components/dpqlEditor/DpqlEditor.d.ts.map +1 -1
- package/dist/components/dpqlEditor/DpqlEditor.js +3 -3
- package/dist/components/dpqlEditor/DpqlEditor.js.map +1 -1
- package/dist/components/dpqlEditor/dpqlHelpers.d.ts +6 -0
- package/dist/components/dpqlEditor/dpqlHelpers.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlHelpers.js +21 -2
- package/dist/components/dpqlEditor/dpqlHelpers.js.map +1 -1
- package/dist/components/dpqlEditor/dpqlProbe.d.ts +37 -0
- package/dist/components/dpqlEditor/dpqlProbe.d.ts.map +1 -0
- package/dist/components/dpqlEditor/dpqlProbe.js +203 -0
- package/dist/components/dpqlEditor/dpqlProbe.js.map +1 -0
- package/dist/components/dpqlEditor/dpqlTags.d.ts +8 -0
- package/dist/components/dpqlEditor/dpqlTags.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlTags.js +5 -1
- package/dist/components/dpqlEditor/dpqlTags.js.map +1 -1
- package/dist/components/dpqlEditor/index.d.ts +4 -0
- package/dist/components/dpqlEditor/index.d.ts.map +1 -1
- package/dist/components/dpqlEditor/index.js +5 -1
- package/dist/components/dpqlEditor/index.js.map +1 -1
- package/dist/components/dpqlEditor/types.d.ts +42 -2
- package/dist/components/dpqlEditor/types.d.ts.map +1 -1
- package/dist/components/dpqlEditor/types.js +0 -4
- package/dist/components/dpqlEditor/types.js.map +1 -1
- package/dist/components/dpqlEditor/useDpqlProbe.d.ts +4 -0
- package/dist/components/dpqlEditor/useDpqlProbe.d.ts.map +1 -0
- package/dist/components/dpqlEditor/useDpqlProbe.js +29 -0
- package/dist/components/dpqlEditor/useDpqlProbe.js.map +1 -0
- package/dist/components/dpqlEditor/useDpqlSession.d.ts +5 -2
- package/dist/components/dpqlEditor/useDpqlSession.d.ts.map +1 -1
- package/dist/components/dpqlEditor/useDpqlSession.js +8 -2
- package/dist/components/dpqlEditor/useDpqlSession.js.map +1 -1
- package/dist/components/form/engine/CompactRow.d.ts.map +1 -1
- package/dist/components/form/engine/CompactRow.js +192 -45
- package/dist/components/form/engine/CompactRow.js.map +1 -1
- package/dist/components/form/engine/CompactToolbar.d.ts.map +1 -1
- package/dist/components/form/engine/CompactToolbar.js +5 -2
- package/dist/components/form/engine/CompactToolbar.js.map +1 -1
- package/dist/components/form/engine/FormEngine.d.ts +160 -12
- package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
- package/dist/components/form/engine/FormEngine.js +376 -75
- package/dist/components/form/engine/FormEngine.js.map +1 -1
- package/dist/components/form/engine/FormFieldsSkeleton.d.ts +48 -0
- package/dist/components/form/engine/FormFieldsSkeleton.d.ts.map +1 -0
- package/dist/components/form/engine/FormFieldsSkeleton.js +38 -0
- package/dist/components/form/engine/FormFieldsSkeleton.js.map +1 -0
- package/dist/components/form/engine/OptionFieldMessages.d.ts +17 -2
- package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
- package/dist/components/form/engine/OptionFieldMessages.js +61 -11
- package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.js +7 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.js.map +1 -1
- package/dist/components/form/engine/compactToolbarContext.d.ts +1 -0
- package/dist/components/form/engine/compactToolbarContext.d.ts.map +1 -1
- package/dist/components/form/engine/readFirst.d.ts +42 -1
- package/dist/components/form/engine/readFirst.d.ts.map +1 -1
- package/dist/components/form/engine/readFirst.js +74 -7
- package/dist/components/form/engine/readFirst.js.map +1 -1
- package/dist/components/form/engine/rendererTypes.d.ts +13 -0
- package/dist/components/form/engine/rendererTypes.d.ts.map +1 -1
- package/dist/components/form/engine/rendererTypes.js.map +1 -1
- package/dist/components/form/engine/rowMenuContext.d.ts +78 -0
- package/dist/components/form/engine/rowMenuContext.d.ts.map +1 -0
- package/dist/components/form/engine/rowMenuContext.js +103 -0
- package/dist/components/form/engine/rowMenuContext.js.map +1 -0
- package/dist/components/form/engine/typeChoices.d.ts +37 -0
- package/dist/components/form/engine/typeChoices.d.ts.map +1 -0
- package/dist/components/form/engine/typeChoices.js +25 -0
- package/dist/components/form/engine/typeChoices.js.map +1 -0
- package/dist/components/form/expressions/DpqlRendering.d.ts +26 -0
- package/dist/components/form/expressions/DpqlRendering.d.ts.map +1 -0
- package/dist/components/form/expressions/DpqlRendering.js +53 -0
- package/dist/components/form/expressions/DpqlRendering.js.map +1 -0
- package/dist/components/form/expressions/ExpressionField.d.ts +7 -1
- package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
- package/dist/components/form/expressions/ExpressionField.js +202 -45
- package/dist/components/form/expressions/ExpressionField.js.map +1 -1
- package/dist/components/form/expressions/argumentPresence.d.ts +97 -0
- package/dist/components/form/expressions/argumentPresence.d.ts.map +1 -0
- package/dist/components/form/expressions/argumentPresence.js +203 -0
- package/dist/components/form/expressions/argumentPresence.js.map +1 -0
- package/dist/components/form/expressions/builder/argumentLabel.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentLabel.js +9 -4
- package/dist/components/form/expressions/builder/argumentLabel.js.map +1 -1
- package/dist/components/form/expressions/builder/index.d.ts +15 -2
- package/dist/components/form/expressions/builder/index.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/index.js +20 -58
- package/dist/components/form/expressions/builder/index.js.map +1 -1
- package/dist/components/form/expressions/builder/renderTemplate.d.ts +4 -1
- package/dist/components/form/expressions/builder/renderTemplate.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/renderTemplate.js +10 -67
- package/dist/components/form/expressions/builder/renderTemplate.js.map +1 -1
- package/dist/components/form/expressions/dpqlMockLanguage.d.ts +76 -0
- package/dist/components/form/expressions/dpqlMockLanguage.d.ts.map +1 -0
- package/dist/components/form/expressions/dpqlMockLanguage.js +525 -0
- package/dist/components/form/expressions/dpqlMockLanguage.js.map +1 -0
- package/dist/components/form/expressions/dpqlMockLsp.d.ts +31 -2
- package/dist/components/form/expressions/dpqlMockLsp.d.ts.map +1 -1
- package/dist/components/form/expressions/dpqlMockLsp.js +86 -80
- package/dist/components/form/expressions/dpqlMockLsp.js.map +1 -1
- package/dist/components/form/expressions/mockExpressions.d.ts.map +1 -1
- package/dist/components/form/expressions/mockExpressions.js +8 -4
- package/dist/components/form/expressions/mockExpressions.js.map +1 -1
- package/dist/components/form/expressions/renderExpressionToText.d.ts +1 -1
- package/dist/components/form/expressions/renderExpressionToText.d.ts.map +1 -1
- package/dist/components/form/expressions/renderExpressionToText.js +95 -19
- package/dist/components/form/expressions/renderExpressionToText.js.map +1 -1
- package/dist/components/form/expressions/types.d.ts +7 -0
- package/dist/components/form/expressions/types.d.ts.map +1 -1
- package/dist/components/form/expressions/useRenderExpression.d.ts +7 -16
- package/dist/components/form/expressions/useRenderExpression.d.ts.map +1 -1
- package/dist/components/form/expressions/useRenderExpression.js +50 -126
- package/dist/components/form/expressions/useRenderExpression.js.map +1 -1
- package/dist/components/form/fields/Field.d.ts.map +1 -1
- package/dist/components/form/fields/Field.js +3 -1
- package/dist/components/form/fields/Field.js.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.d.ts +11 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.d.ts.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.js +14 -2
- package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.d.ts.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.js +32 -8
- package/dist/components/form/fields/auto/AutoFormField.js.map +1 -1
- package/dist/components/form/fields/date/Date.d.ts +1 -1
- package/dist/components/form/fields/date/Date.d.ts.map +1 -1
- package/dist/components/form/fields/date/Date.js +16 -2
- package/dist/components/form/fields/date/Date.js.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.d.ts +21 -1
- package/dist/components/form/fields/rich-text/RichText.d.ts.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.js +140 -8
- package/dist/components/form/fields/rich-text/RichText.js.map +1 -1
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts +2 -1
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts.map +1 -1
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.js +3 -2
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.js.map +1 -1
- package/dist/components/form/fields/template/TemplateField.d.ts +31 -1
- package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateField.js +528 -50
- package/dist/components/form/fields/template/TemplateField.js.map +1 -1
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +1 -0
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/smartEditor/SmartEditor.d.ts.map +1 -1
- package/dist/components/smartEditor/SmartEditor.js +29 -8
- package/dist/components/smartEditor/SmartEditor.js.map +1 -1
- package/dist/components/smartEditor/__fixtures__/mockLspServer.d.ts +8 -0
- package/dist/components/smartEditor/__fixtures__/mockLspServer.d.ts.map +1 -1
- package/dist/components/smartEditor/__fixtures__/mockLspServer.js +53 -10
- package/dist/components/smartEditor/__fixtures__/mockLspServer.js.map +1 -1
- package/dist/components/smartEditor/useLspSession.d.ts +5 -1
- package/dist/components/smartEditor/useLspSession.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspSession.js +16 -2
- package/dist/components/smartEditor/useLspSession.js.map +1 -1
- package/dist/helpers/dpqlDetection.d.ts +58 -0
- package/dist/helpers/dpqlDetection.d.ts.map +1 -0
- package/dist/helpers/dpqlDetection.js +164 -0
- package/dist/helpers/dpqlDetection.js.map +1 -0
- package/dist/helpers/optionUiTypes.d.ts +3 -3
- package/dist/helpers/options.d.ts +37 -0
- package/dist/helpers/options.d.ts.map +1 -1
- package/dist/helpers/options.js +78 -1
- package/dist/helpers/options.js.map +1 -1
- package/dist/helpers/templateItems.d.ts +47 -0
- package/dist/helpers/templateItems.d.ts.map +1 -0
- package/dist/helpers/templateItems.js +88 -0
- package/dist/helpers/templateItems.js.map +1 -0
- package/dist/helpers/templateText.d.ts +37 -0
- package/dist/helpers/templateText.d.ts.map +1 -0
- package/dist/helpers/templateText.js +64 -0
- package/dist/helpers/templateText.js.map +1 -0
- package/dist/helpers/templates.d.ts +19 -11
- package/dist/helpers/templates.d.ts.map +1 -1
- package/dist/helpers/templates.js +46 -29
- package/dist/helpers/templates.js.map +1 -1
- package/dist/helpers/validations.d.ts.map +1 -1
- package/dist/helpers/validations.js +56 -9
- package/dist/helpers/validations.js.map +1 -1
- package/dist/hooks/useArgSchema.d.ts +2 -1
- package/dist/hooks/useArgSchema.d.ts.map +1 -1
- package/dist/hooks/useFetch/useFetch.d.ts +3 -1
- package/dist/hooks/useFetch/useFetch.d.ts.map +1 -1
- package/dist/hooks/useFetch/useFetch.js +47 -9
- package/dist/hooks/useFetch/useFetch.js.map +1 -1
- package/dist/hooks/useTemplates.d.ts +20 -0
- package/dist/hooks/useTemplates.d.ts.map +1 -1
- package/dist/hooks/useTemplates.js +34 -2
- package/dist/hooks/useTemplates.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/stories/storyNetwork.d.ts +36 -0
- package/dist/stories/storyNetwork.d.ts.map +1 -0
- package/dist/stories/storyNetwork.js +82 -0
- package/dist/stories/storyNetwork.js.map +1 -0
- package/dist/utils/fetch.d.ts +151 -1
- package/dist/utils/fetch.d.ts.map +1 -1
- package/dist/utils/fetch.js +256 -44
- package/dist/utils/fetch.js.map +1 -1
- package/dist/utils/lspClient.d.ts +6 -0
- package/dist/utils/lspClient.d.ts.map +1 -1
- package/dist/utils/lspClient.js +62 -11
- package/dist/utils/lspClient.js.map +1 -1
- package/dist/utils/websocket.d.ts +6 -0
- package/dist/utils/websocket.d.ts.map +1 -1
- package/dist/utils/websocket.js +15 -7
- package/dist/utils/websocket.js.map +1 -1
- package/package.json +2 -2
- package/src/components/dpqlEditor/DpqlEditor.stories.tsx +3 -119
- package/src/components/dpqlEditor/DpqlEditor.tsx +5 -2
- package/src/components/dpqlEditor/dpqlHelpers.ts +20 -1
- package/src/components/dpqlEditor/dpqlProbe.ts +165 -0
- package/src/components/dpqlEditor/dpqlTags.ts +13 -0
- package/src/components/dpqlEditor/index.ts +4 -0
- package/src/components/dpqlEditor/types.ts +38 -2
- package/src/components/dpqlEditor/useDpqlProbe.ts +33 -0
- package/src/components/dpqlEditor/useDpqlSession.ts +20 -4
- package/src/components/form/engine/CompactRow.tsx +240 -51
- package/src/components/form/engine/CompactToolbar.tsx +10 -3
- package/src/components/form/engine/FormEngine.stories.tsx +423 -120
- package/src/components/form/engine/FormEngine.tsx +504 -87
- package/src/components/form/engine/FormFieldsSkeleton.tsx +76 -0
- package/src/components/form/engine/OptionFieldMessages.tsx +89 -11
- package/src/components/form/engine/_structuredData/SchemaDataView.tsx +11 -0
- package/src/components/form/engine/compactToolbarContext.ts +1 -1
- package/src/components/form/engine/readFirst.ts +86 -7
- package/src/components/form/engine/rendererTypes.ts +12 -0
- package/src/components/form/engine/rowMenuContext.ts +159 -0
- package/src/components/form/engine/typeChoices.ts +55 -0
- package/src/components/form/expressions/DpqlRendering.tsx +85 -0
- package/src/components/form/expressions/ExpressionField.stories.tsx +826 -48
- package/src/components/form/expressions/ExpressionField.tsx +265 -54
- package/src/components/form/expressions/argumentPresence.ts +200 -0
- package/src/components/form/expressions/builder/ExpressionBuilder.stories.tsx +20 -4
- package/src/components/form/expressions/builder/argumentLabel.tsx +10 -4
- package/src/components/form/expressions/builder/index.tsx +39 -77
- package/src/components/form/expressions/builder/renderTemplate.tsx +23 -56
- package/src/components/form/expressions/dpqlMockLanguage.ts +565 -0
- package/src/components/form/expressions/dpqlMockLsp.ts +109 -83
- package/src/components/form/expressions/mockExpressions.ts +8 -4
- package/src/components/form/expressions/renderExpressionToText.ts +112 -22
- package/src/components/form/expressions/types.ts +7 -0
- package/src/components/form/expressions/useRenderExpression.ts +43 -127
- package/src/components/form/fields/Field.tsx +3 -2
- package/src/components/form/fields/allowed-values/AllowedValues.tsx +13 -2
- package/src/components/form/fields/auto/AutoFormField.stories.tsx +27 -20
- package/src/components/form/fields/auto/AutoFormField.tsx +33 -9
- package/src/components/form/fields/date/Date.tsx +17 -1
- package/src/components/form/fields/rich-text/RichText.tsx +199 -22
- package/src/components/form/fields/template/ReadOnlyTemplateTag.tsx +4 -2
- package/src/components/form/fields/template/TemplateField.stories.tsx +31 -9
- package/src/components/form/fields/template/TemplateField.tsx +714 -122
- package/src/components/form/index.tsx +1 -0
- package/src/components/log/Log.stories.tsx +2 -1
- package/src/components/smartEditor/SmartEditor.tsx +41 -9
- package/src/components/smartEditor/__fixtures__/mockLspServer.ts +52 -3
- package/src/components/smartEditor/useLspSession.ts +21 -3
- package/src/helpers/dpqlDetection.ts +209 -0
- package/src/helpers/options.ts +70 -0
- package/src/helpers/templateItems.ts +81 -0
- package/src/helpers/templateText.ts +92 -0
- package/src/helpers/templates.ts +47 -37
- package/src/helpers/validations.ts +59 -9
- package/src/hooks/useFetch/useFetch.stories.tsx +6 -5
- package/src/hooks/useFetch/useFetch.tsx +53 -7
- package/src/hooks/useStorage/useStorage.stories.tsx +2 -1
- package/src/hooks/useTemplates.ts +41 -0
- package/src/hooks/useWebSocket/useWebsocket.stories.tsx +2 -1
- package/src/index.tsx +14 -1
- package/src/stores/currentUser/currentUser.stories.tsx +2 -1
- package/src/stories/storyNetwork.ts +92 -0
- package/src/utils/fetch.ts +311 -21
- package/src/utils/lspClient.ts +68 -11
- package/src/utils/websocket.ts +20 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDpqlSession.js","sourceRoot":"","sources":["../../../src/components/dpqlEditor/useDpqlSession.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,qEAAqE;AACrE,wEAAwE;AACxE,wEAAwE;AACxE,2EAA2E;AAC3E,yEAAyE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzE,+BAA0E;AAE1E,8DAAmF;
|
|
1
|
+
{"version":3,"file":"useDpqlSession.js","sourceRoot":"","sources":["../../../src/components/dpqlEditor/useDpqlSession.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,qEAAqE;AACrE,wEAAwE;AACxE,wEAAwE;AACxE,2EAA2E;AAC3E,yEAAyE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzE,+BAA0E;AAE1E,8DAAmF;AAyDnF,SAAgB,cAAc,CAC5B,IAA4B;IAD9B,iBA+UC;IA3UG,IAAA,QAAQ,GAON,IAAI,SAPE,EACR,UAAU,GAMR,IAAI,WANI,EACD,UAAU,GAKjB,IAAI,QALa,EACnB,UAAU,GAIR,IAAI,WAJI,EACV,KAGE,IAAI,YAHU,EAAhB,WAAW,mBAAG,EAAE,KAAA,EAChB,KAEE,IAAI,oBAFqB,EAA3B,mBAAmB,mBAAG,KAAK,KAAA,EAC3B,UAAU,GACR,IAAI,WADI,CACH;IAET,4DAA4D;IAC5D,qEAAqE;IACrE,qEAAqE;IACrE,sBAAsB;IACtB,IAAM,oBAAoB,GACxB,OAAO,CAAC,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,mBAAmB,CAAC;IAE1D,IAAM,eAAe,GAAG,CAAC;QACvB,IAA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,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC,EAAE,EAAC;oBACtE,CAAC;;;;oBAEgB,qBAAM,OAAO,CAAC,MAAM,CAAC,aAAa,CAE9C,eAAe,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,EAAA;;oBAFnC,MAAM,GAAG,SAE0B;oBACnC,KAAK,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,mCAAI,EAAE,CAAC;oBACxC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBACrB,sBAAO;gCACL,KAAK,EAAE,KAAK;gCACZ,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,EAAxB,CAAwB,CAAC;6BACnD,EAAC;oBACJ,CAAC;oBACD,sBAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAC;;;oBAEvB,sBAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC,EAAE,EAAC;;;;SAE/E,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IAElC,OAAO;QACL,OAAO,EAAE,cAAc;QACvB,SAAS,WAAA;QACT,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,KAAK,OAAA;QACL,SAAS,WAAA;QACT,QAAQ,UAAA;KACT,CAAC;AACJ,CAAC;AA/UD,wCA+UC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompactRow.d.ts","sourceRoot":"","sources":["../../../../src/components/form/engine/CompactRow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CompactRow.d.ts","sourceRoot":"","sources":["../../../../src/components/form/engine/CompactRow.tsx"],"names":[],"mappings":"AAeA,OAAO,EACL,eAAe,EAIhB,MAAM,8BAA8B,CAAC;AAItC,OAAO,KAAe,MAAM,OAAO,CAAC;AA0HpC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,SAAU,OAAO,KAAG,MAAM,GAAG,SAG7C,CAAC;AAEd,eAAO,MAAM,UAAU,yHASlB;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,eAAe,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;mBAGe;IACf,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAI1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,6CAytEF,CAAC"}
|
|
@@ -96,6 +96,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
96
96
|
exports.CompactRow = exports.richtextItemText = void 0;
|
|
97
97
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
98
98
|
var reqore_1 = require("@qoretechnologies/reqore");
|
|
99
|
+
var rowMenuContext_1 = require("./rowMenuContext");
|
|
99
100
|
var optionActions_1 = require("./optionActions");
|
|
100
101
|
var flatten_1 = __importDefault(require("lodash/flatten"));
|
|
101
102
|
var isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
@@ -117,6 +118,7 @@ var SchemaDataView_1 = require("./_structuredData/SchemaDataView");
|
|
|
117
118
|
var fetch_1 = require("../../../utils/fetch");
|
|
118
119
|
var readFirst_1 = require("./readFirst");
|
|
119
120
|
var StructuredDataView_1 = require("./_structuredData/StructuredDataView");
|
|
121
|
+
var DpqlRendering_1 = require("../expressions/DpqlRendering");
|
|
120
122
|
/**
|
|
121
123
|
* Does this markdown value have more document in it than one row can show?
|
|
122
124
|
*
|
|
@@ -199,8 +201,8 @@ var richtextItemText = function (item) {
|
|
|
199
201
|
exports.richtextItemText = richtextItemText;
|
|
200
202
|
exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
201
203
|
var _b;
|
|
202
|
-
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
203
|
-
var optionName = _a.optionName, optionField = _a.optionField,
|
|
204
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
205
|
+
var optionName = _a.optionName, optionField = _a.optionField, _q = _a.hidden, hidden = _q === void 0 ? false : _q, _r = _a.clustered, clustered = _r === void 0 ? false : _r, _s = _a.clusterFirst, clusterFirst = _s === void 0 ? false : _s, _t = _a.clusterLast, clusterLast = _t === void 0 ? false : _t, absorbedFields = _a.absorbedFields;
|
|
204
206
|
var readOnly = (0, use_context_selector_1.useContextSelector)(compactRowContext_1.CompactRowContext, function (v) { return v.readOnly; });
|
|
205
207
|
var commitMode = (0, use_context_selector_1.useContextSelector)(compactRowContext_1.CompactRowContext, function (v) { return v.commitMode; });
|
|
206
208
|
var options = (0, use_context_selector_1.useContextSelector)(compactRowContext_1.CompactRowContext, function (v) { return v.options; });
|
|
@@ -283,12 +285,34 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
283
285
|
// summary you click to open. A read-only row is the only rendering the
|
|
284
286
|
// value gets, so it wraps.
|
|
285
287
|
full) {
|
|
288
|
+
var _a;
|
|
286
289
|
if (full === void 0) { full = false; }
|
|
287
290
|
var valueType = (0, readFirst_1.getValueType)(field, schema);
|
|
288
291
|
var wrapStyle = __assign({ display: 'inline-flex', alignItems: 'center', gap: 6, minWidth: 0, maxWidth: '100%' }, (full ? { flexWrap: 'wrap' } : {}));
|
|
289
292
|
var textStyle = full ?
|
|
290
293
|
{ whiteSpace: 'pre-wrap', overflowWrap: 'anywhere' }
|
|
291
294
|
: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
|
|
295
|
+
/* A row has to SAY when its value is an expression.
|
|
296
|
+
|
|
297
|
+
Reported from the live IDE: an author accepted the *Use as expression*
|
|
298
|
+
offer on one field and not on the other, and the two rows read exactly
|
|
299
|
+
the same - `1 + 2` and `2 + 1`, both plain text - so there was no way
|
|
300
|
+
to tell which had been converted. The assertion then compared the
|
|
301
|
+
string `"1 + 2"` against the number `3` and the author had no way to
|
|
302
|
+
see why.
|
|
303
|
+
|
|
304
|
+
The same Σ the expression editor uses, so the mark means the same thing
|
|
305
|
+
wherever it appears. */
|
|
306
|
+
var withExpressionMarker = function (rendered) {
|
|
307
|
+
if (!(field === null || field === void 0 ? void 0 : field.is_expression)) {
|
|
308
|
+
return rendered;
|
|
309
|
+
}
|
|
310
|
+
return ((0, jsx_runtime_1.jsxs)("span", { style: __assign(__assign({}, wrapStyle), { gap: 4 }), children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreIcon, { icon: 'Functions', size: 'tiny',
|
|
311
|
+
/* A stable hook: reqore renders every icon as a bare
|
|
312
|
+
`.reqore-icon`, so without this there is nothing to select the
|
|
313
|
+
mark by — in a test or in a consumer's stylesheet. */
|
|
314
|
+
className: 'reqraft-expression-marker', style: { flexShrink: 0, opacity: 0.7 }, tooltip: 'This value is an expression' }), rendered] }));
|
|
315
|
+
};
|
|
292
316
|
if (valueType === 'rgbcolor') {
|
|
293
317
|
var swatch = (0, readFirst_1.colorToCss)(field === null || field === void 0 ? void 0 : field.value);
|
|
294
318
|
return ((0, jsx_runtime_1.jsxs)("span", { style: swatch ? __assign(__assign({}, wrapStyle), {
|
|
@@ -307,6 +331,34 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
307
331
|
var truthy = (field === null || field === void 0 ? void 0 : field.value) === true || (field === null || field === void 0 ? void 0 : field.value) === 'true';
|
|
308
332
|
return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'small', minimal: true, intent: truthy ? 'success' : 'danger', label: formatted }));
|
|
309
333
|
}
|
|
334
|
+
// A test's cases read as CHIPS here, the same as the names in the table
|
|
335
|
+
// this row opens (`CasesTable`, qorus-ide). `test-cases` is a
|
|
336
|
+
// renderer-only ui_type, so it reached none of the branches above and
|
|
337
|
+
// fell through to the generic summary, which flattens the array of case
|
|
338
|
+
// hashes to a comma-joined string — "case_1, resolved_expected_values".
|
|
339
|
+
// A case name is an identifier the author types into `$.` references and
|
|
340
|
+
// skip conditions, and a chip is how the rest of the product writes an
|
|
341
|
+
// identifier down; the table already agreed, so the collapsed row was the
|
|
342
|
+
// only surface still printing them as prose.
|
|
343
|
+
//
|
|
344
|
+
// `intent` is a FILL, which is what a tag is — the hazard the other
|
|
345
|
+
// branches warn about is only ever using an intent as a TEXT colour.
|
|
346
|
+
//
|
|
347
|
+
// Falls through to the plain summary unless EVERY entry yields a name: a
|
|
348
|
+
// partly-chipped row would read as though the unnamed cases were missing.
|
|
349
|
+
if (valueType === 'test-cases' && Array.isArray(field === null || field === void 0 ? void 0 : field.value)) {
|
|
350
|
+
var caseNames = field.value.map(function (item) {
|
|
351
|
+
var name = item === null || item === void 0 ? void 0 : item.name;
|
|
352
|
+
return typeof name === 'string' ? name.trim() : '';
|
|
353
|
+
});
|
|
354
|
+
if (caseNames.length > 0 && caseNames.every(function (name) { return name !== ''; })) {
|
|
355
|
+
return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreControlGroup, { gapSize: 'tiny', verticalAlign: 'center',
|
|
356
|
+
// An editable row is ONE line: further chips clip with the row
|
|
357
|
+
// instead of growing it. A read-only row is the only rendering
|
|
358
|
+
// the value gets, so it wraps and shows every case.
|
|
359
|
+
wrap: full, style: full ? undefined : { minWidth: 0, overflow: 'hidden' }, children: caseNames.map(function (name, index) { return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { className: 'options-readfirst-case-tag', size: 'small', minimal: true, intent: 'info', label: name }, "".concat(name, "-").concat(index))); }) }));
|
|
360
|
+
}
|
|
361
|
+
}
|
|
310
362
|
// Code-editor read summary: replace the truncated string with a chip
|
|
311
363
|
// showing line count + character count. The actual code renders below
|
|
312
364
|
// the row as a monospace `<pre>` inside a `ReqoreCollapsibleContent` —
|
|
@@ -350,13 +402,32 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
350
402
|
if (allowedImage) {
|
|
351
403
|
return ((0, jsx_runtime_1.jsxs)("span", { style: wrapStyle, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreIcon, { image: allowedImage, size: '16px', style: { flexShrink: 0 } }), (0, jsx_runtime_1.jsx)("span", { style: textStyle, children: formatted })] }));
|
|
352
404
|
}
|
|
405
|
+
// The same, for an option whose mark is an ICON rather than a logo. Only
|
|
406
|
+
// images were drawn here, so a list whose entries are told apart by their
|
|
407
|
+
// icon — every interface kind is a bare word, `Service`, `Job`, `Qog` —
|
|
408
|
+
// showed the mark while choosing and lost it the moment the row went
|
|
409
|
+
// read-only, which is where a reader spends most of their time.
|
|
410
|
+
var allowedIcon = (0, readFirst_1.getAllowedValueIcon)(field === null || field === void 0 ? void 0 : field.value, schema);
|
|
411
|
+
if (allowedIcon) {
|
|
412
|
+
return ((0, jsx_runtime_1.jsxs)("span", { style: wrapStyle, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreIcon, { icon: allowedIcon, size: '16px', style: { flexShrink: 0 } }), (0, jsx_runtime_1.jsx)("span", { style: textStyle, children: formatted })] }));
|
|
413
|
+
}
|
|
353
414
|
// Template value ($local:…): the read-only template picker — the SAME chip
|
|
354
415
|
// TemplateField renders when disabled, so a template reads identically here
|
|
355
416
|
// and in the editor (qorus-ide intent scheme: info / qorus purple).
|
|
417
|
+
//
|
|
418
|
+
// A field may also declare templates OF ITS OWN, and a value drawn from
|
|
419
|
+
// that list is just as much a template even when it does not look like
|
|
420
|
+
// `$name:key` — `isValueTemplate` is a guess at the shape of the built-in
|
|
421
|
+
// grammar, and a host's own grammar (a Qorus test's `$.order.id`) fails it.
|
|
422
|
+
// Asking the field's list whether it CONTAINS the value settles it without
|
|
423
|
+
// guessing at syntax, and hands back the entry whose label the chip prints,
|
|
424
|
+
// so a reference reads as the name it was chosen by here as well as in the
|
|
425
|
+
// editor rather than as a raw path.
|
|
426
|
+
var ownTemplates = (_a = schema === null || schema === void 0 ? void 0 : schema.templates) !== null && _a !== void 0 ? _a : templates;
|
|
356
427
|
if (typeof (field === null || field === void 0 ? void 0 : field.value) === 'string' &&
|
|
357
428
|
!field.is_expression &&
|
|
358
|
-
(0, templates_1.isValueTemplate)(field.value)) {
|
|
359
|
-
return (0, jsx_runtime_1.jsx)(ReadOnlyTemplateTag_1.ReadOnlyTemplateTag, { value: field.value, templates:
|
|
429
|
+
((0, templates_1.isValueTemplate)(field.value) || !!(0, templates_1.findTemplate)(ownTemplates !== null && ownTemplates !== void 0 ? ownTemplates : {}, field.value))) {
|
|
430
|
+
return (0, jsx_runtime_1.jsx)(ReadOnlyTemplateTag_1.ReadOnlyTemplateTag, { value: field.value, templates: ownTemplates, size: 'small' });
|
|
360
431
|
}
|
|
361
432
|
// A LIST whose elements are rich-text envelopes is a list of strings, so it
|
|
362
433
|
// reads as those strings. Without this the row fell through to the generic
|
|
@@ -385,39 +456,23 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
385
456
|
// the chips visibly float above the words. Inheriting the row's
|
|
386
457
|
// size makes centring align the baselines too, at whatever font
|
|
387
458
|
// size the consuming app uses.
|
|
388
|
-
style: { fontSize: 'inherit' }, icon: 'ExchangeDollarLine', label: segment.text || segment.value,
|
|
459
|
+
style: { fontSize: 'inherit' }, icon: 'ExchangeDollarLine', label: segment.text || segment.value,
|
|
460
|
+
// The same card the chosen-template chip shows: what the
|
|
461
|
+
// value IS, not the reference that names it.
|
|
462
|
+
tooltip: (0, templates_1.templateTooltip)(templates, segment.value) }, (0, templates_1.getTemplateTagStyle)((_a = (templates ? (0, templates_1.findTemplate)(templates, segment.value || '') : undefined)) === null || _a === void 0 ? void 0 : _a.metadata)), index)
|
|
389
463
|
: (0, jsx_runtime_1.jsx)("span", { style: { whiteSpace: full ? 'pre-wrap' : 'pre' }, children: full ? segment.text : collapseSummaryBreaks(segment.text) }, index);
|
|
390
464
|
}) }));
|
|
391
465
|
}
|
|
392
466
|
}
|
|
393
|
-
// An expression
|
|
394
|
-
//
|
|
395
|
-
//
|
|
396
|
-
//
|
|
397
|
-
//
|
|
398
|
-
//
|
|
399
|
-
// Unconditionally: a surface with no catalogue (the Automation Hub
|
|
400
|
-
// template preview never fetches one) still shows the reference's own
|
|
401
|
-
// path, which is the point — a conditional chip is no chip at all
|
|
402
|
-
// exactly where the raw token looks worst.
|
|
467
|
+
// An expression reads as DPQL wherever it is shown without being edited:
|
|
468
|
+
// the same rendering its Explain panel and Preview use — monospace,
|
|
469
|
+
// coloured by the language server, template references as chips — so a
|
|
470
|
+
// collapsed row and the editor it opens never disagree about what the
|
|
471
|
+
// value looks like. See `DpqlRendering`.
|
|
403
472
|
if ((field === null || field === void 0 ? void 0 : field.is_expression) && formatted) {
|
|
404
|
-
|
|
405
|
-
var named = segments.map(function (segment) {
|
|
406
|
-
return segment.kind === 'token' ? __assign(__assign({}, segment), (0, templates_1.describeTemplateReference)(templates, segment.text)) : segment;
|
|
407
|
-
});
|
|
408
|
-
if (named.some(function (segment) { return segment.kind === 'token'; })) {
|
|
409
|
-
return ((0, jsx_runtime_1.jsx)("span", { style: __assign(__assign({}, wrapStyle), { gap: 4, overflow: 'hidden' }), children: named.map(function (segment, index) {
|
|
410
|
-
var _a;
|
|
411
|
-
return segment.kind === 'token' ?
|
|
412
|
-
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, __assign({ size: 'tiny',
|
|
413
|
-
// Inherit the row's font size so the chip shares a baseline
|
|
414
|
-
// with the text around it — see the richtext branch above.
|
|
415
|
-
style: { fontSize: 'inherit' }, icon: 'ExchangeDollarLine', label: segment.label, tooltip: segment.text }, (0, templates_1.getTemplateTagStyle)((_a = segment.item) === null || _a === void 0 ? void 0 : _a.metadata)), index)
|
|
416
|
-
: (0, jsx_runtime_1.jsx)("span", { style: { whiteSpace: full ? 'pre-wrap' : 'pre' }, children: segment.text }, index);
|
|
417
|
-
}) }));
|
|
418
|
-
}
|
|
473
|
+
return withExpressionMarker((0, jsx_runtime_1.jsx)("span", { style: __assign({ minWidth: 0, flex: '1 1 auto' }, (full ? {} : { overflow: 'hidden' })), children: (0, jsx_runtime_1.jsx)(DpqlRendering_1.DpqlRendering, { text: formatted, templates: ownTemplates }) }));
|
|
419
474
|
}
|
|
420
|
-
return full ? (0, jsx_runtime_1.jsx)("span", { style: textStyle, children: formatted }) : formatted;
|
|
475
|
+
return withExpressionMarker(full ? (0, jsx_runtime_1.jsx)("span", { style: textStyle, children: formatted }) : formatted);
|
|
421
476
|
};
|
|
422
477
|
var schema = options === null || options === void 0 ? void 0 : options[optionName];
|
|
423
478
|
var label = (schema === null || schema === void 0 ? void 0 : schema.display_name) || optionName;
|
|
@@ -435,14 +490,14 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
435
490
|
// hover-gated button is unreachable without a hover — and anything past the
|
|
436
491
|
// inline cap overflows regardless, so a consumer injecting ten actions can
|
|
437
492
|
// never push the row's value out of view.
|
|
438
|
-
var
|
|
493
|
+
var _u = react_1.default.useMemo(function () {
|
|
439
494
|
return collapseOptionActions ?
|
|
440
495
|
[[], injectedOptionActions]
|
|
441
496
|
: [
|
|
442
497
|
injectedOptionActions.slice(0, MAX_INLINE_OPTION_ACTIONS),
|
|
443
498
|
injectedOptionActions.slice(MAX_INLINE_OPTION_ACTIONS),
|
|
444
499
|
];
|
|
445
|
-
}, [collapseOptionActions, injectedOptionActions]), inlineOptionActions =
|
|
500
|
+
}, [collapseOptionActions, injectedOptionActions]), inlineOptionActions = _u[0], menuOptionActions = _u[1];
|
|
446
501
|
var injectedOptionActionMenuItems = react_1.default.useMemo(function () {
|
|
447
502
|
return menuOptionActions.map(function (action, index) {
|
|
448
503
|
var _a, _b;
|
|
@@ -486,7 +541,22 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
486
541
|
var changed = !hidden && !readOnly && hasOptionChanged(optionField === null || optionField === void 0 ? void 0 : optionField.value, optionName);
|
|
487
542
|
// "Has a value" = set to anything non-empty. Drives the edit-row Clear
|
|
488
543
|
// button and the cluster node's filled state (see `memberSet`).
|
|
489
|
-
|
|
544
|
+
/* "Is there anything to clear?" — this predicate has exactly one job, and
|
|
545
|
+
both of its uses are the Clear-value button.
|
|
546
|
+
|
|
547
|
+
An empty list is not a value. `[]` is neither `undefined`, `null` nor `''`,
|
|
548
|
+
so a field whose last item had just been removed went on offering to clear
|
|
549
|
+
it, and the confirmation asked whether to clear nothing. A test's cases
|
|
550
|
+
table is where this shows: delete the last case and a red clear-all sat
|
|
551
|
+
above an empty table, guarding a no-op.
|
|
552
|
+
|
|
553
|
+
Deliberately arrays only. An empty hash is arguable — "present but empty"
|
|
554
|
+
can be a real state for a hash — and nothing has demonstrated the same
|
|
555
|
+
defect there, so widening this predicate would be a guess. */
|
|
556
|
+
var hasValue = (optionField === null || optionField === void 0 ? void 0 : optionField.value) !== undefined &&
|
|
557
|
+
(optionField === null || optionField === void 0 ? void 0 : optionField.value) !== null &&
|
|
558
|
+
(optionField === null || optionField === void 0 ? void 0 : optionField.value) !== '' &&
|
|
559
|
+
!(Array.isArray(optionField.value) && optionField.value.length === 0);
|
|
490
560
|
// Required-group membership shows a PERSISTENT chip on every member: amber
|
|
491
561
|
// "One of" while the group is unmet (tap → flash siblings), then a muted-green
|
|
492
562
|
// resolution once satisfied — "Covers" on the field that satisfied it,
|
|
@@ -531,7 +601,7 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
531
601
|
: (schema === null || schema === void 0 ? void 0 : schema.ui_type) || (schema === null || schema === void 0 ? void 0 : schema.type))) !== null && _d !== void 0 ? _d : '';
|
|
532
602
|
// Scalars edit in place inside the row; complex fields (tall or nested
|
|
533
603
|
// editors) still open the expanded card below.
|
|
534
|
-
var
|
|
604
|
+
var inlineEditableNow = !readOnly &&
|
|
535
605
|
!(schema === null || schema === void 0 ? void 0 : schema.arg_schema) &&
|
|
536
606
|
!(operators && (0, size_1.default)(operators)) &&
|
|
537
607
|
// Expression fields open the builder/DPQL editor — too tall for inline.
|
|
@@ -539,6 +609,43 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
539
609
|
// A choice with per-option logos (e.g. language) reads better collapsed.
|
|
540
610
|
!(0, readFirst_1.optionHasImages)(schema) &&
|
|
541
611
|
!COMPACT_COMPLEX_TYPES.has(editType);
|
|
612
|
+
/* Which of the two editors a row gets is settled when the row OPENS.
|
|
613
|
+
*
|
|
614
|
+
* Every term above reads the VALUE or a schema derived from it, so the
|
|
615
|
+
* answer can change while the author is inside the control — and the two
|
|
616
|
+
* branches are different subtrees, so a changed answer does not restyle
|
|
617
|
+
* the editor, it unmounts one and mounts the other. Everything the old one
|
|
618
|
+
* held goes with it: what was typed, the caret, and any state the editor
|
|
619
|
+
* keeps about how it was entered.
|
|
620
|
+
*
|
|
621
|
+
* `is_expression` is the term that actually fires, and it fires on the one
|
|
622
|
+
* interaction that exists to keep the author where they are: accepting
|
|
623
|
+
* "Use as expression" is the moment the value becomes an expression, and
|
|
624
|
+
* the expression shell opens on its Text view precisely because the author
|
|
625
|
+
* has just written the expression as text. The remount discarded that and
|
|
626
|
+
* dropped them into the visual builder, so the sentence they had typed was
|
|
627
|
+
* nowhere on screen. Clicking Text then appeared to work and bounced back,
|
|
628
|
+
* because the next value change remounted the row again.
|
|
629
|
+
*
|
|
630
|
+
* So the row keeps the editor it opened with for as long as it is open,
|
|
631
|
+
* and asks the question again when it is next opened — the same trade
|
|
632
|
+
* `editEntryValue` above makes for a different reason, and the one
|
|
633
|
+
* qorus-ide's `referenceEditorLatch` makes for this exact one. A field that
|
|
634
|
+
* already holds an expression when it is opened still gets the card; it is
|
|
635
|
+
* only a field that BECOMES one under the author that stays put.
|
|
636
|
+
*
|
|
637
|
+
* Held in a ref and settled during render rather than in an effect: an
|
|
638
|
+
* effect lands one render late, and one render late is a visible flash of
|
|
639
|
+
* the wrong editor — which is the thing being fixed.
|
|
640
|
+
*/
|
|
641
|
+
var inlineEditableLatch = react_1.default.useRef(undefined);
|
|
642
|
+
if (!isExpanded) {
|
|
643
|
+
inlineEditableLatch.current = undefined;
|
|
644
|
+
}
|
|
645
|
+
else if (inlineEditableLatch.current === undefined) {
|
|
646
|
+
inlineEditableLatch.current = inlineEditableNow;
|
|
647
|
+
}
|
|
648
|
+
var inlineEditable = isExpanded ? !!inlineEditableLatch.current : inlineEditableNow;
|
|
542
649
|
// Auto-focus the editor's first input when a field is opened, so you can type
|
|
543
650
|
// straight away (matches the prototype's tap-to-edit feel).
|
|
544
651
|
var editorRef = react_1.default.useRef(null);
|
|
@@ -604,7 +711,7 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
604
711
|
// below an early return, so a hook placed there would run conditionally.
|
|
605
712
|
var rawArgSchema = schema === null || schema === void 0 ? void 0 : schema.arg_schema;
|
|
606
713
|
var argSchemaId = typeof rawArgSchema === 'string' ? rawArgSchema : undefined;
|
|
607
|
-
var
|
|
714
|
+
var _v = react_1.default.useState(undefined), resolvedArgSchema = _v[0], setResolvedArgSchema = _v[1];
|
|
608
715
|
// Only worth a request when there is a described value to preview: a row whose
|
|
609
716
|
// value is unset or scalar renders no inset, so fetching its schema would buy
|
|
610
717
|
// a round trip per row and show nothing. `query` caches GETs, so rows sharing
|
|
@@ -786,7 +893,22 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
786
893
|
// stacks children flush, and the class rule that used to carry a 4px gap
|
|
787
894
|
// never reached this element at all — which is why two messages read as one
|
|
788
895
|
// two-tone block with no space between them.
|
|
789
|
-
|
|
896
|
+
/* A message is PROSE, so it is drawn by the host's prose renderer.
|
|
897
|
+
|
|
898
|
+
`markdownRendererContext` says this package renders markdown "in exactly
|
|
899
|
+
one place — a field's description". That was one place short: a schema
|
|
900
|
+
message is written by the same author, in the same dialect, and it landed
|
|
901
|
+
here as a raw string. A Qorus warning reading "Give that step a **Fixture
|
|
902
|
+
Output**" showed the asterisks, and every reference inside it stayed a raw
|
|
903
|
+
`$.` path where the editor two lines above renders it as a named chip.
|
|
904
|
+
|
|
905
|
+
`compact` for the same reason the row inset asks for it: this is a strip
|
|
906
|
+
inside a row, never a page, and markdown authored as a document opens with
|
|
907
|
+
a heading that would outgrow the field label above it. Without a host
|
|
908
|
+
renderer the string is drawn as it always was. */
|
|
909
|
+
var renderInfoStrip = function (m, index) { return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { size: 'small', opaque: false, flat: true, intent: m.intent, title: m.title, style: { marginBottom: 8 }, children: markdownRenderer && typeof m.content === 'string' ?
|
|
910
|
+
markdownRenderer({ value: m.content, compact: true })
|
|
911
|
+
: m.content }, "".concat(m.content, "-").concat(index))); };
|
|
790
912
|
var reasonColor = function (intent) {
|
|
791
913
|
var _a;
|
|
792
914
|
return intent === 'danger' ? cDanger
|
|
@@ -817,10 +939,12 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
817
939
|
onMouseLeave: function () { return setHighlightedOptions([]); },
|
|
818
940
|
}
|
|
819
941
|
: {};
|
|
942
|
+
// Items the EDITOR inside this row published — see `rowMenuContext`.
|
|
943
|
+
var _w = (0, rowMenuContext_1.useRowMenuRegistry)(), rowMenu = _w.rowMenu, editorMenuItems = _w.items;
|
|
820
944
|
// Secondary edit actions tuck into a "More" (⋮) menu so the card header stays
|
|
821
945
|
// calm: Fullscreen always, plus Remove field for a removable option. Rendered
|
|
822
946
|
// just before the Done ✓ in both expanded layouts.
|
|
823
|
-
var moreMenu = ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreDropdown, { className: 'options-readfirst-more', icon: 'More2Fill', flat: true, minimal: true, fixed: true, size: 'small', tooltip: 'More actions', items: __spreadArray(__spreadArray([
|
|
947
|
+
var moreMenu = ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreDropdown, { className: 'options-readfirst-more', icon: 'More2Fill', flat: true, minimal: true, fixed: true, size: 'small', tooltip: 'More actions', items: __spreadArray(__spreadArray(__spreadArray([
|
|
824
948
|
{
|
|
825
949
|
label: 'Edit fullscreen',
|
|
826
950
|
icon: 'FullscreenLine',
|
|
@@ -840,7 +964,7 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
840
964
|
},
|
|
841
965
|
},
|
|
842
966
|
]
|
|
843
|
-
: []), true), injectedOptionActionMenuItems, true) }));
|
|
967
|
+
: []), true), injectedOptionActionMenuItems, true), editorMenuItems, true) }));
|
|
844
968
|
// The absorbed siblings' controls, rendered inside this row.
|
|
845
969
|
//
|
|
846
970
|
// Each keeps its own label so it is still identifiable — it is a different
|
|
@@ -910,7 +1034,7 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
910
1034
|
}
|
|
911
1035
|
}, children: [panelMessages.length ?
|
|
912
1036
|
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreControlGroup, { className: 'options-readfirst-info-panel', vertical: true, fluid: true, gapSize: 'normal', children: panelMessages.map(renderInfoStrip) })
|
|
913
|
-
: null, absorbedNodes, renderOption(optionName, optionField, 'small', true)] }), (0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledRowActions, { children: [draftChip, editRowRevertButton, cancelEditButton, clearValueButton, inlineOptionActions.map(function (action, index) {
|
|
1037
|
+
: null, absorbedNodes, (0, jsx_runtime_1.jsx)(rowMenuContext_1.RowMenuContext.Provider, { value: rowMenu, children: renderOption(optionName, optionField, 'small', true) })] }), (0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledRowActions, { children: [draftChip, editRowRevertButton, cancelEditButton, clearValueButton, inlineOptionActions.map(function (action, index) {
|
|
914
1038
|
return renderInjectedOptionAction(action, index);
|
|
915
1039
|
}), moreMenu, closeExpandedFieldButton] }), clusterNode] }), optionName));
|
|
916
1040
|
// ALWAYS wrap the editing row in the same StyledColumn so its parent stays
|
|
@@ -968,7 +1092,7 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
968
1092
|
}
|
|
969
1093
|
}, children: (0, jsx_runtime_1.jsxs)(FocusedEditing_1.FocusedEditing, { isFullscreen: focusedEditing === optionName, onClose: function () { return setFocusedEditing(undefined); }, description: (schema === null || schema === void 0 ? void 0 : schema.display_name) || optionName, children: [focusedEditing === optionName ?
|
|
970
1094
|
(0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: schema === null || schema === void 0 ? void 0 : schema.desc, shortDescription: schema === null || schema === void 0 ? void 0 : schema.short_desc, longDescriptionShownByDefault: true })
|
|
971
|
-
: null, renderOption(optionName, optionField)] }) })] }, optionName));
|
|
1095
|
+
: null, (0, jsx_runtime_1.jsx)(rowMenuContext_1.RowMenuContext.Provider, { value: rowMenu, children: renderOption(optionName, optionField) })] }) })] }, optionName));
|
|
972
1096
|
}
|
|
973
1097
|
var formatted = (0, readFirst_1.formatOptionValue)(optionField, schema);
|
|
974
1098
|
var empty = formatted === '';
|
|
@@ -999,9 +1123,19 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
999
1123
|
: []), true);
|
|
1000
1124
|
// A hash row reveals its sub-fields as read-only sub-rows under a "view
|
|
1001
1125
|
// more" disclosure; the row itself still expands the real editor on click.
|
|
1126
|
+
/* An EXPRESSION is not a hash, whatever shape it is stored in.
|
|
1127
|
+
|
|
1128
|
+
`{is_expression: true, value: {exp, args}}` is hash-shaped, so a field
|
|
1129
|
+
holding one earned the structured inset and the row printed the syntax
|
|
1130
|
+
tree — `is_expression true / value / exp + / args 1 2` — directly under a
|
|
1131
|
+
summary line that already read `1 + 2`. The AST is how an expression is
|
|
1132
|
+
STORED, not what it is; the row's line is the whole value, and the
|
|
1133
|
+
expression editor is where its parts are looked at. Same exclusion, and
|
|
1134
|
+
for the same reason, as `schema-definition` beside it. */
|
|
1002
1135
|
var hashEntries = (!hidden &&
|
|
1003
1136
|
(valueType === 'hash' || valueType === 'free-hash') &&
|
|
1004
|
-
(schema === null || schema === void 0 ? void 0 : schema.ui_type) !== 'schema-definition'
|
|
1137
|
+
(schema === null || schema === void 0 ? void 0 : schema.ui_type) !== 'schema-definition' &&
|
|
1138
|
+
(0, readFirst_1.getExpressionAst)(optionField) === undefined) ?
|
|
1005
1139
|
(0, readFirst_1.getHashEntries)(optionField, schema)
|
|
1006
1140
|
: [];
|
|
1007
1141
|
// A LIST OF HASHES/objects gets the same expandable structured preview a hash
|
|
@@ -1043,6 +1177,18 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
1043
1177
|
valueType === 'richtext' &&
|
|
1044
1178
|
Array.isArray(optionField === null || optionField === void 0 ? void 0 : optionField.value) &&
|
|
1045
1179
|
(0, common_1.richtextToSegments)(optionField.value).some(function (segment) { return segment.kind === 'tag'; });
|
|
1180
|
+
/* The same pair, for a value that IS one template rather than prose with
|
|
1181
|
+
templates embedded in it. `showsTemplateChips` above closed the richtext
|
|
1182
|
+
case and left this one open: a chosen reference renders as
|
|
1183
|
+
`ReadOnlyTemplateTag`, which carries its own popover, while the row went
|
|
1184
|
+
on setting a native `title` holding the raw reference. Hovering fired
|
|
1185
|
+
both — two tooltips in two places, and the one that says something useful
|
|
1186
|
+
is not the one a screenshot captures. */
|
|
1187
|
+
var showsTemplateTag = !hidden &&
|
|
1188
|
+
typeof (optionField === null || optionField === void 0 ? void 0 : optionField.value) === 'string' &&
|
|
1189
|
+
!(optionField === null || optionField === void 0 ? void 0 : optionField.is_expression) &&
|
|
1190
|
+
((0, templates_1.isValueTemplate)(optionField.value) ||
|
|
1191
|
+
!!(0, templates_1.findTemplate)((_l = (_k = schema === null || schema === void 0 ? void 0 : schema.templates) !== null && _k !== void 0 ? _k : templates) !== null && _l !== void 0 ? _l : {}, optionField.value));
|
|
1046
1192
|
// Markdown reads the same way for the same reason: the row itself can only
|
|
1047
1193
|
// show a line of text, and for markdown that line is the SOURCE — the reader
|
|
1048
1194
|
// gets `## ` and `**` where the point of the value is what it looks like
|
|
@@ -1193,7 +1339,7 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
1193
1339
|
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreIcon, { icon: schema === null || schema === void 0 ? void 0 : schema.icon, image: schema === null || schema === void 0 ? void 0 : schema.image, size: '14px', className: 'options-readfirst-row-icon' })
|
|
1194
1340
|
: null;
|
|
1195
1341
|
var rowSchemaIntentColor = (schema === null || schema === void 0 ? void 0 : schema.intent) ?
|
|
1196
|
-
(
|
|
1342
|
+
(_m = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _m === void 0 ? void 0 : _m[schema.intent]
|
|
1197
1343
|
: undefined;
|
|
1198
1344
|
var rowStripeColor = (showStripe ? intentColor : undefined) || rowSchemaIntentColor;
|
|
1199
1345
|
// Intent stripe on the block ROOT so it spans the field's whole territory:
|
|
@@ -1208,7 +1354,7 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
1208
1354
|
// boxes — so the dot and the box can never disagree). Hidden (not-yet-added)
|
|
1209
1355
|
// and dependency-locked rows show no dot (the add/lock affordance speaks for
|
|
1210
1356
|
// them). worstIntent already folds in schema + validation messages.
|
|
1211
|
-
var cSuccess = (
|
|
1357
|
+
var cSuccess = (_o = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _o === void 0 ? void 0 : _o.success;
|
|
1212
1358
|
var rowStatus = (0, readFirst_1.getReadFirstStatus)({
|
|
1213
1359
|
empty: empty,
|
|
1214
1360
|
required: required,
|
|
@@ -1259,6 +1405,7 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
1259
1405
|
!showCodePreview &&
|
|
1260
1406
|
!showMarkdownPreview &&
|
|
1261
1407
|
!showsTemplateChips &&
|
|
1408
|
+
!showsTemplateTag &&
|
|
1262
1409
|
typeof formatted === 'string') ?
|
|
1263
1410
|
formatted
|
|
1264
1411
|
: undefined, "$color": empty || hidden ? "".concat(cMuted, "66") : cKey, "$empty": empty || hidden, children: [(showMarkdownPreview || showLongTextInset || (previewWithSchema && showStructuredPreview)) ?
|
|
@@ -1311,7 +1458,7 @@ exports.CompactRow = (0, react_1.memo)(function (_a) {
|
|
|
1311
1458
|
// consumer that registers nothing — the heading is
|
|
1312
1459
|
// accented either way, just in the theme's own colour
|
|
1313
1460
|
// rather than one this library picked.
|
|
1314
|
-
accent: ((
|
|
1461
|
+
accent: ((_p = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _p === void 0 ? void 0 : _p.custom1) || cInfo,
|
|
1315
1462
|
}, onItemClick: function () { return activate(); } })
|
|
1316
1463
|
: (0, jsx_runtime_1.jsx)(StructuredDataView_1.StructuredDataView, { value: optionField === null || optionField === void 0 ? void 0 : optionField.value, collapsibleRoot: false, showTypes: showFieldTypes, defaultExpandDepth: 2, onItemClick: function () { return activate(); } }) }) }) })
|
|
1317
1464
|
: null, showCodePreview ?
|