@acorex/platform 21.0.0-next.5 → 21.0.0-next.8

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.
Files changed (32) hide show
  1. package/auth/index.d.ts +228 -3
  2. package/fesm2022/acorex-platform-auth.mjs +162 -2
  3. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  4. package/fesm2022/acorex-platform-common.mjs +1 -1
  5. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  6. package/fesm2022/acorex-platform-layout-builder.mjs +11 -2
  7. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  8. package/fesm2022/acorex-platform-layout-components.mjs +7 -7
  9. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  10. package/fesm2022/acorex-platform-layout-entity.mjs +79 -34
  11. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  12. package/fesm2022/acorex-platform-layout-widget-core.mjs +108 -1
  13. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  14. package/fesm2022/acorex-platform-layout-widgets.mjs +224 -89
  15. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  16. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs → acorex-platform-themes-default-entity-master-list-view.component-D3qZa5fM.mjs} +4 -4
  17. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D3qZa5fM.mjs.map +1 -0
  18. package/fesm2022/acorex-platform-themes-default.mjs +2 -2
  19. package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-Dz0cylyQ.mjs} +8 -8
  20. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-Dz0cylyQ.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-themes-shared.mjs +1 -1
  22. package/fesm2022/acorex-platform-workflow.mjs +1084 -456
  23. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  24. package/layout/builder/index.d.ts +6 -0
  25. package/layout/components/index.d.ts +4 -3
  26. package/layout/entity/index.d.ts +9 -0
  27. package/layout/widget-core/index.d.ts +42 -1
  28. package/layout/widgets/index.d.ts +12 -7
  29. package/package.json +9 -9
  30. package/workflow/index.d.ts +798 -939
  31. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs.map +0 -1
  32. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs.map +0 -1
@@ -2812,6 +2812,113 @@ function findNonEmptyBreakpoints(values) {
2812
2812
  return nonEmptyBreakpoints;
2813
2813
  }
2814
2814
 
2815
+ //#region ---- Imports ----
2816
+ //#endregion
2817
+ //#region ---- Helper Class ----
2818
+ /**
2819
+ * Helper class for serializing and deserializing AXPWidgetNode to/from JSON
2820
+ */
2821
+ class AXPWidgetSerializationHelper {
2822
+ /**
2823
+ * Removes non-serializable properties from widget node
2824
+ * @param node - The widget node to clean
2825
+ * @param options - Serialization options
2826
+ * @returns Cleaned widget node ready for JSON serialization
2827
+ */
2828
+ static cleanNode(node, options = {}) {
2829
+ const { removeMeta = true, removeFunctions = true } = options;
2830
+ // Deep clone to avoid mutating original
2831
+ const cleaned = cloneDeep(node);
2832
+ // Remove meta property if requested
2833
+ if (removeMeta && 'meta' in cleaned) {
2834
+ delete cleaned.meta;
2835
+ }
2836
+ // Remove functions from options, triggers, and valueTransforms
2837
+ if (removeFunctions) {
2838
+ this.removeFunctions(cleaned);
2839
+ }
2840
+ // Recursively clean children
2841
+ if (cleaned.children && Array.isArray(cleaned.children)) {
2842
+ cleaned.children = cleaned.children.map((child) => this.cleanNode(child, options));
2843
+ }
2844
+ return cleaned;
2845
+ }
2846
+ /**
2847
+ * Recursively removes functions from object properties
2848
+ */
2849
+ static removeFunctions(obj) {
2850
+ if (obj === null || obj === undefined) {
2851
+ return;
2852
+ }
2853
+ if (Array.isArray(obj)) {
2854
+ obj.forEach((item) => this.removeFunctions(item));
2855
+ return;
2856
+ }
2857
+ if (typeof obj === 'object') {
2858
+ for (const key in obj) {
2859
+ if (typeof obj[key] === 'function') {
2860
+ delete obj[key];
2861
+ }
2862
+ else if (typeof obj[key] === 'object') {
2863
+ this.removeFunctions(obj[key]);
2864
+ }
2865
+ }
2866
+ }
2867
+ }
2868
+ /**
2869
+ * Converts AXPWidgetNode to JSON string
2870
+ * @param node - The widget node to serialize
2871
+ * @param options - Serialization options
2872
+ * @returns JSON string representation of the widget node
2873
+ */
2874
+ static toJson(node, options = {}) {
2875
+ const { pretty = false, ...cleanOptions } = options;
2876
+ const cleaned = this.cleanNode(node, cleanOptions);
2877
+ if (pretty) {
2878
+ return JSON.stringify(cleaned, null, 2);
2879
+ }
2880
+ return JSON.stringify(cleaned);
2881
+ }
2882
+ /**
2883
+ * Converts JSON string to AXPWidgetNode
2884
+ * @param json - JSON string to deserialize
2885
+ * @returns Parsed AXPWidgetNode object
2886
+ * @throws Error if JSON is invalid or doesn't match AXPWidgetNode structure
2887
+ */
2888
+ static fromJson(json) {
2889
+ try {
2890
+ const parsed = JSON.parse(json);
2891
+ // Basic validation - ensure it has at least a type property
2892
+ if (!parsed || typeof parsed !== 'object') {
2893
+ throw new Error('Invalid JSON: Expected an object');
2894
+ }
2895
+ if (!parsed.type) {
2896
+ throw new Error('Invalid AXPWidgetNode: Missing required property "type"');
2897
+ }
2898
+ // Recursively validate and parse children if they exist
2899
+ if (parsed.children && Array.isArray(parsed.children)) {
2900
+ parsed.children = parsed.children.map((child) => this.fromJson(JSON.stringify(child)));
2901
+ }
2902
+ return parsed;
2903
+ }
2904
+ catch (error) {
2905
+ if (error instanceof SyntaxError) {
2906
+ throw new Error(`Invalid JSON string: ${error.message}`);
2907
+ }
2908
+ throw error;
2909
+ }
2910
+ }
2911
+ /**
2912
+ * Removes meta property from widget node (similar to designer service)
2913
+ * @param node - The widget node to process
2914
+ * @returns Widget node without meta property
2915
+ */
2916
+ static removeMeta(node) {
2917
+ return this.cleanNode(node, { removeMeta: true, removeFunctions: false });
2918
+ }
2919
+ }
2920
+ //#endregion
2921
+
2815
2922
  const AXP_WIDGETS_LAYOUT_CATEGORY = {
2816
2923
  name: 'layout',
2817
2924
  order: 1,
@@ -2855,5 +2962,5 @@ var AXPWidgetGroupEnum;
2855
2962
  * Generated bundle index. Do not edit.
2856
2963
  */
2857
2964
 
2858
- export { AXPBaseWidgetComponent, AXPBlockBaseLayoutWidgetComponent, AXPBoxModelLayoutWidgetComponent, AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPFlexBaseLayoutWidgetComponent, AXPFlexItemBaseLayoutWidgetComponent, AXPGridBaseLayoutWidgetComponent, AXPGridItemBaseLayoutWidgetComponent, AXPInlineBaseLayoutWidgetComponent, AXPLayoutBaseWidgetComponent, AXPPageStatus, AXPPropertyEditorHelper, AXPTableBaseLayoutWidgetComponent, AXPTableItemBaseLayoutWidgetComponent, AXPTableItemOpsBaseLayoutWidgetComponent, AXPValueWidgetComponent, AXPWidgetColumnRendererComponent, AXPWidgetContainerComponent, AXPWidgetCoreContextChangeEvent, AXPWidgetCoreContextStore, AXPWidgetCoreElement, AXPWidgetCoreModule, AXPWidgetCoreService, AXPWidgetGroupEnum, AXPWidgetRegistryService, AXPWidgetRendererDirective, AXPWidgetStatus, AXPWidgetsCatalog, AXP_WIDGETS_ACTION_CATEGORY, AXP_WIDGETS_ADVANCE_CATEGORY, AXP_WIDGETS_CATEGORIES, AXP_WIDGETS_EDITOR_CATEGORY, AXP_WIDGETS_LAYOUT_CATEGORY, AXP_WIDGET_COLUMN_TOKEN, AXP_WIDGET_TOKEN, cloneProperty, createBooleanProperty, createNumberProperty, createSelectProperty, createStringProperty, findNonEmptyBreakpoints };
2965
+ export { AXPBaseWidgetComponent, AXPBlockBaseLayoutWidgetComponent, AXPBoxModelLayoutWidgetComponent, AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPFlexBaseLayoutWidgetComponent, AXPFlexItemBaseLayoutWidgetComponent, AXPGridBaseLayoutWidgetComponent, AXPGridItemBaseLayoutWidgetComponent, AXPInlineBaseLayoutWidgetComponent, AXPLayoutBaseWidgetComponent, AXPPageStatus, AXPPropertyEditorHelper, AXPTableBaseLayoutWidgetComponent, AXPTableItemBaseLayoutWidgetComponent, AXPTableItemOpsBaseLayoutWidgetComponent, AXPValueWidgetComponent, AXPWidgetColumnRendererComponent, AXPWidgetContainerComponent, AXPWidgetCoreContextChangeEvent, AXPWidgetCoreContextStore, AXPWidgetCoreElement, AXPWidgetCoreModule, AXPWidgetCoreService, AXPWidgetGroupEnum, AXPWidgetRegistryService, AXPWidgetRendererDirective, AXPWidgetSerializationHelper, AXPWidgetStatus, AXPWidgetsCatalog, AXP_WIDGETS_ACTION_CATEGORY, AXP_WIDGETS_ADVANCE_CATEGORY, AXP_WIDGETS_CATEGORIES, AXP_WIDGETS_EDITOR_CATEGORY, AXP_WIDGETS_LAYOUT_CATEGORY, AXP_WIDGET_COLUMN_TOKEN, AXP_WIDGET_TOKEN, cloneProperty, createBooleanProperty, createNumberProperty, createSelectProperty, createStringProperty, findNonEmptyBreakpoints };
2859
2966
  //# sourceMappingURL=acorex-platform-layout-widget-core.mjs.map