@fundamental-ngx/core 0.33.3 → 0.33.4-rc.11
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/README.md +1 -3
- package/action-bar/package.json +1 -1
- package/action-sheet/package.json +1 -1
- package/alert/package.json +1 -1
- package/avatar/package.json +1 -1
- package/avatar-group/package.json +1 -1
- package/bar/package.json +1 -1
- package/breadcrumb/package.json +1 -1
- package/busy-indicator/package.json +1 -1
- package/button/package.json +1 -1
- package/calendar/package.json +1 -1
- package/card/package.json +1 -1
- package/carousel/package.json +1 -1
- package/checkbox/checkbox/checkbox.component.d.ts +30 -35
- package/checkbox/esm2020/checkbox/checkbox.component.mjs +61 -80
- package/checkbox/fesm2015/fundamental-ngx-core-checkbox.mjs +59 -77
- package/checkbox/fesm2015/fundamental-ngx-core-checkbox.mjs.map +1 -1
- package/checkbox/fesm2020/fundamental-ngx-core-checkbox.mjs +59 -77
- package/checkbox/fesm2020/fundamental-ngx-core-checkbox.mjs.map +1 -1
- package/checkbox/package.json +1 -1
- package/combobox/package.json +1 -1
- package/date-picker/package.json +1 -1
- package/datetime/package.json +1 -1
- package/datetime-picker/package.json +1 -1
- package/dialog/package.json +1 -1
- package/dynamic-page/package.json +1 -1
- package/dynamic-side-content/package.json +1 -1
- package/esm2020/checkbox/checkbox/checkbox.component.mjs +61 -80
- package/esm2020/list/list-item/list-item.component.mjs +6 -2
- package/esm2020/message-box/message-box-body/message-box-body.component.mjs +12 -10
- package/esm2020/message-box/message-box-footer/message-box-footer.component.mjs +12 -9
- package/esm2020/message-box/message-box-header/message-box-header.component.mjs +30 -16
- package/esm2020/message-box/message-box-semantic-icon/message-box-semantic-icon.component.mjs +12 -14
- package/esm2020/message-box/message-box.component.mjs +5 -15
- package/esm2020/message-box/utils/message-box-config.class.mjs +3 -2
- package/esm2020/multi-input/multi-input.component.mjs +38 -11
- package/esm2020/upload-collection/upload-collection-item.directive.mjs +81 -8
- package/esm2020/utils/helpers/range-selector.mjs +113 -0
- package/esm2020/utils/public_api.mjs +2 -1
- package/facets/package.json +1 -1
- package/feed-input/package.json +1 -1
- package/feed-list-item/package.json +1 -1
- package/fesm2015/fundamental-ngx-core-checkbox.mjs +59 -77
- package/fesm2015/fundamental-ngx-core-checkbox.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-list.mjs +5 -1
- package/fesm2015/fundamental-ngx-core-list.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-message-box.mjs +67 -56
- package/fesm2015/fundamental-ngx-core-message-box.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-multi-input.mjs +40 -11
- package/fesm2015/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-upload-collection.mjs +80 -7
- package/fesm2015/fundamental-ngx-core-upload-collection.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-utils.mjs +114 -1
- package/fesm2015/fundamental-ngx-core-utils.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-checkbox.mjs +59 -77
- package/fesm2020/fundamental-ngx-core-checkbox.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-list.mjs +5 -1
- package/fesm2020/fundamental-ngx-core-list.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-message-box.mjs +62 -55
- package/fesm2020/fundamental-ngx-core-message-box.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-multi-input.mjs +38 -11
- package/fesm2020/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-upload-collection.mjs +80 -7
- package/fesm2020/fundamental-ngx-core-upload-collection.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-utils.mjs +114 -1
- package/fesm2020/fundamental-ngx-core-utils.mjs.map +1 -1
- package/file-uploader/package.json +1 -1
- package/fixed-card-layout/package.json +1 -1
- package/flexible-column-layout/package.json +1 -1
- package/form/package.json +1 -1
- package/formatted-text/package.json +1 -1
- package/grid-list/package.json +1 -1
- package/icon/package.json +1 -1
- package/illustrated-message/package.json +1 -1
- package/infinite-scroll/package.json +1 -1
- package/info-label/package.json +1 -1
- package/inline-help/package.json +1 -1
- package/input-group/package.json +1 -1
- package/layout-grid/package.json +1 -1
- package/layout-panel/package.json +1 -1
- package/link/package.json +1 -1
- package/list/esm2020/list-item/list-item.component.mjs +6 -2
- package/list/fesm2015/fundamental-ngx-core-list.mjs +5 -1
- package/list/fesm2015/fundamental-ngx-core-list.mjs.map +1 -1
- package/list/fesm2020/fundamental-ngx-core-list.mjs +5 -1
- package/list/fesm2020/fundamental-ngx-core-list.mjs.map +1 -1
- package/list/package.json +1 -1
- package/menu/package.json +1 -1
- package/message-box/esm2020/message-box-body/message-box-body.component.mjs +12 -10
- package/message-box/esm2020/message-box-footer/message-box-footer.component.mjs +12 -9
- package/message-box/esm2020/message-box-header/message-box-header.component.mjs +30 -16
- package/message-box/esm2020/message-box-semantic-icon/message-box-semantic-icon.component.mjs +12 -14
- package/message-box/esm2020/message-box.component.mjs +5 -15
- package/message-box/esm2020/utils/message-box-config.class.mjs +3 -2
- package/message-box/fesm2015/fundamental-ngx-core-message-box.mjs +67 -56
- package/message-box/fesm2015/fundamental-ngx-core-message-box.mjs.map +1 -1
- package/message-box/fesm2020/fundamental-ngx-core-message-box.mjs +62 -55
- package/message-box/fesm2020/fundamental-ngx-core-message-box.mjs.map +1 -1
- package/message-box/message-box-body/message-box-body.component.d.ts +6 -4
- package/message-box/message-box-footer/message-box-footer.component.d.ts +6 -4
- package/message-box/message-box-header/message-box-header.component.d.ts +16 -8
- package/message-box/message-box-semantic-icon/message-box-semantic-icon.component.d.ts +6 -4
- package/message-box/message-box.component.d.ts +4 -9
- package/message-box/package.json +1 -1
- package/message-box/utils/message-box-config.class.d.ts +2 -4
- package/message-strip/package.json +1 -1
- package/message-toast/package.json +1 -1
- package/micro-process-flow/package.json +1 -1
- package/mobile-mode/package.json +1 -1
- package/multi-input/esm2020/multi-input.component.mjs +38 -11
- package/multi-input/fesm2015/fundamental-ngx-core-multi-input.mjs +40 -11
- package/multi-input/fesm2015/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/multi-input/fesm2020/fundamental-ngx-core-multi-input.mjs +38 -11
- package/multi-input/fesm2020/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/multi-input/multi-input.component.d.ts +8 -1
- package/multi-input/package.json +1 -1
- package/nested-list/package.json +1 -1
- package/notification/package.json +1 -1
- package/object-identifier/package.json +1 -1
- package/object-marker/package.json +1 -1
- package/object-number/package.json +1 -1
- package/object-status/package.json +1 -1
- package/package.json +1 -1
- package/pagination/package.json +1 -1
- package/panel/package.json +1 -1
- package/popover/package.json +1 -1
- package/product-switch/package.json +1 -1
- package/progress-indicator/package.json +1 -1
- package/quick-view/package.json +1 -1
- package/radio/package.json +1 -1
- package/rating-indicator/package.json +1 -1
- package/resizable-card-layout/package.json +1 -1
- package/scroll-spy/package.json +1 -1
- package/scrollbar/package.json +1 -1
- package/segmented-button/package.json +1 -1
- package/select/package.json +1 -1
- package/shared/package.json +1 -1
- package/shellbar/package.json +1 -1
- package/side-navigation/package.json +1 -1
- package/slider/package.json +1 -1
- package/split-button/package.json +1 -1
- package/splitter/package.json +1 -1
- package/status-indicator/package.json +1 -1
- package/step-input/package.json +1 -1
- package/switch/package.json +1 -1
- package/table/package.json +1 -1
- package/tabs/package.json +1 -1
- package/text/package.json +1 -1
- package/tile/package.json +1 -1
- package/time/package.json +1 -1
- package/time-picker/package.json +1 -1
- package/timeline/package.json +1 -1
- package/title/package.json +1 -1
- package/token/package.json +1 -1
- package/toolbar/package.json +1 -1
- package/tree/package.json +1 -1
- package/upload-collection/esm2020/upload-collection-item.directive.mjs +81 -8
- package/upload-collection/fesm2015/fundamental-ngx-core-upload-collection.mjs +80 -7
- package/upload-collection/fesm2015/fundamental-ngx-core-upload-collection.mjs.map +1 -1
- package/upload-collection/fesm2020/fundamental-ngx-core-upload-collection.mjs +80 -7
- package/upload-collection/fesm2020/fundamental-ngx-core-upload-collection.mjs.map +1 -1
- package/upload-collection/package.json +1 -1
- package/upload-collection/upload-collection-item.directive.d.ts +32 -2
- package/utils/esm2020/helpers/range-selector.mjs +113 -0
- package/utils/esm2020/public_api.mjs +2 -1
- package/utils/fesm2015/fundamental-ngx-core-utils.mjs +114 -1
- package/utils/fesm2015/fundamental-ngx-core-utils.mjs.map +1 -1
- package/utils/fesm2020/fundamental-ngx-core-utils.mjs +114 -1
- package/utils/fesm2020/fundamental-ngx-core-utils.mjs.map +1 -1
- package/utils/helpers/range-selector.d.ts +84 -0
- package/utils/package.json +1 -1
- package/utils/public_api.d.ts +1 -0
- package/vertical-navigation/package.json +1 -1
- package/wizard/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, ContentChildren, HostBinding, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, EventEmitter, Output, ViewChild, ContentChild, NgModule } from '@angular/core';
|
|
2
|
+
import { Directive, ContentChildren, HostBinding, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, EventEmitter, Output, ViewChild, ContentChild, HostListener, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { ObjectMarkerComponent } from '@fundamental-ngx/core/object-marker';
|
|
@@ -274,7 +274,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
274
274
|
}] } });
|
|
275
275
|
|
|
276
276
|
class UploadCollectionItemDirective {
|
|
277
|
-
constructor() {
|
|
277
|
+
constructor(elementRef) {
|
|
278
|
+
this.elementRef = elementRef;
|
|
278
279
|
/** Event emitted when the user changes a file name. */
|
|
279
280
|
this.fileNameChanged = new EventEmitter();
|
|
280
281
|
/** Event emitted when presses the delete button. */
|
|
@@ -284,23 +285,52 @@ class UploadCollectionItemDirective {
|
|
|
284
285
|
}
|
|
285
286
|
/** @hidden */
|
|
286
287
|
ngAfterContentInit() {
|
|
287
|
-
this.
|
|
288
|
+
this.fileNameFull = this.fileName + '.' + this.extension;
|
|
289
|
+
this._titleDirective.elRef.nativeElement.innerHTML = this.fileNameFull;
|
|
288
290
|
this._handleDeleteClickedSubscription();
|
|
289
291
|
this._handleOkClickedSubscription();
|
|
290
292
|
this._handleEditClickedSubscription();
|
|
291
293
|
this._handleFormItemInputChangedSubscription();
|
|
292
294
|
}
|
|
293
295
|
/** @hidden */
|
|
296
|
+
ngAfterViewInit() {
|
|
297
|
+
this.onResize();
|
|
298
|
+
}
|
|
299
|
+
/** @hidden */
|
|
294
300
|
ngOnDestroy() {
|
|
295
301
|
this._subscriptions.unsubscribe();
|
|
296
302
|
}
|
|
297
303
|
/** @hidden */
|
|
304
|
+
onResize() {
|
|
305
|
+
if (!this.elementRef.nativeElement.parentElement) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
this.titleWidth = this.getTitleWidth();
|
|
309
|
+
this.containerWidth = this.getContainerWidth();
|
|
310
|
+
// if first load and no previous container width, or if container boundary is resized to smaller than before
|
|
311
|
+
if (!this.previousContainerWidth || this.containerWidth < this.previousContainerWidth) {
|
|
312
|
+
// and the title extends past the container, 1.05x padding to prevent jaggy resizing.
|
|
313
|
+
if (this.titleWidth * 1.05 >= this.containerWidth) {
|
|
314
|
+
this.resizeFileTitle(this._titleDirective.elRef.nativeElement.innerHTML);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
else if (this.previousContainerWidth && this.containerWidth > this.previousContainerWidth) {
|
|
318
|
+
// Looks to expand file title if container width is resized to greater than before
|
|
319
|
+
// reset file title to initial
|
|
320
|
+
this._titleDirective.elRef.nativeElement.innerHTML = this.fileNameFull;
|
|
321
|
+
this.resizeFileTitle(this.fileNameFull);
|
|
322
|
+
}
|
|
323
|
+
this.previousContainerWidth = this.containerWidth;
|
|
324
|
+
}
|
|
325
|
+
/** @hidden */
|
|
298
326
|
_handleOkClickedSubscription() {
|
|
299
327
|
this._subscriptions.add(this._buttonGroupComponent.okClicked.subscribe(() => {
|
|
300
328
|
if (this._formItemComponent.fileName && this._formItemComponent.fileName !== '') {
|
|
301
329
|
this.fileName = this._formItemComponent.fileName;
|
|
302
330
|
this._titleDirective.elRef.nativeElement.style.display = 'inline-block';
|
|
303
|
-
this.
|
|
331
|
+
this.fileNameFull = this.fileName + '.' + this.extension;
|
|
332
|
+
this._titleDirective.elRef.nativeElement.innerHTML = this.fileNameFull;
|
|
333
|
+
this.resizeFileTitle(this.fileNameFull);
|
|
304
334
|
this._formItemComponent._editMode = false;
|
|
305
335
|
this._buttonGroupComponent._editMode = false;
|
|
306
336
|
this.fileNameChanged.emit(this);
|
|
@@ -342,9 +372,49 @@ class UploadCollectionItemDirective {
|
|
|
342
372
|
this._buttonGroupComponent._okButton.buildComponentCssClass();
|
|
343
373
|
}));
|
|
344
374
|
}
|
|
375
|
+
/** @hidden */
|
|
376
|
+
getTitleWidth() {
|
|
377
|
+
return this._titleDirective.elRef.nativeElement.getBoundingClientRect().width;
|
|
378
|
+
}
|
|
379
|
+
/** @hidden */
|
|
380
|
+
getContainerWidth() {
|
|
381
|
+
return this._titleDirective.elRef.nativeElement.parentElement.getBoundingClientRect().width;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* @hidden
|
|
385
|
+
*
|
|
386
|
+
* truncates the string by cutting out excess length in the middle and replacing with '...'
|
|
387
|
+
*/
|
|
388
|
+
truncateTitle(str) {
|
|
389
|
+
const cutLength = Math.floor(str.length * 0.8);
|
|
390
|
+
if (str.length > cutLength) {
|
|
391
|
+
const stringLeftIndex = Math.floor(cutLength / 2);
|
|
392
|
+
const stringRightIndex = str.length - stringLeftIndex + 3;
|
|
393
|
+
return str.substring(0, stringLeftIndex) + '... ' + str.substring(stringRightIndex, str.length);
|
|
394
|
+
}
|
|
395
|
+
return str;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* @hidden
|
|
399
|
+
*
|
|
400
|
+
* determines if file title needs to be truncated given container constraint.
|
|
401
|
+
*/
|
|
402
|
+
resizeFileTitle(titleStr) {
|
|
403
|
+
let curTitle = titleStr;
|
|
404
|
+
this.containerWidth = this.getContainerWidth();
|
|
405
|
+
this.titleWidth = this.getTitleWidth();
|
|
406
|
+
// repeatedly truncate the title until it fits inside container
|
|
407
|
+
while (this.titleWidth * 1.05 >= this.containerWidth) {
|
|
408
|
+
const truncatedTitleStr = this.truncateTitle(curTitle);
|
|
409
|
+
this._titleDirective.elRef.nativeElement.innerHTML = truncatedTitleStr;
|
|
410
|
+
curTitle = truncatedTitleStr;
|
|
411
|
+
this.titleWidth = this.getTitleWidth();
|
|
412
|
+
this.containerWidth = this.getContainerWidth();
|
|
413
|
+
}
|
|
414
|
+
}
|
|
345
415
|
}
|
|
346
|
-
UploadCollectionItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: UploadCollectionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
347
|
-
UploadCollectionItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.2", type: UploadCollectionItemDirective, selector: "[fd-upload-collection-item]", inputs: { fileName: "fileName", extension: "extension" }, outputs: { fileNameChanged: "fileNameChanged", deleteClicked: "deleteClicked" }, host: { classAttribute: "fd-upload-collection__item" }, queries: [{ propertyName: "_formItemComponent", first: true, predicate: UploadCollectionFormItemComponent, descendants: true }, { propertyName: "_titleDirective", first: true, predicate: UploadCollectionTitleDirective, descendants: true }, { propertyName: "_buttonGroupComponent", first: true, predicate: UploadCollectionButtonGroupComponent, descendants: true }, { propertyName: "_titleContainerDirective", first: true, predicate: UploadCollectionTitleContainerDirective, descendants: true }], ngImport: i0 });
|
|
416
|
+
UploadCollectionItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: UploadCollectionItemDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
417
|
+
UploadCollectionItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.2", type: UploadCollectionItemDirective, selector: "[fd-upload-collection-item]", inputs: { fileName: "fileName", extension: "extension" }, outputs: { fileNameChanged: "fileNameChanged", deleteClicked: "deleteClicked" }, host: { listeners: { "window:resize": "onResize()" }, classAttribute: "fd-upload-collection__item" }, queries: [{ propertyName: "_formItemComponent", first: true, predicate: UploadCollectionFormItemComponent, descendants: true }, { propertyName: "_titleDirective", first: true, predicate: UploadCollectionTitleDirective, descendants: true }, { propertyName: "_buttonGroupComponent", first: true, predicate: UploadCollectionButtonGroupComponent, descendants: true }, { propertyName: "_titleContainerDirective", first: true, predicate: UploadCollectionTitleContainerDirective, descendants: true }], ngImport: i0 });
|
|
348
418
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: UploadCollectionItemDirective, decorators: [{
|
|
349
419
|
type: Directive,
|
|
350
420
|
args: [{
|
|
@@ -352,7 +422,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
352
422
|
selector: '[fd-upload-collection-item]',
|
|
353
423
|
host: { class: 'fd-upload-collection__item' }
|
|
354
424
|
}]
|
|
355
|
-
}], propDecorators: { fileName: [{
|
|
425
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { fileName: [{
|
|
356
426
|
type: Input
|
|
357
427
|
}], extension: [{
|
|
358
428
|
type: Input
|
|
@@ -372,6 +442,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
|
|
|
372
442
|
type: Output
|
|
373
443
|
}], deleteClicked: [{
|
|
374
444
|
type: Output
|
|
445
|
+
}], onResize: [{
|
|
446
|
+
type: HostListener,
|
|
447
|
+
args: ['window:resize', []]
|
|
375
448
|
}] } });
|
|
376
449
|
|
|
377
450
|
class UploadCollectionModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-upload-collection.mjs","sources":["../../../../libs/core/src/lib/upload-collection/upload-collection-simple.directives.ts","../../../../libs/core/src/lib/upload-collection/upload-collection.component.ts","../../../../libs/core/src/lib/upload-collection/upload-collection-button-group/upload-collection-button-group.component.ts","../../../../libs/core/src/lib/upload-collection/upload-collection-button-group/upload-collection-button-group.component.html","../../../../libs/core/src/lib/upload-collection/upload-collection-form-item/upload-collection-form-item.component.ts","../../../../libs/core/src/lib/upload-collection/upload-collection-form-item/upload-collection-form-item.component.html","../../../../libs/core/src/lib/upload-collection/upload-collection-item.directive.ts","../../../../libs/core/src/lib/upload-collection/upload-collection.module.ts","../../../../libs/core/src/lib/upload-collection/fundamental-ngx-core-upload-collection.ts"],"sourcesContent":["import { ContentChildren, Directive, ElementRef, HostBinding, QueryList } from '@angular/core';\nimport { ObjectMarkerComponent } from '@fundamental-ngx/core/object-marker';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-upload-collection-thumbnail]',\n host: { class: 'fd-upload-collection__thumbnail' }\n})\nexport class UploadCollectionThumbnailDirective {}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-upload-collection-title]',\n host: { class: 'fd-upload-collection__title' }\n})\nexport class UploadCollectionTitleDirective {\n constructor(public elRef: ElementRef) {}\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-upload-collection-description]',\n host: { class: 'fd-upload-collection__description' }\n})\nexport class UploadCollectionDescriptionDirective {}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-upload-collection-text-separator], fd-upload-collection-text-separator',\n host: { class: 'fd-upload-collection__text-separator' }\n})\nexport class UploadCollectionTextSeparatorDirective {}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-upload-collection-status-group]',\n host: { class: 'fd-upload-collection__status-group' }\n})\nexport class UploadCollectionStatusGroupDirective {}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-upload-collection-title-container]'\n})\nexport class UploadCollectionTitleContainerDirective {\n /** @hidden */\n @ContentChildren(ObjectMarkerComponent)\n _objectMarkerComponents: QueryList<ObjectMarkerComponent>;\n\n /** Whether or not this is in edit mode. */\n @HostBinding('class.fd-upload-collection__title-container')\n applyContainerClass = true;\n}\n","import { ChangeDetectionStrategy, Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'fd-upload-collection',\n host: { class: 'fd-upload-collection' },\n styleUrls: ['./upload-collection.component.scss'],\n template: `<ul fd-list [byline]=\"true\" [selection]=\"selection\">\n <ng-content></ng-content>\n </ul>`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class UploadCollectionComponent {\n /** Whether or not this is the small upload collection. */\n @Input()\n @HostBinding('class.fd-upload-collection--sm')\n small = false;\n\n /** Whether or not this upload collection supports selection. */\n @Input()\n selection = false;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { ButtonComponent } from '@fundamental-ngx/core/button';\n\n@Component({\n selector: 'fd-upload-collection-button-group',\n host: { class: 'fd-upload-collection__button-group' },\n templateUrl: './upload-collection-button-group.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class UploadCollectionButtonGroupComponent {\n /** @hidden */\n _editMode = false;\n\n /** Event emitted when the user clicks the edit button. */\n @Output()\n readonly editClicked = new EventEmitter<boolean>();\n\n /** Event emitted when the user clicks the OK button to conform a file name change. */\n @Output()\n readonly okClicked = new EventEmitter<any>();\n\n /** Event emitted when the user clicks the delete button. */\n @Output()\n readonly deleteClicked = new EventEmitter<any>();\n\n /** Whether or not to allow file name editing. Default is true. */\n @Input()\n allowFileNameEdit = true;\n\n /** Whether or not to show the delete button. Default is true. */\n @Input()\n allowFileDeletion = true;\n\n /** Whether or not to disable the file name edit button. Default is false. */\n @Input()\n disableFileNameEdit = false;\n\n /** Whether or not to disable the delete button. Default is false. */\n @Input()\n disableFileDeletion = false;\n\n /** Text for the 'Ok' button. */\n @Input()\n okText = 'Ok';\n\n /** Text for the 'Cancel' button. */\n @Input()\n cancelText = 'Cancel';\n\n /** Text for the 'Edit' aria-label. */\n @Input()\n editAriaLabel = 'Edit';\n\n /** Text for the 'Delete' aria-label. */\n @Input()\n deleteAriaLabel = 'Delete';\n\n /** Text for the 'Ok' aria-label. */\n @Input()\n okAriaLabel = 'Edit';\n\n /** Text for the 'Cancel' aria-label. */\n @Input()\n cancelAriaLabel = 'Cancel';\n\n /** @hidden */\n @ViewChild('okButton')\n _okButton: ButtonComponent;\n\n /** @hidden */\n _editButtonClicked(event?: MouseEvent): void {\n if (event) {\n event.stopPropagation();\n }\n this.editClicked.emit(true);\n this._editMode = true;\n }\n\n /** @hidden */\n _deleteButtonClicked(event?: MouseEvent): void {\n if (event) {\n event.stopPropagation();\n }\n this.deleteClicked.emit();\n }\n\n /** @hidden */\n _okButtonClicked(event?: MouseEvent): void {\n if (event) {\n event.stopPropagation();\n }\n this.okClicked.emit();\n }\n\n /** @hidden */\n _cancelButtonClicked(event?: MouseEvent): void {\n if (event) {\n event.stopPropagation();\n }\n this.editClicked.emit(false);\n this._editMode = false;\n }\n}\n","<button\n *ngIf=\"!_editMode && allowFileNameEdit\"\n [disabled]=\"disableFileNameEdit\"\n (click)=\"_editButtonClicked($event)\"\n fd-button\n fdType=\"transparent\"\n glyph=\"edit\"\n [attr.aria-label]=\"editAriaLabel\"\n></button>\n<button\n *ngIf=\"!_editMode && allowFileDeletion\"\n [disabled]=\"disableFileDeletion\"\n (click)=\"_deleteButtonClicked($event)\"\n fd-button\n fdType=\"transparent\"\n glyph=\"decline\"\n [attr.aria-label]=\"deleteAriaLabel\"\n></button>\n<button\n #okButton\n [style.display]=\"_editMode ? 'inline-flex' : 'none'\"\n (click)=\"_okButtonClicked($event)\"\n fd-button\n fdType=\"transparent\"\n [attr.aria-label]=\"okAriaLabel\"\n>\n {{ okText }}\n</button>\n<button\n *ngIf=\"_editMode\"\n (click)=\"_cancelButtonClicked($event)\"\n fd-button\n fdType=\"transparent\"\n [attr.aria-label]=\"cancelAriaLabel\"\n>\n {{ cancelText }}\n</button>\n","import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\n\n@Component({\n selector: 'fd-upload-collection-form-item',\n host: { class: 'fd-upload-collection__form-item' },\n templateUrl: './upload-collection-form-item.component.html',\n encapsulation: ViewEncapsulation.None\n})\nexport class UploadCollectionFormItemComponent implements ControlValueAccessor {\n /** Value for the input's placeholder. */\n @Input()\n placeholder = 'Filename';\n\n /** @hidden */\n @Input()\n _editMode = false;\n\n /** @hidden */\n _fileNameValue: string;\n\n /** @hidden */\n _extension: string;\n\n /** Event emitted when the dragged file exits the dropzone. */\n @Output()\n readonly fileNameChanged = new EventEmitter<string>();\n\n /** Get the value of the text input. */\n get fileName(): string {\n return this._fileNameValue;\n }\n\n /** Set the value of the text input. */\n set fileName(value) {\n this._fileNameValue = value;\n this.onChange(value);\n this.onTouched();\n this.fileNameChanged.emit(value);\n }\n\n /** @hidden */\n onChange: (value: string) => void = () => {};\n\n /** @hidden */\n onTouched = (): void => {};\n\n /** @hidden */\n writeValue(value: string): void {\n this.fileName = value;\n }\n\n /** @hidden */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n /** @hidden */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n}\n","<input\n *ngIf=\"_editMode\"\n fd-form-control\n required\n style=\"pointer-events: all\"\n class=\"fd-input\"\n type=\"text\"\n [attr.placeholder]=\"placeholder\"\n [(ngModel)]=\"fileName\"\n [state]=\"!fileName ? 'error' : null\"\n (click)=\"$event.stopPropagation()\"\n/>\n<span *ngIf=\"_editMode\" class=\"fd-upload-collection__extension\">.{{ _extension }}</span>\n","import { AfterContentInit, ContentChild, Directive, EventEmitter, Input, OnDestroy, Output } from '@angular/core';\nimport { UploadCollectionFormItemComponent } from './upload-collection-form-item/upload-collection-form-item.component';\nimport { UploadCollectionButtonGroupComponent } from './upload-collection-button-group/upload-collection-button-group.component';\nimport { Subscription } from 'rxjs';\nimport {\n UploadCollectionTitleContainerDirective,\n UploadCollectionTitleDirective\n} from './upload-collection-simple.directives';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-upload-collection-item]',\n host: { class: 'fd-upload-collection__item' }\n})\nexport class UploadCollectionItemDirective implements AfterContentInit, OnDestroy {\n /** The name of the file, not including the type extension. */\n @Input()\n fileName: string;\n\n /** The file type extension. */\n @Input()\n extension: string;\n\n /** @hidden */\n @ContentChild(UploadCollectionFormItemComponent)\n _formItemComponent: UploadCollectionFormItemComponent;\n\n /** @hidden */\n @ContentChild(UploadCollectionTitleDirective)\n _titleDirective: UploadCollectionTitleDirective;\n\n /** @hidden */\n @ContentChild(UploadCollectionButtonGroupComponent)\n _buttonGroupComponent: UploadCollectionButtonGroupComponent;\n\n /** @hidden */\n @ContentChild(UploadCollectionTitleContainerDirective)\n _titleContainerDirective: UploadCollectionTitleContainerDirective;\n\n /** Event emitted when the user changes a file name. */\n @Output()\n readonly fileNameChanged = new EventEmitter<any>();\n\n /** Event emitted when presses the delete button. */\n @Output()\n readonly deleteClicked = new EventEmitter<any>();\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n ngAfterContentInit(): void {\n this._titleDirective.elRef.nativeElement.innerHTML = this.fileName + '.' + this.extension;\n this._handleDeleteClickedSubscription();\n this._handleOkClickedSubscription();\n this._handleEditClickedSubscription();\n this._handleFormItemInputChangedSubscription();\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n /** @hidden */\n private _handleOkClickedSubscription(): void {\n this._subscriptions.add(\n this._buttonGroupComponent.okClicked.subscribe(() => {\n if (this._formItemComponent.fileName && this._formItemComponent.fileName !== '') {\n this.fileName = this._formItemComponent.fileName;\n this._titleDirective.elRef.nativeElement.style.display = 'inline-block';\n this._titleDirective.elRef.nativeElement.innerHTML = this.fileName + '.' + this.extension;\n this._formItemComponent._editMode = false;\n this._buttonGroupComponent._editMode = false;\n this.fileNameChanged.emit(this);\n }\n })\n );\n }\n\n /** @hidden */\n private _handleEditClickedSubscription(): void {\n this._subscriptions.add(\n this._buttonGroupComponent.editClicked.subscribe((event) => {\n this._formItemComponent._editMode = event;\n if (this._titleContainerDirective) {\n this._titleContainerDirective.applyContainerClass = !event;\n }\n const styles = [];\n styles.push(this._titleDirective.elRef.nativeElement.style);\n this._titleContainerDirective?._objectMarkerComponents?.forEach((objectMarker) => {\n styles.push(objectMarker.elementRef().nativeElement.style);\n });\n event\n ? styles.forEach((style) => (style.display = 'none'))\n : styles.forEach((style) => (style.display = 'inline-block'));\n if (event) {\n this._formItemComponent._extension = this.extension;\n this._formItemComponent.fileName = this.fileName;\n }\n })\n );\n }\n\n /** @hidden */\n private _handleDeleteClickedSubscription(): void {\n this._subscriptions.add(\n this._buttonGroupComponent.deleteClicked.subscribe(() => {\n this.deleteClicked.emit(this);\n })\n );\n }\n\n /** @hidden */\n private _handleFormItemInputChangedSubscription(): void {\n this._subscriptions.add(\n this._formItemComponent.fileNameChanged.subscribe((event) => {\n this._buttonGroupComponent._okButton.disabled = event === '';\n this._buttonGroupComponent._okButton.buildComponentCssClass();\n })\n );\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n UploadCollectionDescriptionDirective,\n UploadCollectionStatusGroupDirective,\n UploadCollectionTextSeparatorDirective,\n UploadCollectionThumbnailDirective,\n UploadCollectionTitleContainerDirective,\n UploadCollectionTitleDirective\n} from './upload-collection-simple.directives';\nimport { ListModule } from '@fundamental-ngx/core/list';\nimport { UploadCollectionComponent } from './upload-collection.component';\nimport { UploadCollectionButtonGroupComponent } from './upload-collection-button-group/upload-collection-button-group.component';\nimport { ButtonModule } from '@fundamental-ngx/core/button';\nimport { UploadCollectionFormItemComponent } from './upload-collection-form-item/upload-collection-form-item.component';\nimport { LinkModule } from '@fundamental-ngx/core/link';\nimport { FormsModule } from '@angular/forms';\nimport { FormControlModule } from '@fundamental-ngx/core/form';\nimport { UploadCollectionItemDirective } from './upload-collection-item.directive';\n\n@NgModule({\n declarations: [\n UploadCollectionComponent,\n UploadCollectionItemDirective,\n UploadCollectionThumbnailDirective,\n UploadCollectionTitleDirective,\n UploadCollectionDescriptionDirective,\n UploadCollectionTextSeparatorDirective,\n UploadCollectionStatusGroupDirective,\n UploadCollectionButtonGroupComponent,\n UploadCollectionFormItemComponent,\n UploadCollectionTitleContainerDirective\n ],\n imports: [CommonModule, ListModule, ButtonModule, LinkModule, FormsModule, FormControlModule],\n exports: [\n UploadCollectionComponent,\n UploadCollectionItemDirective,\n UploadCollectionThumbnailDirective,\n UploadCollectionTitleDirective,\n UploadCollectionDescriptionDirective,\n UploadCollectionTextSeparatorDirective,\n UploadCollectionStatusGroupDirective,\n UploadCollectionButtonGroupComponent,\n UploadCollectionFormItemComponent,\n UploadCollectionTitleContainerDirective\n ]\n})\nexport class UploadCollectionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAQa,kCAAkC;;+HAAlC,kCAAkC;mHAAlC,kCAAkC;2FAAlC,kCAAkC;kBAL9C,SAAS;mBAAC;;oBAEP,QAAQ,EAAE,kCAAkC;oBAC5C,IAAI,EAAE,EAAE,KAAK,EAAE,iCAAiC,EAAE;iBACrD;;MAQY,8BAA8B;IACvC,YAAmB,KAAiB;QAAjB,UAAK,GAAL,KAAK,CAAY;KAAI;;2HAD/B,8BAA8B;+GAA9B,8BAA8B;2FAA9B,8BAA8B;kBAL1C,SAAS;mBAAC;;oBAEP,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AtB,sBAAsB,iBAzB3B,yBAAyB;QACzB,6BAA6B;QAC7B,kCAAkC;QAClC,8BAA8B;QAC9B,oCAAoC;QACpC,sCAAsC;QACtC,oCAAoC;QACpC,oCAAoC;QACpC,iCAAiC;QACjC,uCAAuC,aAEjC,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,aAExF,yBAAyB;QACzB,6BAA6B;QAC7B,kCAAkC;QAClC,8BAA8B;QAC9B,oCAAoC;QACpC,sCAAsC;QACtC,oCAAoC;QACpC,oCAAoC;QACpC,iCAAiC;QACjC,uCAAuC;oHAGlC,sBAAsB,YAdtB,CAAC,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,CAAC;2FAcpF,sBAAsB;kBA3BlC,QAAQ;mBAAC;oBACN,YAAY,EAAE;wBACV,yBAAyB;wBACzB,6BAA6B;wBAC7B,kCAAkC;wBAClC,8BAA8B;wBAC9B,oCAAoC;wBACpC,sCAAsC;wBACtC,oCAAoC;wBACpC,oCAAoC;wBACpC,iCAAiC;wBACjC,uCAAuC;qBAC1C;oBACD,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,CAAC;oBAC7F,OAAO,EAAE;wBACL,yBAAyB;wBACzB,6BAA6B;wBAC7B,kCAAkC;wBAClC,8BAA8B;wBAC9B,oCAAoC;wBACpC,sCAAsC;wBACtC,oCAAoC;wBACpC,oCAAoC;wBACpC,iCAAiC;wBACjC,uCAAuC;qBAC1C;iBACJ;;;AC9CD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-core-upload-collection.mjs","sources":["../../../../libs/core/src/lib/upload-collection/upload-collection-simple.directives.ts","../../../../libs/core/src/lib/upload-collection/upload-collection.component.ts","../../../../libs/core/src/lib/upload-collection/upload-collection-button-group/upload-collection-button-group.component.ts","../../../../libs/core/src/lib/upload-collection/upload-collection-button-group/upload-collection-button-group.component.html","../../../../libs/core/src/lib/upload-collection/upload-collection-form-item/upload-collection-form-item.component.ts","../../../../libs/core/src/lib/upload-collection/upload-collection-form-item/upload-collection-form-item.component.html","../../../../libs/core/src/lib/upload-collection/upload-collection-item.directive.ts","../../../../libs/core/src/lib/upload-collection/upload-collection.module.ts","../../../../libs/core/src/lib/upload-collection/fundamental-ngx-core-upload-collection.ts"],"sourcesContent":["import { ContentChildren, Directive, ElementRef, HostBinding, QueryList } from '@angular/core';\nimport { ObjectMarkerComponent } from '@fundamental-ngx/core/object-marker';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-upload-collection-thumbnail]',\n host: { class: 'fd-upload-collection__thumbnail' }\n})\nexport class UploadCollectionThumbnailDirective {}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-upload-collection-title]',\n host: { class: 'fd-upload-collection__title' }\n})\nexport class UploadCollectionTitleDirective {\n constructor(public elRef: ElementRef) {}\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-upload-collection-description]',\n host: { class: 'fd-upload-collection__description' }\n})\nexport class UploadCollectionDescriptionDirective {}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-upload-collection-text-separator], fd-upload-collection-text-separator',\n host: { class: 'fd-upload-collection__text-separator' }\n})\nexport class UploadCollectionTextSeparatorDirective {}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-upload-collection-status-group]',\n host: { class: 'fd-upload-collection__status-group' }\n})\nexport class UploadCollectionStatusGroupDirective {}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-upload-collection-title-container]'\n})\nexport class UploadCollectionTitleContainerDirective {\n /** @hidden */\n @ContentChildren(ObjectMarkerComponent)\n _objectMarkerComponents: QueryList<ObjectMarkerComponent>;\n\n /** Whether or not this is in edit mode. */\n @HostBinding('class.fd-upload-collection__title-container')\n applyContainerClass = true;\n}\n","import { ChangeDetectionStrategy, Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'fd-upload-collection',\n host: { class: 'fd-upload-collection' },\n styleUrls: ['./upload-collection.component.scss'],\n template: `<ul fd-list [byline]=\"true\" [selection]=\"selection\">\n <ng-content></ng-content>\n </ul>`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class UploadCollectionComponent {\n /** Whether or not this is the small upload collection. */\n @Input()\n @HostBinding('class.fd-upload-collection--sm')\n small = false;\n\n /** Whether or not this upload collection supports selection. */\n @Input()\n selection = false;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { ButtonComponent } from '@fundamental-ngx/core/button';\n\n@Component({\n selector: 'fd-upload-collection-button-group',\n host: { class: 'fd-upload-collection__button-group' },\n templateUrl: './upload-collection-button-group.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class UploadCollectionButtonGroupComponent {\n /** @hidden */\n _editMode = false;\n\n /** Event emitted when the user clicks the edit button. */\n @Output()\n readonly editClicked = new EventEmitter<boolean>();\n\n /** Event emitted when the user clicks the OK button to conform a file name change. */\n @Output()\n readonly okClicked = new EventEmitter<any>();\n\n /** Event emitted when the user clicks the delete button. */\n @Output()\n readonly deleteClicked = new EventEmitter<any>();\n\n /** Whether or not to allow file name editing. Default is true. */\n @Input()\n allowFileNameEdit = true;\n\n /** Whether or not to show the delete button. Default is true. */\n @Input()\n allowFileDeletion = true;\n\n /** Whether or not to disable the file name edit button. Default is false. */\n @Input()\n disableFileNameEdit = false;\n\n /** Whether or not to disable the delete button. Default is false. */\n @Input()\n disableFileDeletion = false;\n\n /** Text for the 'Ok' button. */\n @Input()\n okText = 'Ok';\n\n /** Text for the 'Cancel' button. */\n @Input()\n cancelText = 'Cancel';\n\n /** Text for the 'Edit' aria-label. */\n @Input()\n editAriaLabel = 'Edit';\n\n /** Text for the 'Delete' aria-label. */\n @Input()\n deleteAriaLabel = 'Delete';\n\n /** Text for the 'Ok' aria-label. */\n @Input()\n okAriaLabel = 'Edit';\n\n /** Text for the 'Cancel' aria-label. */\n @Input()\n cancelAriaLabel = 'Cancel';\n\n /** @hidden */\n @ViewChild('okButton')\n _okButton: ButtonComponent;\n\n /** @hidden */\n _editButtonClicked(event?: MouseEvent): void {\n if (event) {\n event.stopPropagation();\n }\n this.editClicked.emit(true);\n this._editMode = true;\n }\n\n /** @hidden */\n _deleteButtonClicked(event?: MouseEvent): void {\n if (event) {\n event.stopPropagation();\n }\n this.deleteClicked.emit();\n }\n\n /** @hidden */\n _okButtonClicked(event?: MouseEvent): void {\n if (event) {\n event.stopPropagation();\n }\n this.okClicked.emit();\n }\n\n /** @hidden */\n _cancelButtonClicked(event?: MouseEvent): void {\n if (event) {\n event.stopPropagation();\n }\n this.editClicked.emit(false);\n this._editMode = false;\n }\n}\n","<button\n *ngIf=\"!_editMode && allowFileNameEdit\"\n [disabled]=\"disableFileNameEdit\"\n (click)=\"_editButtonClicked($event)\"\n fd-button\n fdType=\"transparent\"\n glyph=\"edit\"\n [attr.aria-label]=\"editAriaLabel\"\n></button>\n<button\n *ngIf=\"!_editMode && allowFileDeletion\"\n [disabled]=\"disableFileDeletion\"\n (click)=\"_deleteButtonClicked($event)\"\n fd-button\n fdType=\"transparent\"\n glyph=\"decline\"\n [attr.aria-label]=\"deleteAriaLabel\"\n></button>\n<button\n #okButton\n [style.display]=\"_editMode ? 'inline-flex' : 'none'\"\n (click)=\"_okButtonClicked($event)\"\n fd-button\n fdType=\"transparent\"\n [attr.aria-label]=\"okAriaLabel\"\n>\n {{ okText }}\n</button>\n<button\n *ngIf=\"_editMode\"\n (click)=\"_cancelButtonClicked($event)\"\n fd-button\n fdType=\"transparent\"\n [attr.aria-label]=\"cancelAriaLabel\"\n>\n {{ cancelText }}\n</button>\n","import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\n\n@Component({\n selector: 'fd-upload-collection-form-item',\n host: { class: 'fd-upload-collection__form-item' },\n templateUrl: './upload-collection-form-item.component.html',\n encapsulation: ViewEncapsulation.None\n})\nexport class UploadCollectionFormItemComponent implements ControlValueAccessor {\n /** Value for the input's placeholder. */\n @Input()\n placeholder = 'Filename';\n\n /** @hidden */\n @Input()\n _editMode = false;\n\n /** @hidden */\n _fileNameValue: string;\n\n /** @hidden */\n _extension: string;\n\n /** Event emitted when the dragged file exits the dropzone. */\n @Output()\n readonly fileNameChanged = new EventEmitter<string>();\n\n /** Get the value of the text input. */\n get fileName(): string {\n return this._fileNameValue;\n }\n\n /** Set the value of the text input. */\n set fileName(value) {\n this._fileNameValue = value;\n this.onChange(value);\n this.onTouched();\n this.fileNameChanged.emit(value);\n }\n\n /** @hidden */\n onChange: (value: string) => void = () => {};\n\n /** @hidden */\n onTouched = (): void => {};\n\n /** @hidden */\n writeValue(value: string): void {\n this.fileName = value;\n }\n\n /** @hidden */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n /** @hidden */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n}\n","<input\n *ngIf=\"_editMode\"\n fd-form-control\n required\n style=\"pointer-events: all\"\n class=\"fd-input\"\n type=\"text\"\n [attr.placeholder]=\"placeholder\"\n [(ngModel)]=\"fileName\"\n [state]=\"!fileName ? 'error' : null\"\n (click)=\"$event.stopPropagation()\"\n/>\n<span *ngIf=\"_editMode\" class=\"fd-upload-collection__extension\">.{{ _extension }}</span>\n","import {\n AfterContentInit,\n AfterViewInit,\n ContentChild,\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnDestroy,\n Output\n} from '@angular/core';\nimport { UploadCollectionFormItemComponent } from './upload-collection-form-item/upload-collection-form-item.component';\nimport { UploadCollectionButtonGroupComponent } from './upload-collection-button-group/upload-collection-button-group.component';\nimport { Subscription } from 'rxjs';\nimport {\n UploadCollectionTitleContainerDirective,\n UploadCollectionTitleDirective\n} from './upload-collection-simple.directives';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-upload-collection-item]',\n host: { class: 'fd-upload-collection__item' }\n})\nexport class UploadCollectionItemDirective implements AfterContentInit, OnDestroy, AfterViewInit {\n /** The name of the file, not including the type extension. */\n @Input()\n fileName: string;\n\n /** The file type extension. */\n @Input()\n extension: string;\n\n /** @hidden */\n @ContentChild(UploadCollectionFormItemComponent)\n _formItemComponent: UploadCollectionFormItemComponent;\n\n /** @hidden */\n @ContentChild(UploadCollectionTitleDirective)\n _titleDirective: UploadCollectionTitleDirective;\n\n /** @hidden */\n @ContentChild(UploadCollectionButtonGroupComponent)\n _buttonGroupComponent: UploadCollectionButtonGroupComponent;\n\n /** @hidden */\n @ContentChild(UploadCollectionTitleContainerDirective)\n _titleContainerDirective: UploadCollectionTitleContainerDirective;\n\n /** Event emitted when the user changes a file name. */\n @Output()\n readonly fileNameChanged = new EventEmitter<any>();\n\n /** Event emitted when presses the delete button. */\n @Output()\n readonly deleteClicked = new EventEmitter<any>();\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n fileNameFull: string;\n\n /** @hidden */\n titleWidth: number;\n\n /** @hidden used to compare to the current width to know whether to collapse or expand title */\n previousContainerWidth: number;\n\n /** @hidden */\n containerWidth: number;\n\n /** @hidden */\n ngAfterContentInit(): void {\n this.fileNameFull = this.fileName + '.' + this.extension;\n this._titleDirective.elRef.nativeElement.innerHTML = this.fileNameFull;\n this._handleDeleteClickedSubscription();\n this._handleOkClickedSubscription();\n this._handleEditClickedSubscription();\n this._handleFormItemInputChangedSubscription();\n }\n\n /** @hidden */\n ngAfterViewInit(): void {\n this.onResize();\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n constructor(public elementRef: ElementRef) {}\n\n /** @hidden */\n @HostListener('window:resize', [])\n onResize(): void {\n if (!this.elementRef.nativeElement.parentElement) {\n return;\n }\n this.titleWidth = this.getTitleWidth();\n this.containerWidth = this.getContainerWidth();\n\n // if first load and no previous container width, or if container boundary is resized to smaller than before\n if (!this.previousContainerWidth || this.containerWidth < this.previousContainerWidth) {\n // and the title extends past the container, 1.05x padding to prevent jaggy resizing.\n if (this.titleWidth * 1.05 >= this.containerWidth) {\n this.resizeFileTitle(this._titleDirective.elRef.nativeElement.innerHTML);\n }\n } else if (this.previousContainerWidth && this.containerWidth > this.previousContainerWidth) {\n // Looks to expand file title if container width is resized to greater than before\n // reset file title to initial\n this._titleDirective.elRef.nativeElement.innerHTML = this.fileNameFull;\n this.resizeFileTitle(this.fileNameFull);\n }\n\n this.previousContainerWidth = this.containerWidth;\n }\n\n /** @hidden */\n private _handleOkClickedSubscription(): void {\n this._subscriptions.add(\n this._buttonGroupComponent.okClicked.subscribe(() => {\n if (this._formItemComponent.fileName && this._formItemComponent.fileName !== '') {\n this.fileName = this._formItemComponent.fileName;\n this._titleDirective.elRef.nativeElement.style.display = 'inline-block';\n this.fileNameFull = this.fileName + '.' + this.extension;\n this._titleDirective.elRef.nativeElement.innerHTML = this.fileNameFull;\n this.resizeFileTitle(this.fileNameFull);\n this._formItemComponent._editMode = false;\n this._buttonGroupComponent._editMode = false;\n this.fileNameChanged.emit(this);\n }\n })\n );\n }\n\n /** @hidden */\n private _handleEditClickedSubscription(): void {\n this._subscriptions.add(\n this._buttonGroupComponent.editClicked.subscribe((event) => {\n this._formItemComponent._editMode = event;\n if (this._titleContainerDirective) {\n this._titleContainerDirective.applyContainerClass = !event;\n }\n const styles = [];\n styles.push(this._titleDirective.elRef.nativeElement.style);\n this._titleContainerDirective?._objectMarkerComponents?.forEach((objectMarker) => {\n styles.push(objectMarker.elementRef().nativeElement.style);\n });\n event\n ? styles.forEach((style) => (style.display = 'none'))\n : styles.forEach((style) => (style.display = 'inline-block'));\n if (event) {\n this._formItemComponent._extension = this.extension;\n this._formItemComponent.fileName = this.fileName;\n }\n })\n );\n }\n\n /** @hidden */\n private _handleDeleteClickedSubscription(): void {\n this._subscriptions.add(\n this._buttonGroupComponent.deleteClicked.subscribe(() => {\n this.deleteClicked.emit(this);\n })\n );\n }\n\n /** @hidden */\n private _handleFormItemInputChangedSubscription(): void {\n this._subscriptions.add(\n this._formItemComponent.fileNameChanged.subscribe((event) => {\n this._buttonGroupComponent._okButton.disabled = event === '';\n this._buttonGroupComponent._okButton.buildComponentCssClass();\n })\n );\n }\n\n /** @hidden */\n private getTitleWidth(): number {\n return this._titleDirective.elRef.nativeElement.getBoundingClientRect().width;\n }\n\n /** @hidden */\n private getContainerWidth(): number {\n return this._titleDirective.elRef.nativeElement.parentElement.getBoundingClientRect().width;\n }\n\n /**\n * @hidden\n *\n * truncates the string by cutting out excess length in the middle and replacing with '...'\n */\n private truncateTitle(str: string): string {\n const cutLength = Math.floor(str.length * 0.8);\n\n if (str.length > cutLength) {\n const stringLeftIndex = Math.floor(cutLength / 2);\n const stringRightIndex = str.length - stringLeftIndex + 3;\n return str.substring(0, stringLeftIndex) + '... ' + str.substring(stringRightIndex, str.length);\n }\n return str;\n }\n\n /**\n * @hidden\n *\n * determines if file title needs to be truncated given container constraint.\n */\n private resizeFileTitle(titleStr: string): void {\n let curTitle = titleStr;\n this.containerWidth = this.getContainerWidth();\n this.titleWidth = this.getTitleWidth();\n\n // repeatedly truncate the title until it fits inside container\n while (this.titleWidth * 1.05 >= this.containerWidth) {\n const truncatedTitleStr = this.truncateTitle(curTitle);\n this._titleDirective.elRef.nativeElement.innerHTML = truncatedTitleStr;\n curTitle = truncatedTitleStr;\n this.titleWidth = this.getTitleWidth();\n this.containerWidth = this.getContainerWidth();\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n UploadCollectionDescriptionDirective,\n UploadCollectionStatusGroupDirective,\n UploadCollectionTextSeparatorDirective,\n UploadCollectionThumbnailDirective,\n UploadCollectionTitleContainerDirective,\n UploadCollectionTitleDirective\n} from './upload-collection-simple.directives';\nimport { ListModule } from '@fundamental-ngx/core/list';\nimport { UploadCollectionComponent } from './upload-collection.component';\nimport { UploadCollectionButtonGroupComponent } from './upload-collection-button-group/upload-collection-button-group.component';\nimport { ButtonModule } from '@fundamental-ngx/core/button';\nimport { UploadCollectionFormItemComponent } from './upload-collection-form-item/upload-collection-form-item.component';\nimport { LinkModule } from '@fundamental-ngx/core/link';\nimport { FormsModule } from '@angular/forms';\nimport { FormControlModule } from '@fundamental-ngx/core/form';\nimport { UploadCollectionItemDirective } from './upload-collection-item.directive';\n\n@NgModule({\n declarations: [\n UploadCollectionComponent,\n UploadCollectionItemDirective,\n UploadCollectionThumbnailDirective,\n UploadCollectionTitleDirective,\n UploadCollectionDescriptionDirective,\n UploadCollectionTextSeparatorDirective,\n UploadCollectionStatusGroupDirective,\n UploadCollectionButtonGroupComponent,\n UploadCollectionFormItemComponent,\n UploadCollectionTitleContainerDirective\n ],\n imports: [CommonModule, ListModule, ButtonModule, LinkModule, FormsModule, FormControlModule],\n exports: [\n UploadCollectionComponent,\n UploadCollectionItemDirective,\n UploadCollectionThumbnailDirective,\n UploadCollectionTitleDirective,\n UploadCollectionDescriptionDirective,\n UploadCollectionTextSeparatorDirective,\n UploadCollectionStatusGroupDirective,\n UploadCollectionButtonGroupComponent,\n UploadCollectionFormItemComponent,\n UploadCollectionTitleContainerDirective\n ]\n})\nexport class UploadCollectionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAQa,kCAAkC;;+HAAlC,kCAAkC;mHAAlC,kCAAkC;2FAAlC,kCAAkC;kBAL9C,SAAS;mBAAC;;oBAEP,QAAQ,EAAE,kCAAkC;oBAC5C,IAAI,EAAE,EAAE,KAAK,EAAE,iCAAiC,EAAE;iBACrD;;MAQY,8BAA8B;IACvC,YAAmB,KA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2624
|
}
|
|
2625
2625
|
|
|
2626
|
+
/**
|
|
2627
|
+
* Utility type, that allows to track and select ranges of elements while using multi-selection.
|
|
2628
|
+
*
|
|
2629
|
+
* @usage
|
|
2630
|
+
* Imagine we have a simple list of checkboxes:
|
|
2631
|
+
* ```html
|
|
2632
|
+
* <input
|
|
2633
|
+
* #checkboxInput
|
|
2634
|
+
* *ngFor="let o of options; let idx = index"
|
|
2635
|
+
* type="checkbox"
|
|
2636
|
+
* [checked]="selectionModel.checked(o)"
|
|
2637
|
+
* (click)="toggle(idx, $event)"
|
|
2638
|
+
* >
|
|
2639
|
+
* ```
|
|
2640
|
+
* With the given layout the logic should be as follows:
|
|
2641
|
+
* ```typescript
|
|
2642
|
+
* export class YourComponent {
|
|
2643
|
+
* options = ['a', 'b', 'c'];
|
|
2644
|
+
* readonly selectionModel = new SelectionModel(true);
|
|
2645
|
+
*
|
|
2646
|
+
* private readonly _rangeSelector = new RangeSelector();
|
|
2647
|
+
*
|
|
2648
|
+
*
|
|
2649
|
+
* toggle(idx: number, event: PointerEvent): void {
|
|
2650
|
+
* // getting the toggled value of the checkbox
|
|
2651
|
+
* const toggledSelection = event.target.value;
|
|
2652
|
+
*
|
|
2653
|
+
* // registering the selection of current checkbox
|
|
2654
|
+
* this._rangeSelector.onRangeElementToggled(idx, event);
|
|
2655
|
+
*
|
|
2656
|
+
* // Apply value to each element in range.
|
|
2657
|
+
* // If checkbox was toggled without shift pressed or without previously selected one,
|
|
2658
|
+
* // this method will select only it.
|
|
2659
|
+
* this._rangeSelector.applyValueToEachInRange(idx => {
|
|
2660
|
+
* if (toggledSelection) {
|
|
2661
|
+
* this.selectionModel.select(options[idx]);
|
|
2662
|
+
* } else {
|
|
2663
|
+
* this.selectionModel.deselect(options[idx]);
|
|
2664
|
+
* }
|
|
2665
|
+
* });
|
|
2666
|
+
* }
|
|
2667
|
+
* }
|
|
2668
|
+
* ```
|
|
2669
|
+
*/
|
|
2670
|
+
class RangeSelector {
|
|
2671
|
+
constructor() {
|
|
2672
|
+
/** @hidden */
|
|
2673
|
+
this._previousSelectedIndex = null;
|
|
2674
|
+
}
|
|
2675
|
+
/**
|
|
2676
|
+
* Last registered selection state (either multiple or single).
|
|
2677
|
+
* Is updated on each `onRangeElementClicked` invokation. Will be `null` initially or once `reset()` is called.
|
|
2678
|
+
*/
|
|
2679
|
+
get lastRangeSelectionState() {
|
|
2680
|
+
return this._state ? Object.assign({}, this._state) : null;
|
|
2681
|
+
}
|
|
2682
|
+
/**
|
|
2683
|
+
* The method that should be used to register each checkbox toggle.
|
|
2684
|
+
* Accepts two arguments: `index` and `event`. If none provided, will reset existing state.
|
|
2685
|
+
* Otherwise will register current index as last checked.
|
|
2686
|
+
*
|
|
2687
|
+
* If toggling was done with "shift" pressed and there's a previously registered index, will register a range selection.
|
|
2688
|
+
* At the same time if checkbox was toggled without shift pressed or without previously selected one, this method will select only it.
|
|
2689
|
+
*
|
|
2690
|
+
* After calling this method it's recommended to use `applyValueToEachInRange` to actually toggle each checkbox in range.
|
|
2691
|
+
*
|
|
2692
|
+
* See usage example on this class itself.
|
|
2693
|
+
*/
|
|
2694
|
+
onRangeElementToggled(index, event) {
|
|
2695
|
+
if (this._isNonNegativeInteger(this._previousSelectedIndex) &&
|
|
2696
|
+
this._isNonNegativeInteger(index) &&
|
|
2697
|
+
(event === null || event === void 0 ? void 0 : event.shiftKey)) {
|
|
2698
|
+
this._state = {
|
|
2699
|
+
isRangeSelection: true,
|
|
2700
|
+
from: Math.min(this._previousSelectedIndex, index),
|
|
2701
|
+
to: Math.max(this._previousSelectedIndex, index)
|
|
2702
|
+
};
|
|
2703
|
+
this._previousSelectedIndex = index;
|
|
2704
|
+
}
|
|
2705
|
+
else if (this._isNonNegativeInteger(index)) {
|
|
2706
|
+
this._state = { isRangeSelection: false, from: index, to: index };
|
|
2707
|
+
this._previousSelectedIndex = index;
|
|
2708
|
+
}
|
|
2709
|
+
else {
|
|
2710
|
+
this.reset();
|
|
2711
|
+
}
|
|
2712
|
+
return this.lastRangeSelectionState;
|
|
2713
|
+
}
|
|
2714
|
+
/**
|
|
2715
|
+
* Allows to apply selection to each item in selection range.
|
|
2716
|
+
* Accepts a function to apply selection to each item by registered index.
|
|
2717
|
+
*
|
|
2718
|
+
* See usage example on this class itself.
|
|
2719
|
+
*/
|
|
2720
|
+
applyValueToEachInRange(selectionMethod) {
|
|
2721
|
+
const state = this.lastRangeSelectionState;
|
|
2722
|
+
if (this._isNonNegativeInteger(state === null || state === void 0 ? void 0 : state.from) && this._isNonNegativeInteger(state.to)) {
|
|
2723
|
+
for (let index = state.from; index <= state.to; index++) {
|
|
2724
|
+
selectionMethod(index);
|
|
2725
|
+
}
|
|
2726
|
+
}
|
|
2727
|
+
}
|
|
2728
|
+
/** Resets selection state. Useful when the list of selectable items is changed (e.g. by filtering, sorting, page change) */
|
|
2729
|
+
reset() {
|
|
2730
|
+
this._state = null;
|
|
2731
|
+
this._previousSelectedIndex = null;
|
|
2732
|
+
}
|
|
2733
|
+
/** @hidden */
|
|
2734
|
+
_isNonNegativeInteger(num) {
|
|
2735
|
+
return Number.isInteger(num) && num >= 0;
|
|
2736
|
+
}
|
|
2737
|
+
}
|
|
2738
|
+
|
|
2626
2739
|
var ContentDensityEnum;
|
|
2627
2740
|
(function (ContentDensityEnum) {
|
|
2628
2741
|
ContentDensityEnum["COMPACT"] = "compact";
|
|
@@ -3009,5 +3122,5 @@ function applyMixins(derivedCtor, baseCtors) {
|
|
|
3009
3122
|
* Generated bundle index. Do not edit.
|
|
3010
3123
|
*/
|
|
3011
3124
|
|
|
3012
|
-
export { ANY_LANGUAGE_LETTERS_GROUP_REGEX, ANY_LANGUAGE_LETTERS_REGEX, AbstractFdNgxClass, AutoCompleteDirective, AutoCompleteModule, ContentDensityEnum, ContentDensityService, DECIMAL_NUMBER_UNICODE_GROUP_REGEX, DECIMAL_NUMBER_UNICODE_RANGE, DECIMAL_NUMBER_UNICODE_REGEX, DEFAULT_CONTENT_DENSITY, DefaultTruncateCharCount, DisplayFnPipe, DndItemDirective, DndKeyboardGroupDirective, DndKeyboardItemDirective, DndListDirective, DragAndDropModule, DynamicComponentContainer, DynamicComponentInjector, DynamicComponentService, ELEMENT_REF_EXCEPTION, FocusKeyManagerHelpersModule, FocusKeyManagerItemDirective, FocusKeyManagerListDirective, FocusTrapService, INVALID_DATE_ERROR, InitialFocusDirective, InitialFocusModule, IsCompactDensityPipe, KeyUtil, KeyboardSupportService, LETTERS_UNICODE_RANGE, LIST_ITEM_COMPONENT, LineClampDirective, LineClampModule, LineClampTargetDirective, ListGroupPipe, MOBILE_CONFIG_ERROR, OVERFLOW_PRIORITY_SCORE, OnlyDigitsDirective, OnlyDigitsModule, OverflowListDirective, OverflowListItemDirective, OverflowListModule, PipeModule, RTL_LANGUAGE, ResizeDirective, ResizeHandleDirective, ResizeModule, RtlService, SafePipe, SearchHighlightPipe, THEME_SWITCHER_ROUTER_MISSING_ERROR, TemplateDirective, TemplateModule, ThemesService, TruncateDirective, TruncateModule, TwoDigitsPipe, UtilsModule, ValueByPathPipe, applyCssClass, applyCssStyle, applyMixins, getElementCapacity, getElementWidth, getRandomColorAccent, intersectionObservable, isCompactDensity, isValidContentDensity, parserFileSize, pxToNum, resizeObservable, scrollTop, toNativeElement, uuidv4 };
|
|
3125
|
+
export { ANY_LANGUAGE_LETTERS_GROUP_REGEX, ANY_LANGUAGE_LETTERS_REGEX, AbstractFdNgxClass, AutoCompleteDirective, AutoCompleteModule, ContentDensityEnum, ContentDensityService, DECIMAL_NUMBER_UNICODE_GROUP_REGEX, DECIMAL_NUMBER_UNICODE_RANGE, DECIMAL_NUMBER_UNICODE_REGEX, DEFAULT_CONTENT_DENSITY, DefaultTruncateCharCount, DisplayFnPipe, DndItemDirective, DndKeyboardGroupDirective, DndKeyboardItemDirective, DndListDirective, DragAndDropModule, DynamicComponentContainer, DynamicComponentInjector, DynamicComponentService, ELEMENT_REF_EXCEPTION, FocusKeyManagerHelpersModule, FocusKeyManagerItemDirective, FocusKeyManagerListDirective, FocusTrapService, INVALID_DATE_ERROR, InitialFocusDirective, InitialFocusModule, IsCompactDensityPipe, KeyUtil, KeyboardSupportService, LETTERS_UNICODE_RANGE, LIST_ITEM_COMPONENT, LineClampDirective, LineClampModule, LineClampTargetDirective, ListGroupPipe, MOBILE_CONFIG_ERROR, OVERFLOW_PRIORITY_SCORE, OnlyDigitsDirective, OnlyDigitsModule, OverflowListDirective, OverflowListItemDirective, OverflowListModule, PipeModule, RTL_LANGUAGE, RangeSelector, ResizeDirective, ResizeHandleDirective, ResizeModule, RtlService, SafePipe, SearchHighlightPipe, THEME_SWITCHER_ROUTER_MISSING_ERROR, TemplateDirective, TemplateModule, ThemesService, TruncateDirective, TruncateModule, TwoDigitsPipe, UtilsModule, ValueByPathPipe, applyCssClass, applyCssStyle, applyMixins, getElementCapacity, getElementWidth, getRandomColorAccent, intersectionObservable, isCompactDensity, isValidContentDensity, parserFileSize, pxToNum, resizeObservable, scrollTop, toNativeElement, uuidv4 };
|
|
3013
3126
|
//# sourceMappingURL=fundamental-ngx-core-utils.mjs.map
|