@skyworx/dynamic-ui 1.0.29 → 1.0.31

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/index.d.ts CHANGED
@@ -194,6 +194,7 @@ export { closeToast } from './types/composables/useToast'
194
194
  export { dummyToastifyPlugin } from './types/composables/useToast'
195
195
  export { endLoginTransition } from './types/composables/useAuthOverlay'
196
196
  export { endLogout } from './types/composables/useAuthOverlay'
197
+ export { extractErrorMessage } from './types/utils/extractErrorMessage'
197
198
  export { setLoginError } from './types/composables/useAuthOverlay'
198
199
  export { setLoginSuccess } from './types/composables/useAuthOverlay'
199
200
  export { setPaginationStorage } from './types/composables/dynamic-form/utils/form.utils'
@@ -1,4 +1,4 @@
1
- import { c as bt, g as It } from "./index-DFkmWGJV.js";
1
+ import { c as bt, g as It } from "./index-COpd-UNY.js";
2
2
  function vt(yt) {
3
3
  throw new Error('Could not dynamically require "' + yt + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4
4
  }
@@ -1,5 +1,5 @@
1
- import { o as cW } from "./jszip.min-BbdnbXuj.js";
2
- import { c as av } from "./index-DFkmWGJV.js";
1
+ import { o as cW } from "./jszip.min-C8nNUXC2.js";
2
+ import { c as av } from "./index-COpd-UNY.js";
3
3
  var b_ = function(r, e) {
4
4
  return b_ = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
5
5
  t.__proto__ = n;
@@ -14,7 +14,7 @@ type __VLS_Slots = {} & {
14
14
  };
15
15
  declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
16
16
  modelValue: {
17
- type: (NumberConstructor | StringConstructor | ArrayConstructor)[];
17
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
18
18
  default: () => never[];
19
19
  };
20
20
  label: {
@@ -88,7 +88,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
88
88
  loaded: (...args: any[]) => void;
89
89
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
90
90
  modelValue: {
91
- type: (NumberConstructor | StringConstructor | ArrayConstructor)[];
91
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
92
92
  default: () => never[];
93
93
  };
94
94
  label: {
@@ -6,5 +6,5 @@ export declare function useFormActions({ state, props, emit, apiUrl, router, loc
6
6
  performAction: (action: any) => Promise<void>;
7
7
  handleSubmit: () => Promise<void>;
8
8
  handleCancel: () => any;
9
- handleFieldUpdate: (model: string, value: any, sectionKey?: string) => void;
9
+ handleFieldUpdate: (model: string, value: any, sectionKey?: string, scopedPath?: string) => void;
10
10
  };
@@ -21,10 +21,16 @@ export interface NavigationRule {
21
21
  condition?: any;
22
22
  targetSection: string;
23
23
  hiddenRules: Record<string, boolean | any>;
24
- parentRowContext?: {
25
- parentArrayKey: string;
26
- childArrayKey: string;
27
- };
24
+ parentRowContext?: NavigationParentRowContext;
25
+ }
26
+ export interface NavigationParentRowContext {
27
+ parentArrayKey: string;
28
+ childArrayKey?: string;
29
+ }
30
+ export interface ActiveParentRowContext {
31
+ parentArrayKey: string;
32
+ rowIndex: number;
33
+ childArrayKey?: string;
28
34
  }
29
35
  /**
30
36
  * Configuration for navigation trigger on action buttons
@@ -39,10 +45,7 @@ export interface NavigationConfig {
39
45
  backButtonPosition?: 'header' | 'footer' | 'both';
40
46
  backButtonConfig?: BackButtonConfig;
41
47
  preserveData?: boolean;
42
- parentRowContext?: {
43
- parentArrayKey: string;
44
- childArrayKey: string;
45
- };
48
+ parentRowContext?: NavigationParentRowContext;
46
49
  }
47
50
  /**
48
51
  * Item in navigation history stack
@@ -65,11 +68,7 @@ export interface NavigationState {
65
68
  hiddenStates: Record<string, boolean>;
66
69
  navigationEnabled: Set<string>;
67
70
  maxHistoryDepth: number;
68
- parentRowContext?: {
69
- parentArrayKey: string;
70
- rowIndex: number;
71
- childArrayKey: string;
72
- } | null;
71
+ parentRowContext?: ActiveParentRowContext | null;
73
72
  }
74
73
  /**
75
74
  * Options for useFormNavigation composable
@@ -29,7 +29,7 @@ export declare function useFormNavigation(options?: UseFormNavigationOptions, ev
29
29
  parentRowContext?: {
30
30
  parentArrayKey: string;
31
31
  rowIndex: number;
32
- childArrayKey: string;
32
+ childArrayKey?: string | undefined;
33
33
  } | null | undefined;
34
34
  }, NavigationState | {
35
35
  currentContext: string | null;
@@ -55,7 +55,7 @@ export declare function useFormNavigation(options?: UseFormNavigationOptions, ev
55
55
  parentRowContext?: {
56
56
  parentArrayKey: string;
57
57
  rowIndex: number;
58
- childArrayKey: string;
58
+ childArrayKey?: string | undefined;
59
59
  } | null | undefined;
60
60
  }>;
61
61
  hasHistory: import("vue").ComputedRef<boolean>;
@@ -83,7 +83,7 @@ export declare function useFormNavigation(options?: UseFormNavigationOptions, ev
83
83
  parentRowContext: import("vue").ComputedRef<{
84
84
  parentArrayKey: string;
85
85
  rowIndex: number;
86
- childArrayKey: string;
86
+ childArrayKey?: string | undefined;
87
87
  } | null | undefined>;
88
88
  navigateTo: (config: NavigationConfig, context?: any) => void;
89
89
  navigateBack: () => void;
@@ -27,7 +27,7 @@ export declare function useDynamicForm(props: DynamicFormProps, emit: any): {
27
27
  parentRowContext?: {
28
28
  parentArrayKey: string;
29
29
  rowIndex: number;
30
- childArrayKey: string;
30
+ childArrayKey?: string | undefined;
31
31
  } | null | undefined;
32
32
  }, import("./navigation/navigation.types").NavigationState | {
33
33
  currentContext: string | null;
@@ -53,7 +53,7 @@ export declare function useDynamicForm(props: DynamicFormProps, emit: any): {
53
53
  parentRowContext?: {
54
54
  parentArrayKey: string;
55
55
  rowIndex: number;
56
- childArrayKey: string;
56
+ childArrayKey?: string | undefined;
57
57
  } | null | undefined;
58
58
  }>;
59
59
  hasHistory: import("vue").ComputedRef<boolean>;
@@ -81,7 +81,7 @@ export declare function useDynamicForm(props: DynamicFormProps, emit: any): {
81
81
  parentRowContext: import("vue").ComputedRef<{
82
82
  parentArrayKey: string;
83
83
  rowIndex: number;
84
- childArrayKey: string;
84
+ childArrayKey?: string | undefined;
85
85
  } | null | undefined>;
86
86
  navigateTo: (config: import("./navigation/navigation.types").NavigationConfig, context?: any) => void;
87
87
  navigateBack: () => void;
@@ -139,7 +139,7 @@ export declare function useDynamicForm(props: DynamicFormProps, emit: any): {
139
139
  performAction: (action: any) => Promise<void>;
140
140
  handleSubmit: () => Promise<void>;
141
141
  handleCancel: () => any;
142
- handleFieldUpdate: (model: string, value: any, sectionKey?: string) => void;
142
+ handleFieldUpdate: (model: string, value: any, sectionKey?: string, scopedPath?: string) => void;
143
143
  getCleanPayload: () => Record<string, any>;
144
144
  applyFieldMapping: (data: Record<string, any>, mapping: Record<string, any>) => Record<string, any>;
145
145
  handleResponseMapping: (res: any, mapping: Record<string, any>, basePath?: string) => void;
@@ -47,6 +47,12 @@ export declare const mergeDeep: (target: any, source: any, seen?: WeakSet<object
47
47
  export declare const hasKeyParamDependencies: (endpoint: any) => boolean;
48
48
  export declare const resolveEndpointUrl: (url: string, baseUrl?: any) => string;
49
49
  export declare const isRowEmpty: (row: any) => boolean;
50
+ /**
51
+ * Nests dotted/indexed child table data inside parent arrays and cleans empty rows.
52
+ * E.g., attaches payload["asuransiConfigList.0.details"] -> payload["asuransiConfigList"][0]["details"]
53
+ * and cleans up flat dotted keys from the root payload.
54
+ */
55
+ export declare const nestChildDataIntoParent: (payload: Record<string, any>) => void;
50
56
  export declare const paginationStorageKey: (sectionKey: string, apiUrl: string) => string;
51
57
  export interface PaginationStorage {
52
58
  load(key: string): any | null;
@@ -38,6 +38,8 @@ export declare const toastState: import("vue").Ref<{
38
38
  duration?: number | undefined;
39
39
  onConfirm?: (() => void) | undefined;
40
40
  }>;
41
+ export declare const defaultConfirmText: Record<ToastType, string>;
42
+ export declare const defaultTitles: Record<ToastType, string>;
41
43
  /**
42
44
  * Close the alert modal
43
45
  */
@@ -51,10 +53,10 @@ export declare const showToast: (options: ToastOptions) => void;
51
53
  * import { toast } from '@skyworx/dynamic-ui'
52
54
  */
53
55
  export declare const toast: {
54
- success: (titleOrMessage: string, messageOrTitle?: string, duration?: number, immediate?: boolean) => void;
55
- error: (titleOrMessage: string, messageOrTitle?: string, duration?: number, immediate?: boolean) => void;
56
- warning: (titleOrMessage: string, messageOrTitle?: string, duration?: number, immediate?: boolean) => void;
57
- info: (titleOrMessage: string, messageOrTitle?: string, duration?: number, immediate?: boolean) => void;
56
+ success: (titleOrMessage: any, messageOrTitle?: any, duration?: number, immediate?: boolean) => void;
57
+ error: (titleOrMessage: any, messageOrTitle?: any, duration?: number, immediate?: boolean) => void;
58
+ warning: (titleOrMessage: any, messageOrTitle?: any, duration?: number, immediate?: boolean) => void;
59
+ info: (titleOrMessage: any, messageOrTitle?: any, duration?: number, immediate?: boolean) => void;
58
60
  loading: (title?: string, message?: string) => void;
59
61
  show: (options: ToastOptions) => void;
60
62
  close: () => void;
@@ -66,10 +68,10 @@ export declare const toast: {
66
68
  * Composable useToast()
67
69
  */
68
70
  export declare function useToast(): {
69
- success: (titleOrMessage: string, messageOrTitle?: string, duration?: number, immediate?: boolean) => void;
70
- error: (titleOrMessage: string, messageOrTitle?: string, duration?: number, immediate?: boolean) => void;
71
- warning: (titleOrMessage: string, messageOrTitle?: string, duration?: number, immediate?: boolean) => void;
72
- info: (titleOrMessage: string, messageOrTitle?: string, duration?: number, immediate?: boolean) => void;
71
+ success: (titleOrMessage: any, messageOrTitle?: any, duration?: number, immediate?: boolean) => void;
72
+ error: (titleOrMessage: any, messageOrTitle?: any, duration?: number, immediate?: boolean) => void;
73
+ warning: (titleOrMessage: any, messageOrTitle?: any, duration?: number, immediate?: boolean) => void;
74
+ info: (titleOrMessage: any, messageOrTitle?: any, duration?: number, immediate?: boolean) => void;
73
75
  loading: (title?: string, message?: string) => void;
74
76
  show: (options: ToastOptions) => void;
75
77
  close: () => void;
@@ -14,6 +14,7 @@ interface Props {
14
14
  schema?: any;
15
15
  hideActions?: boolean;
16
16
  apiParams?: Record<string, any>;
17
+ minHeight?: string;
17
18
  }
18
19
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
19
20
  cancel: () => any;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Ekstrak pesan error dari berbagai format:
3
+ * - Axios HTTP error (error.response.data.message / errorMessage / error / errors)
4
+ * - Plain Error object (error.message)
5
+ * - String langsung
6
+ * - Response object dengan status:false (res.message)
7
+ */
8
+ export declare function extractErrorMessage(err: any, fallback?: string): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { p as O, U as W, C as T, i as p, a as H, F as Kn, s as on, I as Zn, B as Qn, o as sn, j as Fe, Y as rn, q as mt, k as Be, K as ti, J as Tt, Z as ei, z as ni, H as It, G as ii, L as an, g as cn } from "./DrilldownUtil-esP8Tbvd.js";
2
- import { g as oi } from "./index-DFkmWGJV.js";
2
+ import { g as oi } from "./index-COpd-UNY.js";
3
3
  const N = "tokenSimulation.toggleMode", ln = "tokenSimulation.playSimulation", un = "tokenSimulation.pauseSimulation", tt = "tokenSimulation.resetSimulation", si = "tokenSimulation.animationCreated", hn = "tokenSimulation.animationSpeedChanged", pn = "tokenSimulation.simulator.elementChanged", Gt = "tokenSimulation.simulator.destroyScope", ri = "tokenSimulation.simulator.scopeChanged", vt = "tokenSimulation.simulator.createScope", Bt = "tokenSimulation.scopeFilterChanged", fn = "tokenSimulation.simulator.trace";
4
4
  var ai = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="currentColor" d="M12.83 352h262.34A12.82 12.82 0 0 0 288 339.17v-38.34A12.82 12.82 0 0 0 275.17 288H12.83A12.82 12.82 0 0 0 0 300.83v38.34A12.82 12.82 0 0 0 12.83 352zm0-256h262.34A12.82 12.82 0 0 0 288 83.17V44.83A12.82 12.82 0 0 0 275.17 32H12.83A12.82 12.82 0 0 0 0 44.83v38.34A12.82 12.82 0 0 0 12.83 96zM432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"/></svg>', ci = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="currentColor" d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/></svg>', li = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="currentColor" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"/></svg>', ui = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="currentColor" d="M384 144c0-44.2-35.8-80-80-80s-80 35.8-80 80c0 36.4 24.3 67.1 57.5 76.8-.6 16.1-4.2 28.5-11 36.9-15.4 19.2-49.3 22.4-85.2 25.7-28.2 2.6-57.4 5.4-81.3 16.9v-144c32.5-10.2 56-40.5 56-76.3 0-44.2-35.8-80-80-80S0 35.8 0 80c0 35.8 23.5 66.1 56 76.3v199.3C23.5 365.9 0 396.2 0 432c0 44.2 35.8 80 80 80s80-35.8 80-80c0-34-21.2-63.1-51.2-74.6 3.1-5.2 7.8-9.8 14.9-13.4 16.2-8.2 40.4-10.4 66.1-12.8 42.2-3.9 90-8.4 118.2-43.4 14-17.4 21.1-39.8 21.6-67.9 31.6-10.8 54.4-40.7 54.4-75.9zM80 64c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16 7.2-16 16-16zm0 384c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm224-320c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16 7.2-16 16-16z"/></svg>', hi = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="currentColor" d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"/></svg>', pi = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="currentColor" d="M20 424.229h20V279.771H20c-11.046 0-20-8.954-20-20V212c0-11.046 8.954-20 20-20h112c11.046 0 20 8.954 20 20v212.229h20c11.046 0 20 8.954 20 20V492c0 11.046-8.954 20-20 20H20c-11.046 0-20-8.954-20-20v-47.771c0-11.046 8.954-20 20-20zM96 0C56.235 0 24 32.235 24 72s32.235 72 72 72 72-32.235 72-72S135.764 0 96 0z"/></svg>', fi = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path fill="currentColor" d="M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"/></svg>', mi = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 580.5 448">
5
5
  <path fill="currentColor" d="M112 0C85 0 64 22 64 48v196l192-89V48c0-26-22-48-48-48zm256 0c-27 0-48 22-48 48v77l190-89c-5-21-24-36-46-36Zm144 105-192 89v70l192-89zM256 224 64 314v70l192-90zm256 21-192 89v66c0 27 21 48 48 48h96c26 0 48-21 48-48zM256 364 89 442c7 4 14 6 23 6h96c26 0 48-21 48-48z"/>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyworx/dynamic-ui",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "Vue 3 Dynamic UI Component Library - Compatible with Vue, React, Angular, and any other framework via Web Components",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -90,6 +90,7 @@
90
90
  "@fontsource/geist-sans": "^5.2.5",
91
91
  "@jamescoyle/vue-icon": "^0.1.2",
92
92
  "@mdi/js": "^7.4.47",
93
+ "@skyworx/dynamic-ui": "^1.0.29",
93
94
  "@uppy/core": "^5.0.0",
94
95
  "@uppy/dashboard": "^5.0.0",
95
96
  "@uppy/image-editor": "^4.0.0",