@arsedizioni/ars-utils 20.3.65 → 20.4.1
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/clipper.common/index.d.ts +0 -39
- package/core/index.d.ts +0 -1
- package/evolution.common/index.d.ts +0 -39
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +4 -118
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +4 -117
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/package.json +8 -8
- package/support.common/index.d.ts +0 -1
- package/ui.application/index.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arsedizioni-ars-utils-support.common.mjs","sources":["../../../projects/ars-utils/support.common/common/messages.ts","../../../projects/ars-utils/support.common/common/definitions.ts","../../../projects/ars-utils/support.common/common/services/support.service.ts","../../../projects/ars-utils/support.common/common/common.module.ts","../../../projects/ars-utils/support.common/public_api.ts","../../../projects/ars-utils/support.common/arsedizioni-ars-utils-support.common.ts"],"sourcesContent":["export const SupportMessages = {\r\n /**\r\n * Messages\r\n */\r\n // Error\r\n ERROR: '§support-error',\r\n\r\n // Login\r\n LOGIN_CHANGED: '§support-login-changed',\r\n LOGIN_COMPLETED: '§support-login-completed',\r\n LOGOUT_COMPLETED: '§support-logout-completed',\r\n LOGIN_PENDING: '§support-login-pending',\r\n LOGOUT: '§support-logout',\r\n\r\n // Notifications\r\n NOTIFICATION_READ: '§support-notification-read',\r\n};\r\n","import { LoginResult } from '@arsedizioni/ars-utils/core';\r\nimport { LoginOAuthType } from '@arsedizioni/ars-utils/ui.oauth';\r\n\r\n\r\nexport interface SupportUserInfo {\r\n id: number;\r\n groups?: number;\r\n groupNames?: string;\r\n displayName?: string;\r\n dashboard?: string;\r\n sessionId?: string;\r\n email?: string;\r\n customerId?: number;\r\n companyName?: string;\r\n role: number;\r\n scopes?: string[];\r\n sla: number;\r\n isCommercial?: boolean;\r\n isAdministrator: boolean;\r\n isGuest: boolean;\r\n isUser: boolean;\r\n isOperator: boolean;\r\n isTemporary: boolean;\r\n}\r\n\r\n\r\nexport interface SupportLoginResult extends LoginResult<SupportUserInfo> {\r\n\r\n // Compatibilty\r\n token?: string;\r\n\r\n}\r\n\r\nexport interface SupportLoginInfo {\r\n context: SupportUserInfo;\r\n oauth?: LoginOAuthType;\r\n remember?: boolean;\r\n}\r\n\r\nexport interface SupportNotificationsSearchParams {\r\n any?: string;\r\n products?: number;\r\n productModules?: number;\r\n first?: number;\r\n count?: number;\r\n}\r\n\r\nexport interface SupportNotificationsSearchResult {\r\n interval?: string;\r\n items?: SupportNotificationInfo[];\r\n total?: number;\r\n}\r\n\r\nexport interface Notification {\r\n id: number;\r\n products: number;\r\n productModules?: number;\r\n publishingDate?: Date;\r\n title: string;\r\n text: string;\r\n state: number;\r\n created: Date;\r\n createdBy: string;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n productNames?: string;\r\n productModuleNames?: string;\r\n isPublished: boolean;\r\n isInternal: boolean;\r\n stateName: string;\r\n documents?: Document[];\r\n isRead: boolean;\r\n totalRead: number;\r\n}\r\n\r\nexport interface SupportDocumentInfo {\r\n id: number;\r\n origin?: number;\r\n ownerId?: number;\r\n name?: string;\r\n description?: string;\r\n size?: number;\r\n binaryId?: number;\r\n url?: string;\r\n customerId?: number;\r\n created?: Date;\r\n createdBy?: string;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n isBinary?: boolean;\r\n}\r\n\r\nexport interface SupportNotificationInfo {\r\n id: number;\r\n products?: number;\r\n productModules?: number;\r\n publishingDate?: Date;\r\n title: string;\r\n text: string;\r\n state: number;\r\n created: Date;\r\n createdBy: string;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n productNames?: string;\r\n productModuleNames?: string;\r\n isPublished: boolean;\r\n isInternal: boolean;\r\n stateName: string;\r\n documents?: Document[];\r\n isRead: boolean;\r\n totalRead: number;\r\n isMenuOpen?: boolean;\r\n isOver?: boolean;\r\n\r\n}\r\n\r\nexport interface SupportNotificationsMarkParams {\r\n ids: number[];\r\n unmark: boolean;\r\n}\r\n\r\nexport enum SupportProduct {\r\n None = 0,\r\n Clipper = 1,\r\n Evolution = 1 << 1,\r\n DGInfo = 1 << 2\r\n}\r\n\r\nexport enum SupportProductModule {\r\n None = 0,\r\n EvoFormazione = 1,\r\n EvoDPI = 1 << 1,\r\n EvoSorveglianzaSanitaria = 1 << 2,\r\n EvoRegistroEScadenzario = 1 << 3,\r\n EvoAttrezzatureEImpianti = 1 << 4,\r\n EvoMonitoraggio = 1 << 5,\r\n EvoBollettino = 1 << 6,\r\n DgiADR = 1 << 7,\r\n DgiRID = 1 << 8,\r\n DgiIMDG = 1 << 9,\r\n DgiCLP = 1 << 10,\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, OnDestroy, inject, signal } from '@angular/core';\r\nimport { ApiResult, BroadcastMessageInfo, BroadcastService } from '@arsedizioni/ars-utils/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { SupportMessages } from '../messages';\r\nimport { SupportNotificationInfo, SupportNotificationsMarkParams, SupportNotificationsSearchParams, SupportNotificationsSearchResult, SupportProduct, SupportProductModule } from '../definitions';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SupportService implements OnDestroy {\r\n\r\n private httpClient = inject(HttpClient);\r\n private broadcastService = inject(BroadcastService);\r\n private broadcastServiceSubscription?: Subscription;\r\n private _serviceUri?: string;\r\n get serviceUri(): string {\r\n return this._serviceUri;\r\n }\r\n public products: SupportProduct = SupportProduct.None;\r\n public productModules: SupportProductModule = SupportProductModule.None;\r\n\r\n public readonly unreadNotifications = signal<number | undefined>(undefined);\r\n\r\n ngOnDestroy() {\r\n // Clean-up\r\n if (this.broadcastServiceSubscription) {\r\n this.broadcastServiceSubscription.unsubscribe();\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Initialize service\r\n * @param serviceUri : the service uri\r\n * @param products: the supported products\r\n * @param productModules: the supported product modules\r\n */\r\n initialize(\r\n serviceUri: string,\r\n products: SupportProduct = SupportProduct.None,\r\n productModules: SupportProductModule = SupportProductModule.None) {\r\n\r\n // Initialize\r\n this._serviceUri = serviceUri;\r\n this.products = products;\r\n this.productModules = productModules;\r\n\r\n // React to message broadcasting\r\n if (!this.broadcastServiceSubscription) {\r\n this.broadcastServiceSubscription = this.broadcastService.getMessage().subscribe((message: BroadcastMessageInfo) => {\r\n if (message.id === SupportMessages.NOTIFICATION_READ) {\r\n this.countUnreadNotifications();\r\n }\r\n });\r\n }\r\n }\r\n\r\n ////\r\n // NOTIFICATIONS\r\n ////\r\n\r\n /**\r\n * Count unread notifications\r\n */\r\n countUnreadNotifications() {\r\n this.httpClient.get<ApiResult<number>>(\r\n this._serviceUri + '/notifications/unread/?products=' + (this.products ?? 0) + \"&modules=\" + (this.productModules ?? 0)\r\n ).subscribe((r: ApiResult<number>) => {\r\n if (r.success) {\r\n this.unreadNotifications.set(r.value > 0 ? r.value : undefined)\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Query notifications\r\n * @param params: query parameters\r\n */\r\n queryNotifications(params: SupportNotificationsSearchParams) {\r\n params.products = this.products ?? 0;\r\n params.productModules = this.productModules ?? 0;\r\n return this.httpClient.post<ApiResult<SupportNotificationsSearchResult>>(\r\n this._serviceUri + '/notifications',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve a notification\r\n * @param id: the notification id\r\n */\r\n getNotification(id: number) {\r\n return this.httpClient.get<ApiResult<SupportNotificationInfo>>(\r\n this._serviceUri +\r\n '/notifications/' +\r\n id\r\n );\r\n }\r\n\r\n /**\r\n * Mark a group of notifications as read\r\n * @param ids: the array of notification's ids to set as read\r\n */\r\n markNotifications(params: SupportNotificationsMarkParams) {\r\n return this.httpClient.post<ApiResult<boolean>>(\r\n this._serviceUri + '/notifications/mark',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Download a notification document\r\n * @param documentId : the notification document id\r\n */\r\n dowloadNotificationDocument(documentId: number) {\r\n return this.httpClient.get(\r\n this._serviceUri + '/documents/download/' + documentId,\r\n { responseType: 'blob' }\r\n );\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\n\r\n@NgModule()\r\nexport class ArsSupportCommonModule {}\r\n\r\n// Other exports\r\nexport * from './messages';\r\nexport * from './definitions';\r\nexport * from './services/support.service';\r\n","/*\r\n * Public API Surface of ars-utils\r\n */\r\nexport * from './common/common.module';\r\nexport * from './common/messages';\r\nexport * from './common/definitions';\r\nexport * from './common/services/support.service';\r\n\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAAO,MAAM,eAAe,GAAG;AAC7B;;AAEG;;AAEH,IAAA,KAAK,EAAE,gBAAgB;;AAGvB,IAAA,aAAa,EAAE,wBAAwB;AACvC,IAAA,eAAe,EAAE,0BAA0B;AAC3C,IAAA,gBAAgB,EAAE,2BAA2B;AAC7C,IAAA,aAAa,EAAE,wBAAwB;AACvC,IAAA,MAAM,EAAE,iBAAiB;;AAGzB,IAAA,iBAAiB,EAAE,4BAA4B;;;IC2GrC;AAAZ,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,cAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;AACR,IAAA,cAAA,CAAA,cAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW;AACX,IAAA,cAAA,CAAA,cAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAkB;AAClB,IAAA,cAAA,CAAA,cAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAe;AACnB,CAAC,EALW,cAAc,KA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,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA,CAAA;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;MCPY,sBAAsB,CAAA;8GAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAtB,sBAAsB,EAAA,CAAA,CAAA;+GAAtB,sBAAsB,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC;;;ACFD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"arsedizioni-ars-utils-support.common.mjs","sources":["../../../projects/ars-utils/support.common/common/messages.ts","../../../projects/ars-utils/support.common/common/definitions.ts","../../../projects/ars-utils/support.common/common/services/support.service.ts","../../../projects/ars-utils/support.common/common/common.module.ts","../../../projects/ars-utils/support.common/public_api.ts","../../../projects/ars-utils/support.common/arsedizioni-ars-utils-support.common.ts"],"sourcesContent":["export const SupportMessages = {\r\n /**\r\n * Messages\r\n */\r\n // Error\r\n ERROR: '§support-error',\r\n\r\n // Login\r\n LOGIN_CHANGED: '§support-login-changed',\r\n LOGIN_COMPLETED: '§support-login-completed',\r\n LOGOUT_COMPLETED: '§support-logout-completed',\r\n LOGIN_PENDING: '§support-login-pending',\r\n LOGOUT: '§support-logout',\r\n\r\n // Notifications\r\n NOTIFICATION_READ: '§support-notification-read',\r\n};\r\n","import { LoginResult } from '@arsedizioni/ars-utils/core';\r\nimport { LoginOAuthType } from '@arsedizioni/ars-utils/ui.oauth';\r\n\r\n\r\nexport interface SupportUserInfo {\r\n id: number;\r\n groups?: number;\r\n groupNames?: string;\r\n displayName?: string;\r\n dashboard?: string;\r\n sessionId?: string;\r\n email?: string;\r\n customerId?: number;\r\n companyName?: string;\r\n role: number;\r\n scopes?: string[];\r\n sla: number;\r\n isCommercial?: boolean;\r\n isAdministrator: boolean;\r\n isGuest: boolean;\r\n isUser: boolean;\r\n isOperator: boolean;\r\n isTemporary: boolean;\r\n}\r\n\r\n\r\nexport interface SupportLoginResult extends LoginResult<SupportUserInfo> {\r\n}\r\n\r\nexport interface SupportLoginInfo {\r\n context: SupportUserInfo;\r\n oauth?: LoginOAuthType;\r\n remember?: boolean;\r\n}\r\n\r\nexport interface SupportNotificationsSearchParams {\r\n any?: string;\r\n products?: number;\r\n productModules?: number;\r\n first?: number;\r\n count?: number;\r\n}\r\n\r\nexport interface SupportNotificationsSearchResult {\r\n interval?: string;\r\n items?: SupportNotificationInfo[];\r\n total?: number;\r\n}\r\n\r\nexport interface Notification {\r\n id: number;\r\n products: number;\r\n productModules?: number;\r\n publishingDate?: Date;\r\n title: string;\r\n text: string;\r\n state: number;\r\n created: Date;\r\n createdBy: string;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n productNames?: string;\r\n productModuleNames?: string;\r\n isPublished: boolean;\r\n isInternal: boolean;\r\n stateName: string;\r\n documents?: Document[];\r\n isRead: boolean;\r\n totalRead: number;\r\n}\r\n\r\nexport interface SupportDocumentInfo {\r\n id: number;\r\n origin?: number;\r\n ownerId?: number;\r\n name?: string;\r\n description?: string;\r\n size?: number;\r\n binaryId?: number;\r\n url?: string;\r\n customerId?: number;\r\n created?: Date;\r\n createdBy?: string;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n isBinary?: boolean;\r\n}\r\n\r\nexport interface SupportNotificationInfo {\r\n id: number;\r\n products?: number;\r\n productModules?: number;\r\n publishingDate?: Date;\r\n title: string;\r\n text: string;\r\n state: number;\r\n created: Date;\r\n createdBy: string;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n productNames?: string;\r\n productModuleNames?: string;\r\n isPublished: boolean;\r\n isInternal: boolean;\r\n stateName: string;\r\n documents?: Document[];\r\n isRead: boolean;\r\n totalRead: number;\r\n isMenuOpen?: boolean;\r\n isOver?: boolean;\r\n\r\n}\r\n\r\nexport interface SupportNotificationsMarkParams {\r\n ids: number[];\r\n unmark: boolean;\r\n}\r\n\r\nexport enum SupportProduct {\r\n None = 0,\r\n Clipper = 1,\r\n Evolution = 1 << 1,\r\n DGInfo = 1 << 2\r\n}\r\n\r\nexport enum SupportProductModule {\r\n None = 0,\r\n EvoFormazione = 1,\r\n EvoDPI = 1 << 1,\r\n EvoSorveglianzaSanitaria = 1 << 2,\r\n EvoRegistroEScadenzario = 1 << 3,\r\n EvoAttrezzatureEImpianti = 1 << 4,\r\n EvoMonitoraggio = 1 << 5,\r\n EvoBollettino = 1 << 6,\r\n DgiADR = 1 << 7,\r\n DgiRID = 1 << 8,\r\n DgiIMDG = 1 << 9,\r\n DgiCLP = 1 << 10,\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, OnDestroy, inject, signal } from '@angular/core';\r\nimport { ApiResult, BroadcastMessageInfo, BroadcastService } from '@arsedizioni/ars-utils/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { SupportMessages } from '../messages';\r\nimport { SupportNotificationInfo, SupportNotificationsMarkParams, SupportNotificationsSearchParams, SupportNotificationsSearchResult, SupportProduct, SupportProductModule } from '../definitions';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SupportService implements OnDestroy {\r\n\r\n private httpClient = inject(HttpClient);\r\n private broadcastService = inject(BroadcastService);\r\n private broadcastServiceSubscription?: Subscription;\r\n private _serviceUri?: string;\r\n get serviceUri(): string {\r\n return this._serviceUri;\r\n }\r\n public products: SupportProduct = SupportProduct.None;\r\n public productModules: SupportProductModule = SupportProductModule.None;\r\n\r\n public readonly unreadNotifications = signal<number | undefined>(undefined);\r\n\r\n ngOnDestroy() {\r\n // Clean-up\r\n if (this.broadcastServiceSubscription) {\r\n this.broadcastServiceSubscription.unsubscribe();\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Initialize service\r\n * @param serviceUri : the service uri\r\n * @param products: the supported products\r\n * @param productModules: the supported product modules\r\n */\r\n initialize(\r\n serviceUri: string,\r\n products: SupportProduct = SupportProduct.None,\r\n productModules: SupportProductModule = SupportProductModule.None) {\r\n\r\n // Initialize\r\n this._serviceUri = serviceUri;\r\n this.products = products;\r\n this.productModules = productModules;\r\n\r\n // React to message broadcasting\r\n if (!this.broadcastServiceSubscription) {\r\n this.broadcastServiceSubscription = this.broadcastService.getMessage().subscribe((message: BroadcastMessageInfo) => {\r\n if (message.id === SupportMessages.NOTIFICATION_READ) {\r\n this.countUnreadNotifications();\r\n }\r\n });\r\n }\r\n }\r\n\r\n ////\r\n // NOTIFICATIONS\r\n ////\r\n\r\n /**\r\n * Count unread notifications\r\n */\r\n countUnreadNotifications() {\r\n this.httpClient.get<ApiResult<number>>(\r\n this._serviceUri + '/notifications/unread/?products=' + (this.products ?? 0) + \"&modules=\" + (this.productModules ?? 0)\r\n ).subscribe((r: ApiResult<number>) => {\r\n if (r.success) {\r\n this.unreadNotifications.set(r.value > 0 ? r.value : undefined)\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Query notifications\r\n * @param params: query parameters\r\n */\r\n queryNotifications(params: SupportNotificationsSearchParams) {\r\n params.products = this.products ?? 0;\r\n params.productModules = this.productModules ?? 0;\r\n return this.httpClient.post<ApiResult<SupportNotificationsSearchResult>>(\r\n this._serviceUri + '/notifications',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve a notification\r\n * @param id: the notification id\r\n */\r\n getNotification(id: number) {\r\n return this.httpClient.get<ApiResult<SupportNotificationInfo>>(\r\n this._serviceUri +\r\n '/notifications/' +\r\n id\r\n );\r\n }\r\n\r\n /**\r\n * Mark a group of notifications as read\r\n * @param ids: the array of notification's ids to set as read\r\n */\r\n markNotifications(params: SupportNotificationsMarkParams) {\r\n return this.httpClient.post<ApiResult<boolean>>(\r\n this._serviceUri + '/notifications/mark',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Download a notification document\r\n * @param documentId : the notification document id\r\n */\r\n dowloadNotificationDocument(documentId: number) {\r\n return this.httpClient.get(\r\n this._serviceUri + '/documents/download/' + documentId,\r\n { responseType: 'blob' }\r\n );\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\n\r\n@NgModule()\r\nexport class ArsSupportCommonModule {}\r\n\r\n// Other exports\r\nexport * from './messages';\r\nexport * from './definitions';\r\nexport * from './services/support.service';\r\n","/*\r\n * Public API Surface of ars-utils\r\n */\r\nexport * from './common/common.module';\r\nexport * from './common/messages';\r\nexport * from './common/definitions';\r\nexport * from './common/services/support.service';\r\n\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAAO,MAAM,eAAe,GAAG;AAC7B;;AAEG;;AAEH,IAAA,KAAK,EAAE,gBAAgB;;AAGvB,IAAA,aAAa,EAAE,wBAAwB;AACvC,IAAA,eAAe,EAAE,0BAA0B;AAC3C,IAAA,gBAAgB,EAAE,2BAA2B;AAC7C,IAAA,aAAa,EAAE,wBAAwB;AACvC,IAAA,MAAM,EAAE,iBAAiB;;AAGzB,IAAA,iBAAiB,EAAE,4BAA4B;;;ICuGrC;AAAZ,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,cAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;AACR,IAAA,cAAA,CAAA,cAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW;AACX,IAAA,cAAA,CAAA,cAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAkB;AAClB,IAAA,cAAA,CAAA,cAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAe;AACnB,CAAC,EALW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;IAOd;AAAZ,CAAA,UAAY,oB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AAc,cAFb,MAAM,EAAA,CAAA,CAAA;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;MCPY,sBAAsB,CAAA;8GAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAtB,sBAAsB,EAAA,CAAA,CAAA;+GAAtB,sBAAsB,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC;;;ACFD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arsedizioni/ars-utils",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.4.1",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "software@arsedizioni.it",
|
|
6
6
|
"name": "Fabio Buscaroli, Alberto Doria"
|
|
@@ -36,22 +36,22 @@
|
|
|
36
36
|
"types": "./clipper.common/index.d.ts",
|
|
37
37
|
"default": "./fesm2022/arsedizioni-ars-utils-clipper.common.mjs"
|
|
38
38
|
},
|
|
39
|
-
"./core": {
|
|
40
|
-
"types": "./core/index.d.ts",
|
|
41
|
-
"default": "./fesm2022/arsedizioni-ars-utils-core.mjs"
|
|
42
|
-
},
|
|
43
39
|
"./clipper.ui": {
|
|
44
40
|
"types": "./clipper.ui/index.d.ts",
|
|
45
41
|
"default": "./fesm2022/arsedizioni-ars-utils-clipper.ui.mjs"
|
|
46
42
|
},
|
|
47
|
-
"./
|
|
48
|
-
"types": "./
|
|
49
|
-
"default": "./fesm2022/arsedizioni-ars-utils-
|
|
43
|
+
"./core": {
|
|
44
|
+
"types": "./core/index.d.ts",
|
|
45
|
+
"default": "./fesm2022/arsedizioni-ars-utils-core.mjs"
|
|
50
46
|
},
|
|
51
47
|
"./help": {
|
|
52
48
|
"types": "./help/index.d.ts",
|
|
53
49
|
"default": "./fesm2022/arsedizioni-ars-utils-help.mjs"
|
|
54
50
|
},
|
|
51
|
+
"./evolution.common": {
|
|
52
|
+
"types": "./evolution.common/index.d.ts",
|
|
53
|
+
"default": "./fesm2022/arsedizioni-ars-utils-evolution.common.mjs"
|
|
54
|
+
},
|
|
55
55
|
"./support.common": {
|
|
56
56
|
"types": "./support.common/index.d.ts",
|
|
57
57
|
"default": "./fesm2022/arsedizioni-ars-utils-support.common.mjs"
|
|
@@ -1056,7 +1056,7 @@ declare class ChipsSelectorComponent implements OnInit, OnDestroy, AfterContentI
|
|
|
1056
1056
|
private changesEnabled;
|
|
1057
1057
|
readonly options: _angular_core.InputSignal<NameValueItem<any>[]>;
|
|
1058
1058
|
readonly collapsedWidth: _angular_core.InputSignal<number>;
|
|
1059
|
-
readonly collapsedDisplayMode: _angular_core.InputSignal<"
|
|
1059
|
+
readonly collapsedDisplayMode: _angular_core.InputSignal<"dropdown" | "button">;
|
|
1060
1060
|
readonly collapseAt: _angular_core.InputSignal<number>;
|
|
1061
1061
|
readonly collapseAtContainer: _angular_core.InputSignal<boolean>;
|
|
1062
1062
|
protected collapsed: Signal<boolean>;
|