@ikas/component-cli 1.4.0-beta.230 → 1.4.0-beta.231
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.
|
@@ -57,9 +57,9 @@ export function createUpdateSectionPropCommand() {
|
|
|
57
57
|
"--value is the JSON-encoded prop value. Shape depends on the prop type:",
|
|
58
58
|
" Scalars (TEXT/RICH_TEXT/BOOLEAN/NUMBER/COLOR/ENUM/DATE) are { \"value\": <scalar> } — e.g. '{\"value\":\"Hello\"}', '{\"value\":true}', '{\"value\":\"#FF0000\"}'.",
|
|
59
59
|
" Object props are NOT wrapped: IMAGE/VIDEO/SVG = '{\"id\":\"<asset-id>\",\"altText\":\"...\"}' (get id via `ikas-component upload-image`); PRODUCT = '{\"productId\":\"...\"}'.",
|
|
60
|
-
" LINK = a single link object needing id + linkType + label + subLinks: PAGE = '{\"id\":\"<unique>\",\"linkType\":\"PAGE\",\"label\":\"Home\",\"pageId\":\"<id>\",\"pageType\":\"INDEX\",\"subLinks\":[]}'; EXTERNAL = '{\"id\":\"<unique>\",\"linkType\":\"EXTERNAL\",\"label\":\"Docs\",\"externalLink\":\"https://...\",\"subLinks\":[]}'. (pageId/pageType from `list-pages`.) LIST_OF_LINK = '{\"links\":[<link>,...]}'. Optional on any link (sub-links too): \"translations\" = its label on the other routings, each shown as: that routing's own { \"locale\", \"label\", \"sfRoutingId\" }, else its language's { \"locale\", \"label\" }, else \"label\". Do not write them by hand: write the link's new label alone with --locale (every routing of that language) or --routing (one routing), and it becomes that label (no copy of the links); only an edit of more than labels gives the routing its own copy. Hand-written ones are checked: one per language and per routing, an sfRoutingId of a routing with a path whose language is the record's. On a PRODUCT/CATEGORY/BRAND link with itemId, \"useItemNameTranslations\":true shows that item's own name in each language instead.",
|
|
60
|
+
" LINK = a single link object needing id + linkType + label + subLinks: PAGE = '{\"id\":\"<unique>\",\"linkType\":\"PAGE\",\"label\":\"Home\",\"pageId\":\"<id>\",\"pageType\":\"INDEX\",\"subLinks\":[]}'; EXTERNAL = '{\"id\":\"<unique>\",\"linkType\":\"EXTERNAL\",\"label\":\"Docs\",\"externalLink\":\"https://...\",\"subLinks\":[]}'. (pageId/pageType from `list-pages`.) LIST_OF_LINK = '{\"links\":[<link>,...]}'. Optional on any link (sub-links too): \"translations\" = its label on the other routings, each shown as: that routing's own { \"locale\", \"label\", \"sfRoutingId\" }, else its language's { \"locale\", \"label\" }, else \"label\". Do not write them by hand: write the link's new label alone with --locale (every routing of that language) or --routing (one routing), and it becomes that label (no copy of the links); only an edit of more than labels gives the routing its own copy. A link sent without \"translations\" keeps its stored ones (matched by its id), so a link list can be resent with new links but without its labels; \"translations\":null drops them. Hand-written ones are checked: at most one per language and per routing, an sfRoutingId of a routing with a path whose language is the record's (the labels of a routing the store no longer has are dropped, see the result's removedRoutingLabels). On a PRODUCT/CATEGORY/BRAND link with itemId, \"useItemNameTranslations\":true shows that item's own name in each language instead, its translations never showing; the name is fetched when the page renders, not stored (the result's itemNamesNote says so).",
|
|
61
61
|
" COMPONENT_LIST = '{\"components\":[{\"id\":\"<unique>\",\"codeComponentId\":\"<child-id>\",\"propValues\":{\"<childProp>\":<value>}}]}' (single COMPONENT = one such entry). Each entry needs a unique id and codeComponentId (or componentId); child propValues use the same per-type shapes recursively.",
|
|
62
|
-
" The value REPLACES the whole prop — to edit a COMPONENT_LIST, read the current value from `list-page-sections` and resend the entire array. Wrong shapes are rejected with an error, not stored silently.",
|
|
62
|
+
" The value REPLACES the whole prop — to edit a COMPONENT_LIST, read the current value from `list-page-sections` and resend the entire array. A translatable value may hold \"pinned\":true: the editor's mark that it is this placement's own and stays so when its language's default text changes — send it back as read. Wrong shapes are rejected with an error, not stored silently.",
|
|
63
63
|
"COMMON (global) sections — the theme's header/footer — share ONE set of prop values across every page, stored on the INDEX (Home) page's placement: the write lands there whatever --page-id you pass and changes that section on ALL pages (the result's `common` block says so, and the echoed value is read back from that canonical placement). Read the current values first (`get-section-values`) and change only what you mean to; if the INDEX page has no placement of the section, add it there first — otherwise the write is rejected.",
|
|
64
64
|
"--locale <code> writes the value of ONE language for THIS placement only (as the editor's canvas does with that language's routing selected): e.g. a section titled differently on the home page and the product page in English, or a link's label in one language (a LINK / LIST_OF_LINK, a list entry's too: send the value as `get-section-values --locale` shows it with only labels changed; any other change gives that language its own copy of the links, which stops following the base). Without --locale the base value is written: the base language's, and every language's that has no value of its own (a translatable prop then shows the section's translation in that language first — see update-translations). The base language itself takes no --locale. A prop bound to a global shows the binding in every language, so --locale refuses it. Read the language's current values with `get-section-values --locale`.",
|
|
65
65
|
"--routing <path|id> (e.g. /test2) does the same for ONE routing: a language several routings show (/en, /test2) gives each its own values, link labels included, and --locale writes to all of them. When `get-section-values --locale` answers with several `routings`, read with --routing and write back with the SAME --routing — writing those values with --locale replaces the other routings' own labels.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-section-prop.js","sourceRoot":"","sources":["../../src/commands/update-section-prop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,oBAAoB,GACrB,MAAM,kCAAkC,CAAC;AAe1C,KAAK,UAAU,oBAAoB,CAAC,OAAiC;IACnE,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC1D,iBAAiB,CAAC,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC,CAAC;IAC1G,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,OAAO,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;QAChE,iBAAiB,CACf,IAAI,KAAK,CAAC,oFAAoF,CAAC,CAChG,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACzC,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