@feedmepos/mf-hrm-portal 2.0.25-dev.2 → 2.1.0-dev

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 (55) hide show
  1. package/dist/AuditLogList-C1bGND8z.js +1037 -0
  2. package/dist/ConditionFormHost.vue_vue_type_script_setup_true_lang-tiuei7CA.js +383 -0
  3. package/dist/{EmployeeList-Cpv6Pc4J.js → EmployeeList-DqQF9xEx.js} +78 -78
  4. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js → FormItem.vue_vue_type_script_setup_true_lang-D3MOFOUI.js} +1 -1
  5. package/dist/{Main-3IwCguRi.js → Main-BgOhmojO.js} +6 -6
  6. package/dist/{Main-DrquIYbM.js → Main-D2Wf__wM.js} +1138 -1142
  7. package/dist/Main-DcKVuIjB.js +90 -0
  8. package/dist/PermissionSetList-CQpTa0eY.js +384 -0
  9. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CCKVpAwv.js +4030 -0
  10. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-sueNu2MD.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-D-14ca2J.js} +1 -1
  11. package/dist/RoleList-tSC8RJHe.js +674 -0
  12. package/dist/SelectFilter-DUj7GBtT.js +251 -0
  13. package/dist/TeamMemberList-Bz-kDJ0e.js +1163 -0
  14. package/dist/{TimesheetList-CMqKNZOd.js → TimesheetList-BFVhmcRt.js} +10 -10
  15. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-ekr2tKEO.js → TimesheetList.vue_vue_type_style_index_0_scoped_d7ed31d7_lang-CtHuL5tW.js} +2 -2
  16. package/dist/{app-D5h3x9dh.js → app-DRnSocX8.js} +5052 -2394
  17. package/dist/app.js +1 -1
  18. package/dist/{dayjs.min-BLtrWiQ_.js → dayjs.min-B8xOAypU.js} +1 -1
  19. package/dist/{employee-CpW9HMLY.js → employee-UrXqUaik.js} +3 -3
  20. package/dist/{iteration-D1WDQ_Kv.js → iteration-LEYoQKiI.js} +1 -1
  21. package/dist/{lodash-BI_MmDQa.js → lodash-Bq6_eZZ0.js} +1 -1
  22. package/dist/rule-CJC6Cq6S.js +1047 -0
  23. package/dist/src/api/audit-log/index.d.ts +0 -17
  24. package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
  25. package/dist/src/components/form/SelectFilter.vue.d.ts +0 -3
  26. package/dist/src/composables/useBasePermission.d.ts +1 -0
  27. package/dist/src/composables/useConditionDraft.d.ts +40 -0
  28. package/dist/src/composables/useCoverConditionOverride.d.ts +61 -0
  29. package/dist/src/helpers/business-timezone.d.ts +22 -0
  30. package/dist/src/helpers/permission-set.d.ts +4 -2
  31. package/dist/src/helpers/rule.d.ts +2 -1
  32. package/dist/src/stores/team.d.ts +1 -4
  33. package/dist/src/views/audit-log/locales/index.d.ts +16 -24
  34. package/dist/src/views/hr/locales/index.d.ts +0 -4
  35. package/dist/src/views/team/components/BasePermission.vue.d.ts +13 -0
  36. package/dist/src/views/team/condition-builders/ConditionFormHost.vue.d.ts +22 -0
  37. package/dist/src/views/team/condition-builders/ConditionFormRenderer.vue.d.ts +23 -0
  38. package/dist/src/views/team/condition-builders/component-map.d.ts +4 -0
  39. package/dist/src/views/team/condition-builders/condition-form-dedupe.d.ts +23 -0
  40. package/dist/src/views/team/locales/index.d.ts +68 -4
  41. package/dist/style.css +1 -1
  42. package/dist/tsconfig.app.tsbuildinfo +1 -1
  43. package/dist/{useAppStore-hU1uAhE-.js → useAppStore-BGsfYWAR.js} +1 -1
  44. package/dist/{useLoading-D0XTdxji.js → useLoading-BUM5R2qV.js} +1 -1
  45. package/dist/{useReportPermissions-Drb4irzE.js → useReportPermissions-nlQ_BBL2.js} +3 -3
  46. package/package.json +2 -2
  47. package/dist/AuditLogList-UHJxYRdr.js +0 -1145
  48. package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +0 -58
  49. package/dist/Main-Da2SFU8t.js +0 -94
  50. package/dist/PermissionSetList-upvouEfb.js +0 -356
  51. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CAjf-JPW.js +0 -3457
  52. package/dist/RoleList-CgSg0ydf.js +0 -566
  53. package/dist/SelectFilter-ATOm0hdn.js +0 -269
  54. package/dist/TeamMemberList-jEODaxFX.js +0 -1130
  55. package/dist/rule-DG8tt7hf.js +0 -995
@@ -8,7 +8,6 @@ declare const AuditLogAPI: {
8
8
  subjectPrefixes?: string[];
9
9
  actions?: string[];
10
10
  outcomes?: string[];
11
- feedmeAdminActors?: boolean;
12
11
  }): Promise<number>;
13
12
  read(params?: {
14
13
  limit?: number;
@@ -20,22 +19,6 @@ declare const AuditLogAPI: {
20
19
  subjectPrefixes?: string[];
21
20
  actions?: string[];
22
21
  outcomes?: string[];
23
- feedmeAdminActors?: boolean;
24
22
  }): Promise<AuditLogEntry[]>;
25
- /**
26
- * FeedMe-admin options for the User filter. `actors` is the named admin list (internal
27
- * viewers only; empty for merchants). `showFeedmeAdminFilter` indicates whether to offer
28
- * the "FeedMe Admin" catch-all (only when the business has relevant admin activity).
29
- */
30
- getFeedmeAdminFilter(params?: {
31
- from?: string;
32
- to?: string;
33
- }): Promise<{
34
- actors: {
35
- userId: string;
36
- name: string;
37
- }[];
38
- showFeedmeAdminFilter: boolean;
39
- }>;
40
23
  };
41
24
  export default AuditLogAPI;
@@ -141,8 +141,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
141
141
  }>> & Readonly<{
142
142
  "onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
143
143
  }>, {
144
- max: number;
145
144
  min: number;
145
+ max: number;
146
146
  disable: boolean;
147
147
  showAllToggle: string | boolean;
148
148
  includeDisabledOptionsWhenSelectAll: boolean;
@@ -4,9 +4,6 @@ export interface BaseOption {
4
4
  export interface SelectFilterOption {
5
5
  label: string;
6
6
  value: any;
7
- /** Optional group/section label. When any option has a `group`, the menu renders
8
- * section headers with per-group counts. Order groups by ordering `items`. */
9
- group?: string;
10
7
  [key: string]: any;
11
8
  }
12
9
  export interface Props {
@@ -7,6 +7,7 @@ export type CategoryGroup = {
7
7
  options: {
8
8
  label: string;
9
9
  value: string;
10
+ optionKey: string;
10
11
  }[];
11
12
  selectedSubjects: string[];
12
13
  isMultiAction: boolean;
@@ -0,0 +1,40 @@
1
+ import { type Ref } from 'vue';
2
+ /**
3
+ * Local draft state for condition editing — tracks form field edits and
4
+ * inherit/custom mode changes for each builder, keyed by `${subject}::${builderKey}`.
5
+ *
6
+ * Drafts remain local until explicitly committed via `applyDrafts`. Closing
7
+ * a popover/menu without applying discards uncommitted changes.
8
+ */
9
+ export interface DraftKey {
10
+ subject: string;
11
+ builderKey: string;
12
+ }
13
+ export interface ConditionDraft {
14
+ /** The local draft form value for this builder. */
15
+ formValue: unknown;
16
+ /** Local draft inherit/custom mode for builders under a cover subject. */
17
+ inheritMode?: 'inherit' | 'custom';
18
+ }
19
+ /**
20
+ * Creates a composable to manage local draft state for condition editing.
21
+ *
22
+ * @param committedSource - Ref to the committed state (e.g., modelValue, reportExtraConditions)
23
+ * used to detect external changes and reset drafts accordingly
24
+ */
25
+ export declare function useConditionDraft<T>(committedSource?: Ref<T>): {
26
+ drafts: Ref<Map<string, {
27
+ formValue: unknown;
28
+ inheritMode?: "inherit" | "custom" | undefined;
29
+ }> & Omit<Map<string, ConditionDraft>, keyof Map<any, any>>, Map<string, ConditionDraft> | (Map<string, {
30
+ formValue: unknown;
31
+ inheritMode?: "inherit" | "custom" | undefined;
32
+ }> & Omit<Map<string, ConditionDraft>, keyof Map<any, any>>)>;
33
+ setDraft: (key: DraftKey, draft: ConditionDraft) => void;
34
+ getDraft: (key: DraftKey) => ConditionDraft | undefined;
35
+ hasDraftsForSubject: (subject: string) => boolean;
36
+ getDraftsForSubject: (subject: string) => Map<string, ConditionDraft>;
37
+ clearDraftsForSubject: (subject: string) => void;
38
+ clearAllDrafts: () => void;
39
+ clearDraft: (key: DraftKey) => void;
40
+ };
@@ -0,0 +1,61 @@
1
+ import { type Ref, type ComputedRef } from 'vue';
2
+ import type { FdoPermissionRule } from '@feedmepos/core/entity';
3
+ import { type IFdtoPortalPermissionsWithVisibilityCondition } from '@feedmepos/hrm-permission';
4
+ import { type ConditionBuilder, type ConditionSummary } from '@feedmepos/hrm-permission/condition-builder';
5
+ /**
6
+ * Generic "category cover" machinery for the portal permission editor: any
7
+ * subject whose permission-definition category declares a cover (see
8
+ * `getCoverSubjectFor`) can have its condition-builder settings either
9
+ * inherit the cover subject's condition or hold a custom override — and the
10
+ * cover subject itself can push its condition down onto every individual
11
+ * override in the category.
12
+ *
13
+ * Zero knowledge of any specific subject, category, or builder lives here —
14
+ * everything is driven by the `defs` list (permission definitions carrying
15
+ * `category`/`isCategoryCover`) and the `ConditionBuilder` contract
16
+ * (`ownedFields`, `appliesToActions`, `summarizeForm`).
17
+ */
18
+ /** The minimum shape the editor's per-row entry needs to expose for cover/inherit resolution. */
19
+ export interface CoverConditionEntry {
20
+ /** Index of this subject's raw rule in the model, or null when no direct rule exists yet. */
21
+ index: number | null;
22
+ subject: string;
23
+ label: string;
24
+ actions: readonly string[];
25
+ }
26
+ /** Resolution handles passed to `onOverridesConflict` — the caller (UI) decides which to invoke. */
27
+ export interface CoverOverrideResolution {
28
+ /** Strip this builder's fragment from every covered override rule (dropping a rule once it carries no more conditions and its actions are covered). */
29
+ override: () => void;
30
+ /** Leave every covered override rule untouched. */
31
+ keep: () => void;
32
+ }
33
+ export interface UpdateBuilderConditionOptions {
34
+ /** Create a direct rule even if the resulting condition is empty (used when explicitly switching to "custom"). */
35
+ forceCreateRule?: boolean;
36
+ afterCommit?: () => void;
37
+ /**
38
+ * Invoked instead of auto-resolving when this write touches a cover
39
+ * subject's row and other subjects in the same category hold a
40
+ * conditioned override on this builder. Omit only for callers that don't
41
+ * need a confirmation step — the write then defaults to keeping the
42
+ * overrides untouched (the non-destructive choice).
43
+ */
44
+ onOverridesConflict?: (resolution: CoverOverrideResolution) => void;
45
+ }
46
+ export interface BuilderConditionDraft {
47
+ builder: ConditionBuilder;
48
+ form: unknown;
49
+ mode: 'inherit' | 'custom';
50
+ }
51
+ export declare function useCoverConditionOverride(rules: Ref<FdoPermissionRule[]>, defs: ComputedRef<IFdtoPortalPermissionsWithVisibilityCondition[]>, updateRules: (next: FdoPermissionRule[]) => void): {
52
+ getCoverSubject: (subject: string) => string | undefined;
53
+ coverLabel: (subject: string) => string | undefined;
54
+ shouldShowInheritToggle: (entry: CoverConditionEntry, builder: ConditionBuilder) => boolean;
55
+ inheritMode: (entry: CoverConditionEntry, builder: ConditionBuilder) => "inherit" | "custom";
56
+ setInheritMode: (entry: CoverConditionEntry, builder: ConditionBuilder, mode: "inherit" | "custom") => void;
57
+ inheritedSummary: (entry: CoverConditionEntry, builder: ConditionBuilder, timeZone: string) => ConditionSummary | undefined;
58
+ getEffectiveActions: (subject: string) => readonly string[];
59
+ updateBuilderCondition: (entry: CoverConditionEntry, builder: ConditionBuilder, form: unknown, options?: UpdateBuilderConditionOptions) => void;
60
+ applyConditionDrafts: (entry: CoverConditionEntry, updates: BuilderConditionDraft[], options?: UpdateBuilderConditionOptions) => void;
61
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Business timezone resolution — a pure mapping from country code to IANA
3
+ * timezone, used as a fallback when a business has no explicit timezone
4
+ * configured. Kept independent of any store so it's testable in isolation;
5
+ * callers resolve the business/country from their own store and pass the
6
+ * plain values in.
7
+ */
8
+ /** IANA timezone for a country code; falls back to the runtime's local zone for unknown/missing codes. */
9
+ export declare function getCountryTimezone(country?: string): string;
10
+ /** Minimal shape a business needs for timezone resolution. */
11
+ export interface BusinessTimezoneSource {
12
+ timezone?: string;
13
+ timeZone?: string;
14
+ country?: string;
15
+ }
16
+ /**
17
+ * Resolve the effective IANA timezone for a business: an explicit business
18
+ * timezone field wins (`timezone`, then legacy `timeZone`), otherwise falls
19
+ * back to the country's default timezone (business's own country first, then
20
+ * `fallbackCountry`).
21
+ */
22
+ export declare function resolveBusinessTimezone(business: BusinessTimezoneSource | undefined, fallbackCountry?: string): string;
@@ -71,8 +71,10 @@ export declare function filterStalePermissions(permissions: FdoPermissionRule[],
71
71
  * `allCustomReports` positive grant, preventing redundant data from being saved.
72
72
  *
73
73
  * - If the cover rule has `manage` selected → every individual rule in that bucket is
74
- * fully covered and dropped entirely.
75
- * - Otherwise, only covered non-manage actions are stripped from individual rules.
74
+ * fully covered and dropped entirely only when the cover condition also covers the
75
+ * individual rule.
76
+ * - Otherwise, only covered non-manage actions are stripped from individual rules when
77
+ * the cover condition also covers the individual rule.
76
78
  * If `manage` was present and any non-manage action is stripped (breaking the
77
79
  * "manage = all non-manage selected" invariant), `manage` is also stripped.
78
80
  * Rules that end up with no remaining actions are dropped.
@@ -20,7 +20,8 @@ export declare function getMaxDiscount(rules: FdoPermissionRule[]): number;
20
20
  export declare function getManagableRestaurantIds(rules: (FdoPermissionRule | RawRule)[]): string[] | null;
21
21
  export declare function hasAdminRule(rules: FdoPermissionRule[]): boolean;
22
22
  export declare function usableRoleIds(rules: (FdoPermissionRule | RawRule)[]): string[] | null;
23
- export declare function fromValue(values: string[], maxDiscountPercentage: number): {
23
+ export declare function extractReportExtraCondition(rule: FdoPermissionRule): Record<string, unknown> | undefined;
24
+ export declare function fromValue(values: string[], maxDiscountPercentage: number, periodConditions?: Map<string, Record<string, unknown>>): {
24
25
  subject: string;
25
26
  actions: ("delete" | "create" | "update" | "read" | "manage")[];
26
27
  conditions: object;
@@ -94,14 +94,13 @@ declare const useTeamStore: import("pinia").StoreDefinition<"team", Pick<{
94
94
  };
95
95
  }[]>;
96
96
  isLoading: import("vue").Ref<boolean, boolean>;
97
- hasLoaded: import("vue").Ref<boolean, boolean>;
98
97
  userIdToName: import("vue").ComputedRef<Record<string, string>>;
99
98
  userIdToEmail: import("vue").ComputedRef<Record<string, string>>;
100
99
  userIdToPhone: import("vue").ComputedRef<Record<string, string>>;
101
100
  readTeamMembers: ({ force }?: {
102
101
  force?: boolean | undefined;
103
102
  }) => Promise<void>;
104
- }, "isLoading" | "members" | "hasLoaded">, Pick<{
103
+ }, "isLoading" | "members">, Pick<{
105
104
  members: import("vue").Ref<{
106
105
  id: string;
107
106
  name: string;
@@ -196,7 +195,6 @@ declare const useTeamStore: import("pinia").StoreDefinition<"team", Pick<{
196
195
  };
197
196
  }[]>;
198
197
  isLoading: import("vue").Ref<boolean, boolean>;
199
- hasLoaded: import("vue").Ref<boolean, boolean>;
200
198
  userIdToName: import("vue").ComputedRef<Record<string, string>>;
201
199
  userIdToEmail: import("vue").ComputedRef<Record<string, string>>;
202
200
  userIdToPhone: import("vue").ComputedRef<Record<string, string>>;
@@ -298,7 +296,6 @@ declare const useTeamStore: import("pinia").StoreDefinition<"team", Pick<{
298
296
  };
299
297
  }[]>;
300
298
  isLoading: import("vue").Ref<boolean, boolean>;
301
- hasLoaded: import("vue").Ref<boolean, boolean>;
302
299
  userIdToName: import("vue").ComputedRef<Record<string, string>>;
303
300
  userIdToEmail: import("vue").ComputedRef<Record<string, string>>;
304
301
  userIdToPhone: import("vue").ComputedRef<Record<string, string>>;
@@ -19,9 +19,6 @@ export declare const i18nMessages: {
19
19
  dateRange: {
20
20
  placeholder: string;
21
21
  };
22
- user: {
23
- feedmeAdmin: string;
24
- };
25
22
  filter: {
26
23
  user_placeholder: string;
27
24
  selected_user_prefix: string;
@@ -49,12 +46,12 @@ export declare const i18nMessages: {
49
46
  payment: string;
50
47
  menu: string;
51
48
  crm: string;
52
- other: string;
53
49
  more: string;
54
50
  };
55
51
  columns: {
56
52
  timestamp: string;
57
53
  user: string;
54
+ role: string;
58
55
  subject: string;
59
56
  action: string;
60
57
  operation: string;
@@ -107,13 +104,14 @@ export declare const i18nMessages: {
107
104
  email: string;
108
105
  action: string;
109
106
  operation: string;
107
+ role: string;
110
108
  subject: string;
111
109
  field: string;
112
110
  outcome: string;
113
111
  business: string;
114
112
  restaurant: string;
115
- eventDetails: string;
116
- actionDescription: string;
113
+ changeDetails: string;
114
+ eventType: string;
117
115
  metadata: string;
118
116
  reason: string;
119
117
  resolvedFrom: string;
@@ -154,9 +152,6 @@ export declare const i18nMessages: {
154
152
  dateRange: {
155
153
  placeholder: string;
156
154
  };
157
- user: {
158
- feedmeAdmin: string;
159
- };
160
155
  filter: {
161
156
  user_placeholder: string;
162
157
  selected_user_prefix: string;
@@ -184,12 +179,12 @@ export declare const i18nMessages: {
184
179
  payment: string;
185
180
  menu: string;
186
181
  crm: string;
187
- other: string;
188
182
  more: string;
189
183
  };
190
184
  columns: {
191
185
  timestamp: string;
192
186
  user: string;
187
+ role: string;
193
188
  subject: string;
194
189
  action: string;
195
190
  operation: string;
@@ -242,13 +237,14 @@ export declare const i18nMessages: {
242
237
  email: string;
243
238
  action: string;
244
239
  operation: string;
240
+ role: string;
245
241
  subject: string;
246
242
  field: string;
247
243
  outcome: string;
248
244
  business: string;
249
245
  restaurant: string;
250
- eventDetails: string;
251
- actionDescription: string;
246
+ changeDetails: string;
247
+ eventType: string;
252
248
  metadata: string;
253
249
  reason: string;
254
250
  resolvedFrom: string;
@@ -290,9 +286,6 @@ export declare const i18nMessages: {
290
286
  dateRange: {
291
287
  placeholder: string;
292
288
  };
293
- user: {
294
- feedmeAdmin: string;
295
- };
296
289
  filter: {
297
290
  user_placeholder: string;
298
291
  selected_user_prefix: string;
@@ -320,12 +313,12 @@ export declare const i18nMessages: {
320
313
  payment: string;
321
314
  menu: string;
322
315
  crm: string;
323
- other: string;
324
316
  more: string;
325
317
  };
326
318
  columns: {
327
319
  timestamp: string;
328
320
  user: string;
321
+ role: string;
329
322
  subject: string;
330
323
  action: string;
331
324
  operation: string;
@@ -378,13 +371,14 @@ export declare const i18nMessages: {
378
371
  email: string;
379
372
  action: string;
380
373
  operation: string;
374
+ role: string;
381
375
  subject: string;
382
376
  field: string;
383
377
  outcome: string;
384
378
  business: string;
385
379
  restaurant: string;
386
- eventDetails: string;
387
- actionDescription: string;
380
+ changeDetails: string;
381
+ eventType: string;
388
382
  metadata: string;
389
383
  reason: string;
390
384
  resolvedFrom: string;
@@ -426,9 +420,6 @@ export declare const i18nMessages: {
426
420
  dateRange: {
427
421
  placeholder: string;
428
422
  };
429
- user: {
430
- feedmeAdmin: string;
431
- };
432
423
  filter: {
433
424
  user_placeholder: string;
434
425
  selected_user_prefix: string;
@@ -456,12 +447,12 @@ export declare const i18nMessages: {
456
447
  payment: string;
457
448
  menu: string;
458
449
  crm: string;
459
- other: string;
460
450
  more: string;
461
451
  };
462
452
  columns: {
463
453
  timestamp: string;
464
454
  user: string;
455
+ role: string;
465
456
  subject: string;
466
457
  action: string;
467
458
  operation: string;
@@ -514,13 +505,14 @@ export declare const i18nMessages: {
514
505
  email: string;
515
506
  action: string;
516
507
  operation: string;
508
+ role: string;
517
509
  subject: string;
518
510
  field: string;
519
511
  outcome: string;
520
512
  business: string;
521
513
  restaurant: string;
522
- eventDetails: string;
523
- actionDescription: string;
514
+ changeDetails: string;
515
+ eventType: string;
524
516
  metadata: string;
525
517
  reason: string;
526
518
  resolvedFrom: string;
@@ -5,7 +5,6 @@ export declare const i18nMessages: {
5
5
  hr: {
6
6
  employee: {
7
7
  title: string;
8
- subtitle: string;
9
8
  exportButtonLabel: string;
10
9
  createButtonLabel: string;
11
10
  columns: {
@@ -209,7 +208,6 @@ export declare const i18nMessages: {
209
208
  hr: {
210
209
  employee: {
211
210
  title: string;
212
- subtitle: string;
213
211
  exportButtonLabel: string;
214
212
  createButtonLabel: string;
215
213
  columns: {
@@ -413,7 +411,6 @@ export declare const i18nMessages: {
413
411
  hr: {
414
412
  employee: {
415
413
  title: string;
416
- subtitle: string;
417
414
  exportButtonLabel: string;
418
415
  createButtonLabel: string;
419
416
  columns: {
@@ -616,7 +613,6 @@ export declare const i18nMessages: {
616
613
  hr: {
617
614
  employee: {
618
615
  title: string;
619
- subtitle: string;
620
616
  exportButtonLabel: string;
621
617
  createButtonLabel: string;
622
618
  columns: {
@@ -5,10 +5,23 @@ declare var __VLS_21: `checkbox-${string}-append`, __VLS_22: {
5
5
  option: {
6
6
  label: string;
7
7
  value: string;
8
+ optionKey: string;
8
9
  };
10
+ isEffectiveSelected: boolean;
11
+ isCoveredByCover: boolean;
12
+ }, __VLS_25: `checkbox-${string}-icon`, __VLS_26: {
13
+ option: {
14
+ label: string;
15
+ value: string;
16
+ optionKey: string;
17
+ };
18
+ isEffectiveSelected: boolean;
19
+ isCoveredByCover: boolean;
9
20
  };
10
21
  type __VLS_Slots = {} & {
11
22
  [K in NonNullable<typeof __VLS_21>]?: (props: typeof __VLS_22) => any;
23
+ } & {
24
+ [K in NonNullable<typeof __VLS_25>]?: (props: typeof __VLS_26) => any;
12
25
  };
13
26
  declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
14
27
  modelValue: {
@@ -0,0 +1,22 @@
1
+ import type { ConditionBuilder } from '@feedmepos/hrm-permission/condition-builder';
2
+ type __VLS_Props = {
3
+ builder: ConditionBuilder;
4
+ modelValue: unknown;
5
+ disable?: boolean;
6
+ optionProviders?: Record<string, Array<{
7
+ value: string;
8
+ label: string;
9
+ }>>;
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
12
+ "update:modelValue": (value: unknown) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
15
+ }>, {
16
+ optionProviders: Record<string, Array<{
17
+ value: string;
18
+ label: string;
19
+ }>>;
20
+ disable: boolean;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import type { ConditionFormConfig, ConditionFormState } from '@feedmepos/hrm-permission/condition-builder';
2
+ type __VLS_Props = {
3
+ config: ConditionFormConfig;
4
+ modelValue: ConditionFormState;
5
+ disabled?: boolean;
6
+ /** name → option list, for fields whose options use `{ provider }`. */
7
+ optionProviders?: Record<string, Array<{
8
+ value: string;
9
+ label: string;
10
+ }>>;
11
+ };
12
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
+ "update:modelValue": (value: ConditionFormState) => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:modelValue"?: ((value: ConditionFormState) => any) | undefined;
16
+ }>, {
17
+ disabled: boolean;
18
+ optionProviders: Record<string, Array<{
19
+ value: string;
20
+ label: string;
21
+ }>>;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { type Component } from 'vue';
2
+ /** Resolve a form component key to a cached async component, or undefined when no
3
+ * component is registered for that key (the host then renders nothing). */
4
+ export declare function resolveBuilderComponent(key: string): Component | undefined;
@@ -0,0 +1,23 @@
1
+ import type { ConditionFormState } from '@feedmepos/hrm-permission/condition-builder';
2
+ /**
3
+ * Pure decision extracted from `ConditionFormRenderer.vue`'s `setField`, so
4
+ * it can be unit-tested without mounting the component (this repo's vitest
5
+ * setup has no `@vue/test-utils` / jsdom-environment component-mounting
6
+ * infrastructure yet — see the composable spec's notes on jsdom gaps).
7
+ *
8
+ * Some `FmRadio` / `FmCheckbox` fields (ui-library) fire their change
9
+ * handler twice per click — the click handler lives on a `<label>` wrapping
10
+ * the native input, so one click fires the handler once directly and once
11
+ * via the browser's synthetic click bubbling back through the label — which
12
+ * would otherwise make `setField` emit `update:modelValue` twice with an
13
+ * identical value. Comparing the freshly-computed next state against the
14
+ * last emitted (or last committed) state collapses that into a single
15
+ * emission, while still emitting for any genuinely new value.
16
+ *
17
+ * Uses lodash `isEqual` (already this app's idiom for comparing plain
18
+ * records — see `AddMemberForm.vue`, `PermissionSetForm.vue`, `RoleForm.vue`)
19
+ * rather than a `JSON.stringify` comparison, since these flat
20
+ * `{ key: value }` form records can hold arrays (multiselect) and key order
21
+ * is not guaranteed to be stable across the spread in `setField`.
22
+ */
23
+ export declare function shouldEmitConditionFormUpdate(next: ConditionFormState, lastEmitted: ConditionFormState): boolean;