@forgeroute/ui 0.4.42 → 0.4.44
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/fesm2022/forgeroute-ui-messaging.mjs +211 -7
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stripe.mjs +11 -4
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/forgeroute-ui.mjs +56 -54
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-messaging.d.ts +66 -7
- package/types/forgeroute-ui.d.ts +21 -15
|
@@ -9940,59 +9940,56 @@ var ImportExportComponent = class ImportExportComponent {
|
|
|
9940
9940
|
</div>
|
|
9941
9941
|
}
|
|
9942
9942
|
|
|
9943
|
-
<!-- Footer -->
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
} @else {
|
|
9959
|
-
@if (step === 'source') {
|
|
9943
|
+
<!-- Footer. Every item is its own top-level @if with ONE root element: that is what lets ui-modal project it into its footer slot (a wrapper block with several items would land in the body). -->
|
|
9944
|
+
<!-- closeOnly (the setup wizard): no Back, no Cancel - one Close that shuts the window at once, plus the step's primary button -->
|
|
9945
|
+
@if (closeOnly() && step !== 'result') {
|
|
9946
|
+
<ui-button modal-footer-left variant="secondary" size="sm" data-testid="import-close-button" [disabled]="importing" (click)="closeImport()">Close</ui-button>
|
|
9947
|
+
}
|
|
9948
|
+
@if (closeOnly() && step === 'source') {
|
|
9949
|
+
<ui-button modal-footer-right variant="primary" size="sm" [disabled]="!selectedSource" (click)="confirmSource()">Next</ui-button>
|
|
9950
|
+
}
|
|
9951
|
+
@if (closeOnly() && step === 'mapping') {
|
|
9952
|
+
<ui-button modal-footer-right variant="primary" size="sm" [disabled]="!canSubmit" (click)="goToPreview()">Preview Import</ui-button>
|
|
9953
|
+
}
|
|
9954
|
+
@if (closeOnly() && step === 'preview') {
|
|
9955
|
+
<ui-button modal-footer-right variant="primary" size="sm" [loading]="importing" (click)="submitImport()">Import {{ csvRows.length }} Record(s)</ui-button>
|
|
9956
|
+
}
|
|
9957
|
+
@if (!closeOnly() && step === 'source') {
|
|
9960
9958
|
<ui-button modal-footer-left variant="secondary" size="sm" (click)="closeImport()">Cancel</ui-button>
|
|
9961
9959
|
}
|
|
9962
|
-
@if (step === 'source') {
|
|
9960
|
+
@if (!closeOnly() && step === 'source') {
|
|
9963
9961
|
<ui-button modal-footer-right variant="primary" size="sm" [disabled]="!selectedSource" (click)="confirmSource()">Next</ui-button>
|
|
9964
9962
|
}
|
|
9965
|
-
@if (step === 'upload') {
|
|
9963
|
+
@if (!closeOnly() && step === 'upload') {
|
|
9966
9964
|
<span modal-footer-left></span>
|
|
9967
9965
|
}
|
|
9968
|
-
@if (step === 'upload' && importSources()?.length) {
|
|
9966
|
+
@if (!closeOnly() && step === 'upload' && importSources()?.length) {
|
|
9969
9967
|
<div modal-footer-right class="ie-footer-right">
|
|
9970
9968
|
<ui-button variant="ghost" size="sm" (click)="step = 'source'">Back</ui-button>
|
|
9971
9969
|
<ui-button variant="secondary" size="sm" (click)="closeImport()">Cancel</ui-button>
|
|
9972
9970
|
</div>
|
|
9973
9971
|
}
|
|
9974
|
-
@if (step === 'upload' && !importSources()?.length) {
|
|
9972
|
+
@if (!closeOnly() && step === 'upload' && !importSources()?.length) {
|
|
9975
9973
|
<ui-button modal-footer-right variant="secondary" size="sm" (click)="closeImport()">Cancel</ui-button>
|
|
9976
9974
|
}
|
|
9977
|
-
@if (step === 'mapping') {
|
|
9975
|
+
@if (!closeOnly() && step === 'mapping') {
|
|
9978
9976
|
<ui-button modal-footer-left variant="ghost" size="sm" (click)="step = 'upload'">Back</ui-button>
|
|
9979
9977
|
}
|
|
9980
|
-
@if (step === 'mapping') {
|
|
9978
|
+
@if (!closeOnly() && step === 'mapping') {
|
|
9981
9979
|
<div modal-footer-right class="ie-footer-right">
|
|
9982
9980
|
<ui-button variant="secondary" size="sm" (click)="closeImport()">Cancel</ui-button>
|
|
9983
9981
|
<ui-button variant="primary" size="sm" [disabled]="!canSubmit" (click)="goToPreview()">Preview Import</ui-button>
|
|
9984
9982
|
</div>
|
|
9985
9983
|
}
|
|
9986
|
-
@if (step === 'preview') {
|
|
9984
|
+
@if (!closeOnly() && step === 'preview') {
|
|
9987
9985
|
<ui-button modal-footer-left variant="ghost" size="sm" (click)="step = 'mapping'">Back</ui-button>
|
|
9988
9986
|
}
|
|
9989
|
-
@if (step === 'preview') {
|
|
9987
|
+
@if (!closeOnly() && step === 'preview') {
|
|
9990
9988
|
<div modal-footer-right class="ie-footer-right">
|
|
9991
9989
|
<ui-button variant="secondary" size="sm" [disabled]="importing" (click)="closeImport()">Cancel</ui-button>
|
|
9992
9990
|
<ui-button variant="primary" size="sm" [loading]="importing" (click)="submitImport()">Import {{ csvRows.length }} Record(s)</ui-button>
|
|
9993
9991
|
</div>
|
|
9994
9992
|
}
|
|
9995
|
-
}
|
|
9996
9993
|
@if (step === 'result') {
|
|
9997
9994
|
<span modal-footer-left></span>
|
|
9998
9995
|
}
|
|
@@ -10319,59 +10316,56 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10319
10316
|
</div>
|
|
10320
10317
|
}
|
|
10321
10318
|
|
|
10322
|
-
<!-- Footer -->
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
} @else {
|
|
10338
|
-
@if (step === 'source') {
|
|
10319
|
+
<!-- Footer. Every item is its own top-level @if with ONE root element: that is what lets ui-modal project it into its footer slot (a wrapper block with several items would land in the body). -->
|
|
10320
|
+
<!-- closeOnly (the setup wizard): no Back, no Cancel - one Close that shuts the window at once, plus the step's primary button -->
|
|
10321
|
+
@if (closeOnly() && step !== 'result') {
|
|
10322
|
+
<ui-button modal-footer-left variant="secondary" size="sm" data-testid="import-close-button" [disabled]="importing" (click)="closeImport()">Close</ui-button>
|
|
10323
|
+
}
|
|
10324
|
+
@if (closeOnly() && step === 'source') {
|
|
10325
|
+
<ui-button modal-footer-right variant="primary" size="sm" [disabled]="!selectedSource" (click)="confirmSource()">Next</ui-button>
|
|
10326
|
+
}
|
|
10327
|
+
@if (closeOnly() && step === 'mapping') {
|
|
10328
|
+
<ui-button modal-footer-right variant="primary" size="sm" [disabled]="!canSubmit" (click)="goToPreview()">Preview Import</ui-button>
|
|
10329
|
+
}
|
|
10330
|
+
@if (closeOnly() && step === 'preview') {
|
|
10331
|
+
<ui-button modal-footer-right variant="primary" size="sm" [loading]="importing" (click)="submitImport()">Import {{ csvRows.length }} Record(s)</ui-button>
|
|
10332
|
+
}
|
|
10333
|
+
@if (!closeOnly() && step === 'source') {
|
|
10339
10334
|
<ui-button modal-footer-left variant="secondary" size="sm" (click)="closeImport()">Cancel</ui-button>
|
|
10340
10335
|
}
|
|
10341
|
-
@if (step === 'source') {
|
|
10336
|
+
@if (!closeOnly() && step === 'source') {
|
|
10342
10337
|
<ui-button modal-footer-right variant="primary" size="sm" [disabled]="!selectedSource" (click)="confirmSource()">Next</ui-button>
|
|
10343
10338
|
}
|
|
10344
|
-
@if (step === 'upload') {
|
|
10339
|
+
@if (!closeOnly() && step === 'upload') {
|
|
10345
10340
|
<span modal-footer-left></span>
|
|
10346
10341
|
}
|
|
10347
|
-
@if (step === 'upload' && importSources()?.length) {
|
|
10342
|
+
@if (!closeOnly() && step === 'upload' && importSources()?.length) {
|
|
10348
10343
|
<div modal-footer-right class="ie-footer-right">
|
|
10349
10344
|
<ui-button variant="ghost" size="sm" (click)="step = 'source'">Back</ui-button>
|
|
10350
10345
|
<ui-button variant="secondary" size="sm" (click)="closeImport()">Cancel</ui-button>
|
|
10351
10346
|
</div>
|
|
10352
10347
|
}
|
|
10353
|
-
@if (step === 'upload' && !importSources()?.length) {
|
|
10348
|
+
@if (!closeOnly() && step === 'upload' && !importSources()?.length) {
|
|
10354
10349
|
<ui-button modal-footer-right variant="secondary" size="sm" (click)="closeImport()">Cancel</ui-button>
|
|
10355
10350
|
}
|
|
10356
|
-
@if (step === 'mapping') {
|
|
10351
|
+
@if (!closeOnly() && step === 'mapping') {
|
|
10357
10352
|
<ui-button modal-footer-left variant="ghost" size="sm" (click)="step = 'upload'">Back</ui-button>
|
|
10358
10353
|
}
|
|
10359
|
-
@if (step === 'mapping') {
|
|
10354
|
+
@if (!closeOnly() && step === 'mapping') {
|
|
10360
10355
|
<div modal-footer-right class="ie-footer-right">
|
|
10361
10356
|
<ui-button variant="secondary" size="sm" (click)="closeImport()">Cancel</ui-button>
|
|
10362
10357
|
<ui-button variant="primary" size="sm" [disabled]="!canSubmit" (click)="goToPreview()">Preview Import</ui-button>
|
|
10363
10358
|
</div>
|
|
10364
10359
|
}
|
|
10365
|
-
@if (step === 'preview') {
|
|
10360
|
+
@if (!closeOnly() && step === 'preview') {
|
|
10366
10361
|
<ui-button modal-footer-left variant="ghost" size="sm" (click)="step = 'mapping'">Back</ui-button>
|
|
10367
10362
|
}
|
|
10368
|
-
@if (step === 'preview') {
|
|
10363
|
+
@if (!closeOnly() && step === 'preview') {
|
|
10369
10364
|
<div modal-footer-right class="ie-footer-right">
|
|
10370
10365
|
<ui-button variant="secondary" size="sm" [disabled]="importing" (click)="closeImport()">Cancel</ui-button>
|
|
10371
10366
|
<ui-button variant="primary" size="sm" [loading]="importing" (click)="submitImport()">Import {{ csvRows.length }} Record(s)</ui-button>
|
|
10372
10367
|
</div>
|
|
10373
10368
|
}
|
|
10374
|
-
}
|
|
10375
10369
|
@if (step === 'result') {
|
|
10376
10370
|
<span modal-footer-left></span>
|
|
10377
10371
|
}
|
|
@@ -43394,6 +43388,7 @@ const DEFAULT_TEXTS = {
|
|
|
43394
43388
|
connected: "Connected",
|
|
43395
43389
|
importMore: "Import more",
|
|
43396
43390
|
importRequired: "Import your data to continue, or skip this step.",
|
|
43391
|
+
connectRequired: "Connect at least one to continue, or skip this step.",
|
|
43397
43392
|
importErrorsTitle: (errors) => `${errors} row${errors === 1 ? "" : "s"} could not be imported`,
|
|
43398
43393
|
importErrorsText: (_imported, errors) => `Nothing was imported yet. Fix the ${errors === 1 ? "row" : "rows"} listed in the import window in your file, then import the whole file again to continue.`,
|
|
43399
43394
|
importAgain: "Import again",
|
|
@@ -43426,6 +43421,10 @@ var SetupWizardComponent = class SetupWizardComponent {
|
|
|
43426
43421
|
this.apiBase = inject(FORGEROUTE_CONFIG, { optional: true })?.baseUrl ?? "/api";
|
|
43427
43422
|
this.destroyRef = inject(DestroyRef);
|
|
43428
43423
|
this.narrow = signal(false, ...ngDevMode ? [{ debugName: "narrow" }] : /* istanbul ignore next */ []);
|
|
43424
|
+
this.connectBlocked = computed(() => {
|
|
43425
|
+
const st = this.current();
|
|
43426
|
+
return st.kind === "integrations" && !!st.requireConnection && !(st.integrations ?? []).some((i) => this.isConnected(i));
|
|
43427
|
+
}, ...ngDevMode ? [{ debugName: "connectBlocked" }] : /* istanbul ignore next */ []);
|
|
43429
43428
|
this.importBlocked = computed(() => {
|
|
43430
43429
|
const st = this.current();
|
|
43431
43430
|
return st.kind === "import" && !!st.requireImport && !this.completed().has(st.key);
|
|
@@ -43588,6 +43587,7 @@ var SetupWizardComponent = class SetupWizardComponent {
|
|
|
43588
43587
|
if (this.busy()) return;
|
|
43589
43588
|
const step = this.current();
|
|
43590
43589
|
if (step.canContinue && !step.canContinue()) return;
|
|
43590
|
+
if (this.connectBlocked()) return;
|
|
43591
43591
|
this.busy.set(true);
|
|
43592
43592
|
this.error.set("");
|
|
43593
43593
|
try {
|
|
@@ -43908,7 +43908,7 @@ var SetupWizardComponent = class SetupWizardComponent {
|
|
|
43908
43908
|
</ui-button>
|
|
43909
43909
|
}
|
|
43910
43910
|
} @else if (current().kind === 'integrations') {
|
|
43911
|
-
<ui-button variant="primary" size="sm" [fullWidth]="narrow()" data-testid="wizard-save" [loading]="busy()" [disabled]="current().canContinue ? !current().canContinue!() : false" (click)="saveAndContinue()">{{ t().saveAndContinue }} <svg class="sw-ico" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path [attr.d]="iconD('arrow-right')" /></svg></ui-button>
|
|
43911
|
+
<ui-button variant="primary" size="sm" [fullWidth]="narrow()" data-testid="wizard-save" [loading]="busy()" [disabled]="(current().canContinue ? !current().canContinue!() : false) || connectBlocked()" [ariaDescribedBy]="connectBlocked() ? 'sw-continue-hint' : ''" (click)="saveAndContinue()">{{ t().saveAndContinue }} <svg class="sw-ico" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path [attr.d]="iconD('arrow-right')" /></svg></ui-button>
|
|
43912
43912
|
} @else if (current().kind === 'import') {
|
|
43913
43913
|
<ui-button variant="primary" size="sm" [fullWidth]="narrow()" data-testid="wizard-continue" [disabled]="importBlocked()" [ariaDescribedBy]="importBlocked() ? 'sw-continue-hint' : ''" (click)="continueFromImport()">{{ t().continue }} <svg class="sw-ico" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path [attr.d]="iconD('arrow-right')" /></svg></ui-button>
|
|
43914
43914
|
}
|
|
@@ -43988,6 +43988,7 @@ var SetupWizardComponent = class SetupWizardComponent {
|
|
|
43988
43988
|
}
|
|
43989
43989
|
|
|
43990
43990
|
@if (importBlocked()) { <p class="sw-hint sw-continue-hint" id="sw-continue-hint" data-testid="wizard-continue-hint">{{ t().importRequired }}</p> }
|
|
43991
|
+
@if (connectBlocked()) { <p class="sw-hint sw-continue-hint" id="sw-continue-hint" data-testid="wizard-continue-hint">{{ t().connectRequired }}</p> }
|
|
43991
43992
|
|
|
43992
43993
|
@if (error()) { <ui-alert variant="danger" data-testid="wizard-save-error">{{ error() }}</ui-alert> }
|
|
43993
43994
|
|
|
@@ -44387,7 +44388,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
44387
44388
|
</ui-button>
|
|
44388
44389
|
}
|
|
44389
44390
|
} @else if (current().kind === 'integrations') {
|
|
44390
|
-
<ui-button variant="primary" size="sm" [fullWidth]="narrow()" data-testid="wizard-save" [loading]="busy()" [disabled]="current().canContinue ? !current().canContinue!() : false" (click)="saveAndContinue()">{{ t().saveAndContinue }} <svg class="sw-ico" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path [attr.d]="iconD('arrow-right')" /></svg></ui-button>
|
|
44391
|
+
<ui-button variant="primary" size="sm" [fullWidth]="narrow()" data-testid="wizard-save" [loading]="busy()" [disabled]="(current().canContinue ? !current().canContinue!() : false) || connectBlocked()" [ariaDescribedBy]="connectBlocked() ? 'sw-continue-hint' : ''" (click)="saveAndContinue()">{{ t().saveAndContinue }} <svg class="sw-ico" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path [attr.d]="iconD('arrow-right')" /></svg></ui-button>
|
|
44391
44392
|
} @else if (current().kind === 'import') {
|
|
44392
44393
|
<ui-button variant="primary" size="sm" [fullWidth]="narrow()" data-testid="wizard-continue" [disabled]="importBlocked()" [ariaDescribedBy]="importBlocked() ? 'sw-continue-hint' : ''" (click)="continueFromImport()">{{ t().continue }} <svg class="sw-ico" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path [attr.d]="iconD('arrow-right')" /></svg></ui-button>
|
|
44393
44394
|
}
|
|
@@ -44467,6 +44468,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
44467
44468
|
}
|
|
44468
44469
|
|
|
44469
44470
|
@if (importBlocked()) { <p class="sw-hint sw-continue-hint" id="sw-continue-hint" data-testid="wizard-continue-hint">{{ t().importRequired }}</p> }
|
|
44471
|
+
@if (connectBlocked()) { <p class="sw-hint sw-continue-hint" id="sw-continue-hint" data-testid="wizard-continue-hint">{{ t().connectRequired }}</p> }
|
|
44470
44472
|
|
|
44471
44473
|
@if (error()) { <ui-alert variant="danger" data-testid="wizard-save-error">{{ error() }}</ui-alert> }
|
|
44472
44474
|
|