@uipath/apollo-react 7.21.1 → 7.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/dist/chat/styles/tailwind.chat.css +1 -1
- package/dist/decision-table/BandColumn.cjs +12 -3
- package/dist/decision-table/BandColumn.d.ts +3 -1
- package/dist/decision-table/BandColumn.d.ts.map +1 -1
- package/dist/decision-table/BandColumn.js +13 -4
- package/dist/decision-table/BandList.cjs +2 -1
- package/dist/decision-table/BandList.d.ts +1 -0
- package/dist/decision-table/BandList.d.ts.map +1 -1
- package/dist/decision-table/BandList.js +2 -1
- package/dist/decision-table/ConditionLine.cjs +7 -2
- package/dist/decision-table/ConditionLine.d.ts +2 -1
- package/dist/decision-table/ConditionLine.d.ts.map +1 -1
- package/dist/decision-table/ConditionLine.js +8 -3
- package/dist/decision-table/DecisionText.cjs +51 -6
- package/dist/decision-table/DecisionText.d.ts +12 -1
- package/dist/decision-table/DecisionText.d.ts.map +1 -1
- package/dist/decision-table/DecisionText.js +52 -7
- package/dist/decision-table/DecisionTextHeader.cjs +44 -2
- package/dist/decision-table/DecisionTextHeader.d.ts +5 -2
- package/dist/decision-table/DecisionTextHeader.d.ts.map +1 -1
- package/dist/decision-table/DecisionTextHeader.js +45 -3
- package/dist/decision-table/DiffFoldRow.cjs +59 -0
- package/dist/decision-table/DiffFoldRow.d.ts +13 -0
- package/dist/decision-table/DiffFoldRow.d.ts.map +1 -0
- package/dist/decision-table/DiffFoldRow.js +25 -0
- package/dist/decision-table/LineText.cjs +57 -15
- package/dist/decision-table/LineText.d.ts +3 -1
- package/dist/decision-table/LineText.d.ts.map +1 -1
- package/dist/decision-table/LineText.js +58 -16
- package/dist/decision-table/RuleCard.cjs +58 -13
- package/dist/decision-table/RuleCard.d.ts +2 -1
- package/dist/decision-table/RuleCard.d.ts.map +1 -1
- package/dist/decision-table/RuleCard.js +59 -14
- package/dist/decision-table/RuleLine.cjs +17 -1
- package/dist/decision-table/RuleLine.d.ts +3 -1
- package/dist/decision-table/RuleLine.d.ts.map +1 -1
- package/dist/decision-table/RuleLine.js +18 -2
- package/dist/decision-table/RuleList.cjs +17 -3
- package/dist/decision-table/RuleList.d.ts +5 -1
- package/dist/decision-table/RuleList.d.ts.map +1 -1
- package/dist/decision-table/RuleList.js +17 -3
- package/dist/decision-table/SentenceBands.cjs +2 -1
- package/dist/decision-table/SentenceBands.d.ts +1 -1
- package/dist/decision-table/SentenceBands.d.ts.map +1 -1
- package/dist/decision-table/SentenceBands.js +2 -1
- package/dist/decision-table/TokenChip.cjs +5 -3
- package/dist/decision-table/TokenChip.d.ts +2 -0
- package/dist/decision-table/TokenChip.d.ts.map +1 -1
- package/dist/decision-table/TokenChip.js +6 -4
- package/dist/decision-table/__fixtures__/diffSentences.fixtures.d.ts +17 -0
- package/dist/decision-table/__fixtures__/diffSentences.fixtures.d.ts.map +1 -0
- package/dist/decision-table/decisionTextDiff.cjs +379 -0
- package/dist/decision-table/decisionTextDiff.d.ts +106 -0
- package/dist/decision-table/decisionTextDiff.d.ts.map +1 -0
- package/dist/decision-table/decisionTextDiff.js +330 -0
- package/dist/decision-table/decisionTextTypes.d.ts +2 -1
- package/dist/decision-table/decisionTextTypes.d.ts.map +1 -1
- package/dist/decision-table/index.d.ts +1 -0
- package/dist/decision-table/index.d.ts.map +1 -1
- package/dist/decision-table/locales/de.cjs +1 -1
- package/dist/decision-table/locales/de.d.ts.map +1 -1
- package/dist/decision-table/locales/de.js +1 -1
- package/dist/decision-table/locales/en.cjs +1 -1
- package/dist/decision-table/locales/en.d.ts.map +1 -1
- package/dist/decision-table/locales/en.js +1 -1
- package/dist/decision-table/locales/es-MX.cjs +1 -1
- package/dist/decision-table/locales/es-MX.d.ts.map +1 -1
- package/dist/decision-table/locales/es-MX.js +1 -1
- package/dist/decision-table/locales/es.cjs +1 -1
- package/dist/decision-table/locales/es.d.ts.map +1 -1
- package/dist/decision-table/locales/es.js +1 -1
- package/dist/decision-table/locales/fr.cjs +1 -1
- package/dist/decision-table/locales/fr.d.ts.map +1 -1
- package/dist/decision-table/locales/fr.js +1 -1
- package/dist/decision-table/locales/ja.cjs +1 -1
- package/dist/decision-table/locales/ja.d.ts.map +1 -1
- package/dist/decision-table/locales/ja.js +1 -1
- package/dist/decision-table/locales/ko.cjs +1 -1
- package/dist/decision-table/locales/ko.d.ts.map +1 -1
- package/dist/decision-table/locales/ko.js +1 -1
- package/dist/decision-table/locales/pt-BR.cjs +1 -1
- package/dist/decision-table/locales/pt-BR.d.ts.map +1 -1
- package/dist/decision-table/locales/pt-BR.js +1 -1
- package/dist/decision-table/locales/pt.cjs +1 -1
- package/dist/decision-table/locales/pt.d.ts.map +1 -1
- package/dist/decision-table/locales/pt.js +1 -1
- package/dist/decision-table/locales/ro.cjs +1 -1
- package/dist/decision-table/locales/ro.d.ts.map +1 -1
- package/dist/decision-table/locales/ro.js +1 -1
- package/dist/decision-table/locales/ru.cjs +1 -1
- package/dist/decision-table/locales/ru.d.ts.map +1 -1
- package/dist/decision-table/locales/ru.js +1 -1
- package/dist/decision-table/locales/tr.cjs +1 -1
- package/dist/decision-table/locales/tr.d.ts.map +1 -1
- package/dist/decision-table/locales/tr.js +1 -1
- package/dist/decision-table/locales/zh-CN.cjs +1 -1
- package/dist/decision-table/locales/zh-CN.d.ts.map +1 -1
- package/dist/decision-table/locales/zh-CN.js +1 -1
- package/dist/decision-table/locales/zh-TW.cjs +1 -1
- package/dist/decision-table/locales/zh-TW.d.ts.map +1 -1
- package/dist/decision-table/locales/zh-TW.js +1 -1
- package/dist/decision-table/ruleCardModel.cjs +19 -9
- package/dist/decision-table/ruleCardModel.d.ts +7 -3
- package/dist/decision-table/ruleCardModel.d.ts.map +1 -1
- package/dist/decision-table/ruleCardModel.js +19 -9
- package/dist/decision-table/sentenceParts.cjs +31 -10
- package/dist/decision-table/sentenceParts.d.ts +2 -1
- package/dist/decision-table/sentenceParts.d.ts.map +1 -1
- package/dist/decision-table/sentenceParts.js +29 -11
- package/dist/decision-table/sentenceStyles.cjs +57 -9
- package/dist/decision-table/sentenceStyles.d.ts +13 -1
- package/dist/decision-table/sentenceStyles.d.ts.map +1 -1
- package/dist/decision-table/sentenceStyles.js +14 -2
- package/dist/decision-table/styles/tailwind.decision-table.css +1 -1
- package/dist/decision-table/useDecisionTextStrings.cjs +45 -0
- package/dist/decision-table/useDecisionTextStrings.d.ts.map +1 -1
- package/dist/decision-table/useDecisionTextStrings.js +45 -0
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const messages = JSON.parse("{\"decision-table.drag_column\":[\"Drag to reorder whole column\"],\"decision-table.drag_row\":[\"Drag to reorder whole row\"],\"decision-table.insert_column_left\":[\"Insert column left\"],\"decision-table.insert_row_above\":[\"Insert row above\"],\"decision-text.add_condition\":[\"Add condition to rule \",[\"position\"]],\"decision-text.add_input\":[\"Add input column\"],\"decision-text.add_value\":[\"Add value\"],\"decision-text.allowed_values\":[\"Allowed values\"],\"decision-text.allowed_values_hint\":[\"Separate values with commas.\"],\"decision-text.apply\":[\"Apply\"],\"decision-text.band_inputs\":[\"Inputs\"],\"decision-text.band_outputs\":[\"Outputs\"],\"decision-text.cancel\":[\"Cancel\"],\"decision-text.cell\":[[\"cell\"],\", rule \",[\"position\"]],\"decision-text.clear\":[\"Clear\"],\"decision-text.clear_outcome\":[\"Clear \",[\"column\"],\" in rule \",[\"position\"]],\"decision-text.clear_rule\":[\"Clear rule\"],\"decision-text.column_label\":[\"Label\"],\"decision-text.condition_matched\":[\"Matched\"],\"decision-text.condition_not_matched\":[\"Not matched\"],\"decision-text.data_type\":[\"Data type\"],\"decision-text.delete_rule\":[\"Delete rule \",[\"position\"]],\"decision-text.duplicate_rule\":[\"Duplicate rule\"],\"decision-text.edit_expression\":[\"Edit expression\"],\"decision-text.empty_rules\":[\"No rules yet\"],\"decision-text.empty_value\":[\"empty\"],\"decision-text.ends_out_of_order\":[\"From must not be past To\"],\"decision-text.included\":[\"Included\"],\"decision-text.input_column\":[\"Input · \",[\"name\"]],\"decision-text.input_expression\":[\"Input expression\"],\"decision-text.insert_rule_above\":[\"Insert rule above\"],\"decision-text.insert_rule_below\":[\"Insert rule below\"],\"decision-text.mark_error\":[\"Error\"],\"decision-text.mark_status\":[[\"status\"],\": \",[\"message\"]],\"decision-text.mark_warning\":[\"Warning\"],\"decision-text.missing_end\":[\"Enter both ends\"],\"decision-text.missing_input_expression\":[\"This input column has no expression\"],\"decision-text.missing_label\":[\"Enter a label\"],\"decision-text.missing_output_name\":[\"This output column has no name — every output in a multi-output table must be named\"],\"decision-text.missing_value\":[\"Enter a value\"],\"decision-text.more_properties\":[\"More properties\"],\"decision-text.more_values\":[[\"count\",\"plural\",{\"other\":[\"+\",\"#\",\" more\"]}]],\"decision-text.move_rule_down\":[\"Move down\"],\"decision-text.move_rule_up\":[\"Move up\"],\"decision-text.new_condition\":[\"New \",[\"column\"],\" condition, rule \",[\"position\"]],\"decision-text.no_value_checked\":[\"Check a value\"],\"decision-text.not_allowed\":[\"Not one of the allowed values\"],\"decision-text.open_decision\":[\"Open \",[\"input\"],\"'s decision\"],\"decision-text.operator\":[\"Operator\"],\"decision-text.output_column\":[\"Output · \",[\"name\"]],\"decision-text.output_name\":[\"Output name\"],\"decision-text.range_high\":[\"To\"],\"decision-text.range_low\":[\"From\"],\"decision-text.remove_condition\":[\"Remove \",[\"column\"],\" from rule \",[\"position\"]],\"decision-text.rule_actions\":[\"Rule \",[\"position\"],\" actions\"],\"decision-text.set_value\":[\"Set a value\"]}");
|
|
1
|
+
const messages = JSON.parse("{\"decision-table.drag_column\":[\"Drag to reorder whole column\"],\"decision-table.drag_row\":[\"Drag to reorder whole row\"],\"decision-table.insert_column_left\":[\"Insert column left\"],\"decision-table.insert_row_above\":[\"Insert row above\"],\"decision-text.add_condition\":[\"Add condition to rule \",[\"position\"]],\"decision-text.add_input\":[\"Add input column\"],\"decision-text.add_value\":[\"Add value\"],\"decision-text.allowed_values\":[\"Allowed values\"],\"decision-text.allowed_values_hint\":[\"Separate values with commas.\"],\"decision-text.apply\":[\"Apply\"],\"decision-text.band_inputs\":[\"Inputs\"],\"decision-text.band_outputs\":[\"Outputs\"],\"decision-text.cancel\":[\"Cancel\"],\"decision-text.cell\":[[\"cell\"],\", rule \",[\"position\"]],\"decision-text.change_add\":[\"Added\"],\"decision-text.change_delete\":[\"Removed\"],\"decision-text.change_update\":[\"Changed\"],\"decision-text.clear\":[\"Clear\"],\"decision-text.clear_outcome\":[\"Clear \",[\"column\"],\" in rule \",[\"position\"]],\"decision-text.clear_rule\":[\"Clear rule\"],\"decision-text.column_label\":[\"Label\"],\"decision-text.condition_matched\":[\"Matched\"],\"decision-text.condition_not_matched\":[\"Not matched\"],\"decision-text.current_value\":[\"now\"],\"decision-text.data_type\":[\"Data type\"],\"decision-text.delete_rule\":[\"Delete rule \",[\"position\"]],\"decision-text.duplicate_rule\":[\"Duplicate rule\"],\"decision-text.edit_expression\":[\"Edit expression\"],\"decision-text.empty_rules\":[\"No rules yet\"],\"decision-text.empty_value\":[\"empty\"],\"decision-text.ends_out_of_order\":[\"From must not be past To\"],\"decision-text.included\":[\"Included\"],\"decision-text.input_column\":[\"Input · \",[\"name\"]],\"decision-text.input_expression\":[\"Input expression\"],\"decision-text.insert_rule_above\":[\"Insert rule above\"],\"decision-text.insert_rule_below\":[\"Insert rule below\"],\"decision-text.mark_error\":[\"Error\"],\"decision-text.mark_status\":[[\"status\"],\": \",[\"message\"]],\"decision-text.mark_warning\":[\"Warning\"],\"decision-text.missing_end\":[\"Enter both ends\"],\"decision-text.missing_input_expression\":[\"This input column has no expression\"],\"decision-text.missing_label\":[\"Enter a label\"],\"decision-text.missing_output_name\":[\"This output column has no name — every output in a multi-output table must be named\"],\"decision-text.missing_value\":[\"Enter a value\"],\"decision-text.more_properties\":[\"More properties\"],\"decision-text.more_values\":[[\"count\",\"plural\",{\"other\":[\"+\",\"#\",\" more\"]}]],\"decision-text.move_rule_down\":[\"Move down\"],\"decision-text.move_rule_up\":[\"Move up\"],\"decision-text.moved_from\":[\"Moved from rule \",[\"number\"]],\"decision-text.new_condition\":[\"New \",[\"column\"],\" condition, rule \",[\"position\"]],\"decision-text.no_value_checked\":[\"Check a value\"],\"decision-text.not_allowed\":[\"Not one of the allowed values\"],\"decision-text.open_decision\":[\"Open \",[\"input\"],\"'s decision\"],\"decision-text.operator\":[\"Operator\"],\"decision-text.output_column\":[\"Output · \",[\"name\"]],\"decision-text.output_name\":[\"Output name\"],\"decision-text.previous_value\":[\"was\"],\"decision-text.range_high\":[\"To\"],\"decision-text.range_low\":[\"From\"],\"decision-text.remove_condition\":[\"Remove \",[\"column\"],\" from rule \",[\"position\"]],\"decision-text.rule_actions\":[\"Rule \",[\"position\"],\" actions\"],\"decision-text.set_value\":[\"Set a value\"],\"decision-text.show_rules\":[\"Show rules \",[\"from\"],\"–\",[\"to\"]],\"decision-text.unchanged_rules\":[[\"count\",\"plural\",{\"one\":[\"#\",\" unchanged rule\"],\"other\":[\"#\",\" unchanged rules\"]}]]}");
|
|
2
2
|
export { messages };
|
|
@@ -26,7 +26,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
27
|
messages: ()=>messages
|
|
28
28
|
});
|
|
29
|
-
const messages = JSON.parse("{\"decision-table.drag_column\":[\"Drag to reorder whole column\"],\"decision-table.drag_row\":[\"Drag to reorder whole row\"],\"decision-table.insert_column_left\":[\"Insert column left\"],\"decision-table.insert_row_above\":[\"Insert row above\"],\"decision-text.add_condition\":[\"Add condition to rule \",[\"position\"]],\"decision-text.add_input\":[\"Add input column\"],\"decision-text.add_value\":[\"Add value\"],\"decision-text.allowed_values\":[\"Allowed values\"],\"decision-text.allowed_values_hint\":[\"Separate values with commas.\"],\"decision-text.apply\":[\"Apply\"],\"decision-text.band_inputs\":[\"Inputs\"],\"decision-text.band_outputs\":[\"Outputs\"],\"decision-text.cancel\":[\"Cancel\"],\"decision-text.cell\":[[\"cell\"],\", rule \",[\"position\"]],\"decision-text.clear\":[\"Clear\"],\"decision-text.clear_outcome\":[\"Clear \",[\"column\"],\" in rule \",[\"position\"]],\"decision-text.clear_rule\":[\"Clear rule\"],\"decision-text.column_label\":[\"Label\"],\"decision-text.condition_matched\":[\"Matched\"],\"decision-text.condition_not_matched\":[\"Not matched\"],\"decision-text.data_type\":[\"Data type\"],\"decision-text.delete_rule\":[\"Delete rule \",[\"position\"]],\"decision-text.duplicate_rule\":[\"Duplicate rule\"],\"decision-text.edit_expression\":[\"Edit expression\"],\"decision-text.empty_rules\":[\"No rules yet\"],\"decision-text.empty_value\":[\"empty\"],\"decision-text.ends_out_of_order\":[\"From must not be past To\"],\"decision-text.included\":[\"Included\"],\"decision-text.input_column\":[\"Input · \",[\"name\"]],\"decision-text.input_expression\":[\"Input expression\"],\"decision-text.insert_rule_above\":[\"Insert rule above\"],\"decision-text.insert_rule_below\":[\"Insert rule below\"],\"decision-text.mark_error\":[\"Error\"],\"decision-text.mark_status\":[[\"status\"],\": \",[\"message\"]],\"decision-text.mark_warning\":[\"Warning\"],\"decision-text.missing_end\":[\"Enter both ends\"],\"decision-text.missing_input_expression\":[\"This input column has no expression\"],\"decision-text.missing_label\":[\"Enter a label\"],\"decision-text.missing_output_name\":[\"This output column has no name — every output in a multi-output table must be named\"],\"decision-text.missing_value\":[\"Enter a value\"],\"decision-text.more_properties\":[\"More properties\"],\"decision-text.more_values\":[[\"count\",\"plural\",{\"other\":[\"+\",\"#\",\" more\"]}]],\"decision-text.move_rule_down\":[\"Move down\"],\"decision-text.move_rule_up\":[\"Move up\"],\"decision-text.new_condition\":[\"New \",[\"column\"],\" condition, rule \",[\"position\"]],\"decision-text.no_value_checked\":[\"Check a value\"],\"decision-text.not_allowed\":[\"Not one of the allowed values\"],\"decision-text.open_decision\":[\"Open \",[\"input\"],\"'s decision\"],\"decision-text.operator\":[\"Operator\"],\"decision-text.output_column\":[\"Output · \",[\"name\"]],\"decision-text.output_name\":[\"Output name\"],\"decision-text.range_high\":[\"To\"],\"decision-text.range_low\":[\"From\"],\"decision-text.remove_condition\":[\"Remove \",[\"column\"],\" from rule \",[\"position\"]],\"decision-text.rule_actions\":[\"Rule \",[\"position\"],\" actions\"],\"decision-text.set_value\":[\"Set a value\"]}");
|
|
29
|
+
const messages = JSON.parse("{\"decision-table.drag_column\":[\"Drag to reorder whole column\"],\"decision-table.drag_row\":[\"Drag to reorder whole row\"],\"decision-table.insert_column_left\":[\"Insert column left\"],\"decision-table.insert_row_above\":[\"Insert row above\"],\"decision-text.add_condition\":[\"Add condition to rule \",[\"position\"]],\"decision-text.add_input\":[\"Add input column\"],\"decision-text.add_value\":[\"Add value\"],\"decision-text.allowed_values\":[\"Allowed values\"],\"decision-text.allowed_values_hint\":[\"Separate values with commas.\"],\"decision-text.apply\":[\"Apply\"],\"decision-text.band_inputs\":[\"Inputs\"],\"decision-text.band_outputs\":[\"Outputs\"],\"decision-text.cancel\":[\"Cancel\"],\"decision-text.cell\":[[\"cell\"],\", rule \",[\"position\"]],\"decision-text.change_add\":[\"Added\"],\"decision-text.change_delete\":[\"Removed\"],\"decision-text.change_update\":[\"Changed\"],\"decision-text.clear\":[\"Clear\"],\"decision-text.clear_outcome\":[\"Clear \",[\"column\"],\" in rule \",[\"position\"]],\"decision-text.clear_rule\":[\"Clear rule\"],\"decision-text.column_label\":[\"Label\"],\"decision-text.condition_matched\":[\"Matched\"],\"decision-text.condition_not_matched\":[\"Not matched\"],\"decision-text.current_value\":[\"now\"],\"decision-text.data_type\":[\"Data type\"],\"decision-text.delete_rule\":[\"Delete rule \",[\"position\"]],\"decision-text.duplicate_rule\":[\"Duplicate rule\"],\"decision-text.edit_expression\":[\"Edit expression\"],\"decision-text.empty_rules\":[\"No rules yet\"],\"decision-text.empty_value\":[\"empty\"],\"decision-text.ends_out_of_order\":[\"From must not be past To\"],\"decision-text.included\":[\"Included\"],\"decision-text.input_column\":[\"Input · \",[\"name\"]],\"decision-text.input_expression\":[\"Input expression\"],\"decision-text.insert_rule_above\":[\"Insert rule above\"],\"decision-text.insert_rule_below\":[\"Insert rule below\"],\"decision-text.mark_error\":[\"Error\"],\"decision-text.mark_status\":[[\"status\"],\": \",[\"message\"]],\"decision-text.mark_warning\":[\"Warning\"],\"decision-text.missing_end\":[\"Enter both ends\"],\"decision-text.missing_input_expression\":[\"This input column has no expression\"],\"decision-text.missing_label\":[\"Enter a label\"],\"decision-text.missing_output_name\":[\"This output column has no name — every output in a multi-output table must be named\"],\"decision-text.missing_value\":[\"Enter a value\"],\"decision-text.more_properties\":[\"More properties\"],\"decision-text.more_values\":[[\"count\",\"plural\",{\"other\":[\"+\",\"#\",\" more\"]}]],\"decision-text.move_rule_down\":[\"Move down\"],\"decision-text.move_rule_up\":[\"Move up\"],\"decision-text.moved_from\":[\"Moved from rule \",[\"number\"]],\"decision-text.new_condition\":[\"New \",[\"column\"],\" condition, rule \",[\"position\"]],\"decision-text.no_value_checked\":[\"Check a value\"],\"decision-text.not_allowed\":[\"Not one of the allowed values\"],\"decision-text.open_decision\":[\"Open \",[\"input\"],\"'s decision\"],\"decision-text.operator\":[\"Operator\"],\"decision-text.output_column\":[\"Output · \",[\"name\"]],\"decision-text.output_name\":[\"Output name\"],\"decision-text.previous_value\":[\"was\"],\"decision-text.range_high\":[\"To\"],\"decision-text.range_low\":[\"From\"],\"decision-text.remove_condition\":[\"Remove \",[\"column\"],\" from rule \",[\"position\"]],\"decision-text.rule_actions\":[\"Rule \",[\"position\"],\" actions\"],\"decision-text.set_value\":[\"Set a value\"],\"decision-text.show_rules\":[\"Show rules \",[\"from\"],\"–\",[\"to\"]],\"decision-text.unchanged_rules\":[[\"count\",\"plural\",{\"one\":[\"#\",\" unchanged rule\"],\"other\":[\"#\",\" unchanged rules\"]}]]}");
|
|
30
30
|
exports.messages = __webpack_exports__.messages;
|
|
31
31
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
32
32
|
"messages"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh-TW.d.ts","sourceRoot":"","sources":["../../../src/decision-table/locales/zh-TW.ts"],"names":[],"mappings":"AAAkB,OAAO,KAAI,EAAC,QAAQ,EAAC,MAAI,cAAc,CAAC;AAAA,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"zh-TW.d.ts","sourceRoot":"","sources":["../../../src/decision-table/locales/zh-TW.ts"],"names":[],"mappings":"AAAkB,OAAO,KAAI,EAAC,QAAQ,EAAC,MAAI,cAAc,CAAC;AAAA,eAAO,MAAM,QAAQ,EAA2pH,QAAQ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const messages = JSON.parse("{\"decision-table.drag_column\":[\"Drag to reorder whole column\"],\"decision-table.drag_row\":[\"Drag to reorder whole row\"],\"decision-table.insert_column_left\":[\"Insert column left\"],\"decision-table.insert_row_above\":[\"Insert row above\"],\"decision-text.add_condition\":[\"Add condition to rule \",[\"position\"]],\"decision-text.add_input\":[\"Add input column\"],\"decision-text.add_value\":[\"Add value\"],\"decision-text.allowed_values\":[\"Allowed values\"],\"decision-text.allowed_values_hint\":[\"Separate values with commas.\"],\"decision-text.apply\":[\"Apply\"],\"decision-text.band_inputs\":[\"Inputs\"],\"decision-text.band_outputs\":[\"Outputs\"],\"decision-text.cancel\":[\"Cancel\"],\"decision-text.cell\":[[\"cell\"],\", rule \",[\"position\"]],\"decision-text.clear\":[\"Clear\"],\"decision-text.clear_outcome\":[\"Clear \",[\"column\"],\" in rule \",[\"position\"]],\"decision-text.clear_rule\":[\"Clear rule\"],\"decision-text.column_label\":[\"Label\"],\"decision-text.condition_matched\":[\"Matched\"],\"decision-text.condition_not_matched\":[\"Not matched\"],\"decision-text.data_type\":[\"Data type\"],\"decision-text.delete_rule\":[\"Delete rule \",[\"position\"]],\"decision-text.duplicate_rule\":[\"Duplicate rule\"],\"decision-text.edit_expression\":[\"Edit expression\"],\"decision-text.empty_rules\":[\"No rules yet\"],\"decision-text.empty_value\":[\"empty\"],\"decision-text.ends_out_of_order\":[\"From must not be past To\"],\"decision-text.included\":[\"Included\"],\"decision-text.input_column\":[\"Input · \",[\"name\"]],\"decision-text.input_expression\":[\"Input expression\"],\"decision-text.insert_rule_above\":[\"Insert rule above\"],\"decision-text.insert_rule_below\":[\"Insert rule below\"],\"decision-text.mark_error\":[\"Error\"],\"decision-text.mark_status\":[[\"status\"],\": \",[\"message\"]],\"decision-text.mark_warning\":[\"Warning\"],\"decision-text.missing_end\":[\"Enter both ends\"],\"decision-text.missing_input_expression\":[\"This input column has no expression\"],\"decision-text.missing_label\":[\"Enter a label\"],\"decision-text.missing_output_name\":[\"This output column has no name — every output in a multi-output table must be named\"],\"decision-text.missing_value\":[\"Enter a value\"],\"decision-text.more_properties\":[\"More properties\"],\"decision-text.more_values\":[[\"count\",\"plural\",{\"other\":[\"+\",\"#\",\" more\"]}]],\"decision-text.move_rule_down\":[\"Move down\"],\"decision-text.move_rule_up\":[\"Move up\"],\"decision-text.new_condition\":[\"New \",[\"column\"],\" condition, rule \",[\"position\"]],\"decision-text.no_value_checked\":[\"Check a value\"],\"decision-text.not_allowed\":[\"Not one of the allowed values\"],\"decision-text.open_decision\":[\"Open \",[\"input\"],\"'s decision\"],\"decision-text.operator\":[\"Operator\"],\"decision-text.output_column\":[\"Output · \",[\"name\"]],\"decision-text.output_name\":[\"Output name\"],\"decision-text.range_high\":[\"To\"],\"decision-text.range_low\":[\"From\"],\"decision-text.remove_condition\":[\"Remove \",[\"column\"],\" from rule \",[\"position\"]],\"decision-text.rule_actions\":[\"Rule \",[\"position\"],\" actions\"],\"decision-text.set_value\":[\"Set a value\"]}");
|
|
1
|
+
const messages = JSON.parse("{\"decision-table.drag_column\":[\"Drag to reorder whole column\"],\"decision-table.drag_row\":[\"Drag to reorder whole row\"],\"decision-table.insert_column_left\":[\"Insert column left\"],\"decision-table.insert_row_above\":[\"Insert row above\"],\"decision-text.add_condition\":[\"Add condition to rule \",[\"position\"]],\"decision-text.add_input\":[\"Add input column\"],\"decision-text.add_value\":[\"Add value\"],\"decision-text.allowed_values\":[\"Allowed values\"],\"decision-text.allowed_values_hint\":[\"Separate values with commas.\"],\"decision-text.apply\":[\"Apply\"],\"decision-text.band_inputs\":[\"Inputs\"],\"decision-text.band_outputs\":[\"Outputs\"],\"decision-text.cancel\":[\"Cancel\"],\"decision-text.cell\":[[\"cell\"],\", rule \",[\"position\"]],\"decision-text.change_add\":[\"Added\"],\"decision-text.change_delete\":[\"Removed\"],\"decision-text.change_update\":[\"Changed\"],\"decision-text.clear\":[\"Clear\"],\"decision-text.clear_outcome\":[\"Clear \",[\"column\"],\" in rule \",[\"position\"]],\"decision-text.clear_rule\":[\"Clear rule\"],\"decision-text.column_label\":[\"Label\"],\"decision-text.condition_matched\":[\"Matched\"],\"decision-text.condition_not_matched\":[\"Not matched\"],\"decision-text.current_value\":[\"now\"],\"decision-text.data_type\":[\"Data type\"],\"decision-text.delete_rule\":[\"Delete rule \",[\"position\"]],\"decision-text.duplicate_rule\":[\"Duplicate rule\"],\"decision-text.edit_expression\":[\"Edit expression\"],\"decision-text.empty_rules\":[\"No rules yet\"],\"decision-text.empty_value\":[\"empty\"],\"decision-text.ends_out_of_order\":[\"From must not be past To\"],\"decision-text.included\":[\"Included\"],\"decision-text.input_column\":[\"Input · \",[\"name\"]],\"decision-text.input_expression\":[\"Input expression\"],\"decision-text.insert_rule_above\":[\"Insert rule above\"],\"decision-text.insert_rule_below\":[\"Insert rule below\"],\"decision-text.mark_error\":[\"Error\"],\"decision-text.mark_status\":[[\"status\"],\": \",[\"message\"]],\"decision-text.mark_warning\":[\"Warning\"],\"decision-text.missing_end\":[\"Enter both ends\"],\"decision-text.missing_input_expression\":[\"This input column has no expression\"],\"decision-text.missing_label\":[\"Enter a label\"],\"decision-text.missing_output_name\":[\"This output column has no name — every output in a multi-output table must be named\"],\"decision-text.missing_value\":[\"Enter a value\"],\"decision-text.more_properties\":[\"More properties\"],\"decision-text.more_values\":[[\"count\",\"plural\",{\"other\":[\"+\",\"#\",\" more\"]}]],\"decision-text.move_rule_down\":[\"Move down\"],\"decision-text.move_rule_up\":[\"Move up\"],\"decision-text.moved_from\":[\"Moved from rule \",[\"number\"]],\"decision-text.new_condition\":[\"New \",[\"column\"],\" condition, rule \",[\"position\"]],\"decision-text.no_value_checked\":[\"Check a value\"],\"decision-text.not_allowed\":[\"Not one of the allowed values\"],\"decision-text.open_decision\":[\"Open \",[\"input\"],\"'s decision\"],\"decision-text.operator\":[\"Operator\"],\"decision-text.output_column\":[\"Output · \",[\"name\"]],\"decision-text.output_name\":[\"Output name\"],\"decision-text.previous_value\":[\"was\"],\"decision-text.range_high\":[\"To\"],\"decision-text.range_low\":[\"From\"],\"decision-text.remove_condition\":[\"Remove \",[\"column\"],\" from rule \",[\"position\"]],\"decision-text.rule_actions\":[\"Rule \",[\"position\"],\" actions\"],\"decision-text.set_value\":[\"Set a value\"],\"decision-text.show_rules\":[\"Show rules \",[\"from\"],\"–\",[\"to\"]],\"decision-text.unchanged_rules\":[[\"count\",\"plural\",{\"one\":[\"#\",\" unchanged rule\"],\"other\":[\"#\",\" unchanged rules\"]}]]}");
|
|
2
2
|
export { messages };
|
|
@@ -54,8 +54,8 @@ const verdictOf = (rule, columnId, cells, labels)=>{
|
|
|
54
54
|
const matched = (0, external_sentenceParts_cjs_namespaceObject.isOutcome)(rule, columnId) ? void 0 : cells?.[columnId]?.matched;
|
|
55
55
|
return void 0 === matched ? '' : labels.conditionVerdict(matched);
|
|
56
56
|
};
|
|
57
|
-
const shownValuesOf = (parts, columnId, labels)=>{
|
|
58
|
-
const { shown, clamped } = (0, external_sentenceParts_cjs_namespaceObject.boundedParts)(parts, external_sentenceParts_cjs_namespaceObject.SENTENCE_LINE_VALUE_LIMIT);
|
|
57
|
+
const shownValuesOf = (parts, columnId, labels, changed)=>{
|
|
58
|
+
const { shown, clamped } = (0, external_sentenceParts_cjs_namespaceObject.boundedParts)(parts, external_sentenceParts_cjs_namespaceObject.SENTENCE_LINE_VALUE_LIMIT, changed);
|
|
59
59
|
const isCell = (part)=>'string' != typeof part && 'value' === part.kind && part.columnId === columnId;
|
|
60
60
|
const indexes = shown.flatMap((part, index)=>isCell(part) ? [
|
|
61
61
|
index
|
|
@@ -65,8 +65,8 @@ const shownValuesOf = (parts, columnId, labels)=>{
|
|
|
65
65
|
const hidden = clamped.reduce((count, run)=>run.hidden.some(isCell) ? count + run.hiddenValues : count, 0);
|
|
66
66
|
return hidden > 0 ? `${text} ${labels.moreValues(hidden)}` : text;
|
|
67
67
|
};
|
|
68
|
-
const shownLineText = (parts, labels)=>{
|
|
69
|
-
const { shown, clamped } = (0, external_sentenceParts_cjs_namespaceObject.boundedParts)(parts, external_sentenceParts_cjs_namespaceObject.SENTENCE_LINE_VALUE_LIMIT);
|
|
68
|
+
const shownLineText = (parts, labels, changed)=>{
|
|
69
|
+
const { shown, clamped } = (0, external_sentenceParts_cjs_namespaceObject.boundedParts)(parts, external_sentenceParts_cjs_namespaceObject.SENTENCE_LINE_VALUE_LIMIT, changed);
|
|
70
70
|
const cuts = clamped.map(({ after })=>shown.length - after.length);
|
|
71
71
|
return [
|
|
72
72
|
...clamped.map(({ hiddenValues }, index)=>`${(0, external_sentenceParts_cjs_namespaceObject.partsText)(shown.slice(cuts[index - 1] ?? 0, cuts[index]))} ${labels.moreValues(hiddenValues)}`),
|
|
@@ -83,8 +83,14 @@ const inputColumnIds = (parts)=>[
|
|
|
83
83
|
part.columnId
|
|
84
84
|
] : []))
|
|
85
85
|
];
|
|
86
|
-
const ruleCardModel = ({ rule, position, numbered, mark, selectable, decisionLinks, idPrefix, labels, editLabels })=>{
|
|
86
|
+
const ruleCardModel = ({ rule, position, numbered, mark, selectable, decisionLinks, idPrefix, labels, editLabels, diff })=>{
|
|
87
87
|
const id = `${idPrefix}-${position}`;
|
|
88
|
+
const number = diff ? diff.number : position;
|
|
89
|
+
const changed = (token)=>diff?.tokens.has(token) === true;
|
|
90
|
+
const changeStatus = [
|
|
91
|
+
diff?.change && labels.changeStatus(diff.change),
|
|
92
|
+
diff?.movedFrom !== void 0 && labels.movedFrom(diff.movedFrom)
|
|
93
|
+
].filter(Boolean).join(', ');
|
|
88
94
|
const { tone, dim, title, cells } = cardMark(mark);
|
|
89
95
|
const stops = selectable ? [
|
|
90
96
|
...firstValuesOf(rule)
|
|
@@ -92,7 +98,7 @@ const ruleCardModel = ({ rule, position, numbered, mark, selectable, decisionLin
|
|
|
92
98
|
token,
|
|
93
99
|
labelId: `${id}-cell-${index}`,
|
|
94
100
|
label: [
|
|
95
|
-
labels.cell((0, external_sentenceParts_cjs_namespaceObject.columnNameOf)(rule, columnId), shownValuesOf(parts, columnId, labels), position),
|
|
101
|
+
labels.cell((0, external_sentenceParts_cjs_namespaceObject.columnNameOf)(rule, columnId), shownValuesOf(parts, columnId, labels, changed), position),
|
|
96
102
|
verdictOf(rule, columnId, cells, labels)
|
|
97
103
|
].filter(Boolean).join(' '),
|
|
98
104
|
editable: void 0 !== editLabels
|
|
@@ -125,10 +131,13 @@ const ruleCardModel = ({ rule, position, numbered, mark, selectable, decisionLin
|
|
|
125
131
|
dim,
|
|
126
132
|
title,
|
|
127
133
|
cells,
|
|
134
|
+
number: numbered ? number : null,
|
|
135
|
+
changeStatus,
|
|
128
136
|
ariaLabel: [
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
shownLineText(rule.
|
|
137
|
+
changeStatus,
|
|
138
|
+
numbered && null !== number ? String(number) : '',
|
|
139
|
+
shownLineText(rule.heading, labels, changed),
|
|
140
|
+
shownLineText(rule.lead, labels, changed)
|
|
132
141
|
].filter(Boolean).join(' '),
|
|
133
142
|
describedBy: [
|
|
134
143
|
badges.heading,
|
|
@@ -137,6 +146,7 @@ const ruleCardModel = ({ rule, position, numbered, mark, selectable, decisionLin
|
|
|
137
146
|
].flatMap((badge)=>badge ? (0, external_MarkBadge_cjs_namespaceObject.markIds)(badge.id, badge.marks) : []).join(' ') || void 0,
|
|
138
147
|
stops,
|
|
139
148
|
stopOf: (token)=>stopByToken.get(token),
|
|
149
|
+
diffOf: (token)=>diff?.tokens.get(token),
|
|
140
150
|
linkOf: (token)=>decisionLinks && 'input' === token.kind && void 0 !== token.producedBy ? {
|
|
141
151
|
decisionId: token.producedBy,
|
|
142
152
|
label: labels.openDecision(token.text),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { DiffLabels, RuleDiff } from './decisionTextDiff';
|
|
1
2
|
import type { LineTextLabels, LineTextProps } from './LineText';
|
|
2
3
|
import type { MarkBadgeLabels, MarkBadgeProps } from './MarkBadge';
|
|
3
4
|
import type { RowMark } from './marks';
|
|
4
5
|
import type { RemoveConditionButtonProps } from './RemoveConditionButton';
|
|
5
6
|
import type { SentencePart, SentenceRule, SentenceToken } from './sentenceTypes';
|
|
6
7
|
import type { CellStop } from './TokenChip';
|
|
7
|
-
export interface RuleCardLabels extends MarkBadgeLabels, LineTextLabels {
|
|
8
|
+
export interface RuleCardLabels extends MarkBadgeLabels, LineTextLabels, Pick<DiffLabels, 'movedFrom'> {
|
|
8
9
|
cell: (column: string, values: string, position: number) => string;
|
|
9
10
|
emptyValue: string;
|
|
10
11
|
openDecision: (input: string) => string;
|
|
@@ -36,16 +37,19 @@ export interface RuleCardModelParams {
|
|
|
36
37
|
selectable: boolean;
|
|
37
38
|
decisionLinks: boolean;
|
|
38
39
|
editLabels: RuleRemovalLabels | undefined;
|
|
40
|
+
diff: RuleDiff | undefined;
|
|
39
41
|
idPrefix: string;
|
|
40
42
|
labels: RuleCardLabels;
|
|
41
43
|
}
|
|
42
|
-
interface RuleCardModel extends Pick<RowMark, 'tone' | 'dim' | 'title' | 'cells'>, Pick<LineTextProps, 'stopOf' | 'linkOf'> {
|
|
44
|
+
interface RuleCardModel extends Pick<RowMark, 'tone' | 'dim' | 'title' | 'cells'>, Pick<LineTextProps, 'stopOf' | 'linkOf' | 'diffOf'> {
|
|
43
45
|
ariaLabel: string;
|
|
46
|
+
number: number | null;
|
|
47
|
+
changeStatus: string;
|
|
44
48
|
describedBy: string | undefined;
|
|
45
49
|
stops: CellStop[];
|
|
46
50
|
badges: RuleBadges;
|
|
47
51
|
removals: RuleRemovals;
|
|
48
52
|
}
|
|
49
|
-
export declare const ruleCardModel: ({ rule, position, numbered, mark, selectable, decisionLinks, idPrefix, labels, editLabels, }: RuleCardModelParams) => RuleCardModel;
|
|
53
|
+
export declare const ruleCardModel: ({ rule, position, numbered, mark, selectable, decisionLinks, idPrefix, labels, editLabels, diff, }: RuleCardModelParams) => RuleCardModel;
|
|
50
54
|
export {};
|
|
51
55
|
//# sourceMappingURL=ruleCardModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ruleCardModel.d.ts","sourceRoot":"","sources":["../../src/decision-table/ruleCardModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAU1E,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"ruleCardModel.d.ts","sourceRoot":"","sources":["../../src/decision-table/ruleCardModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAU1E,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,cACf,SAAQ,eAAe,EACrB,cAAc,EACd,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC;IAE/B,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAEnE,UAAU,EAAE,MAAM,CAAC;IAEnB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACzC;AAGD,MAAM,WAAW,iBAAiB;IAEhC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAE9D,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;CAC5D;AAaD,UAAU,UAAU;IAClB,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;CAChC;AAGD,eAAO,MAAM,aAAa,GAAI,MAAM,YAAY,4BAW/C,CAAC;AAmDF,UAAU,UAAU;IAClB,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,CAAC;CAClC;AAGD,UAAU,YAAY;IACpB,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACtC,IAAI,EAAE,0BAA0B,EAAE,CAAC;IACnC,KAAK,EAAE,CAAC,0BAA0B,GAAG,IAAI,CAAC,EAAE,CAAC;CAC9C;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,YAAY,CAAC;IAEnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IAEpB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAE1C,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC;CACxB;AAGD,UAAU,aACR,SAAQ,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,CAAC,EACvD,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACrD,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,YAAY,CAAC;CACxB;AAmBD,eAAO,MAAM,aAAa,GAAI,oGAW3B,mBAAmB,KAAG,aAwFxB,CAAC"}
|
|
@@ -25,8 +25,8 @@ const verdictOf = (rule, columnId, cells, labels)=>{
|
|
|
25
25
|
const matched = isOutcome(rule, columnId) ? void 0 : cells?.[columnId]?.matched;
|
|
26
26
|
return void 0 === matched ? '' : labels.conditionVerdict(matched);
|
|
27
27
|
};
|
|
28
|
-
const shownValuesOf = (parts, columnId, labels)=>{
|
|
29
|
-
const { shown, clamped } = boundedParts(parts, SENTENCE_LINE_VALUE_LIMIT);
|
|
28
|
+
const shownValuesOf = (parts, columnId, labels, changed)=>{
|
|
29
|
+
const { shown, clamped } = boundedParts(parts, SENTENCE_LINE_VALUE_LIMIT, changed);
|
|
30
30
|
const isCell = (part)=>'string' != typeof part && 'value' === part.kind && part.columnId === columnId;
|
|
31
31
|
const indexes = shown.flatMap((part, index)=>isCell(part) ? [
|
|
32
32
|
index
|
|
@@ -36,8 +36,8 @@ const shownValuesOf = (parts, columnId, labels)=>{
|
|
|
36
36
|
const hidden = clamped.reduce((count, run)=>run.hidden.some(isCell) ? count + run.hiddenValues : count, 0);
|
|
37
37
|
return hidden > 0 ? `${text} ${labels.moreValues(hidden)}` : text;
|
|
38
38
|
};
|
|
39
|
-
const shownLineText = (parts, labels)=>{
|
|
40
|
-
const { shown, clamped } = boundedParts(parts, SENTENCE_LINE_VALUE_LIMIT);
|
|
39
|
+
const shownLineText = (parts, labels, changed)=>{
|
|
40
|
+
const { shown, clamped } = boundedParts(parts, SENTENCE_LINE_VALUE_LIMIT, changed);
|
|
41
41
|
const cuts = clamped.map(({ after })=>shown.length - after.length);
|
|
42
42
|
return [
|
|
43
43
|
...clamped.map(({ hiddenValues }, index)=>`${partsText(shown.slice(cuts[index - 1] ?? 0, cuts[index]))} ${labels.moreValues(hiddenValues)}`),
|
|
@@ -54,8 +54,14 @@ const inputColumnIds = (parts)=>[
|
|
|
54
54
|
part.columnId
|
|
55
55
|
] : []))
|
|
56
56
|
];
|
|
57
|
-
const ruleCardModel = ({ rule, position, numbered, mark, selectable, decisionLinks, idPrefix, labels, editLabels })=>{
|
|
57
|
+
const ruleCardModel = ({ rule, position, numbered, mark, selectable, decisionLinks, idPrefix, labels, editLabels, diff })=>{
|
|
58
58
|
const id = `${idPrefix}-${position}`;
|
|
59
|
+
const number = diff ? diff.number : position;
|
|
60
|
+
const changed = (token)=>diff?.tokens.has(token) === true;
|
|
61
|
+
const changeStatus = [
|
|
62
|
+
diff?.change && labels.changeStatus(diff.change),
|
|
63
|
+
diff?.movedFrom !== void 0 && labels.movedFrom(diff.movedFrom)
|
|
64
|
+
].filter(Boolean).join(', ');
|
|
59
65
|
const { tone, dim, title, cells } = cardMark(mark);
|
|
60
66
|
const stops = selectable ? [
|
|
61
67
|
...firstValuesOf(rule)
|
|
@@ -63,7 +69,7 @@ const ruleCardModel = ({ rule, position, numbered, mark, selectable, decisionLin
|
|
|
63
69
|
token,
|
|
64
70
|
labelId: `${id}-cell-${index}`,
|
|
65
71
|
label: [
|
|
66
|
-
labels.cell(columnNameOf(rule, columnId), shownValuesOf(parts, columnId, labels), position),
|
|
72
|
+
labels.cell(columnNameOf(rule, columnId), shownValuesOf(parts, columnId, labels, changed), position),
|
|
67
73
|
verdictOf(rule, columnId, cells, labels)
|
|
68
74
|
].filter(Boolean).join(' '),
|
|
69
75
|
editable: void 0 !== editLabels
|
|
@@ -96,10 +102,13 @@ const ruleCardModel = ({ rule, position, numbered, mark, selectable, decisionLin
|
|
|
96
102
|
dim,
|
|
97
103
|
title,
|
|
98
104
|
cells,
|
|
105
|
+
number: numbered ? number : null,
|
|
106
|
+
changeStatus,
|
|
99
107
|
ariaLabel: [
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
shownLineText(rule.
|
|
108
|
+
changeStatus,
|
|
109
|
+
numbered && null !== number ? String(number) : '',
|
|
110
|
+
shownLineText(rule.heading, labels, changed),
|
|
111
|
+
shownLineText(rule.lead, labels, changed)
|
|
103
112
|
].filter(Boolean).join(' '),
|
|
104
113
|
describedBy: [
|
|
105
114
|
badges.heading,
|
|
@@ -108,6 +117,7 @@ const ruleCardModel = ({ rule, position, numbered, mark, selectable, decisionLin
|
|
|
108
117
|
].flatMap((badge)=>badge ? markIds(badge.id, badge.marks) : []).join(' ') || void 0,
|
|
109
118
|
stops,
|
|
110
119
|
stopOf: (token)=>stopByToken.get(token),
|
|
120
|
+
diffOf: (token)=>diff?.tokens.get(token),
|
|
111
121
|
linkOf: (token)=>decisionLinks && 'input' === token.kind && void 0 !== token.producedBy ? {
|
|
112
122
|
decisionId: token.producedBy,
|
|
113
123
|
label: labels.openDecision(token.text),
|
|
@@ -33,6 +33,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
33
33
|
cellTextOf: ()=>cellTextOf,
|
|
34
34
|
stopTokensOf: ()=>stopTokensOf,
|
|
35
35
|
tokenText: ()=>tokenText,
|
|
36
|
+
CHANGED_VALUE_CONTEXT: ()=>CHANGED_VALUE_CONTEXT,
|
|
36
37
|
valueTokenOf: ()=>valueTokenOf,
|
|
37
38
|
columnNameOf: ()=>columnNameOf,
|
|
38
39
|
SENTENCE_LINE_VALUE_LIMIT: ()=>SENTENCE_LINE_VALUE_LIMIT,
|
|
@@ -40,6 +41,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
40
41
|
});
|
|
41
42
|
const external_constants_cjs_namespaceObject = require("./constants.cjs");
|
|
42
43
|
const SENTENCE_LINE_VALUE_LIMIT = 20;
|
|
44
|
+
const CHANGED_VALUE_CONTEXT = 2;
|
|
45
|
+
const NO_KEPT = new Set();
|
|
43
46
|
const isValue = (part)=>'string' != typeof part && 'value' === part.kind;
|
|
44
47
|
const tokenText = (token, empty = external_constants_cjs_namespaceObject.EMPTY_VALUE_DASH)=>'value' === token.kind && '' === token.text ? empty : token.text;
|
|
45
48
|
const isToken = (part)=>'string' != typeof part;
|
|
@@ -70,13 +73,24 @@ const bandColumnOf = (bands, columnId)=>bands.flatMap((band)=>band.columns).find
|
|
|
70
73
|
const bandColumnNameOf = (bands, columnId)=>bandColumnOf(bands, columnId)?.name ?? '';
|
|
71
74
|
const valueTokenOf = (rule, value)=>ruleTokens(rule).find((token)=>'value' === token.kind && token.columnId === value.columnId && token.index === value.index);
|
|
72
75
|
const partsText = (parts, empty = external_constants_cjs_namespaceObject.EMPTY_VALUE_DASH)=>parts.map((part)=>'string' == typeof part ? part : tokenText(part, empty)).join('');
|
|
73
|
-
const
|
|
76
|
+
const keptAround = (parts, changed)=>{
|
|
77
|
+
const values = parts.flatMap((part, at)=>isValue(part) ? [
|
|
78
|
+
{
|
|
79
|
+
part,
|
|
80
|
+
at
|
|
81
|
+
}
|
|
82
|
+
] : []);
|
|
83
|
+
return new Set(values.flatMap(({ part }, ordinal)=>changed(part) ? values.slice(Math.max(0, ordinal - CHANGED_VALUE_CONTEXT), ordinal + CHANGED_VALUE_CONTEXT + 1).map(({ at })=>at) : []));
|
|
84
|
+
};
|
|
85
|
+
const boundedParts = (parts, limit, changed)=>{
|
|
86
|
+
const kept = changed ? keptAround(parts, changed) : NO_KEPT;
|
|
74
87
|
const shown = [];
|
|
75
88
|
const runs = [];
|
|
89
|
+
let open;
|
|
76
90
|
let pending = [];
|
|
77
91
|
let column;
|
|
78
92
|
let count = 0;
|
|
79
|
-
for (const part of parts){
|
|
93
|
+
for (const [at, part] of parts.entries()){
|
|
80
94
|
if ('string' == typeof part) {
|
|
81
95
|
pending.push(part);
|
|
82
96
|
continue;
|
|
@@ -84,14 +98,19 @@ const boundedParts = (parts, limit)=>{
|
|
|
84
98
|
const value = 'value' === part.kind;
|
|
85
99
|
count = value && part.columnId === column ? count + 1 : 1;
|
|
86
100
|
column = value ? part.columnId : void 0;
|
|
87
|
-
if (!value || count <= limit
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
101
|
+
if (!value || count <= limit || kept.has(at)) {
|
|
102
|
+
shown.push(...pending, part);
|
|
103
|
+
open = void 0;
|
|
104
|
+
} else if (open) open.hidden.push(...pending, part);
|
|
105
|
+
else {
|
|
106
|
+
open = {
|
|
107
|
+
hidden: [
|
|
108
|
+
part
|
|
109
|
+
],
|
|
110
|
+
end: shown.length
|
|
111
|
+
};
|
|
112
|
+
runs.push(open);
|
|
113
|
+
}
|
|
95
114
|
pending = [];
|
|
96
115
|
}
|
|
97
116
|
shown.push(...pending);
|
|
@@ -104,6 +123,7 @@ const boundedParts = (parts, limit)=>{
|
|
|
104
123
|
}))
|
|
105
124
|
};
|
|
106
125
|
};
|
|
126
|
+
exports.CHANGED_VALUE_CONTEXT = __webpack_exports__.CHANGED_VALUE_CONTEXT;
|
|
107
127
|
exports.SENTENCE_LINE_VALUE_LIMIT = __webpack_exports__.SENTENCE_LINE_VALUE_LIMIT;
|
|
108
128
|
exports.bandColumnNameOf = __webpack_exports__.bandColumnNameOf;
|
|
109
129
|
exports.bandColumnOf = __webpack_exports__.bandColumnOf;
|
|
@@ -118,6 +138,7 @@ exports.stopTokensOf = __webpack_exports__.stopTokensOf;
|
|
|
118
138
|
exports.tokenText = __webpack_exports__.tokenText;
|
|
119
139
|
exports.valueTokenOf = __webpack_exports__.valueTokenOf;
|
|
120
140
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
141
|
+
"CHANGED_VALUE_CONTEXT",
|
|
121
142
|
"SENTENCE_LINE_VALUE_LIMIT",
|
|
122
143
|
"bandColumnNameOf",
|
|
123
144
|
"bandColumnOf",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SentenceBand, SentencePart, SentenceRule, SentenceToken, SentenceValueId, SentenceValueToken } from './sentenceTypes';
|
|
2
2
|
export declare const SENTENCE_LINE_VALUE_LIMIT = 20;
|
|
3
|
+
export declare const CHANGED_VALUE_CONTEXT = 2;
|
|
3
4
|
export declare const isValue: (part: SentencePart) => part is SentenceToken;
|
|
4
5
|
export declare const tokenText: (token: SentenceToken, empty?: string) => string;
|
|
5
6
|
export declare const stopTokensOf: (rule: SentenceRule) => SentenceToken[];
|
|
@@ -20,6 +21,6 @@ interface BoundedParts {
|
|
|
20
21
|
shown: readonly SentencePart[];
|
|
21
22
|
clamped: readonly ClampedRun[];
|
|
22
23
|
}
|
|
23
|
-
export declare const boundedParts: (parts: readonly SentencePart[], limit: number) => BoundedParts;
|
|
24
|
+
export declare const boundedParts: (parts: readonly SentencePart[], limit: number, changed?: (token: SentenceToken) => boolean) => BoundedParts;
|
|
24
25
|
export {};
|
|
25
26
|
//# sourceMappingURL=sentenceParts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentenceParts.d.ts","sourceRoot":"","sources":["../../src/decision-table/sentenceParts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,eAAe,EACf,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,yBAAyB,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"sentenceParts.d.ts","sourceRoot":"","sources":["../../src/decision-table/sentenceParts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,eAAe,EACf,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAG5C,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAIvC,eAAO,MAAM,OAAO,GAAI,MAAM,YAAY,KAAG,IAAI,IAAI,aACF,CAAC;AAGpD,eAAO,MAAM,SAAS,GAAI,OAAO,aAAa,EAAE,cAAwB,KAAG,MACT,CAAC;AASnE,eAAO,MAAM,YAAY,GAAI,MAAM,YAAY,KAAG,aAAa,EAY9D,CAAC;AAGF,eAAO,MAAM,OAAO,GAAI,MAAM,YAAY,GAAG,SAAS,EAAE,UAAU,MAAM,KAAG,OACY,CAAC;AAGxF,eAAO,MAAM,UAAU,GAAI,MAAM,YAAY,EAAE,UAAU,MAAM,KAAG,MAInD,CAAC;AAGhB,eAAO,MAAM,SAAS,GAAI,MAAM,YAAY,EAAE,UAAU,MAAM,KAAG,OACoB,CAAC;AAGtF,eAAO,MAAM,YAAY,GAAI,MAAM,YAAY,EAAE,UAAU,MAAM,KAAG,MAEhE,CAAC;AAGL,eAAO,MAAM,YAAY,GACvB,OAAO,SAAS,YAAY,EAAE,EAC9B,UAAU,MAAM,KACf,YAAY,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,GAAG,SAC2C,CAAC;AAGjF,eAAO,MAAM,gBAAgB,GAAI,OAAO,SAAS,YAAY,EAAE,EAAE,UAAU,MAAM,KAAG,MACzC,CAAC;AAG5C,eAAO,MAAM,YAAY,GACvB,MAAM,YAAY,EAClB,OAAO,eAAe,KACrB,kBAAkB,GAAG,SAIrB,CAAC;AAGJ,eAAO,MAAM,SAAS,GAAI,OAAO,SAAS,YAAY,EAAE,EAAE,cAAwB,KAAG,MACK,CAAC;AAG3F,UAAU,UAAU;IAClB,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IAChC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;CACtB;AAGD,UAAU,YAAY;IACpB,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/B,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;CAChC;AA6BD,eAAO,MAAM,YAAY,GACvB,OAAO,SAAS,YAAY,EAAE,EAC9B,OAAO,MAAM,EACb,UAAU,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,KAC1C,YAmCF,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { EMPTY_VALUE_DASH } from "./constants.js";
|
|
2
2
|
const SENTENCE_LINE_VALUE_LIMIT = 20;
|
|
3
|
+
const CHANGED_VALUE_CONTEXT = 2;
|
|
4
|
+
const NO_KEPT = new Set();
|
|
3
5
|
const isValue = (part)=>'string' != typeof part && 'value' === part.kind;
|
|
4
6
|
const tokenText = (token, empty = EMPTY_VALUE_DASH)=>'value' === token.kind && '' === token.text ? empty : token.text;
|
|
5
7
|
const isToken = (part)=>'string' != typeof part;
|
|
@@ -30,13 +32,24 @@ const bandColumnOf = (bands, columnId)=>bands.flatMap((band)=>band.columns).find
|
|
|
30
32
|
const bandColumnNameOf = (bands, columnId)=>bandColumnOf(bands, columnId)?.name ?? '';
|
|
31
33
|
const valueTokenOf = (rule, value)=>ruleTokens(rule).find((token)=>'value' === token.kind && token.columnId === value.columnId && token.index === value.index);
|
|
32
34
|
const partsText = (parts, empty = EMPTY_VALUE_DASH)=>parts.map((part)=>'string' == typeof part ? part : tokenText(part, empty)).join('');
|
|
33
|
-
const
|
|
35
|
+
const keptAround = (parts, changed)=>{
|
|
36
|
+
const values = parts.flatMap((part, at)=>isValue(part) ? [
|
|
37
|
+
{
|
|
38
|
+
part,
|
|
39
|
+
at
|
|
40
|
+
}
|
|
41
|
+
] : []);
|
|
42
|
+
return new Set(values.flatMap(({ part }, ordinal)=>changed(part) ? values.slice(Math.max(0, ordinal - CHANGED_VALUE_CONTEXT), ordinal + CHANGED_VALUE_CONTEXT + 1).map(({ at })=>at) : []));
|
|
43
|
+
};
|
|
44
|
+
const boundedParts = (parts, limit, changed)=>{
|
|
45
|
+
const kept = changed ? keptAround(parts, changed) : NO_KEPT;
|
|
34
46
|
const shown = [];
|
|
35
47
|
const runs = [];
|
|
48
|
+
let open;
|
|
36
49
|
let pending = [];
|
|
37
50
|
let column;
|
|
38
51
|
let count = 0;
|
|
39
|
-
for (const part of parts){
|
|
52
|
+
for (const [at, part] of parts.entries()){
|
|
40
53
|
if ('string' == typeof part) {
|
|
41
54
|
pending.push(part);
|
|
42
55
|
continue;
|
|
@@ -44,14 +57,19 @@ const boundedParts = (parts, limit)=>{
|
|
|
44
57
|
const value = 'value' === part.kind;
|
|
45
58
|
count = value && part.columnId === column ? count + 1 : 1;
|
|
46
59
|
column = value ? part.columnId : void 0;
|
|
47
|
-
if (!value || count <= limit
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
60
|
+
if (!value || count <= limit || kept.has(at)) {
|
|
61
|
+
shown.push(...pending, part);
|
|
62
|
+
open = void 0;
|
|
63
|
+
} else if (open) open.hidden.push(...pending, part);
|
|
64
|
+
else {
|
|
65
|
+
open = {
|
|
66
|
+
hidden: [
|
|
67
|
+
part
|
|
68
|
+
],
|
|
69
|
+
end: shown.length
|
|
70
|
+
};
|
|
71
|
+
runs.push(open);
|
|
72
|
+
}
|
|
55
73
|
pending = [];
|
|
56
74
|
}
|
|
57
75
|
shown.push(...pending);
|
|
@@ -64,4 +82,4 @@ const boundedParts = (parts, limit)=>{
|
|
|
64
82
|
}))
|
|
65
83
|
};
|
|
66
84
|
};
|
|
67
|
-
export { SENTENCE_LINE_VALUE_LIMIT, bandColumnNameOf, bandColumnOf, boundedParts, cellTextOf, columnNameOf, hasStop, isOutcome, isValue, partsText, stopTokensOf, tokenText, valueTokenOf };
|
|
85
|
+
export { CHANGED_VALUE_CONTEXT, SENTENCE_LINE_VALUE_LIMIT, bandColumnNameOf, bandColumnOf, boundedParts, cellTextOf, columnNameOf, hasStop, isOutcome, isValue, partsText, stopTokensOf, tokenText, valueTokenOf };
|