@mj-biz-apps/orders-ng 5.6.0 → 5.7.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.
- package/dist/lib/custom/OrderHeader/order-header-form.component.d.ts +0 -4
- package/dist/lib/custom/OrderHeader/order-header-form.component.d.ts.map +1 -1
- package/dist/lib/custom/OrderHeader/order-header-form.component.js +139 -284
- package/dist/lib/custom/OrderHeader/order-header-form.component.js.map +1 -1
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts +38 -1
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts.map +1 -1
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.js +526 -112
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.js.map +1 -1
- package/dist/lib/custom/OrderHeader/party-address-picker.component.d.ts +67 -0
- package/dist/lib/custom/OrderHeader/party-address-picker.component.d.ts.map +1 -0
- package/dist/lib/custom/OrderHeader/party-address-picker.component.js +430 -0
- package/dist/lib/custom/OrderHeader/party-address-picker.component.js.map +1 -0
- package/dist/lib/custom/Product/product-form.component.d.ts +1 -3
- package/dist/lib/custom/Product/product-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Product/product-form.component.js +6 -7
- package/dist/lib/custom/Product/product-form.component.js.map +1 -1
- package/dist/lib/custom/Product/widgets/product-accounting-widget.component.js +4 -9
- package/dist/lib/custom/Product/widgets/product-accounting-widget.component.js.map +1 -1
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.d.ts +69 -4
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.d.ts.map +1 -1
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.js +845 -314
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.js.map +1 -1
- package/dist/lib/custom/custom-forms.module.d.ts +10 -7
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +12 -0
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/data/entity-names.d.ts +2 -0
- package/dist/lib/data/entity-names.d.ts.map +1 -1
- package/dist/lib/data/entity-names.js +2 -0
- package/dist/lib/data/entity-names.js.map +1 -1
- package/dist/lib/data/orders-queries.d.ts +11 -2
- package/dist/lib/data/orders-queries.d.ts.map +1 -1
- package/dist/lib/data/orders-queries.js +29 -41
- package/dist/lib/data/orders-queries.js.map +1 -1
- package/dist/lib/form-panels/catalog-overviews.panels.d.ts.map +1 -1
- package/dist/lib/form-panels/catalog-overviews.panels.js +7 -6
- package/dist/lib/form-panels/catalog-overviews.panels.js.map +1 -1
- package/dist/lib/form-panels/commercial-overviews.panels.js +1 -1
- package/dist/lib/form-panels/commercial-overviews.panels.js.map +1 -1
- package/dist/lib/form-panels/product-header.panel.d.ts +4 -0
- package/dist/lib/form-panels/product-header.panel.d.ts.map +1 -1
- package/dist/lib/form-panels/product-header.panel.js +17 -4
- package/dist/lib/form-panels/product-header.panel.js.map +1 -1
- package/dist/lib/form-panels/product-widget.panels.d.ts.map +1 -1
- package/dist/lib/form-panels/product-widget.panels.js +8 -5
- package/dist/lib/form-panels/product-widget.panels.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProduct/mjbizappsordersproduct.form.component.js +4 -4
- package/dist/lib/generated/Entities/mjBizAppsOrdersProduct/mjbizappsordersproduct.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductPrice/mjbizappsordersproductprice.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductPrice/mjbizappsordersproductprice.form.component.js +39 -27
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductPrice/mjbizappsordersproductprice.form.component.js.map +1 -1
- package/dist/lib/panels/catalog-list-price.d.ts +4 -0
- package/dist/lib/panels/catalog-list-price.d.ts.map +1 -0
- package/dist/lib/panels/catalog-list-price.js +23 -0
- package/dist/lib/panels/catalog-list-price.js.map +1 -0
- package/dist/lib/services/pricing-scheduler.service.d.ts.map +1 -1
- package/dist/lib/services/pricing-scheduler.service.js +6 -3
- package/dist/lib/services/pricing-scheduler.service.js.map +1 -1
- package/package.json +6 -4
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
import { Component, EventEmitter, Input, Output, ChangeDetectorRef, inject } from '@angular/core';
|
|
2
|
-
import { Metadata, RunView, CompositeKey } from '@memberjunction/core';
|
|
2
|
+
import { Metadata, RunView, CompositeKey, EntityFieldTSType } from '@memberjunction/core';
|
|
3
|
+
import { createEmptyFilter, } from '@memberjunction/ng-filter-builder';
|
|
3
4
|
import { GetGlobalObjectStore } from '@memberjunction/global';
|
|
4
5
|
import { NavigationService } from '@memberjunction/ng-shared';
|
|
6
|
+
import { moveItemInArray } from '@angular/cdk/drag-drop';
|
|
5
7
|
import { FormatMoney } from '../../../panels/money-format.js';
|
|
8
|
+
import { LoadOrdersEngine, OrdersEngine, PRICE_APPLICABILITY_SOURCES, priceApplies } from '@mj-biz-apps/orders-entities';
|
|
6
9
|
import * as i0 from "@angular/core";
|
|
7
10
|
import * as i1 from "@angular/forms";
|
|
8
|
-
import * as i2 from "@
|
|
11
|
+
import * as i2 from "@angular/cdk/drag-drop";
|
|
12
|
+
import * as i3 from "@memberjunction/ng-base-forms";
|
|
13
|
+
import * as i4 from "@memberjunction/ng-filter-builder";
|
|
14
|
+
import * as i5 from "@angular/common";
|
|
9
15
|
const _forTrack0 = ($index, $item) => $item.ID;
|
|
10
|
-
const _forTrack1 = ($index, $item) => $item.Label;
|
|
11
16
|
function BizAppsProductPricingWidgetComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
12
17
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
13
|
-
i0.ɵɵelementStart(0, "div",
|
|
18
|
+
i0.ɵɵelementStart(0, "div", 10)(1, "div", 11);
|
|
14
19
|
i0.ɵɵelement(2, "i");
|
|
15
|
-
i0.ɵɵelementStart(3, "span",
|
|
20
|
+
i0.ɵɵelementStart(3, "span", 12);
|
|
16
21
|
i0.ɵɵtext(4);
|
|
17
22
|
i0.ɵɵelementEnd()();
|
|
18
|
-
i0.ɵɵelementStart(5, "button",
|
|
23
|
+
i0.ɵɵelementStart(5, "button", 13);
|
|
19
24
|
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_1_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.DismissToast()); });
|
|
20
|
-
i0.ɵɵelement(6, "i",
|
|
25
|
+
i0.ɵɵelement(6, "i", 14);
|
|
21
26
|
i0.ɵɵelementEnd()();
|
|
22
27
|
} if (rf & 2) {
|
|
23
28
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -27,344 +32,519 @@ function BizAppsProductPricingWidgetComponent_Conditional_1_Template(rf, ctx) {
|
|
|
27
32
|
i0.ɵɵadvance(2);
|
|
28
33
|
i0.ɵɵtextInterpolate(ctx_r1.ActiveToast.Message);
|
|
29
34
|
} }
|
|
30
|
-
function
|
|
35
|
+
function BizAppsProductPricingWidgetComponent_Conditional_17_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
31
36
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
32
|
-
i0.ɵɵelementStart(0, "button",
|
|
33
|
-
i0.ɵɵlistener("click", function
|
|
37
|
+
i0.ɵɵelementStart(0, "button", 17);
|
|
38
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_17_For_3_Template_button_click_0_listener() { const ch_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SelectChannel(ch_r4.ID)); });
|
|
34
39
|
i0.ɵɵelement(1, "i");
|
|
35
40
|
i0.ɵɵelementStart(2, "span");
|
|
36
41
|
i0.ɵɵtext(3);
|
|
37
42
|
i0.ɵɵelementEnd();
|
|
38
|
-
i0.ɵɵelementStart(4, "span",
|
|
43
|
+
i0.ɵɵelementStart(4, "span", 18);
|
|
39
44
|
i0.ɵɵtext(5);
|
|
40
45
|
i0.ɵɵelementEnd()();
|
|
41
46
|
} if (rf & 2) {
|
|
42
47
|
const ch_r4 = ctx.$implicit;
|
|
43
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
48
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
44
49
|
i0.ɵɵclassProp("active", ctx_r1.SelectedChannelID === ch_r4.ID);
|
|
45
50
|
i0.ɵɵadvance();
|
|
46
51
|
i0.ɵɵclassMap(ch_r4.Icon);
|
|
47
52
|
i0.ɵɵadvance(2);
|
|
48
53
|
i0.ɵɵtextInterpolate(ch_r4.Name);
|
|
49
54
|
i0.ɵɵadvance(2);
|
|
50
|
-
i0.ɵɵtextInterpolate2("", ch_r4.TierCount, " ", ch_r4.TierCount === 1 ? "
|
|
55
|
+
i0.ɵɵtextInterpolate2("", ch_r4.TierCount, " ", ch_r4.TierCount === 1 ? "price" : "prices");
|
|
51
56
|
} }
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
i0.ɵɵ
|
|
55
|
-
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_26_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OpenNewPriceDialog()); });
|
|
56
|
-
i0.ɵɵelement(1, "i", 24);
|
|
57
|
-
i0.ɵɵelementStart(2, "span");
|
|
58
|
-
i0.ɵɵtext(3, "Add Channel / Rule");
|
|
57
|
+
function BizAppsProductPricingWidgetComponent_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
58
|
+
i0.ɵɵelementStart(0, "div", 9)(1, "div", 15);
|
|
59
|
+
i0.ɵɵrepeaterCreate(2, BizAppsProductPricingWidgetComponent_Conditional_17_For_3_Template, 6, 7, "button", 16, _forTrack0);
|
|
59
60
|
i0.ɵɵelementEnd()();
|
|
61
|
+
} if (rf & 2) {
|
|
62
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
63
|
+
i0.ɵɵadvance(2);
|
|
64
|
+
i0.ɵɵrepeater(ctx_r1.Channels);
|
|
60
65
|
} }
|
|
61
|
-
function
|
|
62
|
-
const
|
|
63
|
-
i0.ɵɵelementStart(0, "div",
|
|
64
|
-
i0.ɵɵlistener("Navigate", function
|
|
66
|
+
function BizAppsProductPricingWidgetComponent_Conditional_18_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
67
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
68
|
+
i0.ɵɵelementStart(0, "div", 19)(1, "mj-explorer-entity-data-grid", 20);
|
|
69
|
+
i0.ɵɵlistener("Navigate", function BizAppsProductPricingWidgetComponent_Conditional_18_Conditional_0_Template_mj_explorer_entity_data_grid_Navigate_1_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.Navigate.emit($event)); });
|
|
65
70
|
i0.ɵɵelementEnd()();
|
|
66
71
|
} if (rf & 2) {
|
|
67
72
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
68
73
|
i0.ɵɵadvance();
|
|
69
74
|
i0.ɵɵproperty("Params", ctx_r1.ProductPricesViewParams)("NewRecordValues", ctx_r1.NewPriceRecordValues)("Height", 420)("AllowLoad", true)("ShowToolbar", true)("ShowNewButton", ctx_r1.EditMode)("ShowDeleteButton", ctx_r1.EditMode);
|
|
70
75
|
} }
|
|
71
|
-
function
|
|
72
|
-
i0.ɵɵconditionalCreate(0,
|
|
76
|
+
function BizAppsProductPricingWidgetComponent_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
77
|
+
i0.ɵɵconditionalCreate(0, BizAppsProductPricingWidgetComponent_Conditional_18_Conditional_0_Template, 2, 7, "div", 19);
|
|
73
78
|
} if (rf & 2) {
|
|
74
79
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
75
80
|
i0.ɵɵconditional(ctx_r1.ProductPricesViewParams ? 0 : -1);
|
|
76
81
|
} }
|
|
77
|
-
function
|
|
78
|
-
i0.ɵɵelementStart(0, "div",
|
|
79
|
-
i0.ɵɵelement(1, "i",
|
|
82
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
83
|
+
i0.ɵɵelementStart(0, "div", 21);
|
|
84
|
+
i0.ɵɵelement(1, "i", 25);
|
|
80
85
|
i0.ɵɵelementStart(2, "span");
|
|
81
|
-
i0.ɵɵtext(3, "Loading
|
|
86
|
+
i0.ɵɵtext(3, "Loading prices\u2026");
|
|
82
87
|
i0.ɵɵelementEnd()();
|
|
83
88
|
} }
|
|
84
|
-
function
|
|
85
|
-
i0.ɵɵtext(0, "
|
|
89
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_1_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
90
|
+
i0.ɵɵtext(0, " Add a price. When is optional \u2014 only if this rate is not for everyone. ");
|
|
86
91
|
} }
|
|
87
|
-
function
|
|
88
|
-
i0.ɵɵtext(0, " Switch to Edit
|
|
92
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_1_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
93
|
+
i0.ɵɵtext(0, " Switch to Edit to add prices. ");
|
|
89
94
|
} }
|
|
90
|
-
function
|
|
91
|
-
i0.ɵɵelementStart(0, "div",
|
|
92
|
-
i0.ɵɵelement(2, "i",
|
|
95
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
96
|
+
i0.ɵɵelementStart(0, "div", 22)(1, "div", 26);
|
|
97
|
+
i0.ɵɵelement(2, "i", 5);
|
|
93
98
|
i0.ɵɵelementEnd();
|
|
94
|
-
i0.ɵɵelementStart(3, "div",
|
|
95
|
-
i0.ɵɵtext(5, "No
|
|
99
|
+
i0.ɵɵelementStart(3, "div", 27)(4, "h4");
|
|
100
|
+
i0.ɵɵtext(5, "No prices on this channel");
|
|
96
101
|
i0.ɵɵelementEnd();
|
|
97
102
|
i0.ɵɵelementStart(6, "p");
|
|
98
|
-
i0.ɵɵconditionalCreate(7,
|
|
103
|
+
i0.ɵɵconditionalCreate(7, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_1_Conditional_7_Template, 1, 0)(8, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_1_Conditional_8_Template, 1, 0);
|
|
99
104
|
i0.ɵɵelementEnd()()();
|
|
100
105
|
} if (rf & 2) {
|
|
101
106
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
102
107
|
i0.ɵɵadvance(7);
|
|
103
108
|
i0.ɵɵconditional(ctx_r1.EditMode ? 7 : 8);
|
|
104
109
|
} }
|
|
105
|
-
function
|
|
106
|
-
|
|
107
|
-
i0.ɵɵ
|
|
108
|
-
i0.ɵɵlistener("blur", function BizAppsProductPricingWidgetComponent_Conditional_28_Conditional_2_For_22_Conditional_8_Template_input_blur_0_listener($event) { i0.ɵɵrestoreView(_r8); const tier_r9 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnPriceInputBlur(tier_r9, $event)); });
|
|
110
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
111
|
+
i0.ɵɵelementStart(0, "span", 32);
|
|
112
|
+
i0.ɵɵelement(1, "i", 39);
|
|
109
113
|
i0.ɵɵelementEnd();
|
|
110
|
-
} if (rf & 2) {
|
|
111
|
-
const tier_r9 = i0.ɵɵnextContext().$implicit;
|
|
112
|
-
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
113
|
-
i0.ɵɵproperty("value", ctx_r1.FormatCurrency(tier_r9.Amount))("title", "Edit price for " + tier_r9.BracketLabel);
|
|
114
114
|
} }
|
|
115
|
-
function
|
|
116
|
-
i0.ɵɵelementStart(0, "
|
|
115
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
116
|
+
i0.ɵɵelementStart(0, "span", 36);
|
|
117
117
|
i0.ɵɵtext(1);
|
|
118
118
|
i0.ɵɵelementEnd();
|
|
119
119
|
} if (rf & 2) {
|
|
120
|
-
const
|
|
121
|
-
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
120
|
+
const row_r8 = i0.ɵɵnextContext().$implicit;
|
|
122
121
|
i0.ɵɵadvance();
|
|
123
|
-
i0.ɵɵtextInterpolate(
|
|
122
|
+
i0.ɵɵtextInterpolate(row_r8.WhenText);
|
|
124
123
|
} }
|
|
125
|
-
function
|
|
126
|
-
i0.ɵɵ
|
|
127
|
-
i0.ɵɵ
|
|
128
|
-
i0.ɵɵ
|
|
124
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
125
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
126
|
+
i0.ɵɵelementStart(0, "button", 7);
|
|
127
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_1_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const row_r8 = i0.ɵɵnextContext(3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OverrideInherited(row_r8)); });
|
|
128
|
+
i0.ɵɵtext(1, "Override on this product");
|
|
129
|
+
i0.ɵɵelementEnd();
|
|
130
|
+
} }
|
|
131
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
132
|
+
i0.ɵɵelementStart(0, "p", 41);
|
|
133
|
+
i0.ɵɵtext(1, " Inherited. A price with this name on the product replaces it. ");
|
|
134
|
+
i0.ɵɵconditionalCreate(2, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_1_Conditional_2_Template, 2, 0, "button", 42);
|
|
129
135
|
i0.ɵɵelementEnd();
|
|
130
136
|
} if (rf & 2) {
|
|
131
|
-
const
|
|
137
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
132
138
|
i0.ɵɵadvance(2);
|
|
133
|
-
i0.ɵɵ
|
|
139
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 2 : -1);
|
|
134
140
|
} }
|
|
135
|
-
function
|
|
136
|
-
i0.ɵɵ
|
|
137
|
-
i0.ɵɵ
|
|
141
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
142
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
143
|
+
i0.ɵɵelementStart(0, "div", 43)(1, "label", 47)(2, "span", 48);
|
|
144
|
+
i0.ɵɵtext(3, "Name");
|
|
138
145
|
i0.ɵɵelementEnd();
|
|
139
|
-
|
|
140
|
-
function
|
|
141
|
-
i0.ɵɵ
|
|
142
|
-
i0.ɵɵ
|
|
146
|
+
i0.ɵɵelementStart(4, "input", 49);
|
|
147
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_0_Template_input_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r11); const row_r8 = i0.ɵɵnextContext(3).$implicit; i0.ɵɵtwoWayBindingSet(row_r8.Record.Name, $event) || (row_r8.Record.Name = $event); return i0.ɵɵresetView($event); });
|
|
148
|
+
i0.ɵɵlistener("blur", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_0_Template_input_blur_4_listener() { i0.ɵɵrestoreView(_r11); const row_r8 = i0.ɵɵnextContext(3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SavePrice(row_r8.Record)); });
|
|
149
|
+
i0.ɵɵelementEnd()();
|
|
150
|
+
i0.ɵɵelementStart(5, "label", 47)(6, "span", 48);
|
|
151
|
+
i0.ɵɵtext(7, "Amount");
|
|
152
|
+
i0.ɵɵelementEnd();
|
|
153
|
+
i0.ɵɵelementStart(8, "input", 50);
|
|
154
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_0_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r11); const row_r8 = i0.ɵɵnextContext(3).$implicit; i0.ɵɵtwoWayBindingSet(row_r8.Record.Amount, $event) || (row_r8.Record.Amount = $event); return i0.ɵɵresetView($event); });
|
|
155
|
+
i0.ɵɵlistener("blur", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_0_Template_input_blur_8_listener() { i0.ɵɵrestoreView(_r11); const row_r8 = i0.ɵɵnextContext(3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SavePrice(row_r8.Record)); });
|
|
156
|
+
i0.ɵɵelementEnd()();
|
|
157
|
+
i0.ɵɵelementStart(9, "label", 47)(10, "span", 48);
|
|
158
|
+
i0.ɵɵtext(11, "Model");
|
|
159
|
+
i0.ɵɵelementEnd();
|
|
160
|
+
i0.ɵɵelementStart(12, "select", 51);
|
|
161
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_0_Template_select_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r11); const row_r8 = i0.ɵɵnextContext(3).$implicit; i0.ɵɵtwoWayBindingSet(row_r8.Record.PricingModel, $event) || (row_r8.Record.PricingModel = $event); return i0.ɵɵresetView($event); });
|
|
162
|
+
i0.ɵɵlistener("change", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_0_Template_select_change_12_listener() { i0.ɵɵrestoreView(_r11); const row_r8 = i0.ɵɵnextContext(3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SavePrice(row_r8.Record)); });
|
|
163
|
+
i0.ɵɵelementStart(13, "option", 52);
|
|
164
|
+
i0.ɵɵtext(14, "Per unit");
|
|
165
|
+
i0.ɵɵelementEnd();
|
|
166
|
+
i0.ɵɵelementStart(15, "option", 53);
|
|
167
|
+
i0.ɵɵtext(16, "Package");
|
|
143
168
|
i0.ɵɵelementEnd();
|
|
169
|
+
i0.ɵɵelementStart(17, "option", 54);
|
|
170
|
+
i0.ɵɵtext(18, "Volume");
|
|
171
|
+
i0.ɵɵelementEnd();
|
|
172
|
+
i0.ɵɵelementStart(19, "option", 55);
|
|
173
|
+
i0.ɵɵtext(20, "Flat");
|
|
174
|
+
i0.ɵɵelementEnd()()()();
|
|
144
175
|
} if (rf & 2) {
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
i0.ɵɵ
|
|
148
|
-
i0.ɵɵ
|
|
176
|
+
const row_r8 = i0.ɵɵnextContext(3).$implicit;
|
|
177
|
+
i0.ɵɵadvance(4);
|
|
178
|
+
i0.ɵɵtwoWayProperty("ngModel", row_r8.Record.Name);
|
|
179
|
+
i0.ɵɵadvance(4);
|
|
180
|
+
i0.ɵɵtwoWayProperty("ngModel", row_r8.Record.Amount);
|
|
181
|
+
i0.ɵɵadvance(4);
|
|
182
|
+
i0.ɵɵtwoWayProperty("ngModel", row_r8.Record.PricingModel);
|
|
149
183
|
} }
|
|
150
|
-
function
|
|
151
|
-
i0.ɵɵ
|
|
152
|
-
i0.ɵɵ
|
|
153
|
-
i0.ɵɵ
|
|
184
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
185
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
186
|
+
i0.ɵɵelementStart(0, "div", 44)(1, "button", 7);
|
|
187
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_1_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r12); const row_r8 = i0.ɵɵnextContext(3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OpenWhenEditor(row_r8)); });
|
|
188
|
+
i0.ɵɵtext(2, "Edit When");
|
|
189
|
+
i0.ɵɵelementEnd()();
|
|
154
190
|
} }
|
|
155
|
-
function
|
|
156
|
-
const
|
|
157
|
-
i0.ɵɵelementStart(0, "button",
|
|
158
|
-
i0.ɵɵlistener("click", function
|
|
159
|
-
i0.ɵɵ
|
|
191
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
192
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
193
|
+
i0.ɵɵelementStart(0, "button", 7);
|
|
194
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r13); const row_r8 = i0.ɵɵnextContext(3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OpenWhenEditor(row_r8)); });
|
|
195
|
+
i0.ɵɵtext(1, "+ When");
|
|
160
196
|
i0.ɵɵelementEnd();
|
|
161
197
|
} }
|
|
162
|
-
function
|
|
163
|
-
const
|
|
164
|
-
i0.ɵɵelementStart(0, "
|
|
165
|
-
i0.ɵɵtext(
|
|
166
|
-
i0.ɵɵelementEnd()();
|
|
167
|
-
i0.ɵɵelementStart(4, "td")(5, "span", 40);
|
|
168
|
-
i0.ɵɵtext(6);
|
|
169
|
-
i0.ɵɵelementEnd()();
|
|
170
|
-
i0.ɵɵelementStart(7, "td", 41);
|
|
171
|
-
i0.ɵɵconditionalCreate(8, BizAppsProductPricingWidgetComponent_Conditional_28_Conditional_2_For_22_Conditional_8_Template, 1, 2, "input", 42)(9, BizAppsProductPricingWidgetComponent_Conditional_28_Conditional_2_For_22_Conditional_9_Template, 2, 1, "strong", 43);
|
|
198
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
199
|
+
const _r14 = i0.ɵɵgetCurrentView();
|
|
200
|
+
i0.ɵɵelementStart(0, "div", 45)(1, "div", 56);
|
|
201
|
+
i0.ɵɵtext(2, "When this price applies");
|
|
172
202
|
i0.ɵɵelementEnd();
|
|
173
|
-
i0.ɵɵelementStart(
|
|
174
|
-
i0.ɵɵ
|
|
203
|
+
i0.ɵɵelementStart(3, "mj-filter-builder", 57);
|
|
204
|
+
i0.ɵɵlistener("filterChange", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_3_Template_mj_filter_builder_filterChange_3_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(6); return i0.ɵɵresetView(ctx_r1.OnWhenFilterChange($event)); });
|
|
175
205
|
i0.ɵɵelementEnd();
|
|
176
|
-
i0.ɵɵelementStart(
|
|
177
|
-
i0.ɵɵ
|
|
206
|
+
i0.ɵɵelementStart(4, "div", 58)(5, "button", 7);
|
|
207
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_3_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r14); const row_r8 = i0.ɵɵnextContext(3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.ClearWhen(row_r8)); });
|
|
208
|
+
i0.ɵɵtext(6, "Remove When");
|
|
178
209
|
i0.ɵɵelementEnd();
|
|
179
|
-
i0.ɵɵelementStart(
|
|
180
|
-
i0.ɵɵ
|
|
210
|
+
i0.ɵɵelementStart(7, "button", 7);
|
|
211
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_3_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(6); return i0.ɵɵresetView(ctx_r1.CloseWhenEditor()); });
|
|
212
|
+
i0.ɵɵtext(8, "Cancel");
|
|
213
|
+
i0.ɵɵelementEnd();
|
|
214
|
+
i0.ɵɵelementStart(9, "button", 59);
|
|
215
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_3_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r14); const row_r8 = i0.ɵɵnextContext(3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SaveWhen(row_r8)); });
|
|
216
|
+
i0.ɵɵtext(10, "Save When");
|
|
217
|
+
i0.ɵɵelementEnd()()();
|
|
218
|
+
} if (rf & 2) {
|
|
219
|
+
const ctx_r1 = i0.ɵɵnextContext(6);
|
|
220
|
+
i0.ɵɵadvance(3);
|
|
221
|
+
i0.ɵɵproperty("fields", ctx_r1.WhenFields)("filter", ctx_r1.WhenFilter)("showSummary", true);
|
|
222
|
+
} }
|
|
223
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
224
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
225
|
+
i0.ɵɵelementStart(0, "div", 60)(1, "label", 47)(2, "span", 48);
|
|
226
|
+
i0.ɵɵtext(3, "Min qty");
|
|
227
|
+
i0.ɵɵelementEnd();
|
|
228
|
+
i0.ɵɵelementStart(4, "input", 62);
|
|
229
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_3_Template_input_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r15); const row_r8 = i0.ɵɵnextContext(4).$implicit; i0.ɵɵtwoWayBindingSet(row_r8.Record.MinQuantity, $event) || (row_r8.Record.MinQuantity = $event); return i0.ɵɵresetView($event); });
|
|
230
|
+
i0.ɵɵlistener("blur", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_3_Template_input_blur_4_listener() { i0.ɵɵrestoreView(_r15); const row_r8 = i0.ɵɵnextContext(4).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SavePrice(row_r8.Record)); });
|
|
181
231
|
i0.ɵɵelementEnd()();
|
|
182
|
-
i0.ɵɵelementStart(
|
|
183
|
-
i0.ɵɵtext(
|
|
232
|
+
i0.ɵɵelementStart(5, "label", 47)(6, "span", 48);
|
|
233
|
+
i0.ɵɵtext(7, "Max qty");
|
|
234
|
+
i0.ɵɵelementEnd();
|
|
235
|
+
i0.ɵɵelementStart(8, "input", 62);
|
|
236
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_3_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r15); const row_r8 = i0.ɵɵnextContext(4).$implicit; i0.ɵɵtwoWayBindingSet(row_r8.Record.MaxQuantity, $event) || (row_r8.Record.MaxQuantity = $event); return i0.ɵɵresetView($event); });
|
|
237
|
+
i0.ɵɵlistener("blur", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_3_Template_input_blur_8_listener() { i0.ɵɵrestoreView(_r15); const row_r8 = i0.ɵɵnextContext(4).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SavePrice(row_r8.Record)); });
|
|
184
238
|
i0.ɵɵelementEnd()();
|
|
185
|
-
i0.ɵɵelementStart(
|
|
186
|
-
i0.ɵɵ
|
|
187
|
-
i0.ɵɵelement(24, "i", 52);
|
|
239
|
+
i0.ɵɵelementStart(9, "label", 47)(10, "span", 48);
|
|
240
|
+
i0.ɵɵtext(11, "Fee type");
|
|
188
241
|
i0.ɵɵelementEnd();
|
|
189
|
-
i0.ɵɵ
|
|
242
|
+
i0.ɵɵelementStart(12, "input", 49);
|
|
243
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_3_Template_input_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r15); const row_r8 = i0.ɵɵnextContext(4).$implicit; i0.ɵɵtwoWayBindingSet(row_r8.Record.FeeType, $event) || (row_r8.Record.FeeType = $event); return i0.ɵɵresetView($event); });
|
|
244
|
+
i0.ɵɵlistener("blur", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_3_Template_input_blur_12_listener() { i0.ɵɵrestoreView(_r15); const row_r8 = i0.ɵɵnextContext(4).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SavePrice(row_r8.Record)); });
|
|
190
245
|
i0.ɵɵelementEnd()();
|
|
246
|
+
i0.ɵɵelementStart(13, "label", 47)(14, "span", 48);
|
|
247
|
+
i0.ɵɵtext(15, "Priority");
|
|
248
|
+
i0.ɵɵelementEnd();
|
|
249
|
+
i0.ɵɵelementStart(16, "input", 62);
|
|
250
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_3_Template_input_ngModelChange_16_listener($event) { i0.ɵɵrestoreView(_r15); const row_r8 = i0.ɵɵnextContext(4).$implicit; i0.ɵɵtwoWayBindingSet(row_r8.Record.Priority, $event) || (row_r8.Record.Priority = $event); return i0.ɵɵresetView($event); });
|
|
251
|
+
i0.ɵɵlistener("blur", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_3_Template_input_blur_16_listener() { i0.ɵɵrestoreView(_r15); const row_r8 = i0.ɵɵnextContext(4).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.SavePrice(row_r8.Record)); });
|
|
252
|
+
i0.ɵɵelementEnd()()();
|
|
191
253
|
} if (rf & 2) {
|
|
192
|
-
const
|
|
193
|
-
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
194
|
-
i0.ɵɵadvance(3);
|
|
195
|
-
i0.ɵɵtextInterpolate(tier_r9.BracketLabel);
|
|
196
|
-
i0.ɵɵadvance(3);
|
|
197
|
-
i0.ɵɵtextInterpolate(tier_r9.UnitRangeText);
|
|
198
|
-
i0.ɵɵadvance(2);
|
|
199
|
-
i0.ɵɵconditional(ctx_r1.EditMode ? 8 : 9);
|
|
200
|
-
i0.ɵɵadvance(3);
|
|
201
|
-
i0.ɵɵconditional(tier_r9.DiscountPercent > 0 ? 11 : 12);
|
|
202
|
-
i0.ɵɵadvance(3);
|
|
203
|
-
i0.ɵɵconditional(tier_r9.UnitSavings > 0 ? 14 : 15);
|
|
254
|
+
const row_r8 = i0.ɵɵnextContext(4).$implicit;
|
|
204
255
|
i0.ɵɵadvance(4);
|
|
205
|
-
i0.ɵɵ
|
|
206
|
-
i0.ɵɵadvance(
|
|
207
|
-
i0.ɵɵ
|
|
256
|
+
i0.ɵɵtwoWayProperty("ngModel", row_r8.Record.MinQuantity);
|
|
257
|
+
i0.ɵɵadvance(4);
|
|
258
|
+
i0.ɵɵtwoWayProperty("ngModel", row_r8.Record.MaxQuantity);
|
|
259
|
+
i0.ɵɵadvance(4);
|
|
260
|
+
i0.ɵɵtwoWayProperty("ngModel", row_r8.Record.FeeType);
|
|
208
261
|
i0.ɵɵadvance(4);
|
|
209
|
-
i0.ɵɵ
|
|
262
|
+
i0.ɵɵtwoWayProperty("ngModel", row_r8.Record.Priority);
|
|
210
263
|
} }
|
|
211
|
-
function
|
|
212
|
-
i0.ɵɵelementStart(0, "
|
|
213
|
-
i0.ɵɵtext(
|
|
264
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
265
|
+
i0.ɵɵelementStart(0, "span");
|
|
266
|
+
i0.ɵɵtext(1);
|
|
214
267
|
i0.ɵɵelementEnd();
|
|
215
|
-
|
|
216
|
-
i0.ɵɵ
|
|
268
|
+
} if (rf & 2) {
|
|
269
|
+
const row_r8 = i0.ɵɵnextContext(5).$implicit;
|
|
270
|
+
i0.ɵɵadvance();
|
|
271
|
+
i0.ɵɵtextInterpolate1("Min qty ", row_r8.Record.MinQuantity);
|
|
272
|
+
} }
|
|
273
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_4_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
274
|
+
i0.ɵɵelementStart(0, "span");
|
|
275
|
+
i0.ɵɵtext(1);
|
|
217
276
|
i0.ɵɵelementEnd();
|
|
218
|
-
|
|
219
|
-
|
|
277
|
+
} if (rf & 2) {
|
|
278
|
+
const row_r8 = i0.ɵɵnextContext(5).$implicit;
|
|
279
|
+
i0.ɵɵadvance();
|
|
280
|
+
i0.ɵɵtextInterpolate1("Max qty ", row_r8.Record.MaxQuantity);
|
|
281
|
+
} }
|
|
282
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_4_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
283
|
+
i0.ɵɵelementStart(0, "span");
|
|
284
|
+
i0.ɵɵtext(1);
|
|
220
285
|
i0.ɵɵelementEnd();
|
|
221
|
-
|
|
222
|
-
i0.ɵɵ
|
|
286
|
+
} if (rf & 2) {
|
|
287
|
+
const row_r8 = i0.ɵɵnextContext(5).$implicit;
|
|
288
|
+
i0.ɵɵadvance();
|
|
289
|
+
i0.ɵɵtextInterpolate(row_r8.Record.FeeType);
|
|
290
|
+
} }
|
|
291
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_4_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
292
|
+
i0.ɵɵelementStart(0, "span");
|
|
293
|
+
i0.ɵɵtext(1);
|
|
294
|
+
i0.ɵɵpipe(2, "date");
|
|
223
295
|
i0.ɵɵelementEnd();
|
|
224
|
-
|
|
225
|
-
i0.ɵɵ
|
|
296
|
+
} if (rf & 2) {
|
|
297
|
+
const row_r8 = i0.ɵɵnextContext(5).$implicit;
|
|
298
|
+
i0.ɵɵadvance();
|
|
299
|
+
i0.ɵɵtextInterpolate1("Until ", i0.ɵɵpipeBind2(2, 1, row_r8.Record.EffectiveTo, "mediumDate"));
|
|
300
|
+
} }
|
|
301
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
302
|
+
i0.ɵɵelementStart(0, "div", 61);
|
|
303
|
+
i0.ɵɵconditionalCreate(1, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_4_Conditional_1_Template, 2, 1, "span");
|
|
304
|
+
i0.ɵɵconditionalCreate(2, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_4_Conditional_2_Template, 2, 1, "span");
|
|
305
|
+
i0.ɵɵconditionalCreate(3, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_4_Conditional_3_Template, 2, 1, "span");
|
|
306
|
+
i0.ɵɵconditionalCreate(4, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_4_Conditional_4_Template, 3, 4, "span");
|
|
226
307
|
i0.ɵɵelementEnd();
|
|
227
|
-
|
|
228
|
-
i0.ɵɵ
|
|
308
|
+
} if (rf & 2) {
|
|
309
|
+
const row_r8 = i0.ɵɵnextContext(4).$implicit;
|
|
310
|
+
i0.ɵɵadvance();
|
|
311
|
+
i0.ɵɵconditional(row_r8.Record.MinQuantity != null ? 1 : -1);
|
|
312
|
+
i0.ɵɵadvance();
|
|
313
|
+
i0.ɵɵconditional(row_r8.Record.MaxQuantity != null ? 2 : -1);
|
|
314
|
+
i0.ɵɵadvance();
|
|
315
|
+
i0.ɵɵconditional(row_r8.Record.FeeType && row_r8.Record.FeeType !== "Standard" ? 3 : -1);
|
|
316
|
+
i0.ɵɵadvance();
|
|
317
|
+
i0.ɵɵconditional(row_r8.Record.EffectiveTo ? 4 : -1);
|
|
318
|
+
} }
|
|
319
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
320
|
+
i0.ɵɵelementStart(0, "div", 46)(1, "div", 56);
|
|
321
|
+
i0.ɵɵtext(2, "Qty, dates, fee");
|
|
229
322
|
i0.ɵɵelementEnd();
|
|
230
|
-
i0.ɵɵ
|
|
231
|
-
i0.ɵɵtext(17, "Status / Dates");
|
|
323
|
+
i0.ɵɵconditionalCreate(3, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_3_Template, 17, 4, "div", 60)(4, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Conditional_4_Template, 5, 4, "div", 61);
|
|
232
324
|
i0.ɵɵelementEnd();
|
|
233
|
-
i0.ɵɵelementStart(18, "th", 38);
|
|
234
|
-
i0.ɵɵtext(19, "Actions");
|
|
235
|
-
i0.ɵɵelementEnd()()();
|
|
236
|
-
i0.ɵɵelementStart(20, "tbody");
|
|
237
|
-
i0.ɵɵrepeaterCreate(21, BizAppsProductPricingWidgetComponent_Conditional_28_Conditional_2_For_22_Template, 26, 8, "tr", null, _forTrack0);
|
|
238
|
-
i0.ɵɵelementEnd()()();
|
|
239
325
|
} if (rf & 2) {
|
|
240
|
-
const ctx_r1 = i0.ɵɵnextContext(
|
|
241
|
-
i0.ɵɵadvance(
|
|
242
|
-
i0.ɵɵ
|
|
326
|
+
const ctx_r1 = i0.ɵɵnextContext(6);
|
|
327
|
+
i0.ɵɵadvance(3);
|
|
328
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 3 : 4);
|
|
243
329
|
} }
|
|
244
|
-
function
|
|
245
|
-
i0.ɵɵ
|
|
246
|
-
i0.ɵɵelementStart(
|
|
247
|
-
i0.ɵɵ
|
|
330
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
331
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
332
|
+
i0.ɵɵelementStart(0, "button", 7);
|
|
333
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_5_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r16); const row_r8 = i0.ɵɵnextContext(3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OpenAdvanced(row_r8.ID, $event)); });
|
|
334
|
+
i0.ɵɵtext(1, "+ Qty, dates, fee");
|
|
248
335
|
i0.ɵɵelementEnd();
|
|
249
336
|
} }
|
|
250
|
-
function
|
|
251
|
-
i0.ɵɵ
|
|
252
|
-
i0.ɵɵ
|
|
253
|
-
i0.ɵɵ
|
|
337
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
338
|
+
i0.ɵɵconditionalCreate(0, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_0_Template, 21, 3, "div", 43);
|
|
339
|
+
i0.ɵɵconditionalCreate(1, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_1_Template, 3, 0, "div", 44)(2, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_2_Template, 2, 0, "button", 42);
|
|
340
|
+
i0.ɵɵconditionalCreate(3, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_3_Template, 11, 3, "div", 45);
|
|
341
|
+
i0.ɵɵconditionalCreate(4, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_4_Template, 5, 1, "div", 46)(5, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Conditional_5_Template, 2, 0, "button", 42);
|
|
342
|
+
} if (rf & 2) {
|
|
343
|
+
const row_r8 = i0.ɵɵnextContext(2).$implicit;
|
|
344
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
345
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 0 : -1);
|
|
346
|
+
i0.ɵɵadvance();
|
|
347
|
+
i0.ɵɵconditional(ctx_r1.EditMode && row_r8.WhenText && ctx_r1.WhenEditorPriceID !== row_r8.ID ? 1 : ctx_r1.EditMode && ctx_r1.WhenEditorPriceID !== row_r8.ID ? 2 : -1);
|
|
348
|
+
i0.ɵɵadvance(2);
|
|
349
|
+
i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.WhenEditorPriceID === row_r8.ID ? 3 : -1);
|
|
350
|
+
i0.ɵɵadvance();
|
|
351
|
+
i0.ɵɵconditional(ctx_r1.HasAdvanced(row_r8.Record) || ctx_r1.AdvancedEditingID === row_r8.ID ? 4 : ctx_r1.EditMode ? 5 : -1);
|
|
352
|
+
} }
|
|
353
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
354
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
355
|
+
i0.ɵɵelementStart(0, "div", 40);
|
|
356
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r9); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
357
|
+
i0.ɵɵconditionalCreate(1, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_1_Template, 3, 1, "p", 41)(2, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Conditional_2_Template, 6, 4);
|
|
254
358
|
i0.ɵɵelementEnd();
|
|
359
|
+
} if (rf & 2) {
|
|
360
|
+
const row_r8 = i0.ɵɵnextContext().$implicit;
|
|
361
|
+
i0.ɵɵadvance();
|
|
362
|
+
i0.ɵɵconditional(row_r8.Inherited ? 1 : 2);
|
|
255
363
|
} }
|
|
256
|
-
function
|
|
257
|
-
const
|
|
258
|
-
i0.ɵɵelementStart(0, "
|
|
259
|
-
i0.ɵɵ
|
|
260
|
-
i0.ɵɵ
|
|
364
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
365
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
366
|
+
i0.ɵɵelementStart(0, "article", 30)(1, "button", 31);
|
|
367
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Template_button_click_1_listener() { const row_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.TogglePrice(row_r8)); });
|
|
368
|
+
i0.ɵɵconditionalCreate(2, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_2_Template, 2, 0, "span", 32);
|
|
369
|
+
i0.ɵɵelementStart(3, "span", 33);
|
|
370
|
+
i0.ɵɵtext(4);
|
|
261
371
|
i0.ɵɵelementEnd();
|
|
262
|
-
i0.ɵɵelementStart(5, "
|
|
263
|
-
i0.ɵɵtext(7
|
|
372
|
+
i0.ɵɵelementStart(5, "span", 34)(6, "span", 35);
|
|
373
|
+
i0.ɵɵtext(7);
|
|
264
374
|
i0.ɵɵelementEnd();
|
|
265
|
-
i0.ɵɵ
|
|
266
|
-
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductPricingWidgetComponent_Conditional_28_Conditional_3_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.NewTierMin, $event) || (ctx_r1.NewTierMin = $event); return i0.ɵɵresetView($event); });
|
|
267
|
-
i0.ɵɵelementEnd()();
|
|
268
|
-
i0.ɵɵelementStart(9, "label", 61)(10, "span", 62);
|
|
269
|
-
i0.ɵɵtext(11, "Max:");
|
|
375
|
+
i0.ɵɵconditionalCreate(8, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_8_Template, 2, 1, "span", 36);
|
|
270
376
|
i0.ɵɵelementEnd();
|
|
271
|
-
i0.ɵɵelementStart(
|
|
272
|
-
i0.ɵɵ
|
|
377
|
+
i0.ɵɵelementStart(9, "span", 37);
|
|
378
|
+
i0.ɵɵtext(10);
|
|
273
379
|
i0.ɵɵelementEnd()();
|
|
274
|
-
i0.ɵɵ
|
|
275
|
-
i0.ɵɵtext(15, "Price ($):");
|
|
380
|
+
i0.ɵɵconditionalCreate(11, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Conditional_11_Template, 3, 1, "div", 38);
|
|
276
381
|
i0.ɵɵelementEnd();
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
i0.ɵɵ
|
|
280
|
-
i0.ɵɵ
|
|
281
|
-
i0.ɵɵ
|
|
382
|
+
} if (rf & 2) {
|
|
383
|
+
const row_r8 = ctx.$implicit;
|
|
384
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
385
|
+
i0.ɵɵclassProp("open", ctx_r1.ExpandedPriceID === row_r8.ID && ctx_r1.PriceCanExpand(row_r8))("selected", ctx_r1.SelectedPriceID === row_r8.ID)("inherited", row_r8.Inherited);
|
|
386
|
+
i0.ɵɵproperty("cdkDragDisabled", !ctx_r1.EditMode || row_r8.Inherited);
|
|
387
|
+
i0.ɵɵadvance(2);
|
|
388
|
+
i0.ɵɵconditional(ctx_r1.EditMode && !row_r8.Inherited ? 2 : -1);
|
|
389
|
+
i0.ɵɵadvance(2);
|
|
390
|
+
i0.ɵɵtextInterpolate(ctx_r1.FormatCurrency(row_r8.Amount));
|
|
391
|
+
i0.ɵɵadvance(3);
|
|
392
|
+
i0.ɵɵtextInterpolate(row_r8.Name);
|
|
393
|
+
i0.ɵɵadvance();
|
|
394
|
+
i0.ɵɵconditional(row_r8.WhenText ? 8 : -1);
|
|
395
|
+
i0.ɵɵadvance();
|
|
396
|
+
i0.ɵɵclassProp("inherited", row_r8.Inherited);
|
|
397
|
+
i0.ɵɵadvance();
|
|
398
|
+
i0.ɵɵtextInterpolate(row_r8.SourceLabel);
|
|
399
|
+
i0.ɵɵadvance();
|
|
400
|
+
i0.ɵɵconditional(ctx_r1.ExpandedPriceID === row_r8.ID && ctx_r1.PriceCanExpand(row_r8) ? 11 : -1);
|
|
401
|
+
} }
|
|
402
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
403
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
404
|
+
i0.ɵɵelementStart(0, "div", 28);
|
|
405
|
+
i0.ɵɵlistener("cdkDropListDropped", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_Template_div_cdkDropListDropped_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnPriceDrop($event)); });
|
|
406
|
+
i0.ɵɵrepeaterCreate(1, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_For_2_Template, 12, 15, "article", 29, _forTrack0);
|
|
282
407
|
i0.ɵɵelementEnd();
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
i0.ɵɵ
|
|
286
|
-
i0.ɵɵ
|
|
408
|
+
} if (rf & 2) {
|
|
409
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
410
|
+
i0.ɵɵproperty("cdkDropListDisabled", !ctx_r1.EditMode);
|
|
411
|
+
i0.ɵɵadvance();
|
|
412
|
+
i0.ɵɵrepeater(ctx_r1.VisiblePrices);
|
|
413
|
+
} }
|
|
414
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_3_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
415
|
+
i0.ɵɵelement(0, "i", 25);
|
|
416
|
+
i0.ɵɵelementStart(1, "span");
|
|
417
|
+
i0.ɵɵtext(2, "Saving\u2026");
|
|
418
|
+
i0.ɵɵelementEnd();
|
|
419
|
+
} }
|
|
420
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_3_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
421
|
+
i0.ɵɵelement(0, "i", 69);
|
|
422
|
+
i0.ɵɵelementStart(1, "span");
|
|
423
|
+
i0.ɵɵtext(2, "Add price");
|
|
287
424
|
i0.ɵɵelementEnd();
|
|
288
|
-
|
|
289
|
-
|
|
425
|
+
} }
|
|
426
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
427
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
428
|
+
i0.ɵɵelementStart(0, "div", 24)(1, "div", 63)(2, "span", 64);
|
|
429
|
+
i0.ɵɵelement(3, "i", 65);
|
|
430
|
+
i0.ɵɵtext(4, " Add price ");
|
|
290
431
|
i0.ɵɵelementEnd();
|
|
291
|
-
i0.ɵɵelementStart(
|
|
292
|
-
i0.ɵɵtext(
|
|
432
|
+
i0.ɵɵelementStart(5, "label", 47)(6, "span", 48);
|
|
433
|
+
i0.ɵɵtext(7, "Name");
|
|
293
434
|
i0.ɵɵelementEnd();
|
|
294
|
-
i0.ɵɵelementStart(
|
|
295
|
-
i0.ɵɵ
|
|
296
|
-
i0.ɵɵelementEnd()()();
|
|
297
|
-
i0.ɵɵelementStart(29, "button", 71);
|
|
298
|
-
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_28_Conditional_3_Template_button_click_29_listener() { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.AddTierBracket()); });
|
|
299
|
-
i0.ɵɵconditionalCreate(30, BizAppsProductPricingWidgetComponent_Conditional_28_Conditional_3_Conditional_30_Template, 3, 0)(31, BizAppsProductPricingWidgetComponent_Conditional_28_Conditional_3_Conditional_31_Template, 3, 0);
|
|
435
|
+
i0.ɵɵelementStart(8, "input", 66);
|
|
436
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_3_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.NewPriceName, $event) || (ctx_r1.NewPriceName = $event); return i0.ɵɵresetView($event); });
|
|
300
437
|
i0.ɵɵelementEnd()();
|
|
301
|
-
i0.ɵɵelementStart(
|
|
302
|
-
i0.ɵɵ
|
|
303
|
-
i0.ɵɵ
|
|
304
|
-
i0.ɵɵ
|
|
438
|
+
i0.ɵɵelementStart(9, "label", 47)(10, "span", 48);
|
|
439
|
+
i0.ɵɵtext(11, "Amount");
|
|
440
|
+
i0.ɵɵelementEnd();
|
|
441
|
+
i0.ɵɵelementStart(12, "input", 67);
|
|
442
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_3_Template_input_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.NewPriceAmount, $event) || (ctx_r1.NewPriceAmount = $event); return i0.ɵɵresetView($event); });
|
|
443
|
+
i0.ɵɵelementEnd()();
|
|
444
|
+
i0.ɵɵelementStart(13, "button", 68);
|
|
445
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_3_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r17); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.AddPrice()); });
|
|
446
|
+
i0.ɵɵconditionalCreate(14, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_3_Conditional_14_Template, 3, 0)(15, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_3_Conditional_15_Template, 3, 0);
|
|
305
447
|
i0.ɵɵelementEnd()()();
|
|
306
448
|
} if (rf & 2) {
|
|
307
449
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
308
450
|
i0.ɵɵadvance(8);
|
|
309
|
-
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.
|
|
310
|
-
i0.ɵɵadvance(4);
|
|
311
|
-
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.NewTierMax);
|
|
451
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.NewPriceName);
|
|
312
452
|
i0.ɵɵadvance(4);
|
|
313
|
-
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.
|
|
314
|
-
i0.ɵɵadvance(
|
|
315
|
-
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.NewTierModel);
|
|
316
|
-
i0.ɵɵadvance(9);
|
|
453
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.NewPriceAmount);
|
|
454
|
+
i0.ɵɵadvance();
|
|
317
455
|
i0.ɵɵproperty("disabled", ctx_r1.IsSaving);
|
|
318
456
|
i0.ɵɵadvance();
|
|
319
|
-
i0.ɵɵconditional(ctx_r1.IsSaving ?
|
|
457
|
+
i0.ɵɵconditional(ctx_r1.IsSaving ? 14 : 15);
|
|
320
458
|
} }
|
|
321
|
-
function
|
|
322
|
-
i0.ɵɵ
|
|
323
|
-
i0.ɵɵ
|
|
324
|
-
i0.ɵɵelementEnd();
|
|
325
|
-
i0.ɵɵelementStart(3, "div", 79);
|
|
326
|
-
i0.ɵɵelement(4, "div", 80);
|
|
327
|
-
i0.ɵɵelementEnd();
|
|
328
|
-
i0.ɵɵelementStart(5, "span", 81);
|
|
329
|
-
i0.ɵɵtext(6);
|
|
330
|
-
i0.ɵɵelementEnd()();
|
|
459
|
+
function BizAppsProductPricingWidgetComponent_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
460
|
+
i0.ɵɵconditionalCreate(0, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_0_Template, 4, 0, "div", 21)(1, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_1_Template, 9, 1, "div", 22)(2, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_2_Template, 3, 1, "div", 23);
|
|
461
|
+
i0.ɵɵconditionalCreate(3, BizAppsProductPricingWidgetComponent_Conditional_19_Conditional_3_Template, 16, 4, "div", 24);
|
|
331
462
|
} if (rf & 2) {
|
|
332
|
-
const
|
|
333
|
-
i0.ɵɵ
|
|
334
|
-
i0.ɵɵ
|
|
335
|
-
i0.ɵɵ
|
|
336
|
-
i0.ɵɵstyleProp("height", bar_r12.Percentage, "%");
|
|
337
|
-
i0.ɵɵadvance(2);
|
|
338
|
-
i0.ɵɵtextInterpolate1("", bar_r12.Label, " units");
|
|
463
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
464
|
+
i0.ɵɵconditional(ctx_r1.IsLoading ? 0 : ctx_r1.VisiblePrices.length === 0 ? 1 : 2);
|
|
465
|
+
i0.ɵɵadvance(3);
|
|
466
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 3 : -1);
|
|
339
467
|
} }
|
|
340
|
-
function
|
|
341
|
-
i0.ɵɵelementStart(0, "
|
|
342
|
-
i0.ɵɵ
|
|
343
|
-
i0.ɵɵ
|
|
344
|
-
i0.ɵɵtext(4, "Live Volume Step Curve (Base vs Tiers)");
|
|
345
|
-
i0.ɵɵelementEnd()();
|
|
346
|
-
i0.ɵɵelementStart(5, "div", 76);
|
|
347
|
-
i0.ɵɵrepeaterCreate(6, BizAppsProductPricingWidgetComponent_Conditional_28_Conditional_4_For_7_Template, 7, 4, "div", 77, _forTrack1);
|
|
348
|
-
i0.ɵɵelementEnd()();
|
|
468
|
+
function BizAppsProductPricingWidgetComponent_Conditional_20_Conditional_25_Template(rf, ctx) { if (rf & 1) {
|
|
469
|
+
i0.ɵɵelementStart(0, "p", 79);
|
|
470
|
+
i0.ɵɵtext(1);
|
|
471
|
+
i0.ɵɵelementEnd();
|
|
349
472
|
} if (rf & 2) {
|
|
350
473
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
351
|
-
i0.ɵɵadvance(
|
|
352
|
-
i0.ɵɵ
|
|
474
|
+
i0.ɵɵadvance();
|
|
475
|
+
i0.ɵɵtextInterpolate(ctx_r1.QuoteResult.Skipped);
|
|
353
476
|
} }
|
|
354
|
-
function
|
|
355
|
-
|
|
356
|
-
i0.ɵɵ
|
|
357
|
-
i0.ɵɵ
|
|
477
|
+
function BizAppsProductPricingWidgetComponent_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|
|
478
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
479
|
+
i0.ɵɵelementStart(0, "div", 70);
|
|
480
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_20_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r18); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.CloseQuote()); });
|
|
481
|
+
i0.ɵɵelementEnd();
|
|
482
|
+
i0.ɵɵelementStart(1, "aside", 71)(2, "div", 72)(3, "h3");
|
|
483
|
+
i0.ɵɵtext(4, "Test a quote");
|
|
484
|
+
i0.ɵɵelementEnd();
|
|
485
|
+
i0.ɵɵelementStart(5, "button", 7);
|
|
486
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Conditional_20_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r18); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.CloseQuote()); });
|
|
487
|
+
i0.ɵɵtext(6, "Close");
|
|
488
|
+
i0.ɵɵelementEnd()();
|
|
489
|
+
i0.ɵɵelementStart(7, "p", 73);
|
|
490
|
+
i0.ɵɵtext(8, "Optional. Sample bill-to type against these prices. Same walk as GL \u2014 product then category.");
|
|
491
|
+
i0.ɵɵelementEnd();
|
|
492
|
+
i0.ɵɵelementStart(9, "label", 47)(10, "span", 48);
|
|
493
|
+
i0.ɵɵtext(11, "Bill-to organization Type");
|
|
494
|
+
i0.ɵɵelementEnd();
|
|
495
|
+
i0.ɵɵelementStart(12, "select", 74);
|
|
496
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductPricingWidgetComponent_Conditional_20_Template_select_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.QuoteOrgType, $event) || (ctx_r1.QuoteOrgType = $event); return i0.ɵɵresetView($event); });
|
|
497
|
+
i0.ɵɵlistener("ngModelChange", function BizAppsProductPricingWidgetComponent_Conditional_20_Template_select_ngModelChange_12_listener() { i0.ɵɵrestoreView(_r18); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.RunQuote()); });
|
|
498
|
+
i0.ɵɵelementStart(13, "option", 75);
|
|
499
|
+
i0.ɵɵtext(14, "Member");
|
|
500
|
+
i0.ɵɵelementEnd();
|
|
501
|
+
i0.ɵɵelementStart(15, "option", 76);
|
|
502
|
+
i0.ɵɵtext(16, "Prospect");
|
|
503
|
+
i0.ɵɵelementEnd()()();
|
|
504
|
+
i0.ɵɵelementStart(17, "label", 47)(18, "span", 48);
|
|
505
|
+
i0.ɵɵtext(19, "Qty");
|
|
506
|
+
i0.ɵɵelementEnd();
|
|
507
|
+
i0.ɵɵelementStart(20, "input", 77);
|
|
508
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductPricingWidgetComponent_Conditional_20_Template_input_ngModelChange_20_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.SimQuantity, $event) || (ctx_r1.SimQuantity = $event); return i0.ɵɵresetView($event); });
|
|
509
|
+
i0.ɵɵlistener("ngModelChange", function BizAppsProductPricingWidgetComponent_Conditional_20_Template_input_ngModelChange_20_listener() { i0.ɵɵrestoreView(_r18); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.RunQuote()); });
|
|
510
|
+
i0.ɵɵelementEnd()();
|
|
511
|
+
i0.ɵɵelementStart(21, "div", 78);
|
|
512
|
+
i0.ɵɵtext(22);
|
|
513
|
+
i0.ɵɵelementEnd();
|
|
514
|
+
i0.ɵɵelementStart(23, "p", 79);
|
|
515
|
+
i0.ɵɵtext(24);
|
|
516
|
+
i0.ɵɵelementEnd();
|
|
517
|
+
i0.ɵɵconditionalCreate(25, BizAppsProductPricingWidgetComponent_Conditional_20_Conditional_25_Template, 2, 1, "p", 79);
|
|
518
|
+
i0.ɵɵelementEnd();
|
|
358
519
|
} if (rf & 2) {
|
|
359
520
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
360
|
-
i0.ɵɵ
|
|
361
|
-
i0.ɵɵ
|
|
362
|
-
i0.ɵɵ
|
|
521
|
+
i0.ɵɵadvance(12);
|
|
522
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.QuoteOrgType);
|
|
523
|
+
i0.ɵɵadvance(8);
|
|
524
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.SimQuantity);
|
|
525
|
+
i0.ɵɵadvance(2);
|
|
526
|
+
i0.ɵɵtextInterpolate(ctx_r1.QuoteResult.AmountText);
|
|
527
|
+
i0.ɵɵadvance(2);
|
|
528
|
+
i0.ɵɵtextInterpolate(ctx_r1.QuoteResult.Why);
|
|
363
529
|
i0.ɵɵadvance();
|
|
364
|
-
i0.ɵɵconditional(ctx_r1.
|
|
530
|
+
i0.ɵɵconditional(ctx_r1.QuoteResult.Skipped ? 25 : -1);
|
|
365
531
|
} }
|
|
366
532
|
const PRODUCT_PRICES_ENTITY = 'MJ_BizApps_Orders: Product Prices';
|
|
367
533
|
const PRICE_LISTS_ENTITY = 'MJ_BizApps_Orders: Price Lists';
|
|
534
|
+
const PRODUCT_CATEGORIES_ENTITY = 'MJ_BizApps_Orders: Product Categories';
|
|
535
|
+
/** Dotted Source.Field labels for the When sentence. */
|
|
536
|
+
const PRICE_WHEN_FIELDS = [
|
|
537
|
+
{ name: 'BillToOrganization.Type', displayName: 'Bill-to organization · Type' },
|
|
538
|
+
{ name: 'BillToOrganization.Status', displayName: 'Bill-to organization · Status' },
|
|
539
|
+
{ name: 'BillToOrganization.Name', displayName: 'Bill-to organization · Name' },
|
|
540
|
+
{ name: 'BillToPerson.Title', displayName: 'Bill-to person · Title' },
|
|
541
|
+
{ name: 'BillToPerson.Status', displayName: 'Bill-to person · Status' },
|
|
542
|
+
{ name: 'ShipToOrganization.Type', displayName: 'Ship-to organization · Type' },
|
|
543
|
+
{ name: 'Order.Status', displayName: 'Order · Status' },
|
|
544
|
+
{ name: 'Order.OrderDate', displayName: 'Order · Date' },
|
|
545
|
+
{ name: 'Product.SKU', displayName: 'Product · SKU' },
|
|
546
|
+
{ name: 'Product.Status', displayName: 'Product · Status' },
|
|
547
|
+
];
|
|
368
548
|
/**
|
|
369
549
|
* World-Class Product Pricing Matrix & Volume Ladder Widget (Option 1).
|
|
370
550
|
*
|
|
@@ -398,6 +578,18 @@ export class BizAppsProductPricingWidgetComponent {
|
|
|
398
578
|
IsLoading = false;
|
|
399
579
|
IsSaving = false;
|
|
400
580
|
IsAdvancedGridView = false;
|
|
581
|
+
QuoteDrawerOpen = false;
|
|
582
|
+
ExpandedPriceID = null;
|
|
583
|
+
SelectedPriceID = null;
|
|
584
|
+
WhenEditorPriceID = null;
|
|
585
|
+
AdvancedEditingID = null;
|
|
586
|
+
WhenFilter = null;
|
|
587
|
+
WhenFields = [];
|
|
588
|
+
NewPriceName = 'Base';
|
|
589
|
+
NewPriceAmount = 0;
|
|
590
|
+
QuoteOrgType = 'Member';
|
|
591
|
+
QuoteResult = { AmountText: '—', Why: '', Skipped: '' };
|
|
592
|
+
InheritedRecords = [];
|
|
401
593
|
ActiveToast = null;
|
|
402
594
|
toastTimer;
|
|
403
595
|
Channels = [
|
|
@@ -421,7 +613,7 @@ export class BizAppsProductPricingWidgetComponent {
|
|
|
421
613
|
TotalSavings: 0,
|
|
422
614
|
};
|
|
423
615
|
RecalculateSimulation() {
|
|
424
|
-
const base = this.
|
|
616
|
+
const base = this.BaseListPrice;
|
|
425
617
|
let discount = 0;
|
|
426
618
|
if (this.SimQuantity >= 50) {
|
|
427
619
|
discount = 25;
|
|
@@ -451,10 +643,7 @@ export class BizAppsProductPricingWidgetComponent {
|
|
|
451
643
|
}
|
|
452
644
|
}
|
|
453
645
|
get BaseListPrice() {
|
|
454
|
-
//
|
|
455
|
-
if (this.Product?.StandaloneSellingPrice && Number(this.Product.StandaloneSellingPrice) > 0) {
|
|
456
|
-
return Number(this.Product.StandaloneSellingPrice);
|
|
457
|
-
}
|
|
646
|
+
// First base-channel ProductPrice. Never Product.StandaloneSellingPrice (deprecated).
|
|
458
647
|
const baseFirstTier = this.AllPriceRecords.find(p => !p.PriceListID && (Number(p.MinQuantity) === 1 || !p.MinQuantity));
|
|
459
648
|
if (baseFirstTier && Number(baseFirstTier.Amount) > 0) {
|
|
460
649
|
return Number(baseFirstTier.Amount);
|
|
@@ -464,6 +653,143 @@ export class BizAppsProductPricingWidgetComponent {
|
|
|
464
653
|
get FormattedBasePrice() {
|
|
465
654
|
return FormatMoney(this.BaseListPrice);
|
|
466
655
|
}
|
|
656
|
+
/** Price-list tabs only when a real list exists. One "Base / Direct List" tab is leftover chrome. */
|
|
657
|
+
get ShowChannelBar() {
|
|
658
|
+
return this.Channels.some((c) => c.ID != null);
|
|
659
|
+
}
|
|
660
|
+
get PricesForChannel() {
|
|
661
|
+
return this.AllPriceRecords.filter((p) => this.SelectedChannelID === null ? !p.PriceListID : p.PriceListID === this.SelectedChannelID);
|
|
662
|
+
}
|
|
663
|
+
get VisiblePrices() {
|
|
664
|
+
const inChannel = (p) => this.SelectedChannelID === null ? !p.PriceListID : p.PriceListID === this.SelectedChannelID;
|
|
665
|
+
const productRows = this.AllPriceRecords.filter(inChannel);
|
|
666
|
+
const names = new Set(productRows.map((p) => this.PriceDisplayName(p).trim().toLowerCase()));
|
|
667
|
+
const inherited = this.InheritedRecords.filter((p) => inChannel(p) && !names.has(this.PriceDisplayName(p).trim().toLowerCase()));
|
|
668
|
+
const toCard = (p, inherited) => ({
|
|
669
|
+
ID: p.ID,
|
|
670
|
+
Name: this.PriceDisplayName(p),
|
|
671
|
+
Amount: Number(p.Amount) || 0,
|
|
672
|
+
Inherited: inherited,
|
|
673
|
+
SourceLabel: inherited ? 'From category' : 'This product',
|
|
674
|
+
WhenText: this.WhenSentence(p),
|
|
675
|
+
Record: p,
|
|
676
|
+
});
|
|
677
|
+
const productCards = productRows
|
|
678
|
+
.map((p) => toCard(p, false))
|
|
679
|
+
.sort((a, b) => (Number(b.Record.Priority) || 0) - (Number(a.Record.Priority) || 0));
|
|
680
|
+
return [...productCards, ...inherited.map((p) => toCard(p, true))];
|
|
681
|
+
}
|
|
682
|
+
PriceCanExpand(row) {
|
|
683
|
+
if (row.Inherited)
|
|
684
|
+
return this.EditMode;
|
|
685
|
+
if (this.EditMode)
|
|
686
|
+
return true;
|
|
687
|
+
return this.HasAdvanced(row.Record);
|
|
688
|
+
}
|
|
689
|
+
PriceDisplayName(p) {
|
|
690
|
+
const n = p.Name?.trim();
|
|
691
|
+
if (n)
|
|
692
|
+
return n;
|
|
693
|
+
return p.Description?.trim() || 'Price';
|
|
694
|
+
}
|
|
695
|
+
HasWhen(p) {
|
|
696
|
+
return this.WhenSentence(p).length > 0;
|
|
697
|
+
}
|
|
698
|
+
WhenSentence(p) {
|
|
699
|
+
const raw = p.Applicability;
|
|
700
|
+
if (raw == null || String(raw).trim() === '')
|
|
701
|
+
return '';
|
|
702
|
+
try {
|
|
703
|
+
const parsed = JSON.parse(String(raw));
|
|
704
|
+
const parts = (parsed.filters ?? []).map((f) => this.whenPart(f)).filter(Boolean);
|
|
705
|
+
if (parts.length === 0)
|
|
706
|
+
return '';
|
|
707
|
+
const join = parsed.logic === 'or' ? ' or ' : ' and ';
|
|
708
|
+
return parts.join(join);
|
|
709
|
+
}
|
|
710
|
+
catch {
|
|
711
|
+
return 'Has a When';
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
whenPart(node) {
|
|
715
|
+
if (node.filters?.length) {
|
|
716
|
+
const inner = node.filters.map((f) => this.whenPart(f)).filter(Boolean).join(node.logic === 'or' ? ' or ' : ' and ');
|
|
717
|
+
return inner ? `(${inner})` : '';
|
|
718
|
+
}
|
|
719
|
+
if (!node.field)
|
|
720
|
+
return '';
|
|
721
|
+
const labels = {
|
|
722
|
+
eq: 'equals',
|
|
723
|
+
neq: 'does not equal',
|
|
724
|
+
gt: 'is greater than',
|
|
725
|
+
gte: 'is at least',
|
|
726
|
+
lt: 'is less than',
|
|
727
|
+
lte: 'is at most',
|
|
728
|
+
contains: 'contains',
|
|
729
|
+
doesnotcontain: 'does not contain',
|
|
730
|
+
startswith: 'starts with',
|
|
731
|
+
endswith: 'ends with',
|
|
732
|
+
isnull: 'is empty',
|
|
733
|
+
isnotnull: 'is not empty',
|
|
734
|
+
isempty: 'is empty',
|
|
735
|
+
isnotempty: 'is not empty',
|
|
736
|
+
};
|
|
737
|
+
const field = this.whenFieldLabel(node.field);
|
|
738
|
+
const op = labels[node.operator ?? ''] ?? node.operator ?? '';
|
|
739
|
+
if (['isnull', 'isnotnull', 'isempty', 'isnotempty'].includes(node.operator ?? '')) {
|
|
740
|
+
return `${field} ${op}`;
|
|
741
|
+
}
|
|
742
|
+
const val = node.value == null || node.value === '' ? '' : String(node.value);
|
|
743
|
+
return `${field} ${op} ${val}`.trim();
|
|
744
|
+
}
|
|
745
|
+
whenFieldLabel(stored) {
|
|
746
|
+
const hit = PRICE_WHEN_FIELDS.find((f) => f.name === stored);
|
|
747
|
+
return hit?.displayName ?? stored.replace('.', ' · ');
|
|
748
|
+
}
|
|
749
|
+
OpenPriceRecord(p, event) {
|
|
750
|
+
event?.stopPropagation();
|
|
751
|
+
this.Navigate.emit({
|
|
752
|
+
Kind: 'record',
|
|
753
|
+
EntityName: PRODUCT_PRICES_ENTITY,
|
|
754
|
+
PrimaryKey: CompositeKey.FromID(p.ID),
|
|
755
|
+
});
|
|
756
|
+
if (this.navService) {
|
|
757
|
+
this.navService.OpenEntityRecord(PRODUCT_PRICES_ENTITY, CompositeKey.FromID(p.ID));
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
CloseQuote() {
|
|
761
|
+
this.QuoteDrawerOpen = false;
|
|
762
|
+
this.cdr?.markForCheck();
|
|
763
|
+
}
|
|
764
|
+
TogglePrice(row) {
|
|
765
|
+
this.SelectedPriceID = row.ID;
|
|
766
|
+
if (!this.PriceCanExpand(row)) {
|
|
767
|
+
this.ExpandedPriceID = null;
|
|
768
|
+
this.cdr?.markForCheck();
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
this.ExpandedPriceID = this.ExpandedPriceID === row.ID ? null : row.ID;
|
|
772
|
+
this.cdr?.markForCheck();
|
|
773
|
+
}
|
|
774
|
+
async OnPriceDrop(event) {
|
|
775
|
+
if (!this.EditMode)
|
|
776
|
+
return;
|
|
777
|
+
const ranked = this.VisiblePrices.filter((r) => !r.Inherited);
|
|
778
|
+
if (event.previousIndex === event.currentIndex)
|
|
779
|
+
return;
|
|
780
|
+
if (event.previousIndex < 0 || event.currentIndex < 0)
|
|
781
|
+
return;
|
|
782
|
+
if (event.previousIndex >= ranked.length || event.currentIndex >= ranked.length)
|
|
783
|
+
return;
|
|
784
|
+
moveItemInArray(ranked, event.previousIndex, event.currentIndex);
|
|
785
|
+
let priority = ranked.length * 10;
|
|
786
|
+
for (const row of ranked) {
|
|
787
|
+
row.Record.Priority = priority;
|
|
788
|
+
priority -= 10;
|
|
789
|
+
}
|
|
790
|
+
await this.saveProductGraph();
|
|
791
|
+
this.cdr?.markForCheck();
|
|
792
|
+
}
|
|
467
793
|
get ProductPricesViewParams() {
|
|
468
794
|
if (!this.Product?.ID)
|
|
469
795
|
return null;
|
|
@@ -478,6 +804,7 @@ export class BizAppsProductPricingWidgetComponent {
|
|
|
478
804
|
return {
|
|
479
805
|
ProductID: this.Product?.ID,
|
|
480
806
|
PriceListID: this.SelectedChannelID,
|
|
807
|
+
Name: 'Price',
|
|
481
808
|
};
|
|
482
809
|
}
|
|
483
810
|
async LoadPricingData() {
|
|
@@ -491,20 +818,9 @@ export class BizAppsProductPricingWidgetComponent {
|
|
|
491
818
|
this.AllPriceRecords = [...this.Product.Prices.Items];
|
|
492
819
|
}
|
|
493
820
|
else {
|
|
494
|
-
const
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
ExtraFilter: `ProductID = '${this.Product.ID}'`,
|
|
498
|
-
OrderBy: 'MinQuantity ASC, __mj_CreatedAt ASC',
|
|
499
|
-
ResultType: 'entity_object',
|
|
500
|
-
MaxRows: 100,
|
|
501
|
-
});
|
|
502
|
-
if (pricesResult.Success && pricesResult.Results) {
|
|
503
|
-
this.AllPriceRecords = pricesResult.Results;
|
|
504
|
-
}
|
|
505
|
-
else {
|
|
506
|
-
console.warn('Could not retrieve product prices:', pricesResult.ErrorMessage);
|
|
507
|
-
}
|
|
821
|
+
const md = new Metadata();
|
|
822
|
+
await LoadOrdersEngine(Metadata.Provider, md.CurrentUser);
|
|
823
|
+
this.AllPriceRecords = OrdersEngine.Instance.ProductPricesFor(this.Product.ID);
|
|
508
824
|
}
|
|
509
825
|
const rv = new RunView();
|
|
510
826
|
const listsResult = await rv.RunView({
|
|
@@ -513,11 +829,13 @@ export class BizAppsProductPricingWidgetComponent {
|
|
|
513
829
|
ResultType: 'entity_object',
|
|
514
830
|
MaxRows: 50,
|
|
515
831
|
});
|
|
516
|
-
|
|
832
|
+
await this.loadInheritedPrices();
|
|
517
833
|
const availableLists = listsResult.Success && listsResult.Results ? listsResult.Results : [];
|
|
518
834
|
this.buildChannelsList(availableLists);
|
|
519
|
-
// Build Ladder for currently selected channel
|
|
520
835
|
this.rebuildLadder();
|
|
836
|
+
if (!this.NewPriceAmount) {
|
|
837
|
+
this.NewPriceAmount = this.BaseListPrice || 0;
|
|
838
|
+
}
|
|
521
839
|
}
|
|
522
840
|
catch (err) {
|
|
523
841
|
console.error('Failed to load product pricing records:', err);
|
|
@@ -527,18 +845,24 @@ export class BizAppsProductPricingWidgetComponent {
|
|
|
527
845
|
this.cdr?.markForCheck();
|
|
528
846
|
}
|
|
529
847
|
}
|
|
848
|
+
countPricesOnChannel(listId) {
|
|
849
|
+
const match = (p) => listId === null ? !p.PriceListID : p.PriceListID === listId;
|
|
850
|
+
const product = this.AllPriceRecords.filter(match);
|
|
851
|
+
const names = new Set(product.map((p) => this.PriceDisplayName(p).trim().toLowerCase()));
|
|
852
|
+
const inherited = this.InheritedRecords.filter((p) => match(p) && !names.has(this.PriceDisplayName(p).trim().toLowerCase()));
|
|
853
|
+
return product.length + inherited.length;
|
|
854
|
+
}
|
|
530
855
|
buildChannelsList(allPriceLists) {
|
|
531
|
-
const baseTiersCount = this.AllPriceRecords.filter(p => !p.PriceListID).length;
|
|
532
856
|
const channels = [
|
|
533
857
|
{
|
|
534
858
|
ID: null,
|
|
535
859
|
Name: 'Base / Direct List',
|
|
536
860
|
Icon: 'fa-solid fa-globe',
|
|
537
|
-
TierCount:
|
|
861
|
+
TierCount: this.countPricesOnChannel(null),
|
|
538
862
|
}
|
|
539
863
|
];
|
|
540
864
|
for (const pl of allPriceLists) {
|
|
541
|
-
const tierCount = this.
|
|
865
|
+
const tierCount = this.countPricesOnChannel(pl.ID);
|
|
542
866
|
let icon = 'fa-solid fa-tags';
|
|
543
867
|
const nameLower = (pl.Name || '').toLowerCase();
|
|
544
868
|
if (nameLower.includes('wholesale'))
|
|
@@ -706,6 +1030,8 @@ export class BizAppsProductPricingWidgetComponent {
|
|
|
706
1030
|
newPrice.Priority = 0;
|
|
707
1031
|
newPrice.Status = 'Active';
|
|
708
1032
|
newPrice.EffectiveFrom = new Date();
|
|
1033
|
+
const bracket = maxQty != null ? `${minQty}–${maxQty}` : `${minQty}+`;
|
|
1034
|
+
newPrice.Name = `${this.NewTierModel || 'Volume'} ${bracket}`.slice(0, 100);
|
|
709
1035
|
const saved = await newPrice.Save();
|
|
710
1036
|
if (saved) {
|
|
711
1037
|
await this.LoadPricingData();
|
|
@@ -769,25 +1095,18 @@ export class BizAppsProductPricingWidgetComponent {
|
|
|
769
1095
|
this.IsSaving = true;
|
|
770
1096
|
this.cdr?.markForCheck();
|
|
771
1097
|
try {
|
|
772
|
-
if (
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
const
|
|
776
|
-
if (
|
|
777
|
-
await this.LoadPricingData();
|
|
1098
|
+
if (!(await this.ensurePricesLoaded()))
|
|
1099
|
+
return;
|
|
1100
|
+
this.Product.Prices.Remove(tier.Record);
|
|
1101
|
+
const saved = await this.saveProductGraph();
|
|
1102
|
+
if (saved) {
|
|
778
1103
|
this.PriceChanged.emit();
|
|
779
1104
|
this.ShowToast(`Deleted ${tier.BracketLabel} (${tier.UnitRangeText})`, 'info');
|
|
780
|
-
|
|
781
|
-
else {
|
|
782
|
-
console.error('Failed to delete tier:', tier.Record.LatestResult);
|
|
783
|
-
const errMsg = this.extractErrorMessage(tier.Record.LatestResult);
|
|
784
|
-
this.ShowToast(`Failed to delete tier: ${errMsg}`, 'error');
|
|
1105
|
+
await this.LoadPricingData();
|
|
785
1106
|
}
|
|
786
1107
|
}
|
|
787
1108
|
catch (err) {
|
|
788
|
-
|
|
789
|
-
const errMsg = err instanceof Error ? err.message : String(err);
|
|
790
|
-
this.ShowToast(`Error deleting tier: ${errMsg}`, 'error');
|
|
1109
|
+
this.ShowToast(err instanceof Error ? err.message : String(err), 'error');
|
|
791
1110
|
}
|
|
792
1111
|
finally {
|
|
793
1112
|
this.IsSaving = false;
|
|
@@ -871,68 +1190,280 @@ export class BizAppsProductPricingWidgetComponent {
|
|
|
871
1190
|
FormatCurrency(val) {
|
|
872
1191
|
return FormatMoney(val);
|
|
873
1192
|
}
|
|
1193
|
+
/** Qty bands, end date, non-standard fee, recurrence — not a default List/Base row. */
|
|
1194
|
+
HasAdvanced(p) {
|
|
1195
|
+
if (!p)
|
|
1196
|
+
return false;
|
|
1197
|
+
const min = p.MinQuantity;
|
|
1198
|
+
const max = p.MaxQuantity;
|
|
1199
|
+
const fee = (p.FeeType || 'Standard').trim();
|
|
1200
|
+
const to = p.EffectiveTo;
|
|
1201
|
+
const recM = p.RecurrenceMonths;
|
|
1202
|
+
const recD = p.RecurrenceDaysOfWeek;
|
|
1203
|
+
const pkg = p.PackageQuantity;
|
|
1204
|
+
if (min != null && Number(min) !== 1 && Number(min) !== 0)
|
|
1205
|
+
return true;
|
|
1206
|
+
if (max != null)
|
|
1207
|
+
return true;
|
|
1208
|
+
if (fee && fee !== 'Standard')
|
|
1209
|
+
return true;
|
|
1210
|
+
if (to)
|
|
1211
|
+
return true;
|
|
1212
|
+
if (recM && String(recM).trim())
|
|
1213
|
+
return true;
|
|
1214
|
+
if (recD && String(recD).trim())
|
|
1215
|
+
return true;
|
|
1216
|
+
if (pkg != null && Number(pkg) !== 0)
|
|
1217
|
+
return true;
|
|
1218
|
+
return false;
|
|
1219
|
+
}
|
|
1220
|
+
OpenAdvanced(id, event) {
|
|
1221
|
+
event?.stopPropagation();
|
|
1222
|
+
this.AdvancedEditingID = id;
|
|
1223
|
+
this.cdr?.markForCheck();
|
|
1224
|
+
}
|
|
1225
|
+
CloseWhenEditor() {
|
|
1226
|
+
this.WhenEditorPriceID = null;
|
|
1227
|
+
this.WhenFilter = null;
|
|
1228
|
+
this.cdr?.markForCheck();
|
|
1229
|
+
}
|
|
1230
|
+
OpenWhenEditor(row) {
|
|
1231
|
+
this.WhenFields = this.buildWhenFields();
|
|
1232
|
+
this.WhenFilter = this.parseWhenFilter(row.Record) ?? createEmptyFilter();
|
|
1233
|
+
this.WhenEditorPriceID = row.ID;
|
|
1234
|
+
this.cdr?.markForCheck();
|
|
1235
|
+
}
|
|
1236
|
+
OnWhenFilterChange(filter) {
|
|
1237
|
+
this.WhenFilter = filter;
|
|
1238
|
+
}
|
|
1239
|
+
parseWhenFilter(p) {
|
|
1240
|
+
const raw = p.Applicability;
|
|
1241
|
+
if (raw == null || String(raw).trim() === '')
|
|
1242
|
+
return null;
|
|
1243
|
+
try {
|
|
1244
|
+
const parsed = JSON.parse(String(raw));
|
|
1245
|
+
if (parsed && Array.isArray(parsed.filters))
|
|
1246
|
+
return parsed;
|
|
1247
|
+
}
|
|
1248
|
+
catch {
|
|
1249
|
+
/* ignore */
|
|
1250
|
+
}
|
|
1251
|
+
return null;
|
|
1252
|
+
}
|
|
1253
|
+
buildWhenFields() {
|
|
1254
|
+
const md = new Metadata();
|
|
1255
|
+
const out = [];
|
|
1256
|
+
for (const src of PRICE_APPLICABILITY_SOURCES) {
|
|
1257
|
+
const ent = md.EntityByName(src.entityName);
|
|
1258
|
+
if (!ent)
|
|
1259
|
+
continue;
|
|
1260
|
+
for (const f of ent.Fields) {
|
|
1261
|
+
if (f.Name.startsWith('__mj'))
|
|
1262
|
+
continue;
|
|
1263
|
+
out.push({
|
|
1264
|
+
name: `${src.key}.${f.Name}`,
|
|
1265
|
+
displayName: `${src.label} · ${f.DisplayName || f.Name}`,
|
|
1266
|
+
type: this.filterTypeFor(f.TSType),
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
return out;
|
|
1271
|
+
}
|
|
1272
|
+
filterTypeFor(ts) {
|
|
1273
|
+
switch (ts) {
|
|
1274
|
+
case EntityFieldTSType.Number:
|
|
1275
|
+
return 'number';
|
|
1276
|
+
case EntityFieldTSType.Date:
|
|
1277
|
+
return 'date';
|
|
1278
|
+
case EntityFieldTSType.Boolean:
|
|
1279
|
+
return 'boolean';
|
|
1280
|
+
default:
|
|
1281
|
+
return 'string';
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
async SaveWhen(row) {
|
|
1285
|
+
const filter = this.WhenFilter;
|
|
1286
|
+
const empty = !filter?.filters?.length;
|
|
1287
|
+
row.Record.Applicability = empty ? null : JSON.stringify(filter);
|
|
1288
|
+
await this.SavePrice(row.Record);
|
|
1289
|
+
this.WhenEditorPriceID = null;
|
|
1290
|
+
this.WhenFilter = null;
|
|
1291
|
+
await this.LoadPricingData();
|
|
1292
|
+
}
|
|
1293
|
+
async ClearWhen(row) {
|
|
1294
|
+
row.Record.Applicability = null;
|
|
1295
|
+
await this.SavePrice(row.Record);
|
|
1296
|
+
this.WhenEditorPriceID = null;
|
|
1297
|
+
await this.LoadPricingData();
|
|
1298
|
+
}
|
|
1299
|
+
syncFromCollection() {
|
|
1300
|
+
if (this.Product?.Prices) {
|
|
1301
|
+
this.AllPriceRecords = [...this.Product.Prices.Items];
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
async ensurePricesLoaded() {
|
|
1305
|
+
if (!this.Product?.Prices)
|
|
1306
|
+
return false;
|
|
1307
|
+
if (this.Product.IsSaved && !this.Product.Prices.IsLoaded) {
|
|
1308
|
+
await this.Product.Prices.Load();
|
|
1309
|
+
}
|
|
1310
|
+
this.syncFromCollection();
|
|
1311
|
+
return true;
|
|
1312
|
+
}
|
|
1313
|
+
/** One graph save — Product + Prices — same as Order.Lines. Never child.Save(). */
|
|
1314
|
+
async saveProductGraph() {
|
|
1315
|
+
if (!this.Product)
|
|
1316
|
+
return false;
|
|
1317
|
+
const ok = await this.Product.Save();
|
|
1318
|
+
if (!ok) {
|
|
1319
|
+
this.ShowToast(`Could not save price: ${this.extractErrorMessage(this.Product.LatestResult)}`, 'error', 6000);
|
|
1320
|
+
}
|
|
1321
|
+
this.syncFromCollection();
|
|
1322
|
+
return ok;
|
|
1323
|
+
}
|
|
1324
|
+
nextPriorityOnChannel() {
|
|
1325
|
+
const peers = this.AllPriceRecords.filter((p) => this.SelectedChannelID === null ? !p.PriceListID : p.PriceListID === this.SelectedChannelID);
|
|
1326
|
+
const max = peers.reduce((m, p) => Math.max(m, Number(p.Priority) || 0), 0);
|
|
1327
|
+
return max + 10;
|
|
1328
|
+
}
|
|
1329
|
+
async SavePrice(p) {
|
|
1330
|
+
if (!this.EditMode)
|
|
1331
|
+
return;
|
|
1332
|
+
await this.saveProductGraph();
|
|
1333
|
+
this.cdr?.markForCheck();
|
|
1334
|
+
}
|
|
1335
|
+
async AddPrice() {
|
|
1336
|
+
if (!this.Product?.ID) {
|
|
1337
|
+
this.ShowToast('Save the product first.', 'error');
|
|
1338
|
+
return;
|
|
1339
|
+
}
|
|
1340
|
+
if (!(await this.ensurePricesLoaded())) {
|
|
1341
|
+
this.ShowToast('Product.Prices collection is not available. Reload after CodeGen.', 'error');
|
|
1342
|
+
return;
|
|
1343
|
+
}
|
|
1344
|
+
const name = (this.NewPriceName || 'List').trim().slice(0, 100);
|
|
1345
|
+
const amount = Number(this.NewPriceAmount);
|
|
1346
|
+
this.IsSaving = true;
|
|
1347
|
+
this.cdr?.markForCheck();
|
|
1348
|
+
try {
|
|
1349
|
+
const newPrice = await this.Product.Prices.Create();
|
|
1350
|
+
newPrice.ProductID = this.Product.ID;
|
|
1351
|
+
newPrice.PriceListID = this.SelectedChannelID;
|
|
1352
|
+
newPrice.Name = name;
|
|
1353
|
+
newPrice.Amount = Number.isFinite(amount) ? amount : 0;
|
|
1354
|
+
newPrice.PricingModel = 'PerUnit';
|
|
1355
|
+
newPrice.FeeType = 'Standard';
|
|
1356
|
+
newPrice.Priority = this.nextPriorityOnChannel();
|
|
1357
|
+
newPrice.Status = 'Active';
|
|
1358
|
+
newPrice.EffectiveFrom = new Date();
|
|
1359
|
+
const saved = await this.saveProductGraph();
|
|
1360
|
+
if (saved) {
|
|
1361
|
+
this.ShowToast(`Added ${name} · ${this.FormatCurrency(newPrice.Amount)}`, 'success');
|
|
1362
|
+
this.PriceChanged.emit();
|
|
1363
|
+
this.TierAdded.emit(newPrice);
|
|
1364
|
+
await this.LoadPricingData();
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
catch (err) {
|
|
1368
|
+
this.ShowToast(err instanceof Error ? err.message : String(err), 'error', 6000);
|
|
1369
|
+
}
|
|
1370
|
+
finally {
|
|
1371
|
+
this.IsSaving = false;
|
|
1372
|
+
this.cdr?.markForCheck();
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
async OverrideInherited(row) {
|
|
1376
|
+
this.NewPriceName = row.Name;
|
|
1377
|
+
this.NewPriceAmount = row.Amount;
|
|
1378
|
+
await this.AddPrice();
|
|
1379
|
+
}
|
|
1380
|
+
OpenQuote() {
|
|
1381
|
+
this.QuoteDrawerOpen = true;
|
|
1382
|
+
this.RunQuote();
|
|
1383
|
+
this.cdr?.markForCheck();
|
|
1384
|
+
}
|
|
1385
|
+
RunQuote() {
|
|
1386
|
+
const ctx = { BillToOrganization: { Type: this.QuoteOrgType } };
|
|
1387
|
+
const hits = [];
|
|
1388
|
+
const skip = [];
|
|
1389
|
+
for (const row of this.VisiblePrices) {
|
|
1390
|
+
const raw = row.Record.Applicability;
|
|
1391
|
+
let ok = true;
|
|
1392
|
+
try {
|
|
1393
|
+
ok = priceApplies(raw, ctx);
|
|
1394
|
+
}
|
|
1395
|
+
catch {
|
|
1396
|
+
ok = false;
|
|
1397
|
+
}
|
|
1398
|
+
if (ok)
|
|
1399
|
+
hits.push(row);
|
|
1400
|
+
else
|
|
1401
|
+
skip.push(`${row.Name} (When did not match)`);
|
|
1402
|
+
}
|
|
1403
|
+
hits.sort((a, b) => Number(b.Record.Priority || 0) - Number(a.Record.Priority || 0));
|
|
1404
|
+
const win = hits[0];
|
|
1405
|
+
this.QuoteResult = win
|
|
1406
|
+
? {
|
|
1407
|
+
AmountText: this.FormatCurrency(win.Amount),
|
|
1408
|
+
Why: `${win.Name} · ${win.SourceLabel}${win.WhenText ? ' · ' + win.WhenText : ''}`,
|
|
1409
|
+
Skipped: skip.length ? `Didn’t apply: ${skip.join(' · ')}` : '',
|
|
1410
|
+
}
|
|
1411
|
+
: { AmountText: '—', Why: 'No price applied for this sample.', Skipped: skip.join(' · ') };
|
|
1412
|
+
this.cdr?.markForCheck();
|
|
1413
|
+
}
|
|
1414
|
+
async loadInheritedPrices() {
|
|
1415
|
+
this.InheritedRecords = [];
|
|
1416
|
+
const categoryId = this.Product?.ProductCategoryID;
|
|
1417
|
+
if (!categoryId)
|
|
1418
|
+
return;
|
|
1419
|
+
const md = new Metadata();
|
|
1420
|
+
await LoadOrdersEngine(Metadata.Provider, md.CurrentUser);
|
|
1421
|
+
const chain = OrdersEngine.Instance.CategoryChain(categoryId);
|
|
1422
|
+
this.InheritedRecords = OrdersEngine.Instance.ProductPricesFor(null, chain).filter((p) => !p.ProductID && (!p.Status || p.Status === 'Active'));
|
|
1423
|
+
}
|
|
874
1424
|
static ɵfac = function BizAppsProductPricingWidgetComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || BizAppsProductPricingWidgetComponent)(); };
|
|
875
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BizAppsProductPricingWidgetComponent, selectors: [["bizapps-product-pricing-widget"]], inputs: { Product: "Product", EditMode: "EditMode", FormContext: "FormContext" }, outputs: { Navigate: "Navigate", PriceChanged: "PriceChanged", TierAdded: "TierAdded" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls:
|
|
1425
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BizAppsProductPricingWidgetComponent, selectors: [["bizapps-product-pricing-widget"]], inputs: { Product: "Product", EditMode: "EditMode", FormContext: "FormContext" }, outputs: { Navigate: "Navigate", PriceChanged: "PriceChanged", TierAdded: "TierAdded" }, standalone: false, features: [i0.ɵɵNgOnChangesFeature], decls: 21, vars: 7, consts: [[1, "mjo-pricing-widget-wrap"], [1, "mjo-toast", 3, "class"], [1, "mjo-pricing-card"], [1, "mjo-card-header"], [1, "mjo-card-title"], [1, "fa-solid", "fa-tags"], [1, "mjo-card-header-actions"], ["type", "button", 1, "mjo-btn-subtle", 3, "click"], [1, "fa-solid", "fa-flask"], [1, "mjo-channel-bar"], [1, "mjo-toast"], [1, "mjo-toast-left"], [1, "mjo-toast-msg"], ["type", "button", 1, "mjo-toast-close", 3, "click"], [1, "fa-solid", "fa-xmark"], [1, "mjo-channel-list"], ["type", "button", 1, "mjo-channel-tab", 3, "active"], ["type", "button", 1, "mjo-channel-tab", 3, "click"], [1, "mjo-channel-count"], [1, "mjo-grid-wrap"], [3, "Navigate", "Params", "NewRecordValues", "Height", "AllowLoad", "ShowToolbar", "ShowNewButton", "ShowDeleteButton"], [1, "mjo-loading-state"], [1, "mjo-empty-tiers"], ["cdkDropList", "", 1, "mjo-price-list", 3, "cdkDropListDisabled"], [1, "mjo-quick-add-bar"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "mjo-empty-icon"], [1, "mjo-empty-text"], ["cdkDropList", "", 1, "mjo-price-list", 3, "cdkDropListDropped", "cdkDropListDisabled"], ["cdkDrag", "", 1, "mjo-offer", 3, "cdkDragDisabled", "open", "selected", "inherited"], ["cdkDrag", "", 1, "mjo-offer", 3, "cdkDragDisabled"], ["type", "button", 1, "mjo-offer-h", 3, "click"], ["cdkDragHandle", "", "title", "Drag to change rank", 1, "mjo-offer-grip"], [1, "mjo-offer-amt"], [1, "mjo-offer-copy"], [1, "mjo-offer-name"], [1, "mjo-offer-when"], [1, "mjo-offer-from"], [1, "mjo-offer-body"], [1, "fa-solid", "fa-grip-vertical"], [1, "mjo-offer-body", 3, "click"], [1, "mjo-inherit-note"], ["type", "button", 1, "mjo-btn-subtle"], [1, "mjo-offer-fields"], [1, "mjo-when-read"], [1, "mjo-when-edit"], [1, "mjo-adv"], [1, "mjo-field-group"], [1, "mjo-sub-label"], [1, "mjo-input-text", 3, "ngModelChange", "blur", "ngModel"], ["type", "number", "min", "0", "step", "0.01", 1, "mjo-input-price", 3, "ngModelChange", "blur", "ngModel"], [1, "mjo-input-select", 3, "ngModelChange", "change", "ngModel"], ["value", "PerUnit"], ["value", "Package"], ["value", "Volume"], ["value", "Flat"], [1, "mjo-when-title"], [3, "filterChange", "fields", "filter", "showSummary"], [1, "mjo-when-actions"], ["type", "button", 1, "mjo-btn-add", 3, "click"], [1, "mjo-adv-grid"], [1, "mjo-adv-read"], ["type", "number", 1, "mjo-input-num", 3, "ngModelChange", "blur", "ngModel"], [1, "mjo-quick-add-inputs"], [1, "mjo-quick-add-label"], [1, "fa-solid", "fa-plus-circle"], ["placeholder", "Base", 1, "mjo-input-text", 3, "ngModelChange", "ngModel"], ["type", "number", "min", "0", "step", "0.01", 1, "mjo-input-price", 3, "ngModelChange", "ngModel"], ["type", "button", 1, "mjo-btn-add", 3, "click", "disabled"], [1, "fa-solid", "fa-plus"], [1, "mjo-quote-scrim", 3, "click"], ["role", "dialog", "aria-label", "Test a quote", 1, "mjo-quote-drawer"], [1, "mjo-quote-drawer-h"], [1, "mjo-quote-lede"], [1, "mjo-input-select", 3, "ngModelChange", "ngModel"], ["value", "Member"], ["value", "Prospect"], ["type", "number", "min", "1", 1, "mjo-input-num", 3, "ngModelChange", "ngModel"], [1, "mjo-quote-amt"], [1, "mjo-quote-why"]], template: function BizAppsProductPricingWidgetComponent_Template(rf, ctx) { if (rf & 1) {
|
|
876
1426
|
i0.ɵɵelementStart(0, "div", 0);
|
|
877
1427
|
i0.ɵɵconditionalCreate(1, BizAppsProductPricingWidgetComponent_Conditional_1_Template, 7, 5, "div", 1);
|
|
878
1428
|
i0.ɵɵelementStart(2, "div", 2)(3, "div", 3)(4, "div", 4);
|
|
879
1429
|
i0.ɵɵelement(5, "i", 5);
|
|
880
1430
|
i0.ɵɵelementStart(6, "span");
|
|
881
|
-
i0.ɵɵtext(7, "
|
|
882
|
-
i0.ɵɵelementEnd()();
|
|
883
|
-
i0.ɵɵelementStart(8, "div", 6);
|
|
884
|
-
i0.ɵɵtext(9, " Base List: ");
|
|
885
|
-
i0.ɵɵelementStart(10, "strong");
|
|
886
|
-
i0.ɵɵtext(11);
|
|
887
|
-
i0.ɵɵelementEnd()()();
|
|
888
|
-
i0.ɵɵelementStart(12, "div", 7)(13, "mj-form-field", 8);
|
|
889
|
-
i0.ɵɵlistener("Navigate", function BizAppsProductPricingWidgetComponent_Template_mj_form_field_Navigate_13_listener($event) { return ctx.Navigate.emit($event); });
|
|
890
|
-
i0.ɵɵelementEnd();
|
|
891
|
-
i0.ɵɵelementStart(14, "mj-form-field", 9);
|
|
892
|
-
i0.ɵɵlistener("Navigate", function BizAppsProductPricingWidgetComponent_Template_mj_form_field_Navigate_14_listener($event) { return ctx.Navigate.emit($event); });
|
|
893
|
-
i0.ɵɵelementEnd();
|
|
894
|
-
i0.ɵɵelementStart(15, "mj-form-field", 10);
|
|
895
|
-
i0.ɵɵlistener("Navigate", function BizAppsProductPricingWidgetComponent_Template_mj_form_field_Navigate_15_listener($event) { return ctx.Navigate.emit($event); });
|
|
896
|
-
i0.ɵɵelementEnd()()();
|
|
897
|
-
i0.ɵɵelementStart(16, "div", 2)(17, "div", 11)(18, "div", 12);
|
|
898
|
-
i0.ɵɵrepeaterCreate(19, BizAppsProductPricingWidgetComponent_For_20_Template, 6, 7, "button", 13, _forTrack0);
|
|
899
|
-
i0.ɵɵelementEnd();
|
|
900
|
-
i0.ɵɵelementStart(21, "div", 14)(22, "button", 15);
|
|
901
|
-
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Template_button_click_22_listener() { return ctx.ToggleAdvancedView(); });
|
|
902
|
-
i0.ɵɵelement(23, "i");
|
|
903
|
-
i0.ɵɵelementStart(24, "span");
|
|
904
|
-
i0.ɵɵtext(25);
|
|
1431
|
+
i0.ɵɵtext(7, "Prices");
|
|
905
1432
|
i0.ɵɵelementEnd()();
|
|
906
|
-
i0.ɵɵ
|
|
1433
|
+
i0.ɵɵelementStart(8, "div", 6)(9, "button", 7);
|
|
1434
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Template_button_click_9_listener() { return ctx.OpenQuote(); });
|
|
1435
|
+
i0.ɵɵelement(10, "i", 8);
|
|
1436
|
+
i0.ɵɵelementStart(11, "span");
|
|
1437
|
+
i0.ɵɵtext(12, "Test a quote");
|
|
907
1438
|
i0.ɵɵelementEnd()();
|
|
908
|
-
i0.ɵɵ
|
|
1439
|
+
i0.ɵɵelementStart(13, "button", 7);
|
|
1440
|
+
i0.ɵɵlistener("click", function BizAppsProductPricingWidgetComponent_Template_button_click_13_listener() { return ctx.ToggleAdvancedView(); });
|
|
1441
|
+
i0.ɵɵelement(14, "i");
|
|
1442
|
+
i0.ɵɵelementStart(15, "span");
|
|
1443
|
+
i0.ɵɵtext(16);
|
|
1444
|
+
i0.ɵɵelementEnd()()()();
|
|
1445
|
+
i0.ɵɵconditionalCreate(17, BizAppsProductPricingWidgetComponent_Conditional_17_Template, 4, 0, "div", 9);
|
|
1446
|
+
i0.ɵɵconditionalCreate(18, BizAppsProductPricingWidgetComponent_Conditional_18_Template, 1, 1)(19, BizAppsProductPricingWidgetComponent_Conditional_19_Template, 4, 2);
|
|
909
1447
|
i0.ɵɵelementEnd()();
|
|
1448
|
+
i0.ɵɵconditionalCreate(20, BizAppsProductPricingWidgetComponent_Conditional_20_Template, 26, 5);
|
|
910
1449
|
} if (rf & 2) {
|
|
911
1450
|
i0.ɵɵadvance();
|
|
912
1451
|
i0.ɵɵconditional(ctx.ActiveToast ? 1 : -1);
|
|
913
|
-
i0.ɵɵadvance(
|
|
914
|
-
i0.ɵɵ
|
|
1452
|
+
i0.ɵɵadvance(13);
|
|
1453
|
+
i0.ɵɵclassMap(ctx.IsAdvancedGridView ? "fa-solid fa-tags" : "fa-solid fa-table-cells");
|
|
915
1454
|
i0.ɵɵadvance(2);
|
|
916
|
-
i0.ɵɵ
|
|
1455
|
+
i0.ɵɵtextInterpolate(ctx.IsAdvancedGridView ? "Prices" : "Advanced grid");
|
|
917
1456
|
i0.ɵɵadvance();
|
|
918
|
-
i0.ɵɵ
|
|
1457
|
+
i0.ɵɵconditional(ctx.ShowChannelBar ? 17 : -1);
|
|
919
1458
|
i0.ɵɵadvance();
|
|
920
|
-
i0.ɵɵ
|
|
921
|
-
i0.ɵɵadvance(4);
|
|
922
|
-
i0.ɵɵrepeater(ctx.Channels);
|
|
923
|
-
i0.ɵɵadvance(4);
|
|
924
|
-
i0.ɵɵclassMap(ctx.IsAdvancedGridView ? "fa-solid fa-stairs" : "fa-solid fa-table-cells");
|
|
1459
|
+
i0.ɵɵconditional(ctx.IsAdvancedGridView ? 18 : 19);
|
|
925
1460
|
i0.ɵɵadvance(2);
|
|
926
|
-
i0.ɵɵ
|
|
927
|
-
i0.ɵɵadvance();
|
|
928
|
-
i0.ɵɵconditional(ctx.EditMode ? 26 : -1);
|
|
929
|
-
i0.ɵɵadvance();
|
|
930
|
-
i0.ɵɵconditional(ctx.IsAdvancedGridView ? 27 : 28);
|
|
931
|
-
} }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.NumberValueAccessor, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.MinValidator, i1.NgModel, i2.MjFormFieldComponent, i2.ExplorerEntityDataGridComponent], styles: [".mjo-pricing-widget-wrap[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n position: relative;\n}\n\n\n\n.mjo-toast[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 16px;\n border-radius: var(--mj-radius-md, 8px);\n font-size: 13px;\n font-weight: 500;\n animation: _ngcontent-%COMP%_mjo-toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n border: 1px solid transparent;\n}\n\n@keyframes _ngcontent-%COMP%_mjo-toast-in {\n from { opacity: 0; transform: translateY(-6px); }\n to { opacity: 1; transform: translateY(0); }\n}\n\n.mjo-toast--success[_ngcontent-%COMP%] {\n background: rgba(22, 163, 74, 0.15);\n border-color: rgba(22, 163, 74, 0.3);\n color: #22c55e;\n}\n\n.mjo-toast--error[_ngcontent-%COMP%] {\n background: rgba(239, 68, 68, 0.15);\n border-color: rgba(239, 68, 68, 0.3);\n color: #f87171;\n}\n\n.mjo-toast--info[_ngcontent-%COMP%] {\n background: rgba(2, 132, 199, 0.15);\n border-color: rgba(2, 132, 199, 0.3);\n color: #38bdf8;\n}\n\n.mjo-toast-left[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.mjo-toast-left[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 16px;\n}\n\n.mjo-toast-msg[_ngcontent-%COMP%] {\n line-height: 1.4;\n}\n\n.mjo-toast-close[_ngcontent-%COMP%] {\n background: transparent;\n border: none;\n color: currentColor;\n opacity: 0.7;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 13px;\n}\n\n.mjo-toast-close[_ngcontent-%COMP%]:hover {\n opacity: 1;\n}\n\n.mjo-pricing-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-card, rgba(255, 255, 255, 0.05));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n border-radius: var(--mj-radius-lg, 10px);\n overflow: hidden;\n}\n\n.mjo-card-header[_ngcontent-%COMP%] {\n padding: 12px 16px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n\n.mjo-card-title[_ngcontent-%COMP%] {\n font-size: 13.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.mjo-card-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-base-pill[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-muted, #64748b);\n}\n\n.mjo-base-pill[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] {\n font-family: var(--mj-font-mono, monospace);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-pricing-fields[_ngcontent-%COMP%] {\n padding: 16px;\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));\n gap: 16px;\n}\n\n\n\n.mjo-channel-bar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n padding: 0 12px;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.mjo-channel-list[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n overflow-x: auto;\n}\n\n.mjo-channel-tab[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 12px 14px;\n background: transparent;\n border: none;\n border-bottom: 2px solid transparent;\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-muted, #94a3b8);\n cursor: pointer;\n transition: all 0.15s ease;\n white-space: nowrap;\n}\n\n.mjo-channel-tab[_ngcontent-%COMP%]:hover {\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-channel-tab.active[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary, #0284c7);\n border-bottom-color: var(--mj-brand-primary, #0284c7);\n background: var(--mj-bg-surface-card, rgba(255, 255, 255, 0.05));\n}\n\n.mjo-channel-count[_ngcontent-%COMP%] {\n font-size: 10px;\n font-weight: 700;\n padding: 2px 6px;\n border-radius: 9999px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.15));\n color: var(--mj-text-secondary, #cbd5e1);\n}\n\n.mjo-channel-tab.active[_ngcontent-%COMP%] .mjo-channel-count[_ngcontent-%COMP%] {\n background: rgba(2, 132, 199, 0.18);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-channel-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.mjo-btn-subtle[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px;\n border-radius: 6px;\n font-size: 11.5px;\n font-weight: 600;\n color: var(--mj-text-primary, #0f172a);\n background: var(--mj-bg-surface-card, rgba(255, 255, 255, 0.05));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mjo-btn-subtle[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-brand-primary, #0284c7);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n\n\n.mjo-ladder-table-wrap[_ngcontent-%COMP%] {\n overflow-x: auto;\n width: 100%;\n}\n\n.mjo-ladder-table[_ngcontent-%COMP%] {\n width: 100%;\n border-collapse: collapse;\n font-size: 13px;\n text-align: left;\n}\n\n.mjo-ladder-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n padding: 10px 14px;\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted, #64748b);\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.05));\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n}\n\n.mjo-ladder-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n padding: 11px 14px;\n border-bottom: 1px solid var(--mj-border-subtle, rgba(255, 255, 255, 0.06));\n color: var(--mj-text-primary, #0f172a);\n vertical-align: middle;\n}\n\n.mjo-ladder-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover, rgba(255, 255, 255, 0.03));\n}\n\n.mjo-tier-title[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-range-pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-family: var(--mj-font-mono, monospace);\n font-weight: 700;\n font-size: 12px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.12));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n}\n\n.mjo-price-input[_ngcontent-%COMP%] {\n font-family: var(--mj-font-mono, monospace);\n font-size: 13.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n border-radius: 6px;\n padding: 5px 8px;\n width: 100px;\n transition: all 0.15s ease;\n}\n\n.mjo-price-input[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--mj-brand-primary, #0284c7);\n box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25);\n}\n\n.mjo-price-val[_ngcontent-%COMP%] {\n font-family: var(--mj-font-mono, monospace);\n font-size: 13px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n display: inline-block;\n padding: 4px 0;\n}\n\n.mjo-disc-tag[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 11px;\n font-weight: 700;\n padding: 2px 7px;\n border-radius: 4px;\n background: rgba(22, 163, 74, 0.15);\n color: #22c55e;\n}\n\n.mjo-standard-tag[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-savings-val[_ngcontent-%COMP%] {\n color: #22c55e;\n font-family: var(--mj-font-mono, monospace);\n font-size: 12.5px;\n}\n\n.mjo-model-tag[_ngcontent-%COMP%] {\n font-size: 11px;\n font-weight: 600;\n padding: 2px 7px;\n border-radius: 4px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n color: var(--mj-text-secondary, #cbd5e1);\n}\n\n.mjo-date-tag[_ngcontent-%COMP%] {\n font-size: 11.5px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-th-num[_ngcontent-%COMP%], .mjo-td-num[_ngcontent-%COMP%] { text-align: left; }\n.mjo-th-actions[_ngcontent-%COMP%], .mjo-td-actions[_ngcontent-%COMP%] { text-align: right; }\n\n.mjo-action-btn[_ngcontent-%COMP%] {\n width: 28px;\n height: 28px;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n background: var(--mj-bg-surface, rgba(255, 255, 255, 0.05));\n color: var(--mj-text-muted, #94a3b8);\n cursor: pointer;\n font-size: 11px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n margin-left: 4px;\n}\n\n.mjo-action-btn[_ngcontent-%COMP%]:hover {\n color: var(--mj-brand-primary, #0284c7);\n border-color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-action-btn--delete[_ngcontent-%COMP%]:hover {\n color: #ef4444;\n border-color: #ef4444;\n}\n\n\n\n.mjo-quick-add-bar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 16px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-top: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.mjo-quick-add-inputs[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-wrap: wrap;\n}\n\n.mjo-quick-add-label[_ngcontent-%COMP%] {\n font-size: 12.5px;\n font-weight: 700;\n color: var(--mj-brand-primary, #0284c7);\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mjo-field-group[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.mjo-sub-label[_ngcontent-%COMP%] {\n font-size: 11.5px;\n font-weight: 600;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-input-num[_ngcontent-%COMP%] {\n width: 65px;\n padding: 5px 8px;\n font-size: 12.5px;\n font-family: var(--mj-font-mono, monospace);\n font-weight: 700;\n text-align: center;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-input-price[_ngcontent-%COMP%] {\n width: 85px;\n padding: 5px 8px;\n font-size: 12.5px;\n font-family: var(--mj-font-mono, monospace);\n font-weight: 700;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-input-select[_ngcontent-%COMP%] {\n padding: 5px 8px;\n font-size: 12px;\n font-weight: 600;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-btn-add[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 14px;\n border-radius: 6px;\n font-size: 12px;\n font-weight: 700;\n color: #ffffff;\n background: #0284c7;\n border: none;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mjo-btn-add[_ngcontent-%COMP%]:hover {\n background: #0369a1;\n}\n\n.mjo-btn-add[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.mjo-guard-badge[_ngcontent-%COMP%] {\n font-size: 11.5px;\n color: #22c55e;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n\n\n.mjo-step-curve-wrap[_ngcontent-%COMP%] {\n padding: 14px 18px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.mjo-step-curve-title[_ngcontent-%COMP%] {\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted, #94a3b8);\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mjo-step-curve-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-step-curve-bars[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-end;\n gap: 12px;\n height: 80px;\n padding-top: 8px;\n}\n\n.mjo-step-col[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n height: 100%;\n justify-content: flex-end;\n}\n\n.mjo-step-track[_ngcontent-%COMP%] {\n width: 100%;\n max-width: 60px;\n height: 100%;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-radius: 4px 4px 0 0;\n display: flex;\n align-items: flex-end;\n}\n\n.mjo-step-fill[_ngcontent-%COMP%] {\n width: 100%;\n border-radius: 4px 4px 0 0;\n background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);\n min-height: 8px;\n transition: height 0.3s ease;\n}\n\n.mjo-step-val[_ngcontent-%COMP%] {\n font-size: 11px;\n font-weight: 700;\n font-family: var(--mj-font-mono, monospace);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-step-label[_ngcontent-%COMP%] {\n font-size: 10px;\n font-family: var(--mj-font-mono, monospace);\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-loading-state[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 30px;\n font-size: 13px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-empty-tiers[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 24px;\n}\n\n.mjo-empty-icon[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: rgba(2, 132, 199, 0.15);\n color: var(--mj-brand-primary, #0284c7);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n}\n\n.mjo-empty-text[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n margin: 0 0 4px 0;\n font-size: 13.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-empty-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 12px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-grid-wrap[_ngcontent-%COMP%] {\n padding: 0;\n min-height: 400px;\n height: 420px;\n}"] });
|
|
1461
|
+
i0.ɵɵconditional(ctx.QuoteDrawerOpen ? 20 : -1);
|
|
1462
|
+
} }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.NumberValueAccessor, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.MinValidator, i1.NgModel, i2.CdkDropList, i2.CdkDrag, i2.CdkDragHandle, i3.ExplorerEntityDataGridComponent, i4.FilterBuilderComponent, i5.DatePipe], styles: [".mjo-pricing-widget-wrap[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n position: relative;\n}\n\n\n\n.mjo-toast[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 16px;\n border-radius: var(--mj-radius-md, 8px);\n font-size: 13px;\n font-weight: 500;\n animation: _ngcontent-%COMP%_mjo-toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n border: 1px solid transparent;\n}\n\n@keyframes _ngcontent-%COMP%_mjo-toast-in {\n from { opacity: 0; transform: translateY(-6px); }\n to { opacity: 1; transform: translateY(0); }\n}\n\n.mjo-toast--success[_ngcontent-%COMP%] {\n background: rgba(22, 163, 74, 0.15);\n border-color: rgba(22, 163, 74, 0.3);\n color: #22c55e;\n}\n\n.mjo-toast--error[_ngcontent-%COMP%] {\n background: rgba(239, 68, 68, 0.15);\n border-color: rgba(239, 68, 68, 0.3);\n color: #f87171;\n}\n\n.mjo-toast--info[_ngcontent-%COMP%] {\n background: rgba(2, 132, 199, 0.15);\n border-color: rgba(2, 132, 199, 0.3);\n color: #38bdf8;\n}\n\n.mjo-toast-left[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.mjo-toast-left[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 16px;\n}\n\n.mjo-toast-msg[_ngcontent-%COMP%] {\n line-height: 1.4;\n}\n\n.mjo-toast-close[_ngcontent-%COMP%] {\n background: transparent;\n border: none;\n color: currentColor;\n opacity: 0.7;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 13px;\n}\n\n.mjo-toast-close[_ngcontent-%COMP%]:hover {\n opacity: 1;\n}\n\n.mjo-pricing-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-card, rgba(255, 255, 255, 0.05));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n border-radius: var(--mj-radius-lg, 10px);\n overflow: hidden;\n}\n\n.mjo-card-header-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n.mjo-card-header[_ngcontent-%COMP%] {\n padding: 12px 16px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n\n.mjo-card-title[_ngcontent-%COMP%] {\n font-size: 13.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.mjo-card-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-base-pill[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-muted, #64748b);\n}\n\n.mjo-base-pill[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] {\n font-family: var(--mj-font-mono, monospace);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-pricing-fields[_ngcontent-%COMP%] {\n padding: 16px;\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));\n gap: 16px;\n}\n\n\n\n.mjo-channel-bar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n padding: 0 12px;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.mjo-channel-list[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n overflow-x: auto;\n}\n\n.mjo-channel-tab[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 12px 14px;\n background: transparent;\n border: none;\n border-bottom: 2px solid transparent;\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-muted, #94a3b8);\n cursor: pointer;\n transition: all 0.15s ease;\n white-space: nowrap;\n}\n\n.mjo-channel-tab[_ngcontent-%COMP%]:hover {\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-channel-tab.active[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary, #0284c7);\n border-bottom-color: var(--mj-brand-primary, #0284c7);\n background: var(--mj-bg-surface-card, rgba(255, 255, 255, 0.05));\n}\n\n.mjo-channel-count[_ngcontent-%COMP%] {\n font-size: 10px;\n font-weight: 700;\n padding: 2px 6px;\n border-radius: 9999px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.15));\n color: var(--mj-text-secondary, #cbd5e1);\n}\n\n.mjo-channel-tab.active[_ngcontent-%COMP%] .mjo-channel-count[_ngcontent-%COMP%] {\n background: rgba(2, 132, 199, 0.18);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-channel-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.mjo-btn-subtle[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px;\n border-radius: 6px;\n font-size: 11.5px;\n font-weight: 600;\n color: var(--mj-text-primary, #0f172a);\n background: var(--mj-bg-surface-card, rgba(255, 255, 255, 0.05));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mjo-btn-subtle[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-brand-primary, #0284c7);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n\n\n.mjo-ladder-table-wrap[_ngcontent-%COMP%] {\n overflow-x: auto;\n width: 100%;\n}\n\n.mjo-ladder-table[_ngcontent-%COMP%] {\n width: 100%;\n border-collapse: collapse;\n font-size: 13px;\n text-align: left;\n}\n\n.mjo-ladder-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n padding: 10px 14px;\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted, #64748b);\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.05));\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n}\n\n.mjo-ladder-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n padding: 11px 14px;\n border-bottom: 1px solid var(--mj-border-subtle, rgba(255, 255, 255, 0.06));\n color: var(--mj-text-primary, #0f172a);\n vertical-align: middle;\n}\n\n.mjo-ladder-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover, rgba(255, 255, 255, 0.03));\n}\n\n.mjo-tier-title[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-range-pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-family: var(--mj-font-mono, monospace);\n font-weight: 700;\n font-size: 12px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.12));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n}\n\n.mjo-price-input[_ngcontent-%COMP%] {\n font-family: var(--mj-font-mono, monospace);\n font-size: 13.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n border-radius: 6px;\n padding: 5px 8px;\n width: 100px;\n transition: all 0.15s ease;\n}\n\n.mjo-price-input[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--mj-brand-primary, #0284c7);\n box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25);\n}\n\n.mjo-price-val[_ngcontent-%COMP%] {\n font-family: var(--mj-font-mono, monospace);\n font-size: 13px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n display: inline-block;\n padding: 4px 0;\n}\n\n.mjo-disc-tag[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 11px;\n font-weight: 700;\n padding: 2px 7px;\n border-radius: 4px;\n background: rgba(22, 163, 74, 0.15);\n color: #22c55e;\n}\n\n.mjo-standard-tag[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-savings-val[_ngcontent-%COMP%] {\n color: #22c55e;\n font-family: var(--mj-font-mono, monospace);\n font-size: 12.5px;\n}\n\n.mjo-model-tag[_ngcontent-%COMP%] {\n font-size: 11px;\n font-weight: 600;\n padding: 2px 7px;\n border-radius: 4px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n color: var(--mj-text-secondary, #cbd5e1);\n}\n\n.mjo-date-tag[_ngcontent-%COMP%] {\n font-size: 11.5px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-th-num[_ngcontent-%COMP%], .mjo-td-num[_ngcontent-%COMP%] { text-align: left; }\n.mjo-th-actions[_ngcontent-%COMP%], .mjo-td-actions[_ngcontent-%COMP%] { text-align: right; }\n\n.mjo-action-btn[_ngcontent-%COMP%] {\n width: 28px;\n height: 28px;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n background: var(--mj-bg-surface, rgba(255, 255, 255, 0.05));\n color: var(--mj-text-muted, #94a3b8);\n cursor: pointer;\n font-size: 11px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n margin-left: 4px;\n}\n\n.mjo-action-btn[_ngcontent-%COMP%]:hover {\n color: var(--mj-brand-primary, #0284c7);\n border-color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-action-btn--delete[_ngcontent-%COMP%]:hover {\n color: #ef4444;\n border-color: #ef4444;\n}\n\n\n\n.mjo-quick-add-bar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 16px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-top: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.mjo-quick-add-inputs[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-wrap: wrap;\n}\n\n.mjo-quick-add-label[_ngcontent-%COMP%] {\n font-size: 12.5px;\n font-weight: 700;\n color: var(--mj-brand-primary, #0284c7);\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mjo-field-group[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.mjo-sub-label[_ngcontent-%COMP%] {\n font-size: 11.5px;\n font-weight: 600;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-input-num[_ngcontent-%COMP%] {\n width: 65px;\n padding: 5px 8px;\n font-size: 12.5px;\n font-family: var(--mj-font-mono, monospace);\n font-weight: 700;\n text-align: center;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-input-price[_ngcontent-%COMP%] {\n width: 85px;\n padding: 5px 8px;\n font-size: 12.5px;\n font-family: var(--mj-font-mono, monospace);\n font-weight: 700;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-input-select[_ngcontent-%COMP%] {\n padding: 5px 8px;\n font-size: 12px;\n font-weight: 600;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-btn-add[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 14px;\n border-radius: 6px;\n font-size: 12px;\n font-weight: 700;\n color: #ffffff;\n background: #0284c7;\n border: none;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mjo-btn-add[_ngcontent-%COMP%]:hover {\n background: #0369a1;\n}\n\n.mjo-btn-add[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.mjo-guard-badge[_ngcontent-%COMP%] {\n font-size: 11.5px;\n color: #22c55e;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n\n\n.mjo-step-curve-wrap[_ngcontent-%COMP%] {\n padding: 14px 18px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.mjo-step-curve-title[_ngcontent-%COMP%] {\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted, #94a3b8);\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mjo-step-curve-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-step-curve-bars[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-end;\n gap: 12px;\n height: 80px;\n padding-top: 8px;\n}\n\n.mjo-step-col[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n height: 100%;\n justify-content: flex-end;\n}\n\n.mjo-step-track[_ngcontent-%COMP%] {\n width: 100%;\n max-width: 60px;\n height: 100%;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-radius: 4px 4px 0 0;\n display: flex;\n align-items: flex-end;\n}\n\n.mjo-step-fill[_ngcontent-%COMP%] {\n width: 100%;\n border-radius: 4px 4px 0 0;\n background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);\n min-height: 8px;\n transition: height 0.3s ease;\n}\n\n.mjo-step-val[_ngcontent-%COMP%] {\n font-size: 11px;\n font-weight: 700;\n font-family: var(--mj-font-mono, monospace);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-step-label[_ngcontent-%COMP%] {\n font-size: 10px;\n font-family: var(--mj-font-mono, monospace);\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-loading-state[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 30px;\n font-size: 13px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-empty-tiers[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 24px;\n}\n\n.mjo-empty-icon[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: rgba(2, 132, 199, 0.15);\n color: var(--mj-brand-primary, #0284c7);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n}\n\n.mjo-empty-text[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n margin: 0 0 4px 0;\n font-size: 13.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-empty-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 12px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-grid-wrap[_ngcontent-%COMP%] {\n padding: 0;\n min-height: 400px;\n height: 420px;\n}\n\n.mjo-price-list[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 12px 14px 16px;\n}\n\n.mjo-offer[_ngcontent-%COMP%] {\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n border-radius: 12px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.12));\n overflow: hidden;\n}\n\n.mjo-offer.selected[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary, #38bdf8);\n box-shadow: inset 0 0 0 1px var(--mj-brand-primary, #38bdf8);\n}\n\n.mjo-offer-grip[_ngcontent-%COMP%] {\n color: var(--mj-text-muted, #94a3b8);\n cursor: grab;\n padding: 0 4px 0 0;\n display: inline-flex;\n}\n\n.mjo-offer-h[_ngcontent-%COMP%] {\n width: 100%;\n display: grid;\n grid-template-columns: 108px 1fr auto;\n gap: 14px;\n align-items: center;\n padding: 12px 14px;\n border: 0;\n background: transparent;\n color: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.mjo-offer-h[_ngcontent-%COMP%]:has(.mjo-offer-grip) {\n grid-template-columns: 18px 108px 1fr auto;\n}\n\n.mjo-offer-h[_ngcontent-%COMP%]:hover {\n background: color-mix(in srgb, var(--mj-brand-primary, #0076b6) 8%, transparent);\n}\n\n.mjo-offer-amt[_ngcontent-%COMP%] {\n font-variant-numeric: tabular-nums;\n font-weight: 700;\n font-size: 18px;\n letter-spacing: -0.02em;\n text-align: left;\n}\n\n.mjo-offer-copy[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.mjo-offer-name[_ngcontent-%COMP%] {\n font-weight: 700;\n font-size: 14px;\n}\n\n.mjo-offer-when[_ngcontent-%COMP%] {\n font-size: 12.5px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-offer-from[_ngcontent-%COMP%] {\n font-size: 11px;\n font-weight: 700;\n color: var(--mj-status-success-text, #86efac);\n white-space: nowrap;\n}\n\n.mjo-offer-body[_ngcontent-%COMP%] {\n padding: 0 14px 14px;\n border-top: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n}\n\n.mjo-when-read[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n padding-top: 12px;\n font-size: 13px;\n color: var(--mj-text-secondary, #cbd5e1);\n}\n\n.mjo-when-edit[_ngcontent-%COMP%] {\n padding-top: 12px;\n}\n\n.mjo-when-actions[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n margin-top: 10px;\n}\n\n.mjo-quote-scrim[_ngcontent-%COMP%] {\n position: fixed;\n inset: 0;\n background: rgba(2, 6, 23, 0.55);\n z-index: 40;\n}\n\n.mjo-quote-drawer[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n right: 0;\n height: 100vh;\n width: min(420px, 100vw);\n background: var(--mj-bg-page, #0f172a);\n border-left: 1px solid var(--mj-border-default, #334155);\n z-index: 50;\n padding: 20px 18px;\n box-shadow: -16px 0 40px rgba(0, 0, 0, 0.35);\n}\n\n.mjo-quote-drawer-h[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 8px;\n}\n\n.mjo-quote-drawer[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 16px;\n}\n\n.mjo-quote-lede[_ngcontent-%COMP%] {\n color: var(--mj-text-muted, #94a3b8);\n font-size: 12.5px;\n margin: 0 0 16px;\n}\n\n.mjo-quote-amt[_ngcontent-%COMP%] {\n font-size: 28px;\n font-weight: 700;\n letter-spacing: -0.02em;\n margin: 16px 0 6px;\n}\n\n.mjo-quote-why[_ngcontent-%COMP%] {\n font-size: 13px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-offer.inherited[_ngcontent-%COMP%] {\n border-style: dashed;\n}\n\n.mjo-offer-from.inherited[_ngcontent-%COMP%] {\n color: #a78bfa;\n}\n\n.mjo-offer-fields[_ngcontent-%COMP%], \n.mjo-adv-grid[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n padding-top: 12px;\n}\n\n.mjo-input-text[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.2));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n color: inherit;\n border-radius: 8px;\n padding: 6px 8px;\n min-width: 120px;\n}\n\n.mjo-when-title[_ngcontent-%COMP%] {\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.05em;\n text-transform: uppercase;\n color: var(--mj-text-muted, #94a3b8);\n margin-bottom: 8px;\n}\n\n.mjo-when-rule[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 1fr 1fr 110px 1fr;\n gap: 6px;\n}\n\n.mjo-when-rule[_ngcontent-%COMP%] select[_ngcontent-%COMP%], \n.mjo-when-rule[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.2));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n color: inherit;\n border-radius: 8px;\n padding: 6px 8px;\n}\n\n.mjo-inherit-note[_ngcontent-%COMP%] {\n font-size: 12.5px;\n color: var(--mj-text-muted, #94a3b8);\n margin: 12px 0 0;\n}\n\n.mjo-adv[_ngcontent-%COMP%] {\n margin-top: 10px;\n font-size: 12px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-adv-read[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 10px 16px;\n padding-top: 4px;\n font-size: 13px;\n color: var(--mj-text-secondary, #cbd5e1);\n}"] });
|
|
932
1463
|
}
|
|
933
1464
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BizAppsProductPricingWidgetComponent, [{
|
|
934
1465
|
type: Component,
|
|
935
|
-
args: [{ standalone: false, selector: 'bizapps-product-pricing-widget', template: "<div class=\"mjo-pricing-widget-wrap\">\n <!-- Toast Notification Banner -->\n @if (ActiveToast) {\n <div class=\"mjo-toast\" [class]=\"'mjo-toast--' + ActiveToast.Type\">\n <div class=\"mjo-toast-left\">\n <i [class]=\"ActiveToast.Icon\"></i>\n <span class=\"mjo-toast-msg\">{{ ActiveToast.Message }}</span>\n </div>\n <button type=\"button\" class=\"mjo-toast-close\" (click)=\"DismissToast()\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n }\n\n <!-- 1. Top Commercial Parameters Card -->\n <div class=\"mjo-pricing-card\">\n <div class=\"mjo-card-header\">\n <div class=\"mjo-card-title\">\n <i class=\"fa-solid fa-calculator\"></i>\n <span>Base Commercial Terms & ASC 606 Allocation</span>\n </div>\n <div class=\"mjo-base-pill\">\n Base List: <strong>{{ FormattedBasePrice }}</strong>\n </div>\n </div>\n <div class=\"mjo-pricing-fields\">\n <mj-form-field \n [Record]=\"Product\"\n [ShowLabel]=\"true\"\n FieldName=\"StandaloneSellingPrice\"\n Type=\"numerictextbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"FormContext\"\n (Navigate)=\"Navigate.emit($event)\">\n </mj-form-field>\n <mj-form-field \n [Record]=\"Product\"\n [ShowLabel]=\"true\"\n FieldName=\"RevenueRecognitionTypeID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"FormContext\"\n LinkType=\"Record\"\n (Navigate)=\"Navigate.emit($event)\">\n </mj-form-field>\n <mj-form-field \n [Record]=\"Product\"\n [ShowLabel]=\"true\"\n FieldName=\"IsTaxable\"\n Type=\"checkbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"FormContext\"\n (Navigate)=\"Navigate.emit($event)\">\n </mj-form-field>\n </div>\n </div>\n\n <!-- 2. Channel Segments & Volume Ladder Card -->\n <div class=\"mjo-pricing-card\">\n <!-- Channel Segment Tabs Header -->\n <div class=\"mjo-channel-bar\">\n <div class=\"mjo-channel-list\">\n @for (ch of Channels; track ch.ID) {\n <button \n type=\"button\" \n class=\"mjo-channel-tab\" \n [class.active]=\"SelectedChannelID === ch.ID\"\n (click)=\"SelectChannel(ch.ID)\">\n <i [class]=\"ch.Icon\"></i>\n <span>{{ ch.Name }}</span>\n <span class=\"mjo-channel-count\">{{ ch.TierCount }} {{ ch.TierCount === 1 ? 'Tier' : 'Tiers' }}</span>\n </button>\n }\n </div>\n\n <div class=\"mjo-channel-actions\">\n <button type=\"button\" class=\"mjo-btn-subtle\" (click)=\"ToggleAdvancedView()\">\n <i [class]=\"IsAdvancedGridView ? 'fa-solid fa-stairs' : 'fa-solid fa-table-cells'\"></i>\n <span>{{ IsAdvancedGridView ? 'View Quick Ladder' : 'Advanced Grid View' }}</span>\n </button>\n @if (EditMode) {\n <button type=\"button\" class=\"mjo-btn-subtle\" (click)=\"OpenNewPriceDialog()\">\n <i class=\"fa-solid fa-plus\"></i>\n <span>Add Channel / Rule</span>\n </button>\n }\n </div>\n </div>\n\n @if (IsAdvancedGridView) {\n <!-- Full Advanced Entity Data Grid View -->\n @if (ProductPricesViewParams) {\n <div class=\"mjo-grid-wrap\">\n <mj-explorer-entity-data-grid\n [Params]=\"ProductPricesViewParams\"\n [NewRecordValues]=\"NewPriceRecordValues\"\n [Height]=\"420\"\n [AllowLoad]=\"true\"\n [ShowToolbar]=\"true\"\n [ShowNewButton]=\"EditMode\"\n [ShowDeleteButton]=\"EditMode\"\n (Navigate)=\"Navigate.emit($event)\">\n </mj-explorer-entity-data-grid>\n </div>\n }\n } @else {\n <!-- Option 1: Quick Tier Ladder View -->\n @if (IsLoading) {\n <div class=\"mjo-loading-state\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Loading price tiers\u2026</span>\n </div>\n } @else if (LadderTiers.length === 0) {\n <div class=\"mjo-empty-tiers\">\n <div class=\"mjo-empty-icon\"><i class=\"fa-solid fa-tags\"></i></div>\n <div class=\"mjo-empty-text\">\n <h4>No Pricing Tiers Configured for this Channel</h4>\n <p>\n @if (EditMode) {\n Use the Quick Bracket builder below to add volume-discounted pricing.\n } @else {\n Switch to Edit mode to configure pricing tiers and volume discounts.\n }\n </p>\n </div>\n </div>\n } @else {\n <div class=\"mjo-ladder-table-wrap\">\n <table class=\"mjo-ladder-table\">\n <thead>\n <tr>\n <th>Tier Bracket</th>\n <th>Unit Range</th>\n <th class=\"mjo-th-num\">Unit Price ($)</th>\n <th>Discount vs Base</th>\n <th>Unit Savings</th>\n <th>Model</th>\n <th>Status / Dates</th>\n <th class=\"mjo-th-actions\">Actions</th>\n </tr>\n </thead>\n <tbody>\n @for (tier of LadderTiers; track tier.ID) {\n <tr>\n <td>\n <strong class=\"mjo-tier-title\">{{ tier.BracketLabel }}</strong>\n </td>\n <td>\n <span class=\"mjo-range-pill\">{{ tier.UnitRangeText }}</span>\n </td>\n <td class=\"mjo-td-num\">\n @if (EditMode) {\n <input \n type=\"text\" \n class=\"mjo-price-input\" \n [value]=\"FormatCurrency(tier.Amount)\"\n (blur)=\"OnPriceInputBlur(tier, $event)\"\n [title]=\"'Edit price for ' + tier.BracketLabel\">\n } @else {\n <strong class=\"mjo-price-val\">{{ FormatCurrency(tier.Amount) }}</strong>\n }\n </td>\n <td>\n @if (tier.DiscountPercent > 0) {\n <span class=\"mjo-disc-tag\">\n <i class=\"fa-solid fa-arrow-down\"></i> {{ tier.DiscountPercent }}% off\n </span>\n } @else {\n <span class=\"mjo-standard-tag\">Standard Base</span>\n }\n </td>\n <td>\n @if (tier.UnitSavings > 0) {\n <strong class=\"mjo-savings-val\">{{ FormatCurrency(tier.UnitSavings) }} / unit</strong>\n } @else {\n <span style=\"color: var(--mj-text-muted, #94a3b8);\">$0.00</span>\n }\n </td>\n <td>\n <span class=\"mjo-model-tag\">{{ tier.PricingModel }}</span>\n </td>\n <td>\n <span class=\"mjo-date-tag\">{{ tier.EffectiveDatesText }}</span>\n </td>\n <td class=\"mjo-td-actions\">\n <button \n type=\"button\" \n class=\"mjo-action-btn\" \n title=\"Open full price rule\" \n (click)=\"OpenTierRecord(tier)\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\"></i>\n </button>\n @if (EditMode && !tier.IsBaseBracket) {\n <button \n type=\"button\" \n class=\"mjo-action-btn mjo-action-btn--delete\" \n title=\"Delete tier\" \n (click)=\"DeleteTier(tier)\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n\n <!-- Quick Add Tier Bracket Bar (Only active when EditMode is true) -->\n @if (EditMode) {\n <div class=\"mjo-quick-add-bar\">\n <div class=\"mjo-quick-add-inputs\">\n <span class=\"mjo-quick-add-label\">\n <i class=\"fa-solid fa-plus-circle\"></i> Add Volume Tier:\n </span>\n <label class=\"mjo-field-group\">\n <span class=\"mjo-sub-label\">Min:</span>\n <input \n type=\"number\" \n class=\"mjo-input-num\" \n [(ngModel)]=\"NewTierMin\" \n min=\"1\">\n </label>\n <label class=\"mjo-field-group\">\n <span class=\"mjo-sub-label\">Max:</span>\n <input \n type=\"number\" \n class=\"mjo-input-num\" \n [(ngModel)]=\"NewTierMax\" \n placeholder=\"\u221E\">\n </label>\n <label class=\"mjo-field-group\">\n <span class=\"mjo-sub-label\">Price ($):</span>\n <input \n type=\"number\" \n class=\"mjo-input-price\" \n [(ngModel)]=\"NewTierPrice\" \n min=\"0\" \n step=\"0.01\">\n </label>\n <label class=\"mjo-field-group\">\n <span class=\"mjo-sub-label\">Model:</span>\n <select class=\"mjo-input-select\" [(ngModel)]=\"NewTierModel\">\n <option value=\"Volume\">Volume</option>\n <option value=\"PerUnit\">PerUnit</option>\n <option value=\"Tiered\">Tiered</option>\n <option value=\"Flat\">Flat</option>\n </select>\n </label>\n <button \n type=\"button\" \n class=\"mjo-btn-add\" \n [disabled]=\"IsSaving\" \n (click)=\"AddTierBracket()\">\n @if (IsSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Saving\u2026</span>\n } @else {\n <i class=\"fa-solid fa-plus\"></i>\n <span>Add Bracket</span>\n }\n </button>\n </div>\n\n <div class=\"mjo-guard-badge\">\n <i class=\"fa-solid fa-shield-halved\"></i>\n <span>Gap & overlap protection active</span>\n </div>\n </div>\n }\n\n <!-- Volume Step Curve Diagram -->\n @if (StepBars.length > 0) {\n <div class=\"mjo-step-curve-wrap\">\n <div class=\"mjo-step-curve-title\">\n <i class=\"fa-solid fa-chart-simple\"></i>\n <span>Live Volume Step Curve (Base vs Tiers)</span>\n </div>\n <div class=\"mjo-step-curve-bars\">\n @for (bar of StepBars; track bar.Label) {\n <div class=\"mjo-step-col\">\n <span class=\"mjo-step-val\">{{ bar.FormattedAmount }}</span>\n <div class=\"mjo-step-track\">\n <div class=\"mjo-step-fill\" [style.height.%]=\"bar.Percentage\"></div>\n </div>\n <span class=\"mjo-step-label\">{{ bar.Label }} units</span>\n </div>\n }\n </div>\n </div>\n }\n }\n </div>\n</div>\n", styles: [".mjo-pricing-widget-wrap {\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n position: relative;\n}\n\n/* In-Widget Toast Notification */\n.mjo-toast {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 16px;\n border-radius: var(--mj-radius-md, 8px);\n font-size: 13px;\n font-weight: 500;\n animation: mjo-toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n border: 1px solid transparent;\n}\n\n@keyframes mjo-toast-in {\n from { opacity: 0; transform: translateY(-6px); }\n to { opacity: 1; transform: translateY(0); }\n}\n\n.mjo-toast--success {\n background: rgba(22, 163, 74, 0.15);\n border-color: rgba(22, 163, 74, 0.3);\n color: #22c55e;\n}\n\n.mjo-toast--error {\n background: rgba(239, 68, 68, 0.15);\n border-color: rgba(239, 68, 68, 0.3);\n color: #f87171;\n}\n\n.mjo-toast--info {\n background: rgba(2, 132, 199, 0.15);\n border-color: rgba(2, 132, 199, 0.3);\n color: #38bdf8;\n}\n\n.mjo-toast-left {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.mjo-toast-left i {\n font-size: 16px;\n}\n\n.mjo-toast-msg {\n line-height: 1.4;\n}\n\n.mjo-toast-close {\n background: transparent;\n border: none;\n color: currentColor;\n opacity: 0.7;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 13px;\n}\n\n.mjo-toast-close:hover {\n opacity: 1;\n}\n\n.mjo-pricing-card {\n background: var(--mj-bg-surface-card, rgba(255, 255, 255, 0.05));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n border-radius: var(--mj-radius-lg, 10px);\n overflow: hidden;\n}\n\n.mjo-card-header {\n padding: 12px 16px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n\n.mjo-card-title {\n font-size: 13.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.mjo-card-title i {\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-base-pill {\n font-size: 12px;\n color: var(--mj-text-muted, #64748b);\n}\n\n.mjo-base-pill strong {\n font-family: var(--mj-font-mono, monospace);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-pricing-fields {\n padding: 16px;\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));\n gap: 16px;\n}\n\n/* Channel Tabs Header */\n.mjo-channel-bar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n padding: 0 12px;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.mjo-channel-list {\n display: flex;\n align-items: center;\n gap: 4px;\n overflow-x: auto;\n}\n\n.mjo-channel-tab {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 12px 14px;\n background: transparent;\n border: none;\n border-bottom: 2px solid transparent;\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-muted, #94a3b8);\n cursor: pointer;\n transition: all 0.15s ease;\n white-space: nowrap;\n}\n\n.mjo-channel-tab:hover {\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-channel-tab.active {\n color: var(--mj-brand-primary, #0284c7);\n border-bottom-color: var(--mj-brand-primary, #0284c7);\n background: var(--mj-bg-surface-card, rgba(255, 255, 255, 0.05));\n}\n\n.mjo-channel-count {\n font-size: 10px;\n font-weight: 700;\n padding: 2px 6px;\n border-radius: 9999px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.15));\n color: var(--mj-text-secondary, #cbd5e1);\n}\n\n.mjo-channel-tab.active .mjo-channel-count {\n background: rgba(2, 132, 199, 0.18);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-channel-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.mjo-btn-subtle {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px;\n border-radius: 6px;\n font-size: 11.5px;\n font-weight: 600;\n color: var(--mj-text-primary, #0f172a);\n background: var(--mj-bg-surface-card, rgba(255, 255, 255, 0.05));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mjo-btn-subtle:hover {\n border-color: var(--mj-brand-primary, #0284c7);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n/* Tier Ladder Table */\n.mjo-ladder-table-wrap {\n overflow-x: auto;\n width: 100%;\n}\n\n.mjo-ladder-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 13px;\n text-align: left;\n}\n\n.mjo-ladder-table th {\n padding: 10px 14px;\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted, #64748b);\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.05));\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n}\n\n.mjo-ladder-table td {\n padding: 11px 14px;\n border-bottom: 1px solid var(--mj-border-subtle, rgba(255, 255, 255, 0.06));\n color: var(--mj-text-primary, #0f172a);\n vertical-align: middle;\n}\n\n.mjo-ladder-table tr:hover {\n background: var(--mj-bg-surface-hover, rgba(255, 255, 255, 0.03));\n}\n\n.mjo-tier-title {\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-range-pill {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-family: var(--mj-font-mono, monospace);\n font-weight: 700;\n font-size: 12px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.12));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n}\n\n.mjo-price-input {\n font-family: var(--mj-font-mono, monospace);\n font-size: 13.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n border-radius: 6px;\n padding: 5px 8px;\n width: 100px;\n transition: all 0.15s ease;\n}\n\n.mjo-price-input:focus {\n outline: none;\n border-color: var(--mj-brand-primary, #0284c7);\n box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25);\n}\n\n.mjo-price-val {\n font-family: var(--mj-font-mono, monospace);\n font-size: 13px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n display: inline-block;\n padding: 4px 0;\n}\n\n.mjo-disc-tag {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 11px;\n font-weight: 700;\n padding: 2px 7px;\n border-radius: 4px;\n background: rgba(22, 163, 74, 0.15);\n color: #22c55e;\n}\n\n.mjo-standard-tag {\n font-size: 11px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-savings-val {\n color: #22c55e;\n font-family: var(--mj-font-mono, monospace);\n font-size: 12.5px;\n}\n\n.mjo-model-tag {\n font-size: 11px;\n font-weight: 600;\n padding: 2px 7px;\n border-radius: 4px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n color: var(--mj-text-secondary, #cbd5e1);\n}\n\n.mjo-date-tag {\n font-size: 11.5px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-th-num, .mjo-td-num { text-align: left; }\n.mjo-th-actions, .mjo-td-actions { text-align: right; }\n\n.mjo-action-btn {\n width: 28px;\n height: 28px;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n background: var(--mj-bg-surface, rgba(255, 255, 255, 0.05));\n color: var(--mj-text-muted, #94a3b8);\n cursor: pointer;\n font-size: 11px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n margin-left: 4px;\n}\n\n.mjo-action-btn:hover {\n color: var(--mj-brand-primary, #0284c7);\n border-color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-action-btn--delete:hover {\n color: #ef4444;\n border-color: #ef4444;\n}\n\n/* 1-Click Quick Add Bar */\n.mjo-quick-add-bar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 16px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-top: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.mjo-quick-add-inputs {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-wrap: wrap;\n}\n\n.mjo-quick-add-label {\n font-size: 12.5px;\n font-weight: 700;\n color: var(--mj-brand-primary, #0284c7);\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mjo-field-group {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.mjo-sub-label {\n font-size: 11.5px;\n font-weight: 600;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-input-num {\n width: 65px;\n padding: 5px 8px;\n font-size: 12.5px;\n font-family: var(--mj-font-mono, monospace);\n font-weight: 700;\n text-align: center;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-input-price {\n width: 85px;\n padding: 5px 8px;\n font-size: 12.5px;\n font-family: var(--mj-font-mono, monospace);\n font-weight: 700;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-input-select {\n padding: 5px 8px;\n font-size: 12px;\n font-weight: 600;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-btn-add {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 14px;\n border-radius: 6px;\n font-size: 12px;\n font-weight: 700;\n color: #ffffff;\n background: #0284c7;\n border: none;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mjo-btn-add:hover {\n background: #0369a1;\n}\n\n.mjo-btn-add:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.mjo-guard-badge {\n font-size: 11.5px;\n color: #22c55e;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n/* Volume Step Curve Diagram */\n.mjo-step-curve-wrap {\n padding: 14px 18px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.mjo-step-curve-title {\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted, #94a3b8);\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mjo-step-curve-title i {\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-step-curve-bars {\n display: flex;\n align-items: flex-end;\n gap: 12px;\n height: 80px;\n padding-top: 8px;\n}\n\n.mjo-step-col {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n height: 100%;\n justify-content: flex-end;\n}\n\n.mjo-step-track {\n width: 100%;\n max-width: 60px;\n height: 100%;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-radius: 4px 4px 0 0;\n display: flex;\n align-items: flex-end;\n}\n\n.mjo-step-fill {\n width: 100%;\n border-radius: 4px 4px 0 0;\n background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);\n min-height: 8px;\n transition: height 0.3s ease;\n}\n\n.mjo-step-val {\n font-size: 11px;\n font-weight: 700;\n font-family: var(--mj-font-mono, monospace);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-step-label {\n font-size: 10px;\n font-family: var(--mj-font-mono, monospace);\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-loading-state {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 30px;\n font-size: 13px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-empty-tiers {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 24px;\n}\n\n.mjo-empty-icon {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: rgba(2, 132, 199, 0.15);\n color: var(--mj-brand-primary, #0284c7);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n}\n\n.mjo-empty-text h4 {\n margin: 0 0 4px 0;\n font-size: 13.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-empty-text p {\n margin: 0;\n font-size: 12px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-grid-wrap {\n padding: 0;\n min-height: 400px;\n height: 420px;\n}\n"] }]
|
|
1466
|
+
args: [{ standalone: false, selector: 'bizapps-product-pricing-widget', template: "<div class=\"mjo-pricing-widget-wrap\">\n @if (ActiveToast) {\n <div class=\"mjo-toast\" [class]=\"'mjo-toast--' + ActiveToast.Type\">\n <div class=\"mjo-toast-left\">\n <i [class]=\"ActiveToast.Icon\"></i>\n <span class=\"mjo-toast-msg\">{{ ActiveToast.Message }}</span>\n </div>\n <button type=\"button\" class=\"mjo-toast-close\" (click)=\"DismissToast()\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n }\n\n <div class=\"mjo-pricing-card\">\n <div class=\"mjo-card-header\">\n <div class=\"mjo-card-title\">\n <i class=\"fa-solid fa-tags\"></i>\n <span>Prices</span>\n </div>\n <div class=\"mjo-card-header-actions\">\n <button type=\"button\" class=\"mjo-btn-subtle\" (click)=\"OpenQuote()\">\n <i class=\"fa-solid fa-flask\"></i>\n <span>Test a quote</span>\n </button>\n <button type=\"button\" class=\"mjo-btn-subtle\" (click)=\"ToggleAdvancedView()\">\n <i [class]=\"IsAdvancedGridView ? 'fa-solid fa-tags' : 'fa-solid fa-table-cells'\"></i>\n <span>{{ IsAdvancedGridView ? 'Prices' : 'Advanced grid' }}</span>\n </button>\n </div>\n </div>\n\n @if (ShowChannelBar) {\n <div class=\"mjo-channel-bar\">\n <div class=\"mjo-channel-list\">\n @for (ch of Channels; track ch.ID) {\n <button\n type=\"button\"\n class=\"mjo-channel-tab\"\n [class.active]=\"SelectedChannelID === ch.ID\"\n (click)=\"SelectChannel(ch.ID)\">\n <i [class]=\"ch.Icon\"></i>\n <span>{{ ch.Name }}</span>\n <span class=\"mjo-channel-count\">{{ ch.TierCount }} {{ ch.TierCount === 1 ? 'price' : 'prices' }}</span>\n </button>\n }\n </div>\n </div>\n }\n\n @if (IsAdvancedGridView) {\n @if (ProductPricesViewParams) {\n <div class=\"mjo-grid-wrap\">\n <mj-explorer-entity-data-grid\n [Params]=\"ProductPricesViewParams\"\n [NewRecordValues]=\"NewPriceRecordValues\"\n [Height]=\"420\"\n [AllowLoad]=\"true\"\n [ShowToolbar]=\"true\"\n [ShowNewButton]=\"EditMode\"\n [ShowDeleteButton]=\"EditMode\"\n (Navigate)=\"Navigate.emit($event)\">\n </mj-explorer-entity-data-grid>\n </div>\n }\n } @else {\n @if (IsLoading) {\n <div class=\"mjo-loading-state\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Loading prices\u2026</span>\n </div>\n } @else if (VisiblePrices.length === 0) {\n <div class=\"mjo-empty-tiers\">\n <div class=\"mjo-empty-icon\"><i class=\"fa-solid fa-tags\"></i></div>\n <div class=\"mjo-empty-text\">\n <h4>No prices on this channel</h4>\n <p>\n @if (EditMode) {\n Add a price. When is optional \u2014 only if this rate is not for everyone.\n } @else {\n Switch to Edit to add prices.\n }\n </p>\n </div>\n </div>\n } @else {\n <div\n class=\"mjo-price-list\"\n cdkDropList\n [cdkDropListDisabled]=\"!EditMode\"\n (cdkDropListDropped)=\"OnPriceDrop($event)\">\n @for (row of VisiblePrices; track row.ID) {\n <article\n class=\"mjo-offer\"\n cdkDrag\n [cdkDragDisabled]=\"!EditMode || row.Inherited\"\n [class.open]=\"ExpandedPriceID === row.ID && PriceCanExpand(row)\"\n [class.selected]=\"SelectedPriceID === row.ID\"\n [class.inherited]=\"row.Inherited\">\n <button type=\"button\" class=\"mjo-offer-h\" (click)=\"TogglePrice(row)\">\n @if (EditMode && !row.Inherited) {\n <span class=\"mjo-offer-grip\" cdkDragHandle title=\"Drag to change rank\">\n <i class=\"fa-solid fa-grip-vertical\"></i>\n </span>\n }\n <span class=\"mjo-offer-amt\">{{ FormatCurrency(row.Amount) }}</span>\n <span class=\"mjo-offer-copy\">\n <span class=\"mjo-offer-name\">{{ row.Name }}</span>\n @if (row.WhenText) {\n <span class=\"mjo-offer-when\">{{ row.WhenText }}</span>\n }\n </span>\n <span class=\"mjo-offer-from\" [class.inherited]=\"row.Inherited\">{{ row.SourceLabel }}</span>\n </button>\n @if (ExpandedPriceID === row.ID && PriceCanExpand(row)) {\n <div class=\"mjo-offer-body\" (click)=\"$event.stopPropagation()\">\n @if (row.Inherited) {\n <p class=\"mjo-inherit-note\">\n Inherited. A price with this name on the product replaces it.\n @if (EditMode) {\n <button type=\"button\" class=\"mjo-btn-subtle\" (click)=\"OverrideInherited(row)\">Override on this product</button>\n }\n </p>\n } @else {\n @if (EditMode) {\n <div class=\"mjo-offer-fields\">\n <label class=\"mjo-field-group\">\n <span class=\"mjo-sub-label\">Name</span>\n <input class=\"mjo-input-text\" [(ngModel)]=\"row.Record.Name\" (blur)=\"SavePrice(row.Record)\">\n </label>\n <label class=\"mjo-field-group\">\n <span class=\"mjo-sub-label\">Amount</span>\n <input type=\"number\" class=\"mjo-input-price\" [(ngModel)]=\"row.Record.Amount\" min=\"0\" step=\"0.01\" (blur)=\"SavePrice(row.Record)\">\n </label>\n <label class=\"mjo-field-group\">\n <span class=\"mjo-sub-label\">Model</span>\n <select class=\"mjo-input-select\" [(ngModel)]=\"row.Record.PricingModel\" (change)=\"SavePrice(row.Record)\">\n <option value=\"PerUnit\">Per unit</option>\n <option value=\"Package\">Package</option>\n <option value=\"Volume\">Volume</option>\n <option value=\"Flat\">Flat</option>\n </select>\n </label>\n </div>\n }\n @if (EditMode && row.WhenText && WhenEditorPriceID !== row.ID) {\n <div class=\"mjo-when-read\">\n <button type=\"button\" class=\"mjo-btn-subtle\" (click)=\"OpenWhenEditor(row)\">Edit When</button>\n </div>\n } @else if (EditMode && WhenEditorPriceID !== row.ID) {\n <button type=\"button\" class=\"mjo-btn-subtle\" (click)=\"OpenWhenEditor(row)\">+ When</button>\n }\n @if (EditMode && WhenEditorPriceID === row.ID) {\n <div class=\"mjo-when-edit\">\n <div class=\"mjo-when-title\">When this price applies</div>\n <mj-filter-builder\n [fields]=\"WhenFields\"\n [filter]=\"WhenFilter\"\n [showSummary]=\"true\"\n (filterChange)=\"OnWhenFilterChange($event)\">\n </mj-filter-builder>\n <div class=\"mjo-when-actions\">\n <button type=\"button\" class=\"mjo-btn-subtle\" (click)=\"ClearWhen(row)\">Remove When</button>\n <button type=\"button\" class=\"mjo-btn-subtle\" (click)=\"CloseWhenEditor()\">Cancel</button>\n <button type=\"button\" class=\"mjo-btn-add\" (click)=\"SaveWhen(row)\">Save When</button>\n </div>\n </div>\n }\n @if (HasAdvanced(row.Record) || AdvancedEditingID === row.ID) {\n <div class=\"mjo-adv\">\n <div class=\"mjo-when-title\">Qty, dates, fee</div>\n @if (EditMode) {\n <div class=\"mjo-adv-grid\">\n <label class=\"mjo-field-group\"><span class=\"mjo-sub-label\">Min qty</span>\n <input type=\"number\" class=\"mjo-input-num\" [(ngModel)]=\"row.Record.MinQuantity\" (blur)=\"SavePrice(row.Record)\">\n </label>\n <label class=\"mjo-field-group\"><span class=\"mjo-sub-label\">Max qty</span>\n <input type=\"number\" class=\"mjo-input-num\" [(ngModel)]=\"row.Record.MaxQuantity\" (blur)=\"SavePrice(row.Record)\">\n </label>\n <label class=\"mjo-field-group\"><span class=\"mjo-sub-label\">Fee type</span>\n <input class=\"mjo-input-text\" [(ngModel)]=\"row.Record.FeeType\" (blur)=\"SavePrice(row.Record)\">\n </label>\n <label class=\"mjo-field-group\"><span class=\"mjo-sub-label\">Priority</span>\n <input type=\"number\" class=\"mjo-input-num\" [(ngModel)]=\"row.Record.Priority\" (blur)=\"SavePrice(row.Record)\">\n </label>\n </div>\n } @else {\n <div class=\"mjo-adv-read\">\n @if (row.Record.MinQuantity != null) {\n <span>Min qty {{ row.Record.MinQuantity }}</span>\n }\n @if (row.Record.MaxQuantity != null) {\n <span>Max qty {{ row.Record.MaxQuantity }}</span>\n }\n @if (row.Record.FeeType && row.Record.FeeType !== 'Standard') {\n <span>{{ row.Record.FeeType }}</span>\n }\n @if (row.Record.EffectiveTo) {\n <span>Until {{ row.Record.EffectiveTo | date:'mediumDate' }}</span>\n }\n </div>\n }\n </div>\n } @else if (EditMode) {\n <button type=\"button\" class=\"mjo-btn-subtle\" (click)=\"OpenAdvanced(row.ID, $event)\">+ Qty, dates, fee</button>\n }\n }\n </div>\n }\n </article>\n }\n </div>\n }\n\n @if (EditMode) {\n <div class=\"mjo-quick-add-bar\">\n <div class=\"mjo-quick-add-inputs\">\n <span class=\"mjo-quick-add-label\">\n <i class=\"fa-solid fa-plus-circle\"></i> Add price\n </span>\n <label class=\"mjo-field-group\">\n <span class=\"mjo-sub-label\">Name</span>\n <input class=\"mjo-input-text\" [(ngModel)]=\"NewPriceName\" placeholder=\"Base\">\n </label>\n <label class=\"mjo-field-group\">\n <span class=\"mjo-sub-label\">Amount</span>\n <input type=\"number\" class=\"mjo-input-price\" [(ngModel)]=\"NewPriceAmount\" min=\"0\" step=\"0.01\">\n </label>\n <button type=\"button\" class=\"mjo-btn-add\" [disabled]=\"IsSaving\" (click)=\"AddPrice()\">\n @if (IsSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Saving\u2026</span>\n } @else {\n <i class=\"fa-solid fa-plus\"></i>\n <span>Add price</span>\n }\n </button>\n </div>\n </div>\n }\n }\n </div>\n</div>\n\n@if (QuoteDrawerOpen) {\n <div class=\"mjo-quote-scrim\" (click)=\"CloseQuote()\"></div>\n <aside class=\"mjo-quote-drawer\" role=\"dialog\" aria-label=\"Test a quote\">\n <div class=\"mjo-quote-drawer-h\">\n <h3>Test a quote</h3>\n <button type=\"button\" class=\"mjo-btn-subtle\" (click)=\"CloseQuote()\">Close</button>\n </div>\n <p class=\"mjo-quote-lede\">Optional. Sample bill-to type against these prices. Same walk as GL \u2014 product then category.</p>\n <label class=\"mjo-field-group\">\n <span class=\"mjo-sub-label\">Bill-to organization Type</span>\n <select class=\"mjo-input-select\" [(ngModel)]=\"QuoteOrgType\" (ngModelChange)=\"RunQuote()\">\n <option value=\"Member\">Member</option>\n <option value=\"Prospect\">Prospect</option>\n </select>\n </label>\n <label class=\"mjo-field-group\">\n <span class=\"mjo-sub-label\">Qty</span>\n <input type=\"number\" class=\"mjo-input-num\" [(ngModel)]=\"SimQuantity\" min=\"1\" (ngModelChange)=\"RunQuote()\">\n </label>\n <div class=\"mjo-quote-amt\">{{ QuoteResult.AmountText }}</div>\n <p class=\"mjo-quote-why\">{{ QuoteResult.Why }}</p>\n @if (QuoteResult.Skipped) {\n <p class=\"mjo-quote-why\">{{ QuoteResult.Skipped }}</p>\n }\n </aside>\n}\n", styles: [".mjo-pricing-widget-wrap {\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n position: relative;\n}\n\n/* In-Widget Toast Notification */\n.mjo-toast {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 16px;\n border-radius: var(--mj-radius-md, 8px);\n font-size: 13px;\n font-weight: 500;\n animation: mjo-toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n border: 1px solid transparent;\n}\n\n@keyframes mjo-toast-in {\n from { opacity: 0; transform: translateY(-6px); }\n to { opacity: 1; transform: translateY(0); }\n}\n\n.mjo-toast--success {\n background: rgba(22, 163, 74, 0.15);\n border-color: rgba(22, 163, 74, 0.3);\n color: #22c55e;\n}\n\n.mjo-toast--error {\n background: rgba(239, 68, 68, 0.15);\n border-color: rgba(239, 68, 68, 0.3);\n color: #f87171;\n}\n\n.mjo-toast--info {\n background: rgba(2, 132, 199, 0.15);\n border-color: rgba(2, 132, 199, 0.3);\n color: #38bdf8;\n}\n\n.mjo-toast-left {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.mjo-toast-left i {\n font-size: 16px;\n}\n\n.mjo-toast-msg {\n line-height: 1.4;\n}\n\n.mjo-toast-close {\n background: transparent;\n border: none;\n color: currentColor;\n opacity: 0.7;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 13px;\n}\n\n.mjo-toast-close:hover {\n opacity: 1;\n}\n\n.mjo-pricing-card {\n background: var(--mj-bg-surface-card, rgba(255, 255, 255, 0.05));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n border-radius: var(--mj-radius-lg, 10px);\n overflow: hidden;\n}\n\n.mjo-card-header-actions {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n.mjo-card-header {\n padding: 12px 16px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n\n.mjo-card-title {\n font-size: 13.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.mjo-card-title i {\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-base-pill {\n font-size: 12px;\n color: var(--mj-text-muted, #64748b);\n}\n\n.mjo-base-pill strong {\n font-family: var(--mj-font-mono, monospace);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-pricing-fields {\n padding: 16px;\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));\n gap: 16px;\n}\n\n/* Channel Tabs Header */\n.mjo-channel-bar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n padding: 0 12px;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.mjo-channel-list {\n display: flex;\n align-items: center;\n gap: 4px;\n overflow-x: auto;\n}\n\n.mjo-channel-tab {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 12px 14px;\n background: transparent;\n border: none;\n border-bottom: 2px solid transparent;\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-muted, #94a3b8);\n cursor: pointer;\n transition: all 0.15s ease;\n white-space: nowrap;\n}\n\n.mjo-channel-tab:hover {\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-channel-tab.active {\n color: var(--mj-brand-primary, #0284c7);\n border-bottom-color: var(--mj-brand-primary, #0284c7);\n background: var(--mj-bg-surface-card, rgba(255, 255, 255, 0.05));\n}\n\n.mjo-channel-count {\n font-size: 10px;\n font-weight: 700;\n padding: 2px 6px;\n border-radius: 9999px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.15));\n color: var(--mj-text-secondary, #cbd5e1);\n}\n\n.mjo-channel-tab.active .mjo-channel-count {\n background: rgba(2, 132, 199, 0.18);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-channel-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.mjo-btn-subtle {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px;\n border-radius: 6px;\n font-size: 11.5px;\n font-weight: 600;\n color: var(--mj-text-primary, #0f172a);\n background: var(--mj-bg-surface-card, rgba(255, 255, 255, 0.05));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mjo-btn-subtle:hover {\n border-color: var(--mj-brand-primary, #0284c7);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n/* Tier Ladder Table */\n.mjo-ladder-table-wrap {\n overflow-x: auto;\n width: 100%;\n}\n\n.mjo-ladder-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 13px;\n text-align: left;\n}\n\n.mjo-ladder-table th {\n padding: 10px 14px;\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted, #64748b);\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.05));\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n}\n\n.mjo-ladder-table td {\n padding: 11px 14px;\n border-bottom: 1px solid var(--mj-border-subtle, rgba(255, 255, 255, 0.06));\n color: var(--mj-text-primary, #0f172a);\n vertical-align: middle;\n}\n\n.mjo-ladder-table tr:hover {\n background: var(--mj-bg-surface-hover, rgba(255, 255, 255, 0.03));\n}\n\n.mjo-tier-title {\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-range-pill {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-family: var(--mj-font-mono, monospace);\n font-weight: 700;\n font-size: 12px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.12));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n}\n\n.mjo-price-input {\n font-family: var(--mj-font-mono, monospace);\n font-size: 13.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n border-radius: 6px;\n padding: 5px 8px;\n width: 100px;\n transition: all 0.15s ease;\n}\n\n.mjo-price-input:focus {\n outline: none;\n border-color: var(--mj-brand-primary, #0284c7);\n box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25);\n}\n\n.mjo-price-val {\n font-family: var(--mj-font-mono, monospace);\n font-size: 13px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n display: inline-block;\n padding: 4px 0;\n}\n\n.mjo-disc-tag {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 11px;\n font-weight: 700;\n padding: 2px 7px;\n border-radius: 4px;\n background: rgba(22, 163, 74, 0.15);\n color: #22c55e;\n}\n\n.mjo-standard-tag {\n font-size: 11px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-savings-val {\n color: #22c55e;\n font-family: var(--mj-font-mono, monospace);\n font-size: 12.5px;\n}\n\n.mjo-model-tag {\n font-size: 11px;\n font-weight: 600;\n padding: 2px 7px;\n border-radius: 4px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n color: var(--mj-text-secondary, #cbd5e1);\n}\n\n.mjo-date-tag {\n font-size: 11.5px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-th-num, .mjo-td-num { text-align: left; }\n.mjo-th-actions, .mjo-td-actions { text-align: right; }\n\n.mjo-action-btn {\n width: 28px;\n height: 28px;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n background: var(--mj-bg-surface, rgba(255, 255, 255, 0.05));\n color: var(--mj-text-muted, #94a3b8);\n cursor: pointer;\n font-size: 11px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n margin-left: 4px;\n}\n\n.mjo-action-btn:hover {\n color: var(--mj-brand-primary, #0284c7);\n border-color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-action-btn--delete:hover {\n color: #ef4444;\n border-color: #ef4444;\n}\n\n/* 1-Click Quick Add Bar */\n.mjo-quick-add-bar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 16px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-top: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.mjo-quick-add-inputs {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-wrap: wrap;\n}\n\n.mjo-quick-add-label {\n font-size: 12.5px;\n font-weight: 700;\n color: var(--mj-brand-primary, #0284c7);\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mjo-field-group {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.mjo-sub-label {\n font-size: 11.5px;\n font-weight: 600;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-input-num {\n width: 65px;\n padding: 5px 8px;\n font-size: 12.5px;\n font-family: var(--mj-font-mono, monospace);\n font-weight: 700;\n text-align: center;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-input-price {\n width: 85px;\n padding: 5px 8px;\n font-size: 12.5px;\n font-family: var(--mj-font-mono, monospace);\n font-weight: 700;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-input-select {\n padding: 5px 8px;\n font-size: 12px;\n font-weight: 600;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n background: var(--mj-bg-surface, rgba(0, 0, 0, 0.2));\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-btn-add {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 14px;\n border-radius: 6px;\n font-size: 12px;\n font-weight: 700;\n color: #ffffff;\n background: #0284c7;\n border: none;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mjo-btn-add:hover {\n background: #0369a1;\n}\n\n.mjo-btn-add:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.mjo-guard-badge {\n font-size: 11.5px;\n color: #22c55e;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n/* Volume Step Curve Diagram */\n.mjo-step-curve-wrap {\n padding: 14px 18px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.mjo-step-curve-title {\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted, #94a3b8);\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mjo-step-curve-title i {\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-step-curve-bars {\n display: flex;\n align-items: flex-end;\n gap: 12px;\n height: 80px;\n padding-top: 8px;\n}\n\n.mjo-step-col {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n height: 100%;\n justify-content: flex-end;\n}\n\n.mjo-step-track {\n width: 100%;\n max-width: 60px;\n height: 100%;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.1));\n border-radius: 4px 4px 0 0;\n display: flex;\n align-items: flex-end;\n}\n\n.mjo-step-fill {\n width: 100%;\n border-radius: 4px 4px 0 0;\n background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);\n min-height: 8px;\n transition: height 0.3s ease;\n}\n\n.mjo-step-val {\n font-size: 11px;\n font-weight: 700;\n font-family: var(--mj-font-mono, monospace);\n color: var(--mj-brand-primary, #0284c7);\n}\n\n.mjo-step-label {\n font-size: 10px;\n font-family: var(--mj-font-mono, monospace);\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-loading-state {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 30px;\n font-size: 13px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-empty-tiers {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 24px;\n}\n\n.mjo-empty-icon {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: rgba(2, 132, 199, 0.15);\n color: var(--mj-brand-primary, #0284c7);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n}\n\n.mjo-empty-text h4 {\n margin: 0 0 4px 0;\n font-size: 13.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n}\n\n.mjo-empty-text p {\n margin: 0;\n font-size: 12px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-grid-wrap {\n padding: 0;\n min-height: 400px;\n height: 420px;\n}\n\n.mjo-price-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 12px 14px 16px;\n}\n\n.mjo-offer {\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n border-radius: 12px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.12));\n overflow: hidden;\n}\n\n.mjo-offer.selected {\n border-color: var(--mj-brand-primary, #38bdf8);\n box-shadow: inset 0 0 0 1px var(--mj-brand-primary, #38bdf8);\n}\n\n.mjo-offer-grip {\n color: var(--mj-text-muted, #94a3b8);\n cursor: grab;\n padding: 0 4px 0 0;\n display: inline-flex;\n}\n\n.mjo-offer-h {\n width: 100%;\n display: grid;\n grid-template-columns: 108px 1fr auto;\n gap: 14px;\n align-items: center;\n padding: 12px 14px;\n border: 0;\n background: transparent;\n color: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n.mjo-offer-h:has(.mjo-offer-grip) {\n grid-template-columns: 18px 108px 1fr auto;\n}\n\n.mjo-offer-h:hover {\n background: color-mix(in srgb, var(--mj-brand-primary, #0076b6) 8%, transparent);\n}\n\n.mjo-offer-amt {\n font-variant-numeric: tabular-nums;\n font-weight: 700;\n font-size: 18px;\n letter-spacing: -0.02em;\n text-align: left;\n}\n\n.mjo-offer-copy {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.mjo-offer-name {\n font-weight: 700;\n font-size: 14px;\n}\n\n.mjo-offer-when {\n font-size: 12.5px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-offer-from {\n font-size: 11px;\n font-weight: 700;\n color: var(--mj-status-success-text, #86efac);\n white-space: nowrap;\n}\n\n.mjo-offer-body {\n padding: 0 14px 14px;\n border-top: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n}\n\n.mjo-when-read {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n padding-top: 12px;\n font-size: 13px;\n color: var(--mj-text-secondary, #cbd5e1);\n}\n\n.mjo-when-edit {\n padding-top: 12px;\n}\n\n.mjo-when-actions {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n margin-top: 10px;\n}\n\n.mjo-quote-scrim {\n position: fixed;\n inset: 0;\n background: rgba(2, 6, 23, 0.55);\n z-index: 40;\n}\n\n.mjo-quote-drawer {\n position: fixed;\n top: 0;\n right: 0;\n height: 100vh;\n width: min(420px, 100vw);\n background: var(--mj-bg-page, #0f172a);\n border-left: 1px solid var(--mj-border-default, #334155);\n z-index: 50;\n padding: 20px 18px;\n box-shadow: -16px 0 40px rgba(0, 0, 0, 0.35);\n}\n\n.mjo-quote-drawer-h {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 8px;\n}\n\n.mjo-quote-drawer h3 {\n margin: 0;\n font-size: 16px;\n}\n\n.mjo-quote-lede {\n color: var(--mj-text-muted, #94a3b8);\n font-size: 12.5px;\n margin: 0 0 16px;\n}\n\n.mjo-quote-amt {\n font-size: 28px;\n font-weight: 700;\n letter-spacing: -0.02em;\n margin: 16px 0 6px;\n}\n\n.mjo-quote-why {\n font-size: 13px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-offer.inherited {\n border-style: dashed;\n}\n\n.mjo-offer-from.inherited {\n color: #a78bfa;\n}\n\n.mjo-offer-fields,\n.mjo-adv-grid {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n padding-top: 12px;\n}\n\n.mjo-input-text {\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.2));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n color: inherit;\n border-radius: 8px;\n padding: 6px 8px;\n min-width: 120px;\n}\n\n.mjo-when-title {\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.05em;\n text-transform: uppercase;\n color: var(--mj-text-muted, #94a3b8);\n margin-bottom: 8px;\n}\n\n.mjo-when-rule {\n display: grid;\n grid-template-columns: 1fr 1fr 110px 1fr;\n gap: 6px;\n}\n\n.mjo-when-rule select,\n.mjo-when-rule input {\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.2));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n color: inherit;\n border-radius: 8px;\n padding: 6px 8px;\n}\n\n.mjo-inherit-note {\n font-size: 12.5px;\n color: var(--mj-text-muted, #94a3b8);\n margin: 12px 0 0;\n}\n\n.mjo-adv {\n margin-top: 10px;\n font-size: 12px;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n.mjo-adv-read {\n display: flex;\n flex-wrap: wrap;\n gap: 10px 16px;\n padding-top: 4px;\n font-size: 13px;\n color: var(--mj-text-secondary, #cbd5e1);\n}\n"] }]
|
|
936
1467
|
}], () => [], { Product: [{
|
|
937
1468
|
type: Input
|
|
938
1469
|
}], EditMode: [{
|
|
@@ -946,5 +1477,5 @@ export class BizAppsProductPricingWidgetComponent {
|
|
|
946
1477
|
}], TierAdded: [{
|
|
947
1478
|
type: Output
|
|
948
1479
|
}] }); })();
|
|
949
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BizAppsProductPricingWidgetComponent, { className: "BizAppsProductPricingWidgetComponent", filePath: "lib/custom/Product/widgets/product-pricing-widget.component.ts", lineNumber:
|
|
1480
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BizAppsProductPricingWidgetComponent, { className: "BizAppsProductPricingWidgetComponent", filePath: "lib/custom/Product/widgets/product-pricing-widget.component.ts", lineNumber: 111 }); })();
|
|
950
1481
|
//# sourceMappingURL=product-pricing-widget.component.js.map
|