@goldenhippo/builder-cart-schemas 0.11.0 → 0.14.0

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.
@@ -1294,6 +1294,7 @@ var createFooterConfig = () => {
1294
1294
  var ProductGridFilterType = /* @__PURE__ */ ((ProductGridFilterType3) => {
1295
1295
  ProductGridFilterType3["DROPDOWN"] = "Dropdown";
1296
1296
  ProductGridFilterType3["STACKED_LIST"] = "Stacked List";
1297
+ ProductGridFilterType3["HORIZONTAL_LIST"] = "Horizontal List";
1297
1298
  return ProductGridFilterType3;
1298
1299
  })(ProductGridFilterType || {});
1299
1300
  var ProductLinkPrefix = /* @__PURE__ */ ((ProductLinkPrefix3) => {
@@ -1315,8 +1316,13 @@ var createFeatureConfig = (gridFilterModelId) => {
1315
1316
  type: "select",
1316
1317
  defaultCollapsed: true,
1317
1318
  helperText: `Select the type of filters to use. 'Dropdown' will display a drop down of categories, ingredients, use cases, and tags.
1318
- 'Stacked List' allows you to create your own filter groupings from amongst those four filter types.`,
1319
- enum: ["Dropdown" /* DROPDOWN */, "Stacked List" /* STACKED_LIST */],
1319
+ 'Stacked List' allows you to create your own filter groupings from amongst those four filter types.
1320
+ 'Horizontal List' displays Product Categories only horizontally; click to filter on page or navigate option available.`,
1321
+ enum: [
1322
+ "Dropdown" /* DROPDOWN */,
1323
+ "Stacked List" /* STACKED_LIST */,
1324
+ "Horizontal List" /* HORIZONTAL_LIST */
1325
+ ],
1320
1326
  defaultValue: "Dropdown"
1321
1327
  },
1322
1328
  {
@@ -2993,6 +2999,161 @@ var createProductGroupModel = (productModelId, sectionModelId) => {
2993
2999
  };
2994
3000
  };
2995
3001
 
3002
+ // src/data/profile-reference-rule.model.ts
3003
+ var ProfileFieldReference = /* @__PURE__ */ ((ProfileFieldReference2) => {
3004
+ ProfileFieldReference2["Age"] = "Age";
3005
+ ProfileFieldReference2["Gender"] = "Gender";
3006
+ ProfileFieldReference2["Weight"] = "Weight";
3007
+ ProfileFieldReference2["Type"] = "Type";
3008
+ ProfileFieldReference2["Breed"] = "Breed";
3009
+ ProfileFieldReference2["HealthConditions"] = "Health Conditions";
3010
+ return ProfileFieldReference2;
3011
+ })(ProfileFieldReference || {});
3012
+ var createProfileReferenceRuleModel = () => {
3013
+ return {
3014
+ name: "profile-reference-rule",
3015
+ displayName: "Profile Reference Rule",
3016
+ kind: "data",
3017
+ helperText: "Apply profile-based personalization by associating tags, ingredients, etc. to profile properties.",
3018
+ contentTitleField: "displayName",
3019
+ fields: [
3020
+ {
3021
+ name: "displayName",
3022
+ friendlyName: "Rule Name",
3023
+ type: "text",
3024
+ required: true,
3025
+ defaultCollapsed: false,
3026
+ localized: true,
3027
+ helperText: "The name of this profile reference rule."
3028
+ },
3029
+ {
3030
+ name: "referenceType",
3031
+ friendlyName: "Reference Type",
3032
+ type: "select",
3033
+ required: true,
3034
+ defaultCollapsed: false,
3035
+ enum: [
3036
+ "Tag" /* Tag */,
3037
+ "Ingredient" /* Ingredient */,
3038
+ "Category" /* Category */,
3039
+ "UseCase" /* UseCase */
3040
+ ],
3041
+ helperText: "The type of content reference to apply when this rule is triggered.",
3042
+ defaultValue: "Tag" /* Tag */
3043
+ },
3044
+ {
3045
+ name: "tagReference",
3046
+ friendlyName: "Tag",
3047
+ type: "reference",
3048
+ required: 'return options.get("referenceType") === "Tag"',
3049
+ showIf: `return options.get("referenceType") === "Tag"`,
3050
+ defaultCollapsed: false,
3051
+ helperText: "The content reference to apply when this rule is triggered.",
3052
+ copyOnAdd: true,
3053
+ model: "product-tag"
3054
+ },
3055
+ {
3056
+ name: "ingredientReference",
3057
+ friendlyName: "Ingredient",
3058
+ type: "reference",
3059
+ required: `return options.get("referenceType") === "Ingredient"`,
3060
+ showIf: `return options.get("referenceType") === "Ingredient"`,
3061
+ defaultCollapsed: false,
3062
+ helperText: "The content reference to apply when this rule is triggered.",
3063
+ copyOnAdd: true,
3064
+ model: "product-ingredient"
3065
+ },
3066
+ {
3067
+ name: "categoryReference",
3068
+ friendlyName: "Category",
3069
+ type: "reference",
3070
+ required: `return options.get("referenceType") === "Category"`,
3071
+ showIf: `return options.get("referenceType") === "Category"`,
3072
+ defaultCollapsed: false,
3073
+ helperText: "The content reference to apply when this rule is triggered.",
3074
+ copyOnAdd: true,
3075
+ model: "product-category"
3076
+ },
3077
+ {
3078
+ name: "useCaseReference",
3079
+ friendlyName: "Use Case",
3080
+ type: "reference",
3081
+ required: `return options.get("referenceType") === "UseCase"`,
3082
+ showIf: `return options.get("referenceType") === "UseCase"`,
3083
+ defaultCollapsed: false,
3084
+ helperText: "The content reference to apply when this rule is triggered.",
3085
+ copyOnAdd: true,
3086
+ model: "product-use-case"
3087
+ },
3088
+ {
3089
+ name: "applicationRules",
3090
+ type: "list",
3091
+ friendlyName: "Application Rules",
3092
+ required: true,
3093
+ defaultCollapsed: false,
3094
+ helperText: "The rules that determine when the linked reference should be applied. These rules are evaluated together, so all rules must be satisfied for the reference to be applied.",
3095
+ subFields: [
3096
+ {
3097
+ name: "profileField",
3098
+ friendlyName: "Profile Field",
3099
+ type: "select",
3100
+ required: true,
3101
+ defaultCollapsed: false,
3102
+ enum: [
3103
+ "Age" /* Age */,
3104
+ "Gender" /* Gender */,
3105
+ "Weight" /* Weight */,
3106
+ "Type" /* Type */,
3107
+ "Breed" /* Breed */,
3108
+ "Health Conditions" /* HealthConditions */
3109
+ ],
3110
+ helperText: "The profile field to evaluate for this rule."
3111
+ },
3112
+ {
3113
+ name: "stringOperator",
3114
+ friendlyName: "Operator",
3115
+ type: "select",
3116
+ required: `return ["Gender", "Type", "Breed", "Health Conditions"].includes(options.get('profileField') ?? '')`,
3117
+ showIf: `return ["Gender", "Type", "Breed", "Health Conditions"].includes(options.get('profileField') ?? '')`,
3118
+ defaultCollapsed: false,
3119
+ enum: ["is", "is not", "contains", "does not contain"],
3120
+ helperText: "The operator to use when evaluating the profile field."
3121
+ },
3122
+ {
3123
+ name: "numberOperator",
3124
+ friendlyName: "Operator",
3125
+ type: "select",
3126
+ required: `return ['Age', 'Weight'].includes(options.get('profileField') ?? '')`,
3127
+ showIf: `return ['Age', 'Weight'].includes(options.get('profileField') ?? '')`,
3128
+ defaultCollapsed: false,
3129
+ enum: ["equals", "not equals", "greater than", "less than"],
3130
+ helperText: "The operator to use when evaluating the profile field."
3131
+ },
3132
+ {
3133
+ name: "numberValue",
3134
+ friendlyName: "Value",
3135
+ type: "number",
3136
+ defaultValue: 0,
3137
+ required: `return ['Age', 'Weight'].includes(options.get('profileField') ?? '')`,
3138
+ showIf: `return ['Age', 'Weight'].includes(options.get('profileField') ?? '')`,
3139
+ defaultCollapsed: false,
3140
+ helperText: "The numeric value to compare against the profile field."
3141
+ },
3142
+ {
3143
+ name: "stringValue",
3144
+ friendlyName: "Value",
3145
+ type: "text",
3146
+ required: `return ["Gender", "Type", "Breed", "Health Conditions"].includes(options.get('profileField') ?? '')`,
3147
+ showIf: `return ["Gender", "Type", "Breed", "Health Conditions"].includes(options.get('profileField') ?? '')`,
3148
+ defaultCollapsed: false,
3149
+ helperText: "The string value to compare against the profile field. Case insensitive."
3150
+ }
3151
+ ]
3152
+ }
3153
+ ]
3154
+ };
3155
+ };
3156
+
2996
3157
  // src/data/product-grid-filter-group.model.ts
2997
3158
  var FilterApplicationType = /* @__PURE__ */ ((FilterApplicationType2) => {
2998
3159
  FilterApplicationType2["Inclusive"] = "Inclusive";
@@ -3145,6 +3306,7 @@ exports.MediumHeaderDropdownType = MediumHeaderDropdownType;
3145
3306
  exports.ProductGridFilterType = ProductGridFilterType;
3146
3307
  exports.ProductGroupType = ProductGroupType;
3147
3308
  exports.ProductLinkPrefix = ProductLinkPrefix;
3309
+ exports.ProfileFieldReference = ProfileFieldReference;
3148
3310
  exports.SubscriptionCancelButtonType = SubscriptionCancelButtonType;
3149
3311
  exports.SubscriptionCancelReasons = SubscriptionCancelReasons;
3150
3312
  exports.createBlogCategoryModel = createBlogCategoryModel;
@@ -3152,5 +3314,6 @@ exports.createBlogCommentModel = createBlogCommentModel;
3152
3314
  exports.createBrandConfigModel = createBrandConfigModel;
3153
3315
  exports.createProductGridConfigModel = createProductGridConfigModel;
3154
3316
  exports.createProductGroupModel = createProductGroupModel;
3317
+ exports.createProfileReferenceRuleModel = createProfileReferenceRuleModel;
3155
3318
  //# sourceMappingURL=index.cjs.map
3156
3319
  //# sourceMappingURL=index.cjs.map