@lucca-front/ng 22.1.0-rc.1 → 22.1.0-rc.2
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 -0
- package/fesm2022/lucca-front-ng-a11y.mjs +1 -0
- package/fesm2022/lucca-front-ng-a11y.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-activity-feed.mjs +15 -12
- package/fesm2022/lucca-front-ng-activity-feed.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-approbation-inbox.mjs +3 -3
- package/fesm2022/lucca-front-ng-approbation-inbox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-box.mjs +1 -1
- package/fesm2022/lucca-front-ng-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs +1 -1
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-bubble-icon.mjs +2 -2
- package/fesm2022/lucca-front-ng-bubble-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-callout.mjs +3 -3
- package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-chip.mjs +14 -7
- package/fesm2022/lucca-front-ng-chip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-clear.mjs +1 -1
- package/fesm2022/lucca-front-ng-clear.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-api.mjs +42 -3
- package/fesm2022/lucca-front-ng-core-select-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs +32 -9
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs +11 -0
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-legal-units.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-user.mjs +32 -32
- package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select.mjs +309 -39
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-data-table.mjs +22 -14
- package/fesm2022/lucca-front-ng-data-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date.mjs +2 -4
- package/fesm2022/lucca-front-ng-date.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date2.mjs +210 -107
- package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dialog.mjs +9 -4
- package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dropdown.mjs +3 -0
- package/fesm2022/lucca-front-ng-dropdown.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-fancy-box.mjs +47 -24
- package/fesm2022/lucca-front-ng-fancy-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-file-upload.mjs +6 -6
- package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-filter-pills-core.mjs +55 -0
- package/fesm2022/lucca-front-ng-filter-pills-core.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-filter-pills.mjs +119 -70
- package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-field.mjs +110 -28
- package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-label.mjs +2 -2
- package/fesm2022/lucca-front-ng-form-label.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form.mjs +42 -5
- package/fesm2022/lucca-front-ng-form.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs +15 -13
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs +5 -2
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +61 -29
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms.mjs +23 -16
- package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-highlight-data.mjs +6 -7
- package/fesm2022/lucca-front-ng-highlight-data.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-impersonation.mjs +20 -5
- package/fesm2022/lucca-front-ng-impersonation.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-index-table.mjs +13 -8
- package/fesm2022/lucca-front-ng-index-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-inline-message.mjs +1 -1
- package/fesm2022/lucca-front-ng-inline-message.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-link.mjs +9 -4
- package/fesm2022/lucca-front-ng-link.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listbox.mjs +3 -2
- package/fesm2022/lucca-front-ng-listbox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-markdown.mjs +51 -0
- package/fesm2022/lucca-front-ng-markdown.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-mobile-push.mjs +2 -2
- package/fesm2022/lucca-front-ng-mobile-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-modal.mjs +9 -4
- package/fesm2022/lucca-front-ng-modal.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs +153 -48
- package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-option.mjs +6 -2
- package/fesm2022/lucca-front-ng-option.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-pagination.mjs +1 -1
- package/fesm2022/lucca-front-ng-pagination.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-picker.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-plg-push.mjs +1 -1
- package/fesm2022/lucca-front-ng-plg-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover2.mjs +21 -12
- package/fesm2022/lucca-front-ng-popover2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-priority-levels.mjs +128 -0
- package/fesm2022/lucca-front-ng-priority-levels.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-progress-stepper.mjs +2 -2
- package/fesm2022/lucca-front-ng-progress-stepper.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-read-more.mjs +3 -3
- package/fesm2022/lucca-front-ng-read-more.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-resource-card.mjs +2 -2
- package/fesm2022/lucca-front-ng-resource-card.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-safe-content.mjs +43 -3
- package/fesm2022/lucca-front-ng-safe-content.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scroll-box.mjs +8 -4
- package/fesm2022/lucca-front-ng-scroll-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs +9 -4
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control.mjs +10 -5
- package/fesm2022/lucca-front-ng-segmented-control.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-select.mjs +1 -1
- package/fesm2022/lucca-front-ng-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-simple-select.mjs +71 -17
- package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs +1 -1
- package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-software-icon.mjs +1 -1
- package/fesm2022/lucca-front-ng-software-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-status-badge.mjs +1 -1
- package/fesm2022/lucca-front-ng-status-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-time.mjs +1 -1
- package/fesm2022/lucca-front-ng-time.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user-popover.mjs +3 -2
- package/fesm2022/lucca-front-ng-user-popover.mjs.map +1 -1
- package/package.json +17 -4
- package/schematics/collection.json +5 -0
- package/schematics/deprecated-resolver/index.js +1 -4
- package/schematics/file-upload/index.js +22 -0
- package/schematics/file-upload/migration.js +230 -0
- package/schematics/file-upload/migration.spec.js +56 -0
- package/schematics/file-upload/schema.json +23 -0
- package/schematics/lib/angular-component-ast.js +3 -1
- package/schematics/lib/deprecated-mapper.js +2 -10
- package/schematics/lib/html-ast.js +26 -0
- package/src/components/_listbox.scss +12 -6
- package/src/components/cdk/_overlay.scss +3 -1
- package/types/lucca-front-ng-activity-feed.d.ts +16 -10
- package/types/lucca-front-ng-approbation-inbox.d.ts +32 -25
- package/types/lucca-front-ng-box.d.ts +12 -6
- package/types/lucca-front-ng-breadcrumbs.d.ts +12 -7
- package/types/lucca-front-ng-chip.d.ts +16 -9
- package/types/lucca-front-ng-clear.d.ts +12 -8
- package/types/lucca-front-ng-core-select-api.d.ts +30 -1
- package/types/lucca-front-ng-core-select-establishment.d.ts +7 -0
- package/types/lucca-front-ng-core-select-job-qualification.d.ts +8 -0
- package/types/lucca-front-ng-core-select-user.d.ts +6 -0
- package/types/lucca-front-ng-core-select.d.ts +115 -7
- package/types/lucca-front-ng-data-table.d.ts +16 -10
- package/types/lucca-front-ng-date.d.ts +12 -10
- package/types/lucca-front-ng-date2.d.ts +46 -21
- package/types/lucca-front-ng-fancy-box.d.ts +29 -12
- package/types/lucca-front-ng-file-upload.d.ts +41 -36
- package/types/lucca-front-ng-filter-pills-core.d.ts +69 -0
- package/types/lucca-front-ng-filter-pills.d.ts +53 -69
- package/types/lucca-front-ng-form-field.d.ts +34 -5
- package/types/lucca-front-ng-form-label.d.ts +13 -8
- package/types/lucca-front-ng-form.d.ts +7 -1
- package/types/lucca-front-ng-forms-rich-text-input.d.ts +40 -35
- package/types/lucca-front-ng-forms.d.ts +36 -44
- package/types/lucca-front-ng-highlight-data.d.ts +1 -2
- package/types/lucca-front-ng-impersonation.d.ts +28 -10
- package/types/lucca-front-ng-index-table.d.ts +3 -1
- package/types/lucca-front-ng-link.d.ts +16 -7
- package/types/lucca-front-ng-markdown.d.ts +24 -0
- package/types/lucca-front-ng-mobile-push.d.ts +18 -12
- package/types/lucca-front-ng-multi-select.d.ts +10 -1
- package/types/lucca-front-ng-option.d.ts +8 -8
- package/types/lucca-front-ng-pagination.d.ts +15 -10
- package/types/lucca-front-ng-picker.d.ts +2 -2
- package/types/lucca-front-ng-plg-push.d.ts +12 -6
- package/types/lucca-front-ng-popover2.d.ts +7 -1
- package/types/lucca-front-ng-priority-levels.d.ts +44 -0
- package/types/lucca-front-ng-read-more.d.ts +13 -9
- package/types/lucca-front-ng-safe-content.d.ts +8 -2
- package/types/lucca-front-ng-segmented-control-tabs.d.ts +5 -1
- package/types/lucca-front-ng-segmented-control.d.ts +5 -1
- package/types/lucca-front-ng-select.d.ts +6 -6
- package/types/lucca-front-ng-simple-select.d.ts +5 -1
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.migrateComponent = migrateComponent;
|
|
4
|
+
const change_1 = require("@schematics/angular/utility/change");
|
|
5
|
+
const typescript_1 = require("typescript");
|
|
6
|
+
const lib_1 = require("../lib");
|
|
7
|
+
const fileUploadEntrypoint = '@lucca-front/ng/file-upload';
|
|
8
|
+
const wrapperClass = 'fileEntryDisplayWrapper';
|
|
9
|
+
/** Alias given to the migrated entry in the generated `@if` block. */
|
|
10
|
+
const entryAlias = 'fileEntry';
|
|
11
|
+
/** Components whose `size` input has been flipped: `S` became the default, `L` restores the previous rendering. */
|
|
12
|
+
const sizedComponents = ['lu-single-file-upload', 'lu-multi-file-upload', 'lu-file-entry'];
|
|
13
|
+
/** Inputs `lu-single-file-upload` used to forward to the `lu-file-entry` it rendered itself. */
|
|
14
|
+
const fileEntryInputs = ['entry', 'state', 'previewUrl', 'inlineMessageError', 'displayFileName'];
|
|
15
|
+
/** Outputs `lu-single-file-upload` used to forward to the `lu-file-entry` it rendered itself. */
|
|
16
|
+
const fileEntryOutputs = ['deleteFile'];
|
|
17
|
+
function migrateComponent(path, content, tree) {
|
|
18
|
+
const sourceFile = (0, typescript_1.createSourceFile)(path, content, typescript_1.ScriptTarget.ESNext);
|
|
19
|
+
const symbolsToImport = new Set();
|
|
20
|
+
// External templates are rewritten in place, they are not part of the component file.
|
|
21
|
+
(0, lib_1.extractNgTemplatesIncludingHtml)(sourceFile, tree, path)
|
|
22
|
+
.filter((template) => template.filePath !== path)
|
|
23
|
+
.forEach((template) => {
|
|
24
|
+
const migrated = migrateTemplate(template.filePath, template.content, symbolsToImport);
|
|
25
|
+
if (migrated !== template.content) {
|
|
26
|
+
tree.overwrite(template.filePath, migrated);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const result = (0, lib_1.updateAngularTemplate)(path, content, (template) => migrateTemplate(path, template, symbolsToImport));
|
|
30
|
+
if (symbolsToImport.size === 0) {
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
// Imports are inserted one symbol at a time: every insertion shifts the offsets the next one relies on.
|
|
34
|
+
tree.overwrite(path, result);
|
|
35
|
+
symbolsToImport.forEach((symbol) => {
|
|
36
|
+
const updatedSourceFile = (0, typescript_1.createSourceFile)(path, tree.readText(path), typescript_1.ScriptTarget.ESNext);
|
|
37
|
+
const recorder = tree.beginUpdate(path);
|
|
38
|
+
(0, change_1.applyToUpdateRecorder)(recorder, [(0, lib_1.insertTSImportIfNeeded)(updatedSourceFile, path, symbol, fileUploadEntrypoint), (0, lib_1.insertAngularImportIfNeeded)(updatedSourceFile, path, symbol)]);
|
|
39
|
+
tree.commitUpdate(recorder);
|
|
40
|
+
});
|
|
41
|
+
return tree.readText(path);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Rules are applied in this order on purpose:
|
|
45
|
+
* 1. sizes are normalized first, so that splitting a `lu-single-file-upload` reads an already migrated size;
|
|
46
|
+
* 2. the split then emits its own `lu-file-entry-wrapper`, which the class rule must not visit again.
|
|
47
|
+
*/
|
|
48
|
+
function migrateTemplate(path, template, symbolsToImport) {
|
|
49
|
+
let result = migrateSize(path, template);
|
|
50
|
+
result = migrateFileEntryRendering(path, result, symbolsToImport);
|
|
51
|
+
return migrateWrapperClass(path, result, symbolsToImport);
|
|
52
|
+
}
|
|
53
|
+
function migrateSize(path, template) {
|
|
54
|
+
return (0, lib_1.updateContent)(template, (updates) => {
|
|
55
|
+
const htmlAst = new lib_1.HtmlAst(template);
|
|
56
|
+
sizedComponents.forEach((component) => {
|
|
57
|
+
htmlAst.visitElements(component, (element) => {
|
|
58
|
+
const boundSize = element.inputs.find((input) => input.name === 'size');
|
|
59
|
+
if (boundSize) {
|
|
60
|
+
const source = boundSize.value instanceof lib_1.currentSchematicContext.angularCompiler.ASTWithSource ? boundSize.value.source ?? '' : '';
|
|
61
|
+
switch (source.trim()) {
|
|
62
|
+
case `'S'`:
|
|
63
|
+
case `"S"`:
|
|
64
|
+
updates.push((0, lib_1.removeAttributeUpdate)(template, boundSize));
|
|
65
|
+
lib_1.currentSchematicContext.logSuccess(`Removing redundant [size] on <${component}> in ${path}`);
|
|
66
|
+
break;
|
|
67
|
+
case 'null':
|
|
68
|
+
updates.push({
|
|
69
|
+
position: boundSize.value.sourceSpan.start,
|
|
70
|
+
oldContent: source,
|
|
71
|
+
newContent: source.replace('null', `'L'`),
|
|
72
|
+
});
|
|
73
|
+
lib_1.currentSchematicContext.logSuccess(`Setting [size] to 'L' on <${component}> in ${path}`);
|
|
74
|
+
break;
|
|
75
|
+
default:
|
|
76
|
+
lib_1.currentSchematicContext.warn(`${path}: [size] of <${component}> is bound to an expression, migrate it manually ('S' is now the default value, 'L' is the previous one).`);
|
|
77
|
+
}
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const size = element.attributes.find((attribute) => attribute.name === 'size');
|
|
81
|
+
if (!size) {
|
|
82
|
+
updates.push((0, lib_1.addAttributeUpdate)(element, 'size', 'L'));
|
|
83
|
+
lib_1.currentSchematicContext.logSuccess(`Adding size="L" on <${component}> in ${path}`);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (size.value === 'S') {
|
|
87
|
+
updates.push((0, lib_1.removeAttributeUpdate)(template, size));
|
|
88
|
+
lib_1.currentSchematicContext.logSuccess(`Removing redundant size="S" on <${component}> in ${path}`);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
lib_1.currentSchematicContext.warn(`${path}: size="${size.value}" of <${component}> is not a known value, migrate it manually ('S' is now the default value, 'L' is the previous one).`);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* `lu-single-file-upload` no longer renders the `FileEntry` it receives: the parent now displays it itself,
|
|
98
|
+
* through a `lu-file-entry` wrapped in a `lu-file-entry-wrapper`.
|
|
99
|
+
*/
|
|
100
|
+
function migrateFileEntryRendering(path, template, symbolsToImport) {
|
|
101
|
+
return (0, lib_1.updateContent)(template, (updates) => {
|
|
102
|
+
const htmlAst = new lib_1.HtmlAst(template);
|
|
103
|
+
htmlAst.visitElements('lu-single-file-upload', (element) => {
|
|
104
|
+
const entry = element.inputs.find((input) => input.name === 'entry');
|
|
105
|
+
if (!entry) {
|
|
106
|
+
if (element.attributes.some((attribute) => attribute.name === 'entry')) {
|
|
107
|
+
lib_1.currentSchematicContext.warn(`${path}: <lu-single-file-upload> has a static entry attribute, migrate it manually.`);
|
|
108
|
+
}
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
// A size left bound to an expression by the size rule cannot be turned into the `media` of the file
|
|
112
|
+
// entry, which is what the file upload used to derive from it.
|
|
113
|
+
if (element.inputs.some((input) => input.name === 'size') && !hasSizeL(element)) {
|
|
114
|
+
lib_1.currentSchematicContext.warn(`${path}: <lu-single-file-upload [entry]> has a [size] bound to an expression, migrate it manually.`);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const openingTag = template.slice(element.startSourceSpan.start.offset, element.startSourceSpan.end.offset);
|
|
118
|
+
if (/\s\*[\w-]+/.test(openingTag)) {
|
|
119
|
+
lib_1.currentSchematicContext.warn(`${path}: <lu-single-file-upload [entry]> carries a structural directive, migrate it manually.`);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const entryExpression = entry.value instanceof lib_1.currentSchematicContext.angularCompiler.ASTWithSource ? (entry.value.source ?? '').trim() : '';
|
|
123
|
+
if (!entryExpression) {
|
|
124
|
+
lib_1.currentSchematicContext.warn(`${path}: could not read the [entry] expression of <lu-single-file-upload>, migrate it manually.`);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
updates.push(buildFileEntryRendering(template, element, entryExpression));
|
|
128
|
+
symbolsToImport.add('FileEntryComponent');
|
|
129
|
+
symbolsToImport.add('FileEntryWrapperComponent');
|
|
130
|
+
lib_1.currentSchematicContext.logSuccess(`Extracting the FileEntry of <lu-single-file-upload> in ${path}`);
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function buildFileEntryRendering(template, element, entryExpression) {
|
|
135
|
+
const start = element.sourceSpan.start.offset;
|
|
136
|
+
const end = (element.endSourceSpan ?? element.sourceSpan).end.offset;
|
|
137
|
+
const movedAttributes = [
|
|
138
|
+
...element.inputs.filter((input) => fileEntryInputs.includes(input.name)),
|
|
139
|
+
...element.attributes.filter((attribute) => fileEntryInputs.includes(attribute.name)),
|
|
140
|
+
...element.outputs.filter((output) => fileEntryOutputs.includes(output.name)),
|
|
141
|
+
];
|
|
142
|
+
// `lu-single-file-upload` used to render its entry as a media only in its large variant, always at size L.
|
|
143
|
+
const isLarge = hasSizeL(element);
|
|
144
|
+
const hasStructure = [...element.attributes, ...element.inputs].some((attribute) => attribute.name === 'structure');
|
|
145
|
+
const fileEntryAttributes = [
|
|
146
|
+
`[entry]="${entryAlias}"`,
|
|
147
|
+
'size="L"',
|
|
148
|
+
isLarge ? 'media' : '',
|
|
149
|
+
hasStructure ? 'structure' : '',
|
|
150
|
+
...movedAttributes.filter((attribute) => attribute.name !== 'entry').map((attribute) => template.slice(attribute.sourceSpan.start.offset, attribute.sourceSpan.end.offset)),
|
|
151
|
+
].filter(Boolean);
|
|
152
|
+
// The remaining file upload keeps everything the file entry did not take, formatting included.
|
|
153
|
+
const fileUpload = (0, lib_1.applyUpdates)(template.slice(start, end), movedAttributes.map((attribute) => {
|
|
154
|
+
const update = (0, lib_1.removeAttributeUpdate)(template, attribute);
|
|
155
|
+
return { ...update, position: update.position - start };
|
|
156
|
+
}));
|
|
157
|
+
const indent = getIndent(template, start);
|
|
158
|
+
const unit = indent.includes(' ') && !indent.includes('\t') ? ' ' : '\t';
|
|
159
|
+
return {
|
|
160
|
+
position: start,
|
|
161
|
+
oldContent: template.slice(start, end),
|
|
162
|
+
newContent: [
|
|
163
|
+
`@if (${entryExpression}; as ${entryAlias}) {`,
|
|
164
|
+
`${indent}${unit}<lu-file-entry-wrapper>`,
|
|
165
|
+
`${indent}${unit}${unit}<lu-file-entry ${fileEntryAttributes.join(' ')} />`,
|
|
166
|
+
`${indent}${unit}</lu-file-entry-wrapper>`,
|
|
167
|
+
`${indent}} @else {`,
|
|
168
|
+
`${indent}${unit}${fileUpload}`,
|
|
169
|
+
`${indent}}`,
|
|
170
|
+
].join('\n'),
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
/** The `fileEntryDisplayWrapper` CSS class is now carried by the `lu-file-entry-wrapper` component. */
|
|
174
|
+
function migrateWrapperClass(path, template, symbolsToImport) {
|
|
175
|
+
return (0, lib_1.updateContent)(template, (updates) => {
|
|
176
|
+
const htmlAst = new lib_1.HtmlAst(template);
|
|
177
|
+
htmlAst.visitElements(/.*/, (element) => {
|
|
178
|
+
const boundClass = element.inputs.find((input) => input.name === 'class' || input.name === `class.${wrapperClass}` || input.name === 'ngClass');
|
|
179
|
+
if (boundClass && template.slice(boundClass.sourceSpan.start.offset, boundClass.sourceSpan.end.offset).includes(wrapperClass)) {
|
|
180
|
+
lib_1.currentSchematicContext.warn(`${path}: .${wrapperClass} is applied through a binding on <${element.name}>, migrate it manually.`);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const classAttribute = element.attributes.find((attribute) => attribute.name === 'class');
|
|
184
|
+
const classes = classAttribute?.value.split(/\s+/).filter(Boolean) ?? [];
|
|
185
|
+
if (!classes.includes(wrapperClass) || !classAttribute) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
updates.push({
|
|
189
|
+
position: element.startSourceSpan.start.offset + '<'.length,
|
|
190
|
+
oldContent: element.name,
|
|
191
|
+
newContent: 'lu-file-entry-wrapper',
|
|
192
|
+
});
|
|
193
|
+
if (element.endSourceSpan && !element.isSelfClosing) {
|
|
194
|
+
updates.push({
|
|
195
|
+
position: element.endSourceSpan.start.offset + '</'.length,
|
|
196
|
+
oldContent: element.name,
|
|
197
|
+
newContent: 'lu-file-entry-wrapper',
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
const remainingClasses = classes.filter((className) => className !== wrapperClass);
|
|
201
|
+
if (remainingClasses.length === 0) {
|
|
202
|
+
updates.push((0, lib_1.removeAttributeUpdate)(template, classAttribute));
|
|
203
|
+
}
|
|
204
|
+
else if (classAttribute.valueSpan) {
|
|
205
|
+
updates.push({
|
|
206
|
+
position: classAttribute.valueSpan.start.offset,
|
|
207
|
+
oldContent: classAttribute.value,
|
|
208
|
+
newContent: remainingClasses.join(' '),
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
symbolsToImport.add('FileEntryWrapperComponent');
|
|
212
|
+
lib_1.currentSchematicContext.logSuccess(`Replacing .${wrapperClass} with <lu-file-entry-wrapper> in ${path}`);
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
function hasSizeL(element) {
|
|
217
|
+
if (element.attributes.some((attribute) => attribute.name === 'size' && attribute.value === 'L')) {
|
|
218
|
+
return true;
|
|
219
|
+
}
|
|
220
|
+
return element.inputs.some((input) => {
|
|
221
|
+
const source = input.value instanceof lib_1.currentSchematicContext.angularCompiler.ASTWithSource ? input.value.source ?? '' : '';
|
|
222
|
+
return input.name === 'size' && /^['"]L['"]$/.test(source.trim());
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
/** Whitespace preceding the element on its own line, used to indent the generated block. */
|
|
226
|
+
function getIndent(template, position) {
|
|
227
|
+
const lineStart = template.lastIndexOf('\n', position - 1) + 1;
|
|
228
|
+
const prefix = template.slice(lineStart, position);
|
|
229
|
+
return /^\s*$/.test(prefix) ? prefix : '';
|
|
230
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const path = __importStar(require("path"));
|
|
37
|
+
const lib_1 = require("../lib");
|
|
38
|
+
const collectionPath = path.normalize(path.join(__dirname, '..', 'collection.json'));
|
|
39
|
+
const testsRoot = path.join(__dirname, 'tests');
|
|
40
|
+
describe('file-upload Migration', () => {
|
|
41
|
+
it('should handle basic case files', async () => {
|
|
42
|
+
// Arrange
|
|
43
|
+
const tree = (0, lib_1.createTreeFromFolder)(path.join(testsRoot, 'input'));
|
|
44
|
+
const expectedTree = (0, lib_1.createTreeFromFolder)(path.join(testsRoot, 'output'));
|
|
45
|
+
// Act
|
|
46
|
+
try {
|
|
47
|
+
await (0, lib_1.runSchematic)('collection', collectionPath, 'file-upload', { skipInstall: true }, tree);
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
// eslint-disable-next-line no-console
|
|
51
|
+
console.log(error);
|
|
52
|
+
}
|
|
53
|
+
// Assert
|
|
54
|
+
(0, lib_1.expectTree)(tree).toMatchTree(expectedTree);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "LuccaFrontFileUpload",
|
|
4
|
+
"title": "Lucca Front File Upload Schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"dryRun": {
|
|
8
|
+
"type": "boolean",
|
|
9
|
+
"description": "Run through the migration without making any changes.",
|
|
10
|
+
"default": false
|
|
11
|
+
},
|
|
12
|
+
"skipInstall": {
|
|
13
|
+
"type": "boolean",
|
|
14
|
+
"description": "Skip installing dependencies.",
|
|
15
|
+
"default": false
|
|
16
|
+
},
|
|
17
|
+
"verbose": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"description": "Enable verbose logging.",
|
|
20
|
+
"default": false
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -132,7 +132,9 @@ function insertTSImportIfNeeded(sourceFile, fileToEdit, symbolName, fileName) {
|
|
|
132
132
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
133
133
|
if (!imports.some((node) => (node.propertyName || node.name)?.text === symbolName)) {
|
|
134
134
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call
|
|
135
|
-
|
|
135
|
+
// getStart() and not getFullStart(): the latter points before the leading trivia, which inserts the
|
|
136
|
+
// symbol right after the opening brace and leaves a double space behind it.
|
|
137
|
+
const insertPos = imports[0].getStart(sourceFile) || 0;
|
|
136
138
|
return new change_1.InsertChange(fileToEdit, insertPos, `${symbolName}, `);
|
|
137
139
|
}
|
|
138
140
|
return new change_1.NoopChange();
|
|
@@ -88,19 +88,11 @@ class DeprecatedMapper {
|
|
|
88
88
|
const elAst = new html_ast_1.HtmlAstVisitor(el);
|
|
89
89
|
// Static text attribute: `attrName` (boolean) or `attrName="value"`
|
|
90
90
|
elAst.visitAttribute(attrName, (attr) => {
|
|
91
|
-
|
|
92
|
-
const to = attr.sourceSpan.end.offset;
|
|
93
|
-
const hasLeadingSpace = from > 0 && template[from - 1] === ' ';
|
|
94
|
-
const removeFrom = hasLeadingSpace ? from - 1 : from;
|
|
95
|
-
updates.push({ position: removeFrom, oldContent: template.slice(removeFrom, to), newContent: '' });
|
|
91
|
+
updates.push((0, html_ast_1.removeAttributeUpdate)(template, attr));
|
|
96
92
|
});
|
|
97
93
|
// Bound attribute: `[attrName]="expr"`
|
|
98
94
|
elAst.visitBoundAttribute(attrName, (attr) => {
|
|
99
|
-
|
|
100
|
-
const to = attr.sourceSpan.end.offset;
|
|
101
|
-
const hasLeadingSpace = from > 0 && template[from - 1] === ' ';
|
|
102
|
-
const removeFrom = hasLeadingSpace ? from - 1 : from;
|
|
103
|
-
updates.push({ position: removeFrom, oldContent: template.slice(removeFrom, to), newContent: '' });
|
|
95
|
+
updates.push((0, html_ast_1.removeAttributeUpdate)(template, attr));
|
|
104
96
|
});
|
|
105
97
|
});
|
|
106
98
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HtmlAst = exports.HtmlAstVisitor = void 0;
|
|
4
|
+
exports.removeAttributeUpdate = removeAttributeUpdate;
|
|
5
|
+
exports.addAttributeUpdate = addAttributeUpdate;
|
|
4
6
|
exports.updateCssClassNames = updateCssClassNames;
|
|
5
7
|
exports.extractAllCssClassNames = extractAllCssClassNames;
|
|
6
8
|
exports.extractAllHtmlElementNames = extractAllHtmlElementNames;
|
|
@@ -109,6 +111,30 @@ class HtmlAst extends HtmlAstVisitor {
|
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
113
|
exports.HtmlAst = HtmlAst;
|
|
114
|
+
/**
|
|
115
|
+
* Builds the update removing an attribute from the template it belongs to, along with the whitespace preceding it.
|
|
116
|
+
*/
|
|
117
|
+
function removeAttributeUpdate(template, attribute) {
|
|
118
|
+
let position = attribute.sourceSpan.start.offset;
|
|
119
|
+
while (position > 0 && /\s/.test(template[position - 1])) {
|
|
120
|
+
position--;
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
position,
|
|
124
|
+
oldContent: template.slice(position, attribute.sourceSpan.end.offset),
|
|
125
|
+
newContent: ''
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Builds the update adding `name="value"` right after the tag name of the given element.
|
|
130
|
+
*/
|
|
131
|
+
function addAttributeUpdate(element, name, value) {
|
|
132
|
+
return {
|
|
133
|
+
position: element.startSourceSpan.start.offset + '<'.length + element.name.length,
|
|
134
|
+
oldContent: '',
|
|
135
|
+
newContent: ` ${name}="${value}"`
|
|
136
|
+
};
|
|
137
|
+
}
|
|
112
138
|
function updateCssClassNames(content, oldClassToNewClass) {
|
|
113
139
|
return (0, file_update_js_1.updateContent)(content, (updates) => {
|
|
114
140
|
const root = new HtmlAst(content);
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
1
|
+
// These components render listbox markup styled by shared `@lucca-front/scss` sheets, not by component-scoped CSS:
|
|
2
|
+
// - `lu-listbox`.
|
|
3
|
+
// - `lu-select-option`.
|
|
4
|
+
// - `lu-listbox-option`.
|
|
5
|
+
// - `lu-color-input`.
|
|
6
|
+
//
|
|
7
|
+
// Those sheets are forwarded here:
|
|
8
|
+
// - Importing `@lucca-front/ng/styles` is enough to render the selects.
|
|
9
|
+
// - Consumers don't need `@lucca-front/scss` `main-all`, nor these sheets à la carte.
|
|
10
|
+
// - Sass loads each sheet once per compilation: apps importing them too emit them once.
|
|
11
|
+
// - `checkboxField`: `multiple` option renders HTML, not `lu-checkbox-input`.
|
|
7
12
|
@forward '@lucca-front/scss/src/components/listboxOption';
|
|
13
|
+
@forward '@lucca-front/scss/src/components/checkboxField';
|
|
8
14
|
@forward '@lucca-front/scss/src/components/color';
|
|
@@ -41,7 +41,9 @@
|
|
|
41
41
|
max-inline-size: 30rem;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
// Caps the panel anchored to the field only: below the `S` breakpoint the panel is rendered by the
|
|
45
|
+
// dialog as a sheet, which spans the whole viewport and sizes itself.
|
|
46
|
+
&:not(.dialog):has(> lu-select-panel) {
|
|
45
47
|
max-inline-size: 35rem !important;
|
|
46
48
|
}
|
|
47
49
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
import * as _lucca_front_ng_activity_feed from '@lucca-front/ng/activity-feed';
|
|
4
|
+
import { PortalContent, LuTranslation } from '@lucca-front/ng/core';
|
|
5
|
+
import { LuccaIcon } from '@lucca-front/ng/icon';
|
|
3
6
|
import { ILuUser } from '@lucca-front/ng/user';
|
|
4
7
|
|
|
5
8
|
/**
|
|
@@ -8,16 +11,13 @@ import { ILuUser } from '@lucca-front/ng/user';
|
|
|
8
11
|
declare const ACTIVITY_FEED_STEP_STATUS: readonly ["success", "critical", "pending"];
|
|
9
12
|
type ActivityFeedStepStatus = (typeof ACTIVITY_FEED_STEP_STATUS)[number];
|
|
10
13
|
|
|
11
|
-
interface ActivityFeedTranslate {
|
|
12
|
-
replaceByAlt: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
14
|
declare class ActivityFeedStepComponent {
|
|
16
15
|
#private;
|
|
17
|
-
readonly intl: _angular_core.InputSignalWithTransform<ActivityFeedTranslate, Partial<ActivityFeedTranslate>>;
|
|
16
|
+
readonly intl: _angular_core.InputSignalWithTransform<_lucca_front_ng_activity_feed.ActivityFeedTranslate, Partial<_lucca_front_ng_activity_feed.ActivityFeedTranslate>>;
|
|
18
17
|
readonly label: _angular_core.InputSignal<PortalContent>;
|
|
19
18
|
readonly user: _angular_core.InputSignal<ILuUser>;
|
|
20
19
|
readonly status: _angular_core.InputSignal<"success" | "critical" | "pending">;
|
|
20
|
+
readonly icon: _angular_core.InputSignal<LuccaIcon>;
|
|
21
21
|
readonly date: _angular_core.InputSignal<string | Date>;
|
|
22
22
|
protected readonly preparedDate: _angular_core.Signal<Date>;
|
|
23
23
|
/**
|
|
@@ -28,12 +28,12 @@ declare class ActivityFeedStepComponent {
|
|
|
28
28
|
readonly datePipeFormat: _angular_core.InputSignal<string>;
|
|
29
29
|
protected readonly dateDisplay: _angular_core.Signal<string>;
|
|
30
30
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ActivityFeedStepComponent, never>;
|
|
31
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ActivityFeedStepComponent, "lu-activity-feed-step", never, { "intl": { "alias": "intl"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "user": { "alias": "user"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "date": { "alias": "date"; "required": false; "isSignal": true; }; "datePipeFormat": { "alias": "datePipeFormat"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
31
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ActivityFeedStepComponent, "lu-activity-feed-step", never, { "intl": { "alias": "intl"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "user": { "alias": "user"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "date": { "alias": "date"; "required": false; "isSignal": true; }; "datePipeFormat": { "alias": "datePipeFormat"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
declare class ActivityFeedUpdateItemComponent {
|
|
35
35
|
#private;
|
|
36
|
-
readonly intl: _angular_core.InputSignalWithTransform<ActivityFeedTranslate, Partial<ActivityFeedTranslate>>;
|
|
36
|
+
readonly intl: _angular_core.InputSignalWithTransform<_lucca_front_ng_activity_feed.ActivityFeedTranslate, Partial<_lucca_front_ng_activity_feed.ActivityFeedTranslate>>;
|
|
37
37
|
readonly label: _angular_core.InputSignal<string>;
|
|
38
38
|
readonly colonDisplay: _angular_core.Signal<" :" | ":">;
|
|
39
39
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ActivityFeedUpdateItemComponent, never>;
|
|
@@ -50,5 +50,11 @@ declare class ActivityFeedComponent {
|
|
|
50
50
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ActivityFeedComponent, "lu-activity-feed", never, {}, {}, never, ["*"], true, never>;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
declare const LU_ACTIVITY_FEED_TRANSLATIONS: InjectionToken<LuTranslation<ActivityFeedTranslate>>;
|
|
54
|
+
interface ActivityFeedTranslate {
|
|
55
|
+
replaceByAlt: string;
|
|
56
|
+
}
|
|
57
|
+
declare const luActivityFeedTranslations: LuTranslation<ActivityFeedTranslate>;
|
|
58
|
+
|
|
59
|
+
export { ACTIVITY_FEED_STEP_STATUS, ActivityFeedComponent, ActivityFeedStepComponent, ActivityFeedUpdateComponent, ActivityFeedUpdateItemComponent, LU_ACTIVITY_FEED_TRANSLATIONS, luActivityFeedTranslations };
|
|
60
|
+
export type { ActivityFeedStepStatus, ActivityFeedTranslate };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef, OnInit, WritableSignal } from '@angular/core';
|
|
2
|
+
import { TemplateRef, OnInit, InjectionToken, WritableSignal } from '@angular/core';
|
|
3
3
|
import { LuDialogRef, LuDialogService } from '@lucca-front/ng/dialog';
|
|
4
|
+
import * as _lucca_front_ng_approbation_inbox from '@lucca-front/ng/approbation-inbox';
|
|
5
|
+
import { LuTranslation, PortalContent, LuPluralForms } from '@lucca-front/ng/core';
|
|
4
6
|
import { LuccaIcon } from '@lucca/prisme/icon';
|
|
5
|
-
import { LuPluralForms, PortalContent } from '@lucca-front/ng/core';
|
|
6
7
|
|
|
7
8
|
declare class ApprobationInboxDetailMainBlockComponent {
|
|
8
9
|
readonly label: _angular_core.InputSignal<string>;
|
|
@@ -46,16 +47,8 @@ declare class ApprobationInboxLinkComponent {
|
|
|
46
47
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ApprobationInboxLinkComponent, "a[lu-approbation-inbox-list-action]", never, { "current": { "alias": "current"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
interface LuApprobationInboxListGroupTranslations {
|
|
50
|
-
selectGroup: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
interface LuApprobationInboxListItemTranslations {
|
|
54
|
-
selectItem: string;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
50
|
declare class ApprobationInboxItemComponent implements OnInit {
|
|
58
|
-
protected readonly intl: _angular_core.InputSignalWithTransform<LuApprobationInboxListItemTranslations, Partial<LuApprobationInboxListItemTranslations>>;
|
|
51
|
+
protected readonly intl: _angular_core.InputSignalWithTransform<_lucca_front_ng_approbation_inbox.LuApprobationInboxListItemTranslations, Partial<_lucca_front_ng_approbation_inbox.LuApprobationInboxListItemTranslations>>;
|
|
59
52
|
private readonly list;
|
|
60
53
|
private readonly destroyRef;
|
|
61
54
|
readonly selectable: _angular_core.Signal<boolean>;
|
|
@@ -70,7 +63,7 @@ declare class ApprobationInboxItemComponent implements OnInit {
|
|
|
70
63
|
}
|
|
71
64
|
|
|
72
65
|
declare class ApprobationInboxGroupComponent {
|
|
73
|
-
protected readonly intl: _angular_core.InputSignalWithTransform<LuApprobationInboxListGroupTranslations, Partial<LuApprobationInboxListGroupTranslations>>;
|
|
66
|
+
protected readonly intl: _angular_core.InputSignalWithTransform<_lucca_front_ng_approbation_inbox.LuApprobationInboxListGroupTranslations, Partial<_lucca_front_ng_approbation_inbox.LuApprobationInboxListGroupTranslations>>;
|
|
74
67
|
private readonly list;
|
|
75
68
|
readonly selectable: _angular_core.Signal<boolean>;
|
|
76
69
|
readonly label: _angular_core.InputSignal<string>;
|
|
@@ -85,6 +78,12 @@ declare class ApprobationInboxGroupComponent {
|
|
|
85
78
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ApprobationInboxGroupComponent, "lu-approbation-inbox-list-group", never, { "intl": { "alias": "intl"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, ["items"], ["*"], true, never>;
|
|
86
79
|
}
|
|
87
80
|
|
|
81
|
+
declare const LU_APPROBATION_INBOX_LIST_GROUP_TRANSLATIONS: InjectionToken<LuTranslation<LuApprobationInboxListGroupTranslations>>;
|
|
82
|
+
interface LuApprobationInboxListGroupTranslations {
|
|
83
|
+
selectGroup: string;
|
|
84
|
+
}
|
|
85
|
+
declare const luApprobationInboxListGroupTranslations: LuTranslation<LuApprobationInboxListGroupTranslations>;
|
|
86
|
+
|
|
88
87
|
interface ApprobationInboxIcon {
|
|
89
88
|
icon: LuccaIcon;
|
|
90
89
|
alt: string;
|
|
@@ -96,26 +95,22 @@ declare class ApprobationInboxIconsComponent {
|
|
|
96
95
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ApprobationInboxIconsComponent, "lu-approbation-inbox-list-icons", never, { "icons": { "alias": "icons"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
97
96
|
}
|
|
98
97
|
|
|
98
|
+
declare const LU_APPROBATION_INBOX_LIST_ITEM_TRANSLATIONS: InjectionToken<LuTranslation<LuApprobationInboxListItemTranslations>>;
|
|
99
|
+
interface LuApprobationInboxListItemTranslations {
|
|
100
|
+
selectItem: string;
|
|
101
|
+
}
|
|
102
|
+
declare const luApprobationInboxListItemTranslations: LuTranslation<LuApprobationInboxListItemTranslations>;
|
|
103
|
+
|
|
99
104
|
declare class ApprobationInboxSubtleComponent {
|
|
100
105
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ApprobationInboxSubtleComponent, never>;
|
|
101
106
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ApprobationInboxSubtleComponent, "lu-approbation-inbox-list-subtle", never, {}, {}, never, ["*"], true, never>;
|
|
102
107
|
}
|
|
103
108
|
|
|
104
|
-
interface LuApprobationInboxListTranslations {
|
|
105
|
-
selectAll: string;
|
|
106
|
-
selectedCount: LuPluralForms;
|
|
107
|
-
label: string;
|
|
108
|
-
submitLabel: string;
|
|
109
|
-
forwardLabel: string;
|
|
110
|
-
emptyLabel: string;
|
|
111
|
-
emptyResetLabel: string;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
109
|
interface SelectableItem {
|
|
115
110
|
checked: WritableSignal<boolean>;
|
|
116
111
|
}
|
|
117
112
|
declare class ApprobationInboxListComponent {
|
|
118
|
-
protected readonly intl: _angular_core.InputSignalWithTransform<LuApprobationInboxListTranslations, Partial<LuApprobationInboxListTranslations>>;
|
|
113
|
+
protected readonly intl: _angular_core.InputSignalWithTransform<_lucca_front_ng_approbation_inbox.LuApprobationInboxListTranslations, Partial<_lucca_front_ng_approbation_inbox.LuApprobationInboxListTranslations>>;
|
|
119
114
|
private readonly pluralRules;
|
|
120
115
|
readonly titleId: string;
|
|
121
116
|
readonly label: _angular_core.InputSignal<PortalContent>;
|
|
@@ -138,5 +133,17 @@ declare class ApprobationInboxListComponent {
|
|
|
138
133
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ApprobationInboxListComponent, "lu-approbation-inbox-list", never, { "intl": { "alias": "intl"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "detailsComponent": { "alias": "detailsComponent"; "required": true; "isSignal": true; }; "emptyIllustration": { "alias": "emptyIllustration"; "required": false; "isSignal": true; }; "emptyResetButton": { "alias": "emptyResetButton"; "required": false; "isSignal": true; }; }, { "submitEvent": "submitEvent"; "resetEvent": "resetEvent"; "forwardEvent": "forwardEvent"; }, never, ["[approbationInboxListFilterBar]", "*"], true, never>;
|
|
139
134
|
}
|
|
140
135
|
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
declare const LU_APPROBATION_INBOX_LIST_TRANSLATIONS: InjectionToken<LuTranslation<LuApprobationInboxListTranslations>>;
|
|
137
|
+
interface LuApprobationInboxListTranslations {
|
|
138
|
+
selectAll: string;
|
|
139
|
+
selectedCount: LuPluralForms;
|
|
140
|
+
label: string;
|
|
141
|
+
submitLabel: string;
|
|
142
|
+
forwardLabel: string;
|
|
143
|
+
emptyLabel: string;
|
|
144
|
+
emptyResetLabel: string;
|
|
145
|
+
}
|
|
146
|
+
declare const luApprobationInboxListTranslations: LuTranslation<LuApprobationInboxListTranslations>;
|
|
147
|
+
|
|
148
|
+
export { ApprobationInboxDetailComponent, ApprobationInboxDetailMainBlockComponent, ApprobationInboxGroupComponent, ApprobationInboxHeaderComponent, ApprobationInboxIconsComponent, ApprobationInboxItemComponent, ApprobationInboxLinkComponent, ApprobationInboxListComponent, ApprobationInboxSubtleComponent, LU_APPROBATION_INBOX_LIST_GROUP_TRANSLATIONS, LU_APPROBATION_INBOX_LIST_ITEM_TRANSLATIONS, LU_APPROBATION_INBOX_LIST_TRANSLATIONS, luApprobationInboxListGroupTranslations, luApprobationInboxListItemTranslations, luApprobationInboxListTranslations };
|
|
149
|
+
export type { ApprobationInboxIcon, LuApprobationInboxListGroupTranslations, LuApprobationInboxListItemTranslations, LuApprobationInboxListTranslations };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
import * as _lucca_front_ng_box from '@lucca-front/ng/box';
|
|
4
|
+
import { LuTranslation } from '@lucca-front/ng/core';
|
|
6
5
|
|
|
7
6
|
declare class BoxComponent {
|
|
8
|
-
readonly intl: _angular_core.InputSignalWithTransform<LuBoxLabel, Partial<LuBoxLabel>>;
|
|
7
|
+
readonly intl: _angular_core.InputSignalWithTransform<_lucca_front_ng_box.LuBoxLabel, Partial<_lucca_front_ng_box.LuBoxLabel>>;
|
|
9
8
|
readonly toggle: _angular_core.InputSignalWithTransform<boolean, boolean | "" | "false" | "true">;
|
|
10
9
|
readonly neutral: _angular_core.InputSignalWithTransform<boolean, boolean | "" | "false" | "true">;
|
|
11
10
|
readonly killable: _angular_core.InputSignalWithTransform<boolean, boolean | "" | "false" | "true">;
|
|
@@ -15,4 +14,11 @@ declare class BoxComponent {
|
|
|
15
14
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BoxComponent, "lu-box", never, { "intl": { "alias": "intl"; "required": false; "isSignal": true; }; "toggle": { "alias": "toggle"; "required": false; "isSignal": true; }; "neutral": { "alias": "neutral"; "required": false; "isSignal": true; }; "killable": { "alias": "killable"; "required": false; "isSignal": true; }; "withArrow": { "alias": "withArrow"; "required": false; "isSignal": true; }; }, { "killed": "killed"; }, never, ["*"], true, never>;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
declare const LU_BOX_TRANSLATIONS: InjectionToken<LuTranslation<LuBoxLabel>>;
|
|
18
|
+
interface LuBoxLabel {
|
|
19
|
+
close: string;
|
|
20
|
+
}
|
|
21
|
+
declare const luBoxTranslations: LuTranslation<LuBoxLabel>;
|
|
22
|
+
|
|
23
|
+
export { BoxComponent, LU_BOX_TRANSLATIONS, luBoxTranslations };
|
|
24
|
+
export type { LuBoxLabel };
|