@e-llm-studio/instant-learning 1.3.7 → 1.3.9
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/ComponentRegistry.js +52 -12
- package/dist/ComponentRegistry.js.map +1 -1
- package/dist/cjs/ComponentRegistry.js +52 -12
- package/dist/cjs/ComponentRegistry.js.map +1 -1
- package/dist/cjs/features/IL-marketplace/PromoteFlow/PromoteFlow.js +30 -8
- package/dist/cjs/features/IL-marketplace/PromoteFlow/PromoteFlow.js.map +1 -1
- package/dist/cjs/features/IL-marketplace/PromoteFlow/promote-flow.api.js +62 -1
- package/dist/cjs/features/IL-marketplace/PromoteFlow/promote-flow.api.js.map +1 -1
- package/dist/cjs/features/IL-marketplace/PromoteFlow/promote-flow.utils.js +23 -7
- package/dist/cjs/features/IL-marketplace/PromoteFlow/promote-flow.utils.js.map +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +62 -2
- package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js.map +1 -1
- package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js +55 -7
- package/dist/cjs/features/LearningManagement/components/InstantLearningModalDynamic.js.map +1 -1
- package/dist/cjs/schema-driven/components/GroupEditRow.js +4 -0
- package/dist/cjs/schema-driven/components/GroupEditRow.js.map +1 -1
- package/dist/cjs/schema-driven/components/RepeatableSectionField.js +247 -0
- package/dist/cjs/schema-driven/components/RepeatableSectionField.js.map +1 -0
- package/dist/cjs/schema-driven/components/TableComponent.js +11 -2
- package/dist/cjs/schema-driven/components/TableComponent.js.map +1 -1
- package/dist/cjs/schema-driven/helper.js +14 -4
- package/dist/cjs/schema-driven/helper.js.map +1 -1
- package/dist/cjs/schema-driven/hooks/useSectionEditSession.js +2 -1
- package/dist/cjs/schema-driven/hooks/useSectionEditSession.js.map +1 -1
- package/dist/cjs/schema-driven/types.js.map +1 -1
- package/dist/cjs/schema-driven/utils/PayloadUtils.js +22 -12
- package/dist/cjs/schema-driven/utils/PayloadUtils.js.map +1 -1
- package/dist/features/IL-marketplace/PromoteFlow/PromoteFlow.js +32 -10
- package/dist/features/IL-marketplace/PromoteFlow/PromoteFlow.js.map +1 -1
- package/dist/features/IL-marketplace/PromoteFlow/promote-flow.api.js +60 -2
- package/dist/features/IL-marketplace/PromoteFlow/promote-flow.api.js.map +1 -1
- package/dist/features/IL-marketplace/PromoteFlow/promote-flow.utils.js +23 -8
- package/dist/features/IL-marketplace/PromoteFlow/promote-flow.utils.js.map +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModal.js +62 -2
- package/dist/features/LearningManagement/components/InstantLearningModal.js.map +1 -1
- package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js +55 -7
- package/dist/features/LearningManagement/components/InstantLearningModalDynamic.js.map +1 -1
- package/dist/schema-driven/components/GroupEditRow.js +4 -0
- package/dist/schema-driven/components/GroupEditRow.js.map +1 -1
- package/dist/schema-driven/components/RepeatableSectionField.js +243 -0
- package/dist/schema-driven/components/RepeatableSectionField.js.map +1 -0
- package/dist/schema-driven/components/TableComponent.js +11 -2
- package/dist/schema-driven/components/TableComponent.js.map +1 -1
- package/dist/schema-driven/helper.js +14 -4
- package/dist/schema-driven/helper.js.map +1 -1
- package/dist/schema-driven/hooks/useSectionEditSession.js +2 -1
- package/dist/schema-driven/hooks/useSectionEditSession.js.map +1 -1
- package/dist/schema-driven/types.js.map +1 -1
- package/dist/schema-driven/utils/PayloadUtils.js +22 -12
- package/dist/schema-driven/utils/PayloadUtils.js.map +1 -1
- package/dist/types/src/ComponentRegistry.d.ts.map +1 -1
- package/dist/types/src/ILMarketplaceMockTest.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/PromoteFlow.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.api.d.ts +4 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.api.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.interfaces.d.ts +30 -2
- package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.interfaces.d.ts.map +1 -1
- package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.utils.d.ts +3 -2
- package/dist/types/src/features/IL-marketplace/PromoteFlow/promote-flow.utils.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts +30 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
- package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.d.ts +12 -0
- package/dist/types/src/features/LearningManagement/components/InstantLearningModalDynamic.d.ts.map +1 -1
- package/dist/types/src/schema-driven/components/GroupEditRow.d.ts.map +1 -1
- package/dist/types/src/schema-driven/components/RepeatableSectionField.d.ts +11 -0
- package/dist/types/src/schema-driven/components/RepeatableSectionField.d.ts.map +1 -0
- package/dist/types/src/schema-driven/components/TableComponent.d.ts.map +1 -1
- package/dist/types/src/schema-driven/helper.d.ts +1 -1
- package/dist/types/src/schema-driven/helper.d.ts.map +1 -1
- package/dist/types/src/schema-driven/hooks/useSectionEditSession.d.ts.map +1 -1
- package/dist/types/src/schema-driven/types.d.ts +6 -0
- package/dist/types/src/schema-driven/types.d.ts.map +1 -1
- package/dist/types/src/schema-driven/utils/PayloadUtils.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -2,18 +2,58 @@ import React__default from 'react';
|
|
|
2
2
|
import FallbackField from './schema-driven/FallbackField.js';
|
|
3
3
|
|
|
4
4
|
const componentRegistry = {
|
|
5
|
-
TextInput: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
TextInput: {
|
|
6
|
+
importPath: () => import('./schema-driven/components/TextInputField.js'),
|
|
7
|
+
isContainer: false
|
|
8
|
+
},
|
|
9
|
+
PageRangeInput: {
|
|
10
|
+
importPath: () => import('./schema-driven/components/PageRangeInputField.js'),
|
|
11
|
+
isContainer: false
|
|
12
|
+
},
|
|
13
|
+
FlexRow: {
|
|
14
|
+
importPath: () => import('./schema-driven/components/GroupEditRow.js'),
|
|
15
|
+
isContainer: true
|
|
16
|
+
},
|
|
17
|
+
DropdownSection: {
|
|
18
|
+
importPath: () => import('./schema-driven/components/DropdownSectionField.js'),
|
|
19
|
+
isContainer: false
|
|
20
|
+
},
|
|
21
|
+
ConditionSection: {
|
|
22
|
+
importPath: () => import('./schema-driven/components/ConditionSectionField.js'),
|
|
23
|
+
isContainer: false
|
|
24
|
+
},
|
|
25
|
+
ConfigSection: {
|
|
26
|
+
importPath: () => import('./schema-driven/components/ConfigSectionField.js'),
|
|
27
|
+
isContainer: false
|
|
28
|
+
},
|
|
29
|
+
ScopeSection: {
|
|
30
|
+
importPath: () => import('./schema-driven/components/ScopeSectionField.js'),
|
|
31
|
+
isContainer: false
|
|
32
|
+
},
|
|
33
|
+
PromptTextEditor: {
|
|
34
|
+
importPath: () => import('./schema-driven/components/PromptTextEditorField.js'),
|
|
35
|
+
isContainer: false
|
|
36
|
+
},
|
|
37
|
+
Accordion: {
|
|
38
|
+
importPath: () => import('./schema-driven/primitives/Accordion.js'),
|
|
39
|
+
isContainer: true
|
|
40
|
+
},
|
|
41
|
+
VariantListWrapper: {
|
|
42
|
+
importPath: () => import('./schema-driven/components/VariantListField.js'),
|
|
43
|
+
isContainer: true
|
|
44
|
+
},
|
|
45
|
+
RepeatableSection: {
|
|
46
|
+
importPath: () => import('./schema-driven/components/RepeatableSectionField.js'),
|
|
47
|
+
isContainer: true
|
|
48
|
+
},
|
|
49
|
+
GlobalSetupAccordion: {
|
|
50
|
+
importPath: () => import('./schema-driven/components/GlobalSetupAccordionField.js'),
|
|
51
|
+
isContainer: true
|
|
52
|
+
},
|
|
53
|
+
TableComponent: {
|
|
54
|
+
importPath: () => import('./schema-driven/components/TableComponent.js'),
|
|
55
|
+
isContainer: false
|
|
56
|
+
}
|
|
17
57
|
};
|
|
18
58
|
const isRegistryComponentName = (name) => name in componentRegistry;
|
|
19
59
|
const lazyCache = /* @__PURE__ */ new Map();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentRegistry.js","sources":["../src/ComponentRegistry.tsx"],"sourcesContent":["// src/ComponentRegistry.tsx\nimport React from 'react';\nimport FallbackField from './schema-driven/FallbackField';\n\nexport interface RegistryEntry {\n importPath: () => Promise<{ default: React.ComponentType<any> }>;\n isContainer?: boolean; // container components receive `renderChildren` to render nested `properties`\n}\n\n// ─── COMPONENT DICTIONARY ────────────────────────────────\n// Maps a schema's `bpa_ui_component` to a lazily-loaded component. Each component\n// lives in its own file under schema-driven/components — to add one, create a file\n// with a default export and register a line here. Keep this file registration-only.\nexport const componentRegistry: Record<string, RegistryEntry> = {\n TextInput:
|
|
1
|
+
{"version":3,"file":"ComponentRegistry.js","sources":["../src/ComponentRegistry.tsx"],"sourcesContent":["// src/ComponentRegistry.tsx\nimport React from 'react';\nimport FallbackField from './schema-driven/FallbackField';\n\nexport interface RegistryEntry {\n importPath: () => Promise<{ default: React.ComponentType<any> }>;\n isContainer?: boolean; // container components receive `renderChildren` to render nested `properties`\n}\n\n// ─── COMPONENT DICTIONARY ────────────────────────────────\n// Maps a schema's `bpa_ui_component` to a lazily-loaded component. Each component\n// lives in its own file under schema-driven/components — to add one, create a file\n// with a default export and register a line here. Keep this file registration-only.\nexport const componentRegistry: Record<string, RegistryEntry> = {\n TextInput: {\n importPath: () => import('./schema-driven/components/TextInputField'),\n isContainer: false,\n },\n PageRangeInput: {\n importPath: () => import('./schema-driven/components/PageRangeInputField'),\n isContainer: false,\n },\n FlexRow: {\n importPath: () => import('./schema-driven/components/GroupEditRow'),\n isContainer: true,\n },\n DropdownSection: {\n importPath: () => import('./schema-driven/components/DropdownSectionField'),\n isContainer: false,\n },\n ConditionSection: {\n importPath: () => import('./schema-driven/components/ConditionSectionField'),\n isContainer: false,\n },\n ConfigSection: {\n importPath: () => import('./schema-driven/components/ConfigSectionField'),\n isContainer: false,\n },\n ScopeSection: {\n importPath: () => import('./schema-driven/components/ScopeSectionField'),\n isContainer: false,\n },\n PromptTextEditor: {\n importPath: () => import('./schema-driven/components/PromptTextEditorField'),\n isContainer: false,\n },\n Accordion: {\n importPath: () => import('./schema-driven/primitives/Accordion'),\n isContainer: true,\n },\n VariantListWrapper: {\n importPath: () => import('./schema-driven/components/VariantListField'),\n isContainer: true,\n },\n RepeatableSection: {\n importPath: () => import('./schema-driven/components/RepeatableSectionField'),\n isContainer: true,\n },\n GlobalSetupAccordion: {\n importPath: () => import('./schema-driven/components/GlobalSetupAccordionField'),\n isContainer: true,\n },\n TableComponent: {\n importPath: () => import('./schema-driven/components/TableComponent'),\n isContainer: false,\n },\n};\n\n// ─── UTILITIES & CACHE ────────────────────────────────\nexport const isRegistryComponentName = (name: string): boolean => name in componentRegistry;\n\nconst lazyCache = new Map<string, React.LazyExoticComponent<React.ComponentType<any>>>();\n\nexport const resolveRegistryComponent = (\n name?: string | null\n): React.LazyExoticComponent<React.ComponentType<any>> | null => {\n if (!name) return null;\n if (!isRegistryComponentName(name)) {\n console.warn(`[componentRegistry] Unknown bpa_ui_component: \"${name}\"`);\n return null;\n }\n\n if (!lazyCache.has(name)) {\n lazyCache.set(name, React.lazy(componentRegistry[name].importPath));\n }\n return lazyCache.get(name)!;\n};\n\nexport const resolveRegistryComponentOrFallback = (name?: string | null) =>\n resolveRegistryComponent(name) ?? FallbackField;\n\nexport const isContainerComponent = (name?: string | null): boolean =>\n !!name && isRegistryComponentName(name) && !!componentRegistry[name].isContainer;\n"],"names":["React"],"mappings":";;;AAaO,MAAM,iBAAmD,GAAA;AAAA,EAC9D,SAAW,EAAA;AAAA,IACT,UAAA,EAAY,MAAM,OAAO,8CAA2C,CAAA;AAAA,IACpE,WAAa,EAAA,KAAA;AAAA,GACf;AAAA,EACA,cAAgB,EAAA;AAAA,IACd,UAAA,EA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interopDefaultLegacy(React);
|
|
11
11
|
|
|
12
12
|
const componentRegistry = {
|
|
13
|
-
TextInput: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
TextInput: {
|
|
14
|
+
importPath: () => Promise.resolve().then(function () { return require('./schema-driven/components/TextInputField.js'); }),
|
|
15
|
+
isContainer: false
|
|
16
|
+
},
|
|
17
|
+
PageRangeInput: {
|
|
18
|
+
importPath: () => Promise.resolve().then(function () { return require('./schema-driven/components/PageRangeInputField.js'); }),
|
|
19
|
+
isContainer: false
|
|
20
|
+
},
|
|
21
|
+
FlexRow: {
|
|
22
|
+
importPath: () => Promise.resolve().then(function () { return require('./schema-driven/components/GroupEditRow.js'); }),
|
|
23
|
+
isContainer: true
|
|
24
|
+
},
|
|
25
|
+
DropdownSection: {
|
|
26
|
+
importPath: () => Promise.resolve().then(function () { return require('./schema-driven/components/DropdownSectionField.js'); }),
|
|
27
|
+
isContainer: false
|
|
28
|
+
},
|
|
29
|
+
ConditionSection: {
|
|
30
|
+
importPath: () => Promise.resolve().then(function () { return require('./schema-driven/components/ConditionSectionField.js'); }),
|
|
31
|
+
isContainer: false
|
|
32
|
+
},
|
|
33
|
+
ConfigSection: {
|
|
34
|
+
importPath: () => Promise.resolve().then(function () { return require('./schema-driven/components/ConfigSectionField.js'); }),
|
|
35
|
+
isContainer: false
|
|
36
|
+
},
|
|
37
|
+
ScopeSection: {
|
|
38
|
+
importPath: () => Promise.resolve().then(function () { return require('./schema-driven/components/ScopeSectionField.js'); }),
|
|
39
|
+
isContainer: false
|
|
40
|
+
},
|
|
41
|
+
PromptTextEditor: {
|
|
42
|
+
importPath: () => Promise.resolve().then(function () { return require('./schema-driven/components/PromptTextEditorField.js'); }),
|
|
43
|
+
isContainer: false
|
|
44
|
+
},
|
|
45
|
+
Accordion: {
|
|
46
|
+
importPath: () => Promise.resolve().then(function () { return require('./schema-driven/primitives/Accordion.js'); }),
|
|
47
|
+
isContainer: true
|
|
48
|
+
},
|
|
49
|
+
VariantListWrapper: {
|
|
50
|
+
importPath: () => Promise.resolve().then(function () { return require('./schema-driven/components/VariantListField.js'); }),
|
|
51
|
+
isContainer: true
|
|
52
|
+
},
|
|
53
|
+
RepeatableSection: {
|
|
54
|
+
importPath: () => Promise.resolve().then(function () { return require('./schema-driven/components/RepeatableSectionField.js'); }),
|
|
55
|
+
isContainer: true
|
|
56
|
+
},
|
|
57
|
+
GlobalSetupAccordion: {
|
|
58
|
+
importPath: () => Promise.resolve().then(function () { return require('./schema-driven/components/GlobalSetupAccordionField.js'); }),
|
|
59
|
+
isContainer: true
|
|
60
|
+
},
|
|
61
|
+
TableComponent: {
|
|
62
|
+
importPath: () => Promise.resolve().then(function () { return require('./schema-driven/components/TableComponent.js'); }),
|
|
63
|
+
isContainer: false
|
|
64
|
+
}
|
|
25
65
|
};
|
|
26
66
|
const isRegistryComponentName = (name) => name in componentRegistry;
|
|
27
67
|
const lazyCache = /* @__PURE__ */ new Map();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentRegistry.js","sources":["../../src/ComponentRegistry.tsx"],"sourcesContent":["// src/ComponentRegistry.tsx\nimport React from 'react';\nimport FallbackField from './schema-driven/FallbackField';\n\nexport interface RegistryEntry {\n importPath: () => Promise<{ default: React.ComponentType<any> }>;\n isContainer?: boolean; // container components receive `renderChildren` to render nested `properties`\n}\n\n// ─── COMPONENT DICTIONARY ────────────────────────────────\n// Maps a schema's `bpa_ui_component` to a lazily-loaded component. Each component\n// lives in its own file under schema-driven/components — to add one, create a file\n// with a default export and register a line here. Keep this file registration-only.\nexport const componentRegistry: Record<string, RegistryEntry> = {\n TextInput:
|
|
1
|
+
{"version":3,"file":"ComponentRegistry.js","sources":["../../src/ComponentRegistry.tsx"],"sourcesContent":["// src/ComponentRegistry.tsx\nimport React from 'react';\nimport FallbackField from './schema-driven/FallbackField';\n\nexport interface RegistryEntry {\n importPath: () => Promise<{ default: React.ComponentType<any> }>;\n isContainer?: boolean; // container components receive `renderChildren` to render nested `properties`\n}\n\n// ─── COMPONENT DICTIONARY ────────────────────────────────\n// Maps a schema's `bpa_ui_component` to a lazily-loaded component. Each component\n// lives in its own file under schema-driven/components — to add one, create a file\n// with a default export and register a line here. Keep this file registration-only.\nexport const componentRegistry: Record<string, RegistryEntry> = {\n TextInput: {\n importPath: () => import('./schema-driven/components/TextInputField'),\n isContainer: false,\n },\n PageRangeInput: {\n importPath: () => import('./schema-driven/components/PageRangeInputField'),\n isContainer: false,\n },\n FlexRow: {\n importPath: () => import('./schema-driven/components/GroupEditRow'),\n isContainer: true,\n },\n DropdownSection: {\n importPath: () => import('./schema-driven/components/DropdownSectionField'),\n isContainer: false,\n },\n ConditionSection: {\n importPath: () => import('./schema-driven/components/ConditionSectionField'),\n isContainer: false,\n },\n ConfigSection: {\n importPath: () => import('./schema-driven/components/ConfigSectionField'),\n isContainer: false,\n },\n ScopeSection: {\n importPath: () => import('./schema-driven/components/ScopeSectionField'),\n isContainer: false,\n },\n PromptTextEditor: {\n importPath: () => import('./schema-driven/components/PromptTextEditorField'),\n isContainer: false,\n },\n Accordion: {\n importPath: () => import('./schema-driven/primitives/Accordion'),\n isContainer: true,\n },\n VariantListWrapper: {\n importPath: () => import('./schema-driven/components/VariantListField'),\n isContainer: true,\n },\n RepeatableSection: {\n importPath: () => import('./schema-driven/components/RepeatableSectionField'),\n isContainer: true,\n },\n GlobalSetupAccordion: {\n importPath: () => import('./schema-driven/components/GlobalSetupAccordionField'),\n isContainer: true,\n },\n TableComponent: {\n importPath: () => import('./schema-driven/components/TableComponent'),\n isContainer: false,\n },\n};\n\n// ─── UTILITIES & CACHE ────────────────────────────────\nexport const isRegistryComponentName = (name: string): boolean => name in componentRegistry;\n\nconst lazyCache = new Map<string, React.LazyExoticComponent<React.ComponentType<any>>>();\n\nexport const resolveRegistryComponent = (\n name?: string | null\n): React.LazyExoticComponent<React.ComponentType<any>> | null => {\n if (!name) return null;\n if (!isRegistryComponentName(name)) {\n console.warn(`[componentRegistry] Unknown bpa_ui_component: \"${name}\"`);\n return null;\n }\n\n if (!lazyCache.has(name)) {\n lazyCache.set(name, React.lazy(componentRegistry[name].importPath));\n }\n return lazyCache.get(name)!;\n};\n\nexport const resolveRegistryComponentOrFallback = (name?: string | null) =>\n resolveRegistryComponent(name) ?? FallbackField;\n\nexport const isContainerComponent = (name?: string | null): boolean =>\n !!name && isRegistryComponentName(name) && !!componentRegistry[name].isContainer;\n"],"names":["React","FallbackField"],"mappings":";;;;;;;;;;;AAaO,MAAM,iBAAmD,GAAA;AAAA,EAC9D,SAAW,EAAA;AAAA,IACT,UAAA,EAAY,MAAM,oDAAO,8CAA2C,KAAA;AAAA,IACpE,WAAa,EAAA,KAAA;AAAA,GACf;AAAA,EACA,cAAgB,EAAA;AAAA,IACd,UAAA,EAAY,MAAM,oDAAO,mDAAgD,KAAA;AAAA,IACzE,WAAa,EAAA,KAAA;AAAA,GACf;AAAA,EACA,OAAS,EAAA;AAAA,IACP,UAAA,EAAY,MAAM,oDAAO,4CAAyC,KAAA;AAAA,IAClE,WAAa,EAAA,IAAA;AAAA,GACf;AAAA,EACA,eAAiB,EAAA;AAAA,IACf,UAAA,EAAY,MAAM,oDAAO,oDAAiD,KAAA;AAAA,IAC1E,WAAa,EAAA,KAAA;AAAA,GACf;AAAA,EACA,gBAAkB,EAAA;AAAA,IAChB,UAAA,EAAY,MAAM,oDAAO,qDAAkD,KAAA;AAAA,IAC3E,WAAa,EAAA,KAAA;AAAA,GACf;AAAA,EACA,aAAe,EAAA;AAAA,IACb,UAAA,EAAY,MAAM,oDAAO,kDAA+C,KAAA;AAAA,IACxE,WAAa,EAAA,KAAA;AAAA,GACf;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,UAAA,EAAY,MAAM,oDAAO,iDAA8C,KAAA;AAAA,IACvE,WAAa,EAAA,KA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I,MAAMA,yBAAM,CAAA,IAAA,CAAK,kBAAkB,IAAI,CAAA,CAAE,UAAU,CAAC,CAAA,CAAA;AAAA,GACpE;AACA,EAAO,OAAA,SAAA,CAAU,IAAI,IAAI,CAAA,CAAA;AAC3B,EAAA;AAEa,MAAA,kCAAA,GAAqC,CAAC,IAAsB,KAAA;AAxFzE,EAAA,IAAA,EAAA,CAAA;AAyFE,EAAyB,OAAA,CAAA,EAAA,GAAA,wBAAA,CAAA,IAAI,MAA7B,IAAkC,GAAA,EAAA,GAAAC,wBAAA,CAAA;AAAA,EAAA;AAE7B,MAAM,oBAAuB,GAAA,CAAC,IACnC,KAAA,CAAC,CAAC,IAAA,IAAQ,uBAAwB,CAAA,IAAI,CAAK,IAAA,CAAC,CAAC,iBAAA,CAAkB,IAAI,CAAE,CAAA;;;;;;;;"}
|
|
@@ -62,6 +62,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
62
62
|
const [configSearchTier, setConfigSearchTier] = React.useState(null);
|
|
63
63
|
const [submittingAction, setSubmittingAction] = React.useState(null);
|
|
64
64
|
const [historyActionTaskId, setHistoryActionTaskId] = React.useState(null);
|
|
65
|
+
const [viewedHistoryTaskId, setViewedHistoryTaskId] = React.useState(null);
|
|
65
66
|
const [isStatusPollingStopped, setIsStatusPollingStopped] = React.useState(false);
|
|
66
67
|
const [isInitialStatusLoading, setIsInitialStatusLoading] = React.useState(true);
|
|
67
68
|
const [isCheckingPreflight, setIsCheckingPreflight] = React.useState(false);
|
|
@@ -187,6 +188,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
187
188
|
setError(null);
|
|
188
189
|
setPromotionTask(null);
|
|
189
190
|
setPromotionStatusForActions(null);
|
|
191
|
+
setViewedHistoryTaskId(null);
|
|
190
192
|
const refreshInitialPromotionState = async () => {
|
|
191
193
|
try {
|
|
192
194
|
const status = await promoteFlow_api.getPromotionStatus(guidelineResourceId);
|
|
@@ -306,7 +308,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
306
308
|
}, [promotionTaskForGuideline == null ? void 0 : promotionTaskForGuideline.created_by, promotionTaskForGuideline == null ? void 0 : promotionTaskForGuideline.promotion_task_id]);
|
|
307
309
|
React.useEffect(() => {
|
|
308
310
|
const promotionStatusToPoll = promotionTaskForGuideline != null ? promotionTaskForGuideline : promotionStatusForActions;
|
|
309
|
-
if (!promotionStatusToPoll || isStatusPollingStopped || !promoteConstants.PROMOTION_IN_PROGRESS_STATUSES.some((status) => status === promotionStatusToPoll.status)) {
|
|
311
|
+
if (viewedHistoryTaskId || !promotionStatusToPoll || isStatusPollingStopped || !promoteConstants.PROMOTION_IN_PROGRESS_STATUSES.some((status) => status === promotionStatusToPoll.status)) {
|
|
310
312
|
return;
|
|
311
313
|
}
|
|
312
314
|
const pollStatus = async () => {
|
|
@@ -330,7 +332,8 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
330
332
|
promotionStatusForActions,
|
|
331
333
|
promotionTaskForGuideline,
|
|
332
334
|
setError,
|
|
333
|
-
setPromotionTask
|
|
335
|
+
setPromotionTask,
|
|
336
|
+
viewedHistoryTaskId
|
|
334
337
|
]);
|
|
335
338
|
const handlePromoteNow = async () => {
|
|
336
339
|
const promotionRequest = createPromotionRequest();
|
|
@@ -338,6 +341,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
338
341
|
setSubmitting(true);
|
|
339
342
|
setSubmittingAction("now");
|
|
340
343
|
setError(null);
|
|
344
|
+
setViewedHistoryTaskId(null);
|
|
341
345
|
try {
|
|
342
346
|
const task = await promoteFlow_api.startPromotion(promotionRequest);
|
|
343
347
|
setIsStatusPollingStopped(false);
|
|
@@ -384,10 +388,23 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
384
388
|
...configuration,
|
|
385
389
|
is_tenant_db: isTenantEnvironment(environment)
|
|
386
390
|
};
|
|
387
|
-
const
|
|
388
|
-
promoteFlow_utils.
|
|
391
|
+
const credential = await promoteFlow_api.addAlloyDbCredential(
|
|
392
|
+
promoteFlow_utils.toAddAlloyDbCredentialRequest(configurationToSave)
|
|
393
|
+
);
|
|
394
|
+
await promoteFlow_api.createEnvironmentConfig(
|
|
395
|
+
promoteFlow_utils.toCreateEnvironmentConfigRequest(
|
|
396
|
+
configurationToSave,
|
|
397
|
+
credential.credId,
|
|
398
|
+
credential.credName
|
|
399
|
+
)
|
|
400
|
+
);
|
|
401
|
+
setEnvironment(
|
|
402
|
+
environment,
|
|
403
|
+
promoteFlow_utils.toRegistryRecord(credential.credId, {
|
|
404
|
+
...configurationToSave,
|
|
405
|
+
env_name: credential.credName
|
|
406
|
+
})
|
|
389
407
|
);
|
|
390
|
-
setEnvironment(environment, promoteFlow_utils.toRegistryRecord(response.env_id, configurationToSave));
|
|
391
408
|
};
|
|
392
409
|
const openEnvironmentConfiguration = (environment) => {
|
|
393
410
|
setConfigSearchTier(
|
|
@@ -402,6 +419,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
402
419
|
setSubmitting(true);
|
|
403
420
|
setSubmittingAction("later");
|
|
404
421
|
setError(null);
|
|
422
|
+
setViewedHistoryTaskId(null);
|
|
405
423
|
try {
|
|
406
424
|
const scheduledPromotion = await promoteFlow_api.schedulePromotion(promotionRequest);
|
|
407
425
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -436,6 +454,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
436
454
|
setSubmitting(true);
|
|
437
455
|
setSubmittingAction("trigger");
|
|
438
456
|
setError(null);
|
|
457
|
+
setViewedHistoryTaskId(null);
|
|
439
458
|
try {
|
|
440
459
|
const task = await promoteFlow_api.triggerScheduledPromotion(triggerUrl);
|
|
441
460
|
setIsStatusPollingStopped(false);
|
|
@@ -462,8 +481,9 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
462
481
|
setHistoryActionTaskId(promotionTaskId);
|
|
463
482
|
setError(null);
|
|
464
483
|
try {
|
|
465
|
-
|
|
466
|
-
|
|
484
|
+
const task = await promoteFlow_api.getPromotionTaskDetails(promotionTaskId);
|
|
485
|
+
setViewedHistoryTaskId(promotionTaskId);
|
|
486
|
+
setPromotionTask(task, guidelineResourceId);
|
|
467
487
|
} catch (statusError) {
|
|
468
488
|
setError(
|
|
469
489
|
statusError instanceof Error ? statusError.message : "Unable to load promotion details.",
|
|
@@ -476,6 +496,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
476
496
|
const handleRollbackPromotion = async (promotionTaskId) => {
|
|
477
497
|
setHistoryActionTaskId(promotionTaskId);
|
|
478
498
|
setError(null);
|
|
499
|
+
setViewedHistoryTaskId(null);
|
|
479
500
|
try {
|
|
480
501
|
const task = await promoteFlow_api.rollbackPromotion(promotionTaskId);
|
|
481
502
|
setIsStatusPollingStopped(false);
|
|
@@ -492,6 +513,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
492
513
|
const handleBack = async () => {
|
|
493
514
|
if (promotionTaskForGuideline) {
|
|
494
515
|
setPromotionTask(null);
|
|
516
|
+
setViewedHistoryTaskId(null);
|
|
495
517
|
setIsInitialStatusLoading(true);
|
|
496
518
|
setIsLoadingHistory(true);
|
|
497
519
|
try {
|
|
@@ -847,7 +869,7 @@ function PromoteFlow({ guideline, onBack, onPromote, className }) {
|
|
|
847
869
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: PromoteFlow_module["default"].metaValue, children: promoteFlow_utils.formatPromotionDate(promotionTaskForGuideline == null ? void 0 : promotionTaskForGuideline.created_at) })
|
|
848
870
|
] }),
|
|
849
871
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
850
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: PromoteFlow_module["default"].metaLabel, children: "Promoted by" }),
|
|
872
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: PromoteFlow_module["default"].metaLabel, children: (promotionTaskForGuideline == null ? void 0 : promotionTaskForGuideline.status) === "SCHEDULED" ? "Scheduled by" : "Promoted by" }),
|
|
851
873
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: PromoteFlow_module["default"].metaValue, children: promotedByName != null ? promotedByName : "\u2014" })
|
|
852
874
|
] }),
|
|
853
875
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|