slicejs-web-framework 2.3.0 → 2.3.2
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/README.md +155 -156
- package/Slice/Components/Structural/ContextManager/ContextManager.js +21 -13
- package/Slice/Components/Structural/ContextManager/ContextManagerDebugger.js +258 -0
- package/Slice/Components/Structural/Controller/Controller.js +19 -0
- package/Slice/Components/Structural/Debugger/Debugger.js +1547 -1347
- package/Slice/Components/Structural/EventManager/EventManager.js +22 -13
- package/Slice/Components/Structural/EventManager/EventManagerDebugger.js +238 -0
- package/Slice/Components/Structural/Logger/Logger.js +146 -104
- package/Slice/Components/Structural/Router/Router.js +130 -8
- package/Slice/Components/Structural/StylesManager/StylesManager.js +64 -49
- package/Slice/Components/Structural/StylesManager/ThemeManager/ThemeManager.js +84 -56
- package/Slice/Slice.js +92 -6
- package/package.json +1 -1
- package/src/Components/AppComponents/HomePage/HomePage.js +195 -195
- package/src/Components/Visual/CodeVisualizer/CodeVisualizer.js +3 -4
- package/src/Components/components.js +1 -2
- package/src/sliceConfig.json +60 -60
- package/opencode.json +0 -11
- package/src/Components/Service/Translator/Translator.js +0 -45
- package/src/Components/Service/Translator/messages.json +0 -58
|
@@ -544,6 +544,11 @@ export default class Controller {
|
|
|
544
544
|
});
|
|
545
545
|
}
|
|
546
546
|
|
|
547
|
+
/**
|
|
548
|
+
* Get a registered component by sliceId.
|
|
549
|
+
* @param {string} sliceId
|
|
550
|
+
* @returns {HTMLElement|undefined}
|
|
551
|
+
*/
|
|
547
552
|
getComponent(sliceId) {
|
|
548
553
|
return this.activeComponents.get(sliceId);
|
|
549
554
|
}
|
|
@@ -565,6 +570,14 @@ export default class Controller {
|
|
|
565
570
|
return this.componentCategories.get(componentSliceId);
|
|
566
571
|
}
|
|
567
572
|
|
|
573
|
+
/**
|
|
574
|
+
* Fetch component resources (html, css, styles, theme).
|
|
575
|
+
* @param {string} componentName
|
|
576
|
+
* @param {'html'|'css'|'theme'|'styles'} resourceType
|
|
577
|
+
* @param {string} [componentCategory]
|
|
578
|
+
* @param {string} [customPath]
|
|
579
|
+
* @returns {Promise<string>}
|
|
580
|
+
*/
|
|
568
581
|
async fetchText(componentName, resourceType, componentCategory, customPath) {
|
|
569
582
|
try {
|
|
570
583
|
const baseUrl = window.location.origin;
|
|
@@ -619,6 +632,12 @@ export default class Controller {
|
|
|
619
632
|
}
|
|
620
633
|
}
|
|
621
634
|
|
|
635
|
+
/**
|
|
636
|
+
* Apply props to a component using static defaults and setters.
|
|
637
|
+
* @param {HTMLElement} component
|
|
638
|
+
* @param {Object} props
|
|
639
|
+
* @returns {void}
|
|
640
|
+
*/
|
|
622
641
|
setComponentProps(component, props) {
|
|
623
642
|
const ComponentClass = component.constructor;
|
|
624
643
|
const componentName = ComponentClass.name;
|