@codebards/ik-embeddable-form 0.0.2717408259-qa → 0.0.2720839511-qa

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/embed.js CHANGED
@@ -62,6 +62,7 @@ var IKEmbeddableFormBundle = function(exports) {
62
62
  "experience",
63
63
  "domain",
64
64
  "primaryGoal",
65
+ "topicOfInterest",
65
66
  "interviewTimeline",
66
67
  // goals-details
67
68
  "employmentStatus",
@@ -1742,6 +1743,8 @@ var IKEmbeddableFormBundle = function(exports) {
1742
1743
  experience: "gql_experience",
1743
1744
  domain: "gql_domain_role",
1744
1745
  primaryGoal: "gql_Your_Goal",
1746
+ /** From the WordPress markup's `id="career-goal"` — confirm against the live ClickID */
1747
+ topicOfInterest: "career-goal",
1745
1748
  employmentStatus: "gql_employment_status",
1746
1749
  workAuthorization: "gql_work_authorization",
1747
1750
  interviewTimeline: "gql_Start_Interviewing",
@@ -2751,6 +2754,24 @@ var IKEmbeddableFormBundle = function(exports) {
2751
2754
  },
2752
2755
  { value: "exploring", label: "Just exploring" }
2753
2756
  ];
2757
+ const GQL_TOPIC_OF_INTEREST_OPTIONS = [
2758
+ {
2759
+ value: "Use AI in current job",
2760
+ label: "Add AI skills to your current tech stack"
2761
+ },
2762
+ {
2763
+ value: "Switch to an AI career",
2764
+ label: "Learn Machine Learning & crack top tech roles"
2765
+ },
2766
+ {
2767
+ value: "Upskill in your role with Agentic AI and Gen AI",
2768
+ label: "Build enterprise-grade Agentic AI portfolio with PwC India"
2769
+ },
2770
+ {
2771
+ value: "Uplevel in my role",
2772
+ label: "Prepare for MAANG+ interviews"
2773
+ }
2774
+ ];
2754
2775
  const GQL_EMPLOYMENT_STATUS_OPTIONS = [
2755
2776
  { value: "Employed", label: "Employed" },
2756
2777
  { value: "Not currently employed", label: "Not currently employed" }
@@ -2878,6 +2899,8 @@ var IKEmbeddableFormBundle = function(exports) {
2878
2899
  "webinar-type": webinarType,
2879
2900
  "old-webinar-type": oldWebinarType,
2880
2901
  primary_goal: resolvePrimaryGoalForApi(str(formData.primaryGoal)),
2902
+ /** India-only field; empty string for variants that hide it */
2903
+ "Topic of Interest": str(formData.topicOfInterest),
2881
2904
  "Work Experience": normalizeExperienceForApi(experience),
2882
2905
  "Role Domain": resolveDomainForApi(str(formData.domain)),
2883
2906
  "Is Student": isStudent
@@ -7025,7 +7048,7 @@ var IKEmbeddableFormBundle = function(exports) {
7025
7048
  const booleanType = ZodBoolean.create;
7026
7049
  const unknownType = ZodUnknown.create;
7027
7050
  ZodNever.create;
7028
- ZodArray.create;
7051
+ const arrayType = ZodArray.create;
7029
7052
  const objectType = ZodObject.create;
7030
7053
  const unionType = ZodUnion.create;
7031
7054
  ZodIntersection.create;
@@ -7035,8 +7058,17 @@ var IKEmbeddableFormBundle = function(exports) {
7035
7058
  ZodPromise.create;
7036
7059
  ZodOptional.create;
7037
7060
  ZodNullable.create;
7061
+ const fieldOptionSchema = objectType({
7062
+ label: stringType(),
7063
+ value: stringType(),
7064
+ disabled: booleanType().optional(),
7065
+ icon: stringType().optional(),
7066
+ metadata: recordType(unknownType()).optional()
7067
+ });
7038
7068
  const fieldOverrideSchema = objectType({
7039
- show: booleanType().optional()
7069
+ show: booleanType().optional(),
7070
+ /** Replaces the base field's option list wholesale */
7071
+ options: arrayType(fieldOptionSchema).optional()
7040
7072
  }).passthrough();
7041
7073
  const stepOverrideSchema = objectType({
7042
7074
  show: booleanType().optional(),
@@ -7059,12 +7091,12 @@ var IKEmbeddableFormBundle = function(exports) {
7059
7091
  id: stringType(),
7060
7092
  overrides: variantOverrideSpecSchema
7061
7093
  });
7062
- const remoteVariantFileSchema = unionType([
7063
- remoteVariantEnvelopeSchema,
7064
- variantOverrideSpecSchema
7065
- ]);
7094
+ function isEnvelopeShape(raw) {
7095
+ return typeof raw === "object" && raw !== null && "overrides" in raw;
7096
+ }
7066
7097
  function parseRemoteVariantJson(raw, expectedVariantId) {
7067
- const parsed = remoteVariantFileSchema.safeParse(raw);
7098
+ const schema = isEnvelopeShape(raw) ? remoteVariantEnvelopeSchema : variantOverrideSpecSchema;
7099
+ const parsed = schema.safeParse(raw);
7068
7100
  if (!parsed.success) {
7069
7101
  console.warn(
7070
7102
  `[ConfigResolver] Invalid remote variant JSON for "${expectedVariantId}":`,
@@ -20581,6 +20613,16 @@ var IKEmbeddableFormBundle = function(exports) {
20581
20613
  options: GQL_PRIMARY_GOAL_OPTIONS,
20582
20614
  validation: [{ type: "required", message: "Please select your current goal." }]
20583
20615
  },
20616
+ {
20617
+ // India-only — hidden via `show: false` in the other variants
20618
+ name: "topicOfInterest",
20619
+ type: "select",
20620
+ label: "Pick your next career move",
20621
+ placeholder: "Select option",
20622
+ colSpan: 2,
20623
+ options: GQL_TOPIC_OF_INTEREST_OPTIONS,
20624
+ validation: [{ type: "required", message: "Pick your next career move" }]
20625
+ },
20584
20626
  {
20585
20627
  name: "interviewTimeline",
20586
20628
  type: "select",
@@ -20676,12 +20718,45 @@ var IKEmbeddableFormBundle = function(exports) {
20676
20718
  steps: {
20677
20719
  "profile-details": {
20678
20720
  fields: {
20679
- interviewTimeline: { show: false }
20721
+ interviewTimeline: { show: false },
20722
+ topicOfInterest: { show: false }
20680
20723
  }
20681
20724
  }
20682
20725
  }
20683
20726
  }
20684
20727
  };
20728
+ const INDIA_EXPERIENCE_OPTIONS = [
20729
+ { value: "0-2", label: "0-2" },
20730
+ { value: "3-4", label: "3-4" },
20731
+ { value: "5-8", label: "5-8" },
20732
+ { value: "9-15", label: "9-15" },
20733
+ { value: "16-20", label: "16-20" },
20734
+ { value: "20+", label: "20+" }
20735
+ ];
20736
+ const INDIA_DOMAIN_OPTIONS = [
20737
+ { value: "Back-end", label: "Back-end" },
20738
+ { value: "Cloud Engineer", label: "Cloud Engineer" },
20739
+ { value: "Cyber Security", label: "Cyber Security" },
20740
+ { value: "Data Engineer", label: "Data Engineer" },
20741
+ { value: "Data Science", label: "Data Science" },
20742
+ { value: "Front-end", label: "Front-end" },
20743
+ { value: "Full Stack", label: "Full Stack" },
20744
+ { value: "Machine Learning / AI", label: "Machine Learning / AI" },
20745
+ { value: "Engineering Manager - any domain", label: "Engineering Manager - any domain" },
20746
+ { value: "Tech Product Manager", label: "Tech Product Manager" },
20747
+ { value: "Technical Program Manager", label: "Technical Program Manager" },
20748
+ { value: "Test Engineer / SDET / QE", label: "Test Engineer / SDET / QE" },
20749
+ { value: "Android Developer", label: "Android Developer" },
20750
+ { value: "iOS Developer", label: "iOS Developer" },
20751
+ { value: "Site Reliability Engineer", label: "Site Reliability Engineer" },
20752
+ { value: "Embedded Software Engineer", label: "Embedded Software Engineer" },
20753
+ { value: "Other Software Engineers", label: "Other Software Engineers" },
20754
+ { value: "Data Analyst / Business Analyst", label: "Data Analyst / Business Analyst" },
20755
+ { value: "Core Engineering", label: "Core Engineering" },
20756
+ { value: "Salesforce developer", label: "Salesforce developer" },
20757
+ { value: "DevOps Engineer", label: "DevOps Engineer" },
20758
+ { value: "None of the above", label: "None of the above" }
20759
+ ];
20685
20760
  const indiaVariant = {
20686
20761
  id: "india",
20687
20762
  overrides: {
@@ -20712,7 +20787,11 @@ var IKEmbeddableFormBundle = function(exports) {
20712
20787
  steps: {
20713
20788
  "profile-details": {
20714
20789
  fields: {
20715
- primaryGoal: { show: false }
20790
+ primaryGoal: { show: false },
20791
+ experience: { options: INDIA_EXPERIENCE_OPTIONS },
20792
+ domain: { options: INDIA_DOMAIN_OPTIONS },
20793
+ topicOfInterest: { show: true },
20794
+ interviewTimeline: { show: false }
20716
20795
  }
20717
20796
  },
20718
20797
  "goals-details": { show: false }
@@ -20753,7 +20832,8 @@ var IKEmbeddableFormBundle = function(exports) {
20753
20832
  "slot-selection": { show: false },
20754
20833
  "profile-details": {
20755
20834
  fields: {
20756
- primaryGoal: { show: false }
20835
+ primaryGoal: { show: false },
20836
+ topicOfInterest: { show: false }
20757
20837
  }
20758
20838
  },
20759
20839
  "goals-details": { show: false }