pissbot-9000/labscore/cardstack/Constants.js
bignutty 18bd28591c [nextgen/cardstack] big improvements
- Implement return types
- page numbers
- better subpage resolve delay
- error handling and system error cards
- code cleanup
2025-02-14 02:12:26 +01:00

33 lines
No EOL
942 B
JavaScript

module.exports.BUILT_IN_BUTTON_TYPES = Object.freeze({
NEXT_PAGE: "next",
PREVIOUS_PAGE: "previous"
})
module.exports.DEFAULT_BUTTON_ICON_MAPPINGS = Object.freeze({
[this.BUILT_IN_BUTTON_TYPES.NEXT_PAGE]: "button_chevron_right",
[this.BUILT_IN_BUTTON_TYPES.PREVIOUS_PAGE]: "button_chevron_left"
});
module.exports.STACK_CACHE_KEYS = Object.freeze({
RESULT_CARDS: 0
})
/**
* Callback Types for a Dynamic Card Stack
* Component resolve.
*
* - `SUBSTACK` - Creates a "submenu" with a brand new cardstack
* - `REPLACE_PARENT` - Replaces the parent card in the root stack
* - This callback type will also unselect the button
* - `REPLACE_ROOT_STACK` - Replaces the root stack
* - This callback type will also unselect the button
*/
module.exports.RESOLVE_CALLBACK_TYPES = Object.freeze({
SUBSTACK: 0,
REPLACE_PARENT_CARD: 1,
REPLACE_STACK: 2,
0: "SUBSTACK",
1: "REPLACE_PARENT_CARD",
2: "REPLACE_STACK",
})