@fgv/ts-res-ui-components 5.0.0-21 → 5.0.0-23
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 +401 -155
- package/config/jest.setup.js +10 -0
- package/dist/ts-res-ui-components.d.ts +1657 -76
- package/lib/components/common/QualifierContextControl.js +4 -1
- package/lib/components/common/ResourceTreeView.js +4 -1
- package/lib/components/forms/GenericQualifierTypeEditForm.d.ts +26 -0
- package/lib/components/forms/GenericQualifierTypeEditForm.js +166 -0
- package/lib/components/forms/QualifierEditForm.d.ts +1 -1
- package/lib/components/forms/index.d.ts +2 -0
- package/lib/components/forms/index.js +1 -0
- package/lib/components/orchestrator/ResourceOrchestrator.d.ts +3 -0
- package/lib/components/orchestrator/ResourceOrchestrator.js +118 -51
- package/lib/components/pickers/ResourcePicker/ResourcePickerTree.js +32 -10
- package/lib/components/pickers/ResourcePicker/index.js +4 -2
- package/lib/components/views/CompiledView/index.js +75 -16
- package/lib/components/views/ConfigurationView/index.js +94 -35
- package/lib/components/views/FilterView/index.js +7 -4
- package/lib/components/views/GridView/EditableGridCell.d.ts +76 -0
- package/lib/components/views/GridView/EditableGridCell.js +224 -0
- package/lib/components/views/GridView/GridSelector.d.ts +43 -0
- package/lib/components/views/GridView/GridSelector.js +89 -0
- package/lib/components/views/GridView/MultiGridView.d.ts +85 -0
- package/lib/components/views/GridView/MultiGridView.js +196 -0
- package/lib/components/views/GridView/ResourceGrid.d.ts +38 -0
- package/lib/components/views/GridView/ResourceGrid.js +232 -0
- package/lib/components/views/GridView/SharedContextControls.d.ts +47 -0
- package/lib/components/views/GridView/SharedContextControls.js +95 -0
- package/lib/components/views/GridView/cells/BooleanCell.d.ts +44 -0
- package/lib/components/views/GridView/cells/BooleanCell.js +49 -0
- package/lib/components/views/GridView/cells/DropdownCell.d.ts +58 -0
- package/lib/components/views/GridView/cells/DropdownCell.js +182 -0
- package/lib/components/views/GridView/cells/StringCell.d.ts +57 -0
- package/lib/components/views/GridView/cells/StringCell.js +106 -0
- package/lib/components/views/GridView/cells/TriStateCell.d.ts +54 -0
- package/lib/components/views/GridView/cells/TriStateCell.js +112 -0
- package/lib/components/views/GridView/cells/index.d.ts +15 -0
- package/lib/components/views/GridView/cells/index.js +11 -0
- package/lib/components/views/GridView/index.d.ts +53 -0
- package/lib/components/views/GridView/index.js +212 -0
- package/lib/components/views/ImportView/index.js +22 -19
- package/lib/components/views/MessagesWindow/index.js +4 -1
- package/lib/components/views/ResolutionView/index.js +8 -5
- package/lib/contexts/ObservabilityContext.d.ts +85 -0
- package/lib/contexts/ObservabilityContext.js +98 -0
- package/lib/contexts/index.d.ts +2 -0
- package/lib/contexts/index.js +24 -0
- package/lib/hooks/useConfigurationState.d.ts +3 -3
- package/lib/hooks/useResolutionState.js +850 -246
- package/lib/hooks/useResourceData.d.ts +7 -4
- package/lib/hooks/useResourceData.js +185 -184
- package/lib/index.d.ts +5 -1
- package/lib/index.js +8 -1
- package/lib/namespaces/GridTools.d.ts +136 -0
- package/lib/namespaces/GridTools.js +138 -0
- package/lib/namespaces/ObservabilityTools.d.ts +3 -0
- package/lib/namespaces/ObservabilityTools.js +23 -0
- package/lib/namespaces/ResolutionTools.d.ts +2 -1
- package/lib/namespaces/ResolutionTools.js +2 -0
- package/lib/namespaces/index.d.ts +2 -0
- package/lib/namespaces/index.js +2 -0
- package/lib/test/integration/observability.integration.test.d.ts +2 -0
- package/lib/test/unit/hooks/useResourceData.test.d.ts +2 -0
- package/lib/test/unit/utils/downloadHelper.test.d.ts +2 -0
- package/lib/test/unit/workflows/resolutionWorkflows.test.d.ts +2 -0
- package/lib/test/unit/workflows/resourceCreation.test.d.ts +2 -0
- package/lib/test/unit/workflows/resultPatternExtensions.test.d.ts +2 -0
- package/lib/test/unit/workflows/validation.test.d.ts +2 -0
- package/lib/types/index.d.ts +387 -20
- package/lib/types/index.js +2 -1
- package/lib/utils/cellValidation.d.ts +113 -0
- package/lib/utils/cellValidation.js +248 -0
- package/lib/utils/downloadHelper.d.ts +66 -0
- package/lib/utils/downloadHelper.js +195 -0
- package/lib/utils/observability/factories.d.ts +29 -0
- package/lib/utils/observability/factories.js +58 -0
- package/lib/utils/observability/implementations.d.ts +61 -0
- package/lib/utils/observability/implementations.js +103 -0
- package/lib/utils/observability/index.d.ts +4 -0
- package/lib/utils/observability/index.js +26 -0
- package/lib/utils/observability/interfaces.d.ts +30 -0
- package/lib/utils/observability/interfaces.js +23 -0
- package/lib/utils/resolutionEditing.js +2 -1
- package/lib/utils/resourceSelector.d.ts +97 -0
- package/lib/utils/resourceSelector.js +195 -0
- package/lib/utils/resourceSelectors.d.ts +146 -0
- package/lib/utils/resourceSelectors.js +233 -0
- package/lib/utils/tsResIntegration.d.ts +6 -41
- package/lib/utils/tsResIntegration.js +20 -16
- package/lib/utils/zipLoader/zipProcessingHelpers.d.ts +3 -2
- package/lib/utils/zipLoader/zipProcessingHelpers.js +6 -5
- package/lib-commonjs/components/common/QualifierContextControl.js +4 -1
- package/lib-commonjs/components/common/ResourceTreeView.js +4 -1
- package/lib-commonjs/components/forms/GenericQualifierTypeEditForm.js +171 -0
- package/lib-commonjs/components/forms/index.js +3 -1
- package/lib-commonjs/components/orchestrator/ResourceOrchestrator.js +118 -51
- package/lib-commonjs/components/pickers/ResourcePicker/ResourcePickerTree.js +32 -10
- package/lib-commonjs/components/pickers/ResourcePicker/index.js +4 -2
- package/lib-commonjs/components/views/CompiledView/index.js +75 -16
- package/lib-commonjs/components/views/ConfigurationView/index.js +93 -34
- package/lib-commonjs/components/views/FilterView/index.js +7 -4
- package/lib-commonjs/components/views/GridView/EditableGridCell.js +232 -0
- package/lib-commonjs/components/views/GridView/GridSelector.js +94 -0
- package/lib-commonjs/components/views/GridView/MultiGridView.js +201 -0
- package/lib-commonjs/components/views/GridView/ResourceGrid.js +237 -0
- package/lib-commonjs/components/views/GridView/SharedContextControls.js +100 -0
- package/lib-commonjs/components/views/GridView/cells/BooleanCell.js +54 -0
- package/lib-commonjs/components/views/GridView/cells/DropdownCell.js +187 -0
- package/lib-commonjs/components/views/GridView/cells/StringCell.js +111 -0
- package/lib-commonjs/components/views/GridView/cells/TriStateCell.js +117 -0
- package/lib-commonjs/components/views/GridView/cells/index.js +18 -0
- package/lib-commonjs/components/views/GridView/index.js +217 -0
- package/lib-commonjs/components/views/ImportView/index.js +22 -19
- package/lib-commonjs/components/views/MessagesWindow/index.js +4 -1
- package/lib-commonjs/components/views/ResolutionView/index.js +8 -5
- package/lib-commonjs/contexts/ObservabilityContext.js +104 -0
- package/lib-commonjs/contexts/index.js +30 -0
- package/lib-commonjs/hooks/useResolutionState.js +849 -245
- package/lib-commonjs/hooks/useResourceData.js +184 -215
- package/lib-commonjs/index.js +15 -1
- package/lib-commonjs/namespaces/GridTools.js +161 -0
- package/lib-commonjs/namespaces/ObservabilityTools.js +33 -0
- package/lib-commonjs/namespaces/ResolutionTools.js +10 -1
- package/lib-commonjs/namespaces/index.js +3 -1
- package/lib-commonjs/types/index.js +10 -0
- package/lib-commonjs/utils/cellValidation.js +253 -0
- package/lib-commonjs/utils/downloadHelper.js +198 -0
- package/lib-commonjs/utils/observability/factories.js +63 -0
- package/lib-commonjs/utils/observability/implementations.js +109 -0
- package/lib-commonjs/utils/observability/index.js +36 -0
- package/lib-commonjs/utils/observability/interfaces.js +24 -0
- package/lib-commonjs/utils/resolutionEditing.js +2 -1
- package/lib-commonjs/utils/resourceSelector.js +200 -0
- package/lib-commonjs/utils/resourceSelectors.js +242 -0
- package/lib-commonjs/utils/tsResIntegration.js +21 -16
- package/lib-commonjs/utils/zipLoader/zipProcessingHelpers.js +7 -5
- package/package.json +7 -7
- package/src/components/common/QualifierContextControl.tsx +0 -338
- package/src/components/common/ResolutionContextOptionsControl.tsx +0 -450
- package/src/components/common/ResolutionResults/index.tsx +0 -481
- package/src/components/common/ResourceListView.tsx +0 -167
- package/src/components/common/ResourcePickerOptionsControl.tsx +0 -351
- package/src/components/common/ResourceTreeView.tsx +0 -417
- package/src/components/common/SourceResourceDetail/index.tsx +0 -493
- package/src/components/forms/HierarchyEditor.tsx +0 -285
- package/src/components/forms/QualifierEditForm.tsx +0 -487
- package/src/components/forms/QualifierTypeEditForm.tsx +0 -458
- package/src/components/forms/ResourceTypeEditForm.tsx +0 -437
- package/src/components/forms/index.ts +0 -11
- package/src/components/orchestrator/ResourceOrchestrator.tsx +0 -444
- package/src/components/pickers/ResourcePicker/README.md +0 -570
- package/src/components/pickers/ResourcePicker/ResourceItem.tsx +0 -127
- package/src/components/pickers/ResourcePicker/ResourcePickerList.tsx +0 -114
- package/src/components/pickers/ResourcePicker/ResourcePickerTree.tsx +0 -461
- package/src/components/pickers/ResourcePicker/index.tsx +0 -234
- package/src/components/pickers/ResourcePicker/types.ts +0 -301
- package/src/components/pickers/ResourcePicker/utils/treeNavigation.ts +0 -210
- package/src/components/views/CompiledView/index.tsx +0 -1342
- package/src/components/views/ConfigurationView/index.tsx +0 -848
- package/src/components/views/FilterView/index.tsx +0 -681
- package/src/components/views/ImportView/index.tsx +0 -789
- package/src/components/views/MessagesWindow/index.tsx +0 -325
- package/src/components/views/ResolutionView/EditableJsonView.tsx +0 -386
- package/src/components/views/ResolutionView/NewResourceModal.tsx +0 -158
- package/src/components/views/ResolutionView/UnifiedChangeControls.tsx +0 -163
- package/src/components/views/ResolutionView/index.tsx +0 -751
- package/src/components/views/SourceView/index.tsx +0 -291
- package/src/hooks/useConfigurationState.ts +0 -436
- package/src/hooks/useFilterState.ts +0 -150
- package/src/hooks/useResolutionState.ts +0 -893
- package/src/hooks/useResourceData.ts +0 -596
- package/src/hooks/useViewState.ts +0 -97
- package/src/index.ts +0 -68
- package/src/namespaces/ConfigurationTools.ts +0 -59
- package/src/namespaces/FilterTools.ts +0 -47
- package/src/namespaces/ImportTools.ts +0 -42
- package/src/namespaces/PickerTools.ts +0 -104
- package/src/namespaces/ResolutionTools.ts +0 -68
- package/src/namespaces/ResourceTools.ts +0 -106
- package/src/namespaces/TsResTools.ts +0 -49
- package/src/namespaces/ViewStateTools.ts +0 -91
- package/src/namespaces/ZipTools.ts +0 -49
- package/src/namespaces/index.ts +0 -49
- package/src/types/index.ts +0 -1273
- package/src/utils/configurationUtils.ts +0 -339
- package/src/utils/fileProcessing.ts +0 -164
- package/src/utils/filterResources.ts +0 -356
- package/src/utils/resolutionEditing.ts +0 -346
- package/src/utils/resolutionUtils.ts +0 -740
- package/src/utils/tsResIntegration.ts +0 -475
- package/src/utils/zipLoader/index.ts +0 -5
- package/src/utils/zipLoader/zipProcessingHelpers.ts +0 -46
- package/src/utils/zipLoader/zipUtils.ts +0 -7
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GridTools namespace for grid-based resource management components and utilities.
|
|
3
|
+
*
|
|
4
|
+
* Provides components and utilities for displaying and editing multiple resources
|
|
5
|
+
* simultaneously in grid/table format with configurable columns, validation,
|
|
6
|
+
* and batch operations.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { GridTools, ResourceTools } from '@fgv/ts-res-ui-components';
|
|
11
|
+
*
|
|
12
|
+
* // Single grid usage
|
|
13
|
+
* function UserDataGrid() {
|
|
14
|
+
* const { state, actions } = ResourceTools.useResourceData();
|
|
15
|
+
*
|
|
16
|
+
* const gridConfig: GridTools.GridViewInitParams = {
|
|
17
|
+
* id: 'users',
|
|
18
|
+
* title: 'User Data',
|
|
19
|
+
* resourceSelection: { type: 'prefix', prefix: 'user.' },
|
|
20
|
+
* columnMapping: [{
|
|
21
|
+
* resourceType: 'user-data',
|
|
22
|
+
* columns: [
|
|
23
|
+
* {
|
|
24
|
+
* id: 'name',
|
|
25
|
+
* title: 'Name',
|
|
26
|
+
* dataPath: 'name',
|
|
27
|
+
* editable: true,
|
|
28
|
+
* cellType: 'string',
|
|
29
|
+
* validation: { required: true, maxLength: 100 }
|
|
30
|
+
* },
|
|
31
|
+
* {
|
|
32
|
+
* id: 'email',
|
|
33
|
+
* title: 'Email',
|
|
34
|
+
* dataPath: 'email',
|
|
35
|
+
* editable: true,
|
|
36
|
+
* cellType: 'string',
|
|
37
|
+
* validation: {
|
|
38
|
+
* required: true,
|
|
39
|
+
* pattern: /^[^\s@]+@[^\s@]+\.[^\s@]+$/
|
|
40
|
+
* }
|
|
41
|
+
* },
|
|
42
|
+
* {
|
|
43
|
+
* id: 'active',
|
|
44
|
+
* title: 'Active',
|
|
45
|
+
* dataPath: 'active',
|
|
46
|
+
* editable: true,
|
|
47
|
+
* cellType: 'boolean'
|
|
48
|
+
* }
|
|
49
|
+
* ]
|
|
50
|
+
* }]
|
|
51
|
+
* };
|
|
52
|
+
*
|
|
53
|
+
* return (
|
|
54
|
+
* <GridTools.GridView
|
|
55
|
+
* gridConfig={gridConfig}
|
|
56
|
+
* resources={state.resources}
|
|
57
|
+
* resolutionState={state.resolutionState}
|
|
58
|
+
* resolutionActions={actions}
|
|
59
|
+
* availableQualifiers={['language', 'territory']}
|
|
60
|
+
* />
|
|
61
|
+
* );
|
|
62
|
+
* }
|
|
63
|
+
*
|
|
64
|
+
* // Multi-grid usage for admin workflows
|
|
65
|
+
* function AdminPanel() {
|
|
66
|
+
* const { state, actions } = ResourceTools.useResourceData();
|
|
67
|
+
*
|
|
68
|
+
* const gridConfigs: GridTools.GridViewInitParams[] = [
|
|
69
|
+
* {
|
|
70
|
+
* id: 'languages',
|
|
71
|
+
* title: 'Languages',
|
|
72
|
+
* resourceSelection: { type: 'resourceTypes', types: ['language-config'] },
|
|
73
|
+
* columnMapping: [{
|
|
74
|
+
* resourceType: 'language-config',
|
|
75
|
+
* columns: [
|
|
76
|
+
* { id: 'code', title: 'Code', dataPath: 'code' },
|
|
77
|
+
* {
|
|
78
|
+
* id: 'name',
|
|
79
|
+
* title: 'Display Name',
|
|
80
|
+
* dataPath: 'displayName',
|
|
81
|
+
* editable: true,
|
|
82
|
+
* cellType: 'string'
|
|
83
|
+
* }
|
|
84
|
+
* ]
|
|
85
|
+
* }]
|
|
86
|
+
* },
|
|
87
|
+
* {
|
|
88
|
+
* id: 'payment-methods',
|
|
89
|
+
* title: 'Payment Methods',
|
|
90
|
+
* resourceSelection: { type: 'prefix', prefix: 'payment.' },
|
|
91
|
+
* columnMapping: [{
|
|
92
|
+
* resourceType: 'payment-config',
|
|
93
|
+
* columns: [
|
|
94
|
+
* {
|
|
95
|
+
* id: 'status',
|
|
96
|
+
* title: 'Status',
|
|
97
|
+
* dataPath: 'status',
|
|
98
|
+
* editable: true,
|
|
99
|
+
* cellType: 'dropdown',
|
|
100
|
+
* dropdownOptions: [
|
|
101
|
+
* { value: 'active', label: 'Active' },
|
|
102
|
+
* { value: 'inactive', label: 'Inactive' }
|
|
103
|
+
* ]
|
|
104
|
+
* }
|
|
105
|
+
* ]
|
|
106
|
+
* }]
|
|
107
|
+
* }
|
|
108
|
+
* ];
|
|
109
|
+
*
|
|
110
|
+
* return (
|
|
111
|
+
* <GridTools.MultiGridView
|
|
112
|
+
* gridConfigurations={gridConfigs}
|
|
113
|
+
* resources={state.resources}
|
|
114
|
+
* resolutionState={state.resolutionState}
|
|
115
|
+
* resolutionActions={actions}
|
|
116
|
+
* availableQualifiers={['country', 'language', 'environment']}
|
|
117
|
+
* tabsPresentation="tabs"
|
|
118
|
+
* />
|
|
119
|
+
* );
|
|
120
|
+
* }
|
|
121
|
+
* ```
|
|
122
|
+
*
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
export { GridView } from '../components/views/GridView';
|
|
126
|
+
export { MultiGridView } from '../components/views/GridView/MultiGridView';
|
|
127
|
+
export { ResourceGrid } from '../components/views/GridView/ResourceGrid';
|
|
128
|
+
export { EditableGridCell } from '../components/views/GridView/EditableGridCell';
|
|
129
|
+
export { SharedContextControls } from '../components/views/GridView/SharedContextControls';
|
|
130
|
+
export { GridSelector } from '../components/views/GridView/GridSelector';
|
|
131
|
+
export { StringCell, BooleanCell, TriStateCell, DropdownCell } from '../components/views/GridView/cells';
|
|
132
|
+
export { ResourceSelector, defaultResourceSelector, selectResources } from '../utils/resourceSelector';
|
|
133
|
+
export { validateCellValue, ValidationPatterns, ValidationFunctions, GridValidationState } from '../utils/cellValidation';
|
|
134
|
+
export { hasGridValidationErrors, getAllGridValidationErrors, clearAllGridValidationErrors } from '../components/views/GridView/EditableGridCell';
|
|
135
|
+
export type { GridViewProps, MultiGridViewProps, GridViewInitParams, GridColumnDefinition, GridDropdownOption, GridCellValidation, GridResourceSelector, CustomResourceSelector, GridPresentationOptions, ResourceTypeColumnMapping, GridCellProps, GridCellEditorProps } from '../types';
|
|
136
|
+
//# sourceMappingURL=GridTools.d.ts.map
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GridTools namespace for grid-based resource management components and utilities.
|
|
3
|
+
*
|
|
4
|
+
* Provides components and utilities for displaying and editing multiple resources
|
|
5
|
+
* simultaneously in grid/table format with configurable columns, validation,
|
|
6
|
+
* and batch operations.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { GridTools, ResourceTools } from '@fgv/ts-res-ui-components';
|
|
11
|
+
*
|
|
12
|
+
* // Single grid usage
|
|
13
|
+
* function UserDataGrid() {
|
|
14
|
+
* const { state, actions } = ResourceTools.useResourceData();
|
|
15
|
+
*
|
|
16
|
+
* const gridConfig: GridTools.GridViewInitParams = {
|
|
17
|
+
* id: 'users',
|
|
18
|
+
* title: 'User Data',
|
|
19
|
+
* resourceSelection: { type: 'prefix', prefix: 'user.' },
|
|
20
|
+
* columnMapping: [{
|
|
21
|
+
* resourceType: 'user-data',
|
|
22
|
+
* columns: [
|
|
23
|
+
* {
|
|
24
|
+
* id: 'name',
|
|
25
|
+
* title: 'Name',
|
|
26
|
+
* dataPath: 'name',
|
|
27
|
+
* editable: true,
|
|
28
|
+
* cellType: 'string',
|
|
29
|
+
* validation: { required: true, maxLength: 100 }
|
|
30
|
+
* },
|
|
31
|
+
* {
|
|
32
|
+
* id: 'email',
|
|
33
|
+
* title: 'Email',
|
|
34
|
+
* dataPath: 'email',
|
|
35
|
+
* editable: true,
|
|
36
|
+
* cellType: 'string',
|
|
37
|
+
* validation: {
|
|
38
|
+
* required: true,
|
|
39
|
+
* pattern: /^[^\s@]+@[^\s@]+\.[^\s@]+$/
|
|
40
|
+
* }
|
|
41
|
+
* },
|
|
42
|
+
* {
|
|
43
|
+
* id: 'active',
|
|
44
|
+
* title: 'Active',
|
|
45
|
+
* dataPath: 'active',
|
|
46
|
+
* editable: true,
|
|
47
|
+
* cellType: 'boolean'
|
|
48
|
+
* }
|
|
49
|
+
* ]
|
|
50
|
+
* }]
|
|
51
|
+
* };
|
|
52
|
+
*
|
|
53
|
+
* return (
|
|
54
|
+
* <GridTools.GridView
|
|
55
|
+
* gridConfig={gridConfig}
|
|
56
|
+
* resources={state.resources}
|
|
57
|
+
* resolutionState={state.resolutionState}
|
|
58
|
+
* resolutionActions={actions}
|
|
59
|
+
* availableQualifiers={['language', 'territory']}
|
|
60
|
+
* />
|
|
61
|
+
* );
|
|
62
|
+
* }
|
|
63
|
+
*
|
|
64
|
+
* // Multi-grid usage for admin workflows
|
|
65
|
+
* function AdminPanel() {
|
|
66
|
+
* const { state, actions } = ResourceTools.useResourceData();
|
|
67
|
+
*
|
|
68
|
+
* const gridConfigs: GridTools.GridViewInitParams[] = [
|
|
69
|
+
* {
|
|
70
|
+
* id: 'languages',
|
|
71
|
+
* title: 'Languages',
|
|
72
|
+
* resourceSelection: { type: 'resourceTypes', types: ['language-config'] },
|
|
73
|
+
* columnMapping: [{
|
|
74
|
+
* resourceType: 'language-config',
|
|
75
|
+
* columns: [
|
|
76
|
+
* { id: 'code', title: 'Code', dataPath: 'code' },
|
|
77
|
+
* {
|
|
78
|
+
* id: 'name',
|
|
79
|
+
* title: 'Display Name',
|
|
80
|
+
* dataPath: 'displayName',
|
|
81
|
+
* editable: true,
|
|
82
|
+
* cellType: 'string'
|
|
83
|
+
* }
|
|
84
|
+
* ]
|
|
85
|
+
* }]
|
|
86
|
+
* },
|
|
87
|
+
* {
|
|
88
|
+
* id: 'payment-methods',
|
|
89
|
+
* title: 'Payment Methods',
|
|
90
|
+
* resourceSelection: { type: 'prefix', prefix: 'payment.' },
|
|
91
|
+
* columnMapping: [{
|
|
92
|
+
* resourceType: 'payment-config',
|
|
93
|
+
* columns: [
|
|
94
|
+
* {
|
|
95
|
+
* id: 'status',
|
|
96
|
+
* title: 'Status',
|
|
97
|
+
* dataPath: 'status',
|
|
98
|
+
* editable: true,
|
|
99
|
+
* cellType: 'dropdown',
|
|
100
|
+
* dropdownOptions: [
|
|
101
|
+
* { value: 'active', label: 'Active' },
|
|
102
|
+
* { value: 'inactive', label: 'Inactive' }
|
|
103
|
+
* ]
|
|
104
|
+
* }
|
|
105
|
+
* ]
|
|
106
|
+
* }]
|
|
107
|
+
* }
|
|
108
|
+
* ];
|
|
109
|
+
*
|
|
110
|
+
* return (
|
|
111
|
+
* <GridTools.MultiGridView
|
|
112
|
+
* gridConfigurations={gridConfigs}
|
|
113
|
+
* resources={state.resources}
|
|
114
|
+
* resolutionState={state.resolutionState}
|
|
115
|
+
* resolutionActions={actions}
|
|
116
|
+
* availableQualifiers={['country', 'language', 'environment']}
|
|
117
|
+
* tabsPresentation="tabs"
|
|
118
|
+
* />
|
|
119
|
+
* );
|
|
120
|
+
* }
|
|
121
|
+
* ```
|
|
122
|
+
*
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
// Export grid view components
|
|
126
|
+
export { GridView } from '../components/views/GridView';
|
|
127
|
+
export { MultiGridView } from '../components/views/GridView/MultiGridView';
|
|
128
|
+
export { ResourceGrid } from '../components/views/GridView/ResourceGrid';
|
|
129
|
+
export { EditableGridCell } from '../components/views/GridView/EditableGridCell';
|
|
130
|
+
export { SharedContextControls } from '../components/views/GridView/SharedContextControls';
|
|
131
|
+
export { GridSelector } from '../components/views/GridView/GridSelector';
|
|
132
|
+
// Export specialized cell components
|
|
133
|
+
export { StringCell, BooleanCell, TriStateCell, DropdownCell } from '../components/views/GridView/cells';
|
|
134
|
+
// Export grid utilities
|
|
135
|
+
export { ResourceSelector, defaultResourceSelector, selectResources } from '../utils/resourceSelector';
|
|
136
|
+
export { validateCellValue, ValidationPatterns, ValidationFunctions, GridValidationState } from '../utils/cellValidation';
|
|
137
|
+
export { hasGridValidationErrors, getAllGridValidationErrors, clearAllGridValidationErrors } from '../components/views/GridView/EditableGridCell';
|
|
138
|
+
//# sourceMappingURL=GridTools.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { IUserLogger, IObservabilityContext } from '../utils/observability';
|
|
2
|
+
export { ConsoleUserLogger, NoOpUserLogger, ObservabilityContext, createConsoleObservabilityContext, createNoOpObservabilityContext, DefaultObservabilityContext, TestObservabilityContext } from '../utils/observability';
|
|
3
|
+
//# sourceMappingURL=ObservabilityTools.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 Erik Fortune
|
|
3
|
+
*
|
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
* in the Software without restriction, including without limitation the rights
|
|
7
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
* furnished to do so, subject to the following conditions:
|
|
10
|
+
*
|
|
11
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
* copies or substantial portions of the Software.
|
|
13
|
+
*
|
|
14
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
* SOFTWARE.
|
|
21
|
+
*/
|
|
22
|
+
export { ConsoleUserLogger, NoOpUserLogger, ObservabilityContext, createConsoleObservabilityContext, createNoOpObservabilityContext, DefaultObservabilityContext, TestObservabilityContext } from '../utils/observability';
|
|
23
|
+
//# sourceMappingURL=ObservabilityTools.js.map
|
|
@@ -34,7 +34,8 @@ export { QualifierContextControl } from '../components/common/QualifierContextCo
|
|
|
34
34
|
export { ResolutionContextOptionsControl } from '../components/common/ResolutionContextOptionsControl';
|
|
35
35
|
export { useResolutionState } from '../hooks/useResolutionState';
|
|
36
36
|
export { createResolverWithContext, evaluateConditionsForCandidate, resolveResourceDetailed, getAvailableQualifiers, hasPendingContextChanges, type ResolutionOptions } from '../utils/resolutionUtils';
|
|
37
|
-
export
|
|
37
|
+
export { getPendingAdditionsByType, isPendingAddition, deriveLeafId, deriveFullId, getPendingResourceTypes, getPendingResourceStats, validatePendingResourceKeys } from '../utils/resourceSelectors';
|
|
38
|
+
export type { ResolutionState, ResolutionActions, ResolutionViewProps, ResolutionResult, CandidateInfo, ConditionEvaluationResult, EditedResourceInfo, ResolutionContextOptions, QualifierControlOptions, CreatePendingResourceParams } from '../types';
|
|
38
39
|
export type { EditableJsonViewProps } from '../components/views/ResolutionView/EditableJsonView';
|
|
39
40
|
export type { ResolutionContextOptionsControlProps } from '../components/common/ResolutionContextOptionsControl';
|
|
40
41
|
//# sourceMappingURL=ResolutionTools.d.ts.map
|
|
@@ -38,4 +38,6 @@ export { ResolutionContextOptionsControl } from '../components/common/Resolution
|
|
|
38
38
|
export { useResolutionState } from '../hooks/useResolutionState';
|
|
39
39
|
// Export utility functions
|
|
40
40
|
export { createResolverWithContext, evaluateConditionsForCandidate, resolveResourceDetailed, getAvailableQualifiers, hasPendingContextChanges } from '../utils/resolutionUtils';
|
|
41
|
+
// Export resource selector utility functions for pending resource management
|
|
42
|
+
export { getPendingAdditionsByType, isPendingAddition, deriveLeafId, deriveFullId, getPendingResourceTypes, getPendingResourceStats, validatePendingResourceKeys } from '../utils/resourceSelectors';
|
|
41
43
|
//# sourceMappingURL=ResolutionTools.js.map
|
|
@@ -46,4 +46,6 @@ export * as TsResTools from './TsResTools';
|
|
|
46
46
|
export * as ViewStateTools from './ViewStateTools';
|
|
47
47
|
export * as ZipTools from './ZipTools';
|
|
48
48
|
export * as PickerTools from './PickerTools';
|
|
49
|
+
export * as GridTools from './GridTools';
|
|
50
|
+
export * as ObservabilityTools from './ObservabilityTools';
|
|
49
51
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/namespaces/index.js
CHANGED
|
@@ -46,4 +46,6 @@ export * as TsResTools from './TsResTools';
|
|
|
46
46
|
export * as ViewStateTools from './ViewStateTools';
|
|
47
47
|
export * as ZipTools from './ZipTools';
|
|
48
48
|
export * as PickerTools from './PickerTools';
|
|
49
|
+
export * as GridTools from './GridTools';
|
|
50
|
+
export * as ObservabilityTools from './ObservabilityTools';
|
|
49
51
|
//# sourceMappingURL=index.js.map
|