@colijnit/inphoto 301.1.5 → 301.1.6

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.
Files changed (45) hide show
  1. package/fesm2022/colijnit-inphoto.mjs +382 -148
  2. package/fesm2022/colijnit-inphoto.mjs.map +1 -1
  3. package/index.d.ts +70 -15
  4. package/package.json +12 -12
  5. package/assets/01-bohemian.jpg +0 -0
  6. package/assets/02-mid-century-modern.jpg +0 -0
  7. package/assets/03-rustic-farmhouse.jpg +0 -0
  8. package/assets/04-coastal-nautical.jpg +0 -0
  9. package/assets/05-art-deco.jpg +0 -0
  10. package/assets/06-eclectic.jpg +0 -0
  11. package/assets/07-japanese-zen.jpg +0 -0
  12. package/assets/08-modern.jpg +0 -0
  13. package/assets/09-contemporary.jpg +0 -0
  14. package/assets/10-minimalist.jpg +0 -0
  15. package/assets/11-scandinavian.jpg +0 -0
  16. package/assets/12-industrial.jpg +0 -0
  17. package/assets/13-traditional.jpg +0 -0
  18. package/assets/14-transitional.jpg +0 -0
  19. package/assets/how-do-want-to-edit-the-image-01.jpg +0 -0
  20. package/assets/how-do-want-to-edit-the-image-02.jpg +0 -0
  21. package/assets/how-do-want-to-edit-the-image-03.jpg +0 -0
  22. package/assets/how-do-want-to-edit-the-image-04.jpg +0 -0
  23. package/assets/how-to-redesign-with-catalog-01.jpg +0 -0
  24. package/assets/how-to-redesign-with-catalog-02.jpg +0 -0
  25. package/assets/how-to-redesign-with-catalog-03.jpg +0 -0
  26. package/assets/how-to-redesign-with-catalog-04.jpg +0 -0
  27. package/assets/how-to-redesign-with-catalog-05.jpg +0 -0
  28. package/assets/how-to-redesign-with-catalog-06.jpg +0 -0
  29. package/assets/inphoto-add-products-tile.jpg +0 -0
  30. package/assets/inphoto-add-products.jpg +0 -0
  31. package/assets/inphoto-change-floorl.jpg +0 -0
  32. package/assets/inphoto-change-wall.jpg +0 -0
  33. package/assets/inphoto-make-selection.jpg +0 -0
  34. package/assets/inphoto-redesign-ai.jpg +0 -0
  35. package/assets/inphoto-remove-all.jpg +0 -0
  36. package/assets/inphoto-select-all.png +0 -0
  37. package/assets/inphoto-single-select.png +0 -0
  38. package/assets/room-01-living-room.jpg +0 -0
  39. package/assets/room-02-kitchen.jpg +0 -0
  40. package/assets/room-03-dining-room.jpg +0 -0
  41. package/assets/room-04-bathroom.jpg +0 -0
  42. package/assets/room-05-bedroom.jpg +0 -0
  43. package/assets/room-06-kids-room.jpg +0 -0
  44. package/assets/room-07-home-office.jpg +0 -0
  45. package/assets/room-08-home-bar.jpg +0 -0
package/index.d.ts CHANGED
@@ -15,8 +15,9 @@ import { DataServiceResponseData } from '@colijnit/ioneconnector/build/model/dat
15
15
  import { ExternalCatalogStartupInfoRequest } from '@colijnit/articleapi/build/model/external-catalog-startup-info-request';
16
16
  import { ExternalCatalogStartupInfo } from '@colijnit/articleapi/build/model/external-catalog-startup-info';
17
17
  import * as i6 from '@colijnit/configurator';
18
- import { ConfigurationResultObject, ConfiguringService, ConfiguratorEventService } from '@colijnit/configurator';
18
+ import { ConfigurationResultObject, ConfiguringService, ConfiguratorEventService, ConfiguratorConnectorService, ConfiguratorErrorMessage } from '@colijnit/configurator';
19
19
  import { ExternalSourceInfo } from '@colijnit/articleapi/build/model/external-source-info.bo';
20
+ import { RenderSettingsService, RenderConnectorService, RenderService, RenderEventService } from '@colijnit/render';
20
21
  import { ExternalSourceArticleClickInterface } from '@colijnit/articleapi/build/interface/external-source-article-click.interface';
21
22
  import { SafeHtml, DomSanitizer } from '@angular/platform-browser';
22
23
  import * as i2 from '@colijnit/corecomponents_v12';
@@ -25,7 +26,6 @@ import * as i7 from '@angular/cdk/drag-drop';
25
26
  import * as i4$1 from '@angular/common';
26
27
  import * as i5 from '@colijnit/utilities';
27
28
  import { Font } from 'three/examples/jsm/loaders/FontLoader.js';
28
- import { RenderConnectorService, RenderService, RenderEventService } from '@colijnit/render';
29
29
 
30
30
  declare class InphotoDictionaryService {
31
31
  get language(): string;
@@ -64,6 +64,7 @@ declare class Settings extends Options {
64
64
  currencySymbol: string;
65
65
  session: any;
66
66
  assetPath: string;
67
+ applicationAssetPath: string;
67
68
  threeDAssetPath: string;
68
69
  options: SettingOptions;
69
70
  catalogParameters: GetArticlesForCatalogRequest;
@@ -223,6 +224,17 @@ declare class SegmentationResponse {
223
224
  contours: any[];
224
225
  }
225
226
 
227
+ declare class SegmentationObject {
228
+ id: number;
229
+ label: string;
230
+ contours: number[][][];
231
+ }
232
+
233
+ declare class SegmentationBaseObject {
234
+ job_id: string;
235
+ objects: SegmentationObject[];
236
+ }
237
+
226
238
  declare class ExternalConnector {
227
239
  loginResponse: LoginResponse;
228
240
  connector: Connector;
@@ -274,6 +286,7 @@ declare class InPhotoConnectorAdapterService implements OnDestroy {
274
286
  processEmptyRoom(canvasImage: string): Promise<CreatedImageResponse>;
275
287
  processMultiProductPlacement(canvasImage: string, productImages: string[], colorProducts: any[], customPrompt: string, customPromptMode: PromptStyle, aspect_ratio: AspectRatio, image_size: RenderSize): Promise<CreatedImageResponse>;
276
288
  uploadSegmentationImage(image: string): Promise<JobIdResponse>;
289
+ prepareSegmentation(image: string): Promise<SegmentationBaseObject>;
277
290
  handleSegmentationClick(jobId: string, point: SegmentationPoint): Promise<SegmentationResponse>;
278
291
  segmentInpaint(image: string, jobId?: string): Promise<CreatedImageResponse>;
279
292
  getRoomTypes(showLoader?: boolean): Promise<DataServiceResponseData>;
@@ -284,6 +297,12 @@ declare class InPhotoConnectorAdapterService implements OnDestroy {
284
297
  private _handleRoomData;
285
298
  private _processRoom;
286
299
  private _getJobStatus;
300
+ /**
301
+ *
302
+ * This function should be temp.
303
+ * While the backend struggles to return predictable data, everything should be try catch and this is kinda clean.
304
+ *
305
+ * */
287
306
  private _request;
288
307
  private _getResponseError;
289
308
  private _loadRoom;
@@ -294,6 +313,7 @@ declare class InPhotoConnectorAdapterService implements OnDestroy {
294
313
  declare class InphotoSettingsService {
295
314
  private _dictionary;
296
315
  private _connectorAdapterService;
316
+ private _renderSettingsService;
297
317
  readonly languageCodeToDictionary: Map<string, string>;
298
318
  get languageCode(): string;
299
319
  set languageCode(value: string);
@@ -303,19 +323,13 @@ declare class InphotoSettingsService {
303
323
  settingsLoaded: BehaviorSubject<boolean>;
304
324
  private _languageCode;
305
325
  private _settings;
306
- constructor(_dictionary: InphotoDictionaryService, _connectorAdapterService: InPhotoConnectorAdapterService);
326
+ constructor(_dictionary: InphotoDictionaryService, _connectorAdapterService: InPhotoConnectorAdapterService, _renderSettingsService: RenderSettingsService);
307
327
  createSettingsFromObject(obj: any): void;
308
328
  initialize(options?: Settings): Promise<void>;
309
329
  static ɵfac: i0.ɵɵFactoryDeclaration<InphotoSettingsService, never>;
310
330
  static ɵprov: i0.ɵɵInjectableDeclaration<InphotoSettingsService>;
311
331
  }
312
332
 
313
- declare class SegmentationObject {
314
- id: number;
315
- label: string;
316
- contours: number[][][];
317
- }
318
-
319
333
  declare class InPhotoConnectorService {
320
334
  private _connectorAdapterService;
321
335
  private _settingsService;
@@ -345,6 +359,7 @@ declare class InPhotoConnectorService {
345
359
  uploadRoomImage(image: string, skipInpainting?: boolean): Promise<SceneBuildObject>;
346
360
  processDecorateImage(canvasImage: string, style: EnhanceStyle): Promise<DecorateResponse>;
347
361
  processEmptyRoom(canvasImage: string): Promise<CreatedImageResponse>;
362
+ prepareSegmentation(image: string): Promise<SegmentationBaseObject>;
348
363
  processMultiProductPlacement(canvasImage: string, productImages: string[], colorProducts: any[], customPrompt: string, customPromptMode: PromptStyle, aspect_ratio: AspectRatio, image_size: RenderSize): Promise<CreatedImageResponse>;
349
364
  uploadSegmentationImage(image: string): Promise<JobIdResponse>;
350
365
  handleSegmentationClick(jobId: string, point: SegmentationPoint): Promise<SegmentationResponse>;
@@ -783,12 +798,30 @@ declare class AiImageStyleOption {
783
798
  constructor(label: string, value: string, image: string);
784
799
  }
785
800
 
801
+ declare class InphotoImageCacheService implements OnDestroy {
802
+ private _settingsService;
803
+ /**
804
+ *
805
+ * Service for loading and caching images that are used in tiles and lov's in the application
806
+ * Has nothing to do with uploaded user data.
807
+ *
808
+ * */
809
+ private _imageCache;
810
+ constructor(_settingsService: InphotoSettingsService);
811
+ ngOnDestroy(): void;
812
+ assetUrlResolver(assetName: string): string;
813
+ private _clearCache;
814
+ static ɵfac: i0.ɵɵFactoryDeclaration<InphotoImageCacheService, never>;
815
+ static ɵprov: i0.ɵɵInjectableDeclaration<InphotoImageCacheService>;
816
+ }
817
+
786
818
  declare class ImageEnhancerStyleComponent implements OnInit {
787
819
  connectorService: InPhotoConnectorService;
788
820
  iconCacheService: InphotoIconCacheService;
789
821
  private _changeDetection;
790
822
  private _eventService;
791
823
  private _dataService;
824
+ private _imageCacheService;
792
825
  readonly icons: typeof Icon;
793
826
  get showClass(): boolean;
794
827
  canvasImage: string;
@@ -809,7 +842,7 @@ declare class ImageEnhancerStyleComponent implements OnInit {
809
842
  renderSizeModel: RenderSize;
810
843
  decorationStyleCollection: AiImageStyleOption[];
811
844
  selectedDecorationStyle: AiImageStyleOption;
812
- constructor(connectorService: InPhotoConnectorService, iconCacheService: InphotoIconCacheService, _changeDetection: ChangeDetectorRef, _eventService: InphotoEventService, _dataService: InphotoDataService);
845
+ constructor(connectorService: InPhotoConnectorService, iconCacheService: InphotoIconCacheService, _changeDetection: ChangeDetectorRef, _eventService: InphotoEventService, _dataService: InphotoDataService, _imageCacheService: InphotoImageCacheService);
813
846
  ngOnInit(): Promise<void>;
814
847
  handleRoomTypeChange(value: AiImageStyleOption): void;
815
848
  handleChangeMode(event: DecorationStyle): void;
@@ -932,7 +965,7 @@ declare class ImageTileComponent {
932
965
  iconCacheService: InphotoIconCacheService;
933
966
  private _dataService;
934
967
  readonly icons: typeof Icon;
935
- readonly color: typeof ColorPalette;
968
+ readonly colorOptions: ColorPalette[];
936
969
  showClass(): boolean;
937
970
  index: number;
938
971
  set activeItem(value: boolean);
@@ -1275,10 +1308,12 @@ declare class HeaderModule {
1275
1308
 
1276
1309
  declare class StepTileComponent {
1277
1310
  iconService: InphotoIconCacheService;
1311
+ private _imageCacheService;
1278
1312
  readonly icons: typeof Icon;
1279
1313
  showClass(): boolean;
1280
1314
  tileIcon: Icon;
1281
- tileImage: string;
1315
+ set tileImage(value: string);
1316
+ get tileImage(): string;
1282
1317
  title: string;
1283
1318
  description: string;
1284
1319
  showNewBanner: boolean;
@@ -1287,9 +1322,11 @@ declare class StepTileComponent {
1287
1322
  buttonIcon: Icon;
1288
1323
  onClick: EventEmitter<void>;
1289
1324
  onButtonClick: EventEmitter<void>;
1290
- constructor(iconService: InphotoIconCacheService);
1325
+ private _image;
1326
+ constructor(iconService: InphotoIconCacheService, _imageCacheService: InphotoImageCacheService);
1291
1327
  handleClick(): void;
1292
1328
  handleButtonClick(): void;
1329
+ private _handleSetTileImage;
1293
1330
  static ɵfac: i0.ɵɵFactoryDeclaration<StepTileComponent, never>;
1294
1331
  static ɵcmp: i0.ɵɵComponentDeclaration<StepTileComponent, "co-step-tile", never, { "tileIcon": { "alias": "tileIcon"; "required": false; }; "tileImage": { "alias": "tileImage"; "required": false; }; "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "showNewBanner": { "alias": "showNewBanner"; "required": false; }; "numberedStep": { "alias": "numberedStep"; "required": false; }; "buttonText": { "alias": "buttonText"; "required": false; }; "buttonIcon": { "alias": "buttonIcon"; "required": false; }; }, { "onClick": "onClick"; "onButtonClick": "onButtonClick"; }, never, never, false, never>;
1295
1332
  }
@@ -1582,6 +1619,7 @@ declare class InphotoThreedSceneComponent implements AfterViewInit, OnDestroy {
1582
1619
  private _settingsService;
1583
1620
  private _configuringService;
1584
1621
  private _configuratorEventService;
1622
+ private _configuratorConnectorService;
1585
1623
  private _cdk;
1586
1624
  private _renderConnectorService;
1587
1625
  private _renderService;
@@ -1629,6 +1667,8 @@ declare class InphotoThreedSceneComponent implements AfterViewInit, OnDestroy {
1629
1667
  showRenderLoader: boolean;
1630
1668
  loadingTexts: string[];
1631
1669
  private readonly _copyOffset2D;
1670
+ private readonly _userInputResultTypes;
1671
+ private readonly _placeableResultTypes;
1632
1672
  private _room;
1633
1673
  private _sceneReady;
1634
1674
  private _currentArticleConfiguration;
@@ -1636,7 +1676,11 @@ declare class InphotoThreedSceneComponent implements AfterViewInit, OnDestroy {
1636
1676
  private _pendingImageArticleConfiguration;
1637
1677
  private _pendingImageIsReconfigure;
1638
1678
  private _backgroundSize;
1639
- constructor(iconService: InphotoIconCacheService, objectsService: InphotoItemService, _interactionService: InphotoInteractionService, _sceneService: InphotoSceneService, _appEventService: InphotoEventService, _settingsService: InphotoSettingsService, _configuringService: ConfiguringService, _configuratorEventService: ConfiguratorEventService, _cdk: ChangeDetectorRef, _renderConnectorService: RenderConnectorService, _renderService: RenderService, _renderEventService: RenderEventService, _errorService: ErrorService, _inphotoHudService: InphotoHudService);
1679
+ private _article;
1680
+ private _instanceId;
1681
+ private _userActionNeeded;
1682
+ private _answerSelectedSub;
1683
+ constructor(iconService: InphotoIconCacheService, objectsService: InphotoItemService, _interactionService: InphotoInteractionService, _sceneService: InphotoSceneService, _appEventService: InphotoEventService, _settingsService: InphotoSettingsService, _configuringService: ConfiguringService, _configuratorEventService: ConfiguratorEventService, _configuratorConnectorService: ConfiguratorConnectorService, _cdk: ChangeDetectorRef, _renderConnectorService: RenderConnectorService, _renderService: RenderService, _renderEventService: RenderEventService, _errorService: ErrorService, _inphotoHudService: InphotoHudService);
1640
1684
  ngAfterViewInit(): void;
1641
1685
  ngOnDestroy(): void;
1642
1686
  init(): void;
@@ -1650,6 +1694,7 @@ declare class InphotoThreedSceneComponent implements AfterViewInit, OnDestroy {
1650
1694
  handleCopyObject(articleConfiguration: ArticleConfiguration): void;
1651
1695
  handleDeleteObject(articleConfiguration: ArticleConfiguration): void;
1652
1696
  showConfiguratorChange(show: boolean): void;
1697
+ handleConfiguratorErrorMessages(errorMessages: ConfiguratorErrorMessage[]): void;
1653
1698
  handleChangeObjectScale(scale: Vector3): void;
1654
1699
  handle2DImageSelected(articleConfiguration: ArticleConfiguration): void;
1655
1700
  handle2DImageDeselected(): void;
@@ -1670,6 +1715,13 @@ declare class InphotoThreedSceneComponent implements AfterViewInit, OnDestroy {
1670
1715
  private _addArticleToScene;
1671
1716
  private _prepareSettings;
1672
1717
  private _handleFirstBuild;
1718
+ private _waitForUserInput;
1719
+ private _listenForAnswers;
1720
+ private _stopListeningForAnswers;
1721
+ private _handleAnswerSelected;
1722
+ private _cancelPendingArticle;
1723
+ private _handleFailedFirstBuild;
1724
+ private _getErrorMessageText;
1673
1725
  private _handleBuildResult;
1674
1726
  private _handleReconfigure2DImage;
1675
1727
  private _continueConfiguration;
@@ -1842,8 +1894,9 @@ declare class UploadStartingImageModule {
1842
1894
  declare class AppInitializerService {
1843
1895
  private _settingsService;
1844
1896
  private _connectorService;
1897
+ private _imageCacheService;
1845
1898
  appInitialized: BehaviorSubject<boolean>;
1846
- constructor(_settingsService: InphotoSettingsService, _connectorService: InPhotoConnectorService);
1899
+ constructor(_settingsService: InphotoSettingsService, _connectorService: InPhotoConnectorService, _imageCacheService: InphotoImageCacheService);
1847
1900
  initializeApp(options?: Settings): Promise<void>;
1848
1901
  static ɵfac: i0.ɵɵFactoryDeclaration<AppInitializerService, never>;
1849
1902
  static ɵprov: i0.ɵɵInjectableDeclaration<AppInitializerService>;
@@ -1934,6 +1987,7 @@ declare class SegmentInpaintComponent implements OnDestroy {
1934
1987
  segmentationObjects: SegmentationObject[];
1935
1988
  clearButtonDisabled: boolean;
1936
1989
  private _image;
1990
+ private _preparedObjects;
1937
1991
  private _inpaintImageState;
1938
1992
  private _subs;
1939
1993
  constructor(iconService: InphotoIconCacheService, _connectorService: InPhotoConnectorService, _loaderService: LoaderService, _errorService: ErrorService, _dataService: InphotoDataService, _eventService: InphotoEventService);
@@ -1954,6 +2008,7 @@ declare class SegmentInpaintComponent implements OnDestroy {
1954
2008
  private _handleError;
1955
2009
  private _resetSegmentation;
1956
2010
  private _handleLoader;
2011
+ private _prepareSegmentation;
1957
2012
  static ɵfac: i0.ɵɵFactoryDeclaration<SegmentInpaintComponent, never>;
1958
2013
  static ɵcmp: i0.ɵɵComponentDeclaration<SegmentInpaintComponent, "co-segment-inpaint", never, { "image": { "alias": "image"; "required": false; }; }, { "backToEditMenuClick": "backToEditMenuClick"; }, never, never, false, never>;
1959
2014
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colijnit/inphoto",
3
- "version": "301.1.5",
3
+ "version": "301.1.6",
4
4
  "description": "Colijn IT inphoto module for Angular 20",
5
5
  "repository": "npm/npm",
6
6
  "author": "Colijn IT",
@@ -11,17 +11,17 @@
11
11
  "@angular/common": ">=20.3.16",
12
12
  "@angular/core": ">=20.3.16",
13
13
  "@angular/forms": ">=20.3.16",
14
- "@colijnit/articleapi": ">=301.1.3",
15
- "@colijnit/catalog": ">=301.1.0",
16
- "@colijnit/configurator": ">=301.1.0",
17
- "@colijnit/configuratorapi": ">=301.1.1",
18
- "@colijnit/corecomponents_v12": ">=301.1.1",
19
- "@colijnit/ioneconnector": ">=301.1.0",
20
- "@colijnit/mainapi": ">=301.1.0",
21
- "@colijnit/render": ">=301.1.0",
22
- "@colijnit/renderapi": ">=301.1.0",
23
- "@colijnit/transactionapi": ">=301.1.0",
24
- "@colijnit/utilities": ">=301.1.0",
14
+ "@colijnit/articleapi": ">=301.1.5 < 302",
15
+ "@colijnit/catalog": ">=301.1.7 < 302",
16
+ "@colijnit/configurator": ">=301.1.7 < 302",
17
+ "@colijnit/configuratorapi": ">=301.1.3 < 302",
18
+ "@colijnit/corecomponents_v12": ">=301.1.5 < 302",
19
+ "@colijnit/ioneconnector": ">=301.1.1 < 302",
20
+ "@colijnit/mainapi": ">=301.1.7 < 302",
21
+ "@colijnit/render": ">=301.1.3 < 302",
22
+ "@colijnit/renderapi": ">=301.1.1 < 302",
23
+ "@colijnit/transactionapi": ">=301.1.0 < 302",
24
+ "@colijnit/utilities": ">=301.1.1 < 302",
25
25
  "@types/three": "0.178.1",
26
26
  "rxjs": "^7.4.0",
27
27
  "three": "0.178.0"
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file